]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20231016
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.766 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230903.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-check-size     compile-in code to detect screensize
845   --enable-colorfgbg      compile-in experimental $COLORFGBG code
846   --enable-fvisibility    compile with -fvisibility=hidden
847   --enable-interop        compile-in interop bindings
848   --enable-safe-sprintf   compile with experimental safe-sprintf code
849   --disable-scroll-hints  compile without scroll-hints code
850   --enable-wgetch-events  compile with wgetch-events code
851   --enable-exp-win32      compile with experimental-Windows driver
852 Testing/development Options:
853   --disable-echo          do not display "compiling" commands
854   --disable-stripping     do not strip (debug info) installed executables
855   --with-strip-program=XX specify program to use when stripping in install
856   --enable-warnings       test: turn on gcc compiler warnings
857   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
858   --enable-string-hacks   work around bogus compiler/loader warnings
859   --enable-assertions     test: turn on generation of assertion code
860   --with-dmalloc          test: use Gray Watson's dmalloc library
861   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
862   --with-valgrind         test: use valgrind
863   --disable-leaks         test: free permanent memory, analyze leaks
864   --enable-expanded       test: generate functions for certain macros
865   --disable-macros        test: use functions rather than macros
866   --with-trace            test: add trace() function to all models of ncurses
867   --disable-gnat-projects test: disable GNAT projects even if usable
868 Ada Binding Options:
869   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
870   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
871   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
872   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
873   --with-ada-libname=XXX  override default Ada library-name
874   --with-form-libname=XXX override form basename of library
875   --with-menu-libname=XXX override menu basename of library
876   --with-panel-libname=XXX override panel basename of library
877   --with-cxx-libname=XXX override ncurses++ basename of library
878
879 Some influential environment variables:
880   CC          C compiler command
881   CFLAGS      C compiler flags
882   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
883               nonstandard directory <lib dir>
884   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
885               headers in a nonstandard directory <include dir>
886   CPP         C preprocessor
887   CXX         C++ compiler command
888   CXXFLAGS    C++ compiler flags
889   CXXCPP      C++ preprocessor
890
891 Use these variables to override the choices made by `configure' or to help
892 it to find libraries and programs with nonstandard names/locations.
893
894 EOF
895 fi
896
897 if test "$ac_init_help" = "recursive"; then
898   # If there are subdirs, report their specific --help.
899   ac_popdir=`pwd`
900   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
901     cd "$ac_subdir"
902     # A "../" for each directory in /$ac_subdir.
903     ac_dots=`echo "$ac_subdir" |
904              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
905
906     case "$srcdir" in
907     .) # No --srcdir option.  We are building in place.
908       ac_sub_srcdir="$srcdir" ;;
909     [\\/]* | ?:[\\/]* ) # Absolute path.
910       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
911     *) # Relative path.
912       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
913     esac
914
915     # Check for guested configure; otherwise get Cygnus style configure.
916     if test -f "$ac_sub_srcdir/configure.gnu"; then
917       echo
918       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
919     elif test -f "$ac_sub_srcdir/configure"; then
920       echo
921       $SHELL "$ac_sub_srcdir/configure" --help=recursive
922     elif test -f "$ac_sub_srcdir/configure.ac" ||
923            test -f "$ac_sub_srcdir/configure.in"; then
924       echo
925       "$ac_configure" --help
926     else
927       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
928     fi
929     cd "$ac_popdir"
930   done
931 fi
932
933 test -n "$ac_init_help" && exit 0
934 if "$ac_init_version"; then
935   cat <<\EOF
936
937 Copyright 2003-2022,2023        Thomas E. Dickey
938 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
939 Free Software Foundation, Inc.
940 This configure script is free software; the Free Software Foundation
941 gives unlimited permission to copy, distribute and modify it.
942 EOF
943   exit 0
944 fi
945 exec 5>config.log
946 cat >&5 <<EOF
947 This file contains any messages produced by compilers while
948 running configure, to aid debugging if configure makes a mistake.
949
950 It was created by $as_me, which was
951 generated by GNU Autoconf 2.52.20230903.  Invocation command line was
952
953   $ $0 $@
954
955 EOF
956 {
957 cat <<_ASUNAME
958 ## ---------- ##
959 ## Platform.  ##
960 ## ---------- ##
961
962 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
963 uname -m = `(uname -m) 2>/dev/null || echo unknown`
964 uname -r = `(uname -r) 2>/dev/null || echo unknown`
965 uname -s = `(uname -s) 2>/dev/null || echo unknown`
966 uname -v = `(uname -v) 2>/dev/null || echo unknown`
967
968 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
969 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
970
971 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
972 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
973 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
974 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
975 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
976 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
977 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
978
979 PATH = $PATH
980
981 _ASUNAME
982 } >&5
983
984 cat >&5 <<EOF
985 ## ------------ ##
986 ## Core tests.  ##
987 ## ------------ ##
988
989 EOF
990
991 # Keep a trace of the command line.
992 # Strip out --no-create and --no-recursion so they do not pile up.
993 # Also quote any args containing shell meta-characters.
994 ac_configure_args=
995 ac_sep=
996 for ac_arg
997 do
998   case "$ac_arg" in
999   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1000   | --no-cr | --no-c) ;;
1001   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1003   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1004     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1005     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1006     ac_sep=" " ;;
1007   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1008      ac_sep=" " ;;
1009   esac
1010   # Get rid of the leading space.
1011 done
1012
1013 # When interrupted or exit'd, cleanup temporary files, and complete
1014 # config.log.  We remove comments because anyway the quotes in there
1015 # would cause problems or look ugly.
1016 trap 'exit_status=$?
1017   # Save into config.log some information that might help in debugging.
1018   echo >&5
1019   echo "## ----------------- ##" >&5
1020   echo "## Cache variables.  ##" >&5
1021   echo "## ----------------- ##" >&5
1022   echo >&5
1023   # The following way of writing the cache mishandles newlines in values,
1024 {
1025   (set) 2>&1 |
1026     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1027     *ac_space=\ *)
1028       sed -n \
1029         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1030           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1031       ;;
1032     *)
1033       sed -n \
1034         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1035       ;;
1036     esac;
1037 } >&5
1038   sed "/^$/d" confdefs.h >conftest.log
1039   if test -s conftest.log; then
1040     echo >&5
1041     echo "## ------------ ##" >&5
1042     echo "## confdefs.h.  ##" >&5
1043     echo "## ------------ ##" >&5
1044     echo >&5
1045     cat conftest.log >&5
1046   fi
1047   (echo; echo) >&5
1048   test "$ac_signal" != 0 &&
1049     echo "$as_me: caught signal $ac_signal" >&5
1050   echo "$as_me: exit $exit_status" >&5
1051   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1052     exit $exit_status
1053      ' 0
1054 for ac_signal in 1 2 13 15; do
1055   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1056 done
1057 ac_signal=0
1058
1059 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1060 rm -rf conftest* confdefs.h
1061 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1062 echo >confdefs.h
1063
1064 # Let the site file select an alternate cache file if it wants to.
1065 # Prefer explicitly selected file to automatically selected ones.
1066 if test -z "$CONFIG_SITE"; then
1067   if test "x$prefix" != xNONE; then
1068     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1069   else
1070     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1071   fi
1072 fi
1073 for ac_site_file in $CONFIG_SITE; do
1074   if test -r "$ac_site_file"; then
1075     { echo "$as_me:1075: loading site script $ac_site_file" >&5
1076 echo "$as_me: loading site script $ac_site_file" >&6;}
1077     cat "$ac_site_file" >&5
1078     . "$ac_site_file"
1079   fi
1080 done
1081
1082 if test -r "$cache_file"; then
1083   # Some versions of bash will fail to source /dev/null (special
1084   # files actually), so we avoid doing that.
1085   if test -f "$cache_file"; then
1086     { echo "$as_me:1086: loading cache $cache_file" >&5
1087 echo "$as_me: loading cache $cache_file" >&6;}
1088     case $cache_file in
1089       [\\/]* | ?:[\\/]* ) . $cache_file;;
1090       *)                      . ./$cache_file;;
1091     esac
1092   fi
1093 else
1094   { echo "$as_me:1094: creating cache $cache_file" >&5
1095 echo "$as_me: creating cache $cache_file" >&6;}
1096   >$cache_file
1097 fi
1098
1099 # Check that the precious variables saved in the cache have kept the same
1100 # value.
1101 ac_cache_corrupted=false
1102 for ac_var in `(set) 2>&1 |
1103                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1104   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1105   eval ac_new_set=\$ac_env_${ac_var}_set
1106   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1107   eval ac_new_val="\$ac_env_${ac_var}_value"
1108   case "$ac_old_set,$ac_new_set" in
1109     set,)
1110       { echo "$as_me:1110: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,set)
1114       { echo "$as_me:1114: error: \`$ac_var' was not set in the previous run" >&5
1115 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1116       ac_cache_corrupted=: ;;
1117     ,);;
1118     *)
1119       if test "x$ac_old_val" != "x$ac_new_val"; then
1120         { echo "$as_me:1120: error: \`$ac_var' has changed since the previous run:" >&5
1121 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1122         { echo "$as_me:1122:   former value:  $ac_old_val" >&5
1123 echo "$as_me:   former value:  $ac_old_val" >&2;}
1124         { echo "$as_me:1124:   current value: $ac_new_val" >&5
1125 echo "$as_me:   current value: $ac_new_val" >&2;}
1126         ac_cache_corrupted=:
1127       fi;;
1128   esac
1129   # Pass precious variables to config.status.  It doesn't matter if
1130   # we pass some twice (in addition to the command line arguments).
1131   if test "$ac_new_set" = set; then
1132     case "$ac_new_val" in
1133     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1134       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1135       ac_configure_args="$ac_configure_args '$ac_arg'"
1136       ;;
1137     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1138        ;;
1139     esac
1140   fi
1141 done
1142 if "$ac_cache_corrupted"; then
1143   { echo "$as_me:1143: error: changes in the environment can compromise the build" >&5
1144 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1145   { { echo "$as_me:1145: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1146 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1147    { (exit 1); exit 1; }; }
1148 fi
1149
1150 ac_ext=c
1151 ac_cpp='$CPP $CPPFLAGS'
1152 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1153 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1154 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1155 ac_main_return="return"
1156
1157 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1158   *c*,-n*) ECHO_N=
1159            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1160            ECHO_T='     '
1161            ;;
1162   *c*,*  ) ECHO_N=-n
1163            ECHO_C=
1164            ECHO_T=
1165            ;;
1166   *)       ECHO_N=
1167            ECHO_C='\c'
1168            ECHO_T=
1169            ;;
1170 esac
1171 echo "#! $SHELL" >conftest.sh
1172 echo  "exit 0"   >>conftest.sh
1173 chmod +x conftest.sh
1174 if { (echo "$as_me:1174: PATH=\".;.\"; conftest.sh") >&5
1175   (PATH=".;."; conftest.sh) 2>&5
1176   ac_status=$?
1177   echo "$as_me:1177: \$? = $ac_status" >&5
1178   (exit "$ac_status"); }; then
1179   ac_path_separator=';'
1180 else
1181   ac_path_separator=:
1182 fi
1183 PATH_SEPARATOR="$ac_path_separator"
1184 rm -f conftest.sh
1185
1186 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1187
1188 top_builddir=`pwd`
1189
1190 for ac_prog in ggrep grep
1191 do
1192   # Extract the first word of "$ac_prog", so it can be a program name with args.
1193 set dummy $ac_prog; ac_word=$2
1194 echo "$as_me:1194: checking for $ac_word" >&5
1195 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1196 if test "${ac_cv_prog_GREP+set}" = set; then
1197   echo $ECHO_N "(cached) $ECHO_C" >&6
1198 else
1199   if test -n "$GREP"; then
1200   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1201 else
1202   ac_save_IFS=$IFS; IFS=$ac_path_separator
1203 ac_dummy="$PATH"
1204 for ac_dir in $ac_dummy; do
1205   IFS=$ac_save_IFS
1206   test -z "$ac_dir" && ac_dir=.
1207   $as_executable_p "$ac_dir/$ac_word" || continue
1208 ac_cv_prog_GREP="$ac_prog"
1209 echo "$as_me:1209: found $ac_dir/$ac_word" >&5
1210 break
1211 done
1212
1213 fi
1214 fi
1215 GREP=$ac_cv_prog_GREP
1216 if test -n "$GREP"; then
1217   echo "$as_me:1217: result: $GREP" >&5
1218 echo "${ECHO_T}$GREP" >&6
1219 else
1220   echo "$as_me:1220: result: no" >&5
1221 echo "${ECHO_T}no" >&6
1222 fi
1223
1224   test -n "$GREP" && break
1225 done
1226 test -n "$GREP" || GREP=": "
1227
1228 echo "$as_me:1228: checking for egrep" >&5
1229 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1230 if test "${ac_cv_path_EGREP+set}" = set; then
1231   echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1234    then ac_cv_path_EGREP="$GREP -E"
1235    else
1236      for ac_prog in gegrep egrep
1237 do
1238   # Extract the first word of "$ac_prog", so it can be a program name with args.
1239 set dummy $ac_prog; ac_word=$2
1240 echo "$as_me:1240: checking for $ac_word" >&5
1241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1242 if test "${ac_cv_path_EGREP+set}" = set; then
1243   echo $ECHO_N "(cached) $ECHO_C" >&6
1244 else
1245   case $EGREP in
1246   [\\/]* | ?:[\\/]*)
1247   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1248   ;;
1249   *)
1250   ac_save_IFS=$IFS; IFS=$ac_path_separator
1251 ac_dummy="$PATH"
1252 for ac_dir in $ac_dummy; do
1253   IFS=$ac_save_IFS
1254   test -z "$ac_dir" && ac_dir=.
1255   if $as_executable_p "$ac_dir/$ac_word"; then
1256    ac_cv_path_EGREP="$ac_dir/$ac_word"
1257    echo "$as_me:1257: found $ac_dir/$ac_word" >&5
1258    break
1259 fi
1260 done
1261
1262   ;;
1263 esac
1264 fi
1265 EGREP=$ac_cv_path_EGREP
1266
1267 if test -n "$EGREP"; then
1268   echo "$as_me:1268: result: $EGREP" >&5
1269 echo "${ECHO_T}$EGREP" >&6
1270 else
1271   echo "$as_me:1271: result: no" >&5
1272 echo "${ECHO_T}no" >&6
1273 fi
1274
1275   test -n "$EGREP" && break
1276 done
1277 test -n "$EGREP" || EGREP=": "
1278
1279      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1279: error: cannot find workable egrep" >&5
1280 echo "$as_me: error: cannot find workable egrep" >&2;}
1281    { (exit 1); exit 1; }; }
1282    fi
1283 fi
1284 echo "$as_me:1284: result: $ac_cv_path_EGREP" >&5
1285 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1286  EGREP="$ac_cv_path_EGREP"
1287
1288 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291 cf_cv_abi_version=${NCURSES_MAJOR}
1292 cf_cv_abi_default=${NCURSES_MAJOR}
1293 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1294 cf_cv_timestamp=`date`
1295 echo "$as_me:1295: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1296 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1297
1298 if test -f "$srcdir/VERSION" ; then
1299         echo "$as_me:1299: checking for package version" >&5
1300 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1301
1302         # if there are not enough fields, cut returns the last one...
1303         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1304         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1305         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1306
1307         # this is how CF_BUNDLED_INTL uses $VERSION:
1308         VERSION="$cf_field1"
1309
1310         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1311         test -z "$VERSION_MAJOR" && { { echo "$as_me:1311: error: missing major-version" >&5
1312 echo "$as_me: error: missing major-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1316         test -z "$VERSION_MINOR" && { { echo "$as_me:1316: error: missing minor-version" >&5
1317 echo "$as_me: error: missing minor-version" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320         echo "$as_me:1320: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1321 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1322
1323         echo "$as_me:1323: checking for package patch date" >&5
1324 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1325         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1326         case .$VERSION_PATCH in
1327         (.)
1328                 { { echo "$as_me:1328: error: missing patch-date $VERSION_PATCH" >&5
1329 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1330    { (exit 1); exit 1; }; }
1331                 ;;
1332         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1333                 ;;
1334         (*)
1335                 { { echo "$as_me:1335: error: illegal patch-date $VERSION_PATCH" >&5
1336 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1337    { (exit 1); exit 1; }; }
1338                 ;;
1339         esac
1340         echo "$as_me:1340: result: $VERSION_PATCH" >&5
1341 echo "${ECHO_T}$VERSION_PATCH" >&6
1342 else
1343         { { echo "$as_me:1343: error: did not find $srcdir/VERSION" >&5
1344 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1345    { (exit 1); exit 1; }; }
1346 fi
1347
1348 # show the actual data that we have for versions:
1349 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1350
1351 echo "${as_me:-configure}:1351: testing ABI VERSION $VERSION ..." 1>&5
1352
1353 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1354
1355 echo "${as_me:-configure}:1355: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1356
1357 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1358
1359 echo "${as_me:-configure}:1359: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1360
1361 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1362
1363 echo "${as_me:-configure}:1363: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1364
1365         cf_PACKAGE=NCURSES
1366         PACKAGE=ncurses
1367
1368 cat >>confdefs.h <<EOF
1369 #define PACKAGE "$PACKAGE"
1370 EOF
1371
1372 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1373
1374         cat >>confdefs.h <<EOF
1375 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1376 EOF
1377
1378         cat >>confdefs.h <<EOF
1379 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1380 EOF
1381
1382 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1383
1384 # Check whether --with-rel-version or --without-rel-version was given.
1385 if test "${with_rel_version+set}" = set; then
1386   withval="$with_rel_version"
1387   { echo "$as_me:1387: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1388 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1389  cf_cv_rel_version=$withval
1390 fi;
1391
1392  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1393  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1394  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1395
1396 if test -n "$NCURSES_MAJOR" ; then
1397   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1398   (0)
1399         ;;
1400   (*)
1401         { { echo "$as_me:1401: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1402 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1403    { (exit 1); exit 1; }; }
1404         ;;
1405   esac
1406 else
1407   { { echo "$as_me:1407: error: Release major-version value is empty" >&5
1408 echo "$as_me: error: Release major-version value is empty" >&2;}
1409    { (exit 1); exit 1; }; }
1410 fi
1411
1412 if test -n "$NCURSES_MINOR" ; then
1413   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1414   (0)
1415         ;;
1416   (*)
1417         { { echo "$as_me:1417: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1418 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1419    { (exit 1); exit 1; }; }
1420         ;;
1421   esac
1422 else
1423   { { echo "$as_me:1423: error: Release minor-version value is empty" >&5
1424 echo "$as_me: error: Release minor-version value is empty" >&2;}
1425    { (exit 1); exit 1; }; }
1426 fi
1427
1428 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1429
1430 # Check whether --with-abi-version or --without-abi-version was given.
1431 if test "${with_abi_version+set}" = set; then
1432   withval="$with_abi_version"
1433
1434         if test "x$cf_cv_abi_version" != "x$withval"
1435         then
1436                 { echo "$as_me:1436: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1437 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1438                 case "$cf_cv_rel_version" in
1439                 (5.*)
1440                         cf_cv_rel_version=$withval.0
1441                         ;;
1442                 (6.*)
1443                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1444                         ;;
1445                 esac
1446         fi
1447         cf_cv_abi_version=$withval
1448 fi;
1449
1450 if test -n "$cf_cv_abi_version" ; then
1451   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1452   (0)
1453         ;;
1454   (*)
1455         { { echo "$as_me:1455: error: ABI version is not a number: $cf_cv_abi_version" >&5
1456 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1457    { (exit 1); exit 1; }; }
1458         ;;
1459   esac
1460 else
1461   { { echo "$as_me:1461: error: ABI version value is empty" >&5
1462 echo "$as_me: error: ABI version value is empty" >&2;}
1463    { (exit 1); exit 1; }; }
1464 fi
1465
1466 cf_cv_abi_default=$cf_cv_abi_version
1467
1468 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1469 then
1470         case "$cf_cv_rel_version" in
1471         (5.*)
1472                 cf_cv_rel_version=$with_abi_version.0
1473                 ;;
1474         esac
1475 fi
1476
1477 ac_aux_dir=
1478 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1479   if test -f "$ac_dir/install-sh"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/install-sh -c"
1482     break
1483   elif test -f "$ac_dir/install.sh"; then
1484     ac_aux_dir=$ac_dir
1485     ac_install_sh="$ac_aux_dir/install.sh -c"
1486     break
1487   elif test -f "$ac_dir/shtool"; then
1488     ac_aux_dir=$ac_dir
1489     ac_install_sh="$ac_aux_dir/shtool install -c"
1490     break
1491   fi
1492 done
1493 if test -z "$ac_aux_dir"; then
1494   { { echo "$as_me:1494: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1495 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1496    { (exit 1); exit 1; }; }
1497 fi
1498 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1499 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1500 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1501
1502 # Make sure we can run config.sub.
1503 $ac_config_sub sun4 >/dev/null 2>&1 ||
1504   { { echo "$as_me:1504: error: cannot run $ac_config_sub" >&5
1505 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1506    { (exit 1); exit 1; }; }
1507
1508 echo "$as_me:1508: checking build system type" >&5
1509 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1510 if test "${ac_cv_build+set}" = set; then
1511   echo $ECHO_N "(cached) $ECHO_C" >&6
1512 else
1513   ac_cv_build_alias=$build_alias
1514 test -z "$ac_cv_build_alias" &&
1515   ac_cv_build_alias=`$ac_config_guess`
1516 test -z "$ac_cv_build_alias" &&
1517   { { echo "$as_me:1517: error: cannot guess build type; you must specify one" >&5
1518 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1519    { (exit 1); exit 1; }; }
1520 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1521   { { echo "$as_me:1521: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1522 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1523    { (exit 1); exit 1; }; }
1524
1525 fi
1526 echo "$as_me:1526: result: $ac_cv_build" >&5
1527 echo "${ECHO_T}$ac_cv_build" >&6
1528 build=$ac_cv_build
1529 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1530 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1531 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1532
1533 echo "$as_me:1533: checking host system type" >&5
1534 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1535 if test "${ac_cv_host+set}" = set; then
1536   echo $ECHO_N "(cached) $ECHO_C" >&6
1537 else
1538   ac_cv_host_alias=$host_alias
1539 test -z "$ac_cv_host_alias" &&
1540   ac_cv_host_alias=$ac_cv_build_alias
1541 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1542   { { echo "$as_me:1542: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1543 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1544    { (exit 1); exit 1; }; }
1545
1546 fi
1547 echo "$as_me:1547: result: $ac_cv_host" >&5
1548 echo "${ECHO_T}$ac_cv_host" >&6
1549 host=$ac_cv_host
1550 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1551 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1552 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1553
1554 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1555         echo "$as_me:1555: checking target system type" >&5
1556 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1557 if test "${ac_cv_target+set}" = set; then
1558   echo $ECHO_N "(cached) $ECHO_C" >&6
1559 else
1560   ac_cv_target_alias=$target_alias
1561 test "x$ac_cv_target_alias" = "x" &&
1562   ac_cv_target_alias=$ac_cv_host_alias
1563 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1564   { { echo "$as_me:1564: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1565 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1566    { (exit 1); exit 1; }; }
1567
1568 fi
1569 echo "$as_me:1569: result: $ac_cv_target" >&5
1570 echo "${ECHO_T}$ac_cv_target" >&6
1571 target=$ac_cv_target
1572 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1573 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1574 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1575
1576 # The aliases save the names the user supplied, while $host etc.
1577 # will get canonicalized.
1578 test -n "$target_alias" &&
1579   test "$program_prefix$program_suffix$program_transform_name" = \
1580     NONENONEs,x,x, &&
1581   program_prefix=${target_alias}-
1582         system_name="$host_os"
1583 else
1584         system_name="`(uname -s -r) 2>/dev/null`"
1585         if test -z "$system_name" ; then
1586                 system_name="`(hostname) 2>/dev/null`"
1587         fi
1588 fi
1589 test -n "$system_name" &&
1590 cat >>confdefs.h <<EOF
1591 #define SYSTEM_NAME "$system_name"
1592 EOF
1593
1594 if test "${cf_cv_system_name+set}" = set; then
1595   echo $ECHO_N "(cached) $ECHO_C" >&6
1596 else
1597   cf_cv_system_name="$system_name"
1598 fi
1599
1600 test -z "$system_name" && system_name="$cf_cv_system_name"
1601 test -n "$cf_cv_system_name" && echo "$as_me:1601: result: Configuring for $cf_cv_system_name" >&5
1602 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1603
1604 if test ".$system_name" != ".$cf_cv_system_name" ; then
1605         echo "$as_me:1605: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1606 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1607         { { echo "$as_me:1607: error: \"Please remove config.cache and try again.\"" >&5
1608 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1609    { (exit 1); exit 1; }; }
1610 fi
1611
1612 # Check whether --with-system-type or --without-system-type was given.
1613 if test "${with_system_type+set}" = set; then
1614   withval="$with_system_type"
1615   { echo "$as_me:1615: WARNING: overriding system type to $withval" >&5
1616 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1617         cf_cv_system_name=$withval
1618         host_os=$withval
1619
1620 fi;
1621
1622 ###     Save the given $CFLAGS to allow user-override.
1623 cf_user_CFLAGS="$CFLAGS"
1624
1625 ###     Default install-location
1626 echo "$as_me:1626: checking for fgrep" >&5
1627 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1628 if test "${ac_cv_path_FGREP+set}" = set; then
1629   echo $ECHO_N "(cached) $ECHO_C" >&6
1630 else
1631   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1632    then ac_cv_path_FGREP="$GREP -F"
1633    else
1634      for ac_prog in gfgrep fgrep
1635 do
1636   # Extract the first word of "$ac_prog", so it can be a program name with args.
1637 set dummy $ac_prog; ac_word=$2
1638 echo "$as_me:1638: checking for $ac_word" >&5
1639 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1640 if test "${ac_cv_path_FGREP+set}" = set; then
1641   echo $ECHO_N "(cached) $ECHO_C" >&6
1642 else
1643   case $FGREP in
1644   [\\/]* | ?:[\\/]*)
1645   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1646   ;;
1647   *)
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   if $as_executable_p "$ac_dir/$ac_word"; then
1654    ac_cv_path_FGREP="$ac_dir/$ac_word"
1655    echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656    break
1657 fi
1658 done
1659
1660   ;;
1661 esac
1662 fi
1663 FGREP=$ac_cv_path_FGREP
1664
1665 if test -n "$FGREP"; then
1666   echo "$as_me:1666: result: $FGREP" >&5
1667 echo "${ECHO_T}$FGREP" >&6
1668 else
1669   echo "$as_me:1669: result: no" >&5
1670 echo "${ECHO_T}no" >&6
1671 fi
1672
1673   test -n "$FGREP" && break
1674 done
1675 test -n "$FGREP" || FGREP=": "
1676
1677      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1677: error: cannot find workable fgrep" >&5
1678 echo "$as_me: error: cannot find workable fgrep" >&2;}
1679    { (exit 1); exit 1; }; }
1680    fi
1681 fi
1682 echo "$as_me:1682: result: $ac_cv_path_FGREP" >&5
1683 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1684  FGREP="$ac_cv_path_FGREP"
1685
1686 echo "$as_me:1686: checking for prefix" >&5
1687 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1688 if test "x$prefix" = "xNONE" ; then
1689         case "$cf_cv_system_name" in
1690                 # non-vendor systems don't have a conflict
1691         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1692                 prefix=/usr
1693                 ;;
1694         (*)     prefix=$ac_default_prefix
1695                 ;;
1696         esac
1697 fi
1698 echo "$as_me:1698: result: $prefix" >&5
1699 echo "${ECHO_T}$prefix" >&6
1700
1701 if test "x$prefix" = "xNONE" ; then
1702 echo "$as_me:1702: checking for default include-directory" >&5
1703 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1704 test -n "$verbose" && echo 1>&6
1705 for cf_symbol in \
1706         "$includedir" \
1707         "$includedir/ncurses" \
1708         "$prefix/include" \
1709         "$prefix/include/ncurses" \
1710         /usr/local/include \
1711         /usr/local/include/ncurses \
1712         /usr/include \
1713         /usr/include/ncurses
1714 do
1715         cf_dir=`eval echo "$cf_symbol"`
1716         if test -f "$cf_dir/curses.h" ; then
1717         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1718                 includedir="$cf_symbol"
1719                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1720                 break
1721         fi
1722         fi
1723         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1724 done
1725 echo "$as_me:1725: result: $includedir" >&5
1726 echo "${ECHO_T}$includedir" >&6
1727 fi
1728
1729 ### Defaults for ncurses ABI
1730
1731 # ABI 5 defaults:
1732 cf_dft_ccharw_max=5
1733 cf_dft_chtype=auto
1734 cf_dft_ext_colors=no
1735 cf_dft_ext_const=no
1736 cf_dft_ext_mouse=no
1737 cf_dft_ext_putwin=no
1738 cf_dft_ext_spfuncs=no
1739 cf_dft_filter_syms=no
1740 cf_dft_interop=no
1741 cf_dft_mmask_t=auto
1742 cf_dft_opaque_curses=no
1743 cf_dft_ordinate_type=short
1744 cf_dft_signed_char=no
1745 cf_dft_tparm_arg=long
1746 cf_dft_with_lp64=no
1747
1748 # ABI 6 defaults:
1749 case x$cf_cv_abi_default in
1750 (x[6789])
1751         cf_dft_chtype=uint32_t
1752         cf_dft_ext_colors=yes
1753         cf_dft_ext_const=yes
1754         cf_dft_ext_mouse=yes
1755         cf_dft_ext_putwin=yes
1756         cf_dft_ext_spfuncs=yes
1757         cf_dft_filter_syms=yes
1758         cf_dft_interop=yes
1759         cf_dft_mmask_t=uint32_t
1760         cf_dft_tparm_arg=intptr_t
1761         cf_dft_with_lp64=yes
1762         ;;
1763 esac
1764
1765 # ABI 7 defaults:
1766 case x$cf_cv_abi_default in
1767 (x[789])
1768         cf_dft_ccharw_max=6
1769         cf_dft_mmask_t=uint64_t
1770         cf_dft_opaque_curses=yes
1771         cf_dft_ordinate_type=int
1772         cf_dft_signed_char=yes
1773         # also: remove the wgetch-events feature in ABI 7
1774         ;;
1775 esac
1776
1777 ### override ABI version, e.g., packagers
1778
1779 # Check whether --with-abi-altered or --without-abi-altered was given.
1780 if test "${with_abi_altered+set}" = set; then
1781   withval="$with_abi_altered"
1782
1783 if test -n "$withval" ; then
1784   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1785   (0)
1786         ;;
1787   (*)
1788         { { echo "$as_me:1788: error: ABI altered is not a number: $withval" >&5
1789 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1790    { (exit 1); exit 1; }; }
1791         ;;
1792   esac
1793 else
1794   { { echo "$as_me:1794: error: ABI altered value is empty" >&5
1795 echo "$as_me: error: ABI altered value is empty" >&2;}
1796    { (exit 1); exit 1; }; }
1797 fi
1798
1799         if test "$cf_cv_abi_version" != "$withval"
1800         then
1801                 { echo "$as_me:1801: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1802 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1803                 cf_cv_abi_version=$withval
1804         fi
1805
1806 fi;
1807
1808 ###     Checks for programs.
1809
1810 # Check whether --with-ada or --without-ada was given.
1811 if test "${with_ada+set}" = set; then
1812   withval="$with_ada"
1813   cf_with_ada=$withval
1814 else
1815   cf_with_ada=yes
1816 fi;
1817
1818 if test "x$cf_with_ada" = xyes
1819 then
1820         cf_prog_cc="gnatgcc gcc cc"
1821 else
1822         cf_prog_cc="gcc cc"
1823 fi
1824
1825 ac_ext=c
1826 ac_cpp='$CPP $CPPFLAGS'
1827 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1828 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1830 ac_main_return="return"
1831 if test -n "$ac_tool_prefix"; then
1832   for ac_prog in $cf_prog_cc
1833   do
1834     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1835 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1836 echo "$as_me:1836: checking for $ac_word" >&5
1837 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1838 if test "${ac_cv_prog_CC+set}" = set; then
1839   echo $ECHO_N "(cached) $ECHO_C" >&6
1840 else
1841   if test -n "$CC"; then
1842   ac_cv_prog_CC="$CC" # Let the user override the test.
1843 else
1844   ac_save_IFS=$IFS; IFS=$ac_path_separator
1845 ac_dummy="$PATH"
1846 for ac_dir in $ac_dummy; do
1847   IFS=$ac_save_IFS
1848   test -z "$ac_dir" && ac_dir=.
1849   $as_executable_p "$ac_dir/$ac_word" || continue
1850 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1851 echo "$as_me:1851: found $ac_dir/$ac_word" >&5
1852 break
1853 done
1854
1855 fi
1856 fi
1857 CC=$ac_cv_prog_CC
1858 if test -n "$CC"; then
1859   echo "$as_me:1859: result: $CC" >&5
1860 echo "${ECHO_T}$CC" >&6
1861 else
1862   echo "$as_me:1862: result: no" >&5
1863 echo "${ECHO_T}no" >&6
1864 fi
1865
1866     test -n "$CC" && break
1867   done
1868 fi
1869 if test -z "$CC"; then
1870   ac_ct_CC=$CC
1871   for ac_prog in $cf_prog_cc
1872 do
1873   # Extract the first word of "$ac_prog", so it can be a program name with args.
1874 set dummy $ac_prog; ac_word=$2
1875 echo "$as_me:1875: checking for $ac_word" >&5
1876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1877 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1878   echo $ECHO_N "(cached) $ECHO_C" >&6
1879 else
1880   if test -n "$ac_ct_CC"; then
1881   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1882 else
1883   ac_save_IFS=$IFS; IFS=$ac_path_separator
1884 ac_dummy="$PATH"
1885 for ac_dir in $ac_dummy; do
1886   IFS=$ac_save_IFS
1887   test -z "$ac_dir" && ac_dir=.
1888   $as_executable_p "$ac_dir/$ac_word" || continue
1889 ac_cv_prog_ac_ct_CC="$ac_prog"
1890 echo "$as_me:1890: found $ac_dir/$ac_word" >&5
1891 break
1892 done
1893
1894 fi
1895 fi
1896 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1897 if test -n "$ac_ct_CC"; then
1898   echo "$as_me:1898: result: $ac_ct_CC" >&5
1899 echo "${ECHO_T}$ac_ct_CC" >&6
1900 else
1901   echo "$as_me:1901: result: no" >&5
1902 echo "${ECHO_T}no" >&6
1903 fi
1904
1905   test -n "$ac_ct_CC" && break
1906 done
1907
1908   CC=$ac_ct_CC
1909 fi
1910
1911 test -z "$CC" && { { echo "$as_me:1911: error: no acceptable cc found in \$PATH" >&5
1912 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1913    { (exit 1); exit 1; }; }
1914
1915 # Provide some information about the compiler.
1916 echo "$as_me:1916:" \
1917      "checking for C compiler version" >&5
1918 ac_compiler=`set X $ac_compile; echo "$2"`
1919 { (eval echo "$as_me:1919: \"$ac_compiler --version </dev/null >&5\"") >&5
1920   (eval $ac_compiler --version </dev/null >&5) 2>&5
1921   ac_status=$?
1922   echo "$as_me:1922: \$? = $ac_status" >&5
1923   (exit "$ac_status"); }
1924 { (eval echo "$as_me:1924: \"$ac_compiler -v </dev/null >&5\"") >&5
1925   (eval $ac_compiler -v </dev/null >&5) 2>&5
1926   ac_status=$?
1927   echo "$as_me:1927: \$? = $ac_status" >&5
1928   (exit "$ac_status"); }
1929 { (eval echo "$as_me:1929: \"$ac_compiler -V </dev/null >&5\"") >&5
1930   (eval $ac_compiler -V </dev/null >&5) 2>&5
1931   ac_status=$?
1932   echo "$as_me:1932: \$? = $ac_status" >&5
1933   (exit "$ac_status"); }
1934
1935 cat >"conftest.$ac_ext" <<_ACEOF
1936 #line 1936 "configure"
1937 #include "confdefs.h"
1938
1939 int
1940 main (void)
1941 {
1942
1943   ;
1944   return 0;
1945 }
1946 _ACEOF
1947 ac_clean_files_save=$ac_clean_files
1948 ac_clean_files="$ac_clean_files a.out a.exe"
1949 # Try to create an executable without -o first, disregard a.out.
1950 # It will help us diagnose broken compilers, and finding out an intuition
1951 # of exeext.
1952 echo "$as_me:1952: checking for C compiler default output" >&5
1953 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1954 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1955 if { (eval echo "$as_me:1955: \"$ac_link_default\"") >&5
1956   (eval $ac_link_default) 2>&5
1957   ac_status=$?
1958   echo "$as_me:1958: \$? = $ac_status" >&5
1959   (exit "$ac_status"); }; then
1960   # Find the output, starting from the most likely.  This scheme is
1961 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1962 # resort.
1963 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1964                 ls a.out conftest 2>/dev/null;
1965                 ls a.* conftest.* 2>/dev/null`; do
1966   case $ac_file in
1967     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1968     a.out ) # We found the default executable, but exeext='' is most
1969             # certainly right.
1970             break;;
1971     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1972           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1973           export ac_cv_exeext
1974           break;;
1975     * ) break;;
1976   esac
1977 done
1978 else
1979   echo "$as_me: failed program was:" >&5
1980 cat "conftest.$ac_ext" >&5
1981 { { echo "$as_me:1981: error: C compiler cannot create executables" >&5
1982 echo "$as_me: error: C compiler cannot create executables" >&2;}
1983    { (exit 77); exit 77; }; }
1984 fi
1985
1986 ac_exeext=$ac_cv_exeext
1987 echo "$as_me:1987: result: $ac_file" >&5
1988 echo "${ECHO_T}$ac_file" >&6
1989
1990 # Check the compiler produces executables we can run.  If not, either
1991 # the compiler is broken, or we cross compile.
1992 echo "$as_me:1992: checking whether the C compiler works" >&5
1993 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1994 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1995 # If not cross compiling, check that we can run a simple program.
1996 if test "$cross_compiling" != yes; then
1997   if { ac_try='./$ac_file'
1998   { (eval echo "$as_me:1998: \"$ac_try\"") >&5
1999   (eval $ac_try) 2>&5
2000   ac_status=$?
2001   echo "$as_me:2001: \$? = $ac_status" >&5
2002   (exit "$ac_status"); }; }; then
2003     cross_compiling=no
2004   else
2005     if test "$cross_compiling" = maybe; then
2006         cross_compiling=yes
2007     else
2008         { { echo "$as_me:2008: error: cannot run C compiled programs.
2009 If you meant to cross compile, use \`--host'." >&5
2010 echo "$as_me: error: cannot run C compiled programs.
2011 If you meant to cross compile, use \`--host'." >&2;}
2012    { (exit 1); exit 1; }; }
2013     fi
2014   fi
2015 fi
2016 echo "$as_me:2016: result: yes" >&5
2017 echo "${ECHO_T}yes" >&6
2018
2019 rm -f a.out a.exe "conftest$ac_cv_exeext"
2020 ac_clean_files=$ac_clean_files_save
2021 # Check the compiler produces executables we can run.  If not, either
2022 # the compiler is broken, or we cross compile.
2023 echo "$as_me:2023: checking whether we are cross compiling" >&5
2024 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2025 echo "$as_me:2025: result: $cross_compiling" >&5
2026 echo "${ECHO_T}$cross_compiling" >&6
2027
2028 echo "$as_me:2028: checking for executable suffix" >&5
2029 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2030 if { (eval echo "$as_me:2030: \"$ac_link\"") >&5
2031   (eval $ac_link) 2>&5
2032   ac_status=$?
2033   echo "$as_me:2033: \$? = $ac_status" >&5
2034   (exit "$ac_status"); }; then
2035   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2036 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2037 # work properly (i.e., refer to `conftest.exe'), while it won't with
2038 # `rm'.
2039 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2040   case $ac_file in
2041     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2042     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2043           export ac_cv_exeext
2044           break;;
2045     * ) break;;
2046   esac
2047 done
2048 else
2049   { { echo "$as_me:2049: error: cannot compute EXEEXT: cannot compile and link" >&5
2050 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2051    { (exit 1); exit 1; }; }
2052 fi
2053
2054 rm -f "conftest$ac_cv_exeext"
2055 echo "$as_me:2055: result: $ac_cv_exeext" >&5
2056 echo "${ECHO_T}$ac_cv_exeext" >&6
2057
2058 rm -f "conftest.$ac_ext"
2059 EXEEXT=$ac_cv_exeext
2060 ac_exeext=$EXEEXT
2061 echo "$as_me:2061: checking for object suffix" >&5
2062 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2063 if test "${ac_cv_objext+set}" = set; then
2064   echo $ECHO_N "(cached) $ECHO_C" >&6
2065 else
2066   cat >"conftest.$ac_ext" <<_ACEOF
2067 #line 2067 "configure"
2068 #include "confdefs.h"
2069
2070 int
2071 main (void)
2072 {
2073
2074   ;
2075   return 0;
2076 }
2077 _ACEOF
2078 rm -f conftest.o conftest.obj
2079 if { (eval echo "$as_me:2079: \"$ac_compile\"") >&5
2080   (eval $ac_compile) 2>&5
2081   ac_status=$?
2082   echo "$as_me:2082: \$? = $ac_status" >&5
2083   (exit "$ac_status"); }; then
2084   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2085   case $ac_file in
2086     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2087     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2088        break;;
2089   esac
2090 done
2091 else
2092   echo "$as_me: failed program was:" >&5
2093 cat "conftest.$ac_ext" >&5
2094 { { echo "$as_me:2094: error: cannot compute OBJEXT: cannot compile" >&5
2095 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2096    { (exit 1); exit 1; }; }
2097 fi
2098
2099 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2100 fi
2101 echo "$as_me:2101: result: $ac_cv_objext" >&5
2102 echo "${ECHO_T}$ac_cv_objext" >&6
2103 OBJEXT=$ac_cv_objext
2104 ac_objext=$OBJEXT
2105 echo "$as_me:2105: checking whether we are using the GNU C compiler" >&5
2106 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2107 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2108   echo $ECHO_N "(cached) $ECHO_C" >&6
2109 else
2110   cat >"conftest.$ac_ext" <<_ACEOF
2111 #line 2111 "configure"
2112 #include "confdefs.h"
2113
2114 int
2115 main (void)
2116 {
2117 #ifndef __GNUC__
2118        choke me
2119 #endif
2120
2121   ;
2122   return 0;
2123 }
2124 _ACEOF
2125 rm -f "conftest.$ac_objext"
2126 if { (eval echo "$as_me:2126: \"$ac_compile\"") >&5
2127   (eval $ac_compile) 2>&5
2128   ac_status=$?
2129   echo "$as_me:2129: \$? = $ac_status" >&5
2130   (exit "$ac_status"); } &&
2131          { ac_try='test -s "conftest.$ac_objext"'
2132   { (eval echo "$as_me:2132: \"$ac_try\"") >&5
2133   (eval $ac_try) 2>&5
2134   ac_status=$?
2135   echo "$as_me:2135: \$? = $ac_status" >&5
2136   (exit "$ac_status"); }; }; then
2137   ac_compiler_gnu=yes
2138 else
2139   echo "$as_me: failed program was:" >&5
2140 cat "conftest.$ac_ext" >&5
2141 ac_compiler_gnu=no
2142 fi
2143 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2144 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2145
2146 fi
2147 echo "$as_me:2147: result: $ac_cv_c_compiler_gnu" >&5
2148 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2149 GCC=`test $ac_compiler_gnu = yes && echo yes`
2150 ac_test_CFLAGS=${CFLAGS+set}
2151 ac_save_CFLAGS=$CFLAGS
2152 CFLAGS="-g"
2153 echo "$as_me:2153: checking whether $CC accepts -g" >&5
2154 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2155 if test "${ac_cv_prog_cc_g+set}" = set; then
2156   echo $ECHO_N "(cached) $ECHO_C" >&6
2157 else
2158   cat >"conftest.$ac_ext" <<_ACEOF
2159 #line 2159 "configure"
2160 #include "confdefs.h"
2161
2162 int
2163 main (void)
2164 {
2165
2166   ;
2167   return 0;
2168 }
2169 _ACEOF
2170 rm -f "conftest.$ac_objext"
2171 if { (eval echo "$as_me:2171: \"$ac_compile\"") >&5
2172   (eval $ac_compile) 2>&5
2173   ac_status=$?
2174   echo "$as_me:2174: \$? = $ac_status" >&5
2175   (exit "$ac_status"); } &&
2176          { ac_try='test -s "conftest.$ac_objext"'
2177   { (eval echo "$as_me:2177: \"$ac_try\"") >&5
2178   (eval $ac_try) 2>&5
2179   ac_status=$?
2180   echo "$as_me:2180: \$? = $ac_status" >&5
2181   (exit "$ac_status"); }; }; then
2182   ac_cv_prog_cc_g=yes
2183 else
2184   echo "$as_me: failed program was:" >&5
2185 cat "conftest.$ac_ext" >&5
2186 ac_cv_prog_cc_g=no
2187 fi
2188 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2189 fi
2190 echo "$as_me:2190: result: $ac_cv_prog_cc_g" >&5
2191 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2192 if test "$ac_test_CFLAGS" = set; then
2193   CFLAGS=$ac_save_CFLAGS
2194 elif test $ac_cv_prog_cc_g = yes; then
2195   if test "$GCC" = yes; then
2196     CFLAGS="-g -O2"
2197   else
2198     CFLAGS="-g"
2199   fi
2200 else
2201   if test "$GCC" = yes; then
2202     CFLAGS="-O2"
2203   else
2204     CFLAGS=
2205   fi
2206 fi
2207 # Some people use a C++ compiler to compile C.  Since we use `exit',
2208 # in C++ we need to declare it.  In case someone uses the same compiler
2209 # for both compiling C and C++ we need to have the C++ compiler decide
2210 # the declaration of exit, since it's the most demanding environment.
2211 cat >"conftest.$ac_ext" <<_ACEOF
2212 #ifndef __cplusplus
2213   choke me
2214 #endif
2215 _ACEOF
2216 rm -f "conftest.$ac_objext"
2217 if { (eval echo "$as_me:2217: \"$ac_compile\"") >&5
2218   (eval $ac_compile) 2>&5
2219   ac_status=$?
2220   echo "$as_me:2220: \$? = $ac_status" >&5
2221   (exit "$ac_status"); } &&
2222          { ac_try='test -s "conftest.$ac_objext"'
2223   { (eval echo "$as_me:2223: \"$ac_try\"") >&5
2224   (eval $ac_try) 2>&5
2225   ac_status=$?
2226   echo "$as_me:2226: \$? = $ac_status" >&5
2227   (exit "$ac_status"); }; }; then
2228   for ac_declaration in \
2229    ''\
2230    '#include <stdlib.h>' \
2231    'extern "C" void std::exit (int) throw (); using std::exit;' \
2232    'extern "C" void std::exit (int); using std::exit;' \
2233    'extern "C" void exit (int) throw ();' \
2234    'extern "C" void exit (int);' \
2235    'void exit (int);'
2236 do
2237   cat >"conftest.$ac_ext" <<_ACEOF
2238 #line 2238 "configure"
2239 #include "confdefs.h"
2240 #include <stdlib.h>
2241 $ac_declaration
2242 int
2243 main (void)
2244 {
2245 exit (42);
2246   ;
2247   return 0;
2248 }
2249 _ACEOF
2250 rm -f "conftest.$ac_objext"
2251 if { (eval echo "$as_me:2251: \"$ac_compile\"") >&5
2252   (eval $ac_compile) 2>&5
2253   ac_status=$?
2254   echo "$as_me:2254: \$? = $ac_status" >&5
2255   (exit "$ac_status"); } &&
2256          { ac_try='test -s "conftest.$ac_objext"'
2257   { (eval echo "$as_me:2257: \"$ac_try\"") >&5
2258   (eval $ac_try) 2>&5
2259   ac_status=$?
2260   echo "$as_me:2260: \$? = $ac_status" >&5
2261   (exit "$ac_status"); }; }; then
2262   :
2263 else
2264   echo "$as_me: failed program was:" >&5
2265 cat "conftest.$ac_ext" >&5
2266 continue
2267 fi
2268 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2269   cat >"conftest.$ac_ext" <<_ACEOF
2270 #line 2270 "configure"
2271 #include "confdefs.h"
2272 $ac_declaration
2273 int
2274 main (void)
2275 {
2276 exit (42);
2277   ;
2278   return 0;
2279 }
2280 _ACEOF
2281 rm -f "conftest.$ac_objext"
2282 if { (eval echo "$as_me:2282: \"$ac_compile\"") >&5
2283   (eval $ac_compile) 2>&5
2284   ac_status=$?
2285   echo "$as_me:2285: \$? = $ac_status" >&5
2286   (exit "$ac_status"); } &&
2287          { ac_try='test -s "conftest.$ac_objext"'
2288   { (eval echo "$as_me:2288: \"$ac_try\"") >&5
2289   (eval $ac_try) 2>&5
2290   ac_status=$?
2291   echo "$as_me:2291: \$? = $ac_status" >&5
2292   (exit "$ac_status"); }; }; then
2293   break
2294 else
2295   echo "$as_me: failed program was:" >&5
2296 cat "conftest.$ac_ext" >&5
2297 fi
2298 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2299 done
2300 rm -rf conftest*
2301 if test -n "$ac_declaration"; then
2302   echo '#ifdef __cplusplus' >>confdefs.h
2303   echo "$ac_declaration"    >>confdefs.h
2304   echo '#endif'             >>confdefs.h
2305 fi
2306
2307 else
2308   echo "$as_me: failed program was:" >&5
2309 cat "conftest.$ac_ext" >&5
2310 fi
2311 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2312 ac_ext=c
2313 ac_cpp='$CPP $CPPFLAGS'
2314 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2315 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2316 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2317 ac_main_return="return"
2318
2319 GCC_VERSION=none
2320 if test "$GCC" = yes ; then
2321         echo "$as_me:2321: checking version of $CC" >&5
2322 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2323         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2324         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2325         echo "$as_me:2325: result: $GCC_VERSION" >&5
2326 echo "${ECHO_T}$GCC_VERSION" >&6
2327 fi
2328
2329 INTEL_COMPILER=no
2330
2331 if test "$GCC" = yes ; then
2332         case "$host_os" in
2333         (linux*|gnu*)
2334                 echo "$as_me:2334: checking if this is really Intel C compiler" >&5
2335 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2336                 cf_save_CFLAGS="$CFLAGS"
2337                 CFLAGS="$CFLAGS -no-gcc"
2338                 cat >"conftest.$ac_ext" <<_ACEOF
2339 #line 2339 "configure"
2340 #include "confdefs.h"
2341
2342 int
2343 main (void)
2344 {
2345
2346 #ifdef __INTEL_COMPILER
2347 #else
2348 #error __INTEL_COMPILER is not defined
2349 #endif
2350
2351   ;
2352   return 0;
2353 }
2354 _ACEOF
2355 rm -f "conftest.$ac_objext"
2356 if { (eval echo "$as_me:2356: \"$ac_compile\"") >&5
2357   (eval $ac_compile) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); } &&
2361          { ac_try='test -s "conftest.$ac_objext"'
2362   { (eval echo "$as_me:2362: \"$ac_try\"") >&5
2363   (eval $ac_try) 2>&5
2364   ac_status=$?
2365   echo "$as_me:2365: \$? = $ac_status" >&5
2366   (exit "$ac_status"); }; }; then
2367   INTEL_COMPILER=yes
2368 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2369
2370 else
2371   echo "$as_me: failed program was:" >&5
2372 cat "conftest.$ac_ext" >&5
2373 fi
2374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2375                 CFLAGS="$cf_save_CFLAGS"
2376                 echo "$as_me:2376: result: $INTEL_COMPILER" >&5
2377 echo "${ECHO_T}$INTEL_COMPILER" >&6
2378                 ;;
2379         esac
2380 fi
2381
2382 CLANG_COMPILER=no
2383
2384 if test "$GCC" = yes ; then
2385         echo "$as_me:2385: checking if this is really Clang C compiler" >&5
2386 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2387         cf_save_CFLAGS="$CFLAGS"
2388         cat >"conftest.$ac_ext" <<_ACEOF
2389 #line 2389 "configure"
2390 #include "confdefs.h"
2391
2392 int
2393 main (void)
2394 {
2395
2396 #ifdef __clang__
2397 #else
2398 #error __clang__ is not defined
2399 #endif
2400
2401   ;
2402   return 0;
2403 }
2404 _ACEOF
2405 rm -f "conftest.$ac_objext"
2406 if { (eval echo "$as_me:2406: \"$ac_compile\"") >&5
2407   (eval $ac_compile) 2>&5
2408   ac_status=$?
2409   echo "$as_me:2409: \$? = $ac_status" >&5
2410   (exit "$ac_status"); } &&
2411          { ac_try='test -s "conftest.$ac_objext"'
2412   { (eval echo "$as_me:2412: \"$ac_try\"") >&5
2413   (eval $ac_try) 2>&5
2414   ac_status=$?
2415   echo "$as_me:2415: \$? = $ac_status" >&5
2416   (exit "$ac_status"); }; }; then
2417   CLANG_COMPILER=yes
2418
2419 else
2420   echo "$as_me: failed program was:" >&5
2421 cat "conftest.$ac_ext" >&5
2422 fi
2423 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2424         CFLAGS="$cf_save_CFLAGS"
2425         echo "$as_me:2425: result: $CLANG_COMPILER" >&5
2426 echo "${ECHO_T}$CLANG_COMPILER" >&6
2427 fi
2428
2429 CLANG_VERSION=none
2430
2431 if test "x$CLANG_COMPILER" = "xyes" ; then
2432         case "$CC" in
2433         (c[1-9][0-9]|*/c[1-9][0-9])
2434                 { echo "$as_me:2434: WARNING: replacing broken compiler alias $CC" >&5
2435 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2436                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2437                 CC=clang
2438                 ;;
2439         esac
2440
2441         echo "$as_me:2441: checking version of $CC" >&5
2442 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2443         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2444         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2445         echo "$as_me:2445: result: $CLANG_VERSION" >&5
2446 echo "${ECHO_T}$CLANG_VERSION" >&6
2447
2448         for cf_clang_opt in \
2449                 -Qunused-arguments \
2450                 -Wno-error=implicit-function-declaration
2451         do
2452                 echo "$as_me:2452: checking if option $cf_clang_opt works" >&5
2453 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2454                 cf_save_CFLAGS="$CFLAGS"
2455                 CFLAGS="$CFLAGS $cf_clang_opt"
2456                 cat >"conftest.$ac_ext" <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459
2460                         #include <stdio.h>
2461 int
2462 main (void)
2463 {
2464
2465                         printf("hello!\\n");
2466   ;
2467   return 0;
2468 }
2469 _ACEOF
2470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2471 if { (eval echo "$as_me:2471: \"$ac_link\"") >&5
2472   (eval $ac_link) 2>&5
2473   ac_status=$?
2474   echo "$as_me:2474: \$? = $ac_status" >&5
2475   (exit "$ac_status"); } &&
2476          { ac_try='test -s "conftest$ac_exeext"'
2477   { (eval echo "$as_me:2477: \"$ac_try\"") >&5
2478   (eval $ac_try) 2>&5
2479   ac_status=$?
2480   echo "$as_me:2480: \$? = $ac_status" >&5
2481   (exit "$ac_status"); }; }; then
2482
2483                         cf_clang_optok=yes
2484 else
2485   echo "$as_me: failed program was:" >&5
2486 cat "conftest.$ac_ext" >&5
2487
2488                         cf_clang_optok=no
2489 fi
2490 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2491                 echo "$as_me:2491: result: $cf_clang_optok" >&5
2492 echo "${ECHO_T}$cf_clang_optok" >&6
2493                 CFLAGS="$cf_save_CFLAGS"
2494                 if test "$cf_clang_optok" = yes; then
2495                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2496
2497 echo "${as_me:-configure}:2497: testing adding option $cf_clang_opt ..." 1>&5
2498
2499         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2500         CFLAGS="${CFLAGS}$cf_clang_opt"
2501
2502                 fi
2503         done
2504 fi
2505
2506 echo "$as_me:2506: checking for $CC option to accept ANSI C" >&5
2507 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2508 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2509   echo $ECHO_N "(cached) $ECHO_C" >&6
2510 else
2511   ac_cv_prog_cc_stdc=no
2512 ac_save_CC=$CC
2513 cat >"conftest.$ac_ext" <<_ACEOF
2514 #line 2514 "configure"
2515 #include "confdefs.h"
2516 #include <stdarg.h>
2517 #include <stdio.h>
2518 #include <sys/types.h>
2519 #include <sys/stat.h>
2520 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2521 struct buf { int x; };
2522 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2523 static char *e (char **p, int i)
2524 {
2525   return p[i];
2526 }
2527 static char *f (char * (*g) (char **, int), char **p, ...)
2528 {
2529   char *s;
2530   va_list v;
2531   va_start (v,p);
2532   s = g (p, va_arg (v,int));
2533   va_end (v);
2534   return s;
2535 }
2536 int test (int i, double x);
2537 struct s1 {int (*f) (int a);};
2538 struct s2 {int (*f) (double a);};
2539 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2540 int argc;
2541 char **argv;
2542 int
2543 main (void)
2544 {
2545 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2546   ;
2547   return 0;
2548 }
2549 _ACEOF
2550 # Don't try gcc -ansi; that turns off useful extensions and
2551 # breaks some systems' header files.
2552 # AIX                   -qlanglvl=ansi
2553 # Ultrix and OSF/1      -std1
2554 # HP-UX 10.20 and later -Ae
2555 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2556 # SVR4                  -Xc -D__EXTENSIONS__
2557 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2558 do
2559   CC="$ac_save_CC $ac_arg"
2560   rm -f "conftest.$ac_objext"
2561 if { (eval echo "$as_me:2561: \"$ac_compile\"") >&5
2562   (eval $ac_compile) 2>&5
2563   ac_status=$?
2564   echo "$as_me:2564: \$? = $ac_status" >&5
2565   (exit "$ac_status"); } &&
2566          { ac_try='test -s "conftest.$ac_objext"'
2567   { (eval echo "$as_me:2567: \"$ac_try\"") >&5
2568   (eval $ac_try) 2>&5
2569   ac_status=$?
2570   echo "$as_me:2570: \$? = $ac_status" >&5
2571   (exit "$ac_status"); }; }; then
2572   ac_cv_prog_cc_stdc=$ac_arg
2573 break
2574 else
2575   echo "$as_me: failed program was:" >&5
2576 cat "conftest.$ac_ext" >&5
2577 fi
2578 rm -f "conftest.$ac_objext"
2579 done
2580 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2581 CC=$ac_save_CC
2582
2583 fi
2584
2585 case "x$ac_cv_prog_cc_stdc" in
2586   x|xno)
2587     echo "$as_me:2587: result: none needed" >&5
2588 echo "${ECHO_T}none needed" >&6 ;;
2589   *)
2590     echo "$as_me:2590: result: $ac_cv_prog_cc_stdc" >&5
2591 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2592     CC="$CC $ac_cv_prog_cc_stdc" ;;
2593 esac
2594
2595 # This should have been defined by AC_PROG_CC
2596 : "${CC:=cc}"
2597
2598 echo "$as_me:2598: checking \$CFLAGS variable" >&5
2599 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2600 case "x$CFLAGS" in
2601 (*-[IUD]*)
2602         echo "$as_me:2602: result: broken" >&5
2603 echo "${ECHO_T}broken" >&6
2604         { echo "$as_me:2604: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2605 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2606         cf_flags="$CFLAGS"
2607         CFLAGS=
2608         for cf_arg in $cf_flags
2609         do
2610
2611 cf_fix_cppflags=no
2612 cf_new_cflags=
2613 cf_new_cppflags=
2614 cf_new_extra_cppflags=
2615
2616 for cf_add_cflags in $cf_arg
2617 do
2618 case "$cf_fix_cppflags" in
2619 (no)
2620         case "$cf_add_cflags" in
2621         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2622                 case "$cf_add_cflags" in
2623                 (-D*)
2624                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2625
2626                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2627                                 && test -z "${cf_tst_cflags}" \
2628                                 && cf_fix_cppflags=yes
2629
2630                         if test "$cf_fix_cppflags" = yes ; then
2631
2632         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2633         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2634
2635                                 continue
2636                         elif test "${cf_tst_cflags}" = "\"'" ; then
2637
2638         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2639         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2640
2641                                 continue
2642                         fi
2643                         ;;
2644                 esac
2645                 case "$CPPFLAGS" in
2646                 (*$cf_add_cflags)
2647                         ;;
2648                 (*)
2649                         case "$cf_add_cflags" in
2650                         (-D*)
2651                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2652
2653 CPPFLAGS=`echo "$CPPFLAGS" | \
2654         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2655                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2656
2657                                 ;;
2658                         esac
2659
2660         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2661         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2662
2663                         ;;
2664                 esac
2665                 ;;
2666         (*)
2667
2668         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2669         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2670
2671                 ;;
2672         esac
2673         ;;
2674 (yes)
2675
2676         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2677         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2678
2679         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2680
2681         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2682                 && test -z "${cf_tst_cflags}" \
2683                 && cf_fix_cppflags=no
2684         ;;
2685 esac
2686 done
2687
2688 if test -n "$cf_new_cflags" ; then
2689
2690         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2691         CFLAGS="${CFLAGS}$cf_new_cflags"
2692
2693 fi
2694
2695 if test -n "$cf_new_cppflags" ; then
2696
2697         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2698         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2699
2700 fi
2701
2702 if test -n "$cf_new_extra_cppflags" ; then
2703
2704         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2705         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2706
2707 fi
2708
2709         done
2710         ;;
2711 (*)
2712         echo "$as_me:2712: result: ok" >&5
2713 echo "${ECHO_T}ok" >&6
2714         ;;
2715 esac
2716
2717 echo "$as_me:2717: checking \$CC variable" >&5
2718 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2719 case "$CC" in
2720 (*[\ \  ]-*)
2721         echo "$as_me:2721: result: broken" >&5
2722 echo "${ECHO_T}broken" >&6
2723         { echo "$as_me:2723: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2724 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2725         # humor him...
2726         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2727         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2728         CC="$cf_prog"
2729         for cf_arg in $cf_flags
2730         do
2731                 case "x$cf_arg" in
2732                 (x-[IUDfgOW]*)
2733
2734 cf_fix_cppflags=no
2735 cf_new_cflags=
2736 cf_new_cppflags=
2737 cf_new_extra_cppflags=
2738
2739 for cf_add_cflags in $cf_arg
2740 do
2741 case "$cf_fix_cppflags" in
2742 (no)
2743         case "$cf_add_cflags" in
2744         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2745                 case "$cf_add_cflags" in
2746                 (-D*)
2747                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2748
2749                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2750                                 && test -z "${cf_tst_cflags}" \
2751                                 && cf_fix_cppflags=yes
2752
2753                         if test "$cf_fix_cppflags" = yes ; then
2754
2755         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2756         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2757
2758                                 continue
2759                         elif test "${cf_tst_cflags}" = "\"'" ; then
2760
2761         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2762         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2763
2764                                 continue
2765                         fi
2766                         ;;
2767                 esac
2768                 case "$CPPFLAGS" in
2769                 (*$cf_add_cflags)
2770                         ;;
2771                 (*)
2772                         case "$cf_add_cflags" in
2773                         (-D*)
2774                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2775
2776 CPPFLAGS=`echo "$CPPFLAGS" | \
2777         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2778                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2779
2780                                 ;;
2781                         esac
2782
2783         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2784         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2785
2786                         ;;
2787                 esac
2788                 ;;
2789         (*)
2790
2791         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2792         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2793
2794                 ;;
2795         esac
2796         ;;
2797 (yes)
2798
2799         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2800         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2801
2802         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2803
2804         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2805                 && test -z "${cf_tst_cflags}" \
2806                 && cf_fix_cppflags=no
2807         ;;
2808 esac
2809 done
2810
2811 if test -n "$cf_new_cflags" ; then
2812
2813         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2814         CFLAGS="${CFLAGS}$cf_new_cflags"
2815
2816 fi
2817
2818 if test -n "$cf_new_cppflags" ; then
2819
2820         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2821         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2822
2823 fi
2824
2825 if test -n "$cf_new_extra_cppflags" ; then
2826
2827         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2828         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2829
2830 fi
2831
2832                         ;;
2833                 (*)
2834                         CC="$CC $cf_arg"
2835                         ;;
2836                 esac
2837         done
2838         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2839
2840 echo "${as_me:-configure}:2840: testing resulting CC: '$CC' ..." 1>&5
2841
2842         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2843
2844 echo "${as_me:-configure}:2844: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2845
2846         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2847
2848 echo "${as_me:-configure}:2848: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2849
2850         ;;
2851 (*)
2852         echo "$as_me:2852: result: ok" >&5
2853 echo "${ECHO_T}ok" >&6
2854         ;;
2855 esac
2856
2857 ac_ext=c
2858 ac_cpp='$CPP $CPPFLAGS'
2859 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2860 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2861 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2862 ac_main_return="return"
2863 echo "$as_me:2863: checking how to run the C preprocessor" >&5
2864 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2865 # On Suns, sometimes $CPP names a directory.
2866 if test -n "$CPP" && test -d "$CPP"; then
2867   CPP=
2868 fi
2869 if test -z "$CPP"; then
2870   if test "${ac_cv_prog_CPP+set}" = set; then
2871   echo $ECHO_N "(cached) $ECHO_C" >&6
2872 else
2873       # Double quotes because CPP needs to be expanded
2874     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2875     do
2876       ac_preproc_ok=false
2877 for ac_c_preproc_warn_flag in '' yes
2878 do
2879   # Use a header file that comes with gcc, so configuring glibc
2880   # with a fresh cross-compiler works.
2881   # On the NeXT, cc -E runs the code through the compiler's parser,
2882   # not just through cpp. "Syntax error" is here to catch this case.
2883   cat >"conftest.$ac_ext" <<_ACEOF
2884 #line 2884 "configure"
2885 #include "confdefs.h"
2886 #include <assert.h>
2887                      Syntax error
2888 _ACEOF
2889 if { (eval echo "$as_me:2889: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2890   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2891   ac_status=$?
2892   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2893   rm -f conftest.er1
2894   cat conftest.err >&5
2895   echo "$as_me:2895: \$? = $ac_status" >&5
2896   (exit "$ac_status"); } >/dev/null; then
2897   if test -s conftest.err; then
2898     ac_cpp_err=$ac_c_preproc_warn_flag
2899   else
2900     ac_cpp_err=
2901   fi
2902 else
2903   ac_cpp_err=yes
2904 fi
2905 if test -z "$ac_cpp_err"; then
2906   :
2907 else
2908   echo "$as_me: failed program was:" >&5
2909   cat "conftest.$ac_ext" >&5
2910   # Broken: fails on valid input.
2911 continue
2912 fi
2913 rm -f conftest.err "conftest.$ac_ext"
2914
2915   # OK, works on sane cases.  Now check whether non-existent headers
2916   # can be detected and how.
2917   cat >"conftest.$ac_ext" <<_ACEOF
2918 #line 2918 "configure"
2919 #include "confdefs.h"
2920 #include <ac_nonexistent.h>
2921 _ACEOF
2922 if { (eval echo "$as_me:2922: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2923   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2924   ac_status=$?
2925   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2926   rm -f conftest.er1
2927   cat conftest.err >&5
2928   echo "$as_me:2928: \$? = $ac_status" >&5
2929   (exit "$ac_status"); } >/dev/null; then
2930   if test -s conftest.err; then
2931     ac_cpp_err=$ac_c_preproc_warn_flag
2932   else
2933     ac_cpp_err=
2934   fi
2935 else
2936   ac_cpp_err=yes
2937 fi
2938 if test -z "$ac_cpp_err"; then
2939   # Broken: success on invalid input.
2940 continue
2941 else
2942   echo "$as_me: failed program was:" >&5
2943   cat "conftest.$ac_ext" >&5
2944   # Passes both tests.
2945 ac_preproc_ok=:
2946 break
2947 fi
2948 rm -f conftest.err "conftest.$ac_ext"
2949
2950 done
2951 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2952 rm -f conftest.err "conftest.$ac_ext"
2953 if $ac_preproc_ok; then
2954   break
2955 fi
2956
2957     done
2958     ac_cv_prog_CPP=$CPP
2959
2960 fi
2961   CPP=$ac_cv_prog_CPP
2962 else
2963   ac_cv_prog_CPP=$CPP
2964 fi
2965 echo "$as_me:2965: result: $CPP" >&5
2966 echo "${ECHO_T}$CPP" >&6
2967 ac_preproc_ok=false
2968 for ac_c_preproc_warn_flag in '' yes
2969 do
2970   # Use a header file that comes with gcc, so configuring glibc
2971   # with a fresh cross-compiler works.
2972   # On the NeXT, cc -E runs the code through the compiler's parser,
2973   # not just through cpp. "Syntax error" is here to catch this case.
2974   cat >"conftest.$ac_ext" <<_ACEOF
2975 #line 2975 "configure"
2976 #include "confdefs.h"
2977 #include <assert.h>
2978                      Syntax error
2979 _ACEOF
2980 if { (eval echo "$as_me:2980: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2981   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2982   ac_status=$?
2983   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2984   rm -f conftest.er1
2985   cat conftest.err >&5
2986   echo "$as_me:2986: \$? = $ac_status" >&5
2987   (exit "$ac_status"); } >/dev/null; then
2988   if test -s conftest.err; then
2989     ac_cpp_err=$ac_c_preproc_warn_flag
2990   else
2991     ac_cpp_err=
2992   fi
2993 else
2994   ac_cpp_err=yes
2995 fi
2996 if test -z "$ac_cpp_err"; then
2997   :
2998 else
2999   echo "$as_me: failed program was:" >&5
3000   cat "conftest.$ac_ext" >&5
3001   # Broken: fails on valid input.
3002 continue
3003 fi
3004 rm -f conftest.err "conftest.$ac_ext"
3005
3006   # OK, works on sane cases.  Now check whether non-existent headers
3007   # can be detected and how.
3008   cat >"conftest.$ac_ext" <<_ACEOF
3009 #line 3009 "configure"
3010 #include "confdefs.h"
3011 #include <ac_nonexistent.h>
3012 _ACEOF
3013 if { (eval echo "$as_me:3013: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3014   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3015   ac_status=$?
3016   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3017   rm -f conftest.er1
3018   cat conftest.err >&5
3019   echo "$as_me:3019: \$? = $ac_status" >&5
3020   (exit "$ac_status"); } >/dev/null; then
3021   if test -s conftest.err; then
3022     ac_cpp_err=$ac_c_preproc_warn_flag
3023   else
3024     ac_cpp_err=
3025   fi
3026 else
3027   ac_cpp_err=yes
3028 fi
3029 if test -z "$ac_cpp_err"; then
3030   # Broken: success on invalid input.
3031 continue
3032 else
3033   echo "$as_me: failed program was:" >&5
3034   cat "conftest.$ac_ext" >&5
3035   # Passes both tests.
3036 ac_preproc_ok=:
3037 break
3038 fi
3039 rm -f conftest.err "conftest.$ac_ext"
3040
3041 done
3042 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3043 rm -f conftest.err "conftest.$ac_ext"
3044 if $ac_preproc_ok; then
3045   :
3046 else
3047   { { echo "$as_me:3047: error: C preprocessor \"$CPP\" fails sanity check" >&5
3048 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3049    { (exit 1); exit 1; }; }
3050 fi
3051
3052 ac_ext=c
3053 ac_cpp='$CPP $CPPFLAGS'
3054 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3055 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3056 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3057 ac_main_return="return"
3058
3059 if test $ac_cv_c_compiler_gnu = yes; then
3060     echo "$as_me:3060: checking whether $CC needs -traditional" >&5
3061 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3062 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3063   echo $ECHO_N "(cached) $ECHO_C" >&6
3064 else
3065     ac_pattern="Autoconf.*'x'"
3066   cat >"conftest.$ac_ext" <<_ACEOF
3067 #line 3067 "configure"
3068 #include "confdefs.h"
3069 #include <sgtty.h>
3070 int Autoconf = TIOCGETP;
3071 _ACEOF
3072 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3073   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3074   ac_cv_prog_gcc_traditional=yes
3075 else
3076   ac_cv_prog_gcc_traditional=no
3077 fi
3078 rm -rf conftest*
3079
3080   if test $ac_cv_prog_gcc_traditional = no; then
3081     cat >"conftest.$ac_ext" <<_ACEOF
3082 #line 3082 "configure"
3083 #include "confdefs.h"
3084 #include <termio.h>
3085 int Autoconf = TCGETA;
3086 _ACEOF
3087 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3088   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3089   ac_cv_prog_gcc_traditional=yes
3090 fi
3091 rm -rf conftest*
3092
3093   fi
3094 fi
3095 echo "$as_me:3095: result: $ac_cv_prog_gcc_traditional" >&5
3096 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3097   if test $ac_cv_prog_gcc_traditional = yes; then
3098     CC="$CC -traditional"
3099   fi
3100 fi
3101
3102 echo "$as_me:3102: checking whether $CC understands -c and -o together" >&5
3103 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3104 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3105   echo $ECHO_N "(cached) $ECHO_C" >&6
3106 else
3107
3108 cat > conftest.$ac_ext <<CF_EOF
3109 int main(void)
3110 {
3111         ${cf_cv_main_return:-return}(0);
3112 }
3113 CF_EOF
3114 # We do the test twice because some compilers refuse to overwrite an
3115 # existing .o file with -o, though they will create one.
3116 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3117 if { (eval echo "$as_me:3117: \"$ac_try\"") >&5
3118   (eval $ac_try) 2>&5
3119   ac_status=$?
3120   echo "$as_me:3120: \$? = $ac_status" >&5
3121   (exit "$ac_status"); } &&
3122   test -f conftest2.$ac_objext && { (eval echo "$as_me:3122: \"$ac_try\"") >&5
3123   (eval $ac_try) 2>&5
3124   ac_status=$?
3125   echo "$as_me:3125: \$? = $ac_status" >&5
3126   (exit "$ac_status"); };
3127 then
3128   eval cf_cv_prog_CC_c_o=yes
3129 else
3130   eval cf_cv_prog_CC_c_o=no
3131 fi
3132 rm -rf ./conftest*
3133
3134 fi
3135 if test "$cf_cv_prog_CC_c_o" = yes; then
3136   echo "$as_me:3136: result: yes" >&5
3137 echo "${ECHO_T}yes" >&6
3138 else
3139   echo "$as_me:3139: result: no" >&5
3140 echo "${ECHO_T}no" >&6
3141 fi
3142
3143 if test "$cross_compiling" = yes ; then
3144         LDCONFIG=:
3145 else
3146         case "$cf_cv_system_name" in
3147         (dragonfly*|mirbsd*|freebsd*)
3148                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3149                 ;;
3150         (*) LDPATH=$PATH:/sbin:/usr/sbin
3151                 # Extract the first word of "ldconfig", so it can be a program name with args.
3152 set dummy ldconfig; ac_word=$2
3153 echo "$as_me:3153: checking for $ac_word" >&5
3154 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3155 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3156   echo $ECHO_N "(cached) $ECHO_C" >&6
3157 else
3158   case $LDCONFIG in
3159   [\\/]* | ?:[\\/]*)
3160   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3161   ;;
3162   *)
3163   ac_save_IFS=$IFS; IFS=$ac_path_separator
3164 ac_dummy="$LDPATH"
3165 for ac_dir in $ac_dummy; do
3166   IFS=$ac_save_IFS
3167   test -z "$ac_dir" && ac_dir=.
3168   if $as_executable_p "$ac_dir/$ac_word"; then
3169    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3170    echo "$as_me:3170: found $ac_dir/$ac_word" >&5
3171    break
3172 fi
3173 done
3174
3175   ;;
3176 esac
3177 fi
3178 LDCONFIG=$ac_cv_path_LDCONFIG
3179
3180 if test -n "$LDCONFIG"; then
3181   echo "$as_me:3181: result: $LDCONFIG" >&5
3182 echo "${ECHO_T}$LDCONFIG" >&6
3183 else
3184   echo "$as_me:3184: result: no" >&5
3185 echo "${ECHO_T}no" >&6
3186 fi
3187
3188                 ;;
3189         esac
3190 fi
3191
3192 echo "$as_me:3192: checking if you want to ensure bool is consistent with C++" >&5
3193 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3194
3195 # Check whether --with-cxx or --without-cxx was given.
3196 if test "${with_cxx+set}" = set; then
3197   withval="$with_cxx"
3198   cf_with_cxx=$withval
3199 else
3200   cf_with_cxx=yes
3201 fi;
3202 echo "$as_me:3202: result: $cf_with_cxx" >&5
3203 echo "${ECHO_T}$cf_with_cxx" >&6
3204 if test "X$cf_with_cxx" = Xno ; then
3205         CXX=""
3206         GXX=""
3207 else
3208         # with autoconf 2.13, we can change the error to a warning:
3209                 ac_ext=cc
3210 ac_cpp='$CXXCPP $CPPFLAGS'
3211 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3212 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3213 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3214 ac_main_return="return"
3215 if test -n "$ac_tool_prefix"; then
3216   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3217   do
3218     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3219 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3220 echo "$as_me:3220: checking for $ac_word" >&5
3221 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3222 if test "${ac_cv_prog_CXX+set}" = set; then
3223   echo $ECHO_N "(cached) $ECHO_C" >&6
3224 else
3225   if test -n "$CXX"; then
3226   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3227 else
3228   ac_save_IFS=$IFS; IFS=$ac_path_separator
3229 ac_dummy="$PATH"
3230 for ac_dir in $ac_dummy; do
3231   IFS=$ac_save_IFS
3232   test -z "$ac_dir" && ac_dir=.
3233   $as_executable_p "$ac_dir/$ac_word" || continue
3234 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3235 echo "$as_me:3235: found $ac_dir/$ac_word" >&5
3236 break
3237 done
3238
3239 fi
3240 fi
3241 CXX=$ac_cv_prog_CXX
3242 if test -n "$CXX"; then
3243   echo "$as_me:3243: result: $CXX" >&5
3244 echo "${ECHO_T}$CXX" >&6
3245 else
3246   echo "$as_me:3246: result: no" >&5
3247 echo "${ECHO_T}no" >&6
3248 fi
3249
3250     test -n "$CXX" && break
3251   done
3252 fi
3253 if test -z "$CXX"; then
3254   ac_ct_CXX=$CXX
3255   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3256 do
3257   # Extract the first word of "$ac_prog", so it can be a program name with args.
3258 set dummy $ac_prog; ac_word=$2
3259 echo "$as_me:3259: checking for $ac_word" >&5
3260 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3261 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3262   echo $ECHO_N "(cached) $ECHO_C" >&6
3263 else
3264   if test -n "$ac_ct_CXX"; then
3265   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3266 else
3267   ac_save_IFS=$IFS; IFS=$ac_path_separator
3268 ac_dummy="$PATH"
3269 for ac_dir in $ac_dummy; do
3270   IFS=$ac_save_IFS
3271   test -z "$ac_dir" && ac_dir=.
3272   $as_executable_p "$ac_dir/$ac_word" || continue
3273 ac_cv_prog_ac_ct_CXX="$ac_prog"
3274 echo "$as_me:3274: found $ac_dir/$ac_word" >&5
3275 break
3276 done
3277
3278 fi
3279 fi
3280 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3281 if test -n "$ac_ct_CXX"; then
3282   echo "$as_me:3282: result: $ac_ct_CXX" >&5
3283 echo "${ECHO_T}$ac_ct_CXX" >&6
3284 else
3285   echo "$as_me:3285: result: no" >&5
3286 echo "${ECHO_T}no" >&6
3287 fi
3288
3289   test -n "$ac_ct_CXX" && break
3290 done
3291 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3292
3293   CXX=$ac_ct_CXX
3294 fi
3295
3296 # Provide some information about the compiler.
3297 echo "$as_me:3297:" \
3298      "checking for C++ compiler version" >&5
3299 ac_compiler=`set X $ac_compile; echo $2`
3300 { (eval echo "$as_me:3300: \"$ac_compiler --version </dev/null >&5\"") >&5
3301   (eval $ac_compiler --version </dev/null >&5) 2>&5
3302   ac_status=$?
3303   echo "$as_me:3303: \$? = $ac_status" >&5
3304   (exit "$ac_status"); }
3305 { (eval echo "$as_me:3305: \"$ac_compiler -v </dev/null >&5\"") >&5
3306   (eval $ac_compiler -v </dev/null >&5) 2>&5
3307   ac_status=$?
3308   echo "$as_me:3308: \$? = $ac_status" >&5
3309   (exit "$ac_status"); }
3310 { (eval echo "$as_me:3310: \"$ac_compiler -V </dev/null >&5\"") >&5
3311   (eval $ac_compiler -V </dev/null >&5) 2>&5
3312   ac_status=$?
3313   echo "$as_me:3313: \$? = $ac_status" >&5
3314   (exit "$ac_status"); }
3315
3316 echo "$as_me:3316: checking whether we are using the GNU C++ compiler" >&5
3317 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3318 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3319   echo $ECHO_N "(cached) $ECHO_C" >&6
3320 else
3321   cat >"conftest.$ac_ext" <<_ACEOF
3322 #line 3322 "configure"
3323 #include "confdefs.h"
3324
3325 int
3326 main (void)
3327 {
3328 #ifndef __GNUC__
3329        choke me
3330 #endif
3331
3332   ;
3333   return 0;
3334 }
3335 _ACEOF
3336 rm -f "conftest.$ac_objext"
3337 if { (eval echo "$as_me:3337: \"$ac_compile\"") >&5
3338   (eval $ac_compile) 2>&5
3339   ac_status=$?
3340   echo "$as_me:3340: \$? = $ac_status" >&5
3341   (exit "$ac_status"); } &&
3342          { ac_try='test -s "conftest.$ac_objext"'
3343   { (eval echo "$as_me:3343: \"$ac_try\"") >&5
3344   (eval $ac_try) 2>&5
3345   ac_status=$?
3346   echo "$as_me:3346: \$? = $ac_status" >&5
3347   (exit "$ac_status"); }; }; then
3348   ac_compiler_gnu=yes
3349 else
3350   echo "$as_me: failed program was:" >&5
3351 cat "conftest.$ac_ext" >&5
3352 ac_compiler_gnu=no
3353 fi
3354 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3355 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3356
3357 fi
3358 echo "$as_me:3358: result: $ac_cv_cxx_compiler_gnu" >&5
3359 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3360 GXX=`test $ac_compiler_gnu = yes && echo yes`
3361 ac_test_CXXFLAGS=${CXXFLAGS+set}
3362 ac_save_CXXFLAGS=$CXXFLAGS
3363 CXXFLAGS="-g"
3364 echo "$as_me:3364: checking whether $CXX accepts -g" >&5
3365 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3366 if test "${ac_cv_prog_cxx_g+set}" = set; then
3367   echo $ECHO_N "(cached) $ECHO_C" >&6
3368 else
3369   cat >"conftest.$ac_ext" <<_ACEOF
3370 #line 3370 "configure"
3371 #include "confdefs.h"
3372
3373 int
3374 main (void)
3375 {
3376
3377   ;
3378   return 0;
3379 }
3380 _ACEOF
3381 rm -f "conftest.$ac_objext"
3382 if { (eval echo "$as_me:3382: \"$ac_compile\"") >&5
3383   (eval $ac_compile) 2>&5
3384   ac_status=$?
3385   echo "$as_me:3385: \$? = $ac_status" >&5
3386   (exit "$ac_status"); } &&
3387          { ac_try='test -s "conftest.$ac_objext"'
3388   { (eval echo "$as_me:3388: \"$ac_try\"") >&5
3389   (eval $ac_try) 2>&5
3390   ac_status=$?
3391   echo "$as_me:3391: \$? = $ac_status" >&5
3392   (exit "$ac_status"); }; }; then
3393   ac_cv_prog_cxx_g=yes
3394 else
3395   echo "$as_me: failed program was:" >&5
3396 cat "conftest.$ac_ext" >&5
3397 ac_cv_prog_cxx_g=no
3398 fi
3399 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3400 fi
3401 echo "$as_me:3401: result: $ac_cv_prog_cxx_g" >&5
3402 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3403 if test "$ac_test_CXXFLAGS" = set; then
3404   CXXFLAGS=$ac_save_CXXFLAGS
3405 elif test $ac_cv_prog_cxx_g = yes; then
3406   if test "$GXX" = yes; then
3407     CXXFLAGS="-g -O2"
3408   else
3409     CXXFLAGS="-g"
3410   fi
3411 else
3412   if test "$GXX" = yes; then
3413     CXXFLAGS="-O2"
3414   else
3415     CXXFLAGS=
3416   fi
3417 fi
3418 for ac_declaration in \
3419    ''\
3420    '#include <stdlib.h>' \
3421    'extern "C" void std::exit (int) throw (); using std::exit;' \
3422    'extern "C" void std::exit (int); using std::exit;' \
3423    'extern "C" void exit (int) throw ();' \
3424    'extern "C" void exit (int);' \
3425    'void exit (int);'
3426 do
3427   cat >"conftest.$ac_ext" <<_ACEOF
3428 #line 3428 "configure"
3429 #include "confdefs.h"
3430 #include <stdlib.h>
3431 $ac_declaration
3432 int
3433 main (void)
3434 {
3435 exit (42);
3436   ;
3437   return 0;
3438 }
3439 _ACEOF
3440 rm -f "conftest.$ac_objext"
3441 if { (eval echo "$as_me:3441: \"$ac_compile\"") >&5
3442   (eval $ac_compile) 2>&5
3443   ac_status=$?
3444   echo "$as_me:3444: \$? = $ac_status" >&5
3445   (exit "$ac_status"); } &&
3446          { ac_try='test -s "conftest.$ac_objext"'
3447   { (eval echo "$as_me:3447: \"$ac_try\"") >&5
3448   (eval $ac_try) 2>&5
3449   ac_status=$?
3450   echo "$as_me:3450: \$? = $ac_status" >&5
3451   (exit "$ac_status"); }; }; then
3452   :
3453 else
3454   echo "$as_me: failed program was:" >&5
3455 cat "conftest.$ac_ext" >&5
3456 continue
3457 fi
3458 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3459   cat >"conftest.$ac_ext" <<_ACEOF
3460 #line 3460 "configure"
3461 #include "confdefs.h"
3462 $ac_declaration
3463 int
3464 main (void)
3465 {
3466 exit (42);
3467   ;
3468   return 0;
3469 }
3470 _ACEOF
3471 rm -f "conftest.$ac_objext"
3472 if { (eval echo "$as_me:3472: \"$ac_compile\"") >&5
3473   (eval $ac_compile) 2>&5
3474   ac_status=$?
3475   echo "$as_me:3475: \$? = $ac_status" >&5
3476   (exit "$ac_status"); } &&
3477          { ac_try='test -s "conftest.$ac_objext"'
3478   { (eval echo "$as_me:3478: \"$ac_try\"") >&5
3479   (eval $ac_try) 2>&5
3480   ac_status=$?
3481   echo "$as_me:3481: \$? = $ac_status" >&5
3482   (exit "$ac_status"); }; }; then
3483   break
3484 else
3485   echo "$as_me: failed program was:" >&5
3486 cat "conftest.$ac_ext" >&5
3487 fi
3488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3489 done
3490 rm -rf conftest*
3491 if test -n "$ac_declaration"; then
3492   echo '#ifdef __cplusplus' >>confdefs.h
3493   echo "$ac_declaration"    >>confdefs.h
3494   echo '#endif'             >>confdefs.h
3495 fi
3496
3497 ac_ext=c
3498 ac_cpp='$CPP $CPPFLAGS'
3499 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3500 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3501 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3502 ac_main_return="return"
3503
3504         ac_ext=cc
3505 ac_cpp='$CXXCPP $CPPFLAGS'
3506 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3507 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3508 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3509 ac_main_return="return"
3510
3511         if test "x$cf_with_cxx" != xno
3512         then
3513                 # Several of the C++ configurations do not work, particularly when
3514                 # cross-compiling (20140913 -TD)
3515                 echo "$as_me:3515: checking if $CXX works" >&5
3516 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3517
3518                 save_CPPFLAGS="$CPPFLAGS"
3519                 eval cf_includedir=${includedir}
3520                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3521
3522 cat >"conftest.$ac_ext" <<_ACEOF
3523 #line 3523 "configure"
3524 #include "confdefs.h"
3525
3526 #include <stdlib.h>
3527 #include <stdio.h>
3528
3529 int
3530 main (void)
3531 {
3532
3533                 printf("Hello world!\n")
3534
3535   ;
3536   return 0;
3537 }
3538 _ACEOF
3539 rm -f "conftest.$ac_objext"
3540 if { (eval echo "$as_me:3540: \"$ac_compile\"") >&5
3541   (eval $ac_compile) 2>&5
3542   ac_status=$?
3543   echo "$as_me:3543: \$? = $ac_status" >&5
3544   (exit "$ac_status"); } &&
3545          { ac_try='test -s "conftest.$ac_objext"'
3546   { (eval echo "$as_me:3546: \"$ac_try\"") >&5
3547   (eval $ac_try) 2>&5
3548   ac_status=$?
3549   echo "$as_me:3549: \$? = $ac_status" >&5
3550   (exit "$ac_status"); }; }; then
3551   cf_cxx_works=yes
3552 else
3553   echo "$as_me: failed program was:" >&5
3554 cat "conftest.$ac_ext" >&5
3555 cf_cxx_works=no
3556 fi
3557 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3558                 CPPFLAGS="$save_CPPFLAGS"
3559
3560                 echo "$as_me:3560: result: $cf_cxx_works" >&5
3561 echo "${ECHO_T}$cf_cxx_works" >&6
3562                 if test "x$cf_cxx_works" = xno
3563                 then
3564                         { echo "$as_me:3564: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3565 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3566                         cf_with_cxx=no; CXX=""; GXX="";
3567                 fi
3568         fi
3569         ac_ext=c
3570 ac_cpp='$CPP $CPPFLAGS'
3571 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3572 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3573 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3574 ac_main_return="return"
3575
3576         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3577         if test "$CXX" = "g++" ; then
3578                 # Extract the first word of "g++", so it can be a program name with args.
3579 set dummy g++; ac_word=$2
3580 echo "$as_me:3580: checking for $ac_word" >&5
3581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3582 if test "${ac_cv_path_CXX+set}" = set; then
3583   echo $ECHO_N "(cached) $ECHO_C" >&6
3584 else
3585   case $CXX in
3586   [\\/]* | ?:[\\/]*)
3587   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3588   ;;
3589   *)
3590   ac_save_IFS=$IFS; IFS=$ac_path_separator
3591 ac_dummy="$PATH"
3592 for ac_dir in $ac_dummy; do
3593   IFS=$ac_save_IFS
3594   test -z "$ac_dir" && ac_dir=.
3595   if $as_executable_p "$ac_dir/$ac_word"; then
3596    ac_cv_path_CXX="$ac_dir/$ac_word"
3597    echo "$as_me:3597: found $ac_dir/$ac_word" >&5
3598    break
3599 fi
3600 done
3601
3602   ;;
3603 esac
3604 fi
3605 CXX=$ac_cv_path_CXX
3606
3607 if test -n "$CXX"; then
3608   echo "$as_me:3608: result: $CXX" >&5
3609 echo "${ECHO_T}$CXX" >&6
3610 else
3611   echo "$as_me:3611: result: no" >&5
3612 echo "${ECHO_T}no" >&6
3613 fi
3614
3615         fi
3616         case "x$CXX" in
3617         (x|xg++)
3618                 { echo "$as_me:3618: WARNING: You don't have any C++ compiler, too bad" >&5
3619 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3620                 cf_with_cxx=no; CXX=""; GXX="";
3621                 ;;
3622         esac
3623 fi
3624
3625 GXX_VERSION=none
3626 if test "$GXX" = yes; then
3627         echo "$as_me:3627: checking version of ${CXX:-g++}" >&5
3628 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3629         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3630         if test -z "$GXX_VERSION"
3631         then
3632                 GXX_VERSION=unknown
3633                 GXX=no
3634         fi
3635         echo "$as_me:3635: result: $GXX_VERSION" >&5
3636 echo "${ECHO_T}$GXX_VERSION" >&6
3637 fi
3638
3639 case "$GXX_VERSION" in
3640 ([1-9][0-9].*)
3641         ;;
3642 (1.*|2.[0-6]*)
3643         { echo "$as_me:3643: WARNING: templates do not work" >&5
3644 echo "$as_me: WARNING: templates do not work" >&2;}
3645         ;;
3646 esac
3647
3648 echo "$as_me:3648: checking if you want to build C++ binding and demo" >&5
3649 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3650
3651 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3652 if test "${with_cxx_binding+set}" = set; then
3653   withval="$with_cxx_binding"
3654   cf_with_cxx_binding=$withval
3655 else
3656   cf_with_cxx_binding=$cf_with_cxx
3657 fi;
3658 echo "$as_me:3658: result: $cf_with_cxx_binding" >&5
3659 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3660
3661 echo "$as_me:3661: checking if you want to build with Ada" >&5
3662 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3663 echo "$as_me:3663: result: $cf_with_ada" >&5
3664 echo "${ECHO_T}$cf_with_ada" >&6
3665
3666 echo "$as_me:3666: checking if you want to install terminal database" >&5
3667 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3668
3669 # Check whether --enable-db-install or --disable-db-install was given.
3670 if test "${enable_db_install+set}" = set; then
3671   enableval="$enable_db_install"
3672   cf_with_db_install=$enableval
3673 else
3674   cf_with_db_install=yes
3675 fi;
3676 echo "$as_me:3676: result: $cf_with_db_install" >&5
3677 echo "${ECHO_T}$cf_with_db_install" >&6
3678
3679 echo "$as_me:3679: checking if you want to install manpages" >&5
3680 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3681
3682 # Check whether --with-manpages or --without-manpages was given.
3683 if test "${with_manpages+set}" = set; then
3684   withval="$with_manpages"
3685   cf_with_manpages=$withval
3686 else
3687   cf_with_manpages=yes
3688 fi;
3689 echo "$as_me:3689: result: $cf_with_manpages" >&5
3690 echo "${ECHO_T}$cf_with_manpages" >&6
3691
3692 echo "$as_me:3692: checking if you want to build programs such as tic" >&5
3693 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3694
3695 # Check whether --with-progs or --without-progs was given.
3696 if test "${with_progs+set}" = set; then
3697   withval="$with_progs"
3698   cf_with_progs=$withval
3699 else
3700   cf_with_progs=yes
3701 fi;
3702 echo "$as_me:3702: result: $cf_with_progs" >&5
3703 echo "${ECHO_T}$cf_with_progs" >&6
3704
3705 echo "$as_me:3705: checking if you want to build test-programs" >&5
3706 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3707
3708 # Check whether --with-tests or --without-tests was given.
3709 if test "${with_tests+set}" = set; then
3710   withval="$with_tests"
3711   cf_with_tests=$withval
3712 else
3713   cf_with_tests=yes
3714 fi;
3715 echo "$as_me:3715: result: $cf_with_tests" >&5
3716 echo "${ECHO_T}$cf_with_tests" >&6
3717
3718 echo "$as_me:3718: checking if you wish to install curses.h" >&5
3719 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3720
3721 # Check whether --with-curses-h or --without-curses-h was given.
3722 if test "${with_curses_h+set}" = set; then
3723   withval="$with_curses_h"
3724   with_curses_h=$withval
3725 else
3726   with_curses_h=yes
3727 fi;
3728 echo "$as_me:3728: result: $with_curses_h" >&5
3729 echo "${ECHO_T}$with_curses_h" >&6
3730
3731 modules_to_build="ncurses"
3732 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3733 modules_to_build="$modules_to_build panel menu form"
3734
3735 test "$program_prefix" != NONE &&
3736   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3737 # Use a double $ so make ignores it.
3738 test "$program_suffix" != NONE &&
3739   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3740 # Double any \ or $.  echo might interpret backslashes.
3741 # By default was `s,x,x', remove it if useless.
3742 cat <<\_ACEOF >conftest.sed
3743 s/[\\$]/&&/g;s/;s,x,x,$//
3744 _ACEOF
3745 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3746 rm conftest.sed
3747
3748 for ac_prog in mawk gawk nawk awk
3749 do
3750   # Extract the first word of "$ac_prog", so it can be a program name with args.
3751 set dummy $ac_prog; ac_word=$2
3752 echo "$as_me:3752: checking for $ac_word" >&5
3753 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3754 if test "${ac_cv_prog_AWK+set}" = set; then
3755   echo $ECHO_N "(cached) $ECHO_C" >&6
3756 else
3757   if test -n "$AWK"; then
3758   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3759 else
3760   ac_save_IFS=$IFS; IFS=$ac_path_separator
3761 ac_dummy="$PATH"
3762 for ac_dir in $ac_dummy; do
3763   IFS=$ac_save_IFS
3764   test -z "$ac_dir" && ac_dir=.
3765   $as_executable_p "$ac_dir/$ac_word" || continue
3766 ac_cv_prog_AWK="$ac_prog"
3767 echo "$as_me:3767: found $ac_dir/$ac_word" >&5
3768 break
3769 done
3770
3771 fi
3772 fi
3773 AWK=$ac_cv_prog_AWK
3774 if test -n "$AWK"; then
3775   echo "$as_me:3775: result: $AWK" >&5
3776 echo "${ECHO_T}$AWK" >&6
3777 else
3778   echo "$as_me:3778: result: no" >&5
3779 echo "${ECHO_T}no" >&6
3780 fi
3781
3782   test -n "$AWK" && break
3783 done
3784
3785 test -z "$AWK" && { { echo "$as_me:3785: error: No awk program found" >&5
3786 echo "$as_me: error: No awk program found" >&2;}
3787    { (exit 1); exit 1; }; }
3788
3789 # Find a good install program.  We prefer a C program (faster),
3790 # so one script is as good as another.  But avoid the broken or
3791 # incompatible versions:
3792 # SysV /etc/install, /usr/sbin/install
3793 # SunOS /usr/etc/install
3794 # IRIX /sbin/install
3795 # AIX /bin/install
3796 # AmigaOS /C/install, which installs bootblocks on floppy discs
3797 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3798 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3799 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3800 # ./install, which can be erroneously created by make from ./install.sh.
3801 echo "$as_me:3801: checking for a BSD compatible install" >&5
3802 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3803 if test -z "$INSTALL"; then
3804 if test "${ac_cv_path_install+set}" = set; then
3805   echo $ECHO_N "(cached) $ECHO_C" >&6
3806 else
3807     ac_save_IFS=$IFS; IFS=$ac_path_separator
3808   for ac_dir in $PATH; do
3809     IFS=$ac_save_IFS
3810     # Account for people who put trailing slashes in PATH elements.
3811     case $ac_dir/ in
3812     / | ./ | .// | /cC/* \
3813     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3814     | /usr/ucb/* ) ;;
3815     *)
3816       # OSF1 and SCO ODT 3.0 have their own names for install.
3817       # Don't use installbsd from OSF since it installs stuff as root
3818       # by default.
3819       for ac_prog in ginstall scoinst install; do
3820         if $as_executable_p "$ac_dir/$ac_prog"; then
3821           if test $ac_prog = install &&
3822             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3823             # AIX install.  It has an incompatible calling convention.
3824             :
3825           elif test $ac_prog = install &&
3826             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3827             # program-specific install script used by HP pwplus--don't use.
3828             :
3829           else
3830             ac_cv_path_install="$ac_dir/$ac_prog -c"
3831             break 2
3832           fi
3833         fi
3834       done
3835       ;;
3836     esac
3837   done
3838
3839 fi
3840   if test "${ac_cv_path_install+set}" = set; then
3841     INSTALL=$ac_cv_path_install
3842   else
3843     # As a last resort, use the slow shell script.  We don't cache a
3844     # path for INSTALL within a source directory, because that will
3845     # break other packages using the cache if that directory is
3846     # removed, or if the path is relative.
3847     INSTALL=$ac_install_sh
3848   fi
3849 fi
3850 echo "$as_me:3850: result: $INSTALL" >&5
3851 echo "${ECHO_T}$INSTALL" >&6
3852
3853 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3854 # It thinks the first close brace ends the variable substitution.
3855 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3856
3857 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3858
3859 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3860
3861 case $INSTALL in
3862 (/*)
3863         ;;
3864 (*)
3865         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3866         test -z "$cf_dir" && cf_dir=.
3867         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3868         ;;
3869 esac
3870
3871 for ac_prog in lint cppcheck splint
3872 do
3873   # Extract the first word of "$ac_prog", so it can be a program name with args.
3874 set dummy $ac_prog; ac_word=$2
3875 echo "$as_me:3875: checking for $ac_word" >&5
3876 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3877 if test "${ac_cv_prog_LINT+set}" = set; then
3878   echo $ECHO_N "(cached) $ECHO_C" >&6
3879 else
3880   if test -n "$LINT"; then
3881   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3882 else
3883   ac_save_IFS=$IFS; IFS=$ac_path_separator
3884 ac_dummy="$PATH"
3885 for ac_dir in $ac_dummy; do
3886   IFS=$ac_save_IFS
3887   test -z "$ac_dir" && ac_dir=.
3888   $as_executable_p "$ac_dir/$ac_word" || continue
3889 ac_cv_prog_LINT="$ac_prog"
3890 echo "$as_me:3890: found $ac_dir/$ac_word" >&5
3891 break
3892 done
3893
3894 fi
3895 fi
3896 LINT=$ac_cv_prog_LINT
3897 if test -n "$LINT"; then
3898   echo "$as_me:3898: result: $LINT" >&5
3899 echo "${ECHO_T}$LINT" >&6
3900 else
3901   echo "$as_me:3901: result: no" >&5
3902 echo "${ECHO_T}no" >&6
3903 fi
3904
3905   test -n "$LINT" && break
3906 done
3907
3908 case "x$LINT" in
3909 (xcppcheck|x*/cppcheck)
3910         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3911         ;;
3912 esac
3913
3914 echo "$as_me:3914: checking whether ln -s works" >&5
3915 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3916 LN_S=$as_ln_s
3917 if test "$LN_S" = "ln -s"; then
3918   echo "$as_me:3918: result: yes" >&5
3919 echo "${ECHO_T}yes" >&6
3920 else
3921   echo "$as_me:3921: result: no, using $LN_S" >&5
3922 echo "${ECHO_T}no, using $LN_S" >&6
3923 fi
3924
3925 echo "$as_me:3925: checking if $LN_S -f options work" >&5
3926 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3927
3928 rm -f conf$$.src conf$$dst
3929 echo >conf$$.dst
3930 echo first >conf$$.src
3931 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3932         cf_prog_ln_sf=yes
3933 else
3934         cf_prog_ln_sf=no
3935 fi
3936 rm -f conf$$.dst conf$$src
3937 echo "$as_me:3937: result: $cf_prog_ln_sf" >&5
3938 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3939
3940 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3941
3942 echo "$as_me:3942: checking for long file names" >&5
3943 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3944 if test "${ac_cv_sys_long_file_names+set}" = set; then
3945   echo $ECHO_N "(cached) $ECHO_C" >&6
3946 else
3947   ac_cv_sys_long_file_names=yes
3948 # Test for long file names in all the places we know might matter:
3949 #      .                the current directory, where building will happen
3950 #      $prefix/lib      where we will be installing things
3951 #      $exec_prefix/lib likewise
3952 # eval it to expand exec_prefix.
3953 #      $TMPDIR          if set, where it might want to write temporary files
3954 # if $TMPDIR is not set:
3955 #      /tmp             where it might want to write temporary files
3956 #      /var/tmp         likewise
3957 #      /usr/tmp         likewise
3958 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3959   ac_tmpdirs=$TMPDIR
3960 else
3961   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3962 fi
3963 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3964   test -d "$ac_dir" || continue
3965   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3966   ac_xdir=$ac_dir/cf$$
3967   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3968   ac_tf1=$ac_xdir/conftest9012345
3969   ac_tf2=$ac_xdir/conftest9012346
3970   (echo 1 >"$ac_tf1") 2>/dev/null
3971   (echo 2 >"$ac_tf2") 2>/dev/null
3972   ac_val=`cat "$ac_tf1" 2>/dev/null`
3973   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3974     ac_cv_sys_long_file_names=no
3975     rm -rf "$ac_xdir" 2>/dev/null
3976     break
3977   fi
3978   rm -rf "$ac_xdir" 2>/dev/null
3979 done
3980 fi
3981 echo "$as_me:3981: result: $ac_cv_sys_long_file_names" >&5
3982 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3983 if test "$ac_cv_sys_long_file_names" = yes; then
3984
3985 cat >>confdefs.h <<\EOF
3986 #define HAVE_LONG_FILE_NAMES 1
3987 EOF
3988
3989 fi
3990
3991 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3992 # of package conflict.
3993 cf_config_suffix=
3994
3995 # Check whether --with-config-suffix or --without-config-suffix was given.
3996 if test "${with_config_suffix+set}" = set; then
3997   withval="$with_config_suffix"
3998   case "x$withval" in
3999         (xyes|xno)
4000                 { echo "$as_me:4000: WARNING: expected a value for config-suffix option" >&5
4001 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4002                 ;;
4003         (*)     cf_config_suffix="$withval"
4004                 ;;
4005         esac
4006 fi;
4007
4008 # If we find pkg-config, check if we should install the ".pc" files.
4009
4010 echo "$as_me:4010: checking if you want to use pkg-config" >&5
4011 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4012
4013 # Check whether --with-pkg-config or --without-pkg-config was given.
4014 if test "${with_pkg_config+set}" = set; then
4015   withval="$with_pkg_config"
4016   cf_pkg_config=$withval
4017 else
4018   cf_pkg_config=yes
4019 fi;
4020 echo "$as_me:4020: result: $cf_pkg_config" >&5
4021 echo "${ECHO_T}$cf_pkg_config" >&6
4022
4023 case "$cf_pkg_config" in
4024 (no)
4025         PKG_CONFIG=none
4026         ;;
4027 (yes)
4028
4029 if test -n "$ac_tool_prefix"; then
4030   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4031 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4032 echo "$as_me:4032: checking for $ac_word" >&5
4033 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4034 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4035   echo $ECHO_N "(cached) $ECHO_C" >&6
4036 else
4037   case $PKG_CONFIG in
4038   [\\/]* | ?:[\\/]*)
4039   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4040   ;;
4041   *)
4042   ac_save_IFS=$IFS; IFS=$ac_path_separator
4043 ac_dummy="$PATH"
4044 for ac_dir in $ac_dummy; do
4045   IFS=$ac_save_IFS
4046   test -z "$ac_dir" && ac_dir=.
4047   if $as_executable_p "$ac_dir/$ac_word"; then
4048    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4049    echo "$as_me:4049: found $ac_dir/$ac_word" >&5
4050    break
4051 fi
4052 done
4053
4054   ;;
4055 esac
4056 fi
4057 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4058
4059 if test -n "$PKG_CONFIG"; then
4060   echo "$as_me:4060: result: $PKG_CONFIG" >&5
4061 echo "${ECHO_T}$PKG_CONFIG" >&6
4062 else
4063   echo "$as_me:4063: result: no" >&5
4064 echo "${ECHO_T}no" >&6
4065 fi
4066
4067 fi
4068 if test -z "$ac_cv_path_PKG_CONFIG"; then
4069   ac_pt_PKG_CONFIG=$PKG_CONFIG
4070   # Extract the first word of "pkg-config", so it can be a program name with args.
4071 set dummy pkg-config; ac_word=$2
4072 echo "$as_me:4072: checking for $ac_word" >&5
4073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4074 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4075   echo $ECHO_N "(cached) $ECHO_C" >&6
4076 else
4077   case $ac_pt_PKG_CONFIG in
4078   [\\/]* | ?:[\\/]*)
4079   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4080   ;;
4081   *)
4082   ac_save_IFS=$IFS; IFS=$ac_path_separator
4083 ac_dummy="$PATH"
4084 for ac_dir in $ac_dummy; do
4085   IFS=$ac_save_IFS
4086   test -z "$ac_dir" && ac_dir=.
4087   if $as_executable_p "$ac_dir/$ac_word"; then
4088    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4089    echo "$as_me:4089: found $ac_dir/$ac_word" >&5
4090    break
4091 fi
4092 done
4093
4094   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4095   ;;
4096 esac
4097 fi
4098 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4099
4100 if test -n "$ac_pt_PKG_CONFIG"; then
4101   echo "$as_me:4101: result: $ac_pt_PKG_CONFIG" >&5
4102 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4103 else
4104   echo "$as_me:4104: result: no" >&5
4105 echo "${ECHO_T}no" >&6
4106 fi
4107
4108   PKG_CONFIG=$ac_pt_PKG_CONFIG
4109 else
4110   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4111 fi
4112
4113         ;;
4114 (*)
4115         PKG_CONFIG=$withval
4116         ;;
4117 esac
4118
4119 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4120 if test "$PKG_CONFIG" != none ; then
4121
4122 if test "x$prefix" != xNONE; then
4123         cf_path_syntax="$prefix"
4124 else
4125         cf_path_syntax="$ac_default_prefix"
4126 fi
4127
4128 case ".$PKG_CONFIG" in
4129 (.\$\(*\)*|.\'*\'*)
4130         ;;
4131 (..|./*|.\\*)
4132         ;;
4133 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4134         ;;
4135 (.\$\{*prefix\}*|.\$\{*dir\}*)
4136         eval PKG_CONFIG="$PKG_CONFIG"
4137         case ".$PKG_CONFIG" in
4138         (.NONE/*)
4139                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4140                 ;;
4141         esac
4142         ;;
4143 (.no|.NONE/*)
4144         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4145         ;;
4146 (*)
4147         { { echo "$as_me:4147: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4148 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4149    { (exit 1); exit 1; }; }
4150         ;;
4151 esac
4152
4153 elif test "x$cf_pkg_config" != xno ; then
4154         { echo "$as_me:4154: WARNING: pkg-config is not installed" >&5
4155 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4156 fi
4157
4158 case "$PKG_CONFIG" in
4159 (no|none|yes)
4160         echo "$as_me:4160: checking for pkg-config library directory" >&5
4161 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4162         ;;
4163 (*)
4164         echo "$as_me:4164: checking for $PKG_CONFIG library directory" >&5
4165 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4166         ;;
4167 esac
4168
4169 # if $PKG_CONFIG_LIBDIR is set, try to use that
4170 if test -n "$PKG_CONFIG_PATH"; then
4171         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4172 elif test -n "$PKG_CONFIG_LIBDIR"; then
4173         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4174 else
4175         cf_search_path=auto
4176 fi
4177
4178 # if the option is used, let that override.  otherwise default to "libdir"
4179
4180 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4181 if test "${with_pkg_config_libdir+set}" = set; then
4182   withval="$with_pkg_config_libdir"
4183   cf_search_path=$withval
4184 else
4185   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4186 fi;
4187
4188 case "x$cf_search_path" in
4189 (xlibdir)
4190         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4191         echo "$as_me:4191: result: $PKG_CONFIG_LIBDIR" >&5
4192 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4193         cf_search_path=
4194         ;;
4195 (x)
4196         ;;
4197 (x/*\ *)
4198         PKG_CONFIG_LIBDIR=
4199         ;;
4200 (x/*)
4201         PKG_CONFIG_LIBDIR="$cf_search_path"
4202         echo "$as_me:4202: result: $PKG_CONFIG_LIBDIR" >&5
4203 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4204         cf_search_path=
4205         ;;
4206 (xyes|xauto)
4207         echo "$as_me:4207: result: auto" >&5
4208 echo "${ECHO_T}auto" >&6
4209         cf_search_path=
4210         # Look for the library directory using the same prefix as the executable
4211         echo "$as_me:4211: checking for search-list" >&5
4212 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4213         if test "x$PKG_CONFIG" != xnone
4214         then
4215                 # works for pkg-config since version 0.24 (2009)
4216                 # works for pkgconf since version 0.8.3 (2012)
4217                 for cf_pkg_program in \
4218                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4219                         pkg-config \
4220                         pkgconf
4221                 do
4222                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4223                         test -n "$cf_search_path" && break
4224                 done
4225
4226                 # works for pkg-config since import in 2005 of original 2001 HP code.
4227                 test -z "$cf_search_path" && \
4228                 cf_search_path=`
4229                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4230 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4231         sub(\"^[^']*'\",\"\"); \
4232         sub(\"'.*\",\"\"); \
4233         printf \" %s\", \\$0; } \
4234 { next; } \
4235 "`
4236         fi
4237
4238         echo "$as_me:4238: result: $cf_search_path" >&5
4239 echo "${ECHO_T}$cf_search_path" >&6
4240         ;;
4241 (*)
4242         { { echo "$as_me:4242: error: Unexpected option value: $cf_search_path" >&5
4243 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4244    { (exit 1); exit 1; }; }
4245         ;;
4246 esac
4247
4248 if test -n "$cf_search_path"
4249 then
4250         echo "$as_me:4250: checking for first directory" >&5
4251 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4252         cf_pkg_config_path=none
4253         for cf_config in $cf_search_path
4254         do
4255                 if test -d "$cf_config"
4256                 then
4257                         cf_pkg_config_path=$cf_config
4258                         break
4259                 fi
4260         done
4261         echo "$as_me:4261: result: $cf_pkg_config_path" >&5
4262 echo "${ECHO_T}$cf_pkg_config_path" >&6
4263
4264         if test "x$cf_pkg_config_path" != xnone ; then
4265                 # limit this to the first directory found
4266                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4267         fi
4268
4269         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4270         then
4271                 echo "$as_me:4271: checking for workaround" >&5
4272 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4273                 if test "$prefix" = "NONE" ; then
4274                         cf_prefix="$ac_default_prefix"
4275                 else
4276                         cf_prefix="$prefix"
4277                 fi
4278                 eval cf_libdir=$libdir
4279                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4280                 cf_backup=
4281                 for cf_config in $cf_search_path
4282                 do
4283                         case $cf_config in
4284                         $cf_libdir/pkgconfig)
4285                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4286                                 break
4287                                 ;;
4288                         *)
4289                                 test -z "$cf_backup" && cf_backup=$cf_config
4290                                 ;;
4291                         esac
4292                 done
4293                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4294                 echo "$as_me:4294: result: $PKG_CONFIG_LIBDIR" >&5
4295 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4296         fi
4297 fi
4298
4299 if test "x$PKG_CONFIG" != xnone
4300 then
4301         echo "$as_me:4301: checking if we should install .pc files for $PKG_CONFIG" >&5
4302 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4303 else
4304         echo "$as_me:4304: checking if we should install .pc files" >&5
4305 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4306 fi
4307
4308 # Check whether --enable-pc-files or --disable-pc-files was given.
4309 if test "${enable_pc_files+set}" = set; then
4310   enableval="$enable_pc_files"
4311   enable_pc_files=$enableval
4312 else
4313   enable_pc_files=no
4314 fi;
4315 echo "$as_me:4315: result: $enable_pc_files" >&5
4316 echo "${ECHO_T}$enable_pc_files" >&6
4317
4318 if test "x$enable_pc_files" != xno
4319 then
4320         MAKE_PC_FILES=
4321         case "x$PKG_CONFIG_LIBDIR" in
4322         (xno|xnone|xyes|x)
4323                 { echo "$as_me:4323: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4324 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4325                 ;;
4326         (*)
4327                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4328
4329 if test "x$prefix" != xNONE; then
4330         cf_path_syntax="$prefix"
4331 else
4332         cf_path_syntax="$ac_default_prefix"
4333 fi
4334
4335 case ".$cf_pkg_config_libdir" in
4336 (.\$\(*\)*|.\'*\'*)
4337         ;;
4338 (..|./*|.\\*)
4339         ;;
4340 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4341         ;;
4342 (.\$\{*prefix\}*|.\$\{*dir\}*)
4343         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4344         case ".$cf_pkg_config_libdir" in
4345         (.NONE/*)
4346                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4347                 ;;
4348         esac
4349         ;;
4350 (.no|.NONE/*)
4351         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4352         ;;
4353 (*)
4354         { { echo "$as_me:4354: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4355 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4356    { (exit 1); exit 1; }; }
4357         ;;
4358 esac
4359
4360                 ;;
4361         esac
4362 else
4363         MAKE_PC_FILES="#"
4364 fi
4365
4366 if test -z "$MAKE_PC_FILES"
4367 then
4368         echo "$as_me:4368: checking for suffix to add to pc-files" >&5
4369 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4370
4371 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4372 if test "${with_pc_suffix+set}" = set; then
4373   withval="$with_pc_suffix"
4374   case "x$withval" in
4375         (xyes|xno)
4376                 PC_MODULE_SUFFIX=
4377                 ;;
4378         (*)     PC_MODULE_SUFFIX="$withval"
4379                 ;;
4380         esac
4381 fi;
4382         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4383         echo "$as_me:4383: result: $PC_MODULE_SUFFIX" >&5
4384 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4385         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4386
4387 fi
4388
4389 echo "$as_me:4389: checking if we should assume mixed-case filenames" >&5
4390 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4391
4392 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4393 if test "${enable_mixed_case+set}" = set; then
4394   enableval="$enable_mixed_case"
4395   enable_mixedcase=$enableval
4396 else
4397   enable_mixedcase=auto
4398 fi;
4399 echo "$as_me:4399: result: $enable_mixedcase" >&5
4400 echo "${ECHO_T}$enable_mixedcase" >&6
4401 if test "$enable_mixedcase" = "auto" ; then
4402
4403 echo "$as_me:4403: checking if filesystem supports mixed-case filenames" >&5
4404 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4405 if test "${cf_cv_mixedcase+set}" = set; then
4406   echo $ECHO_N "(cached) $ECHO_C" >&6
4407 else
4408
4409 if test "$cross_compiling" = yes ; then
4410         case "$target_alias" in
4411         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4412                 cf_cv_mixedcase=no
4413                 ;;
4414         (*)
4415                 cf_cv_mixedcase=yes
4416                 ;;
4417         esac
4418 else
4419         rm -f conftest CONFTEST
4420         echo test >conftest
4421         if test -f CONFTEST ; then
4422                 cf_cv_mixedcase=no
4423         else
4424                 cf_cv_mixedcase=yes
4425         fi
4426         rm -f conftest CONFTEST
4427 fi
4428
4429 fi
4430 echo "$as_me:4430: result: $cf_cv_mixedcase" >&5
4431 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4432 test "$cf_cv_mixedcase" = yes &&
4433 cat >>confdefs.h <<\EOF
4434 #define MIXEDCASE_FILENAMES 1
4435 EOF
4436
4437 else
4438         cf_cv_mixedcase=$enable_mixedcase
4439         if test "x$enable_mixedcase" = "xyes" ; then
4440
4441 cat >>confdefs.h <<\EOF
4442 #define MIXEDCASE_FILENAMES 1
4443 EOF
4444
4445         fi
4446 fi
4447
4448 # do this after mixed-case option (tags/TAGS is not as important as tic).
4449 echo "$as_me:4449: checking whether ${MAKE-make} sets \${MAKE}" >&5
4450 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4451 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4452 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4453   echo $ECHO_N "(cached) $ECHO_C" >&6
4454 else
4455   cat >conftest.make <<\EOF
4456 all:
4457         @echo 'ac_maketemp="${MAKE}"'
4458 EOF
4459 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4460 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4461 if test -n "$ac_maketemp"; then
4462   eval ac_cv_prog_make_${ac_make}_set=yes
4463 else
4464   eval ac_cv_prog_make_${ac_make}_set=no
4465 fi
4466 rm -f conftest.make
4467 fi
4468 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4469   echo "$as_me:4469: result: yes" >&5
4470 echo "${ECHO_T}yes" >&6
4471   SET_MAKE=
4472 else
4473   echo "$as_me:4473: result: no" >&5
4474 echo "${ECHO_T}no" >&6
4475   SET_MAKE="MAKE=${MAKE-make}"
4476 fi
4477
4478 echo "$as_me:4478: checking for \".PHONY\" make-support" >&5
4479 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4480 if test "${cf_cv_make_PHONY+set}" = set; then
4481   echo $ECHO_N "(cached) $ECHO_C" >&6
4482 else
4483
4484         rm -rf conftest*
4485         (
4486                 mkdir conftest || exit 1
4487                 cd conftest
4488                 cat >makefile <<'CF_EOF'
4489 .PHONY: always
4490 DATA=0
4491 always: always.out
4492         @echo "** making $@ $(DATA)"
4493 once: once.out
4494         @echo "** making $@ $(DATA)"
4495 always.out:
4496         @echo "** making $@ $(DATA)"
4497         echo $(DATA) > $@
4498 once.out:
4499         @echo "** making $@ $(DATA)"
4500         echo $(DATA) > $@
4501 CF_EOF
4502                 for cf_data in 1 2 3
4503                 do
4504                         ${MAKE:-make} always DATA=$cf_data
4505                         ${MAKE:-make} once   DATA=$cf_data
4506                         ${MAKE:-make} -t always once
4507                         if test -f always ; then
4508                                 echo "no (case 1)" > ../conftest.tmp
4509                         elif test ! -f always.out ; then
4510                                 echo "no (case 2)" > ../conftest.tmp
4511                         elif test ! -f once.out ; then
4512                                 echo "no (case 3)" > ../conftest.tmp
4513                         elif ! cmp -s always.out once.out ; then
4514                                 echo "no (case 4)" > ../conftest.tmp
4515                                 diff always.out once.out
4516                         else
4517                                 cf_check="`cat always.out`"
4518                                 if test "x$cf_check" != "x$cf_data" ; then
4519                                         echo "no (case 5)" > ../conftest.tmp
4520                                 else
4521                                         echo yes > ../conftest.tmp
4522                                         rm -f ./*.out
4523                                         continue
4524                                 fi
4525                         fi
4526                         break
4527                 done
4528         ) >&5 2>&1
4529         cf_cv_make_PHONY="`cat conftest.tmp`"
4530         rm -rf conftest*
4531
4532 fi
4533 echo "$as_me:4533: result: $cf_cv_make_PHONY" >&5
4534 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4535 MAKE_NO_PHONY="#"
4536 MAKE_PHONY="#"
4537 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4538 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4539
4540 for ac_prog in exctags ctags
4541 do
4542   # Extract the first word of "$ac_prog", so it can be a program name with args.
4543 set dummy $ac_prog; ac_word=$2
4544 echo "$as_me:4544: checking for $ac_word" >&5
4545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4546 if test "${ac_cv_prog_CTAGS+set}" = set; then
4547   echo $ECHO_N "(cached) $ECHO_C" >&6
4548 else
4549   if test -n "$CTAGS"; then
4550   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4551 else
4552   ac_save_IFS=$IFS; IFS=$ac_path_separator
4553 ac_dummy="$PATH"
4554 for ac_dir in $ac_dummy; do
4555   IFS=$ac_save_IFS
4556   test -z "$ac_dir" && ac_dir=.
4557   $as_executable_p "$ac_dir/$ac_word" || continue
4558 ac_cv_prog_CTAGS="$ac_prog"
4559 echo "$as_me:4559: found $ac_dir/$ac_word" >&5
4560 break
4561 done
4562
4563 fi
4564 fi
4565 CTAGS=$ac_cv_prog_CTAGS
4566 if test -n "$CTAGS"; then
4567   echo "$as_me:4567: result: $CTAGS" >&5
4568 echo "${ECHO_T}$CTAGS" >&6
4569 else
4570   echo "$as_me:4570: result: no" >&5
4571 echo "${ECHO_T}no" >&6
4572 fi
4573
4574   test -n "$CTAGS" && break
4575 done
4576
4577 for ac_prog in exetags etags
4578 do
4579   # Extract the first word of "$ac_prog", so it can be a program name with args.
4580 set dummy $ac_prog; ac_word=$2
4581 echo "$as_me:4581: checking for $ac_word" >&5
4582 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4583 if test "${ac_cv_prog_ETAGS+set}" = set; then
4584   echo $ECHO_N "(cached) $ECHO_C" >&6
4585 else
4586   if test -n "$ETAGS"; then
4587   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4588 else
4589   ac_save_IFS=$IFS; IFS=$ac_path_separator
4590 ac_dummy="$PATH"
4591 for ac_dir in $ac_dummy; do
4592   IFS=$ac_save_IFS
4593   test -z "$ac_dir" && ac_dir=.
4594   $as_executable_p "$ac_dir/$ac_word" || continue
4595 ac_cv_prog_ETAGS="$ac_prog"
4596 echo "$as_me:4596: found $ac_dir/$ac_word" >&5
4597 break
4598 done
4599
4600 fi
4601 fi
4602 ETAGS=$ac_cv_prog_ETAGS
4603 if test -n "$ETAGS"; then
4604   echo "$as_me:4604: result: $ETAGS" >&5
4605 echo "${ECHO_T}$ETAGS" >&6
4606 else
4607   echo "$as_me:4607: result: no" >&5
4608 echo "${ECHO_T}no" >&6
4609 fi
4610
4611   test -n "$ETAGS" && break
4612 done
4613
4614 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4615 set dummy ${CTAGS:-ctags}; ac_word=$2
4616 echo "$as_me:4616: checking for $ac_word" >&5
4617 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4618 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4619   echo $ECHO_N "(cached) $ECHO_C" >&6
4620 else
4621   if test -n "$MAKE_LOWER_TAGS"; then
4622   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4623 else
4624   ac_save_IFS=$IFS; IFS=$ac_path_separator
4625 ac_dummy="$PATH"
4626 for ac_dir in $ac_dummy; do
4627   IFS=$ac_save_IFS
4628   test -z "$ac_dir" && ac_dir=.
4629   $as_executable_p "$ac_dir/$ac_word" || continue
4630 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4631 echo "$as_me:4631: found $ac_dir/$ac_word" >&5
4632 break
4633 done
4634
4635   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4636 fi
4637 fi
4638 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4639 if test -n "$MAKE_LOWER_TAGS"; then
4640   echo "$as_me:4640: result: $MAKE_LOWER_TAGS" >&5
4641 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4642 else
4643   echo "$as_me:4643: result: no" >&5
4644 echo "${ECHO_T}no" >&6
4645 fi
4646
4647 if test "$cf_cv_mixedcase" = yes ; then
4648         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4649 set dummy ${ETAGS:-etags}; ac_word=$2
4650 echo "$as_me:4650: checking for $ac_word" >&5
4651 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4652 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4653   echo $ECHO_N "(cached) $ECHO_C" >&6
4654 else
4655   if test -n "$MAKE_UPPER_TAGS"; then
4656   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4657 else
4658   ac_save_IFS=$IFS; IFS=$ac_path_separator
4659 ac_dummy="$PATH"
4660 for ac_dir in $ac_dummy; do
4661   IFS=$ac_save_IFS
4662   test -z "$ac_dir" && ac_dir=.
4663   $as_executable_p "$ac_dir/$ac_word" || continue
4664 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4665 echo "$as_me:4665: found $ac_dir/$ac_word" >&5
4666 break
4667 done
4668
4669   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4670 fi
4671 fi
4672 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4673 if test -n "$MAKE_UPPER_TAGS"; then
4674   echo "$as_me:4674: result: $MAKE_UPPER_TAGS" >&5
4675 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4676 else
4677   echo "$as_me:4677: result: no" >&5
4678 echo "${ECHO_T}no" >&6
4679 fi
4680
4681 else
4682         MAKE_UPPER_TAGS=no
4683 fi
4684
4685 if test "$MAKE_UPPER_TAGS" = yes ; then
4686         MAKE_UPPER_TAGS=
4687 else
4688         MAKE_UPPER_TAGS="#"
4689 fi
4690
4691 if test "$MAKE_LOWER_TAGS" = yes ; then
4692         MAKE_LOWER_TAGS=
4693 else
4694         MAKE_LOWER_TAGS="#"
4695 fi
4696
4697 echo "$as_me:4697: checking for makeflags variable" >&5
4698 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4699 if test "${cf_cv_makeflags+set}" = set; then
4700   echo $ECHO_N "(cached) $ECHO_C" >&6
4701 else
4702
4703         cf_cv_makeflags=''
4704         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4705         do
4706                 cat >cf_makeflags.tmp <<CF_EOF
4707 SHELL = $SHELL
4708 all :
4709         @ echo '.$cf_option'
4710 CF_EOF
4711                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4712                 case "$cf_result" in
4713                 (.*k|.*kw)
4714                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4715                         case "$cf_result" in
4716                         (.*CC=*)        cf_cv_makeflags=
4717                                 ;;
4718                         (*)     cf_cv_makeflags=$cf_option
4719                                 ;;
4720                         esac
4721                         break
4722                         ;;
4723                 (.-)
4724                         ;;
4725                 (*)
4726
4727 echo "${as_me:-configure}:4727: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4728
4729                         ;;
4730                 esac
4731         done
4732         rm -f cf_makeflags.tmp
4733
4734 fi
4735 echo "$as_me:4735: result: $cf_cv_makeflags" >&5
4736 echo "${ECHO_T}$cf_cv_makeflags" >&6
4737
4738 if test -n "$ac_tool_prefix"; then
4739   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4740 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4741 echo "$as_me:4741: checking for $ac_word" >&5
4742 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4743 if test "${ac_cv_prog_RANLIB+set}" = set; then
4744   echo $ECHO_N "(cached) $ECHO_C" >&6
4745 else
4746   if test -n "$RANLIB"; then
4747   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4748 else
4749   ac_save_IFS=$IFS; IFS=$ac_path_separator
4750 ac_dummy="$PATH"
4751 for ac_dir in $ac_dummy; do
4752   IFS=$ac_save_IFS
4753   test -z "$ac_dir" && ac_dir=.
4754   $as_executable_p "$ac_dir/$ac_word" || continue
4755 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4756 echo "$as_me:4756: found $ac_dir/$ac_word" >&5
4757 break
4758 done
4759
4760 fi
4761 fi
4762 RANLIB=$ac_cv_prog_RANLIB
4763 if test -n "$RANLIB"; then
4764   echo "$as_me:4764: result: $RANLIB" >&5
4765 echo "${ECHO_T}$RANLIB" >&6
4766 else
4767   echo "$as_me:4767: result: no" >&5
4768 echo "${ECHO_T}no" >&6
4769 fi
4770
4771 fi
4772 if test -z "$ac_cv_prog_RANLIB"; then
4773   ac_ct_RANLIB=$RANLIB
4774   # Extract the first word of "ranlib", so it can be a program name with args.
4775 set dummy ranlib; ac_word=$2
4776 echo "$as_me:4776: checking for $ac_word" >&5
4777 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4778 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4779   echo $ECHO_N "(cached) $ECHO_C" >&6
4780 else
4781   if test -n "$ac_ct_RANLIB"; then
4782   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4783 else
4784   ac_save_IFS=$IFS; IFS=$ac_path_separator
4785 ac_dummy="$PATH"
4786 for ac_dir in $ac_dummy; do
4787   IFS=$ac_save_IFS
4788   test -z "$ac_dir" && ac_dir=.
4789   $as_executable_p "$ac_dir/$ac_word" || continue
4790 ac_cv_prog_ac_ct_RANLIB="ranlib"
4791 echo "$as_me:4791: found $ac_dir/$ac_word" >&5
4792 break
4793 done
4794
4795   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4796 fi
4797 fi
4798 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4799 if test -n "$ac_ct_RANLIB"; then
4800   echo "$as_me:4800: result: $ac_ct_RANLIB" >&5
4801 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4802 else
4803   echo "$as_me:4803: result: no" >&5
4804 echo "${ECHO_T}no" >&6
4805 fi
4806
4807   RANLIB=$ac_ct_RANLIB
4808 else
4809   RANLIB="$ac_cv_prog_RANLIB"
4810 fi
4811
4812 if test -n "$ac_tool_prefix"; then
4813   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4814 set dummy ${ac_tool_prefix}ld; ac_word=$2
4815 echo "$as_me:4815: checking for $ac_word" >&5
4816 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4817 if test "${ac_cv_prog_LD+set}" = set; then
4818   echo $ECHO_N "(cached) $ECHO_C" >&6
4819 else
4820   if test -n "$LD"; then
4821   ac_cv_prog_LD="$LD" # Let the user override the test.
4822 else
4823   ac_save_IFS=$IFS; IFS=$ac_path_separator
4824 ac_dummy="$PATH"
4825 for ac_dir in $ac_dummy; do
4826   IFS=$ac_save_IFS
4827   test -z "$ac_dir" && ac_dir=.
4828   $as_executable_p "$ac_dir/$ac_word" || continue
4829 ac_cv_prog_LD="${ac_tool_prefix}ld"
4830 echo "$as_me:4830: found $ac_dir/$ac_word" >&5
4831 break
4832 done
4833
4834 fi
4835 fi
4836 LD=$ac_cv_prog_LD
4837 if test -n "$LD"; then
4838   echo "$as_me:4838: result: $LD" >&5
4839 echo "${ECHO_T}$LD" >&6
4840 else
4841   echo "$as_me:4841: result: no" >&5
4842 echo "${ECHO_T}no" >&6
4843 fi
4844
4845 fi
4846 if test -z "$ac_cv_prog_LD"; then
4847   ac_ct_LD=$LD
4848   # Extract the first word of "ld", so it can be a program name with args.
4849 set dummy ld; ac_word=$2
4850 echo "$as_me:4850: checking for $ac_word" >&5
4851 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4852 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4853   echo $ECHO_N "(cached) $ECHO_C" >&6
4854 else
4855   if test -n "$ac_ct_LD"; then
4856   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4857 else
4858   ac_save_IFS=$IFS; IFS=$ac_path_separator
4859 ac_dummy="$PATH"
4860 for ac_dir in $ac_dummy; do
4861   IFS=$ac_save_IFS
4862   test -z "$ac_dir" && ac_dir=.
4863   $as_executable_p "$ac_dir/$ac_word" || continue
4864 ac_cv_prog_ac_ct_LD="ld"
4865 echo "$as_me:4865: found $ac_dir/$ac_word" >&5
4866 break
4867 done
4868
4869   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4870 fi
4871 fi
4872 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4873 if test -n "$ac_ct_LD"; then
4874   echo "$as_me:4874: result: $ac_ct_LD" >&5
4875 echo "${ECHO_T}$ac_ct_LD" >&6
4876 else
4877   echo "$as_me:4877: result: no" >&5
4878 echo "${ECHO_T}no" >&6
4879 fi
4880
4881   LD=$ac_ct_LD
4882 else
4883   LD="$ac_cv_prog_LD"
4884 fi
4885
4886 if test -n "$ac_tool_prefix"; then
4887   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4888 set dummy ${ac_tool_prefix}ar; ac_word=$2
4889 echo "$as_me:4889: checking for $ac_word" >&5
4890 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4891 if test "${ac_cv_prog_AR+set}" = set; then
4892   echo $ECHO_N "(cached) $ECHO_C" >&6
4893 else
4894   if test -n "$AR"; then
4895   ac_cv_prog_AR="$AR" # Let the user override the test.
4896 else
4897   ac_save_IFS=$IFS; IFS=$ac_path_separator
4898 ac_dummy="$PATH"
4899 for ac_dir in $ac_dummy; do
4900   IFS=$ac_save_IFS
4901   test -z "$ac_dir" && ac_dir=.
4902   $as_executable_p "$ac_dir/$ac_word" || continue
4903 ac_cv_prog_AR="${ac_tool_prefix}ar"
4904 echo "$as_me:4904: found $ac_dir/$ac_word" >&5
4905 break
4906 done
4907
4908 fi
4909 fi
4910 AR=$ac_cv_prog_AR
4911 if test -n "$AR"; then
4912   echo "$as_me:4912: result: $AR" >&5
4913 echo "${ECHO_T}$AR" >&6
4914 else
4915   echo "$as_me:4915: result: no" >&5
4916 echo "${ECHO_T}no" >&6
4917 fi
4918
4919 fi
4920 if test -z "$ac_cv_prog_AR"; then
4921   ac_ct_AR=$AR
4922   # Extract the first word of "ar", so it can be a program name with args.
4923 set dummy ar; ac_word=$2
4924 echo "$as_me:4924: checking for $ac_word" >&5
4925 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4926 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4927   echo $ECHO_N "(cached) $ECHO_C" >&6
4928 else
4929   if test -n "$ac_ct_AR"; then
4930   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4931 else
4932   ac_save_IFS=$IFS; IFS=$ac_path_separator
4933 ac_dummy="$PATH"
4934 for ac_dir in $ac_dummy; do
4935   IFS=$ac_save_IFS
4936   test -z "$ac_dir" && ac_dir=.
4937   $as_executable_p "$ac_dir/$ac_word" || continue
4938 ac_cv_prog_ac_ct_AR="ar"
4939 echo "$as_me:4939: found $ac_dir/$ac_word" >&5
4940 break
4941 done
4942
4943   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4944 fi
4945 fi
4946 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4947 if test -n "$ac_ct_AR"; then
4948   echo "$as_me:4948: result: $ac_ct_AR" >&5
4949 echo "${ECHO_T}$ac_ct_AR" >&6
4950 else
4951   echo "$as_me:4951: result: no" >&5
4952 echo "${ECHO_T}no" >&6
4953 fi
4954
4955   AR=$ac_ct_AR
4956 else
4957   AR="$ac_cv_prog_AR"
4958 fi
4959
4960 if test -n "$ac_tool_prefix"; then
4961   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4962 set dummy ${ac_tool_prefix}nm; ac_word=$2
4963 echo "$as_me:4963: checking for $ac_word" >&5
4964 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4965 if test "${ac_cv_prog_NM+set}" = set; then
4966   echo $ECHO_N "(cached) $ECHO_C" >&6
4967 else
4968   if test -n "$NM"; then
4969   ac_cv_prog_NM="$NM" # Let the user override the test.
4970 else
4971   ac_save_IFS=$IFS; IFS=$ac_path_separator
4972 ac_dummy="$PATH"
4973 for ac_dir in $ac_dummy; do
4974   IFS=$ac_save_IFS
4975   test -z "$ac_dir" && ac_dir=.
4976   $as_executable_p "$ac_dir/$ac_word" || continue
4977 ac_cv_prog_NM="${ac_tool_prefix}nm"
4978 echo "$as_me:4978: found $ac_dir/$ac_word" >&5
4979 break
4980 done
4981
4982 fi
4983 fi
4984 NM=$ac_cv_prog_NM
4985 if test -n "$NM"; then
4986   echo "$as_me:4986: result: $NM" >&5
4987 echo "${ECHO_T}$NM" >&6
4988 else
4989   echo "$as_me:4989: result: no" >&5
4990 echo "${ECHO_T}no" >&6
4991 fi
4992
4993 fi
4994 if test -z "$ac_cv_prog_NM"; then
4995   ac_ct_NM=$NM
4996   # Extract the first word of "nm", so it can be a program name with args.
4997 set dummy nm; ac_word=$2
4998 echo "$as_me:4998: checking for $ac_word" >&5
4999 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5000 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003   if test -n "$ac_ct_NM"; then
5004   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5005 else
5006   ac_save_IFS=$IFS; IFS=$ac_path_separator
5007 ac_dummy="$PATH"
5008 for ac_dir in $ac_dummy; do
5009   IFS=$ac_save_IFS
5010   test -z "$ac_dir" && ac_dir=.
5011   $as_executable_p "$ac_dir/$ac_word" || continue
5012 ac_cv_prog_ac_ct_NM="nm"
5013 echo "$as_me:5013: found $ac_dir/$ac_word" >&5
5014 break
5015 done
5016
5017   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5018 fi
5019 fi
5020 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5021 if test -n "$ac_ct_NM"; then
5022   echo "$as_me:5022: result: $ac_ct_NM" >&5
5023 echo "${ECHO_T}$ac_ct_NM" >&6
5024 else
5025   echo "$as_me:5025: result: no" >&5
5026 echo "${ECHO_T}no" >&6
5027 fi
5028
5029   NM=$ac_ct_NM
5030 else
5031   NM="$ac_cv_prog_NM"
5032 fi
5033
5034 if test -n "$ac_tool_prefix"; then
5035   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5036 set dummy ${ac_tool_prefix}ar; ac_word=$2
5037 echo "$as_me:5037: checking for $ac_word" >&5
5038 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5039 if test "${ac_cv_prog_AR+set}" = set; then
5040   echo $ECHO_N "(cached) $ECHO_C" >&6
5041 else
5042   if test -n "$AR"; then
5043   ac_cv_prog_AR="$AR" # Let the user override the test.
5044 else
5045   ac_save_IFS=$IFS; IFS=$ac_path_separator
5046 ac_dummy="$PATH"
5047 for ac_dir in $ac_dummy; do
5048   IFS=$ac_save_IFS
5049   test -z "$ac_dir" && ac_dir=.
5050   $as_executable_p "$ac_dir/$ac_word" || continue
5051 ac_cv_prog_AR="${ac_tool_prefix}ar"
5052 echo "$as_me:5052: found $ac_dir/$ac_word" >&5
5053 break
5054 done
5055
5056 fi
5057 fi
5058 AR=$ac_cv_prog_AR
5059 if test -n "$AR"; then
5060   echo "$as_me:5060: result: $AR" >&5
5061 echo "${ECHO_T}$AR" >&6
5062 else
5063   echo "$as_me:5063: result: no" >&5
5064 echo "${ECHO_T}no" >&6
5065 fi
5066
5067 fi
5068 if test -z "$ac_cv_prog_AR"; then
5069   ac_ct_AR=$AR
5070   # Extract the first word of "ar", so it can be a program name with args.
5071 set dummy ar; ac_word=$2
5072 echo "$as_me:5072: checking for $ac_word" >&5
5073 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5074 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5075   echo $ECHO_N "(cached) $ECHO_C" >&6
5076 else
5077   if test -n "$ac_ct_AR"; then
5078   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5079 else
5080   ac_save_IFS=$IFS; IFS=$ac_path_separator
5081 ac_dummy="$PATH"
5082 for ac_dir in $ac_dummy; do
5083   IFS=$ac_save_IFS
5084   test -z "$ac_dir" && ac_dir=.
5085   $as_executable_p "$ac_dir/$ac_word" || continue
5086 ac_cv_prog_ac_ct_AR="ar"
5087 echo "$as_me:5087: found $ac_dir/$ac_word" >&5
5088 break
5089 done
5090
5091   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5092 fi
5093 fi
5094 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5095 if test -n "$ac_ct_AR"; then
5096   echo "$as_me:5096: result: $ac_ct_AR" >&5
5097 echo "${ECHO_T}$ac_ct_AR" >&6
5098 else
5099   echo "$as_me:5099: result: no" >&5
5100 echo "${ECHO_T}no" >&6
5101 fi
5102
5103   AR=$ac_ct_AR
5104 else
5105   AR="$ac_cv_prog_AR"
5106 fi
5107
5108 echo "$as_me:5108: checking for options to update archives" >&5
5109 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5110 if test "${cf_cv_ar_flags+set}" = set; then
5111   echo $ECHO_N "(cached) $ECHO_C" >&6
5112 else
5113
5114         case "$cf_cv_system_name" in
5115         (*-msvc*)
5116                 cf_cv_ar_flags=''
5117                 cat >mk_static_lib.sh <<-EOF
5118                 #!$SHELL
5119                 MSVC_BIN="$AR"
5120                 out="\$1"
5121                 shift
5122                 exec \$MSVC_BIN -out:"\$out" \$@
5123                 EOF
5124                 chmod +x mk_static_lib.sh
5125                 AR=`pwd`/mk_static_lib.sh
5126                 ;;
5127         (*)
5128                 cf_cv_ar_flags=unknown
5129                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5130                 do
5131
5132                         # check if $ARFLAGS already contains this choice
5133                         if test "x$ARFLAGS" != "x" ; then
5134                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5135                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5136                                         cf_cv_ar_flags=
5137                                         break
5138                                 fi
5139                         fi
5140
5141                         rm -f "conftest.$ac_cv_objext"
5142                         rm -f conftest.a
5143
5144                         cat >"conftest.$ac_ext" <<EOF
5145 #line 5145 "configure"
5146 int     testdata[3] = { 123, 456, 789 };
5147 EOF
5148                         if { (eval echo "$as_me:5148: \"$ac_compile\"") >&5
5149   (eval $ac_compile) 2>&5
5150   ac_status=$?
5151   echo "$as_me:5151: \$? = $ac_status" >&5
5152   (exit "$ac_status"); } ; then
5153                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5154                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5155                                 if test -f conftest.a ; then
5156                                         cf_cv_ar_flags="$cf_ar_flags"
5157                                         break
5158                                 fi
5159                         else
5160                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5161
5162 echo "${as_me:-configure}:5162: testing cannot compile test-program ..." 1>&5
5163
5164                                 break
5165                         fi
5166                 done
5167                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5168                 ;;
5169         esac
5170
5171 fi
5172 echo "$as_me:5172: result: $cf_cv_ar_flags" >&5
5173 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5174
5175 if test -n "$ARFLAGS" ; then
5176         if test -n "$cf_cv_ar_flags" ; then
5177                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5178         fi
5179 else
5180         ARFLAGS=$cf_cv_ar_flags
5181 fi
5182
5183 echo "$as_me:5183: checking if you have specified an install-prefix" >&5
5184 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5185
5186 # Check whether --with-install-prefix or --without-install-prefix was given.
5187 if test "${with_install_prefix+set}" = set; then
5188   withval="$with_install_prefix"
5189   case "x$withval" in
5190         (xyes|xno)
5191                 ;;
5192         (*)     DESTDIR="$withval"
5193                 ;;
5194         esac
5195 fi;
5196 echo "$as_me:5196: result: $DESTDIR" >&5
5197 echo "${ECHO_T}$DESTDIR" >&6
5198
5199 ###############################################################################
5200
5201 # If we're cross-compiling, allow the user to override the tools and their
5202 # options.  The configure script is oriented toward identifying the host
5203 # compiler, etc., but we need a build compiler to generate parts of the source.
5204
5205 case "$cf_cv_system_name" in
5206 (*-msvc*)
5207         LDFLAGS="$LDFLAGS user32.lib"
5208         export LDFLAGS
5209         ;;
5210 esac
5211
5212 if test "$cross_compiling" = yes ; then
5213
5214         # defaults that we might want to override
5215         : ${BUILD_CFLAGS:=''}
5216         : ${BUILD_CPPFLAGS:=''}
5217         : ${BUILD_LDFLAGS:=''}
5218         : ${BUILD_LIBS:=''}
5219         : ${BUILD_EXEEXT:='$x'}
5220         : ${BUILD_OBJEXT:='o'}
5221
5222 # Check whether --with-build-cc or --without-build-cc was given.
5223 if test "${with_build_cc+set}" = set; then
5224   withval="$with_build_cc"
5225   BUILD_CC="$withval"
5226 else
5227   for ac_prog in gcc clang c99 c89 cc cl
5228 do
5229   # Extract the first word of "$ac_prog", so it can be a program name with args.
5230 set dummy $ac_prog; ac_word=$2
5231 echo "$as_me:5231: checking for $ac_word" >&5
5232 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5233 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5234   echo $ECHO_N "(cached) $ECHO_C" >&6
5235 else
5236   if test -n "$BUILD_CC"; then
5237   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5238 else
5239   ac_save_IFS=$IFS; IFS=$ac_path_separator
5240 ac_dummy="$PATH"
5241 for ac_dir in $ac_dummy; do
5242   IFS=$ac_save_IFS
5243   test -z "$ac_dir" && ac_dir=.
5244   $as_executable_p "$ac_dir/$ac_word" || continue
5245 ac_cv_prog_BUILD_CC="$ac_prog"
5246 echo "$as_me:5246: found $ac_dir/$ac_word" >&5
5247 break
5248 done
5249
5250 fi
5251 fi
5252 BUILD_CC=$ac_cv_prog_BUILD_CC
5253 if test -n "$BUILD_CC"; then
5254   echo "$as_me:5254: result: $BUILD_CC" >&5
5255 echo "${ECHO_T}$BUILD_CC" >&6
5256 else
5257   echo "$as_me:5257: result: no" >&5
5258 echo "${ECHO_T}no" >&6
5259 fi
5260
5261   test -n "$BUILD_CC" && break
5262 done
5263 test -n "$BUILD_CC" || BUILD_CC="none"
5264
5265 fi;
5266         echo "$as_me:5266: checking for native build C compiler" >&5
5267 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5268         echo "$as_me:5268: result: $BUILD_CC" >&5
5269 echo "${ECHO_T}$BUILD_CC" >&6
5270
5271         echo "$as_me:5271: checking for native build C preprocessor" >&5
5272 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5273
5274 # Check whether --with-build-cpp or --without-build-cpp was given.
5275 if test "${with_build_cpp+set}" = set; then
5276   withval="$with_build_cpp"
5277   BUILD_CPP="$withval"
5278 else
5279   BUILD_CPP='${BUILD_CC} -E'
5280 fi;
5281         echo "$as_me:5281: result: $BUILD_CPP" >&5
5282 echo "${ECHO_T}$BUILD_CPP" >&6
5283
5284         echo "$as_me:5284: checking for native build C flags" >&5
5285 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5286
5287 # Check whether --with-build-cflags or --without-build-cflags was given.
5288 if test "${with_build_cflags+set}" = set; then
5289   withval="$with_build_cflags"
5290   BUILD_CFLAGS="$withval"
5291 fi;
5292         echo "$as_me:5292: result: $BUILD_CFLAGS" >&5
5293 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5294
5295         echo "$as_me:5295: checking for native build C preprocessor-flags" >&5
5296 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5297
5298 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5299 if test "${with_build_cppflags+set}" = set; then
5300   withval="$with_build_cppflags"
5301   BUILD_CPPFLAGS="$withval"
5302 fi;
5303         echo "$as_me:5303: result: $BUILD_CPPFLAGS" >&5
5304 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5305
5306         echo "$as_me:5306: checking for native build linker-flags" >&5
5307 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5308
5309 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5310 if test "${with_build_ldflags+set}" = set; then
5311   withval="$with_build_ldflags"
5312   BUILD_LDFLAGS="$withval"
5313 fi;
5314         echo "$as_me:5314: result: $BUILD_LDFLAGS" >&5
5315 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5316
5317         echo "$as_me:5317: checking for native build linker-libraries" >&5
5318 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5319
5320 # Check whether --with-build-libs or --without-build-libs was given.
5321 if test "${with_build_libs+set}" = set; then
5322   withval="$with_build_libs"
5323   BUILD_LIBS="$withval"
5324 fi;
5325         echo "$as_me:5325: result: $BUILD_LIBS" >&5
5326 echo "${ECHO_T}$BUILD_LIBS" >&6
5327
5328         # this assumes we're on Unix.
5329         BUILD_EXEEXT=
5330         BUILD_OBJEXT=o
5331
5332         : ${BUILD_CC:='${CC}'}
5333
5334         echo "$as_me:5334: checking if the build-compiler \"$BUILD_CC\" works" >&5
5335 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5336
5337         cf_save_crossed=$cross_compiling
5338         cf_save_ac_link=$ac_link
5339         cross_compiling=no
5340         cf_build_cppflags=$BUILD_CPPFLAGS
5341         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5342         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5343
5344         if test "$cross_compiling" = yes; then
5345   cf_ok_build_cc=unknown
5346 else
5347   cat >"conftest.$ac_ext" <<_ACEOF
5348 #line 5348 "configure"
5349 #include "confdefs.h"
5350 #include <stdio.h>
5351                 int main(int argc, char *argv[])
5352                 {
5353                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5354                 }
5355
5356 _ACEOF
5357 rm -f "conftest$ac_exeext"
5358 if { (eval echo "$as_me:5358: \"$ac_link\"") >&5
5359   (eval $ac_link) 2>&5
5360   ac_status=$?
5361   echo "$as_me:5361: \$? = $ac_status" >&5
5362   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5363   { (eval echo "$as_me:5363: \"$ac_try\"") >&5
5364   (eval $ac_try) 2>&5
5365   ac_status=$?
5366   echo "$as_me:5366: \$? = $ac_status" >&5
5367   (exit "$ac_status"); }; }; then
5368   cf_ok_build_cc=yes
5369 else
5370   echo "$as_me: program exited with status $ac_status" >&5
5371 echo "$as_me: failed program was:" >&5
5372 cat "conftest.$ac_ext" >&5
5373 cf_ok_build_cc=no
5374 fi
5375 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5376 fi
5377
5378         cross_compiling=$cf_save_crossed
5379         ac_link=$cf_save_ac_link
5380
5381         echo "$as_me:5381: result: $cf_ok_build_cc" >&5
5382 echo "${ECHO_T}$cf_ok_build_cc" >&6
5383
5384         if test "$cf_ok_build_cc" != yes
5385         then
5386                 { { echo "$as_me:5386: error: Cross-build requires two compilers.
5387 Use --with-build-cc to specify the native compiler." >&5
5388 echo "$as_me: error: Cross-build requires two compilers.
5389 Use --with-build-cc to specify the native compiler." >&2;}
5390    { (exit 1); exit 1; }; }
5391         fi
5392
5393 else
5394         : ${BUILD_CC:='${CC}'}
5395         : ${BUILD_CPP:='${CPP}'}
5396         : ${BUILD_CFLAGS:='${CFLAGS}'}
5397         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5398         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5399         : ${BUILD_LIBS:='${LIBS}'}
5400         : ${BUILD_EXEEXT:='$x'}
5401         : ${BUILD_OBJEXT:='o'}
5402 fi
5403
5404 ###############################################################################
5405
5406 ### Options to allow the user to specify the set of libraries which are used.
5407 ### Use "--without-normal --with-shared" to allow the default model to be
5408 ### shared, for example.
5409 cf_list_models=""
5410
5411 echo "$as_me:5411: checking if libtool -version-number should be used" >&5
5412 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5413
5414 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5415 if test "${enable_libtool_version+set}" = set; then
5416   enableval="$enable_libtool_version"
5417   test "$enableval" != no && enableval=yes
5418         if test "$enableval" != "yes" ; then
5419     cf_libtool_version=no
5420         else
5421                 cf_libtool_version=yes
5422         fi
5423 else
5424   enableval=yes
5425         cf_libtool_version=yes
5426
5427 fi;
5428 echo "$as_me:5428: result: $cf_libtool_version" >&5
5429 echo "${ECHO_T}$cf_libtool_version" >&6
5430
5431 if test "$cf_libtool_version" = yes ; then
5432         LIBTOOL_VERSION="-version-number"
5433 else
5434         LIBTOOL_VERSION="-version-info"
5435         case "x$VERSION" in
5436         (x)
5437                 { echo "$as_me:5437: WARNING: VERSION was not set" >&5
5438 echo "$as_me: WARNING: VERSION was not set" >&2;}
5439                 ;;
5440         (x*.*.*)
5441                 ABI_VERSION="$VERSION"
5442                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5443
5444 echo "${as_me:-configure}:5444: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5445
5446                 ;;
5447         (x*:*:*)
5448                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5449                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5450
5451 echo "${as_me:-configure}:5451: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5452
5453                 ;;
5454         (*)
5455                 { echo "$as_me:5455: WARNING: unexpected VERSION value: $VERSION" >&5
5456 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5457                 ;;
5458         esac
5459 fi
5460
5461 LIBTOOL=
5462
5463 # common library maintenance symbols that are convenient for libtool scripts:
5464 LIB_CREATE='${AR} -cr'
5465 LIB_OBJECT='${OBJECTS}'
5466 LIB_SUFFIX=.a
5467 LIB_PREP="$RANLIB"
5468
5469 # symbols used to prop libtool up to enable it to determine what it should be
5470 # doing:
5471 LIB_CLEAN=
5472 LIB_COMPILE=
5473 LIB_LINK='${CC}'
5474 LIB_INSTALL=
5475 LIB_UNINSTALL=
5476
5477 echo "$as_me:5477: checking if you want to build libraries with libtool" >&5
5478 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5479
5480 # Check whether --with-libtool or --without-libtool was given.
5481 if test "${with_libtool+set}" = set; then
5482   withval="$with_libtool"
5483   with_libtool=$withval
5484 else
5485   with_libtool=no
5486 fi;
5487 echo "$as_me:5487: result: $with_libtool" >&5
5488 echo "${ECHO_T}$with_libtool" >&6
5489 if test "$with_libtool" != "no"; then
5490
5491         if test "$with_libtool" != "yes" ; then
5492
5493 if test "x$prefix" != xNONE; then
5494         cf_path_syntax="$prefix"
5495 else
5496         cf_path_syntax="$ac_default_prefix"
5497 fi
5498
5499 case ".$with_libtool" in
5500 (.\$\(*\)*|.\'*\'*)
5501         ;;
5502 (..|./*|.\\*)
5503         ;;
5504 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5505         ;;
5506 (.\$\{*prefix\}*|.\$\{*dir\}*)
5507         eval with_libtool="$with_libtool"
5508         case ".$with_libtool" in
5509         (.NONE/*)
5510                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5511                 ;;
5512         esac
5513         ;;
5514 (.no|.NONE/*)
5515         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5516         ;;
5517 (*)
5518         { { echo "$as_me:5518: error: expected a pathname, not \"$with_libtool\"" >&5
5519 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5520    { (exit 1); exit 1; }; }
5521         ;;
5522 esac
5523
5524                 LIBTOOL=$with_libtool
5525         else
5526                 if test -n "$ac_tool_prefix"; then
5527   for ac_prog in libtool glibtool
5528   do
5529     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5530 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5531 echo "$as_me:5531: checking for $ac_word" >&5
5532 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5533 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5534   echo $ECHO_N "(cached) $ECHO_C" >&6
5535 else
5536   if test -n "$LIBTOOL"; then
5537   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5538 else
5539   ac_save_IFS=$IFS; IFS=$ac_path_separator
5540 ac_dummy="$PATH"
5541 for ac_dir in $ac_dummy; do
5542   IFS=$ac_save_IFS
5543   test -z "$ac_dir" && ac_dir=.
5544   $as_executable_p "$ac_dir/$ac_word" || continue
5545 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5546 echo "$as_me:5546: found $ac_dir/$ac_word" >&5
5547 break
5548 done
5549
5550 fi
5551 fi
5552 LIBTOOL=$ac_cv_prog_LIBTOOL
5553 if test -n "$LIBTOOL"; then
5554   echo "$as_me:5554: result: $LIBTOOL" >&5
5555 echo "${ECHO_T}$LIBTOOL" >&6
5556 else
5557   echo "$as_me:5557: result: no" >&5
5558 echo "${ECHO_T}no" >&6
5559 fi
5560
5561     test -n "$LIBTOOL" && break
5562   done
5563 fi
5564 if test -z "$LIBTOOL"; then
5565   ac_ct_LIBTOOL=$LIBTOOL
5566   for ac_prog in libtool glibtool
5567 do
5568   # Extract the first word of "$ac_prog", so it can be a program name with args.
5569 set dummy $ac_prog; ac_word=$2
5570 echo "$as_me:5570: checking for $ac_word" >&5
5571 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5572 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5573   echo $ECHO_N "(cached) $ECHO_C" >&6
5574 else
5575   if test -n "$ac_ct_LIBTOOL"; then
5576   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5577 else
5578   ac_save_IFS=$IFS; IFS=$ac_path_separator
5579 ac_dummy="$PATH"
5580 for ac_dir in $ac_dummy; do
5581   IFS=$ac_save_IFS
5582   test -z "$ac_dir" && ac_dir=.
5583   $as_executable_p "$ac_dir/$ac_word" || continue
5584 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5585 echo "$as_me:5585: found $ac_dir/$ac_word" >&5
5586 break
5587 done
5588
5589 fi
5590 fi
5591 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5592 if test -n "$ac_ct_LIBTOOL"; then
5593   echo "$as_me:5593: result: $ac_ct_LIBTOOL" >&5
5594 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5595 else
5596   echo "$as_me:5596: result: no" >&5
5597 echo "${ECHO_T}no" >&6
5598 fi
5599
5600   test -n "$ac_ct_LIBTOOL" && break
5601 done
5602 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5603
5604   LIBTOOL=$ac_ct_LIBTOOL
5605 fi
5606
5607 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5608 then
5609         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5610 else
5611         cf_cv_libtool_version=
5612 fi
5613 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5614
5615                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5616                 then
5617
5618 unset ac_cv_prog_ac_ct_LIBTOOL
5619 unset ac_ct_LIBTOOL
5620 unset LIBTOOL
5621
5622                         if test -n "$ac_tool_prefix"; then
5623   for ac_prog in glibtool
5624   do
5625     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5626 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5627 echo "$as_me:5627: checking for $ac_word" >&5
5628 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5629 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5630   echo $ECHO_N "(cached) $ECHO_C" >&6
5631 else
5632   if test -n "$LIBTOOL"; then
5633   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5634 else
5635   ac_save_IFS=$IFS; IFS=$ac_path_separator
5636 ac_dummy="$PATH"
5637 for ac_dir in $ac_dummy; do
5638   IFS=$ac_save_IFS
5639   test -z "$ac_dir" && ac_dir=.
5640   $as_executable_p "$ac_dir/$ac_word" || continue
5641 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5642 echo "$as_me:5642: found $ac_dir/$ac_word" >&5
5643 break
5644 done
5645
5646 fi
5647 fi
5648 LIBTOOL=$ac_cv_prog_LIBTOOL
5649 if test -n "$LIBTOOL"; then
5650   echo "$as_me:5650: result: $LIBTOOL" >&5
5651 echo "${ECHO_T}$LIBTOOL" >&6
5652 else
5653   echo "$as_me:5653: result: no" >&5
5654 echo "${ECHO_T}no" >&6
5655 fi
5656
5657     test -n "$LIBTOOL" && break
5658   done
5659 fi
5660 if test -z "$LIBTOOL"; then
5661   ac_ct_LIBTOOL=$LIBTOOL
5662   for ac_prog in glibtool
5663 do
5664   # Extract the first word of "$ac_prog", so it can be a program name with args.
5665 set dummy $ac_prog; ac_word=$2
5666 echo "$as_me:5666: checking for $ac_word" >&5
5667 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5668 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5669   echo $ECHO_N "(cached) $ECHO_C" >&6
5670 else
5671   if test -n "$ac_ct_LIBTOOL"; then
5672   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5673 else
5674   ac_save_IFS=$IFS; IFS=$ac_path_separator
5675 ac_dummy="$PATH"
5676 for ac_dir in $ac_dummy; do
5677   IFS=$ac_save_IFS
5678   test -z "$ac_dir" && ac_dir=.
5679   $as_executable_p "$ac_dir/$ac_word" || continue
5680 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5681 echo "$as_me:5681: found $ac_dir/$ac_word" >&5
5682 break
5683 done
5684
5685 fi
5686 fi
5687 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5688 if test -n "$ac_ct_LIBTOOL"; then
5689   echo "$as_me:5689: result: $ac_ct_LIBTOOL" >&5
5690 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5691 else
5692   echo "$as_me:5692: result: no" >&5
5693 echo "${ECHO_T}no" >&6
5694 fi
5695
5696   test -n "$ac_ct_LIBTOOL" && break
5697 done
5698 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5699
5700   LIBTOOL=$ac_ct_LIBTOOL
5701 fi
5702
5703 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5704 then
5705         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5706 else
5707         cf_cv_libtool_version=
5708 fi
5709 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5710
5711                 fi
5712         fi
5713         if test -z "$LIBTOOL" ; then
5714                 { { echo "$as_me:5714: error: Cannot find libtool" >&5
5715 echo "$as_me: error: Cannot find libtool" >&2;}
5716    { (exit 1); exit 1; }; }
5717         fi
5718         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5719         LIB_OBJECT='${OBJECTS:.o=.lo}'
5720         LIB_SUFFIX=.la
5721         LIB_CLEAN='${LIBTOOL} --mode=clean'
5722         LIB_COMPILE='${LIBTOOL} --mode=compile'
5723         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5724         LIB_INSTALL='${LIBTOOL} --mode=install'
5725         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5726         LIB_PREP=:
5727
5728 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5729 then
5730         echo "$as_me:5730: checking version of $LIBTOOL" >&5
5731 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5732
5733 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5734 then
5735         cf_cv_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' |sed -e '2,$d' -e 's/([^)]*)//g' -e 's/^[^1-9]*//' -e 's/[^0-9.].*//'`
5736 else
5737         cf_cv_libtool_version=
5738 fi
5739 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5740
5741         echo "$as_me:5741: result: $cf_cv_libtool_version" >&5
5742 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5743         if test -n "$cf_cv_libtool_version"
5744         then
5745                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5746                 case "x$cf_check_libtool_version" in
5747                 (*...GNU-libtool...*)
5748                         ;;
5749                 (*)
5750                         { { echo "$as_me:5750: error: This is not GNU libtool" >&5
5751 echo "$as_me: error: This is not GNU libtool" >&2;}
5752    { (exit 1); exit 1; }; }
5753                         ;;
5754                 esac
5755         else
5756                 { { echo "$as_me:5756: error: No version found for $LIBTOOL" >&5
5757 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5758    { (exit 1); exit 1; }; }
5759         fi
5760 else
5761         { { echo "$as_me:5761: error: GNU libtool has not been found" >&5
5762 echo "$as_me: error: GNU libtool has not been found" >&2;}
5763    { (exit 1); exit 1; }; }
5764 fi
5765
5766         # special hack to add -no-undefined (which libtool should do for itself)
5767         LT_UNDEF=
5768         case "$cf_cv_system_name" in
5769         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5770                 LT_UNDEF=-no-undefined
5771                 ;;
5772         esac
5773
5774         # special hack to add --tag option for C++ compiler
5775         case "$cf_cv_libtool_version" in
5776         (1.[5-9]*|[2-9].[0-9.a-z]*)
5777                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5778                 LIBTOOL="$LIBTOOL --tag=CC"
5779                 ;;
5780         (*)
5781                 LIBTOOL_CXX="$LIBTOOL"
5782                 ;;
5783         esac
5784 else
5785         LIBTOOL=""
5786         LIBTOOL_CXX=""
5787 fi
5788
5789 test -z "$LIBTOOL" && ECHO_LT=
5790
5791 if test "$with_libtool" != "no" ; then
5792
5793 cf_list_models="$cf_list_models libtool"
5794
5795 else
5796
5797 echo "$as_me:5797: checking if you want to build shared libraries" >&5
5798 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5799
5800 # Check whether --with-shared or --without-shared was given.
5801 if test "${with_shared+set}" = set; then
5802   withval="$with_shared"
5803   with_shared=$withval
5804 else
5805   with_shared=no
5806 fi;
5807 echo "$as_me:5807: result: $with_shared" >&5
5808 echo "${ECHO_T}$with_shared" >&6
5809 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5810
5811 echo "$as_me:5811: checking if you want to build static libraries" >&5
5812 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5813
5814 # Check whether --with-normal or --without-normal was given.
5815 if test "${with_normal+set}" = set; then
5816   withval="$with_normal"
5817   with_normal=$withval
5818 else
5819   with_normal=yes
5820 fi;
5821 echo "$as_me:5821: result: $with_normal" >&5
5822 echo "${ECHO_T}$with_normal" >&6
5823 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5824
5825 echo "$as_me:5825: checking if you want to build debug libraries" >&5
5826 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5827
5828 # Check whether --with-debug or --without-debug was given.
5829 if test "${with_debug+set}" = set; then
5830   withval="$with_debug"
5831   with_debug=$withval
5832 else
5833   with_debug=yes
5834 fi;
5835 echo "$as_me:5835: result: $with_debug" >&5
5836 echo "${ECHO_T}$with_debug" >&6
5837 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5838
5839 echo "$as_me:5839: checking if you want to build profiling libraries" >&5
5840 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5841
5842 # Check whether --with-profile or --without-profile was given.
5843 if test "${with_profile+set}" = set; then
5844   withval="$with_profile"
5845   with_profile=$withval
5846 else
5847   with_profile=no
5848 fi;
5849 echo "$as_me:5849: result: $with_profile" >&5
5850 echo "${ECHO_T}$with_profile" >&6
5851 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5852
5853 fi
5854
5855 if test "X$cf_with_cxx_binding" != Xno; then
5856 if test "x$with_shared" = "xyes"; then
5857 echo "$as_me:5857: checking if you want to build C++ shared libraries" >&5
5858 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5859
5860 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5861 if test "${with_cxx_shared+set}" = set; then
5862   withval="$with_cxx_shared"
5863   with_shared_cxx=$withval
5864 else
5865   with_shared_cxx=no
5866 fi;
5867 echo "$as_me:5867: result: $with_shared_cxx" >&5
5868 echo "${ECHO_T}$with_shared_cxx" >&6
5869 fi
5870 fi
5871
5872 ###############################################################################
5873
5874 echo "$as_me:5874: checking for specified models" >&5
5875 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5876 test -z "$cf_list_models" && cf_list_models=normal
5877 test "$with_libtool" != "no" && cf_list_models=libtool
5878 echo "$as_me:5878: result: $cf_list_models" >&5
5879 echo "${ECHO_T}$cf_list_models" >&6
5880
5881 ### Use the first model as the default, and save its suffix for use in building
5882 ### up test-applications.
5883 echo "$as_me:5883: checking for default model" >&5
5884 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5885 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5886 echo "$as_me:5886: result: $DFT_LWR_MODEL" >&5
5887 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5888
5889 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5890
5891 TICS_NAME=tic
5892
5893 TINFO_NAME=tinfo
5894
5895 LIB_NAME=ncurses
5896
5897 LIB_DIR=../lib
5898 LIB_2ND=../../lib
5899
5900 echo "$as_me:5900: checking if you want to have a library-prefix" >&5
5901 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5902
5903 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5904 if test "${with_lib_prefix+set}" = set; then
5905   withval="$with_lib_prefix"
5906   with_lib_prefix=$withval
5907 else
5908   with_lib_prefix=auto
5909 fi;
5910 echo "$as_me:5910: result: $with_lib_prefix" >&5
5911 echo "${ECHO_T}$with_lib_prefix" >&6
5912
5913 if test "$with_lib_prefix" = auto
5914 then
5915
5916         case "$cf_cv_system_name" in
5917         (OS/2*|os2*)
5918                 if test "$DFT_LWR_MODEL" = libtool; then
5919                         LIB_PREFIX='lib'
5920                 else
5921                         LIB_PREFIX=''
5922                 fi
5923                 ;;
5924         (*-msvc*)
5925                 LIB_PREFIX=''
5926                 ;;
5927         (*)     LIB_PREFIX='lib'
5928                 ;;
5929         esac
5930 cf_prefix=$LIB_PREFIX
5931
5932 elif test "$with_lib_prefix" = no
5933 then
5934         LIB_PREFIX=
5935 else
5936         LIB_PREFIX=$with_lib_prefix
5937 fi
5938
5939 LIB_SUFFIX=
5940
5941         echo "$as_me:5941: checking for PATH separator" >&5
5942 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5943         case "$cf_cv_system_name" in
5944         (os2*)  PATH_SEPARATOR=';'  ;;
5945         (*)     ${PATH_SEPARATOR:=':'}  ;;
5946         esac
5947
5948         echo "$as_me:5948: result: $PATH_SEPARATOR" >&5
5949 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5950
5951 # headers needed for checks...
5952 echo "$as_me:5952: checking for ANSI C header files" >&5
5953 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5954 if test "${ac_cv_header_stdc+set}" = set; then
5955   echo $ECHO_N "(cached) $ECHO_C" >&6
5956 else
5957   cat >"conftest.$ac_ext" <<_ACEOF
5958 #line 5958 "configure"
5959 #include "confdefs.h"
5960 #include <stdlib.h>
5961 #include <stdarg.h>
5962 #include <string.h>
5963 #include <float.h>
5964
5965 _ACEOF
5966 if { (eval echo "$as_me:5966: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5967   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5968   ac_status=$?
5969   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5970   rm -f conftest.er1
5971   cat conftest.err >&5
5972   echo "$as_me:5972: \$? = $ac_status" >&5
5973   (exit "$ac_status"); } >/dev/null; then
5974   if test -s conftest.err; then
5975     ac_cpp_err=$ac_c_preproc_warn_flag
5976   else
5977     ac_cpp_err=
5978   fi
5979 else
5980   ac_cpp_err=yes
5981 fi
5982 if test -z "$ac_cpp_err"; then
5983   ac_cv_header_stdc=yes
5984 else
5985   echo "$as_me: failed program was:" >&5
5986   cat "conftest.$ac_ext" >&5
5987   ac_cv_header_stdc=no
5988 fi
5989 rm -f conftest.err "conftest.$ac_ext"
5990
5991 if test $ac_cv_header_stdc = yes; then
5992   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5993   cat >"conftest.$ac_ext" <<_ACEOF
5994 #line 5994 "configure"
5995 #include "confdefs.h"
5996 #include <string.h>
5997
5998 _ACEOF
5999 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6000   $EGREP "memchr" >/dev/null 2>&1; then
6001   :
6002 else
6003   ac_cv_header_stdc=no
6004 fi
6005 rm -rf conftest*
6006
6007 fi
6008
6009 if test $ac_cv_header_stdc = yes; then
6010   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6011   cat >"conftest.$ac_ext" <<_ACEOF
6012 #line 6012 "configure"
6013 #include "confdefs.h"
6014 #include <stdlib.h>
6015
6016 _ACEOF
6017 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6018   $EGREP "free" >/dev/null 2>&1; then
6019   :
6020 else
6021   ac_cv_header_stdc=no
6022 fi
6023 rm -rf conftest*
6024
6025 fi
6026
6027 if test $ac_cv_header_stdc = yes; then
6028   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6029   if test "$cross_compiling" = yes; then
6030   :
6031 else
6032   cat >"conftest.$ac_ext" <<_ACEOF
6033 #line 6033 "configure"
6034 #include "confdefs.h"
6035 #include <ctype.h>
6036 #if ((' ' & 0x0FF) == 0x020)
6037 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6038 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6039 #else
6040 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6041                      || ('j' <= (c) && (c) <= 'r') \
6042                      || ('s' <= (c) && (c) <= 'z'))
6043 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6044 #endif
6045
6046 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6047 int
6048 main (void)
6049 {
6050   int i;
6051   for (i = 0; i < 256; i++)
6052     if (XOR (islower (i), ISLOWER (i))
6053         || toupper (i) != TOUPPER (i))
6054       $ac_main_return(2);
6055   $ac_main_return (0);
6056 }
6057 _ACEOF
6058 rm -f "conftest$ac_exeext"
6059 if { (eval echo "$as_me:6059: \"$ac_link\"") >&5
6060   (eval $ac_link) 2>&5
6061   ac_status=$?
6062   echo "$as_me:6062: \$? = $ac_status" >&5
6063   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6064   { (eval echo "$as_me:6064: \"$ac_try\"") >&5
6065   (eval $ac_try) 2>&5
6066   ac_status=$?
6067   echo "$as_me:6067: \$? = $ac_status" >&5
6068   (exit "$ac_status"); }; }; then
6069   :
6070 else
6071   echo "$as_me: program exited with status $ac_status" >&5
6072 echo "$as_me: failed program was:" >&5
6073 cat "conftest.$ac_ext" >&5
6074 ac_cv_header_stdc=no
6075 fi
6076 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6077 fi
6078 fi
6079 fi
6080 echo "$as_me:6080: result: $ac_cv_header_stdc" >&5
6081 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6082 if test $ac_cv_header_stdc = yes; then
6083
6084 cat >>confdefs.h <<\EOF
6085 #define STDC_HEADERS 1
6086 EOF
6087
6088 fi
6089
6090 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6091
6092 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6093                   inttypes.h stdint.h unistd.h
6094 do
6095 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6096 echo "$as_me:6096: checking for $ac_header" >&5
6097 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6098 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6099   echo $ECHO_N "(cached) $ECHO_C" >&6
6100 else
6101   cat >"conftest.$ac_ext" <<_ACEOF
6102 #line 6102 "configure"
6103 #include "confdefs.h"
6104 $ac_includes_default
6105 #include <$ac_header>
6106 _ACEOF
6107 rm -f "conftest.$ac_objext"
6108 if { (eval echo "$as_me:6108: \"$ac_compile\"") >&5
6109   (eval $ac_compile) 2>&5
6110   ac_status=$?
6111   echo "$as_me:6111: \$? = $ac_status" >&5
6112   (exit "$ac_status"); } &&
6113          { ac_try='test -s "conftest.$ac_objext"'
6114   { (eval echo "$as_me:6114: \"$ac_try\"") >&5
6115   (eval $ac_try) 2>&5
6116   ac_status=$?
6117   echo "$as_me:6117: \$? = $ac_status" >&5
6118   (exit "$ac_status"); }; }; then
6119   eval "$as_ac_Header=yes"
6120 else
6121   echo "$as_me: failed program was:" >&5
6122 cat "conftest.$ac_ext" >&5
6123 eval "$as_ac_Header=no"
6124 fi
6125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6126 fi
6127 echo "$as_me:6127: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6128 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6129 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6130   cat >>confdefs.h <<EOF
6131 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6132 EOF
6133
6134 fi
6135 done
6136
6137 echo "$as_me:6137: checking whether exit is declared" >&5
6138 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6139 if test "${ac_cv_have_decl_exit+set}" = set; then
6140   echo $ECHO_N "(cached) $ECHO_C" >&6
6141 else
6142   cat >"conftest.$ac_ext" <<_ACEOF
6143 #line 6143 "configure"
6144 #include "confdefs.h"
6145 $ac_includes_default
6146 int
6147 main (void)
6148 {
6149 #ifndef exit
6150   char *p = (char *) exit; (void) p;
6151 #endif
6152
6153   ;
6154   return 0;
6155 }
6156 _ACEOF
6157 rm -f "conftest.$ac_objext"
6158 if { (eval echo "$as_me:6158: \"$ac_compile\"") >&5
6159   (eval $ac_compile) 2>&5
6160   ac_status=$?
6161   echo "$as_me:6161: \$? = $ac_status" >&5
6162   (exit "$ac_status"); } &&
6163          { ac_try='test -s "conftest.$ac_objext"'
6164   { (eval echo "$as_me:6164: \"$ac_try\"") >&5
6165   (eval $ac_try) 2>&5
6166   ac_status=$?
6167   echo "$as_me:6167: \$? = $ac_status" >&5
6168   (exit "$ac_status"); }; }; then
6169   ac_cv_have_decl_exit=yes
6170 else
6171   echo "$as_me: failed program was:" >&5
6172 cat "conftest.$ac_ext" >&5
6173 ac_cv_have_decl_exit=no
6174 fi
6175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6176 fi
6177 echo "$as_me:6177: result: $ac_cv_have_decl_exit" >&5
6178 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6179
6180 ac_header_dirent=no
6181 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6182   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6183 echo "$as_me:6183: checking for $ac_hdr that defines DIR" >&5
6184 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6185 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6186   echo $ECHO_N "(cached) $ECHO_C" >&6
6187 else
6188   cat >"conftest.$ac_ext" <<_ACEOF
6189 #line 6189 "configure"
6190 #include "confdefs.h"
6191 #include <sys/types.h>
6192 #include <$ac_hdr>
6193
6194 int
6195 main (void)
6196 {
6197 if ((DIR *) 0)
6198 return 0;
6199   ;
6200   return 0;
6201 }
6202 _ACEOF
6203 rm -f "conftest.$ac_objext"
6204 if { (eval echo "$as_me:6204: \"$ac_compile\"") >&5
6205   (eval $ac_compile) 2>&5
6206   ac_status=$?
6207   echo "$as_me:6207: \$? = $ac_status" >&5
6208   (exit "$ac_status"); } &&
6209          { ac_try='test -s "conftest.$ac_objext"'
6210   { (eval echo "$as_me:6210: \"$ac_try\"") >&5
6211   (eval $ac_try) 2>&5
6212   ac_status=$?
6213   echo "$as_me:6213: \$? = $ac_status" >&5
6214   (exit "$ac_status"); }; }; then
6215   eval "$as_ac_Header=yes"
6216 else
6217   echo "$as_me: failed program was:" >&5
6218 cat "conftest.$ac_ext" >&5
6219 eval "$as_ac_Header=no"
6220 fi
6221 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6222 fi
6223 echo "$as_me:6223: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6224 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6225 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6226   cat >>confdefs.h <<EOF
6227 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6228 EOF
6229
6230 ac_header_dirent=$ac_hdr; break
6231 fi
6232
6233 done
6234 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6235 if test $ac_header_dirent = dirent.h; then
6236   echo "$as_me:6236: checking for opendir in -ldir" >&5
6237 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6238 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6239   echo $ECHO_N "(cached) $ECHO_C" >&6
6240 else
6241   ac_check_lib_save_LIBS=$LIBS
6242 LIBS="-ldir  $LIBS"
6243 cat >"conftest.$ac_ext" <<_ACEOF
6244 #line 6244 "configure"
6245 #include "confdefs.h"
6246
6247 /* Override any gcc2 internal prototype to avoid an error.  */
6248 #ifdef __cplusplus
6249 extern "C"
6250 #endif
6251 /* We use char because int might match the return type of a gcc2
6252    builtin and then its argument prototype would still apply.  */
6253 char opendir ();
6254 int
6255 main (void)
6256 {
6257 opendir ();
6258   ;
6259   return 0;
6260 }
6261 _ACEOF
6262 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6263 if { (eval echo "$as_me:6263: \"$ac_link\"") >&5
6264   (eval $ac_link) 2>&5
6265   ac_status=$?
6266   echo "$as_me:6266: \$? = $ac_status" >&5
6267   (exit "$ac_status"); } &&
6268          { ac_try='test -s "conftest$ac_exeext"'
6269   { (eval echo "$as_me:6269: \"$ac_try\"") >&5
6270   (eval $ac_try) 2>&5
6271   ac_status=$?
6272   echo "$as_me:6272: \$? = $ac_status" >&5
6273   (exit "$ac_status"); }; }; then
6274   ac_cv_lib_dir_opendir=yes
6275 else
6276   echo "$as_me: failed program was:" >&5
6277 cat "conftest.$ac_ext" >&5
6278 ac_cv_lib_dir_opendir=no
6279 fi
6280 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6281 LIBS=$ac_check_lib_save_LIBS
6282 fi
6283 echo "$as_me:6283: result: $ac_cv_lib_dir_opendir" >&5
6284 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6285 if test "$ac_cv_lib_dir_opendir" = yes; then
6286   LIBS="$LIBS -ldir"
6287 fi
6288
6289 else
6290   echo "$as_me:6290: checking for opendir in -lx" >&5
6291 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6292 if test "${ac_cv_lib_x_opendir+set}" = set; then
6293   echo $ECHO_N "(cached) $ECHO_C" >&6
6294 else
6295   ac_check_lib_save_LIBS=$LIBS
6296 LIBS="-lx  $LIBS"
6297 cat >"conftest.$ac_ext" <<_ACEOF
6298 #line 6298 "configure"
6299 #include "confdefs.h"
6300
6301 /* Override any gcc2 internal prototype to avoid an error.  */
6302 #ifdef __cplusplus
6303 extern "C"
6304 #endif
6305 /* We use char because int might match the return type of a gcc2
6306    builtin and then its argument prototype would still apply.  */
6307 char opendir ();
6308 int
6309 main (void)
6310 {
6311 opendir ();
6312   ;
6313   return 0;
6314 }
6315 _ACEOF
6316 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6317 if { (eval echo "$as_me:6317: \"$ac_link\"") >&5
6318   (eval $ac_link) 2>&5
6319   ac_status=$?
6320   echo "$as_me:6320: \$? = $ac_status" >&5
6321   (exit "$ac_status"); } &&
6322          { ac_try='test -s "conftest$ac_exeext"'
6323   { (eval echo "$as_me:6323: \"$ac_try\"") >&5
6324   (eval $ac_try) 2>&5
6325   ac_status=$?
6326   echo "$as_me:6326: \$? = $ac_status" >&5
6327   (exit "$ac_status"); }; }; then
6328   ac_cv_lib_x_opendir=yes
6329 else
6330   echo "$as_me: failed program was:" >&5
6331 cat "conftest.$ac_ext" >&5
6332 ac_cv_lib_x_opendir=no
6333 fi
6334 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6335 LIBS=$ac_check_lib_save_LIBS
6336 fi
6337 echo "$as_me:6337: result: $ac_cv_lib_x_opendir" >&5
6338 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6339 if test "$ac_cv_lib_x_opendir" = yes; then
6340   LIBS="$LIBS -lx"
6341 fi
6342
6343 fi
6344
6345 ###############################################################################
6346
6347 echo "$as_me:6347: checking if you want to build a separate terminfo library" >&5
6348 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6349
6350 # Check whether --with-termlib or --without-termlib was given.
6351 if test "${with_termlib+set}" = set; then
6352   withval="$with_termlib"
6353   with_termlib=$withval
6354 else
6355   with_termlib=no
6356 fi;
6357 echo "$as_me:6357: result: $with_termlib" >&5
6358 echo "${ECHO_T}$with_termlib" >&6
6359
6360 echo "$as_me:6360: checking if you want to build a separate tic library" >&5
6361 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6362
6363 # Check whether --with-ticlib or --without-ticlib was given.
6364 if test "${with_ticlib+set}" = set; then
6365   withval="$with_ticlib"
6366   with_ticlib=$withval
6367 else
6368   with_ticlib=no
6369 fi;
6370 echo "$as_me:6370: result: $with_ticlib" >&5
6371 echo "${ECHO_T}$with_ticlib" >&6
6372
6373 if test X"$CC_G_OPT" = X"" ; then
6374         CC_G_OPT='-g'
6375         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6376 fi
6377
6378 if test X"$CXX_G_OPT" = X"" ; then
6379         CXX_G_OPT='-g'
6380         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6381 fi
6382
6383 echo "$as_me:6383: checking for default loader flags" >&5
6384 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6385 case "$DFT_LWR_MODEL" in
6386 (libtool) LD_MODEL=''   ;;
6387 (normal)  LD_MODEL=''   ;;
6388 (debug)   LD_MODEL=$CC_G_OPT ;;
6389 (profile) LD_MODEL='-pg';;
6390 (shared)  LD_MODEL=''   ;;
6391 esac
6392 echo "$as_me:6392: result: $LD_MODEL" >&5
6393 echo "${ECHO_T}$LD_MODEL" >&6
6394
6395 case "$DFT_LWR_MODEL" in
6396 (shared)
6397
6398 echo "$as_me:6398: checking if rpath option should be used" >&5
6399 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6400
6401 # Check whether --enable-rpath or --disable-rpath was given.
6402 if test "${enable_rpath+set}" = set; then
6403   enableval="$enable_rpath"
6404   cf_cv_enable_rpath=$enableval
6405 else
6406   cf_cv_enable_rpath=no
6407 fi;
6408 echo "$as_me:6408: result: $cf_cv_enable_rpath" >&5
6409 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6410
6411 echo "$as_me:6411: checking if shared libraries should be relinked during install" >&5
6412 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6413
6414 # Check whether --enable-relink or --disable-relink was given.
6415 if test "${enable_relink+set}" = set; then
6416   enableval="$enable_relink"
6417   cf_cv_do_relink=$enableval
6418 else
6419   cf_cv_do_relink=yes
6420 fi;
6421 echo "$as_me:6421: result: $cf_cv_do_relink" >&5
6422 echo "${ECHO_T}$cf_cv_do_relink" >&6
6423         ;;
6424 esac
6425
6426 # we will build libraries one-level down.
6427 rel_builddir=..
6428
6429 LD_RPATH_OPT=
6430 if test "x$cf_cv_enable_rpath" != xno
6431 then
6432         echo "$as_me:6432: checking for an rpath option" >&5
6433 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6434         case "$cf_cv_system_name" in
6435         (irix*)
6436                 if test "$GCC" = yes; then
6437                         LD_RPATH_OPT="-Wl,-rpath,"
6438                 else
6439                         LD_RPATH_OPT="-rpath "
6440                 fi
6441                 ;;
6442         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6443                 LD_RPATH_OPT="-Wl,-rpath,"
6444                 ;;
6445         (openbsd[2-9].*|mirbsd*)
6446                 LD_RPATH_OPT="-Wl,-rpath,"
6447                 ;;
6448         (dragonfly*)
6449                 LD_RPATH_OPT="-rpath "
6450                 ;;
6451         (netbsd*)
6452                 LD_RPATH_OPT="-Wl,-rpath,"
6453                 ;;
6454         (osf*|mls+*)
6455                 LD_RPATH_OPT="-rpath "
6456                 ;;
6457         (solaris2*)
6458                 LD_RPATH_OPT="-R"
6459                 ;;
6460         (*)
6461                 ;;
6462         esac
6463         echo "$as_me:6463: result: $LD_RPATH_OPT" >&5
6464 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6465
6466         case "x$LD_RPATH_OPT" in
6467         (x-R*)
6468                 echo "$as_me:6468: checking if we need a space after rpath option" >&5
6469 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6470                 cf_save_LIBS="$LIBS"
6471
6472 cf_add_libs="$LIBS"
6473 # reverse order
6474 cf_add_0lib=
6475 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6476 # filter duplicates
6477 for cf_add_1lib in $cf_add_0lib; do
6478         for cf_add_2lib in $cf_add_libs; do
6479                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6480                         cf_add_1lib=
6481                         break
6482                 fi
6483         done
6484         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6485 done
6486 LIBS="$cf_add_libs"
6487
6488                 cat >"conftest.$ac_ext" <<_ACEOF
6489 #line 6489 "configure"
6490 #include "confdefs.h"
6491
6492 int
6493 main (void)
6494 {
6495
6496   ;
6497   return 0;
6498 }
6499 _ACEOF
6500 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6501 if { (eval echo "$as_me:6501: \"$ac_link\"") >&5
6502   (eval $ac_link) 2>&5
6503   ac_status=$?
6504   echo "$as_me:6504: \$? = $ac_status" >&5
6505   (exit "$ac_status"); } &&
6506          { ac_try='test -s "conftest$ac_exeext"'
6507   { (eval echo "$as_me:6507: \"$ac_try\"") >&5
6508   (eval $ac_try) 2>&5
6509   ac_status=$?
6510   echo "$as_me:6510: \$? = $ac_status" >&5
6511   (exit "$ac_status"); }; }; then
6512   cf_rpath_space=no
6513 else
6514   echo "$as_me: failed program was:" >&5
6515 cat "conftest.$ac_ext" >&5
6516 cf_rpath_space=yes
6517 fi
6518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6519                 LIBS="$cf_save_LIBS"
6520                 echo "$as_me:6520: result: $cf_rpath_space" >&5
6521 echo "${ECHO_T}$cf_rpath_space" >&6
6522                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6523                 ;;
6524         esac
6525 fi
6526
6527         RM_SHARED_OPTS=
6528         LOCAL_LDFLAGS=
6529         LOCAL_LDFLAGS2=
6530         LD_SHARED_OPTS=
6531         INSTALL_LIB="-m 644"
6532         : ${rel_builddir:=.}
6533
6534         shlibdir=$libdir
6535
6536         MAKE_DLLS="#"
6537
6538         cf_cv_do_symlinks=no
6539         cf_ld_rpath_opt=
6540         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6541
6542         echo "$as_me:6542: checking if release/abi version should be used for shared libs" >&5
6543 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6544
6545 # Check whether --with-shlib-version or --without-shlib-version was given.
6546 if test "${with_shlib_version+set}" = set; then
6547   withval="$with_shlib_version"
6548   test -z "$withval" && withval=auto
6549         case "$withval" in
6550         (yes)
6551                 cf_cv_shlib_version=auto
6552                 ;;
6553         (rel|abi|auto)
6554                 cf_cv_shlib_version=$withval
6555                 ;;
6556         (*)
6557                 echo "$as_me:6557: result: $withval" >&5
6558 echo "${ECHO_T}$withval" >&6
6559                 { { echo "$as_me:6559: error: option value must be one of: rel, abi, or auto" >&5
6560 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6561    { (exit 1); exit 1; }; }
6562                 ;;
6563         esac
6564
6565 else
6566   cf_cv_shlib_version=auto
6567 fi;
6568         echo "$as_me:6568: result: $cf_cv_shlib_version" >&5
6569 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6570
6571         cf_cv_rm_so_locs=no
6572         cf_try_cflags=
6573
6574         # Some less-capable ports of gcc support only -fpic
6575         CC_SHARED_OPTS=
6576
6577         cf_try_fPIC=no
6578         if test "$GCC" = yes
6579         then
6580                 cf_try_fPIC=yes
6581         else
6582                 case "$cf_cv_system_name" in
6583                 (*linux*)       # e.g., PGI compiler
6584                         cf_try_fPIC=yes
6585                         ;;
6586                 esac
6587         fi
6588
6589         if test "$cf_try_fPIC" = yes
6590         then
6591                 echo "$as_me:6591: checking which $CC option to use" >&5
6592 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6593                 cf_save_CFLAGS="$CFLAGS"
6594                 for CC_SHARED_OPTS in -fPIC -fpic ''
6595                 do
6596                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6597                         cat >"conftest.$ac_ext" <<_ACEOF
6598 #line 6598 "configure"
6599 #include "confdefs.h"
6600 #include <stdio.h>
6601 int
6602 main (void)
6603 {
6604 int x = 1
6605   ;
6606   return 0;
6607 }
6608 _ACEOF
6609 rm -f "conftest.$ac_objext"
6610 if { (eval echo "$as_me:6610: \"$ac_compile\"") >&5
6611   (eval $ac_compile) 2>&5
6612   ac_status=$?
6613   echo "$as_me:6613: \$? = $ac_status" >&5
6614   (exit "$ac_status"); } &&
6615          { ac_try='test -s "conftest.$ac_objext"'
6616   { (eval echo "$as_me:6616: \"$ac_try\"") >&5
6617   (eval $ac_try) 2>&5
6618   ac_status=$?
6619   echo "$as_me:6619: \$? = $ac_status" >&5
6620   (exit "$ac_status"); }; }; then
6621   break
6622 else
6623   echo "$as_me: failed program was:" >&5
6624 cat "conftest.$ac_ext" >&5
6625 fi
6626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6627                 done
6628                 echo "$as_me:6628: result: $CC_SHARED_OPTS" >&5
6629 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6630                 CFLAGS="$cf_save_CFLAGS"
6631         fi
6632
6633         cf_cv_shlib_version_infix=no
6634
6635         case "$cf_cv_system_name" in
6636         (aix4.3-9*|aix[5-7]*)
6637                 if test "$GCC" = yes; then
6638                         CC_SHARED_OPTS='-Wl,-brtl'
6639                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6640                 else
6641                         CC_SHARED_OPTS='-brtl'
6642                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6643                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6644                 fi
6645                 ;;
6646         (beos*)
6647                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6648                 ;;
6649         (cygwin*)
6650                 CC_SHARED_OPTS=
6651                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6652                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6653                 cf_cv_shlib_version=cygdll
6654                 cf_cv_shlib_version_infix=cygdll
6655                 shlibdir=$bindir
6656                 MAKE_DLLS=
6657                 cat >mk_shared_lib.sh <<-CF_EOF
6658                 #!$SHELL
6659                 SHARED_LIB=\$1
6660                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6661                 shift
6662                 cat <<-EOF
6663                 Linking shared library
6664                 ** SHARED_LIB \$SHARED_LIB
6665                 ** IMPORT_LIB \$IMPORT_LIB
6666 EOF
6667                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6668 CF_EOF
6669                 chmod +x mk_shared_lib.sh
6670                 ;;
6671         (msys*)
6672                 CC_SHARED_OPTS=
6673                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6674                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6675                 cf_cv_shlib_version=msysdll
6676                 cf_cv_shlib_version_infix=msysdll
6677                 shlibdir=$bindir
6678                 MAKE_DLLS=
6679                 cat >mk_shared_lib.sh <<-CF_EOF
6680                 #!$SHELL
6681                 SHARED_LIB=\$1
6682                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6683                 shift
6684                 cat <<-EOF
6685                 Linking shared library
6686                 ** SHARED_LIB \$SHARED_LIB
6687                 ** IMPORT_LIB \$IMPORT_LIB
6688 EOF
6689                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6690 CF_EOF
6691                 chmod +x mk_shared_lib.sh
6692                 ;;
6693         (darwin*)
6694                 cf_try_cflags="no-cpp-precomp"
6695                 CC_SHARED_OPTS="-dynamic"
6696                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6697                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6698                 cf_cv_shlib_version_infix=yes
6699                 echo "$as_me:6699: checking if ld -search_paths_first works" >&5
6700 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6701 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6702   echo $ECHO_N "(cached) $ECHO_C" >&6
6703 else
6704
6705                         cf_save_LDFLAGS=$LDFLAGS
6706                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6707                         cat >"conftest.$ac_ext" <<_ACEOF
6708 #line 6708 "configure"
6709 #include "confdefs.h"
6710
6711 int
6712 main (void)
6713 {
6714 int i;
6715   ;
6716   return 0;
6717 }
6718 _ACEOF
6719 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6720 if { (eval echo "$as_me:6720: \"$ac_link\"") >&5
6721   (eval $ac_link) 2>&5
6722   ac_status=$?
6723   echo "$as_me:6723: \$? = $ac_status" >&5
6724   (exit "$ac_status"); } &&
6725          { ac_try='test -s "conftest$ac_exeext"'
6726   { (eval echo "$as_me:6726: \"$ac_try\"") >&5
6727   (eval $ac_try) 2>&5
6728   ac_status=$?
6729   echo "$as_me:6729: \$? = $ac_status" >&5
6730   (exit "$ac_status"); }; }; then
6731   cf_cv_ldflags_search_paths_first=yes
6732 else
6733   echo "$as_me: failed program was:" >&5
6734 cat "conftest.$ac_ext" >&5
6735 cf_cv_ldflags_search_paths_first=no
6736 fi
6737 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6738                                 LDFLAGS=$cf_save_LDFLAGS
6739 fi
6740 echo "$as_me:6740: result: $cf_cv_ldflags_search_paths_first" >&5
6741 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6742                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6743                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6744                 fi
6745                 ;;
6746         (haiku*)
6747
6748         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6749         if test "$cf_cv_shlib_version" = rel; then
6750                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6751         else
6752                 cf_cv_shared_soname='`basename $@`'
6753         fi
6754
6755                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6756                 ;;
6757         (hpux[7-8]*)
6758                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6759                 if test "$GCC" != yes; then
6760                         CC_SHARED_OPTS='+Z'
6761                 fi
6762                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6763                 INSTALL_LIB="-m 555"
6764                 ;;
6765         (hpux*)
6766                 # (tested with gcc 2.7.2 -- I don't have c89)
6767                 if test "$GCC" = yes; then
6768                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6769                 else
6770                         CC_SHARED_OPTS='+Z'
6771                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6772                 fi
6773                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6774                 # HP-UX shared libraries must be executable, and should be
6775                 # readonly to exploit a quirk in the memory manager.
6776                 INSTALL_LIB="-m 555"
6777                 ;;
6778         (interix*)
6779                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6780                 if test "$cf_cv_shlib_version" = rel; then
6781                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6782                 else
6783                         cf_shared_soname='`basename $@`'
6784                 fi
6785                 CC_SHARED_OPTS=
6786                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6787                 ;;
6788         (irix*)
6789                 if test "$cf_cv_enable_rpath" = yes ; then
6790                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6791                 fi
6792                 # tested with IRIX 5.2 and 'cc'.
6793                 if test "$GCC" != yes; then
6794                         CC_SHARED_OPTS='-KPIC'
6795                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6796                 else
6797                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6798                 fi
6799                 cf_cv_rm_so_locs=yes
6800                 ;;
6801         (linux*|gnu*|k*bsd*-gnu)
6802                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6803                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6804                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6805                 fi
6806                 if test "$cf_cv_enable_rpath" = yes ; then
6807                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6808                 fi
6809
6810         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6811         if test "$cf_cv_shlib_version" = rel; then
6812                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6813         else
6814                 cf_cv_shared_soname='`basename $@`'
6815         fi
6816
6817                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6818                 ;;
6819         (mingw*msvc*)
6820                 cf_cv_shlib_version=msvcdll
6821                 cf_cv_shlib_version_infix=msvcdll
6822                 shlibdir=$bindir
6823                 MAKE_DLLS=
6824                 if test "$DFT_LWR_MODEL" = "shared" ; then
6825                         LOCAL_LDFLAGS="-link -dll"
6826                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6827                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6828                 fi
6829                 CC_SHARED_OPTS=
6830                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6831                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6832                 cat >mk_shared_lib.sh <<-CF_EOF
6833                 #!$SHELL
6834                 SHARED_LIB=\$1
6835                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6836                 shift
6837                 my_ld=\$1
6838                 shift
6839                 cat <<-EOF
6840                 Linking shared library
6841                 ** SHARED LIB \$SHARED_LIB
6842                 ** IMPORT_LIB \$IMPORT_LIB
6843 EOF
6844                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6845                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6846                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6847 CF_EOF
6848                 chmod +x mk_shared_lib.sh
6849                 cat >mk_prog.sh <<-CF_EOF
6850                 #!$SHELL
6851                 shift
6852                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6853                 LD="$LD"
6854                 clopts=()
6855                 ldopts=("/subsystem:console")
6856                 libs=()
6857                 isdll=0
6858                 while test \$# -gt 0; do
6859                         case "\$1" in
6860                                 -link)
6861                                         # ignore -link argument
6862                                         ;;
6863                                 -M[TD] | -M[TD]d)
6864                                         # ignore runtime-library option
6865                                         ;;
6866                                 -dll)
6867                                         isdll=1
6868                                         ;;
6869                                 -W* | -w*)
6870                                         # ignore warnings
6871                                         ;;
6872                                 -D*)
6873                                         clopts+=("\$1")
6874                                         ;;
6875                                 -I*)
6876                                         clopts+=("\$1")
6877                                         ;;
6878                                 -l*)
6879                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6880                                         ;;
6881                                 -L*)
6882                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6883                                         ;;
6884                                 *.obj | *.o)
6885                                         ldopts+=("\$1")
6886                                         ;;
6887                                 -Wl,*)
6888                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6889                                                 ldopts+=("\${linkarg}")
6890                                         done
6891                                         ;;
6892                                 *.lib)
6893                                         ldopts+=("\$1")
6894                                         ;;
6895                                 -o)
6896                                         shift
6897                                         ldopts+=("-out:\$1")
6898                                         ;;
6899                                 *)
6900                                         clopts+=("\$1")
6901                                         ldopts+=("\$1")
6902                                         ;;
6903                         esac
6904                         shift
6905                 done
6906                 if [ "\$isdll" -ne 0 ]; then
6907                         for lib in \${libs[*]}; do
6908                                 ldopts+=("\$lib.dll.lib")
6909                         done
6910                 else
6911                         for lib in \${libs[*]}; do
6912                                 ldopts+=("\$lib.lib")
6913                         done
6914                 fi
6915                 cat <<-EOF
6916                 Creating program
6917                 ** ld options:   "\${ldopts[@]}"
6918 EOF
6919                 exec \$LD \${ldopts[@]}
6920 CF_EOF
6921                 chmod +x mk_prog.sh
6922                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6923                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6924                 ;;
6925         (mingw*)
6926                 cf_cv_shlib_version=mingw
6927                 cf_cv_shlib_version_infix=mingw
6928                 shlibdir=$bindir
6929                 MAKE_DLLS=
6930                 if test "$DFT_LWR_MODEL" = "shared" ; then
6931                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6932                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6933                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6934                 fi
6935                 CC_SHARED_OPTS=
6936                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6937                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6938                 cat >mk_shared_lib.sh <<-CF_EOF
6939                 #!$SHELL
6940                 SHARED_LIB=\$1
6941                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6942                 shift
6943                 cat <<-EOF
6944                 Linking shared library
6945                 ** SHARED_LIB \$SHARED_LIB
6946                 ** IMPORT_LIB \$IMPORT_LIB
6947 EOF
6948                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6949 CF_EOF
6950                 chmod +x mk_shared_lib.sh
6951                 ;;
6952         (openbsd[2-9].*|mirbsd*)
6953                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6954                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6955                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6956                 fi
6957                 if test "$cf_cv_enable_rpath" = yes ; then
6958                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6959                 fi
6960                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6961
6962         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6963         if test "$cf_cv_shlib_version" = rel; then
6964                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6965         else
6966                 cf_cv_shared_soname='`basename $@`'
6967         fi
6968
6969                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6970                 ;;
6971         (nskJ*)
6972                 CC_SHARED_OPTS=
6973                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6974                 ;;
6975         (nskL*)
6976                 CC_SHARED_OPTS=
6977                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6978                 ;;
6979         (nto-qnx*|openbsd*|freebsd[12].*)
6980                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6981                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6982                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6983                 ;;
6984         (dragonfly*|freebsd*)
6985                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6986                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6987                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6988                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6989                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6990                 fi
6991
6992         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6993         if test "$cf_cv_shlib_version" = rel; then
6994                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6995         else
6996                 cf_cv_shared_soname='`basename $@`'
6997         fi
6998
6999                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7000                 ;;
7001         (netbsd*)
7002                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7003                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7004                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7005                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7006                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7007                         if test "$cf_cv_shlib_version" = auto; then
7008                         if test -f /usr/libexec/ld.elf_so; then
7009                                 cf_cv_shlib_version=abi
7010                         else
7011                                 cf_cv_shlib_version=rel
7012                         fi
7013                         fi
7014
7015         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7016         if test "$cf_cv_shlib_version" = rel; then
7017                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7018         else
7019                 cf_cv_shared_soname='`basename $@`'
7020         fi
7021
7022                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7023                 else
7024                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7025                 fi
7026                 ;;
7027         (osf*|mls+*)
7028                 # tested with OSF/1 V3.2 and 'cc'
7029                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7030                 # link with shared libs).
7031                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7032                 case "$host_os" in
7033                 (osf4*)
7034                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7035                         ;;
7036                 esac
7037                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7038                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7039                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7040                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7041                 fi
7042                 cf_cv_rm_so_locs=yes
7043                 ;;
7044         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7045                 # tested with osr5.0.5
7046                 if test "$GCC" != yes; then
7047                         CC_SHARED_OPTS='-belf -KPIC'
7048                 fi
7049                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7050                 if test "$cf_cv_enable_rpath" = yes ; then
7051                         # only way is to set LD_RUN_PATH but no switch for it
7052                         RUN_PATH=$libdir
7053                 fi
7054                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7055                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7056                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7057                 ;;
7058         (sunos4*)
7059                 # tested with SunOS 4.1.1 and gcc 2.7.0
7060                 if test "$GCC" != yes; then
7061                         CC_SHARED_OPTS='-KPIC'
7062                 fi
7063                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7064                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7065                 ;;
7066         (solaris2*)
7067                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7068                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7069                 if test "$DFT_LWR_MODEL" = "shared" ; then
7070                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7071                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7072                 fi
7073                 if test "$cf_cv_enable_rpath" = yes ; then
7074                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7075                 fi
7076
7077         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7078         if test "$cf_cv_shlib_version" = rel; then
7079                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7080         else
7081                 cf_cv_shared_soname='`basename $@`'
7082         fi
7083
7084                 if test "$GCC" != yes; then
7085                         cf_save_CFLAGS="$CFLAGS"
7086                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7087                         do
7088                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7089                                 cat >"conftest.$ac_ext" <<_ACEOF
7090 #line 7090 "configure"
7091 #include "confdefs.h"
7092 #include <stdio.h>
7093 int
7094 main (void)
7095 {
7096 printf("Hello\\n");
7097   ;
7098   return 0;
7099 }
7100 _ACEOF
7101 rm -f "conftest.$ac_objext"
7102 if { (eval echo "$as_me:7102: \"$ac_compile\"") >&5
7103   (eval $ac_compile) 2>&5
7104   ac_status=$?
7105   echo "$as_me:7105: \$? = $ac_status" >&5
7106   (exit "$ac_status"); } &&
7107          { ac_try='test -s "conftest.$ac_objext"'
7108   { (eval echo "$as_me:7108: \"$ac_try\"") >&5
7109   (eval $ac_try) 2>&5
7110   ac_status=$?
7111   echo "$as_me:7111: \$? = $ac_status" >&5
7112   (exit "$ac_status"); }; }; then
7113   break
7114 else
7115   echo "$as_me: failed program was:" >&5
7116 cat "conftest.$ac_ext" >&5
7117 fi
7118 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7119                         done
7120                         CFLAGS="$cf_save_CFLAGS"
7121                         CC_SHARED_OPTS=$cf_shared_opts
7122                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7123                 else
7124                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7125                 fi
7126                 ;;
7127         (sysv5uw7*|unix_sv*)
7128                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7129                 if test "$GCC" != yes; then
7130                         CC_SHARED_OPTS='-KPIC'
7131                 fi
7132                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7133                 ;;
7134         (*)
7135                 CC_SHARED_OPTS='unknown'
7136                 MK_SHARED_LIB='echo unknown'
7137                 ;;
7138         esac
7139
7140         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7141         case "$cf_cv_shlib_version" in
7142         (rel|abi)
7143                 case "$MK_SHARED_LIB" in
7144                 (*'-o $@')
7145                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7146                         ;;
7147                 (*)
7148                         { echo "$as_me:7148: WARNING: ignored --with-shlib-version" >&5
7149 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7150                         ;;
7151                 esac
7152                 ;;
7153         esac
7154
7155         if test -n "$cf_try_cflags"
7156         then
7157 cat > conftest.$ac_ext <<EOF
7158 #line 7158 "${as_me:-configure}"
7159 #include <stdio.h>
7160 int main(int argc, char *argv[])
7161 {
7162         printf("hello\\n");
7163         return (argv[argc-1] == 0) ;
7164 }
7165 EOF
7166                 cf_save_CFLAGS="$CFLAGS"
7167                 for cf_opt in $cf_try_cflags
7168                 do
7169                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7170                         echo "$as_me:7170: checking if CFLAGS option -$cf_opt works" >&5
7171 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7172                         if { (eval echo "$as_me:7172: \"$ac_compile\"") >&5
7173   (eval $ac_compile) 2>&5
7174   ac_status=$?
7175   echo "$as_me:7175: \$? = $ac_status" >&5
7176   (exit "$ac_status"); }; then
7177                                 echo "$as_me:7177: result: yes" >&5
7178 echo "${ECHO_T}yes" >&6
7179                                 cf_save_CFLAGS="$CFLAGS"
7180                         else
7181                                 echo "$as_me:7181: result: no" >&5
7182 echo "${ECHO_T}no" >&6
7183                         fi
7184                 done
7185                 CFLAGS="$cf_save_CFLAGS"
7186         fi
7187
7188         # RPATH_LIST is a colon-separated list of directories
7189         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7190         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7191
7192         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7193
7194         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7195
7196 echo "${as_me:-configure}:7196: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7197
7198         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7199
7200 echo "${as_me:-configure}:7200: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7201
7202 for model in $cf_list_models ; do
7203         case "$model" in
7204         (libtool)
7205
7206 echo "$as_me:7206: checking for additional libtool options" >&5
7207 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7208
7209 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7210 if test "${with_libtool_opts+set}" = set; then
7211   withval="$with_libtool_opts"
7212   with_libtool_opts=$withval
7213 else
7214   with_libtool_opts=no
7215 fi;
7216 echo "$as_me:7216: result: $with_libtool_opts" >&5
7217 echo "${ECHO_T}$with_libtool_opts" >&6
7218
7219 case .$with_libtool_opts in
7220 (.yes|.no|.)
7221         ;;
7222 (*)
7223         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7224         ;;
7225 esac
7226
7227 echo "$as_me:7227: checking if exported-symbols file should be used" >&5
7228 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7229
7230 # Check whether --with-export-syms or --without-export-syms was given.
7231 if test "${with_export_syms+set}" = set; then
7232   withval="$with_export_syms"
7233   with_export_syms=$withval
7234 else
7235   with_export_syms=no
7236 fi;
7237 if test "x$with_export_syms" = xyes
7238 then
7239         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7240
7241 fi
7242 echo "$as_me:7242: result: $with_export_syms" >&5
7243 echo "${ECHO_T}$with_export_syms" >&6
7244 if test "x$with_export_syms" != xno
7245 then
7246         EXPORT_SYMS="-export-symbols $with_export_syms"
7247
7248 fi
7249
7250                 ;;
7251         (shared)
7252                 if test "$CC_SHARED_OPTS" = "unknown"; then
7253                         { { echo "$as_me:7253: error: Shared libraries are not supported in this version" >&5
7254 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7255    { (exit 1); exit 1; }; }
7256                 fi
7257                 # workaround for inept transition to PIE vs PIC...
7258                 echo "$as_me:7258: checking if current CFLAGS link properly" >&5
7259 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7260                 cat >"conftest.$ac_ext" <<_ACEOF
7261 #line 7261 "configure"
7262 #include "confdefs.h"
7263 #include <stdio.h>
7264 int
7265 main (void)
7266 {
7267 printf("Hello work\\n");
7268   ;
7269   return 0;
7270 }
7271 _ACEOF
7272 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7273 if { (eval echo "$as_me:7273: \"$ac_link\"") >&5
7274   (eval $ac_link) 2>&5
7275   ac_status=$?
7276   echo "$as_me:7276: \$? = $ac_status" >&5
7277   (exit "$ac_status"); } &&
7278          { ac_try='test -s "conftest$ac_exeext"'
7279   { (eval echo "$as_me:7279: \"$ac_try\"") >&5
7280   (eval $ac_try) 2>&5
7281   ac_status=$?
7282   echo "$as_me:7282: \$? = $ac_status" >&5
7283   (exit "$ac_status"); }; }; then
7284   cf_cflags_work=yes
7285 else
7286   echo "$as_me: failed program was:" >&5
7287 cat "conftest.$ac_ext" >&5
7288 cf_cflags_work=no
7289 fi
7290 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7291                 echo "$as_me:7291: result: $cf_cflags_work" >&5
7292 echo "${ECHO_T}$cf_cflags_work" >&6
7293                 if test "$cf_cflags_work" = no
7294                 then
7295                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7296
7297 echo "${as_me:-configure}:7297: testing try to work around by appending shared-options ..." 1>&5
7298
7299                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7300                 fi
7301
7302 echo "$as_me:7302: checking if versioned-symbols file should be used" >&5
7303 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7304
7305 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7306 if test "${with_versioned_syms+set}" = set; then
7307   withval="$with_versioned_syms"
7308   with_versioned_syms=$withval
7309 else
7310   with_versioned_syms=no
7311 fi;
7312 case "x$with_versioned_syms" in
7313 (xyes)
7314         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7315
7316         ;;
7317 (xno)
7318         ;;
7319 (x/*)
7320         test -f "$with_versioned_syms" || { { echo "$as_me:7320: error: expected a filename: $with_versioned_syms" >&5
7321 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7322    { (exit 1); exit 1; }; }
7323         ;;
7324 (*)
7325         test -f "$with_versioned_syms" || { { echo "$as_me:7325: error: expected a filename: $with_versioned_syms" >&5
7326 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7327    { (exit 1); exit 1; }; }
7328         with_versioned_syms=`pwd`/"$with_versioned_syms"
7329         ;;
7330 esac
7331 echo "$as_me:7331: result: $with_versioned_syms" >&5
7332 echo "${ECHO_T}$with_versioned_syms" >&6
7333
7334 RESULTING_SYMS=
7335 VERSIONED_SYMS=
7336 WILDCARD_SYMS=
7337
7338 if test "x$with_versioned_syms" != xno
7339 then
7340         RESULTING_SYMS=$with_versioned_syms
7341         case "x$MK_SHARED_LIB" in
7342         (*-Wl,*)
7343                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7344                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7345                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7346
7347 echo "${as_me:-configure}:7347: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7348
7349                 ;;
7350         (*-dy\ *)
7351                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7352                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7353                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7354
7355 echo "${as_me:-configure}:7355: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7356
7357                 ;;
7358         (*)
7359                 { echo "$as_me:7359: WARNING: this system does not support versioned-symbols" >&5
7360 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7361                 ;;
7362         esac
7363
7364         # Linux ld can selectively override scope, e.g., of symbols beginning with
7365         # "_" by first declaring some as global, and then using a wildcard to
7366         # declare the others as local.  Some other loaders cannot do this.  Check
7367         # by constructing a (very) simple shared library and inspecting its
7368         # symbols.
7369         if test "x$VERSIONED_SYMS" != "x"
7370         then
7371                 echo "$as_me:7371: checking if wildcards can be used to selectively omit symbols" >&5
7372 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7373                 WILDCARD_SYMS=no
7374
7375                 # make sources
7376                 rm -f conftest.*
7377
7378                 cat >conftest.ver <<EOF
7379 module_1.0 {
7380 global:
7381         globalf1;
7382 local:
7383         localf1;
7384 };
7385 module_2.0 {
7386 global:
7387         globalf2;
7388 local:
7389         localf2;
7390         _*;
7391 } module_1.0;
7392 submodule_1.0 {
7393 global:
7394         subglobalf1;
7395         _ismissing;
7396 local:
7397         sublocalf1;
7398 };
7399 submodule_2.0 {
7400 global:
7401         subglobalf2;
7402 local:
7403         sublocalf2;
7404         _*;
7405 } submodule_1.0;
7406 EOF
7407                 cat >conftest.$ac_ext <<EOF
7408 #line 7408 "configure"
7409 int     _ismissing(void) { return 1; }
7410 int     _localf1(void) { return 1; }
7411 int     _localf2(void) { return 2; }
7412 int     globalf1(void) { return 1; }
7413 int     globalf2(void) { return 2; }
7414 int     _sublocalf1(void) { return 1; }
7415 int     _sublocalf2(void) { return 2; }
7416 int     subglobalf1(void) { return 1; }
7417 int     subglobalf2(void) { return 2; }
7418 EOF
7419                 cat >conftest.mk <<EOF
7420 CC=${CC}
7421 CFLAGS=${CFLAGS}
7422 CPPFLAGS=${CPPFLAGS}
7423 LDFLAGS=${LDFLAGS}
7424 LIBS=${LIBS}
7425 VERSIONED_SYMS=${VERSIONED_SYMS}
7426 RESULTING_SYMS=conftest.ver
7427 MK_SHARED_LIB=${MK_SHARED_LIB}
7428 conftest.so: conftest.$ac_cv_objext
7429                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7430 EOF
7431
7432                 # compile source, make library
7433                 if make -f conftest.mk 2>&5 >/dev/null
7434                 then
7435                         # test for missing symbol in either Data or Text section
7436                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7437                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7438                 fi
7439                 echo "$as_me:7439: result: $WILDCARD_SYMS" >&5
7440 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7441                 rm -f conftest.*
7442         fi
7443 fi
7444
7445                 ;;
7446         esac
7447 done
7448
7449 ### Checks for special libraries, must be done up-front.
7450 SHLIB_LIST=""
7451
7452 echo "$as_me:7452: checking if you want to link with the GPM mouse library" >&5
7453 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7454
7455 # Check whether --with-gpm or --without-gpm was given.
7456 if test "${with_gpm+set}" = set; then
7457   withval="$with_gpm"
7458   with_gpm=$withval
7459 else
7460   with_gpm=maybe
7461 fi;
7462 echo "$as_me:7462: result: $with_gpm" >&5
7463 echo "${ECHO_T}$with_gpm" >&6
7464
7465 if test "$with_gpm" != no ; then
7466         echo "$as_me:7466: checking for gpm.h" >&5
7467 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7468 if test "${ac_cv_header_gpm_h+set}" = set; then
7469   echo $ECHO_N "(cached) $ECHO_C" >&6
7470 else
7471   cat >"conftest.$ac_ext" <<_ACEOF
7472 #line 7472 "configure"
7473 #include "confdefs.h"
7474 #include <gpm.h>
7475 _ACEOF
7476 if { (eval echo "$as_me:7476: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7477   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7478   ac_status=$?
7479   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7480   rm -f conftest.er1
7481   cat conftest.err >&5
7482   echo "$as_me:7482: \$? = $ac_status" >&5
7483   (exit "$ac_status"); } >/dev/null; then
7484   if test -s conftest.err; then
7485     ac_cpp_err=$ac_c_preproc_warn_flag
7486   else
7487     ac_cpp_err=
7488   fi
7489 else
7490   ac_cpp_err=yes
7491 fi
7492 if test -z "$ac_cpp_err"; then
7493   ac_cv_header_gpm_h=yes
7494 else
7495   echo "$as_me: failed program was:" >&5
7496   cat "conftest.$ac_ext" >&5
7497   ac_cv_header_gpm_h=no
7498 fi
7499 rm -f conftest.err "conftest.$ac_ext"
7500 fi
7501 echo "$as_me:7501: result: $ac_cv_header_gpm_h" >&5
7502 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7503 if test "$ac_cv_header_gpm_h" = yes; then
7504
7505 cat >>confdefs.h <<\EOF
7506 #define HAVE_GPM_H 1
7507 EOF
7508
7509                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7510                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7511
7512 echo "${as_me:-configure}:7512: testing assuming we really have GPM library ..." 1>&5
7513
7514 cat >>confdefs.h <<\EOF
7515 #define HAVE_LIBGPM 1
7516 EOF
7517
7518                         with_gpm=yes
7519                 else
7520                         echo "$as_me:7520: checking for Gpm_Open in -lgpm" >&5
7521 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7522 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7523   echo $ECHO_N "(cached) $ECHO_C" >&6
7524 else
7525   ac_check_lib_save_LIBS=$LIBS
7526 LIBS="-lgpm  $LIBS"
7527 cat >"conftest.$ac_ext" <<_ACEOF
7528 #line 7528 "configure"
7529 #include "confdefs.h"
7530
7531 /* Override any gcc2 internal prototype to avoid an error.  */
7532 #ifdef __cplusplus
7533 extern "C"
7534 #endif
7535 /* We use char because int might match the return type of a gcc2
7536    builtin and then its argument prototype would still apply.  */
7537 char Gpm_Open ();
7538 int
7539 main (void)
7540 {
7541 Gpm_Open ();
7542   ;
7543   return 0;
7544 }
7545 _ACEOF
7546 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7547 if { (eval echo "$as_me:7547: \"$ac_link\"") >&5
7548   (eval $ac_link) 2>&5
7549   ac_status=$?
7550   echo "$as_me:7550: \$? = $ac_status" >&5
7551   (exit "$ac_status"); } &&
7552          { ac_try='test -s "conftest$ac_exeext"'
7553   { (eval echo "$as_me:7553: \"$ac_try\"") >&5
7554   (eval $ac_try) 2>&5
7555   ac_status=$?
7556   echo "$as_me:7556: \$? = $ac_status" >&5
7557   (exit "$ac_status"); }; }; then
7558   ac_cv_lib_gpm_Gpm_Open=yes
7559 else
7560   echo "$as_me: failed program was:" >&5
7561 cat "conftest.$ac_ext" >&5
7562 ac_cv_lib_gpm_Gpm_Open=no
7563 fi
7564 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7565 LIBS=$ac_check_lib_save_LIBS
7566 fi
7567 echo "$as_me:7567: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7568 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7569 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7570   with_gpm=yes
7571 else
7572
7573                                 if test "$with_gpm" = maybe; then
7574                                         { echo "$as_me:7574: WARNING: Cannot link with GPM library" >&5
7575 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7576                                         with_gpm=no
7577                                 else
7578                                         { { echo "$as_me:7578: error: Cannot link with GPM library" >&5
7579 echo "$as_me: error: Cannot link with GPM library" >&2;}
7580    { (exit 1); exit 1; }; }
7581                                 fi
7582
7583 fi
7584
7585                 fi
7586
7587 else
7588
7589                 test "$with_gpm" != maybe && { echo "$as_me:7589: WARNING: Cannot find GPM header" >&5
7590 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7591                 with_gpm=no
7592
7593 fi
7594
7595 fi
7596
7597 if test "$with_gpm" != no ; then
7598         echo "$as_me:7598: checking if you want to load GPM dynamically" >&5
7599 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7600
7601 # Check whether --with-dlsym or --without-dlsym was given.
7602 if test "${with_dlsym+set}" = set; then
7603   withval="$with_dlsym"
7604   with_dlsym=$withval
7605 else
7606   with_dlsym=yes
7607 fi;
7608         echo "$as_me:7608: result: $with_dlsym" >&5
7609 echo "${ECHO_T}$with_dlsym" >&6
7610         if test "x$with_dlsym" = xyes ; then
7611
7612 cf_have_dlsym=no
7613 echo "$as_me:7613: checking for dlsym" >&5
7614 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7615 if test "${ac_cv_func_dlsym+set}" = set; then
7616   echo $ECHO_N "(cached) $ECHO_C" >&6
7617 else
7618   cat >"conftest.$ac_ext" <<_ACEOF
7619 #line 7619 "configure"
7620 #include "confdefs.h"
7621 #define dlsym autoconf_temporary
7622 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7623 #undef dlsym
7624
7625 #ifdef __cplusplus
7626 extern "C"
7627 #endif
7628
7629 /* We use char because int might match the return type of a gcc2
7630    builtin and then its argument prototype would still apply.  */
7631 char dlsym (void);
7632
7633 int
7634 main (void)
7635 {
7636
7637 /* The GNU C library defines stubs for functions which it implements
7638     to always fail with ENOSYS.  Some functions are actually named
7639     something starting with __ and the normal name is an alias.  */
7640 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7641 #error found stub for dlsym
7642 #endif
7643
7644         return dlsym ();
7645   ;
7646   return 0;
7647 }
7648 _ACEOF
7649 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7650 if { (eval echo "$as_me:7650: \"$ac_link\"") >&5
7651   (eval $ac_link) 2>&5
7652   ac_status=$?
7653   echo "$as_me:7653: \$? = $ac_status" >&5
7654   (exit "$ac_status"); } &&
7655          { ac_try='test -s "conftest$ac_exeext"'
7656   { (eval echo "$as_me:7656: \"$ac_try\"") >&5
7657   (eval $ac_try) 2>&5
7658   ac_status=$?
7659   echo "$as_me:7659: \$? = $ac_status" >&5
7660   (exit "$ac_status"); }; }; then
7661   ac_cv_func_dlsym=yes
7662 else
7663   echo "$as_me: failed program was:" >&5
7664 cat "conftest.$ac_ext" >&5
7665 ac_cv_func_dlsym=no
7666 fi
7667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7668 fi
7669 echo "$as_me:7669: result: $ac_cv_func_dlsym" >&5
7670 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7671 if test "$ac_cv_func_dlsym" = yes; then
7672   cf_have_dlsym=yes
7673 else
7674
7675 cf_have_libdl=no
7676 echo "$as_me:7676: checking for dlsym in -ldl" >&5
7677 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7678 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7679   echo $ECHO_N "(cached) $ECHO_C" >&6
7680 else
7681   ac_check_lib_save_LIBS=$LIBS
7682 LIBS="-ldl  $LIBS"
7683 cat >"conftest.$ac_ext" <<_ACEOF
7684 #line 7684 "configure"
7685 #include "confdefs.h"
7686
7687 /* Override any gcc2 internal prototype to avoid an error.  */
7688 #ifdef __cplusplus
7689 extern "C"
7690 #endif
7691 /* We use char because int might match the return type of a gcc2
7692    builtin and then its argument prototype would still apply.  */
7693 char dlsym ();
7694 int
7695 main (void)
7696 {
7697 dlsym ();
7698   ;
7699   return 0;
7700 }
7701 _ACEOF
7702 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7703 if { (eval echo "$as_me:7703: \"$ac_link\"") >&5
7704   (eval $ac_link) 2>&5
7705   ac_status=$?
7706   echo "$as_me:7706: \$? = $ac_status" >&5
7707   (exit "$ac_status"); } &&
7708          { ac_try='test -s "conftest$ac_exeext"'
7709   { (eval echo "$as_me:7709: \"$ac_try\"") >&5
7710   (eval $ac_try) 2>&5
7711   ac_status=$?
7712   echo "$as_me:7712: \$? = $ac_status" >&5
7713   (exit "$ac_status"); }; }; then
7714   ac_cv_lib_dl_dlsym=yes
7715 else
7716   echo "$as_me: failed program was:" >&5
7717 cat "conftest.$ac_ext" >&5
7718 ac_cv_lib_dl_dlsym=no
7719 fi
7720 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7721 LIBS=$ac_check_lib_save_LIBS
7722 fi
7723 echo "$as_me:7723: result: $ac_cv_lib_dl_dlsym" >&5
7724 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7725 if test "$ac_cv_lib_dl_dlsym" = yes; then
7726
7727         cf_have_dlsym=yes
7728         cf_have_libdl=yes
7729 fi
7730
7731 fi
7732
7733 if test "$cf_have_dlsym" = yes ; then
7734         test "$cf_have_libdl" = yes && {
7735 cf_add_libs="$LIBS"
7736 # reverse order
7737 cf_add_0lib=
7738 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7739 # filter duplicates
7740 for cf_add_1lib in $cf_add_0lib; do
7741         for cf_add_2lib in $cf_add_libs; do
7742                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7743                         cf_add_1lib=
7744                         break
7745                 fi
7746         done
7747         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7748 done
7749 LIBS="$cf_add_libs"
7750  }
7751
7752         echo "$as_me:7752: checking whether able to link to dl*() functions" >&5
7753 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7754         cat >"conftest.$ac_ext" <<_ACEOF
7755 #line 7755 "configure"
7756 #include "confdefs.h"
7757 #include <dlfcn.h>
7758 int
7759 main (void)
7760 {
7761
7762                 void *obj;
7763                 if ((obj = dlopen("filename", 0)) != 0) {
7764                         if (dlsym(obj, "symbolname") == 0) {
7765                         dlclose(obj);
7766                         }
7767                 }
7768   ;
7769   return 0;
7770 }
7771 _ACEOF
7772 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7773 if { (eval echo "$as_me:7773: \"$ac_link\"") >&5
7774   (eval $ac_link) 2>&5
7775   ac_status=$?
7776   echo "$as_me:7776: \$? = $ac_status" >&5
7777   (exit "$ac_status"); } &&
7778          { ac_try='test -s "conftest$ac_exeext"'
7779   { (eval echo "$as_me:7779: \"$ac_try\"") >&5
7780   (eval $ac_try) 2>&5
7781   ac_status=$?
7782   echo "$as_me:7782: \$? = $ac_status" >&5
7783   (exit "$ac_status"); }; }; then
7784
7785 cat >>confdefs.h <<\EOF
7786 #define HAVE_LIBDL 1
7787 EOF
7788
7789 else
7790   echo "$as_me: failed program was:" >&5
7791 cat "conftest.$ac_ext" >&5
7792
7793                 { { echo "$as_me:7793: error: Cannot link test program for libdl" >&5
7794 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7795    { (exit 1); exit 1; }; }
7796 fi
7797 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7798         echo "$as_me:7798: result: ok" >&5
7799 echo "${ECHO_T}ok" >&6
7800 else
7801         { { echo "$as_me:7801: error: Cannot find dlsym function" >&5
7802 echo "$as_me: error: Cannot find dlsym function" >&2;}
7803    { (exit 1); exit 1; }; }
7804 fi
7805
7806                 if test "x$with_gpm" != xyes ; then
7807                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7808
7809 echo "${as_me:-configure}:7809: testing assuming soname for gpm is $with_gpm ..." 1>&5
7810
7811                         cf_cv_gpm_soname="$with_gpm"
7812                 else
7813
7814 echo "$as_me:7814: checking for soname of gpm library" >&5
7815 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7816 if test "${cf_cv_gpm_soname+set}" = set; then
7817   echo $ECHO_N "(cached) $ECHO_C" >&6
7818 else
7819
7820 cf_cv_gpm_soname=unknown
7821 if test "$cross_compiling" != yes ; then
7822 cat >conftest.$ac_ext <<CF_EOF
7823 #include <gpm.h>
7824 int main(void)
7825 {
7826 if (Gpm_Open(0,0)) Gpm_Close();
7827         ${cf_cv_main_return:-return}(0);
7828 }
7829 CF_EOF
7830 cf_save_LIBS="$LIBS"
7831
7832 cf_add_libs="$LIBS"
7833 # reverse order
7834 cf_add_0lib=
7835 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7836 # filter duplicates
7837 for cf_add_1lib in $cf_add_0lib; do
7838         for cf_add_2lib in $cf_add_libs; do
7839                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7840                         cf_add_1lib=
7841                         break
7842                 fi
7843         done
7844         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7845 done
7846 LIBS="$cf_add_libs"
7847
7848         if { (eval echo "$as_me:7848: \"$ac_compile\"") >&5
7849   (eval $ac_compile) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); } ; then
7853                 if { (eval echo "$as_me:7853: \"$ac_link\"") >&5
7854   (eval $ac_link) 2>&5
7855   ac_status=$?
7856   echo "$as_me:7856: \$? = $ac_status" >&5
7857   (exit "$ac_status"); } ; then
7858                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7859                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7860                 fi
7861         fi
7862 rm -rf ./conftest*
7863 LIBS="$cf_save_LIBS"
7864 fi
7865
7866 fi
7867 echo "$as_me:7867: result: $cf_cv_gpm_soname" >&5
7868 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7869
7870                 fi
7871                 test "$cf_cv_gpm_soname" != "unknown" &&
7872 cat >>confdefs.h <<EOF
7873 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7874 EOF
7875
7876                 SHLIB_LIST="-ldl $SHLIB_LIST"
7877
7878 cf_add_libs="$PRIVATE_LIBS"
7879 # reverse order
7880 cf_add_0lib=
7881 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7882 # filter duplicates
7883 for cf_add_1lib in $cf_add_0lib; do
7884         for cf_add_2lib in $cf_add_libs; do
7885                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7886                         cf_add_1lib=
7887                         break
7888                 fi
7889         done
7890         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7891 done
7892 PRIVATE_LIBS="$cf_add_libs"
7893
7894         else
7895                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7896
7897 cf_add_libs="$TEST_LIBS"
7898 # reverse order
7899 cf_add_0lib=
7900 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7901 # filter duplicates
7902 for cf_add_1lib in $cf_add_0lib; do
7903         for cf_add_2lib in $cf_add_libs; do
7904                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7905                         cf_add_1lib=
7906                         break
7907                 fi
7908         done
7909         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7910 done
7911 TEST_LIBS="$cf_add_libs"
7912
7913 cf_add_libs="$PRIVATE_LIBS"
7914 # reverse order
7915 cf_add_0lib=
7916 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7917 # filter duplicates
7918 for cf_add_1lib in $cf_add_0lib; do
7919         for cf_add_2lib in $cf_add_libs; do
7920                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7921                         cf_add_1lib=
7922                         break
7923                 fi
7924         done
7925         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7926 done
7927 PRIVATE_LIBS="$cf_add_libs"
7928
7929         fi
7930
7931 cat >>confdefs.h <<\EOF
7932 #define HAVE_LIBGPM 1
7933 EOF
7934
7935 echo "$as_me:7935: checking for Gpm_Wgetch in -lgpm" >&5
7936 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7937 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7938   echo $ECHO_N "(cached) $ECHO_C" >&6
7939 else
7940   ac_check_lib_save_LIBS=$LIBS
7941 LIBS="-lgpm  $LIBS"
7942 cat >"conftest.$ac_ext" <<_ACEOF
7943 #line 7943 "configure"
7944 #include "confdefs.h"
7945
7946 /* Override any gcc2 internal prototype to avoid an error.  */
7947 #ifdef __cplusplus
7948 extern "C"
7949 #endif
7950 /* We use char because int might match the return type of a gcc2
7951    builtin and then its argument prototype would still apply.  */
7952 char Gpm_Wgetch ();
7953 int
7954 main (void)
7955 {
7956 Gpm_Wgetch ();
7957   ;
7958   return 0;
7959 }
7960 _ACEOF
7961 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7962 if { (eval echo "$as_me:7962: \"$ac_link\"") >&5
7963   (eval $ac_link) 2>&5
7964   ac_status=$?
7965   echo "$as_me:7965: \$? = $ac_status" >&5
7966   (exit "$ac_status"); } &&
7967          { ac_try='test -s "conftest$ac_exeext"'
7968   { (eval echo "$as_me:7968: \"$ac_try\"") >&5
7969   (eval $ac_try) 2>&5
7970   ac_status=$?
7971   echo "$as_me:7971: \$? = $ac_status" >&5
7972   (exit "$ac_status"); }; }; then
7973   ac_cv_lib_gpm_Gpm_Wgetch=yes
7974 else
7975   echo "$as_me: failed program was:" >&5
7976 cat "conftest.$ac_ext" >&5
7977 ac_cv_lib_gpm_Gpm_Wgetch=no
7978 fi
7979 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7980 LIBS=$ac_check_lib_save_LIBS
7981 fi
7982 echo "$as_me:7982: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7983 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7984 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7985
7986 echo "$as_me:7986: checking if GPM is weakly bound to curses library" >&5
7987 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7988 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7989   echo $ECHO_N "(cached) $ECHO_C" >&6
7990 else
7991
7992 cf_cv_check_gpm_wgetch=unknown
7993 if test "$cross_compiling" != yes ; then
7994
7995 cat >conftest.$ac_ext <<CF_EOF
7996 #include <gpm.h>
7997 int main(void)
7998 {
7999         Gpm_Wgetch();
8000         ${cf_cv_main_return:-return}(0);
8001 }
8002 CF_EOF
8003
8004         cf_save_LIBS="$LIBS"
8005         # This only works if we can look at the symbol table.  If a shared
8006         # library is stripped for install, we cannot use that.  So we're forced
8007         # to rely on the static library, noting that some packagers may not
8008         # include it.
8009         LIBS="-static -lgpm -dynamic $LIBS"
8010         if { (eval echo "$as_me:8010: \"$ac_compile\"") >&5
8011   (eval $ac_compile) 2>&5
8012   ac_status=$?
8013   echo "$as_me:8013: \$? = $ac_status" >&5
8014   (exit "$ac_status"); } ; then
8015                 if { (eval echo "$as_me:8015: \"$ac_link\"") >&5
8016   (eval $ac_link) 2>&5
8017   ac_status=$?
8018   echo "$as_me:8018: \$? = $ac_status" >&5
8019   (exit "$ac_status"); } ; then
8020                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8021                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8022                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8023                 fi
8024         fi
8025         rm -rf ./conftest*
8026         LIBS="$cf_save_LIBS"
8027 fi
8028
8029 fi
8030 echo "$as_me:8030: result: $cf_cv_check_gpm_wgetch" >&5
8031 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8032
8033 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8034         { echo "$as_me:8034: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8035 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8036 fi
8037
8038 fi
8039
8040 fi
8041
8042 echo "$as_me:8042: checking if you want to use PCRE2 for regular-expressions" >&5
8043 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8044
8045 # Check whether --with-pcre2 or --without-pcre2 was given.
8046 if test "${with_pcre2+set}" = set; then
8047   withval="$with_pcre2"
8048
8049 fi;
8050 test -z "$with_pcre2" && with_pcre2=no
8051 echo "$as_me:8051: result: $with_pcre2" >&5
8052 echo "${ECHO_T}$with_pcre2" >&6
8053
8054 if test "x$with_pcre2" != xno ; then
8055         cf_with_pcre2_ok=no
8056         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8057         do
8058
8059 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8060         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8061
8062 echo "${as_me:-configure}:8062: testing found package $cf_with_pcre2 ..." 1>&5
8063
8064         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8065         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8066         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8067
8068 echo "${as_me:-configure}:8068: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8069
8070         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8071
8072 echo "${as_me:-configure}:8072: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8073
8074 cf_fix_cppflags=no
8075 cf_new_cflags=
8076 cf_new_cppflags=
8077 cf_new_extra_cppflags=
8078
8079 for cf_add_cflags in $cf_pkgconfig_incs
8080 do
8081 case "$cf_fix_cppflags" in
8082 (no)
8083         case "$cf_add_cflags" in
8084         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8085                 case "$cf_add_cflags" in
8086                 (-D*)
8087                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8088
8089                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8090                                 && test -z "${cf_tst_cflags}" \
8091                                 && cf_fix_cppflags=yes
8092
8093                         if test "$cf_fix_cppflags" = yes ; then
8094
8095         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8096         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8097
8098                                 continue
8099                         elif test "${cf_tst_cflags}" = "\"'" ; then
8100
8101         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8102         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8103
8104                                 continue
8105                         fi
8106                         ;;
8107                 esac
8108                 case "$CPPFLAGS" in
8109                 (*$cf_add_cflags)
8110                         ;;
8111                 (*)
8112                         case "$cf_add_cflags" in
8113                         (-D*)
8114                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8115
8116 CPPFLAGS=`echo "$CPPFLAGS" | \
8117         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8118                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8119
8120                                 ;;
8121                         esac
8122
8123         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8124         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8125
8126                         ;;
8127                 esac
8128                 ;;
8129         (*)
8130
8131         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8132         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8133
8134                 ;;
8135         esac
8136         ;;
8137 (yes)
8138
8139         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8140         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8141
8142         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8143
8144         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8145                 && test -z "${cf_tst_cflags}" \
8146                 && cf_fix_cppflags=no
8147         ;;
8148 esac
8149 done
8150
8151 if test -n "$cf_new_cflags" ; then
8152
8153         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8154         CFLAGS="${CFLAGS}$cf_new_cflags"
8155
8156 fi
8157
8158 if test -n "$cf_new_cppflags" ; then
8159
8160         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8161         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8162
8163 fi
8164
8165 if test -n "$cf_new_extra_cppflags" ; then
8166
8167         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8168         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8169
8170 fi
8171
8172 cf_add_libs="$LIBS"
8173 # reverse order
8174 cf_add_0lib=
8175 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8176 # filter duplicates
8177 for cf_add_1lib in $cf_add_0lib; do
8178         for cf_add_2lib in $cf_add_libs; do
8179                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8180                         cf_add_1lib=
8181                         break
8182                 fi
8183         done
8184         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8185 done
8186 LIBS="$cf_add_libs"
8187
8188         cf_with_pcre2_ok=yes; break
8189 else
8190         cf_pkgconfig_incs=
8191         cf_pkgconfig_libs=
8192         :
8193 fi
8194
8195         done
8196         cf_with_pcre2_ok=yes || { { echo "$as_me:8196: error: Cannot find PCRE2 library" >&5
8197 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8198    { (exit 1); exit 1; }; }
8199
8200 cat >>confdefs.h <<\EOF
8201 #define HAVE_LIB_PCRE2 1
8202 EOF
8203
8204         # if pkgconfig gave no results, look for the libraries directly
8205         case "$LIBS" in
8206         (*pcre2-posix*|*pcreposix*)
8207                 ;;
8208         (*)
8209                 echo "$as_me:8209: checking for regcomp in -lpcre2-posix" >&5
8210 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8211 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8212   echo $ECHO_N "(cached) $ECHO_C" >&6
8213 else
8214   ac_check_lib_save_LIBS=$LIBS
8215 LIBS="-lpcre2-posix  $LIBS"
8216 cat >"conftest.$ac_ext" <<_ACEOF
8217 #line 8217 "configure"
8218 #include "confdefs.h"
8219
8220 /* Override any gcc2 internal prototype to avoid an error.  */
8221 #ifdef __cplusplus
8222 extern "C"
8223 #endif
8224 /* We use char because int might match the return type of a gcc2
8225    builtin and then its argument prototype would still apply.  */
8226 char regcomp ();
8227 int
8228 main (void)
8229 {
8230 regcomp ();
8231   ;
8232   return 0;
8233 }
8234 _ACEOF
8235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8236 if { (eval echo "$as_me:8236: \"$ac_link\"") >&5
8237   (eval $ac_link) 2>&5
8238   ac_status=$?
8239   echo "$as_me:8239: \$? = $ac_status" >&5
8240   (exit "$ac_status"); } &&
8241          { ac_try='test -s "conftest$ac_exeext"'
8242   { (eval echo "$as_me:8242: \"$ac_try\"") >&5
8243   (eval $ac_try) 2>&5
8244   ac_status=$?
8245   echo "$as_me:8245: \$? = $ac_status" >&5
8246   (exit "$ac_status"); }; }; then
8247   ac_cv_lib_pcre2_posix_regcomp=yes
8248 else
8249   echo "$as_me: failed program was:" >&5
8250 cat "conftest.$ac_ext" >&5
8251 ac_cv_lib_pcre2_posix_regcomp=no
8252 fi
8253 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8254 LIBS=$ac_check_lib_save_LIBS
8255 fi
8256 echo "$as_me:8256: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8257 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8258 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8259
8260 cf_add_libs="$LIBS"
8261 # reverse order
8262 cf_add_0lib=
8263 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8264 # filter duplicates
8265 for cf_add_1lib in $cf_add_0lib; do
8266         for cf_add_2lib in $cf_add_libs; do
8267                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8268                         cf_add_1lib=
8269                         break
8270                 fi
8271         done
8272         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8273 done
8274 LIBS="$cf_add_libs"
8275
8276 else
8277   echo "$as_me:8277: checking for regcomp in -lpcreposix" >&5
8278 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8279 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8280   echo $ECHO_N "(cached) $ECHO_C" >&6
8281 else
8282   ac_check_lib_save_LIBS=$LIBS
8283 LIBS="-lpcreposix  $LIBS"
8284 cat >"conftest.$ac_ext" <<_ACEOF
8285 #line 8285 "configure"
8286 #include "confdefs.h"
8287
8288 /* Override any gcc2 internal prototype to avoid an error.  */
8289 #ifdef __cplusplus
8290 extern "C"
8291 #endif
8292 /* We use char because int might match the return type of a gcc2
8293    builtin and then its argument prototype would still apply.  */
8294 char regcomp ();
8295 int
8296 main (void)
8297 {
8298 regcomp ();
8299   ;
8300   return 0;
8301 }
8302 _ACEOF
8303 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8304 if { (eval echo "$as_me:8304: \"$ac_link\"") >&5
8305   (eval $ac_link) 2>&5
8306   ac_status=$?
8307   echo "$as_me:8307: \$? = $ac_status" >&5
8308   (exit "$ac_status"); } &&
8309          { ac_try='test -s "conftest$ac_exeext"'
8310   { (eval echo "$as_me:8310: \"$ac_try\"") >&5
8311   (eval $ac_try) 2>&5
8312   ac_status=$?
8313   echo "$as_me:8313: \$? = $ac_status" >&5
8314   (exit "$ac_status"); }; }; then
8315   ac_cv_lib_pcreposix_regcomp=yes
8316 else
8317   echo "$as_me: failed program was:" >&5
8318 cat "conftest.$ac_ext" >&5
8319 ac_cv_lib_pcreposix_regcomp=no
8320 fi
8321 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8322 LIBS=$ac_check_lib_save_LIBS
8323 fi
8324 echo "$as_me:8324: result: $ac_cv_lib_pcreposix_regcomp" >&5
8325 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8326 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8327
8328 cf_add_libs="$LIBS"
8329 # reverse order
8330 cf_add_0lib=
8331 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8332 # filter duplicates
8333 for cf_add_1lib in $cf_add_0lib; do
8334         for cf_add_2lib in $cf_add_libs; do
8335                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8336                         cf_add_1lib=
8337                         break
8338                 fi
8339         done
8340         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8341 done
8342 LIBS="$cf_add_libs"
8343
8344 else
8345   { { echo "$as_me:8345: error: Cannot find PCRE2 POSIX library" >&5
8346 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8347    { (exit 1); exit 1; }; }
8348 fi
8349
8350 fi
8351
8352                 ;;
8353         esac
8354
8355         # either way, check for the library header files
8356
8357 for ac_header in pcre2posix.h pcreposix.h
8358 do
8359 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8360 echo "$as_me:8360: checking for $ac_header" >&5
8361 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8362 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8363   echo $ECHO_N "(cached) $ECHO_C" >&6
8364 else
8365   cat >"conftest.$ac_ext" <<_ACEOF
8366 #line 8366 "configure"
8367 #include "confdefs.h"
8368 #include <$ac_header>
8369 _ACEOF
8370 if { (eval echo "$as_me:8370: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8371   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8372   ac_status=$?
8373   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8374   rm -f conftest.er1
8375   cat conftest.err >&5
8376   echo "$as_me:8376: \$? = $ac_status" >&5
8377   (exit "$ac_status"); } >/dev/null; then
8378   if test -s conftest.err; then
8379     ac_cpp_err=$ac_c_preproc_warn_flag
8380   else
8381     ac_cpp_err=
8382   fi
8383 else
8384   ac_cpp_err=yes
8385 fi
8386 if test -z "$ac_cpp_err"; then
8387   eval "$as_ac_Header=yes"
8388 else
8389   echo "$as_me: failed program was:" >&5
8390   cat "conftest.$ac_ext" >&5
8391   eval "$as_ac_Header=no"
8392 fi
8393 rm -f conftest.err "conftest.$ac_ext"
8394 fi
8395 echo "$as_me:8395: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8396 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8397 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8398   cat >>confdefs.h <<EOF
8399 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8400 EOF
8401
8402 fi
8403 done
8404
8405 for ac_func in PCRE2regcomp
8406 do
8407 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8408 echo "$as_me:8408: checking for $ac_func" >&5
8409 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8410 if eval "test \"\${$as_ac_var+set}\" = set"; then
8411   echo $ECHO_N "(cached) $ECHO_C" >&6
8412 else
8413   cat >"conftest.$ac_ext" <<_ACEOF
8414 #line 8414 "configure"
8415 #include "confdefs.h"
8416 #define $ac_func autoconf_temporary
8417 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8418 #undef $ac_func
8419
8420 #ifdef __cplusplus
8421 extern "C"
8422 #endif
8423
8424 /* We use char because int might match the return type of a gcc2
8425    builtin and then its argument prototype would still apply.  */
8426 char $ac_func (void);
8427
8428 int
8429 main (void)
8430 {
8431
8432 /* The GNU C library defines stubs for functions which it implements
8433     to always fail with ENOSYS.  Some functions are actually named
8434     something starting with __ and the normal name is an alias.  */
8435 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8436 #error found stub for $ac_func
8437 #endif
8438
8439         return $ac_func ();
8440   ;
8441   return 0;
8442 }
8443 _ACEOF
8444 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8445 if { (eval echo "$as_me:8445: \"$ac_link\"") >&5
8446   (eval $ac_link) 2>&5
8447   ac_status=$?
8448   echo "$as_me:8448: \$? = $ac_status" >&5
8449   (exit "$ac_status"); } &&
8450          { ac_try='test -s "conftest$ac_exeext"'
8451   { (eval echo "$as_me:8451: \"$ac_try\"") >&5
8452   (eval $ac_try) 2>&5
8453   ac_status=$?
8454   echo "$as_me:8454: \$? = $ac_status" >&5
8455   (exit "$ac_status"); }; }; then
8456   eval "$as_ac_var=yes"
8457 else
8458   echo "$as_me: failed program was:" >&5
8459 cat "conftest.$ac_ext" >&5
8460 eval "$as_ac_var=no"
8461 fi
8462 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8463 fi
8464 echo "$as_me:8464: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8465 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8466 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8467   cat >>confdefs.h <<EOF
8468 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8469 EOF
8470
8471 fi
8472 done
8473
8474 fi
8475
8476 # not everyone has "test -c"
8477 if test -c /dev/sysmouse 2>/dev/null ; then
8478 echo "$as_me:8478: checking if you want to use sysmouse" >&5
8479 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8480
8481 # Check whether --with-sysmouse or --without-sysmouse was given.
8482 if test "${with_sysmouse+set}" = set; then
8483   withval="$with_sysmouse"
8484   cf_with_sysmouse=$withval
8485 else
8486   cf_with_sysmouse=maybe
8487 fi;
8488         if test "$cf_with_sysmouse" != no ; then
8489         cat >"conftest.$ac_ext" <<_ACEOF
8490 #line 8490 "configure"
8491 #include "confdefs.h"
8492
8493 #include <osreldate.h>
8494 #if (__FreeBSD_version >= 400017)
8495 #include <sys/consio.h>
8496 #include <sys/fbio.h>
8497 #else
8498 #include <machine/console.h>
8499 #endif
8500
8501 int
8502 main (void)
8503 {
8504
8505         struct mouse_info the_mouse;
8506         ioctl(0, CONS_MOUSECTL, &the_mouse);
8507
8508   ;
8509   return 0;
8510 }
8511 _ACEOF
8512 rm -f "conftest.$ac_objext"
8513 if { (eval echo "$as_me:8513: \"$ac_compile\"") >&5
8514   (eval $ac_compile) 2>&5
8515   ac_status=$?
8516   echo "$as_me:8516: \$? = $ac_status" >&5
8517   (exit "$ac_status"); } &&
8518          { ac_try='test -s "conftest.$ac_objext"'
8519   { (eval echo "$as_me:8519: \"$ac_try\"") >&5
8520   (eval $ac_try) 2>&5
8521   ac_status=$?
8522   echo "$as_me:8522: \$? = $ac_status" >&5
8523   (exit "$ac_status"); }; }; then
8524   cf_with_sysmouse=yes
8525 else
8526   echo "$as_me: failed program was:" >&5
8527 cat "conftest.$ac_ext" >&5
8528 cf_with_sysmouse=no
8529 fi
8530 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8531         fi
8532 echo "$as_me:8532: result: $cf_with_sysmouse" >&5
8533 echo "${ECHO_T}$cf_with_sysmouse" >&6
8534 test "$cf_with_sysmouse" = yes &&
8535 cat >>confdefs.h <<\EOF
8536 #define USE_SYSMOUSE 1
8537 EOF
8538
8539 fi
8540
8541 # pretend that ncurses==ncursesw==ncursest
8542 echo "$as_me:8542: checking if you want to disable library suffixes" >&5
8543 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8544
8545 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8546 if test "${enable_lib_suffixes+set}" = set; then
8547   enableval="$enable_lib_suffixes"
8548   test "$enableval" != no && enableval=yes
8549         if test "$enableval" != "yes" ; then
8550     disable_lib_suffixes=yes
8551         else
8552                 disable_lib_suffixes=no
8553         fi
8554 else
8555   enableval=yes
8556         disable_lib_suffixes=no
8557
8558 fi;
8559 echo "$as_me:8559: result: $disable_lib_suffixes" >&5
8560 echo "${ECHO_T}$disable_lib_suffixes" >&6
8561
8562 ### If we're building with rpath, try to link non-standard libs that way too.
8563 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8564
8565 echo "$as_me:8565: checking if rpath-hack should be disabled" >&5
8566 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8567
8568 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8569 if test "${enable_rpath_hack+set}" = set; then
8570   enableval="$enable_rpath_hack"
8571   test "$enableval" != no && enableval=yes
8572         if test "$enableval" != "yes" ; then
8573     enable_rpath_hack=no
8574         else
8575                 enable_rpath_hack=yes
8576         fi
8577 else
8578   enableval=yes
8579         enable_rpath_hack=yes
8580
8581 fi;
8582 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8583 echo "$as_me:8583: result: $cf_disable_rpath_hack" >&5
8584 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8585
8586 if test "$enable_rpath_hack" = yes ; then
8587
8588 echo "$as_me:8588: checking for updated LDFLAGS" >&5
8589 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8590 if test -n "$LD_RPATH_OPT" ; then
8591         echo "$as_me:8591: result: maybe" >&5
8592 echo "${ECHO_T}maybe" >&6
8593
8594         for ac_prog in ldd
8595 do
8596   # Extract the first word of "$ac_prog", so it can be a program name with args.
8597 set dummy $ac_prog; ac_word=$2
8598 echo "$as_me:8598: checking for $ac_word" >&5
8599 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8600 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8601   echo $ECHO_N "(cached) $ECHO_C" >&6
8602 else
8603   if test -n "$cf_ldd_prog"; then
8604   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8605 else
8606   ac_save_IFS=$IFS; IFS=$ac_path_separator
8607 ac_dummy="$PATH"
8608 for ac_dir in $ac_dummy; do
8609   IFS=$ac_save_IFS
8610   test -z "$ac_dir" && ac_dir=.
8611   $as_executable_p "$ac_dir/$ac_word" || continue
8612 ac_cv_prog_cf_ldd_prog="$ac_prog"
8613 echo "$as_me:8613: found $ac_dir/$ac_word" >&5
8614 break
8615 done
8616
8617 fi
8618 fi
8619 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8620 if test -n "$cf_ldd_prog"; then
8621   echo "$as_me:8621: result: $cf_ldd_prog" >&5
8622 echo "${ECHO_T}$cf_ldd_prog" >&6
8623 else
8624   echo "$as_me:8624: result: no" >&5
8625 echo "${ECHO_T}no" >&6
8626 fi
8627
8628   test -n "$cf_ldd_prog" && break
8629 done
8630 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8631
8632         cf_rpath_list="/usr/lib /lib"
8633         if test "$cf_ldd_prog" != no
8634         then
8635                 cf_rpath_oops=
8636
8637 cat >"conftest.$ac_ext" <<_ACEOF
8638 #line 8638 "configure"
8639 #include "confdefs.h"
8640 #include <stdio.h>
8641 int
8642 main (void)
8643 {
8644 printf("Hello");
8645   ;
8646   return 0;
8647 }
8648 _ACEOF
8649 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8650 if { (eval echo "$as_me:8650: \"$ac_link\"") >&5
8651   (eval $ac_link) 2>&5
8652   ac_status=$?
8653   echo "$as_me:8653: \$? = $ac_status" >&5
8654   (exit "$ac_status"); } &&
8655          { ac_try='test -s "conftest$ac_exeext"'
8656   { (eval echo "$as_me:8656: \"$ac_try\"") >&5
8657   (eval $ac_try) 2>&5
8658   ac_status=$?
8659   echo "$as_me:8659: \$? = $ac_status" >&5
8660   (exit "$ac_status"); }; }; then
8661   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8662                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8663 else
8664   echo "$as_me: failed program was:" >&5
8665 cat "conftest.$ac_ext" >&5
8666 fi
8667 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8668
8669                 # If we passed the link-test, but get a "not found" on a given library,
8670                 # this could be due to inept reconfiguration of gcc to make it only
8671                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8672                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8673                 # /usr/local libraries.
8674                 if test -n "$cf_rpath_oops"
8675                 then
8676                         for cf_rpath_src in $cf_rpath_oops
8677                         do
8678                                 for cf_rpath_dir in \
8679                                         /usr/local \
8680                                         /usr/pkg \
8681                                         /opt/sfw
8682                                 do
8683                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8684                                         then
8685                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8686
8687 echo "${as_me:-configure}:8687: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8688
8689                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8690                                                 break
8691                                         fi
8692                                 done
8693                         done
8694                 fi
8695         fi
8696
8697         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8698
8699 echo "${as_me:-configure}:8699: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8700
8701 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8702
8703 echo "${as_me:-configure}:8703: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8704
8705 cf_rpath_dst=
8706 for cf_rpath_src in $LDFLAGS
8707 do
8708         case "$cf_rpath_src" in
8709         (-L*)
8710
8711                 # check if this refers to a directory which we will ignore
8712                 cf_rpath_skip=no
8713                 if test -n "$cf_rpath_list"
8714                 then
8715                         for cf_rpath_item in $cf_rpath_list
8716                         do
8717                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8718                                 then
8719                                         cf_rpath_skip=yes
8720                                         break
8721                                 fi
8722                         done
8723                 fi
8724
8725                 if test "$cf_rpath_skip" = no
8726                 then
8727                         # transform the option
8728                         if test "$LD_RPATH_OPT" = "-R " ; then
8729                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8730                         else
8731                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8732                         fi
8733
8734                         # if we have not already added this, add it now
8735                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8736                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8737                         then
8738                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8739
8740 echo "${as_me:-configure}:8740: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8741
8742                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8743                         fi
8744                 fi
8745                 ;;
8746         esac
8747         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8748 done
8749 LDFLAGS=$cf_rpath_dst
8750
8751 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8752
8753 echo "${as_me:-configure}:8753: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8754
8755 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8756
8757 echo "${as_me:-configure}:8757: testing ...checking LIBS $LIBS ..." 1>&5
8758
8759 cf_rpath_dst=
8760 for cf_rpath_src in $LIBS
8761 do
8762         case "$cf_rpath_src" in
8763         (-L*)
8764
8765                 # check if this refers to a directory which we will ignore
8766                 cf_rpath_skip=no
8767                 if test -n "$cf_rpath_list"
8768                 then
8769                         for cf_rpath_item in $cf_rpath_list
8770                         do
8771                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8772                                 then
8773                                         cf_rpath_skip=yes
8774                                         break
8775                                 fi
8776                         done
8777                 fi
8778
8779                 if test "$cf_rpath_skip" = no
8780                 then
8781                         # transform the option
8782                         if test "$LD_RPATH_OPT" = "-R " ; then
8783                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8784                         else
8785                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8786                         fi
8787
8788                         # if we have not already added this, add it now
8789                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8790                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8791                         then
8792                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8793
8794 echo "${as_me:-configure}:8794: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8795
8796                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8797                         fi
8798                 fi
8799                 ;;
8800         esac
8801         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8802 done
8803 LIBS=$cf_rpath_dst
8804
8805 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8806
8807 echo "${as_me:-configure}:8807: testing ...checked LIBS $LIBS ..." 1>&5
8808
8809         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8810
8811 echo "${as_me:-configure}:8811: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8812
8813 else
8814         echo "$as_me:8814: result: no" >&5
8815 echo "${ECHO_T}no" >&6
8816 fi
8817
8818 fi
8819
8820 fi
8821
8822 ### Depending on the system, someone may use rpath to build ncurses but not
8823 # want users of the package to rely upon that feature.  Give those people an
8824 # option to suppress that detail from EXTRA_LDFLAGS.
8825 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8826 if test -n "$EXTRA_PKG_LDFLAGS"
8827 then
8828         echo "$as_me:8828: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8829 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8830
8831 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8832 if test "${enable_pkg_ldflags+set}" = set; then
8833   enableval="$enable_pkg_ldflags"
8834   test "$enableval" != no && enableval=yes
8835         if test "$enableval" != "yes" ; then
8836     disable_pkg_ldflags=yes
8837         else
8838                 disable_pkg_ldflags=no
8839         fi
8840 else
8841   enableval=yes
8842         disable_pkg_ldflags=no
8843
8844 fi;
8845         echo "$as_me:8845: result: $disable_pkg_ldflags" >&5
8846 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8847         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8848 fi
8849
8850 ###############################################################################
8851
8852 ###     use option --with-extra-suffix to append suffix to headers and libraries
8853 echo "$as_me:8853: checking if you wish to append extra suffix to header/library paths" >&5
8854 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8855 EXTRA_SUFFIX=
8856
8857 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8858 if test "${with_extra_suffix+set}" = set; then
8859   withval="$with_extra_suffix"
8860   case x$withval in
8861         (xno)
8862                 ;;
8863         (xyes|x)
8864                 EXTRA_SUFFIX=$cf_cv_abi_version
8865                 ;;
8866         (*)
8867                 EXTRA_SUFFIX=$withval
8868                 ;;
8869         esac
8870
8871 fi;
8872 echo "$as_me:8872: result: $EXTRA_SUFFIX" >&5
8873 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8874
8875 ###     use option --disable-overwrite to leave out the link to -lcurses
8876 echo "$as_me:8876: checking if you wish to install ncurses overwriting curses" >&5
8877 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8878
8879 # Check whether --enable-overwrite or --disable-overwrite was given.
8880 if test "${enable_overwrite+set}" = set; then
8881   enableval="$enable_overwrite"
8882   with_overwrite=$enableval
8883 else
8884   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8885 fi;
8886 echo "$as_me:8886: result: $with_overwrite" >&5
8887 echo "${ECHO_T}$with_overwrite" >&6
8888
8889 echo "$as_me:8889: checking if external terminfo-database is used" >&5
8890 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8891
8892 # Check whether --enable-database or --disable-database was given.
8893 if test "${enable_database+set}" = set; then
8894   enableval="$enable_database"
8895   use_database=$enableval
8896 else
8897   use_database=yes
8898 fi;
8899 echo "$as_me:8899: result: $use_database" >&5
8900 echo "${ECHO_T}$use_database" >&6
8901
8902 case "$host_os" in
8903 (os2*)
8904         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8905         ;;
8906 (*)
8907         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8908         ;;
8909 esac
8910
8911 NCURSES_USE_DATABASE=0
8912 if test "$use_database" != no ; then
8913         NCURSES_USE_DATABASE=1
8914
8915         echo "$as_me:8915: checking which terminfo source-file will be installed" >&5
8916 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8917
8918 # Check whether --with-database or --without-database was given.
8919 if test "${with_database+set}" = set; then
8920   withval="$with_database"
8921   TERMINFO_SRC=$withval
8922 fi;
8923         echo "$as_me:8923: result: $TERMINFO_SRC" >&5
8924 echo "${ECHO_T}$TERMINFO_SRC" >&6
8925
8926         echo "$as_me:8926: checking whether to use hashed database instead of directory/tree" >&5
8927 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8928
8929 # Check whether --with-hashed-db or --without-hashed-db was given.
8930 if test "${with_hashed_db+set}" = set; then
8931   withval="$with_hashed_db"
8932
8933 else
8934   with_hashed_db=no
8935 fi;
8936         echo "$as_me:8936: result: $with_hashed_db" >&5
8937 echo "${ECHO_T}$with_hashed_db" >&6
8938 else
8939         with_hashed_db=no
8940 fi
8941
8942 echo "$as_me:8942: checking for list of fallback descriptions" >&5
8943 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8944
8945 # Check whether --with-fallbacks or --without-fallbacks was given.
8946 if test "${with_fallbacks+set}" = set; then
8947   withval="$with_fallbacks"
8948   with_fallback=$withval
8949 else
8950   with_fallback=
8951 fi;
8952 echo "$as_me:8952: result: $with_fallback" >&5
8953 echo "${ECHO_T}$with_fallback" >&6
8954
8955 case ".$with_fallback" in
8956 (.|.no)
8957         FALLBACK_LIST=
8958         ;;
8959 (.yes)
8960         { echo "$as_me:8960: WARNING: expected a list of terminal descriptions" >&5
8961 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8962         ;;
8963 (*)
8964         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8965         ;;
8966 esac
8967
8968 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8969 # tree for generating the terminal descriptions that will be compiled into the
8970 # library.  If your toolchain is old, it may not handle current terminal
8971 # databases.  Use configure-options to point to the tools which will be used,
8972 # rather than the first ones found on the $PATH.
8973 if test -n "$ac_tool_prefix"; then
8974   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8975 set dummy ${ac_tool_prefix}tic; ac_word=$2
8976 echo "$as_me:8976: checking for $ac_word" >&5
8977 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8978 if test "${ac_cv_prog_TIC+set}" = set; then
8979   echo $ECHO_N "(cached) $ECHO_C" >&6
8980 else
8981   if test -n "$TIC"; then
8982   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8983 else
8984   ac_save_IFS=$IFS; IFS=$ac_path_separator
8985 ac_dummy="$PATH"
8986 for ac_dir in $ac_dummy; do
8987   IFS=$ac_save_IFS
8988   test -z "$ac_dir" && ac_dir=.
8989   $as_executable_p "$ac_dir/$ac_word" || continue
8990 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8991 echo "$as_me:8991: found $ac_dir/$ac_word" >&5
8992 break
8993 done
8994
8995 fi
8996 fi
8997 TIC=$ac_cv_prog_TIC
8998 if test -n "$TIC"; then
8999   echo "$as_me:8999: result: $TIC" >&5
9000 echo "${ECHO_T}$TIC" >&6
9001 else
9002   echo "$as_me:9002: result: no" >&5
9003 echo "${ECHO_T}no" >&6
9004 fi
9005
9006 fi
9007 if test -z "$ac_cv_prog_TIC"; then
9008   ac_ct_TIC=$TIC
9009   # Extract the first word of "tic", so it can be a program name with args.
9010 set dummy tic; ac_word=$2
9011 echo "$as_me:9011: checking for $ac_word" >&5
9012 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9013 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9014   echo $ECHO_N "(cached) $ECHO_C" >&6
9015 else
9016   if test -n "$ac_ct_TIC"; then
9017   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9018 else
9019   ac_save_IFS=$IFS; IFS=$ac_path_separator
9020 ac_dummy="$PATH"
9021 for ac_dir in $ac_dummy; do
9022   IFS=$ac_save_IFS
9023   test -z "$ac_dir" && ac_dir=.
9024   $as_executable_p "$ac_dir/$ac_word" || continue
9025 ac_cv_prog_ac_ct_TIC="tic"
9026 echo "$as_me:9026: found $ac_dir/$ac_word" >&5
9027 break
9028 done
9029
9030 fi
9031 fi
9032 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9033 if test -n "$ac_ct_TIC"; then
9034   echo "$as_me:9034: result: $ac_ct_TIC" >&5
9035 echo "${ECHO_T}$ac_ct_TIC" >&6
9036 else
9037   echo "$as_me:9037: result: no" >&5
9038 echo "${ECHO_T}no" >&6
9039 fi
9040
9041   TIC=$ac_ct_TIC
9042 else
9043   TIC="$ac_cv_prog_TIC"
9044 fi
9045
9046 if test -n "$ac_tool_prefix"; then
9047   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9048 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9049 echo "$as_me:9049: checking for $ac_word" >&5
9050 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9051 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9052   echo $ECHO_N "(cached) $ECHO_C" >&6
9053 else
9054   if test -n "$INFOCMP"; then
9055   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9056 else
9057   ac_save_IFS=$IFS; IFS=$ac_path_separator
9058 ac_dummy="$PATH"
9059 for ac_dir in $ac_dummy; do
9060   IFS=$ac_save_IFS
9061   test -z "$ac_dir" && ac_dir=.
9062   $as_executable_p "$ac_dir/$ac_word" || continue
9063 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9064 echo "$as_me:9064: found $ac_dir/$ac_word" >&5
9065 break
9066 done
9067
9068 fi
9069 fi
9070 INFOCMP=$ac_cv_prog_INFOCMP
9071 if test -n "$INFOCMP"; then
9072   echo "$as_me:9072: result: $INFOCMP" >&5
9073 echo "${ECHO_T}$INFOCMP" >&6
9074 else
9075   echo "$as_me:9075: result: no" >&5
9076 echo "${ECHO_T}no" >&6
9077 fi
9078
9079 fi
9080 if test -z "$ac_cv_prog_INFOCMP"; then
9081   ac_ct_INFOCMP=$INFOCMP
9082   # Extract the first word of "infocmp", so it can be a program name with args.
9083 set dummy infocmp; ac_word=$2
9084 echo "$as_me:9084: checking for $ac_word" >&5
9085 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9086 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9087   echo $ECHO_N "(cached) $ECHO_C" >&6
9088 else
9089   if test -n "$ac_ct_INFOCMP"; then
9090   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9091 else
9092   ac_save_IFS=$IFS; IFS=$ac_path_separator
9093 ac_dummy="$PATH"
9094 for ac_dir in $ac_dummy; do
9095   IFS=$ac_save_IFS
9096   test -z "$ac_dir" && ac_dir=.
9097   $as_executable_p "$ac_dir/$ac_word" || continue
9098 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9099 echo "$as_me:9099: found $ac_dir/$ac_word" >&5
9100 break
9101 done
9102
9103 fi
9104 fi
9105 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9106 if test -n "$ac_ct_INFOCMP"; then
9107   echo "$as_me:9107: result: $ac_ct_INFOCMP" >&5
9108 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9109 else
9110   echo "$as_me:9110: result: no" >&5
9111 echo "${ECHO_T}no" >&6
9112 fi
9113
9114   INFOCMP=$ac_ct_INFOCMP
9115 else
9116   INFOCMP="$ac_cv_prog_INFOCMP"
9117 fi
9118
9119 if test -n "$FALLBACK_LIST"
9120 then
9121
9122 # Check whether --with-tic-path or --without-tic-path was given.
9123 if test "${with_tic_path+set}" = set; then
9124   withval="$with_tic_path"
9125   echo "$as_me:9125: checking for tic program for fallbacks" >&5
9126 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9127                 TIC=$withval
9128                 echo "$as_me:9128: result: $TIC" >&5
9129 echo "${ECHO_T}$TIC" >&6
9130
9131 if test "x$prefix" != xNONE; then
9132         cf_path_syntax="$prefix"
9133 else
9134         cf_path_syntax="$ac_default_prefix"
9135 fi
9136
9137 case ".$TIC" in
9138 (.\$\(*\)*|.\'*\'*)
9139         ;;
9140 (..|./*|.\\*)
9141         ;;
9142 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9143         ;;
9144 (.\$\{*prefix\}*|.\$\{*dir\}*)
9145         eval TIC="$TIC"
9146         case ".$TIC" in
9147         (.NONE/*)
9148                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9149                 ;;
9150         esac
9151         ;;
9152 (.no|.NONE/*)
9153         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9154         ;;
9155 (*)
9156         { { echo "$as_me:9156: error: expected a pathname, not \"$TIC\"" >&5
9157 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9158    { (exit 1); exit 1; }; }
9159         ;;
9160 esac
9161
9162 else
9163
9164 test -z "$TIC" && TIC="tic"
9165 for ac_prog in $TIC tic
9166 do
9167   # Extract the first word of "$ac_prog", so it can be a program name with args.
9168 set dummy $ac_prog; ac_word=$2
9169 echo "$as_me:9169: checking for $ac_word" >&5
9170 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9171 if test "${ac_cv_path_TIC+set}" = set; then
9172   echo $ECHO_N "(cached) $ECHO_C" >&6
9173 else
9174   case $TIC in
9175   [\\/]* | ?:[\\/]*)
9176   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9177   ;;
9178   *)
9179   ac_save_IFS=$IFS; IFS=$ac_path_separator
9180 ac_dummy="$PATH:/usr/local/ncurses/bin"
9181 for ac_dir in $ac_dummy; do
9182   IFS=$ac_save_IFS
9183   test -z "$ac_dir" && ac_dir=.
9184   if $as_executable_p "$ac_dir/$ac_word"; then
9185    ac_cv_path_TIC="$ac_dir/$ac_word"
9186    echo "$as_me:9186: found $ac_dir/$ac_word" >&5
9187    break
9188 fi
9189 done
9190
9191   ;;
9192 esac
9193 fi
9194 TIC=$ac_cv_path_TIC
9195
9196 if test -n "$TIC"; then
9197   echo "$as_me:9197: result: $TIC" >&5
9198 echo "${ECHO_T}$TIC" >&6
9199 else
9200   echo "$as_me:9200: result: no" >&5
9201 echo "${ECHO_T}no" >&6
9202 fi
9203
9204   test -n "$TIC" && break
9205 done
9206 test -n "$TIC" || TIC="$TIC"
9207
9208 cf_path_prog=""
9209 cf_path_args=""
9210 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9211 for cf_temp in $ac_cv_path_TIC
9212 do
9213         if test -z "$cf_path_prog" ; then
9214                 if test "$with_full_paths" = yes ; then
9215
9216 if test "x$prefix" != xNONE; then
9217         cf_path_syntax="$prefix"
9218 else
9219         cf_path_syntax="$ac_default_prefix"
9220 fi
9221
9222 case ".$cf_temp" in
9223 (.\$\(*\)*|.\'*\'*)
9224         ;;
9225 (..|./*|.\\*)
9226         ;;
9227 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9228         ;;
9229 (.\$\{*prefix\}*|.\$\{*dir\}*)
9230         eval cf_temp="$cf_temp"
9231         case ".$cf_temp" in
9232         (.NONE/*)
9233                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9234                 ;;
9235         esac
9236         ;;
9237 (.no|.NONE/*)
9238         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9239         ;;
9240 (*)
9241         break
9242         ;;
9243 esac
9244
9245                         cf_path_prog="$cf_temp"
9246                 else
9247                         cf_path_prog="`basename "$cf_temp"`"
9248                 fi
9249         elif test -z "$cf_path_args" ; then
9250                 cf_path_args="$cf_temp"
9251         else
9252                 cf_path_args="$cf_path_args $cf_temp"
9253         fi
9254 done
9255 IFS="$cf_save_ifs"
9256
9257 if test -n "$cf_path_prog" ; then
9258
9259 echo "${as_me:-configure}:9259: testing defining path for ${cf_path_prog} ..." 1>&5
9260
9261 cat >>confdefs.h <<EOF
9262 #define TIC_PATH "$cf_path_prog"
9263 EOF
9264
9265         test -n "$cf_path_args" &&
9266 cat >>confdefs.h <<EOF
9267 #define TIC_ARGS "$cf_path_args"
9268 EOF
9269
9270 fi
9271
9272                 if test -z "$TIC"
9273                 then
9274                         { echo "$as_me:9274: WARNING: no tic program found for fallbacks" >&5
9275 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9276                 fi
9277
9278 fi;
9279
9280 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9281 if test "${with_infocmp_path+set}" = set; then
9282   withval="$with_infocmp_path"
9283   echo "$as_me:9283: checking for infocmp program for fallbacks" >&5
9284 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9285                 INFOCMP=$withval
9286                 echo "$as_me:9286: result: $INFOCMP" >&5
9287 echo "${ECHO_T}$INFOCMP" >&6
9288
9289 if test "x$prefix" != xNONE; then
9290         cf_path_syntax="$prefix"
9291 else
9292         cf_path_syntax="$ac_default_prefix"
9293 fi
9294
9295 case ".$INFOCMP" in
9296 (.\$\(*\)*|.\'*\'*)
9297         ;;
9298 (..|./*|.\\*)
9299         ;;
9300 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9301         ;;
9302 (.\$\{*prefix\}*|.\$\{*dir\}*)
9303         eval INFOCMP="$INFOCMP"
9304         case ".$INFOCMP" in
9305         (.NONE/*)
9306                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9307                 ;;
9308         esac
9309         ;;
9310 (.no|.NONE/*)
9311         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9312         ;;
9313 (*)
9314         { { echo "$as_me:9314: error: expected a pathname, not \"$INFOCMP\"" >&5
9315 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9316    { (exit 1); exit 1; }; }
9317         ;;
9318 esac
9319
9320 else
9321
9322 test -z "$INFOCMP" && INFOCMP="infocmp"
9323 for ac_prog in $INFOCMP infocmp
9324 do
9325   # Extract the first word of "$ac_prog", so it can be a program name with args.
9326 set dummy $ac_prog; ac_word=$2
9327 echo "$as_me:9327: checking for $ac_word" >&5
9328 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9329 if test "${ac_cv_path_INFOCMP+set}" = set; then
9330   echo $ECHO_N "(cached) $ECHO_C" >&6
9331 else
9332   case $INFOCMP in
9333   [\\/]* | ?:[\\/]*)
9334   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9335   ;;
9336   *)
9337   ac_save_IFS=$IFS; IFS=$ac_path_separator
9338 ac_dummy="$PATH:/usr/local/ncurses/bin"
9339 for ac_dir in $ac_dummy; do
9340   IFS=$ac_save_IFS
9341   test -z "$ac_dir" && ac_dir=.
9342   if $as_executable_p "$ac_dir/$ac_word"; then
9343    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9344    echo "$as_me:9344: found $ac_dir/$ac_word" >&5
9345    break
9346 fi
9347 done
9348
9349   ;;
9350 esac
9351 fi
9352 INFOCMP=$ac_cv_path_INFOCMP
9353
9354 if test -n "$INFOCMP"; then
9355   echo "$as_me:9355: result: $INFOCMP" >&5
9356 echo "${ECHO_T}$INFOCMP" >&6
9357 else
9358   echo "$as_me:9358: result: no" >&5
9359 echo "${ECHO_T}no" >&6
9360 fi
9361
9362   test -n "$INFOCMP" && break
9363 done
9364 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9365
9366 cf_path_prog=""
9367 cf_path_args=""
9368 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9369 for cf_temp in $ac_cv_path_INFOCMP
9370 do
9371         if test -z "$cf_path_prog" ; then
9372                 if test "$with_full_paths" = yes ; then
9373
9374 if test "x$prefix" != xNONE; then
9375         cf_path_syntax="$prefix"
9376 else
9377         cf_path_syntax="$ac_default_prefix"
9378 fi
9379
9380 case ".$cf_temp" in
9381 (.\$\(*\)*|.\'*\'*)
9382         ;;
9383 (..|./*|.\\*)
9384         ;;
9385 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9386         ;;
9387 (.\$\{*prefix\}*|.\$\{*dir\}*)
9388         eval cf_temp="$cf_temp"
9389         case ".$cf_temp" in
9390         (.NONE/*)
9391                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9392                 ;;
9393         esac
9394         ;;
9395 (.no|.NONE/*)
9396         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9397         ;;
9398 (*)
9399         break
9400         ;;
9401 esac
9402
9403                         cf_path_prog="$cf_temp"
9404                 else
9405                         cf_path_prog="`basename "$cf_temp"`"
9406                 fi
9407         elif test -z "$cf_path_args" ; then
9408                 cf_path_args="$cf_temp"
9409         else
9410                 cf_path_args="$cf_path_args $cf_temp"
9411         fi
9412 done
9413 IFS="$cf_save_ifs"
9414
9415 if test -n "$cf_path_prog" ; then
9416
9417 echo "${as_me:-configure}:9417: testing defining path for ${cf_path_prog} ..." 1>&5
9418
9419 cat >>confdefs.h <<EOF
9420 #define INFOCMP_PATH "$cf_path_prog"
9421 EOF
9422
9423         test -n "$cf_path_args" &&
9424 cat >>confdefs.h <<EOF
9425 #define INFOCMP_ARGS "$cf_path_args"
9426 EOF
9427
9428 fi
9429
9430                 if test -z "$INFOCMP"
9431                 then
9432                         { echo "$as_me:9432: WARNING: no infocmp program found for fallbacks" >&5
9433 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9434                 fi
9435
9436 fi;
9437
9438         test -z "$TIC" && FALLBACK_LIST=
9439         test -z "$INFOCMP" && FALLBACK_LIST=
9440         if test -z "$FALLBACK_LIST"
9441         then
9442                 { echo "$as_me:9442: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9443 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9444         fi
9445 fi
9446
9447 USE_FALLBACKS=
9448 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9449
9450 echo "$as_me:9450: checking if you want modern xterm or antique" >&5
9451 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9452
9453 # Check whether --with-xterm-new or --without-xterm-new was given.
9454 if test "${with_xterm_new+set}" = set; then
9455   withval="$with_xterm_new"
9456   with_xterm_new=$withval
9457 else
9458   with_xterm_new=yes
9459 fi;
9460 case "$with_xterm_new" in
9461 (no) with_xterm_new=xterm-old;;
9462 (*)      with_xterm_new=xterm-new;;
9463 esac
9464 echo "$as_me:9464: result: $with_xterm_new" >&5
9465 echo "${ECHO_T}$with_xterm_new" >&6
9466 WHICH_XTERM=$with_xterm_new
9467
9468 case $host_os in
9469 (*linux-gnu|*cygwin|*mingw32|*msys)
9470         want_xterm_kbs=DEL
9471         ;;
9472 (*)
9473         want_xterm_kbs=BS
9474         ;;
9475 esac
9476
9477 echo "$as_me:9477: checking if xterm backspace sends BS or DEL" >&5
9478 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9479
9480 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9481 if test "${with_xterm_kbs+set}" = set; then
9482   withval="$with_xterm_kbs"
9483   with_xterm_kbs=$withval
9484 else
9485   with_xterm_kbs=auto
9486 fi;
9487 case x$with_xterm_kbs in
9488 (xyes|xno|xBS|xbs|x8)
9489         with_xterm_kbs=BS
9490         ;;
9491 (xDEL|xdel|x127)
9492         with_xterm_kbs=DEL
9493         ;;
9494 (xauto)
9495         with_xterm_kbs=$want_xterm_kbs
9496         ;;
9497 (*)
9498         with_xterm_kbs=$withval
9499         ;;
9500 esac
9501 echo "$as_me:9501: result: $with_xterm_kbs" >&5
9502 echo "${ECHO_T}$with_xterm_kbs" >&6
9503 XTERM_KBS=$with_xterm_kbs
9504
9505 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9506 then
9507         { echo "$as_me:9507: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9508 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9509 fi
9510
9511 MAKE_TERMINFO=
9512 if test "$use_database" = no ; then
9513         TERMINFO="${datadir}/terminfo"
9514         MAKE_TERMINFO="#"
9515 else
9516
9517 echo "$as_me:9517: checking for list of terminfo directories" >&5
9518 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9519
9520 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9521 if test "${with_terminfo_dirs+set}" = set; then
9522   withval="$with_terminfo_dirs"
9523
9524 else
9525   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9526 fi;
9527 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9528 cf_dst_path=
9529 for cf_src_path in $withval
9530 do
9531
9532 if test "x$prefix" != xNONE; then
9533         cf_path_syntax="$prefix"
9534 else
9535         cf_path_syntax="$ac_default_prefix"
9536 fi
9537
9538 case ".$cf_src_path" in
9539 (.\$\(*\)*|.\'*\'*)
9540         ;;
9541 (..|./*|.\\*)
9542         ;;
9543 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9544         ;;
9545 (.\$\{*prefix\}*|.\$\{*dir\}*)
9546         eval cf_src_path="$cf_src_path"
9547         case ".$cf_src_path" in
9548         (.NONE/*)
9549                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9550                 ;;
9551         esac
9552         ;;
9553 (.no|.NONE/*)
9554         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9555         ;;
9556 (*)
9557         { { echo "$as_me:9557: error: expected a pathname, not \"$cf_src_path\"" >&5
9558 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9559    { (exit 1); exit 1; }; }
9560         ;;
9561 esac
9562
9563   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9564   cf_dst_path="${cf_dst_path}${cf_src_path}"
9565 done
9566 IFS="$ac_save_ifs"
9567
9568 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9569 # so we have to check/work around.  We do prefer the result of "eval"...
9570 eval cf_dst_eval="$cf_dst_path"
9571 case "x$cf_dst_eval" in
9572 (xNONE*)
9573         TERMINFO_DIRS=$cf_dst_path
9574         ;;
9575 (*)
9576         TERMINFO_DIRS="$cf_dst_eval"
9577         ;;
9578 esac
9579
9580 echo "$as_me:9580: result: $TERMINFO_DIRS" >&5
9581 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9582 test -n "$TERMINFO_DIRS" &&
9583 cat >>confdefs.h <<EOF
9584 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9585 EOF
9586
9587 case "x$TERMINFO" in
9588 x???:*)
9589         { echo "$as_me:9589: WARNING: ignoring non-directory/file TERMINFO value" >&5
9590 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9591         unset TERMINFO
9592         ;;
9593 esac
9594
9595 echo "$as_me:9595: checking for default terminfo directory" >&5
9596 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9597
9598 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9599 if test "${with_default_terminfo_dir+set}" = set; then
9600   withval="$with_default_terminfo_dir"
9601
9602 else
9603   withval="${TERMINFO:-${datadir}/terminfo}"
9604 fi; if test -n "${datadir}/terminfo" ; then
9605
9606 if test "x$prefix" != xNONE; then
9607         cf_path_syntax="$prefix"
9608 else
9609         cf_path_syntax="$ac_default_prefix"
9610 fi
9611
9612 case ".$withval" in
9613 (.\$\(*\)*|.\'*\'*)
9614         ;;
9615 (..|./*|.\\*)
9616         ;;
9617 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9618         ;;
9619 (.\$\{*prefix\}*|.\$\{*dir\}*)
9620         eval withval="$withval"
9621         case ".$withval" in
9622         (.NONE/*)
9623                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9624                 ;;
9625         esac
9626         ;;
9627 (.no|.NONE/*)
9628         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9629         ;;
9630 (*)
9631         { { echo "$as_me:9631: error: expected a pathname, not \"$withval\"" >&5
9632 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9633    { (exit 1); exit 1; }; }
9634         ;;
9635 esac
9636
9637 fi
9638 eval TERMINFO="$withval"
9639
9640 echo "$as_me:9640: result: $TERMINFO" >&5
9641 echo "${ECHO_T}$TERMINFO" >&6
9642
9643 cat >>confdefs.h <<EOF
9644 #define TERMINFO "$TERMINFO"
9645 EOF
9646
9647 fi
9648
9649 ###     use option --disable-big-core to make tic run on small machines
9650 ###     We need 4Mb, check if we can allocate 50% more than that.
9651 echo "$as_me:9651: checking if big-core option selected" >&5
9652 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9653
9654 # Check whether --enable-big-core or --disable-big-core was given.
9655 if test "${enable_big_core+set}" = set; then
9656   enableval="$enable_big_core"
9657   with_big_core=$enableval
9658 else
9659   if test "$cross_compiling" = yes; then
9660   with_big_core=no
9661 else
9662   cat >"conftest.$ac_ext" <<_ACEOF
9663 #line 9663 "configure"
9664 #include "confdefs.h"
9665
9666 #include <stdlib.h>
9667 #include <string.h>
9668 int main() {
9669         unsigned long n = 6000000L;
9670         char *s = malloc(n);
9671         if (s != 0)
9672                 s[0] = s[n-1] = 0;
9673         ${cf_cv_main_return:-return}(s == 0);
9674 }
9675 _ACEOF
9676 rm -f "conftest$ac_exeext"
9677 if { (eval echo "$as_me:9677: \"$ac_link\"") >&5
9678   (eval $ac_link) 2>&5
9679   ac_status=$?
9680   echo "$as_me:9680: \$? = $ac_status" >&5
9681   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9682   { (eval echo "$as_me:9682: \"$ac_try\"") >&5
9683   (eval $ac_try) 2>&5
9684   ac_status=$?
9685   echo "$as_me:9685: \$? = $ac_status" >&5
9686   (exit "$ac_status"); }; }; then
9687   with_big_core=yes
9688 else
9689   echo "$as_me: program exited with status $ac_status" >&5
9690 echo "$as_me: failed program was:" >&5
9691 cat "conftest.$ac_ext" >&5
9692 with_big_core=no
9693 fi
9694 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9695 fi
9696 fi;
9697 echo "$as_me:9697: result: $with_big_core" >&5
9698 echo "${ECHO_T}$with_big_core" >&6
9699 test "x$with_big_core" = "xyes" &&
9700 cat >>confdefs.h <<\EOF
9701 #define HAVE_BIG_CORE 1
9702 EOF
9703
9704 ### ISO C only guarantees 512-char strings, we have tables which load faster
9705 ### when constructed using "big" strings.  More than the C compiler, the awk
9706 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9707 echo "$as_me:9707: checking if big-strings option selected" >&5
9708 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9709
9710 # Check whether --enable-big-strings or --disable-big-strings was given.
9711 if test "${enable_big_strings+set}" = set; then
9712   enableval="$enable_big_strings"
9713   with_big_strings=$enableval
9714 else
9715
9716         case x$AWK in
9717         (x)
9718                 eval with_big_strings=no
9719                 ;;
9720         (*)
9721                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9722                         | $AWK '{ printf "%d\n", length($0); }' 2>/dev/null | $AWK 'BEGIN { eqls=0; recs=0; } { recs++; if ($0 == 12000) eqls++; } END { if (recs != 1 || eqls != 1) exit 1; }' 2>/dev/null >/dev/null ) ; then
9723                         eval with_big_strings=yes
9724                 else
9725                         eval with_big_strings=no
9726                 fi
9727                 ;;
9728         esac
9729
9730 fi;
9731 echo "$as_me:9731: result: $with_big_strings" >&5
9732 echo "${ECHO_T}$with_big_strings" >&6
9733
9734 USE_BIG_STRINGS=0
9735 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9736
9737 ###     use option --enable-termcap to compile in the termcap fallback support
9738 echo "$as_me:9738: checking if you want termcap-fallback support" >&5
9739 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9740
9741 # Check whether --enable-termcap or --disable-termcap was given.
9742 if test "${enable_termcap+set}" = set; then
9743   enableval="$enable_termcap"
9744   with_termcap=$enableval
9745 else
9746   with_termcap=no
9747 fi;
9748 echo "$as_me:9748: result: $with_termcap" >&5
9749 echo "${ECHO_T}$with_termcap" >&6
9750
9751 NCURSES_USE_TERMCAP=0
9752 if test "x$with_termcap" != "xyes" ; then
9753         if test "$use_database" = no ; then
9754                 if test -z "$with_fallback" ; then
9755                         { { echo "$as_me:9755: error: You have disabled the database w/o specifying fallbacks" >&5
9756 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9757    { (exit 1); exit 1; }; }
9758                 fi
9759         fi
9760
9761 cat >>confdefs.h <<\EOF
9762 #define PURE_TERMINFO 1
9763 EOF
9764
9765 else
9766
9767         if test "$with_ticlib" != no ; then
9768                 { { echo "$as_me:9768: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9769 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9770    { (exit 1); exit 1; }; }
9771         fi
9772
9773         NCURSES_USE_TERMCAP=1
9774         echo "$as_me:9774: checking for list of termcap files" >&5
9775 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9776
9777 # Check whether --with-termpath or --without-termpath was given.
9778 if test "${with_termpath+set}" = set; then
9779   withval="$with_termpath"
9780
9781 else
9782   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9783 fi;
9784 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9785 cf_dst_path=
9786 for cf_src_path in $withval
9787 do
9788
9789 if test "x$prefix" != xNONE; then
9790         cf_path_syntax="$prefix"
9791 else
9792         cf_path_syntax="$ac_default_prefix"
9793 fi
9794
9795 case ".$cf_src_path" in
9796 (.\$\(*\)*|.\'*\'*)
9797         ;;
9798 (..|./*|.\\*)
9799         ;;
9800 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9801         ;;
9802 (.\$\{*prefix\}*|.\$\{*dir\}*)
9803         eval cf_src_path="$cf_src_path"
9804         case ".$cf_src_path" in
9805         (.NONE/*)
9806                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9807                 ;;
9808         esac
9809         ;;
9810 (.no|.NONE/*)
9811         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9812         ;;
9813 (*)
9814         { { echo "$as_me:9814: error: expected a pathname, not \"$cf_src_path\"" >&5
9815 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9816    { (exit 1); exit 1; }; }
9817         ;;
9818 esac
9819
9820   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9821   cf_dst_path="${cf_dst_path}${cf_src_path}"
9822 done
9823 IFS="$ac_save_ifs"
9824
9825 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9826 # so we have to check/work around.  We do prefer the result of "eval"...
9827 eval cf_dst_eval="$cf_dst_path"
9828 case "x$cf_dst_eval" in
9829 (xNONE*)
9830         TERMPATH=$cf_dst_path
9831         ;;
9832 (*)
9833         TERMPATH="$cf_dst_eval"
9834         ;;
9835 esac
9836
9837         echo "$as_me:9837: result: $TERMPATH" >&5
9838 echo "${ECHO_T}$TERMPATH" >&6
9839         test -n "$TERMPATH" &&
9840 cat >>confdefs.h <<EOF
9841 #define TERMPATH "$TERMPATH"
9842 EOF
9843
9844         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9845         echo "$as_me:9845: checking if fast termcap-loader is needed" >&5
9846 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9847
9848 # Check whether --enable-getcap or --disable-getcap was given.
9849 if test "${enable_getcap+set}" = set; then
9850   enableval="$enable_getcap"
9851   with_getcap=$enableval
9852 else
9853   with_getcap=no
9854 fi;
9855         echo "$as_me:9855: result: $with_getcap" >&5
9856 echo "${ECHO_T}$with_getcap" >&6
9857         test "x$with_getcap" = "xyes" &&
9858 cat >>confdefs.h <<\EOF
9859 #define USE_GETCAP 1
9860 EOF
9861
9862         echo "$as_me:9862: checking if translated termcaps will be cached in ~/.terminfo" >&5
9863 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9864
9865 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9866 if test "${enable_getcap_cache+set}" = set; then
9867   enableval="$enable_getcap_cache"
9868   with_getcap_cache=$enableval
9869 else
9870   with_getcap_cache=no
9871 fi;
9872         echo "$as_me:9872: result: $with_getcap_cache" >&5
9873 echo "${ECHO_T}$with_getcap_cache" >&6
9874         test "x$with_getcap_cache" = "xyes" &&
9875 cat >>confdefs.h <<\EOF
9876 #define USE_GETCAP_CACHE 1
9877 EOF
9878
9879 fi
9880
9881 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9882 echo "$as_me:9882: checking if ~/.terminfo is wanted" >&5
9883 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9884
9885 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9886 if test "${enable_home_terminfo+set}" = set; then
9887   enableval="$enable_home_terminfo"
9888   with_home_terminfo=$enableval
9889 else
9890   with_home_terminfo=yes
9891 fi;
9892 echo "$as_me:9892: result: $with_home_terminfo" >&5
9893 echo "${ECHO_T}$with_home_terminfo" >&6
9894 test "x$with_home_terminfo" = "xyes" &&
9895 cat >>confdefs.h <<\EOF
9896 #define USE_HOME_TERMINFO 1
9897 EOF
9898
9899 echo "$as_me:9899: checking if you want to permit root to use ncurses environment variables" >&5
9900 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9901
9902 # Check whether --enable-root-environ or --disable-root-environ was given.
9903 if test "${enable_root_environ+set}" = set; then
9904   enableval="$enable_root_environ"
9905   with_root_environ=$enableval
9906 else
9907   with_root_environ=yes
9908 fi;
9909 echo "$as_me:9909: result: $with_root_environ" >&5
9910 echo "${ECHO_T}$with_root_environ" >&6
9911 test "x$with_root_environ" = xyes &&
9912 cat >>confdefs.h <<\EOF
9913 #define USE_ROOT_ENVIRON 1
9914 EOF
9915
9916 echo "$as_me:9916: checking if you want to permit setuid programs to access all files" >&5
9917 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9918
9919 # Check whether --enable-root-access or --disable-root-access was given.
9920 if test "${enable_root_access+set}" = set; then
9921   enableval="$enable_root_access"
9922   with_root_access=$enableval
9923 else
9924   with_root_access=yes
9925 fi;
9926 echo "$as_me:9926: result: $with_root_access" >&5
9927 echo "${ECHO_T}$with_root_access" >&6
9928 test "x$with_root_access" = xyes &&
9929 cat >>confdefs.h <<\EOF
9930 #define USE_ROOT_ACCESS 1
9931 EOF
9932
9933 echo "$as_me:9933: checking if you want to permit setuid use of ncurses environment variables" >&5
9934 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9935
9936 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9937 if test "${enable_setuid_environ+set}" = set; then
9938   enableval="$enable_setuid_environ"
9939   with_setuid_environ=$enableval
9940 else
9941   with_setuid_environ=$with_root_environ
9942 fi;
9943 echo "$as_me:9943: result: $with_setuid_environ" >&5
9944 echo "${ECHO_T}$with_setuid_environ" >&6
9945 test "x$with_setuid_environ" = xyes &&
9946 cat >>confdefs.h <<\EOF
9947 #define USE_SETUID_ENVIRON 1
9948 EOF
9949
9950 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9951 ###   to reduce storage requirements for the terminfo database.
9952
9953 for ac_header in \
9954 unistd.h \
9955
9956 do
9957 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9958 echo "$as_me:9958: checking for $ac_header" >&5
9959 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9960 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9961   echo $ECHO_N "(cached) $ECHO_C" >&6
9962 else
9963   cat >"conftest.$ac_ext" <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9966 #include <$ac_header>
9967 _ACEOF
9968 if { (eval echo "$as_me:9968: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9969   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9970   ac_status=$?
9971   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9972   rm -f conftest.er1
9973   cat conftest.err >&5
9974   echo "$as_me:9974: \$? = $ac_status" >&5
9975   (exit "$ac_status"); } >/dev/null; then
9976   if test -s conftest.err; then
9977     ac_cpp_err=$ac_c_preproc_warn_flag
9978   else
9979     ac_cpp_err=
9980   fi
9981 else
9982   ac_cpp_err=yes
9983 fi
9984 if test -z "$ac_cpp_err"; then
9985   eval "$as_ac_Header=yes"
9986 else
9987   echo "$as_me: failed program was:" >&5
9988   cat "conftest.$ac_ext" >&5
9989   eval "$as_ac_Header=no"
9990 fi
9991 rm -f conftest.err "conftest.$ac_ext"
9992 fi
9993 echo "$as_me:9993: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9994 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9995 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9996   cat >>confdefs.h <<EOF
9997 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9998 EOF
9999
10000 fi
10001 done
10002
10003 for ac_func in \
10004         remove \
10005         unlink
10006 do
10007 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10008 echo "$as_me:10008: checking for $ac_func" >&5
10009 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10010 if eval "test \"\${$as_ac_var+set}\" = set"; then
10011   echo $ECHO_N "(cached) $ECHO_C" >&6
10012 else
10013   cat >"conftest.$ac_ext" <<_ACEOF
10014 #line 10014 "configure"
10015 #include "confdefs.h"
10016 #define $ac_func autoconf_temporary
10017 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10018 #undef $ac_func
10019
10020 #ifdef __cplusplus
10021 extern "C"
10022 #endif
10023
10024 /* We use char because int might match the return type of a gcc2
10025    builtin and then its argument prototype would still apply.  */
10026 char $ac_func (void);
10027
10028 int
10029 main (void)
10030 {
10031
10032 /* The GNU C library defines stubs for functions which it implements
10033     to always fail with ENOSYS.  Some functions are actually named
10034     something starting with __ and the normal name is an alias.  */
10035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10036 #error found stub for $ac_func
10037 #endif
10038
10039         return $ac_func ();
10040   ;
10041   return 0;
10042 }
10043 _ACEOF
10044 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10045 if { (eval echo "$as_me:10045: \"$ac_link\"") >&5
10046   (eval $ac_link) 2>&5
10047   ac_status=$?
10048   echo "$as_me:10048: \$? = $ac_status" >&5
10049   (exit "$ac_status"); } &&
10050          { ac_try='test -s "conftest$ac_exeext"'
10051   { (eval echo "$as_me:10051: \"$ac_try\"") >&5
10052   (eval $ac_try) 2>&5
10053   ac_status=$?
10054   echo "$as_me:10054: \$? = $ac_status" >&5
10055   (exit "$ac_status"); }; }; then
10056   eval "$as_ac_var=yes"
10057 else
10058   echo "$as_me: failed program was:" >&5
10059 cat "conftest.$ac_ext" >&5
10060 eval "$as_ac_var=no"
10061 fi
10062 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10063 fi
10064 echo "$as_me:10064: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10065 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10066 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10067   cat >>confdefs.h <<EOF
10068 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10069 EOF
10070
10071 fi
10072 done
10073
10074 if test "$cross_compiling" = yes ; then
10075
10076 for ac_func in \
10077                 link \
10078                 symlink
10079 do
10080 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10081 echo "$as_me:10081: checking for $ac_func" >&5
10082 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10083 if eval "test \"\${$as_ac_var+set}\" = set"; then
10084   echo $ECHO_N "(cached) $ECHO_C" >&6
10085 else
10086   cat >"conftest.$ac_ext" <<_ACEOF
10087 #line 10087 "configure"
10088 #include "confdefs.h"
10089 #define $ac_func autoconf_temporary
10090 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10091 #undef $ac_func
10092
10093 #ifdef __cplusplus
10094 extern "C"
10095 #endif
10096
10097 /* We use char because int might match the return type of a gcc2
10098    builtin and then its argument prototype would still apply.  */
10099 char $ac_func (void);
10100
10101 int
10102 main (void)
10103 {
10104
10105 /* The GNU C library defines stubs for functions which it implements
10106     to always fail with ENOSYS.  Some functions are actually named
10107     something starting with __ and the normal name is an alias.  */
10108 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10109 #error found stub for $ac_func
10110 #endif
10111
10112         return $ac_func ();
10113   ;
10114   return 0;
10115 }
10116 _ACEOF
10117 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10118 if { (eval echo "$as_me:10118: \"$ac_link\"") >&5
10119   (eval $ac_link) 2>&5
10120   ac_status=$?
10121   echo "$as_me:10121: \$? = $ac_status" >&5
10122   (exit "$ac_status"); } &&
10123          { ac_try='test -s "conftest$ac_exeext"'
10124   { (eval echo "$as_me:10124: \"$ac_try\"") >&5
10125   (eval $ac_try) 2>&5
10126   ac_status=$?
10127   echo "$as_me:10127: \$? = $ac_status" >&5
10128   (exit "$ac_status"); }; }; then
10129   eval "$as_ac_var=yes"
10130 else
10131   echo "$as_me: failed program was:" >&5
10132 cat "conftest.$ac_ext" >&5
10133 eval "$as_ac_var=no"
10134 fi
10135 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10136 fi
10137 echo "$as_me:10137: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10138 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10139 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10140   cat >>confdefs.h <<EOF
10141 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10142 EOF
10143
10144 fi
10145 done
10146
10147 else
10148         echo "$as_me:10148: checking if link/symlink functions work" >&5
10149 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10150 if test "${cf_cv_link_funcs+set}" = set; then
10151   echo $ECHO_N "(cached) $ECHO_C" >&6
10152 else
10153
10154                 cf_cv_link_funcs=
10155                 for cf_func in link symlink ; do
10156                         if test "$cross_compiling" = yes; then
10157
10158                         eval 'ac_cv_func_'$cf_func'=error'
10159 else
10160   cat >"conftest.$ac_ext" <<_ACEOF
10161 #line 10161 "configure"
10162 #include "confdefs.h"
10163
10164 $ac_includes_default
10165
10166 int main(void)
10167 {
10168         int fail = 0;
10169         char *src = "conftest.tmp";
10170         char *dst = "conftest.chk";
10171         struct stat src_sb, dst_sb;
10172         FILE *fp = fopen(src, "w");
10173         if (fp == 0) { fail = 3; } else {
10174                 fclose(fp); stat(src, &src_sb);
10175                 if ($cf_func(src, dst) < 0) {
10176                         fail = 1;
10177                 } else if (stat(dst, &dst_sb) < 0) {
10178                         fail = 2;
10179                 } else {
10180                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10181                         if (diff < 0) diff = -diff;
10182                         if (diff > 2) fail = 3;
10183                 }
10184         }
10185 #ifdef HAVE_UNLINK
10186         unlink(dst); unlink(src);
10187 #else
10188         remove(dst); remove(src);
10189 #endif
10190         ${cf_cv_main_return:-return} (fail);
10191 }
10192
10193 _ACEOF
10194 rm -f "conftest$ac_exeext"
10195 if { (eval echo "$as_me:10195: \"$ac_link\"") >&5
10196   (eval $ac_link) 2>&5
10197   ac_status=$?
10198   echo "$as_me:10198: \$? = $ac_status" >&5
10199   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10200   { (eval echo "$as_me:10200: \"$ac_try\"") >&5
10201   (eval $ac_try) 2>&5
10202   ac_status=$?
10203   echo "$as_me:10203: \$? = $ac_status" >&5
10204   (exit "$ac_status"); }; }; then
10205
10206                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10207                         eval 'ac_cv_func_'$cf_func'=yes'
10208 else
10209   echo "$as_me: program exited with status $ac_status" >&5
10210 echo "$as_me: failed program was:" >&5
10211 cat "conftest.$ac_ext" >&5
10212
10213                         eval 'ac_cv_func_'$cf_func'=no'
10214 fi
10215 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10216 fi
10217                 done
10218                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10219
10220 fi
10221 echo "$as_me:10221: result: $cf_cv_link_funcs" >&5
10222 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10223         test "$ac_cv_func_link"    = yes &&
10224 cat >>confdefs.h <<\EOF
10225 #define HAVE_LINK 1
10226 EOF
10227
10228         test "$ac_cv_func_symlink" = yes &&
10229 cat >>confdefs.h <<\EOF
10230 #define HAVE_SYMLINK 1
10231 EOF
10232
10233 fi
10234
10235 with_links=no
10236 with_symlinks=no
10237
10238 # soft links (symbolic links) are useful for some systems where hard links do
10239 # not work, or to make it simpler to copy terminfo trees around.
10240 if test "x$ac_cv_func_symlink" = xyes ; then
10241         echo "$as_me:10241: checking if tic should use symbolic links" >&5
10242 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10243
10244 # Check whether --enable-symlinks or --disable-symlinks was given.
10245 if test "${enable_symlinks+set}" = set; then
10246   enableval="$enable_symlinks"
10247   with_symlinks=$enableval
10248 else
10249   with_symlinks=no
10250 fi;
10251         echo "$as_me:10251: result: $with_symlinks" >&5
10252 echo "${ECHO_T}$with_symlinks" >&6
10253 fi
10254
10255 # If we have hard links and did not choose to use soft links instead, there is
10256 # no reason to make this choice optional - use the hard links.
10257 if test "$with_symlinks" = no ; then
10258         echo "$as_me:10258: checking if tic should use hard links" >&5
10259 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10260         if test "x$ac_cv_func_link" = xyes ; then
10261                 with_links=yes
10262         else
10263                 with_links=no
10264         fi
10265         echo "$as_me:10265: result: $with_links" >&5
10266 echo "${ECHO_T}$with_links" >&6
10267 fi
10268
10269 test "x$with_links" = xyes &&
10270 cat >>confdefs.h <<\EOF
10271 #define USE_LINKS 1
10272 EOF
10273
10274 test "x$with_symlinks" = xyes &&
10275 cat >>confdefs.h <<\EOF
10276 #define USE_SYMLINKS 1
10277 EOF
10278
10279 ###   use option --enable-broken-linker to force on use of broken-linker support
10280
10281 echo "$as_me:10281: checking if you want broken-linker support code" >&5
10282 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10283
10284 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10285 if test "${enable_broken_linker+set}" = set; then
10286   enableval="$enable_broken_linker"
10287   with_broken_linker=$enableval
10288 else
10289   with_broken_linker=no
10290 fi;
10291 echo "$as_me:10291: result: $with_broken_linker" >&5
10292 echo "${ECHO_T}$with_broken_linker" >&6
10293
10294 : "${BROKEN_LINKER:=0}"
10295 if test "x$with_broken_linker" = xyes ; then
10296
10297 cat >>confdefs.h <<\EOF
10298 #define BROKEN_LINKER 1
10299 EOF
10300
10301         BROKEN_LINKER=1
10302 fi
10303
10304 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10305 echo "$as_me:10305: checking if tputs should process BSD-style prefix padding" >&5
10306 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10307
10308 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10309 if test "${enable_bsdpad+set}" = set; then
10310   enableval="$enable_bsdpad"
10311   with_bsdpad=$enableval
10312 else
10313   with_bsdpad=no
10314 fi;
10315 echo "$as_me:10315: result: $with_bsdpad" >&5
10316 echo "${ECHO_T}$with_bsdpad" >&6
10317 test "x$with_bsdpad" = xyes &&
10318 cat >>confdefs.h <<\EOF
10319 #define BSD_TPUTS 1
10320 EOF
10321
10322 ###   use option --enable-widec to turn on use of wide-character support
10323 NCURSES_CH_T=chtype
10324 NCURSES_LIBUTF8=0
10325
10326 NEED_WCHAR_H=0
10327 NCURSES_MBSTATE_T=0
10328 NCURSES_WCHAR_T=0
10329 NCURSES_WINT_T=0
10330
10331 # Check to define _XOPEN_SOURCE "automatically"
10332 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10333
10334 echo "$as_me:10334: checking if the POSIX test-macros are already defined" >&5
10335 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10336 if test "${cf_cv_posix_visible+set}" = set; then
10337   echo $ECHO_N "(cached) $ECHO_C" >&6
10338 else
10339
10340 cat >"conftest.$ac_ext" <<_ACEOF
10341 #line 10341 "configure"
10342 #include "confdefs.h"
10343 #include <stdio.h>
10344 int
10345 main (void)
10346 {
10347
10348 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10349         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10350         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10351         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10352 #error conflicting symbols found
10353 #endif
10354
10355   ;
10356   return 0;
10357 }
10358 _ACEOF
10359 rm -f "conftest.$ac_objext"
10360 if { (eval echo "$as_me:10360: \"$ac_compile\"") >&5
10361   (eval $ac_compile) 2>&5
10362   ac_status=$?
10363   echo "$as_me:10363: \$? = $ac_status" >&5
10364   (exit "$ac_status"); } &&
10365          { ac_try='test -s "conftest.$ac_objext"'
10366   { (eval echo "$as_me:10366: \"$ac_try\"") >&5
10367   (eval $ac_try) 2>&5
10368   ac_status=$?
10369   echo "$as_me:10369: \$? = $ac_status" >&5
10370   (exit "$ac_status"); }; }; then
10371   cf_cv_posix_visible=no
10372 else
10373   echo "$as_me: failed program was:" >&5
10374 cat "conftest.$ac_ext" >&5
10375 cf_cv_posix_visible=yes
10376 fi
10377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10378
10379 fi
10380 echo "$as_me:10380: result: $cf_cv_posix_visible" >&5
10381 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10382
10383 if test "$cf_cv_posix_visible" = no; then
10384
10385 cf_XOPEN_SOURCE=600
10386 cf_POSIX_C_SOURCE=199506L
10387 cf_xopen_source=
10388
10389 case "$host_os" in
10390 (aix[4-7]*)
10391         cf_xopen_source="-D_ALL_SOURCE"
10392         ;;
10393 (darwin[0-8].*)
10394         cf_xopen_source="-D_APPLE_C_SOURCE"
10395         ;;
10396 (darwin*)
10397         cf_xopen_source="-D_DARWIN_C_SOURCE"
10398         cf_XOPEN_SOURCE=
10399         ;;
10400 (freebsd*|dragonfly*|midnightbsd*)
10401         # 5.x headers associate
10402         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10403         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10404         cf_POSIX_C_SOURCE=200112L
10405         cf_XOPEN_SOURCE=600
10406         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10407         ;;
10408 (hpux11*)
10409         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10410         ;;
10411 (hpux*)
10412         cf_xopen_source="-D_HPUX_SOURCE"
10413         ;;
10414 (irix[56].*)
10415         cf_xopen_source="-D_SGI_SOURCE"
10416         cf_XOPEN_SOURCE=
10417         ;;
10418 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10419
10420 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10421
10422 echo "$as_me:10422: checking if this is the GNU C library" >&5
10423 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10424 if test "${cf_cv_gnu_library+set}" = set; then
10425   echo $ECHO_N "(cached) $ECHO_C" >&6
10426 else
10427
10428 cat >"conftest.$ac_ext" <<_ACEOF
10429 #line 10429 "configure"
10430 #include "confdefs.h"
10431 #include <sys/types.h>
10432 int
10433 main (void)
10434 {
10435
10436         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10437                 return 0;
10438         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10439                 return 0;
10440         #else
10441         #       error not GNU C library
10442         #endif
10443   ;
10444   return 0;
10445 }
10446 _ACEOF
10447 rm -f "conftest.$ac_objext"
10448 if { (eval echo "$as_me:10448: \"$ac_compile\"") >&5
10449   (eval $ac_compile) 2>&5
10450   ac_status=$?
10451   echo "$as_me:10451: \$? = $ac_status" >&5
10452   (exit "$ac_status"); } &&
10453          { ac_try='test -s "conftest.$ac_objext"'
10454   { (eval echo "$as_me:10454: \"$ac_try\"") >&5
10455   (eval $ac_try) 2>&5
10456   ac_status=$?
10457   echo "$as_me:10457: \$? = $ac_status" >&5
10458   (exit "$ac_status"); }; }; then
10459   cf_cv_gnu_library=yes
10460 else
10461   echo "$as_me: failed program was:" >&5
10462 cat "conftest.$ac_ext" >&5
10463 cf_cv_gnu_library=no
10464 fi
10465 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10466
10467 fi
10468 echo "$as_me:10468: result: $cf_cv_gnu_library" >&5
10469 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10470
10471 if test x$cf_cv_gnu_library = xyes; then
10472
10473         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10474         # was changed to help a little.  newlib incorporated the change about 4
10475         # years later.
10476         echo "$as_me:10476: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10477 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10478 if test "${cf_cv_gnu_library_219+set}" = set; then
10479   echo $ECHO_N "(cached) $ECHO_C" >&6
10480 else
10481
10482                 cf_save="$CPPFLAGS"
10483
10484         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10485         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10486
10487                 cat >"conftest.$ac_ext" <<_ACEOF
10488 #line 10488 "configure"
10489 #include "confdefs.h"
10490 #include <sys/types.h>
10491 int
10492 main (void)
10493 {
10494
10495                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10496                                 return 0;
10497                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10498                                 return 0;
10499                         #else
10500                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10501                         #endif
10502   ;
10503   return 0;
10504 }
10505 _ACEOF
10506 rm -f "conftest.$ac_objext"
10507 if { (eval echo "$as_me:10507: \"$ac_compile\"") >&5
10508   (eval $ac_compile) 2>&5
10509   ac_status=$?
10510   echo "$as_me:10510: \$? = $ac_status" >&5
10511   (exit "$ac_status"); } &&
10512          { ac_try='test -s "conftest.$ac_objext"'
10513   { (eval echo "$as_me:10513: \"$ac_try\"") >&5
10514   (eval $ac_try) 2>&5
10515   ac_status=$?
10516   echo "$as_me:10516: \$? = $ac_status" >&5
10517   (exit "$ac_status"); }; }; then
10518   cf_cv_gnu_library_219=yes
10519 else
10520   echo "$as_me: failed program was:" >&5
10521 cat "conftest.$ac_ext" >&5
10522 cf_cv_gnu_library_219=no
10523 fi
10524 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10525                 CPPFLAGS="$cf_save"
10526
10527 fi
10528 echo "$as_me:10528: result: $cf_cv_gnu_library_219" >&5
10529 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10530
10531         if test "x$cf_cv_gnu_library_219" = xyes; then
10532                 cf_save="$CPPFLAGS"
10533                 echo "$as_me:10533: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10534 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10535 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10536   echo $ECHO_N "(cached) $ECHO_C" >&6
10537 else
10538
10539 cf_fix_cppflags=no
10540 cf_new_cflags=
10541 cf_new_cppflags=
10542 cf_new_extra_cppflags=
10543
10544 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10545 do
10546 case "$cf_fix_cppflags" in
10547 (no)
10548         case "$cf_add_cflags" in
10549         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10550                 case "$cf_add_cflags" in
10551                 (-D*)
10552                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10553
10554                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10555                                 && test -z "${cf_tst_cflags}" \
10556                                 && cf_fix_cppflags=yes
10557
10558                         if test "$cf_fix_cppflags" = yes ; then
10559
10560         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10561         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10562
10563                                 continue
10564                         elif test "${cf_tst_cflags}" = "\"'" ; then
10565
10566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10568
10569                                 continue
10570                         fi
10571                         ;;
10572                 esac
10573                 case "$CPPFLAGS" in
10574                 (*$cf_add_cflags)
10575                         ;;
10576                 (*)
10577                         case "$cf_add_cflags" in
10578                         (-D*)
10579                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10580
10581 CPPFLAGS=`echo "$CPPFLAGS" | \
10582         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10583                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10584
10585                                 ;;
10586                         esac
10587
10588         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10589         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10590
10591                         ;;
10592                 esac
10593                 ;;
10594         (*)
10595
10596         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10597         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10598
10599                 ;;
10600         esac
10601         ;;
10602 (yes)
10603
10604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10606
10607         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10608
10609         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10610                 && test -z "${cf_tst_cflags}" \
10611                 && cf_fix_cppflags=no
10612         ;;
10613 esac
10614 done
10615
10616 if test -n "$cf_new_cflags" ; then
10617
10618         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10619         CFLAGS="${CFLAGS}$cf_new_cflags"
10620
10621 fi
10622
10623 if test -n "$cf_new_cppflags" ; then
10624
10625         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10626         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10627
10628 fi
10629
10630 if test -n "$cf_new_extra_cppflags" ; then
10631
10632         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10633         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10634
10635 fi
10636
10637                         cat >"conftest.$ac_ext" <<_ACEOF
10638 #line 10638 "configure"
10639 #include "confdefs.h"
10640
10641                                 #include <limits.h>
10642                                 #include <sys/types.h>
10643
10644 int
10645 main (void)
10646 {
10647
10648                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10649                                         return 0;
10650                                 #else
10651                                 #       error GNU C library is too old
10652                                 #endif
10653   ;
10654   return 0;
10655 }
10656 _ACEOF
10657 rm -f "conftest.$ac_objext"
10658 if { (eval echo "$as_me:10658: \"$ac_compile\"") >&5
10659   (eval $ac_compile) 2>&5
10660   ac_status=$?
10661   echo "$as_me:10661: \$? = $ac_status" >&5
10662   (exit "$ac_status"); } &&
10663          { ac_try='test -s "conftest.$ac_objext"'
10664   { (eval echo "$as_me:10664: \"$ac_try\"") >&5
10665   (eval $ac_try) 2>&5
10666   ac_status=$?
10667   echo "$as_me:10667: \$? = $ac_status" >&5
10668   (exit "$ac_status"); }; }; then
10669   cf_cv_gnu_dftsrc_219=yes
10670 else
10671   echo "$as_me: failed program was:" >&5
10672 cat "conftest.$ac_ext" >&5
10673 cf_cv_gnu_dftsrc_219=no
10674 fi
10675 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10676
10677 fi
10678 echo "$as_me:10678: result: $cf_cv_gnu_dftsrc_219" >&5
10679 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10680                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10681         else
10682                 cf_cv_gnu_dftsrc_219=maybe
10683         fi
10684
10685         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10686
10687                 echo "$as_me:10687: checking if we must define _GNU_SOURCE" >&5
10688 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10689 if test "${cf_cv_gnu_source+set}" = set; then
10690   echo $ECHO_N "(cached) $ECHO_C" >&6
10691 else
10692
10693                 cat >"conftest.$ac_ext" <<_ACEOF
10694 #line 10694 "configure"
10695 #include "confdefs.h"
10696 #include <sys/types.h>
10697 int
10698 main (void)
10699 {
10700
10701                         #ifndef _XOPEN_SOURCE
10702                         #error  expected _XOPEN_SOURCE to be defined
10703                         #endif
10704   ;
10705   return 0;
10706 }
10707 _ACEOF
10708 rm -f "conftest.$ac_objext"
10709 if { (eval echo "$as_me:10709: \"$ac_compile\"") >&5
10710   (eval $ac_compile) 2>&5
10711   ac_status=$?
10712   echo "$as_me:10712: \$? = $ac_status" >&5
10713   (exit "$ac_status"); } &&
10714          { ac_try='test -s "conftest.$ac_objext"'
10715   { (eval echo "$as_me:10715: \"$ac_try\"") >&5
10716   (eval $ac_try) 2>&5
10717   ac_status=$?
10718   echo "$as_me:10718: \$? = $ac_status" >&5
10719   (exit "$ac_status"); }; }; then
10720   cf_cv_gnu_source=no
10721 else
10722   echo "$as_me: failed program was:" >&5
10723 cat "conftest.$ac_ext" >&5
10724 cf_save="$CPPFLAGS"
10725
10726 cf_fix_cppflags=no
10727 cf_new_cflags=
10728 cf_new_cppflags=
10729 cf_new_extra_cppflags=
10730
10731 for cf_add_cflags in -D_GNU_SOURCE
10732 do
10733 case "$cf_fix_cppflags" in
10734 (no)
10735         case "$cf_add_cflags" in
10736         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10737                 case "$cf_add_cflags" in
10738                 (-D*)
10739                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10740
10741                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10742                                 && test -z "${cf_tst_cflags}" \
10743                                 && cf_fix_cppflags=yes
10744
10745                         if test "$cf_fix_cppflags" = yes ; then
10746
10747         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10748         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10749
10750                                 continue
10751                         elif test "${cf_tst_cflags}" = "\"'" ; then
10752
10753         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10754         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10755
10756                                 continue
10757                         fi
10758                         ;;
10759                 esac
10760                 case "$CPPFLAGS" in
10761                 (*$cf_add_cflags)
10762                         ;;
10763                 (*)
10764                         case "$cf_add_cflags" in
10765                         (-D*)
10766                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10767
10768 CPPFLAGS=`echo "$CPPFLAGS" | \
10769         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10770                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10771
10772                                 ;;
10773                         esac
10774
10775         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10776         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10777
10778                         ;;
10779                 esac
10780                 ;;
10781         (*)
10782
10783         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10784         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10785
10786                 ;;
10787         esac
10788         ;;
10789 (yes)
10790
10791         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10792         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10793
10794         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10795
10796         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10797                 && test -z "${cf_tst_cflags}" \
10798                 && cf_fix_cppflags=no
10799         ;;
10800 esac
10801 done
10802
10803 if test -n "$cf_new_cflags" ; then
10804
10805         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10806         CFLAGS="${CFLAGS}$cf_new_cflags"
10807
10808 fi
10809
10810 if test -n "$cf_new_cppflags" ; then
10811
10812         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10813         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10814
10815 fi
10816
10817 if test -n "$cf_new_extra_cppflags" ; then
10818
10819         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10820         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10821
10822 fi
10823
10824                          cat >"conftest.$ac_ext" <<_ACEOF
10825 #line 10825 "configure"
10826 #include "confdefs.h"
10827 #include <sys/types.h>
10828 int
10829 main (void)
10830 {
10831
10832                                 #ifdef _XOPEN_SOURCE
10833                                 #error  expected _XOPEN_SOURCE to be undefined
10834                                 #endif
10835   ;
10836   return 0;
10837 }
10838 _ACEOF
10839 rm -f "conftest.$ac_objext"
10840 if { (eval echo "$as_me:10840: \"$ac_compile\"") >&5
10841   (eval $ac_compile) 2>&5
10842   ac_status=$?
10843   echo "$as_me:10843: \$? = $ac_status" >&5
10844   (exit "$ac_status"); } &&
10845          { ac_try='test -s "conftest.$ac_objext"'
10846   { (eval echo "$as_me:10846: \"$ac_try\"") >&5
10847   (eval $ac_try) 2>&5
10848   ac_status=$?
10849   echo "$as_me:10849: \$? = $ac_status" >&5
10850   (exit "$ac_status"); }; }; then
10851   cf_cv_gnu_source=no
10852 else
10853   echo "$as_me: failed program was:" >&5
10854 cat "conftest.$ac_ext" >&5
10855 cf_cv_gnu_source=yes
10856 fi
10857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10858                         CPPFLAGS="$cf_save"
10859
10860 fi
10861 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10862
10863 fi
10864 echo "$as_me:10864: result: $cf_cv_gnu_source" >&5
10865 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10866
10867                 if test "$cf_cv_gnu_source" = yes
10868                 then
10869                 echo "$as_me:10869: checking if we should also define _DEFAULT_SOURCE" >&5
10870 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10871 if test "${cf_cv_default_source+set}" = set; then
10872   echo $ECHO_N "(cached) $ECHO_C" >&6
10873 else
10874
10875         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10876         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10877
10878                         cat >"conftest.$ac_ext" <<_ACEOF
10879 #line 10879 "configure"
10880 #include "confdefs.h"
10881 #include <sys/types.h>
10882 int
10883 main (void)
10884 {
10885
10886                                 #ifdef _DEFAULT_SOURCE
10887                                 #error  expected _DEFAULT_SOURCE to be undefined
10888                                 #endif
10889   ;
10890   return 0;
10891 }
10892 _ACEOF
10893 rm -f "conftest.$ac_objext"
10894 if { (eval echo "$as_me:10894: \"$ac_compile\"") >&5
10895   (eval $ac_compile) 2>&5
10896   ac_status=$?
10897   echo "$as_me:10897: \$? = $ac_status" >&5
10898   (exit "$ac_status"); } &&
10899          { ac_try='test -s "conftest.$ac_objext"'
10900   { (eval echo "$as_me:10900: \"$ac_try\"") >&5
10901   (eval $ac_try) 2>&5
10902   ac_status=$?
10903   echo "$as_me:10903: \$? = $ac_status" >&5
10904   (exit "$ac_status"); }; }; then
10905   cf_cv_default_source=no
10906 else
10907   echo "$as_me: failed program was:" >&5
10908 cat "conftest.$ac_ext" >&5
10909 cf_cv_default_source=yes
10910 fi
10911 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10912
10913 fi
10914 echo "$as_me:10914: result: $cf_cv_default_source" >&5
10915 echo "${ECHO_T}$cf_cv_default_source" >&6
10916                         if test "$cf_cv_default_source" = yes
10917                         then
10918
10919         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10920         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10921
10922                         fi
10923                 fi
10924         fi
10925
10926 fi
10927
10928         ;;
10929 (minix*)
10930         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10931         ;;
10932 (mirbsd*)
10933         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10934         cf_XOPEN_SOURCE=
10935
10936 if test "$cf_cv_posix_visible" = no; then
10937
10938 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10939
10940 cf_save_CFLAGS="$CFLAGS"
10941 cf_save_CPPFLAGS="$CPPFLAGS"
10942
10943 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10944         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10945                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10946
10947 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10948         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10949                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10950
10951 echo "$as_me:10951: checking if we should define _POSIX_C_SOURCE" >&5
10952 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10953 if test "${cf_cv_posix_c_source+set}" = set; then
10954   echo $ECHO_N "(cached) $ECHO_C" >&6
10955 else
10956
10957 echo "${as_me:-configure}:10957: testing if the symbol is already defined go no further ..." 1>&5
10958
10959         cat >"conftest.$ac_ext" <<_ACEOF
10960 #line 10960 "configure"
10961 #include "confdefs.h"
10962 #include <sys/types.h>
10963 int
10964 main (void)
10965 {
10966
10967 #ifndef _POSIX_C_SOURCE
10968 #error _POSIX_C_SOURCE is not defined
10969 #endif
10970   ;
10971   return 0;
10972 }
10973 _ACEOF
10974 rm -f "conftest.$ac_objext"
10975 if { (eval echo "$as_me:10975: \"$ac_compile\"") >&5
10976   (eval $ac_compile) 2>&5
10977   ac_status=$?
10978   echo "$as_me:10978: \$? = $ac_status" >&5
10979   (exit "$ac_status"); } &&
10980          { ac_try='test -s "conftest.$ac_objext"'
10981   { (eval echo "$as_me:10981: \"$ac_try\"") >&5
10982   (eval $ac_try) 2>&5
10983   ac_status=$?
10984   echo "$as_me:10984: \$? = $ac_status" >&5
10985   (exit "$ac_status"); }; }; then
10986   cf_cv_posix_c_source=no
10987 else
10988   echo "$as_me: failed program was:" >&5
10989 cat "conftest.$ac_ext" >&5
10990 cf_want_posix_source=no
10991          case .$cf_POSIX_C_SOURCE in
10992          (.[12]??*)
10993                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10994                 ;;
10995          (.2)
10996                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997                 cf_want_posix_source=yes
10998                 ;;
10999          (.*)
11000                 cf_want_posix_source=yes
11001                 ;;
11002          esac
11003          if test "$cf_want_posix_source" = yes ; then
11004                 cat >"conftest.$ac_ext" <<_ACEOF
11005 #line 11005 "configure"
11006 #include "confdefs.h"
11007 #include <sys/types.h>
11008 int
11009 main (void)
11010 {
11011
11012 #ifdef _POSIX_SOURCE
11013 #error _POSIX_SOURCE is defined
11014 #endif
11015   ;
11016   return 0;
11017 }
11018 _ACEOF
11019 rm -f "conftest.$ac_objext"
11020 if { (eval echo "$as_me:11020: \"$ac_compile\"") >&5
11021   (eval $ac_compile) 2>&5
11022   ac_status=$?
11023   echo "$as_me:11023: \$? = $ac_status" >&5
11024   (exit "$ac_status"); } &&
11025          { ac_try='test -s "conftest.$ac_objext"'
11026   { (eval echo "$as_me:11026: \"$ac_try\"") >&5
11027   (eval $ac_try) 2>&5
11028   ac_status=$?
11029   echo "$as_me:11029: \$? = $ac_status" >&5
11030   (exit "$ac_status"); }; }; then
11031   :
11032 else
11033   echo "$as_me: failed program was:" >&5
11034 cat "conftest.$ac_ext" >&5
11035 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11036 fi
11037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11038          fi
11039
11040 echo "${as_me:-configure}:11040: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11041
11042          CFLAGS="$cf_trim_CFLAGS"
11043          CPPFLAGS="$cf_trim_CPPFLAGS"
11044
11045         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11046         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11047
11048 echo "${as_me:-configure}:11048: testing if the second compile does not leave our definition intact error ..." 1>&5
11049
11050          cat >"conftest.$ac_ext" <<_ACEOF
11051 #line 11051 "configure"
11052 #include "confdefs.h"
11053 #include <sys/types.h>
11054 int
11055 main (void)
11056 {
11057
11058 #ifndef _POSIX_C_SOURCE
11059 #error _POSIX_C_SOURCE is not defined
11060 #endif
11061   ;
11062   return 0;
11063 }
11064 _ACEOF
11065 rm -f "conftest.$ac_objext"
11066 if { (eval echo "$as_me:11066: \"$ac_compile\"") >&5
11067   (eval $ac_compile) 2>&5
11068   ac_status=$?
11069   echo "$as_me:11069: \$? = $ac_status" >&5
11070   (exit "$ac_status"); } &&
11071          { ac_try='test -s "conftest.$ac_objext"'
11072   { (eval echo "$as_me:11072: \"$ac_try\"") >&5
11073   (eval $ac_try) 2>&5
11074   ac_status=$?
11075   echo "$as_me:11075: \$? = $ac_status" >&5
11076   (exit "$ac_status"); }; }; then
11077   :
11078 else
11079   echo "$as_me: failed program was:" >&5
11080 cat "conftest.$ac_ext" >&5
11081 cf_cv_posix_c_source=no
11082 fi
11083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11084          CFLAGS="$cf_save_CFLAGS"
11085          CPPFLAGS="$cf_save_CPPFLAGS"
11086
11087 fi
11088 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11089
11090 fi
11091 echo "$as_me:11091: result: $cf_cv_posix_c_source" >&5
11092 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11093
11094 if test "$cf_cv_posix_c_source" != no ; then
11095         CFLAGS="$cf_trim_CFLAGS"
11096         CPPFLAGS="$cf_trim_CPPFLAGS"
11097
11098 cf_fix_cppflags=no
11099 cf_new_cflags=
11100 cf_new_cppflags=
11101 cf_new_extra_cppflags=
11102
11103 for cf_add_cflags in $cf_cv_posix_c_source
11104 do
11105 case "$cf_fix_cppflags" in
11106 (no)
11107         case "$cf_add_cflags" in
11108         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11109                 case "$cf_add_cflags" in
11110                 (-D*)
11111                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11112
11113                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11114                                 && test -z "${cf_tst_cflags}" \
11115                                 && cf_fix_cppflags=yes
11116
11117                         if test "$cf_fix_cppflags" = yes ; then
11118
11119         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11120         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11121
11122                                 continue
11123                         elif test "${cf_tst_cflags}" = "\"'" ; then
11124
11125         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11126         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11127
11128                                 continue
11129                         fi
11130                         ;;
11131                 esac
11132                 case "$CPPFLAGS" in
11133                 (*$cf_add_cflags)
11134                         ;;
11135                 (*)
11136                         case "$cf_add_cflags" in
11137                         (-D*)
11138                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11139
11140 CPPFLAGS=`echo "$CPPFLAGS" | \
11141         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11142                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11143
11144                                 ;;
11145                         esac
11146
11147         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11148         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11149
11150                         ;;
11151                 esac
11152                 ;;
11153         (*)
11154
11155         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11156         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11157
11158                 ;;
11159         esac
11160         ;;
11161 (yes)
11162
11163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11165
11166         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11167
11168         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11169                 && test -z "${cf_tst_cflags}" \
11170                 && cf_fix_cppflags=no
11171         ;;
11172 esac
11173 done
11174
11175 if test -n "$cf_new_cflags" ; then
11176
11177         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11178         CFLAGS="${CFLAGS}$cf_new_cflags"
11179
11180 fi
11181
11182 if test -n "$cf_new_cppflags" ; then
11183
11184         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11185         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11186
11187 fi
11188
11189 if test -n "$cf_new_extra_cppflags" ; then
11190
11191         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11192         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11193
11194 fi
11195
11196 fi
11197
11198 fi # cf_cv_posix_visible
11199
11200         ;;
11201 (netbsd*)
11202         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11203         ;;
11204 (openbsd[6-9]*)
11205         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11206         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11207         # Abusing the conformance level is a workaround.
11208         { echo "$as_me:11208: WARNING: this system does not provide usable locale support" >&5
11209 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11210         cf_xopen_source="-D_BSD_SOURCE"
11211         cf_XOPEN_SOURCE=700
11212         ;;
11213 (openbsd[4-5]*)
11214         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11215         cf_xopen_source="-D_BSD_SOURCE"
11216         cf_XOPEN_SOURCE=600
11217         ;;
11218 (openbsd*)
11219         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11220         ;;
11221 (osf[45]*)
11222         cf_xopen_source="-D_OSF_SOURCE"
11223         ;;
11224 (nto-qnx*)
11225         cf_xopen_source="-D_QNX_SOURCE"
11226         ;;
11227 (sco*)
11228         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11229         ;;
11230 (solaris2.*)
11231         cf_xopen_source="-D__EXTENSIONS__"
11232         cf_cv_xopen_source=broken
11233         ;;
11234 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11235         cf_XOPEN_SOURCE=
11236         cf_POSIX_C_SOURCE=
11237         ;;
11238 (*)
11239
11240 echo "$as_me:11240: checking if we should define _XOPEN_SOURCE" >&5
11241 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11242 if test "${cf_cv_xopen_source+set}" = set; then
11243   echo $ECHO_N "(cached) $ECHO_C" >&6
11244 else
11245
11246         cat >"conftest.$ac_ext" <<_ACEOF
11247 #line 11247 "configure"
11248 #include "confdefs.h"
11249
11250 $ac_includes_default
11251
11252 int
11253 main (void)
11254 {
11255
11256 #ifndef _XOPEN_SOURCE
11257 #error _XOPEN_SOURCE is not defined
11258 #endif
11259
11260   ;
11261   return 0;
11262 }
11263 _ACEOF
11264 rm -f "conftest.$ac_objext"
11265 if { (eval echo "$as_me:11265: \"$ac_compile\"") >&5
11266   (eval $ac_compile) 2>&5
11267   ac_status=$?
11268   echo "$as_me:11268: \$? = $ac_status" >&5
11269   (exit "$ac_status"); } &&
11270          { ac_try='test -s "conftest.$ac_objext"'
11271   { (eval echo "$as_me:11271: \"$ac_try\"") >&5
11272   (eval $ac_try) 2>&5
11273   ac_status=$?
11274   echo "$as_me:11274: \$? = $ac_status" >&5
11275   (exit "$ac_status"); }; }; then
11276   cf_cv_xopen_source=no
11277 else
11278   echo "$as_me: failed program was:" >&5
11279 cat "conftest.$ac_ext" >&5
11280 cf_save="$CPPFLAGS"
11281
11282         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11283         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11284
11285          cat >"conftest.$ac_ext" <<_ACEOF
11286 #line 11286 "configure"
11287 #include "confdefs.h"
11288
11289 $ac_includes_default
11290
11291 int
11292 main (void)
11293 {
11294
11295 #ifndef _XOPEN_SOURCE
11296 #error _XOPEN_SOURCE is not defined
11297 #endif
11298
11299   ;
11300   return 0;
11301 }
11302 _ACEOF
11303 rm -f "conftest.$ac_objext"
11304 if { (eval echo "$as_me:11304: \"$ac_compile\"") >&5
11305   (eval $ac_compile) 2>&5
11306   ac_status=$?
11307   echo "$as_me:11307: \$? = $ac_status" >&5
11308   (exit "$ac_status"); } &&
11309          { ac_try='test -s "conftest.$ac_objext"'
11310   { (eval echo "$as_me:11310: \"$ac_try\"") >&5
11311   (eval $ac_try) 2>&5
11312   ac_status=$?
11313   echo "$as_me:11313: \$? = $ac_status" >&5
11314   (exit "$ac_status"); }; }; then
11315   cf_cv_xopen_source=no
11316 else
11317   echo "$as_me: failed program was:" >&5
11318 cat "conftest.$ac_ext" >&5
11319 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11320 fi
11321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11322                 CPPFLAGS="$cf_save"
11323
11324 fi
11325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11326
11327 fi
11328 echo "$as_me:11328: result: $cf_cv_xopen_source" >&5
11329 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11330
11331 if test "$cf_cv_xopen_source" != no ; then
11332
11333 CFLAGS=`echo "$CFLAGS" | \
11334         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11335                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11336
11337 CPPFLAGS=`echo "$CPPFLAGS" | \
11338         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11339                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11340
11341         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11342
11343 for cf_add_cflags in $cf_temp_xopen_source
11344 do
11345         case "x$cf_add_cflags" in
11346         (x-[DU]*)
11347
11348 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11349 while true
11350 do
11351         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11352         test "$CFLAGS" != "$cf_old_cflag" || break
11353
11354         CFLAGS="$cf_old_cflag"
11355 done
11356
11357 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11358 while true
11359 do
11360         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11361         test "$CPPFLAGS" != "$cf_old_cflag" || break
11362
11363         CPPFLAGS="$cf_old_cflag"
11364 done
11365
11366                 ;;
11367         esac
11368
11369 cf_fix_cppflags=no
11370 cf_new_cflags=
11371 cf_new_cppflags=
11372 cf_new_extra_cppflags=
11373
11374 for cf_add_cflags in $cf_add_cflags
11375 do
11376 case "$cf_fix_cppflags" in
11377 (no)
11378         case "$cf_add_cflags" in
11379         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11380                 case "$cf_add_cflags" in
11381                 (-D*)
11382                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11383
11384                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11385                                 && test -z "${cf_tst_cflags}" \
11386                                 && cf_fix_cppflags=yes
11387
11388                         if test "$cf_fix_cppflags" = yes ; then
11389
11390         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11391         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11392
11393                                 continue
11394                         elif test "${cf_tst_cflags}" = "\"'" ; then
11395
11396         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11397         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11398
11399                                 continue
11400                         fi
11401                         ;;
11402                 esac
11403                 case "$CPPFLAGS" in
11404                 (*$cf_add_cflags)
11405                         ;;
11406                 (*)
11407                         case "$cf_add_cflags" in
11408                         (-D*)
11409                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11410
11411 CPPFLAGS=`echo "$CPPFLAGS" | \
11412         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11413                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11414
11415                                 ;;
11416                         esac
11417
11418         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11419         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11420
11421                         ;;
11422                 esac
11423                 ;;
11424         (*)
11425
11426         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11427         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11428
11429                 ;;
11430         esac
11431         ;;
11432 (yes)
11433
11434         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11435         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11436
11437         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11438
11439         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11440                 && test -z "${cf_tst_cflags}" \
11441                 && cf_fix_cppflags=no
11442         ;;
11443 esac
11444 done
11445
11446 if test -n "$cf_new_cflags" ; then
11447
11448         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11449         CFLAGS="${CFLAGS}$cf_new_cflags"
11450
11451 fi
11452
11453 if test -n "$cf_new_cppflags" ; then
11454
11455         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11456         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11457
11458 fi
11459
11460 if test -n "$cf_new_extra_cppflags" ; then
11461
11462         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11463         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11464
11465 fi
11466
11467 done
11468
11469 fi
11470
11471         cf_save_xopen_cppflags="$CPPFLAGS"
11472
11473 if test "$cf_cv_posix_visible" = no; then
11474
11475 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11476
11477 cf_save_CFLAGS="$CFLAGS"
11478 cf_save_CPPFLAGS="$CPPFLAGS"
11479
11480 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11481         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11482                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11483
11484 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11485         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11486                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11487
11488 echo "$as_me:11488: checking if we should define _POSIX_C_SOURCE" >&5
11489 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11490 if test "${cf_cv_posix_c_source+set}" = set; then
11491   echo $ECHO_N "(cached) $ECHO_C" >&6
11492 else
11493
11494 echo "${as_me:-configure}:11494: testing if the symbol is already defined go no further ..." 1>&5
11495
11496         cat >"conftest.$ac_ext" <<_ACEOF
11497 #line 11497 "configure"
11498 #include "confdefs.h"
11499 #include <sys/types.h>
11500 int
11501 main (void)
11502 {
11503
11504 #ifndef _POSIX_C_SOURCE
11505 #error _POSIX_C_SOURCE is not defined
11506 #endif
11507   ;
11508   return 0;
11509 }
11510 _ACEOF
11511 rm -f "conftest.$ac_objext"
11512 if { (eval echo "$as_me:11512: \"$ac_compile\"") >&5
11513   (eval $ac_compile) 2>&5
11514   ac_status=$?
11515   echo "$as_me:11515: \$? = $ac_status" >&5
11516   (exit "$ac_status"); } &&
11517          { ac_try='test -s "conftest.$ac_objext"'
11518   { (eval echo "$as_me:11518: \"$ac_try\"") >&5
11519   (eval $ac_try) 2>&5
11520   ac_status=$?
11521   echo "$as_me:11521: \$? = $ac_status" >&5
11522   (exit "$ac_status"); }; }; then
11523   cf_cv_posix_c_source=no
11524 else
11525   echo "$as_me: failed program was:" >&5
11526 cat "conftest.$ac_ext" >&5
11527 cf_want_posix_source=no
11528          case .$cf_POSIX_C_SOURCE in
11529          (.[12]??*)
11530                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11531                 ;;
11532          (.2)
11533                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11534                 cf_want_posix_source=yes
11535                 ;;
11536          (.*)
11537                 cf_want_posix_source=yes
11538                 ;;
11539          esac
11540          if test "$cf_want_posix_source" = yes ; then
11541                 cat >"conftest.$ac_ext" <<_ACEOF
11542 #line 11542 "configure"
11543 #include "confdefs.h"
11544 #include <sys/types.h>
11545 int
11546 main (void)
11547 {
11548
11549 #ifdef _POSIX_SOURCE
11550 #error _POSIX_SOURCE is defined
11551 #endif
11552   ;
11553   return 0;
11554 }
11555 _ACEOF
11556 rm -f "conftest.$ac_objext"
11557 if { (eval echo "$as_me:11557: \"$ac_compile\"") >&5
11558   (eval $ac_compile) 2>&5
11559   ac_status=$?
11560   echo "$as_me:11560: \$? = $ac_status" >&5
11561   (exit "$ac_status"); } &&
11562          { ac_try='test -s "conftest.$ac_objext"'
11563   { (eval echo "$as_me:11563: \"$ac_try\"") >&5
11564   (eval $ac_try) 2>&5
11565   ac_status=$?
11566   echo "$as_me:11566: \$? = $ac_status" >&5
11567   (exit "$ac_status"); }; }; then
11568   :
11569 else
11570   echo "$as_me: failed program was:" >&5
11571 cat "conftest.$ac_ext" >&5
11572 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11573 fi
11574 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11575          fi
11576
11577 echo "${as_me:-configure}:11577: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11578
11579          CFLAGS="$cf_trim_CFLAGS"
11580          CPPFLAGS="$cf_trim_CPPFLAGS"
11581
11582         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11583         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11584
11585 echo "${as_me:-configure}:11585: testing if the second compile does not leave our definition intact error ..." 1>&5
11586
11587          cat >"conftest.$ac_ext" <<_ACEOF
11588 #line 11588 "configure"
11589 #include "confdefs.h"
11590 #include <sys/types.h>
11591 int
11592 main (void)
11593 {
11594
11595 #ifndef _POSIX_C_SOURCE
11596 #error _POSIX_C_SOURCE is not defined
11597 #endif
11598   ;
11599   return 0;
11600 }
11601 _ACEOF
11602 rm -f "conftest.$ac_objext"
11603 if { (eval echo "$as_me:11603: \"$ac_compile\"") >&5
11604   (eval $ac_compile) 2>&5
11605   ac_status=$?
11606   echo "$as_me:11606: \$? = $ac_status" >&5
11607   (exit "$ac_status"); } &&
11608          { ac_try='test -s "conftest.$ac_objext"'
11609   { (eval echo "$as_me:11609: \"$ac_try\"") >&5
11610   (eval $ac_try) 2>&5
11611   ac_status=$?
11612   echo "$as_me:11612: \$? = $ac_status" >&5
11613   (exit "$ac_status"); }; }; then
11614   :
11615 else
11616   echo "$as_me: failed program was:" >&5
11617 cat "conftest.$ac_ext" >&5
11618 cf_cv_posix_c_source=no
11619 fi
11620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11621          CFLAGS="$cf_save_CFLAGS"
11622          CPPFLAGS="$cf_save_CPPFLAGS"
11623
11624 fi
11625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11626
11627 fi
11628 echo "$as_me:11628: result: $cf_cv_posix_c_source" >&5
11629 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11630
11631 if test "$cf_cv_posix_c_source" != no ; then
11632         CFLAGS="$cf_trim_CFLAGS"
11633         CPPFLAGS="$cf_trim_CPPFLAGS"
11634
11635 cf_fix_cppflags=no
11636 cf_new_cflags=
11637 cf_new_cppflags=
11638 cf_new_extra_cppflags=
11639
11640 for cf_add_cflags in $cf_cv_posix_c_source
11641 do
11642 case "$cf_fix_cppflags" in
11643 (no)
11644         case "$cf_add_cflags" in
11645         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11646                 case "$cf_add_cflags" in
11647                 (-D*)
11648                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11649
11650                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11651                                 && test -z "${cf_tst_cflags}" \
11652                                 && cf_fix_cppflags=yes
11653
11654                         if test "$cf_fix_cppflags" = yes ; then
11655
11656         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11657         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11658
11659                                 continue
11660                         elif test "${cf_tst_cflags}" = "\"'" ; then
11661
11662         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11663         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11664
11665                                 continue
11666                         fi
11667                         ;;
11668                 esac
11669                 case "$CPPFLAGS" in
11670                 (*$cf_add_cflags)
11671                         ;;
11672                 (*)
11673                         case "$cf_add_cflags" in
11674                         (-D*)
11675                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11676
11677 CPPFLAGS=`echo "$CPPFLAGS" | \
11678         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11679                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11680
11681                                 ;;
11682                         esac
11683
11684         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11685         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11686
11687                         ;;
11688                 esac
11689                 ;;
11690         (*)
11691
11692         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11693         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11694
11695                 ;;
11696         esac
11697         ;;
11698 (yes)
11699
11700         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11701         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11702
11703         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11704
11705         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11706                 && test -z "${cf_tst_cflags}" \
11707                 && cf_fix_cppflags=no
11708         ;;
11709 esac
11710 done
11711
11712 if test -n "$cf_new_cflags" ; then
11713
11714         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11715         CFLAGS="${CFLAGS}$cf_new_cflags"
11716
11717 fi
11718
11719 if test -n "$cf_new_cppflags" ; then
11720
11721         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11722         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11723
11724 fi
11725
11726 if test -n "$cf_new_extra_cppflags" ; then
11727
11728         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11729         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11730
11731 fi
11732
11733 fi
11734
11735 fi # cf_cv_posix_visible
11736
11737         # Some of these niche implementations use copy/paste, double-check...
11738         if test "$cf_cv_xopen_source" = no ; then
11739                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11740
11741 echo "${as_me:-configure}:11741: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11742
11743                 cat >"conftest.$ac_ext" <<_ACEOF
11744 #line 11744 "configure"
11745 #include "confdefs.h"
11746
11747 $ac_includes_default
11748
11749 int
11750 main (void)
11751 {
11752
11753 #ifndef _XOPEN_SOURCE
11754 #error _XOPEN_SOURCE is not defined
11755 #endif
11756
11757   ;
11758   return 0;
11759 }
11760 _ACEOF
11761 rm -f "conftest.$ac_objext"
11762 if { (eval echo "$as_me:11762: \"$ac_compile\"") >&5
11763   (eval $ac_compile) 2>&5
11764   ac_status=$?
11765   echo "$as_me:11765: \$? = $ac_status" >&5
11766   (exit "$ac_status"); } &&
11767          { ac_try='test -s "conftest.$ac_objext"'
11768   { (eval echo "$as_me:11768: \"$ac_try\"") >&5
11769   (eval $ac_try) 2>&5
11770   ac_status=$?
11771   echo "$as_me:11771: \$? = $ac_status" >&5
11772   (exit "$ac_status"); }; }; then
11773   :
11774 else
11775   echo "$as_me: failed program was:" >&5
11776 cat "conftest.$ac_ext" >&5
11777
11778                         { echo "$as_me:11778: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11779 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11780                         CPPFLAGS="$cf_save_xopen_cppflags"
11781 fi
11782 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11783         fi
11784         ;;
11785 esac
11786
11787 if test -n "$cf_xopen_source" ; then
11788
11789 for cf_add_cflags in $cf_xopen_source
11790 do
11791         case "x$cf_add_cflags" in
11792         (x-[DU]*)
11793
11794 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11795 while true
11796 do
11797         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11798         test "$CFLAGS" != "$cf_old_cflag" || break
11799         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11800
11801 echo "${as_me:-configure}:11801: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11802
11803         CFLAGS="$cf_old_cflag"
11804 done
11805
11806 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11807 while true
11808 do
11809         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
11810         test "$CPPFLAGS" != "$cf_old_cflag" || break
11811         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11812
11813 echo "${as_me:-configure}:11813: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11814
11815         CPPFLAGS="$cf_old_cflag"
11816 done
11817
11818                 ;;
11819         esac
11820
11821 cf_fix_cppflags=no
11822 cf_new_cflags=
11823 cf_new_cppflags=
11824 cf_new_extra_cppflags=
11825
11826 for cf_add_cflags in $cf_add_cflags
11827 do
11828 case "$cf_fix_cppflags" in
11829 (no)
11830         case "$cf_add_cflags" in
11831         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11832                 case "$cf_add_cflags" in
11833                 (-D*)
11834                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11835
11836                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11837                                 && test -z "${cf_tst_cflags}" \
11838                                 && cf_fix_cppflags=yes
11839
11840                         if test "$cf_fix_cppflags" = yes ; then
11841
11842         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11843         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11844
11845                                 continue
11846                         elif test "${cf_tst_cflags}" = "\"'" ; then
11847
11848         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11849         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11850
11851                                 continue
11852                         fi
11853                         ;;
11854                 esac
11855                 case "$CPPFLAGS" in
11856                 (*$cf_add_cflags)
11857                         ;;
11858                 (*)
11859                         case "$cf_add_cflags" in
11860                         (-D*)
11861                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11862
11863 CPPFLAGS=`echo "$CPPFLAGS" | \
11864         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11865                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11866
11867                                 ;;
11868                         esac
11869
11870         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11871         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11872
11873                         ;;
11874                 esac
11875                 ;;
11876         (*)
11877
11878         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11879         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11880
11881                 ;;
11882         esac
11883         ;;
11884 (yes)
11885
11886         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11887         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11888
11889         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11890
11891         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11892                 && test -z "${cf_tst_cflags}" \
11893                 && cf_fix_cppflags=no
11894         ;;
11895 esac
11896 done
11897
11898 if test -n "$cf_new_cflags" ; then
11899         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11900
11901 echo "${as_me:-configure}:11901: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11902
11903         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11904         CFLAGS="${CFLAGS}$cf_new_cflags"
11905
11906 fi
11907
11908 if test -n "$cf_new_cppflags" ; then
11909         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11910
11911 echo "${as_me:-configure}:11911: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11912
11913         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11914         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11915
11916 fi
11917
11918 if test -n "$cf_new_extra_cppflags" ; then
11919         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11920
11921 echo "${as_me:-configure}:11921: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11922
11923         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11924         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11925
11926 fi
11927
11928 done
11929
11930 fi
11931
11932 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11933         echo "$as_me:11933: checking if _XOPEN_SOURCE really is set" >&5
11934 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11935         cat >"conftest.$ac_ext" <<_ACEOF
11936 #line 11936 "configure"
11937 #include "confdefs.h"
11938 #include <stdlib.h>
11939 int
11940 main (void)
11941 {
11942
11943 #ifndef _XOPEN_SOURCE
11944 #error _XOPEN_SOURCE is not defined
11945 #endif
11946   ;
11947   return 0;
11948 }
11949 _ACEOF
11950 rm -f "conftest.$ac_objext"
11951 if { (eval echo "$as_me:11951: \"$ac_compile\"") >&5
11952   (eval $ac_compile) 2>&5
11953   ac_status=$?
11954   echo "$as_me:11954: \$? = $ac_status" >&5
11955   (exit "$ac_status"); } &&
11956          { ac_try='test -s "conftest.$ac_objext"'
11957   { (eval echo "$as_me:11957: \"$ac_try\"") >&5
11958   (eval $ac_try) 2>&5
11959   ac_status=$?
11960   echo "$as_me:11960: \$? = $ac_status" >&5
11961   (exit "$ac_status"); }; }; then
11962   cf_XOPEN_SOURCE_set=yes
11963 else
11964   echo "$as_me: failed program was:" >&5
11965 cat "conftest.$ac_ext" >&5
11966 cf_XOPEN_SOURCE_set=no
11967 fi
11968 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11969         echo "$as_me:11969: result: $cf_XOPEN_SOURCE_set" >&5
11970 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11971         if test "$cf_XOPEN_SOURCE_set" = yes
11972         then
11973                 cat >"conftest.$ac_ext" <<_ACEOF
11974 #line 11974 "configure"
11975 #include "confdefs.h"
11976 #include <stdlib.h>
11977 int
11978 main (void)
11979 {
11980
11981 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11982 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11983 #endif
11984   ;
11985   return 0;
11986 }
11987 _ACEOF
11988 rm -f "conftest.$ac_objext"
11989 if { (eval echo "$as_me:11989: \"$ac_compile\"") >&5
11990   (eval $ac_compile) 2>&5
11991   ac_status=$?
11992   echo "$as_me:11992: \$? = $ac_status" >&5
11993   (exit "$ac_status"); } &&
11994          { ac_try='test -s "conftest.$ac_objext"'
11995   { (eval echo "$as_me:11995: \"$ac_try\"") >&5
11996   (eval $ac_try) 2>&5
11997   ac_status=$?
11998   echo "$as_me:11998: \$? = $ac_status" >&5
11999   (exit "$ac_status"); }; }; then
12000   cf_XOPEN_SOURCE_set_ok=yes
12001 else
12002   echo "$as_me: failed program was:" >&5
12003 cat "conftest.$ac_ext" >&5
12004 cf_XOPEN_SOURCE_set_ok=no
12005 fi
12006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12007                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12008                 then
12009                         { echo "$as_me:12009: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12010 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12011                 fi
12012         else
12013
12014 echo "$as_me:12014: checking if we should define _XOPEN_SOURCE" >&5
12015 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12016 if test "${cf_cv_xopen_source+set}" = set; then
12017   echo $ECHO_N "(cached) $ECHO_C" >&6
12018 else
12019
12020         cat >"conftest.$ac_ext" <<_ACEOF
12021 #line 12021 "configure"
12022 #include "confdefs.h"
12023
12024 $ac_includes_default
12025
12026 int
12027 main (void)
12028 {
12029
12030 #ifndef _XOPEN_SOURCE
12031 #error _XOPEN_SOURCE is not defined
12032 #endif
12033
12034   ;
12035   return 0;
12036 }
12037 _ACEOF
12038 rm -f "conftest.$ac_objext"
12039 if { (eval echo "$as_me:12039: \"$ac_compile\"") >&5
12040   (eval $ac_compile) 2>&5
12041   ac_status=$?
12042   echo "$as_me:12042: \$? = $ac_status" >&5
12043   (exit "$ac_status"); } &&
12044          { ac_try='test -s "conftest.$ac_objext"'
12045   { (eval echo "$as_me:12045: \"$ac_try\"") >&5
12046   (eval $ac_try) 2>&5
12047   ac_status=$?
12048   echo "$as_me:12048: \$? = $ac_status" >&5
12049   (exit "$ac_status"); }; }; then
12050   cf_cv_xopen_source=no
12051 else
12052   echo "$as_me: failed program was:" >&5
12053 cat "conftest.$ac_ext" >&5
12054 cf_save="$CPPFLAGS"
12055
12056         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12057         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12058
12059          cat >"conftest.$ac_ext" <<_ACEOF
12060 #line 12060 "configure"
12061 #include "confdefs.h"
12062
12063 $ac_includes_default
12064
12065 int
12066 main (void)
12067 {
12068
12069 #ifndef _XOPEN_SOURCE
12070 #error _XOPEN_SOURCE is not defined
12071 #endif
12072
12073   ;
12074   return 0;
12075 }
12076 _ACEOF
12077 rm -f "conftest.$ac_objext"
12078 if { (eval echo "$as_me:12078: \"$ac_compile\"") >&5
12079   (eval $ac_compile) 2>&5
12080   ac_status=$?
12081   echo "$as_me:12081: \$? = $ac_status" >&5
12082   (exit "$ac_status"); } &&
12083          { ac_try='test -s "conftest.$ac_objext"'
12084   { (eval echo "$as_me:12084: \"$ac_try\"") >&5
12085   (eval $ac_try) 2>&5
12086   ac_status=$?
12087   echo "$as_me:12087: \$? = $ac_status" >&5
12088   (exit "$ac_status"); }; }; then
12089   cf_cv_xopen_source=no
12090 else
12091   echo "$as_me: failed program was:" >&5
12092 cat "conftest.$ac_ext" >&5
12093 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12094 fi
12095 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12096                 CPPFLAGS="$cf_save"
12097
12098 fi
12099 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12100
12101 fi
12102 echo "$as_me:12102: result: $cf_cv_xopen_source" >&5
12103 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12104
12105 if test "$cf_cv_xopen_source" != no ; then
12106
12107 CFLAGS=`echo "$CFLAGS" | \
12108         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12109                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12110
12111 CPPFLAGS=`echo "$CPPFLAGS" | \
12112         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12113                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12114
12115         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12116
12117 for cf_add_cflags in $cf_temp_xopen_source
12118 do
12119         case "x$cf_add_cflags" in
12120         (x-[DU]*)
12121
12122 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12123 while true
12124 do
12125         cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[         ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12126         test "$CFLAGS" != "$cf_old_cflag" || break
12127
12128         CFLAGS="$cf_old_cflag"
12129 done
12130
12131 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12132 while true
12133 do
12134         cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[       ][      ]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^     ][^     ]*\\)\?%%" -e 's/^[     ]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
12135         test "$CPPFLAGS" != "$cf_old_cflag" || break
12136
12137         CPPFLAGS="$cf_old_cflag"
12138 done
12139
12140                 ;;
12141         esac
12142
12143 cf_fix_cppflags=no
12144 cf_new_cflags=
12145 cf_new_cppflags=
12146 cf_new_extra_cppflags=
12147
12148 for cf_add_cflags in $cf_add_cflags
12149 do
12150 case "$cf_fix_cppflags" in
12151 (no)
12152         case "$cf_add_cflags" in
12153         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12154                 case "$cf_add_cflags" in
12155                 (-D*)
12156                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12157
12158                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12159                                 && test -z "${cf_tst_cflags}" \
12160                                 && cf_fix_cppflags=yes
12161
12162                         if test "$cf_fix_cppflags" = yes ; then
12163
12164         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12165         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12166
12167                                 continue
12168                         elif test "${cf_tst_cflags}" = "\"'" ; then
12169
12170         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12171         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12172
12173                                 continue
12174                         fi
12175                         ;;
12176                 esac
12177                 case "$CPPFLAGS" in
12178                 (*$cf_add_cflags)
12179                         ;;
12180                 (*)
12181                         case "$cf_add_cflags" in
12182                         (-D*)
12183                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12184
12185 CPPFLAGS=`echo "$CPPFLAGS" | \
12186         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12187                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12188
12189                                 ;;
12190                         esac
12191
12192         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12193         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12194
12195                         ;;
12196                 esac
12197                 ;;
12198         (*)
12199
12200         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12201         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12202
12203                 ;;
12204         esac
12205         ;;
12206 (yes)
12207
12208         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12209         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12210
12211         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12212
12213         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12214                 && test -z "${cf_tst_cflags}" \
12215                 && cf_fix_cppflags=no
12216         ;;
12217 esac
12218 done
12219
12220 if test -n "$cf_new_cflags" ; then
12221
12222         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12223         CFLAGS="${CFLAGS}$cf_new_cflags"
12224
12225 fi
12226
12227 if test -n "$cf_new_cppflags" ; then
12228
12229         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12230         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12231
12232 fi
12233
12234 if test -n "$cf_new_extra_cppflags" ; then
12235
12236         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12237         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12238
12239 fi
12240
12241 done
12242
12243 fi
12244
12245         fi
12246 fi
12247 fi # cf_cv_posix_visible
12248
12249 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12250
12251 # Work around breakage on OS X
12252
12253 echo "$as_me:12253: checking if SIGWINCH is defined" >&5
12254 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12255 if test "${cf_cv_define_sigwinch+set}" = set; then
12256   echo $ECHO_N "(cached) $ECHO_C" >&6
12257 else
12258
12259         cat >"conftest.$ac_ext" <<_ACEOF
12260 #line 12260 "configure"
12261 #include "confdefs.h"
12262
12263 #include <sys/types.h>
12264 #include <sys/signal.h>
12265
12266 int
12267 main (void)
12268 {
12269 int x = SIGWINCH; (void)x
12270   ;
12271   return 0;
12272 }
12273 _ACEOF
12274 rm -f "conftest.$ac_objext"
12275 if { (eval echo "$as_me:12275: \"$ac_compile\"") >&5
12276   (eval $ac_compile) 2>&5
12277   ac_status=$?
12278   echo "$as_me:12278: \$? = $ac_status" >&5
12279   (exit "$ac_status"); } &&
12280          { ac_try='test -s "conftest.$ac_objext"'
12281   { (eval echo "$as_me:12281: \"$ac_try\"") >&5
12282   (eval $ac_try) 2>&5
12283   ac_status=$?
12284   echo "$as_me:12284: \$? = $ac_status" >&5
12285   (exit "$ac_status"); }; }; then
12286   cf_cv_define_sigwinch=yes
12287 else
12288   echo "$as_me: failed program was:" >&5
12289 cat "conftest.$ac_ext" >&5
12290 cat >"conftest.$ac_ext" <<_ACEOF
12291 #line 12291 "configure"
12292 #include "confdefs.h"
12293
12294 #undef _XOPEN_SOURCE
12295 #undef _POSIX_SOURCE
12296 #undef _POSIX_C_SOURCE
12297 #include <sys/types.h>
12298 #include <sys/signal.h>
12299
12300 int
12301 main (void)
12302 {
12303 int x = SIGWINCH; (void)x
12304   ;
12305   return 0;
12306 }
12307 _ACEOF
12308 rm -f "conftest.$ac_objext"
12309 if { (eval echo "$as_me:12309: \"$ac_compile\"") >&5
12310   (eval $ac_compile) 2>&5
12311   ac_status=$?
12312   echo "$as_me:12312: \$? = $ac_status" >&5
12313   (exit "$ac_status"); } &&
12314          { ac_try='test -s "conftest.$ac_objext"'
12315   { (eval echo "$as_me:12315: \"$ac_try\"") >&5
12316   (eval $ac_try) 2>&5
12317   ac_status=$?
12318   echo "$as_me:12318: \$? = $ac_status" >&5
12319   (exit "$ac_status"); }; }; then
12320   cf_cv_define_sigwinch=maybe
12321 else
12322   echo "$as_me: failed program was:" >&5
12323 cat "conftest.$ac_ext" >&5
12324 cf_cv_define_sigwinch=no
12325 fi
12326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12327
12328 fi
12329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12330
12331 fi
12332 echo "$as_me:12332: result: $cf_cv_define_sigwinch" >&5
12333 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12334
12335 if test "$cf_cv_define_sigwinch" = maybe ; then
12336 echo "$as_me:12336: checking for actual SIGWINCH definition" >&5
12337 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12338 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12339   echo $ECHO_N "(cached) $ECHO_C" >&6
12340 else
12341
12342 cf_cv_fixup_sigwinch=unknown
12343 cf_sigwinch=32
12344 while test "$cf_sigwinch" != 1
12345 do
12346         cat >"conftest.$ac_ext" <<_ACEOF
12347 #line 12347 "configure"
12348 #include "confdefs.h"
12349
12350 #undef _XOPEN_SOURCE
12351 #undef _POSIX_SOURCE
12352 #undef _POSIX_C_SOURCE
12353 #include <sys/types.h>
12354 #include <sys/signal.h>
12355
12356 int
12357 main (void)
12358 {
12359
12360 #if SIGWINCH != $cf_sigwinch
12361 #error SIGWINCH is not $cf_sigwinch
12362 #endif
12363 int x = SIGWINCH; (void)x
12364   ;
12365   return 0;
12366 }
12367 _ACEOF
12368 rm -f "conftest.$ac_objext"
12369 if { (eval echo "$as_me:12369: \"$ac_compile\"") >&5
12370   (eval $ac_compile) 2>&5
12371   ac_status=$?
12372   echo "$as_me:12372: \$? = $ac_status" >&5
12373   (exit "$ac_status"); } &&
12374          { ac_try='test -s "conftest.$ac_objext"'
12375   { (eval echo "$as_me:12375: \"$ac_try\"") >&5
12376   (eval $ac_try) 2>&5
12377   ac_status=$?
12378   echo "$as_me:12378: \$? = $ac_status" >&5
12379   (exit "$ac_status"); }; }; then
12380   cf_cv_fixup_sigwinch=$cf_sigwinch
12381          break
12382 else
12383   echo "$as_me: failed program was:" >&5
12384 cat "conftest.$ac_ext" >&5
12385 fi
12386 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12387
12388 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12389 done
12390
12391 fi
12392 echo "$as_me:12392: result: $cf_cv_fixup_sigwinch" >&5
12393 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12394
12395         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12396                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12397         fi
12398 fi
12399
12400 # Checks for CODESET support.
12401
12402 echo "$as_me:12402: checking for nl_langinfo and CODESET" >&5
12403 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12404 if test "${am_cv_langinfo_codeset+set}" = set; then
12405   echo $ECHO_N "(cached) $ECHO_C" >&6
12406 else
12407   cat >"conftest.$ac_ext" <<_ACEOF
12408 #line 12408 "configure"
12409 #include "confdefs.h"
12410
12411 $ac_includes_default
12412 #include <langinfo.h>
12413 int
12414 main (void)
12415 {
12416 char* cs = nl_langinfo(CODESET); (void)cs
12417   ;
12418   return 0;
12419 }
12420 _ACEOF
12421 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12422 if { (eval echo "$as_me:12422: \"$ac_link\"") >&5
12423   (eval $ac_link) 2>&5
12424   ac_status=$?
12425   echo "$as_me:12425: \$? = $ac_status" >&5
12426   (exit "$ac_status"); } &&
12427          { ac_try='test -s "conftest$ac_exeext"'
12428   { (eval echo "$as_me:12428: \"$ac_try\"") >&5
12429   (eval $ac_try) 2>&5
12430   ac_status=$?
12431   echo "$as_me:12431: \$? = $ac_status" >&5
12432   (exit "$ac_status"); }; }; then
12433   am_cv_langinfo_codeset=yes
12434 else
12435   echo "$as_me: failed program was:" >&5
12436 cat "conftest.$ac_ext" >&5
12437 am_cv_langinfo_codeset=no
12438 fi
12439 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12440
12441 fi
12442 echo "$as_me:12442: result: $am_cv_langinfo_codeset" >&5
12443 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12444         if test "$am_cv_langinfo_codeset" = yes; then
12445
12446 cat >>confdefs.h <<\EOF
12447 #define HAVE_LANGINFO_CODESET 1
12448 EOF
12449
12450         fi
12451
12452 # use these variables to work around a defect in gcc's fixincludes.
12453 NCURSES_OK_WCHAR_T=
12454 NCURSES_OK_WINT_T=
12455
12456 echo "$as_me:12456: checking if you want wide-character code" >&5
12457 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12458
12459 # Check whether --enable-widec or --disable-widec was given.
12460 if test "${enable_widec+set}" = set; then
12461   enableval="$enable_widec"
12462   with_widec=$enableval
12463 else
12464   with_widec=no
12465 fi;
12466 echo "$as_me:12466: result: $with_widec" >&5
12467 echo "${ECHO_T}$with_widec" >&6
12468
12469 NCURSES_WCWIDTH_GRAPHICS=1
12470
12471 if test "x$with_widec" = xyes ; then
12472         if test "x$disable_lib_suffixes" = xno ; then
12473                 LIB_SUFFIX="w${LIB_SUFFIX}"
12474         fi
12475
12476 cat >>confdefs.h <<\EOF
12477 #define USE_WIDEC_SUPPORT 1
12478 EOF
12479
12480 cat >>confdefs.h <<\EOF
12481 #define NCURSES_WIDECHAR 1
12482 EOF
12483
12484         case "$CPPFLAGS" in
12485         (*_XOPEN_SOURCE=*)
12486                 ;;
12487         (*)
12488                 { echo "$as_me:12488: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12489 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12490                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12491                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12492                 ;;
12493         esac
12494
12495 for ac_header in \
12496 wchar.h \
12497 wctype.h \
12498
12499 do
12500 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12501 echo "$as_me:12501: checking for $ac_header" >&5
12502 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12503 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12504   echo $ECHO_N "(cached) $ECHO_C" >&6
12505 else
12506   cat >"conftest.$ac_ext" <<_ACEOF
12507 #line 12507 "configure"
12508 #include "confdefs.h"
12509 #include <$ac_header>
12510 _ACEOF
12511 if { (eval echo "$as_me:12511: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12512   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12513   ac_status=$?
12514   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12515   rm -f conftest.er1
12516   cat conftest.err >&5
12517   echo "$as_me:12517: \$? = $ac_status" >&5
12518   (exit "$ac_status"); } >/dev/null; then
12519   if test -s conftest.err; then
12520     ac_cpp_err=$ac_c_preproc_warn_flag
12521   else
12522     ac_cpp_err=
12523   fi
12524 else
12525   ac_cpp_err=yes
12526 fi
12527 if test -z "$ac_cpp_err"; then
12528   eval "$as_ac_Header=yes"
12529 else
12530   echo "$as_me: failed program was:" >&5
12531   cat "conftest.$ac_ext" >&5
12532   eval "$as_ac_Header=no"
12533 fi
12534 rm -f conftest.err "conftest.$ac_ext"
12535 fi
12536 echo "$as_me:12536: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12537 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12538 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12539   cat >>confdefs.h <<EOF
12540 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12541 EOF
12542
12543 fi
12544 done
12545
12546 echo "$as_me:12546: checking if wchar.h can be used as is" >&5
12547 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12548 if test "${cf_cv_wchar_h_okay+set}" = set; then
12549   echo $ECHO_N "(cached) $ECHO_C" >&6
12550 else
12551
12552 cat >"conftest.$ac_ext" <<_ACEOF
12553 #line 12553 "configure"
12554 #include "confdefs.h"
12555
12556 $ac_includes_default
12557 #ifdef HAVE_WCHAR_H
12558 #include <wchar.h>
12559 #endif
12560 #ifdef HAVE_WCTYPE_H
12561 #include <wctype.h>
12562 #endif
12563
12564 int
12565 main (void)
12566 {
12567
12568         wint_t foo = 0;
12569         int bar = iswpunct(foo)
12570   ;
12571   return 0;
12572 }
12573 _ACEOF
12574 rm -f "conftest.$ac_objext"
12575 if { (eval echo "$as_me:12575: \"$ac_compile\"") >&5
12576   (eval $ac_compile) 2>&5
12577   ac_status=$?
12578   echo "$as_me:12578: \$? = $ac_status" >&5
12579   (exit "$ac_status"); } &&
12580          { ac_try='test -s "conftest.$ac_objext"'
12581   { (eval echo "$as_me:12581: \"$ac_try\"") >&5
12582   (eval $ac_try) 2>&5
12583   ac_status=$?
12584   echo "$as_me:12584: \$? = $ac_status" >&5
12585   (exit "$ac_status"); }; }; then
12586   cf_cv_wchar_h_okay=yes
12587 else
12588   echo "$as_me: failed program was:" >&5
12589 cat "conftest.$ac_ext" >&5
12590 cf_cv_wchar_h_okay=no
12591 fi
12592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12593 fi
12594 echo "$as_me:12594: result: $cf_cv_wchar_h_okay" >&5
12595 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12596
12597 if test "$cf_cv_wchar_h_okay" = no
12598 then
12599
12600 echo "$as_me:12600: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12601 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12602 cat >"conftest.$ac_ext" <<_ACEOF
12603 #line 12603 "configure"
12604 #include "confdefs.h"
12605 #include <sys/types.h>
12606
12607 int
12608 main (void)
12609 {
12610
12611 #ifndef _XOPEN_SOURCE_EXTENDED
12612 #error _XOPEN_SOURCE_EXTENDED is not defined
12613 #endif
12614   ;
12615   return 0;
12616 }
12617 _ACEOF
12618 rm -f "conftest.$ac_objext"
12619 if { (eval echo "$as_me:12619: \"$ac_compile\"") >&5
12620   (eval $ac_compile) 2>&5
12621   ac_status=$?
12622   echo "$as_me:12622: \$? = $ac_status" >&5
12623   (exit "$ac_status"); } &&
12624          { ac_try='test -s "conftest.$ac_objext"'
12625   { (eval echo "$as_me:12625: \"$ac_try\"") >&5
12626   (eval $ac_try) 2>&5
12627   ac_status=$?
12628   echo "$as_me:12628: \$? = $ac_status" >&5
12629   (exit "$ac_status"); }; }; then
12630   cf_result=no
12631 else
12632   echo "$as_me: failed program was:" >&5
12633 cat "conftest.$ac_ext" >&5
12634 cf_result=yes
12635 fi
12636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12637 echo "$as_me:12637: result: $cf_result" >&5
12638 echo "${ECHO_T}$cf_result" >&6
12639
12640 if test "$cf_result" = yes ; then
12641         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12642 elif test "x" != "x" ; then
12643         echo "$as_me:12643: checking checking for compatible value versus " >&5
12644 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12645         cat >"conftest.$ac_ext" <<_ACEOF
12646 #line 12646 "configure"
12647 #include "confdefs.h"
12648 #include <sys/types.h>
12649
12650 int
12651 main (void)
12652 {
12653
12654 #if _XOPEN_SOURCE_EXTENDED- < 0
12655 #error _XOPEN_SOURCE_EXTENDED- is negative
12656 #endif
12657   ;
12658   return 0;
12659 }
12660 _ACEOF
12661 rm -f "conftest.$ac_objext"
12662 if { (eval echo "$as_me:12662: \"$ac_compile\"") >&5
12663   (eval $ac_compile) 2>&5
12664   ac_status=$?
12665   echo "$as_me:12665: \$? = $ac_status" >&5
12666   (exit "$ac_status"); } &&
12667          { ac_try='test -s "conftest.$ac_objext"'
12668   { (eval echo "$as_me:12668: \"$ac_try\"") >&5
12669   (eval $ac_try) 2>&5
12670   ac_status=$?
12671   echo "$as_me:12671: \$? = $ac_status" >&5
12672   (exit "$ac_status"); }; }; then
12673   cf_result=yes
12674 else
12675   echo "$as_me: failed program was:" >&5
12676 cat "conftest.$ac_ext" >&5
12677 cf_result=no
12678 fi
12679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12680         echo "$as_me:12680: result: $cf_result" >&5
12681 echo "${ECHO_T}$cf_result" >&6
12682         if test "$cf_result" = no ; then
12683                 # perhaps we can override it - try...
12684                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12685         fi
12686 fi
12687
12688 fi
12689
12690 echo "$as_me:12690: checking if wcwidth agrees graphics are single-width" >&5
12691 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12692 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12693   echo $ECHO_N "(cached) $ECHO_C" >&6
12694 else
12695
12696 cat >conftest.in <<CF_EOF
12697 -       VT100 symbols
12698 0x250c  upper left corner
12699 0x2514  lower left corner
12700 0x2510  upper right corner
12701 0x2518  lower right corner
12702 0x251c  tee pointing left
12703 0x2524  tee pointing right
12704 0x2534  tee pointing up
12705 0x252c  tee pointing down
12706 0x2500  horizontal line
12707 0x2502  vertical line
12708 0x253c  large plus or crossover
12709 0x23ba  scan line 1
12710 0x23bd  scan line 9
12711 0x25c6  diamond
12712 0x2592  checker board (stipple)
12713 0x00b0  degree symbol
12714 0x00b1  plus/minus
12715 0x00b7  bullet
12716 -       Teletype 5410v1 symbols
12717 0x2190  arrow pointing left
12718 0x2192  arrow pointing right
12719 0x2193  arrow pointing down
12720 0x2191  arrow pointing up
12721 0x2592  board of squares
12722 0x2603  lantern symbol
12723 0x25ae  solid square block
12724 -       these defaults were invented for ncurses
12725 0x23bb  scan line 3
12726 0x23bc  scan line 7
12727 0x2264  less-than-or-equal-to
12728 0x2265  greater-than-or-equal-to
12729 0x03c0  greek pi
12730 0x2260  not-equal
12731 0x00a3  pound-sterling symbol
12732 -       thick-line-drawing
12733 0x250f  upper left corner
12734 0x2517  lower left corner
12735 0x2513  upper right corner
12736 0x251b  lower right corner
12737 0x2523  tee pointing left
12738 0x252b  tee pointing right
12739 0x253b  tee pointing up
12740 0x2533  tee pointing down
12741 0x2501  horizontal line
12742 0x2503  vertical line
12743 0x254b  large plus or crossover
12744 -       double-line-drawing
12745 0x2554  upper left corner
12746 0x255a  lower left corner
12747 0x2557  upper right corner
12748 0x255d  lower right corner
12749 0x2563  tee pointing left
12750 0x2560  tee pointing right
12751 0x2569  tee pointing up
12752 0x2566  tee pointing down
12753 0x2550  horizontal line
12754 0x2551  vertical line
12755 0x256c  large plus or crossover
12756 CF_EOF
12757 if test "$cross_compiling" = yes; then
12758   cf_cv_wcwidth_graphics=unknown
12759 else
12760   cat >"conftest.$ac_ext" <<_ACEOF
12761 #line 12761 "configure"
12762 #include "confdefs.h"
12763
12764 $ac_includes_default
12765
12766 #include <locale.h>
12767 #include <wchar.h>
12768
12769 #define MY_LEN 80
12770
12771 int
12772 main(void)
12773 {
12774         FILE *fp;
12775         int value;
12776         char buffer[MY_LEN + 1];
12777         char notes[MY_LEN + 1];
12778         int totals = 0;
12779         int passed = 0;
12780
12781         if (setlocale(LC_ALL, "en_US.UTF8") ||
12782                 setlocale(LC_ALL, "en_US.UTF-8") ||
12783                 setlocale(LC_ALL, "en_US.utf8") ||
12784                 setlocale(LC_ALL, "en_US.utf-8")) {
12785                 if ((fp = fopen("conftest.in", "r")) != 0) {
12786                         while (fgets(buffer, MY_LEN, fp) != 0) {
12787                                 if (*buffer == '-') {
12788                                         fprintf(stderr, "\\t%s", buffer);
12789                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12790                                         ++totals;
12791                                         if (wcwidth(value) == 1)
12792                                                 ++passed;
12793                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12794                                 } else {
12795                                         fprintf(stderr, "?\\t%s", buffer);
12796                                 }
12797                         }
12798                 }
12799         }
12800         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12801         return (totals == passed) ? 0 : 1;
12802 }
12803
12804 _ACEOF
12805 rm -f "conftest$ac_exeext"
12806 if { (eval echo "$as_me:12806: \"$ac_link\"") >&5
12807   (eval $ac_link) 2>&5
12808   ac_status=$?
12809   echo "$as_me:12809: \$? = $ac_status" >&5
12810   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12811   { (eval echo "$as_me:12811: \"$ac_try\"") >&5
12812   (eval $ac_try) 2>&5
12813   ac_status=$?
12814   echo "$as_me:12814: \$? = $ac_status" >&5
12815   (exit "$ac_status"); }; }; then
12816   cf_cv_wcwidth_graphics=yes
12817 else
12818   echo "$as_me: program exited with status $ac_status" >&5
12819 echo "$as_me: failed program was:" >&5
12820 cat "conftest.$ac_ext" >&5
12821 cf_cv_wcwidth_graphics=no
12822 fi
12823 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12824 fi
12825
12826 fi
12827 echo "$as_me:12827: result: $cf_cv_wcwidth_graphics" >&5
12828 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12829
12830         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12831
12832         # with_overwrite=no
12833         NCURSES_CH_T=cchar_t
12834
12835 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12836 do
12837 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12838 echo "$as_me:12838: checking for $ac_func" >&5
12839 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12840 if eval "test \"\${$as_ac_var+set}\" = set"; then
12841   echo $ECHO_N "(cached) $ECHO_C" >&6
12842 else
12843   cat >"conftest.$ac_ext" <<_ACEOF
12844 #line 12844 "configure"
12845 #include "confdefs.h"
12846 #define $ac_func autoconf_temporary
12847 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12848 #undef $ac_func
12849
12850 #ifdef __cplusplus
12851 extern "C"
12852 #endif
12853
12854 /* We use char because int might match the return type of a gcc2
12855    builtin and then its argument prototype would still apply.  */
12856 char $ac_func (void);
12857
12858 int
12859 main (void)
12860 {
12861
12862 /* The GNU C library defines stubs for functions which it implements
12863     to always fail with ENOSYS.  Some functions are actually named
12864     something starting with __ and the normal name is an alias.  */
12865 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12866 #error found stub for $ac_func
12867 #endif
12868
12869         return $ac_func ();
12870   ;
12871   return 0;
12872 }
12873 _ACEOF
12874 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12875 if { (eval echo "$as_me:12875: \"$ac_link\"") >&5
12876   (eval $ac_link) 2>&5
12877   ac_status=$?
12878   echo "$as_me:12878: \$? = $ac_status" >&5
12879   (exit "$ac_status"); } &&
12880          { ac_try='test -s "conftest$ac_exeext"'
12881   { (eval echo "$as_me:12881: \"$ac_try\"") >&5
12882   (eval $ac_try) 2>&5
12883   ac_status=$?
12884   echo "$as_me:12884: \$? = $ac_status" >&5
12885   (exit "$ac_status"); }; }; then
12886   eval "$as_ac_var=yes"
12887 else
12888   echo "$as_me: failed program was:" >&5
12889 cat "conftest.$ac_ext" >&5
12890 eval "$as_ac_var=no"
12891 fi
12892 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12893 fi
12894 echo "$as_me:12894: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12895 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12896 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12897   cat >>confdefs.h <<EOF
12898 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12899 EOF
12900
12901 fi
12902 done
12903
12904         if test "x$ac_cv_func_putwc" != xyes ; then
12905
12906 for ac_header in wchar.h
12907 do
12908 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12909 echo "$as_me:12909: checking for $ac_header" >&5
12910 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12911 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12912   echo $ECHO_N "(cached) $ECHO_C" >&6
12913 else
12914   cat >"conftest.$ac_ext" <<_ACEOF
12915 #line 12915 "configure"
12916 #include "confdefs.h"
12917 #include <$ac_header>
12918 _ACEOF
12919 if { (eval echo "$as_me:12919: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12920   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12921   ac_status=$?
12922   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12923   rm -f conftest.er1
12924   cat conftest.err >&5
12925   echo "$as_me:12925: \$? = $ac_status" >&5
12926   (exit "$ac_status"); } >/dev/null; then
12927   if test -s conftest.err; then
12928     ac_cpp_err=$ac_c_preproc_warn_flag
12929   else
12930     ac_cpp_err=
12931   fi
12932 else
12933   ac_cpp_err=yes
12934 fi
12935 if test -z "$ac_cpp_err"; then
12936   eval "$as_ac_Header=yes"
12937 else
12938   echo "$as_me: failed program was:" >&5
12939   cat "conftest.$ac_ext" >&5
12940   eval "$as_ac_Header=no"
12941 fi
12942 rm -f conftest.err "conftest.$ac_ext"
12943 fi
12944 echo "$as_me:12944: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12945 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12946 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12947   cat >>confdefs.h <<EOF
12948 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12949 EOF
12950
12951 fi
12952 done
12953
12954 echo "$as_me:12954: checking for multibyte character support" >&5
12955 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12956 if test "${cf_cv_utf8_lib+set}" = set; then
12957   echo $ECHO_N "(cached) $ECHO_C" >&6
12958 else
12959
12960         cf_save_LIBS="$LIBS"
12961         cat >"conftest.$ac_ext" <<_ACEOF
12962 #line 12962 "configure"
12963 #include "confdefs.h"
12964
12965 $ac_includes_default
12966 #ifdef HAVE_WCHAR_H
12967 #include <wchar.h>
12968 #endif
12969
12970 int
12971 main (void)
12972 {
12973 putwc(0,0);
12974   ;
12975   return 0;
12976 }
12977 _ACEOF
12978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12979 if { (eval echo "$as_me:12979: \"$ac_link\"") >&5
12980   (eval $ac_link) 2>&5
12981   ac_status=$?
12982   echo "$as_me:12982: \$? = $ac_status" >&5
12983   (exit "$ac_status"); } &&
12984          { ac_try='test -s "conftest$ac_exeext"'
12985   { (eval echo "$as_me:12985: \"$ac_try\"") >&5
12986   (eval $ac_try) 2>&5
12987   ac_status=$?
12988   echo "$as_me:12988: \$? = $ac_status" >&5
12989   (exit "$ac_status"); }; }; then
12990   cf_cv_utf8_lib=yes
12991 else
12992   echo "$as_me: failed program was:" >&5
12993 cat "conftest.$ac_ext" >&5
12994
12995 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12996 # will be set on completion of the AC_TRY_LINK below.
12997 cf_cv_header_path_utf8=
12998 cf_cv_library_path_utf8=
12999
13000 echo "${as_me:-configure}:13000: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13001
13002 cf_save_LIBS="$LIBS"
13003
13004 cat >"conftest.$ac_ext" <<_ACEOF
13005 #line 13005 "configure"
13006 #include "confdefs.h"
13007
13008 #include <libutf8.h>
13009 int
13010 main (void)
13011 {
13012 putwc(0,0);
13013   ;
13014   return 0;
13015 }
13016 _ACEOF
13017 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13018 if { (eval echo "$as_me:13018: \"$ac_link\"") >&5
13019   (eval $ac_link) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit "$ac_status"); } &&
13023          { ac_try='test -s "conftest$ac_exeext"'
13024   { (eval echo "$as_me:13024: \"$ac_try\"") >&5
13025   (eval $ac_try) 2>&5
13026   ac_status=$?
13027   echo "$as_me:13027: \$? = $ac_status" >&5
13028   (exit "$ac_status"); }; }; then
13029
13030         cf_cv_find_linkage_utf8=yes
13031         cf_cv_header_path_utf8=/usr/include
13032         cf_cv_library_path_utf8=/usr/lib
13033
13034 else
13035   echo "$as_me: failed program was:" >&5
13036 cat "conftest.$ac_ext" >&5
13037
13038 LIBS="-lutf8  $cf_save_LIBS"
13039
13040 cat >"conftest.$ac_ext" <<_ACEOF
13041 #line 13041 "configure"
13042 #include "confdefs.h"
13043
13044 #include <libutf8.h>
13045 int
13046 main (void)
13047 {
13048 putwc(0,0);
13049   ;
13050   return 0;
13051 }
13052 _ACEOF
13053 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13054 if { (eval echo "$as_me:13054: \"$ac_link\"") >&5
13055   (eval $ac_link) 2>&5
13056   ac_status=$?
13057   echo "$as_me:13057: \$? = $ac_status" >&5
13058   (exit "$ac_status"); } &&
13059          { ac_try='test -s "conftest$ac_exeext"'
13060   { (eval echo "$as_me:13060: \"$ac_try\"") >&5
13061   (eval $ac_try) 2>&5
13062   ac_status=$?
13063   echo "$as_me:13063: \$? = $ac_status" >&5
13064   (exit "$ac_status"); }; }; then
13065
13066         cf_cv_find_linkage_utf8=yes
13067         cf_cv_header_path_utf8=/usr/include
13068         cf_cv_library_path_utf8=/usr/lib
13069         cf_cv_library_file_utf8="-lutf8"
13070
13071 else
13072   echo "$as_me: failed program was:" >&5
13073 cat "conftest.$ac_ext" >&5
13074
13075         cf_cv_find_linkage_utf8=no
13076         LIBS="$cf_save_LIBS"
13077
13078         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13079
13080 echo "${as_me:-configure}:13080: testing find linkage for utf8 library ..." 1>&5
13081
13082 echo "${as_me:-configure}:13082: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13083
13084         cf_save_CPPFLAGS="$CPPFLAGS"
13085         cf_test_CPPFLAGS="$CPPFLAGS"
13086
13087 cf_search=
13088
13089 # collect the current set of include-directories from compiler flags
13090 cf_header_path_list=""
13091 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13092         for cf_header_path in $CPPFLAGS $CFLAGS
13093         do
13094                 case "$cf_header_path" in
13095                 (-I*)
13096                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13097
13098 test "x$cf_header_path" != "xNONE" && \
13099 test -d "$cf_header_path" && \
13100  {
13101         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13102         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13103         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13104         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13105         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13106         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13107 }
13108
13109                         cf_header_path_list="$cf_header_path_list $cf_search"
13110                         ;;
13111                 esac
13112         done
13113 fi
13114
13115 # add the variations for the package we are looking for
13116
13117 cf_search=
13118
13119 test "x$prefix" != "xNONE" && \
13120 test -d "$prefix" && \
13121  {
13122         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13123         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13124         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13125         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13126         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13127         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13128 }
13129
13130 for cf_subdir_prefix in \
13131         /usr \
13132         /usr/local \
13133         /usr/pkg \
13134         /opt \
13135         /opt/local \
13136         $HOME
13137 do
13138
13139 test "x$cf_subdir_prefix" != "x$prefix" && \
13140 test -d "$cf_subdir_prefix" && \
13141 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13142         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13143         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13144         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13145         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13146         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13147         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13148 }
13149
13150 done
13151
13152 test "$includedir" != NONE && \
13153 test "$includedir" != "/usr/include" && \
13154 test -d "$includedir" && {
13155         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13156         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13157 }
13158
13159 test "$oldincludedir" != NONE && \
13160 test "$oldincludedir" != "/usr/include" && \
13161 test -d "$oldincludedir" && {
13162         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13163         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13164 }
13165
13166 cf_search="$cf_search $cf_header_path_list"
13167
13168         for cf_cv_header_path_utf8 in $cf_search
13169         do
13170                 if test -d "$cf_cv_header_path_utf8" ; then
13171                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13172
13173 echo "${as_me:-configure}:13173: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13174
13175                         CPPFLAGS="$cf_save_CPPFLAGS"
13176
13177         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13178         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13179
13180                         cat >"conftest.$ac_ext" <<_ACEOF
13181 #line 13181 "configure"
13182 #include "confdefs.h"
13183
13184 #include <libutf8.h>
13185 int
13186 main (void)
13187 {
13188 putwc(0,0);
13189   ;
13190   return 0;
13191 }
13192 _ACEOF
13193 rm -f "conftest.$ac_objext"
13194 if { (eval echo "$as_me:13194: \"$ac_compile\"") >&5
13195   (eval $ac_compile) 2>&5
13196   ac_status=$?
13197   echo "$as_me:13197: \$? = $ac_status" >&5
13198   (exit "$ac_status"); } &&
13199          { ac_try='test -s "conftest.$ac_objext"'
13200   { (eval echo "$as_me:13200: \"$ac_try\"") >&5
13201   (eval $ac_try) 2>&5
13202   ac_status=$?
13203   echo "$as_me:13203: \$? = $ac_status" >&5
13204   (exit "$ac_status"); }; }; then
13205
13206                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13207
13208 echo "${as_me:-configure}:13208: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13209
13210                                 cf_cv_find_linkage_utf8=maybe
13211                                 cf_test_CPPFLAGS="$CPPFLAGS"
13212                                 break
13213 else
13214   echo "$as_me: failed program was:" >&5
13215 cat "conftest.$ac_ext" >&5
13216
13217                                 CPPFLAGS="$cf_save_CPPFLAGS"
13218
13219 fi
13220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13221                 fi
13222         done
13223
13224         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13225
13226 echo "${as_me:-configure}:13226: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13227
13228                 cf_save_LIBS="$LIBS"
13229                 cf_save_LDFLAGS="$LDFLAGS"
13230
13231                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13232
13233 cf_search=
13234 cf_library_path_list=""
13235 if test -n "${LDFLAGS}${LIBS}" ; then
13236         for cf_library_path in $LDFLAGS $LIBS
13237         do
13238                 case "$cf_library_path" in
13239                 (-L*)
13240                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13241
13242 test "x$cf_library_path" != "xNONE" && \
13243 test -d "$cf_library_path" && \
13244  {
13245         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13246         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13247         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13248         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13249         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13250         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13251 }
13252
13253                         cf_library_path_list="$cf_library_path_list $cf_search"
13254                         ;;
13255                 esac
13256         done
13257 fi
13258
13259 cf_search=
13260
13261 test "x$prefix" != "xNONE" && \
13262 test -d "$prefix" && \
13263  {
13264         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13265         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13266         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13267         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13268         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13269         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13270 }
13271
13272 for cf_subdir_prefix in \
13273         /usr \
13274         /usr/local \
13275         /usr/pkg \
13276         /opt \
13277         /opt/local \
13278         $HOME
13279 do
13280
13281 test "x$cf_subdir_prefix" != "x$prefix" && \
13282 test -d "$cf_subdir_prefix" && \
13283 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13284         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13285         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13286         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13287         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13288         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13289         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13290 }
13291
13292 done
13293
13294 cf_search="$cf_library_path_list $cf_search"
13295
13296                         for cf_cv_library_path_utf8 in $cf_search
13297                         do
13298                                 if test -d "$cf_cv_library_path_utf8" ; then
13299                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13300
13301 echo "${as_me:-configure}:13301: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13302
13303                                         CPPFLAGS="$cf_test_CPPFLAGS"
13304                                         LIBS="-lutf8  $cf_save_LIBS"
13305                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13306                                         cat >"conftest.$ac_ext" <<_ACEOF
13307 #line 13307 "configure"
13308 #include "confdefs.h"
13309
13310 #include <libutf8.h>
13311 int
13312 main (void)
13313 {
13314 putwc(0,0);
13315   ;
13316   return 0;
13317 }
13318 _ACEOF
13319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13320 if { (eval echo "$as_me:13320: \"$ac_link\"") >&5
13321   (eval $ac_link) 2>&5
13322   ac_status=$?
13323   echo "$as_me:13323: \$? = $ac_status" >&5
13324   (exit "$ac_status"); } &&
13325          { ac_try='test -s "conftest$ac_exeext"'
13326   { (eval echo "$as_me:13326: \"$ac_try\"") >&5
13327   (eval $ac_try) 2>&5
13328   ac_status=$?
13329   echo "$as_me:13329: \$? = $ac_status" >&5
13330   (exit "$ac_status"); }; }; then
13331
13332                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13333
13334 echo "${as_me:-configure}:13334: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13335
13336                                         cf_cv_find_linkage_utf8=yes
13337                                         cf_cv_library_file_utf8="-lutf8"
13338                                         break
13339 else
13340   echo "$as_me: failed program was:" >&5
13341 cat "conftest.$ac_ext" >&5
13342
13343                                         CPPFLAGS="$cf_save_CPPFLAGS"
13344                                         LIBS="$cf_save_LIBS"
13345                                         LDFLAGS="$cf_save_LDFLAGS"
13346
13347 fi
13348 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13349                                 fi
13350                         done
13351                         CPPFLAGS="$cf_save_CPPFLAGS"
13352                         LDFLAGS="$cf_save_LDFLAGS"
13353                 fi
13354
13355         else
13356                 cf_cv_find_linkage_utf8=no
13357         fi
13358
13359 fi
13360 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13361
13362 fi
13363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13364
13365 LIBS="$cf_save_LIBS"
13366
13367 if test "$cf_cv_find_linkage_utf8" = yes ; then
13368 cf_cv_utf8_lib=add-on
13369 else
13370 cf_cv_utf8_lib=no
13371 fi
13372
13373 fi
13374 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13375 fi
13376 echo "$as_me:13376: result: $cf_cv_utf8_lib" >&5
13377 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13378
13379 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13380 # ncurses/ncursesw:
13381 if test "$cf_cv_utf8_lib" = "add-on" ; then
13382
13383 cat >>confdefs.h <<\EOF
13384 #define HAVE_LIBUTF8_H 1
13385 EOF
13386
13387 if test -n "$cf_cv_header_path_utf8" ; then
13388   for cf_add_incdir in $cf_cv_header_path_utf8
13389   do
13390         while test "$cf_add_incdir" != /usr/include
13391         do
13392           if test -d "$cf_add_incdir"
13393           then
13394                 cf_have_incdir=no
13395                 if test -n "$CFLAGS$CPPFLAGS" ; then
13396                   # a loop is needed to ensure we can add subdirs of existing dirs
13397                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13398                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13399                           cf_have_incdir=yes; break
13400                         fi
13401                   done
13402                 fi
13403
13404                 if test "$cf_have_incdir" = no ; then
13405                   if test "$cf_add_incdir" = /usr/local/include ; then
13406                         if test "$GCC" = yes
13407                         then
13408                           cf_save_CPPFLAGS=$CPPFLAGS
13409
13410         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13411         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13412
13413                           cat >"conftest.$ac_ext" <<_ACEOF
13414 #line 13414 "configure"
13415 #include "confdefs.h"
13416 #include <stdio.h>
13417 int
13418 main (void)
13419 {
13420 printf("Hello")
13421   ;
13422   return 0;
13423 }
13424 _ACEOF
13425 rm -f "conftest.$ac_objext"
13426 if { (eval echo "$as_me:13426: \"$ac_compile\"") >&5
13427   (eval $ac_compile) 2>&5
13428   ac_status=$?
13429   echo "$as_me:13429: \$? = $ac_status" >&5
13430   (exit "$ac_status"); } &&
13431          { ac_try='test -s "conftest.$ac_objext"'
13432   { (eval echo "$as_me:13432: \"$ac_try\"") >&5
13433   (eval $ac_try) 2>&5
13434   ac_status=$?
13435   echo "$as_me:13435: \$? = $ac_status" >&5
13436   (exit "$ac_status"); }; }; then
13437   :
13438 else
13439   echo "$as_me: failed program was:" >&5
13440 cat "conftest.$ac_ext" >&5
13441 cf_have_incdir=yes
13442 fi
13443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13444                           CPPFLAGS=$cf_save_CPPFLAGS
13445                         fi
13446                   fi
13447                 fi
13448
13449                 if test "$cf_have_incdir" = no ; then
13450                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13451
13452 echo "${as_me:-configure}:13452: testing adding $cf_add_incdir to include-path ..." 1>&5
13453
13454                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13455
13456                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13457                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13458                   cf_add_incdir="$cf_top_incdir"
13459                 else
13460                   break
13461                 fi
13462           else
13463                 break
13464           fi
13465         done
13466   done
13467 fi
13468
13469 if test -n "$cf_cv_library_path_utf8" ; then
13470         for cf_add_libdir in $cf_cv_library_path_utf8
13471         do
13472                 if test "$cf_add_libdir" = /usr/lib ; then
13473                         :
13474                 elif test -d "$cf_add_libdir"
13475                 then
13476                         cf_have_libdir=no
13477                         if test -n "$LDFLAGS$LIBS" ; then
13478                                 # a loop is needed to ensure we can add subdirs of existing dirs
13479                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13480                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13481                                                 cf_have_libdir=yes; break
13482                                         fi
13483                                 done
13484                         fi
13485                         if test "$cf_have_libdir" = no ; then
13486                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13487
13488 echo "${as_me:-configure}:13488: testing adding $cf_add_libdir to library-path ..." 1>&5
13489
13490                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13491                         fi
13492                 fi
13493         done
13494 fi
13495
13496 cf_add_libs="$LIBS"
13497 # reverse order
13498 cf_add_0lib=
13499 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13500 # filter duplicates
13501 for cf_add_1lib in $cf_add_0lib; do
13502         for cf_add_2lib in $cf_add_libs; do
13503                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13504                         cf_add_1lib=
13505                         break
13506                 fi
13507         done
13508         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13509 done
13510 LIBS="$cf_add_libs"
13511
13512 fi
13513
13514                 if test "$cf_cv_utf8_lib" != no ; then
13515                         NCURSES_LIBUTF8=1
13516                 fi
13517         fi
13518
13519 # This is needed on Tru64 5.0 to declare mbstate_t
13520 echo "$as_me:13520: checking if we must include wchar.h to declare mbstate_t" >&5
13521 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13522 if test "${cf_cv_mbstate_t+set}" = set; then
13523   echo $ECHO_N "(cached) $ECHO_C" >&6
13524 else
13525
13526 cat >"conftest.$ac_ext" <<_ACEOF
13527 #line 13527 "configure"
13528 #include "confdefs.h"
13529
13530 #include <stdlib.h>
13531 #include <stdarg.h>
13532 #include <stdio.h>
13533 #ifdef HAVE_LIBUTF8_H
13534 #include <libutf8.h>
13535 #endif
13536 int
13537 main (void)
13538 {
13539 mbstate_t state
13540   ;
13541   return 0;
13542 }
13543 _ACEOF
13544 rm -f "conftest.$ac_objext"
13545 if { (eval echo "$as_me:13545: \"$ac_compile\"") >&5
13546   (eval $ac_compile) 2>&5
13547   ac_status=$?
13548   echo "$as_me:13548: \$? = $ac_status" >&5
13549   (exit "$ac_status"); } &&
13550          { ac_try='test -s "conftest.$ac_objext"'
13551   { (eval echo "$as_me:13551: \"$ac_try\"") >&5
13552   (eval $ac_try) 2>&5
13553   ac_status=$?
13554   echo "$as_me:13554: \$? = $ac_status" >&5
13555   (exit "$ac_status"); }; }; then
13556   cf_cv_mbstate_t=no
13557 else
13558   echo "$as_me: failed program was:" >&5
13559 cat "conftest.$ac_ext" >&5
13560 cat >"conftest.$ac_ext" <<_ACEOF
13561 #line 13561 "configure"
13562 #include "confdefs.h"
13563
13564 #include <stdlib.h>
13565 #include <stdarg.h>
13566 #include <stdio.h>
13567 #include <wchar.h>
13568 #ifdef HAVE_LIBUTF8_H
13569 #include <libutf8.h>
13570 #endif
13571 int
13572 main (void)
13573 {
13574 mbstate_t value
13575   ;
13576   return 0;
13577 }
13578 _ACEOF
13579 rm -f "conftest.$ac_objext"
13580 if { (eval echo "$as_me:13580: \"$ac_compile\"") >&5
13581   (eval $ac_compile) 2>&5
13582   ac_status=$?
13583   echo "$as_me:13583: \$? = $ac_status" >&5
13584   (exit "$ac_status"); } &&
13585          { ac_try='test -s "conftest.$ac_objext"'
13586   { (eval echo "$as_me:13586: \"$ac_try\"") >&5
13587   (eval $ac_try) 2>&5
13588   ac_status=$?
13589   echo "$as_me:13589: \$? = $ac_status" >&5
13590   (exit "$ac_status"); }; }; then
13591   cf_cv_mbstate_t=yes
13592 else
13593   echo "$as_me: failed program was:" >&5
13594 cat "conftest.$ac_ext" >&5
13595 cf_cv_mbstate_t=unknown
13596 fi
13597 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13598 fi
13599 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13600 fi
13601 echo "$as_me:13601: result: $cf_cv_mbstate_t" >&5
13602 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13603
13604 if test "$cf_cv_mbstate_t" = yes ; then
13605
13606 cat >>confdefs.h <<\EOF
13607 #define NEED_WCHAR_H 1
13608 EOF
13609
13610         NEED_WCHAR_H=1
13611 fi
13612
13613 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13614 if test "$cf_cv_mbstate_t" = unknown ; then
13615         NCURSES_MBSTATE_T=1
13616 fi
13617
13618 # This is needed on Tru64 5.0 to declare wchar_t
13619 echo "$as_me:13619: checking if we must include wchar.h to declare wchar_t" >&5
13620 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13621 if test "${cf_cv_wchar_t+set}" = set; then
13622   echo $ECHO_N "(cached) $ECHO_C" >&6
13623 else
13624
13625 cat >"conftest.$ac_ext" <<_ACEOF
13626 #line 13626 "configure"
13627 #include "confdefs.h"
13628
13629 #include <stdlib.h>
13630 #include <stdarg.h>
13631 #include <stdio.h>
13632 #ifdef HAVE_LIBUTF8_H
13633 #include <libutf8.h>
13634 #endif
13635 int
13636 main (void)
13637 {
13638 wchar_t state
13639   ;
13640   return 0;
13641 }
13642 _ACEOF
13643 rm -f "conftest.$ac_objext"
13644 if { (eval echo "$as_me:13644: \"$ac_compile\"") >&5
13645   (eval $ac_compile) 2>&5
13646   ac_status=$?
13647   echo "$as_me:13647: \$? = $ac_status" >&5
13648   (exit "$ac_status"); } &&
13649          { ac_try='test -s "conftest.$ac_objext"'
13650   { (eval echo "$as_me:13650: \"$ac_try\"") >&5
13651   (eval $ac_try) 2>&5
13652   ac_status=$?
13653   echo "$as_me:13653: \$? = $ac_status" >&5
13654   (exit "$ac_status"); }; }; then
13655   cf_cv_wchar_t=no
13656 else
13657   echo "$as_me: failed program was:" >&5
13658 cat "conftest.$ac_ext" >&5
13659 cat >"conftest.$ac_ext" <<_ACEOF
13660 #line 13660 "configure"
13661 #include "confdefs.h"
13662
13663 #include <stdlib.h>
13664 #include <stdarg.h>
13665 #include <stdio.h>
13666 #include <wchar.h>
13667 #ifdef HAVE_LIBUTF8_H
13668 #include <libutf8.h>
13669 #endif
13670 int
13671 main (void)
13672 {
13673 wchar_t value
13674   ;
13675   return 0;
13676 }
13677 _ACEOF
13678 rm -f "conftest.$ac_objext"
13679 if { (eval echo "$as_me:13679: \"$ac_compile\"") >&5
13680   (eval $ac_compile) 2>&5
13681   ac_status=$?
13682   echo "$as_me:13682: \$? = $ac_status" >&5
13683   (exit "$ac_status"); } &&
13684          { ac_try='test -s "conftest.$ac_objext"'
13685   { (eval echo "$as_me:13685: \"$ac_try\"") >&5
13686   (eval $ac_try) 2>&5
13687   ac_status=$?
13688   echo "$as_me:13688: \$? = $ac_status" >&5
13689   (exit "$ac_status"); }; }; then
13690   cf_cv_wchar_t=yes
13691 else
13692   echo "$as_me: failed program was:" >&5
13693 cat "conftest.$ac_ext" >&5
13694 cf_cv_wchar_t=unknown
13695 fi
13696 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13697 fi
13698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13699 fi
13700 echo "$as_me:13700: result: $cf_cv_wchar_t" >&5
13701 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13702
13703 if test "$cf_cv_wchar_t" = yes ; then
13704
13705 cat >>confdefs.h <<\EOF
13706 #define NEED_WCHAR_H 1
13707 EOF
13708
13709         NEED_WCHAR_H=1
13710 fi
13711
13712 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13713 if test "$cf_cv_wchar_t" = unknown ; then
13714         NCURSES_WCHAR_T=1
13715 fi
13716
13717 # if we find wchar_t in either place, use substitution to provide a fallback.
13718 if test "$cf_cv_wchar_t" != unknown ; then
13719         NCURSES_OK_WCHAR_T=1
13720 fi
13721
13722 # This is needed on Tru64 5.0 to declare wint_t
13723 echo "$as_me:13723: checking if we must include wchar.h to declare wint_t" >&5
13724 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13725 if test "${cf_cv_wint_t+set}" = set; then
13726   echo $ECHO_N "(cached) $ECHO_C" >&6
13727 else
13728
13729 cat >"conftest.$ac_ext" <<_ACEOF
13730 #line 13730 "configure"
13731 #include "confdefs.h"
13732
13733 #include <stdlib.h>
13734 #include <stdarg.h>
13735 #include <stdio.h>
13736 #ifdef HAVE_LIBUTF8_H
13737 #include <libutf8.h>
13738 #endif
13739 int
13740 main (void)
13741 {
13742 wint_t state
13743   ;
13744   return 0;
13745 }
13746 _ACEOF
13747 rm -f "conftest.$ac_objext"
13748 if { (eval echo "$as_me:13748: \"$ac_compile\"") >&5
13749   (eval $ac_compile) 2>&5
13750   ac_status=$?
13751   echo "$as_me:13751: \$? = $ac_status" >&5
13752   (exit "$ac_status"); } &&
13753          { ac_try='test -s "conftest.$ac_objext"'
13754   { (eval echo "$as_me:13754: \"$ac_try\"") >&5
13755   (eval $ac_try) 2>&5
13756   ac_status=$?
13757   echo "$as_me:13757: \$? = $ac_status" >&5
13758   (exit "$ac_status"); }; }; then
13759   cf_cv_wint_t=no
13760 else
13761   echo "$as_me: failed program was:" >&5
13762 cat "conftest.$ac_ext" >&5
13763 cat >"conftest.$ac_ext" <<_ACEOF
13764 #line 13764 "configure"
13765 #include "confdefs.h"
13766
13767 #include <stdlib.h>
13768 #include <stdarg.h>
13769 #include <stdio.h>
13770 #include <wchar.h>
13771 #ifdef HAVE_LIBUTF8_H
13772 #include <libutf8.h>
13773 #endif
13774 int
13775 main (void)
13776 {
13777 wint_t value
13778   ;
13779   return 0;
13780 }
13781 _ACEOF
13782 rm -f "conftest.$ac_objext"
13783 if { (eval echo "$as_me:13783: \"$ac_compile\"") >&5
13784   (eval $ac_compile) 2>&5
13785   ac_status=$?
13786   echo "$as_me:13786: \$? = $ac_status" >&5
13787   (exit "$ac_status"); } &&
13788          { ac_try='test -s "conftest.$ac_objext"'
13789   { (eval echo "$as_me:13789: \"$ac_try\"") >&5
13790   (eval $ac_try) 2>&5
13791   ac_status=$?
13792   echo "$as_me:13792: \$? = $ac_status" >&5
13793   (exit "$ac_status"); }; }; then
13794   cf_cv_wint_t=yes
13795 else
13796   echo "$as_me: failed program was:" >&5
13797 cat "conftest.$ac_ext" >&5
13798 cf_cv_wint_t=unknown
13799 fi
13800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13801 fi
13802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13803 fi
13804 echo "$as_me:13804: result: $cf_cv_wint_t" >&5
13805 echo "${ECHO_T}$cf_cv_wint_t" >&6
13806
13807 if test "$cf_cv_wint_t" = yes ; then
13808
13809 cat >>confdefs.h <<\EOF
13810 #define NEED_WCHAR_H 1
13811 EOF
13812
13813         NEED_WCHAR_H=1
13814 fi
13815
13816 # if we do not find wint_t in either place, use substitution to provide a fallback.
13817 if test "$cf_cv_wint_t" = unknown ; then
13818         NCURSES_WINT_T=1
13819 fi
13820
13821 # if we find wint_t in either place, use substitution to provide a fallback.
13822 if test "$cf_cv_wint_t" != unknown ; then
13823         NCURSES_OK_WINT_T=1
13824 fi
13825
13826         if test "$NCURSES_MBSTATE_T" != 0; then
13827
13828 cat >>confdefs.h <<\EOF
13829 #define NEED_MBSTATE_T_DEF 1
13830 EOF
13831
13832         fi
13833 fi
13834
13835 ###   use option --disable-lp64 to allow long chtype
13836 echo "$as_me:13836: checking whether to enable _LP64 definition in curses.h" >&5
13837 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13838
13839 # Check whether --enable-lp64 or --disable-lp64 was given.
13840 if test "${enable_lp64+set}" = set; then
13841   enableval="$enable_lp64"
13842   with_lp64=$enableval
13843 else
13844   with_lp64=$cf_dft_with_lp64
13845 fi;
13846 echo "$as_me:13846: result: $with_lp64" >&5
13847 echo "${ECHO_T}$with_lp64" >&6
13848
13849 if test "x$with_lp64" = xyes ; then
13850         cf_cv_enable_lp64=1
13851 else
13852         cf_cv_enable_lp64=0
13853 fi
13854
13855 # Check whether --enable-largefile or --disable-largefile was given.
13856 if test "${enable_largefile+set}" = set; then
13857   enableval="$enable_largefile"
13858
13859 fi;
13860 if test "$enable_largefile" != no; then
13861
13862   echo "$as_me:13862: checking for special C compiler options needed for large files" >&5
13863 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13864 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13865   echo $ECHO_N "(cached) $ECHO_C" >&6
13866 else
13867   ac_cv_sys_largefile_CC=no
13868      if test "$GCC" != yes; then
13869        ac_save_CC=$CC
13870        while :; do
13871          # IRIX 6.2 and later do not support large files by default,
13872          # so use the C compiler's -n32 option if that helps.
13873          cat >"conftest.$ac_ext" <<_ACEOF
13874 #line 13874 "configure"
13875 #include "confdefs.h"
13876 #include <sys/types.h>
13877  /* Check that off_t can represent 2**63 - 1 correctly.
13878     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13879     since some C++ compilers masquerading as C compilers
13880     incorrectly reject 9223372036854775807.  */
13881 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13882   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13883                        && LARGE_OFF_T % 2147483647 == 1)
13884                       ? 1 : -1];
13885 int
13886 main (void)
13887 {
13888
13889   ;
13890   return 0;
13891 }
13892 _ACEOF
13893          rm -f "conftest.$ac_objext"
13894 if { (eval echo "$as_me:13894: \"$ac_compile\"") >&5
13895   (eval $ac_compile) 2>&5
13896   ac_status=$?
13897   echo "$as_me:13897: \$? = $ac_status" >&5
13898   (exit "$ac_status"); } &&
13899          { ac_try='test -s "conftest.$ac_objext"'
13900   { (eval echo "$as_me:13900: \"$ac_try\"") >&5
13901   (eval $ac_try) 2>&5
13902   ac_status=$?
13903   echo "$as_me:13903: \$? = $ac_status" >&5
13904   (exit "$ac_status"); }; }; then
13905   break
13906 else
13907   echo "$as_me: failed program was:" >&5
13908 cat "conftest.$ac_ext" >&5
13909 fi
13910 rm -f "conftest.$ac_objext"
13911          CC="$CC -n32"
13912          rm -f "conftest.$ac_objext"
13913 if { (eval echo "$as_me:13913: \"$ac_compile\"") >&5
13914   (eval $ac_compile) 2>&5
13915   ac_status=$?
13916   echo "$as_me:13916: \$? = $ac_status" >&5
13917   (exit "$ac_status"); } &&
13918          { ac_try='test -s "conftest.$ac_objext"'
13919   { (eval echo "$as_me:13919: \"$ac_try\"") >&5
13920   (eval $ac_try) 2>&5
13921   ac_status=$?
13922   echo "$as_me:13922: \$? = $ac_status" >&5
13923   (exit "$ac_status"); }; }; then
13924   ac_cv_sys_largefile_CC=' -n32'; break
13925 else
13926   echo "$as_me: failed program was:" >&5
13927 cat "conftest.$ac_ext" >&5
13928 fi
13929 rm -f "conftest.$ac_objext"
13930          break
13931        done
13932        CC=$ac_save_CC
13933        rm -f "conftest.$ac_ext"
13934     fi
13935 fi
13936 echo "$as_me:13936: result: $ac_cv_sys_largefile_CC" >&5
13937 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13938   if test "$ac_cv_sys_largefile_CC" != no; then
13939     CC=$CC$ac_cv_sys_largefile_CC
13940   fi
13941
13942   echo "$as_me:13942: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13943 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13944 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13945   echo $ECHO_N "(cached) $ECHO_C" >&6
13946 else
13947   while :; do
13948   ac_cv_sys_file_offset_bits=no
13949   cat >"conftest.$ac_ext" <<_ACEOF
13950 #line 13950 "configure"
13951 #include "confdefs.h"
13952 #include <sys/types.h>
13953  /* Check that off_t can represent 2**63 - 1 correctly.
13954     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13955     since some C++ compilers masquerading as C compilers
13956     incorrectly reject 9223372036854775807.  */
13957 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13958   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13959                        && LARGE_OFF_T % 2147483647 == 1)
13960                       ? 1 : -1];
13961 int
13962 main (void)
13963 {
13964
13965   ;
13966   return 0;
13967 }
13968 _ACEOF
13969 rm -f "conftest.$ac_objext"
13970 if { (eval echo "$as_me:13970: \"$ac_compile\"") >&5
13971   (eval $ac_compile) 2>&5
13972   ac_status=$?
13973   echo "$as_me:13973: \$? = $ac_status" >&5
13974   (exit "$ac_status"); } &&
13975          { ac_try='test -s "conftest.$ac_objext"'
13976   { (eval echo "$as_me:13976: \"$ac_try\"") >&5
13977   (eval $ac_try) 2>&5
13978   ac_status=$?
13979   echo "$as_me:13979: \$? = $ac_status" >&5
13980   (exit "$ac_status"); }; }; then
13981   break
13982 else
13983   echo "$as_me: failed program was:" >&5
13984 cat "conftest.$ac_ext" >&5
13985 fi
13986 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13987   cat >"conftest.$ac_ext" <<_ACEOF
13988 #line 13988 "configure"
13989 #include "confdefs.h"
13990 #define _FILE_OFFSET_BITS 64
13991 #include <sys/types.h>
13992  /* Check that off_t can represent 2**63 - 1 correctly.
13993     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13994     since some C++ compilers masquerading as C compilers
13995     incorrectly reject 9223372036854775807.  */
13996 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13997   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13998                        && LARGE_OFF_T % 2147483647 == 1)
13999                       ? 1 : -1];
14000 int
14001 main (void)
14002 {
14003
14004   ;
14005   return 0;
14006 }
14007 _ACEOF
14008 rm -f "conftest.$ac_objext"
14009 if { (eval echo "$as_me:14009: \"$ac_compile\"") >&5
14010   (eval $ac_compile) 2>&5
14011   ac_status=$?
14012   echo "$as_me:14012: \$? = $ac_status" >&5
14013   (exit "$ac_status"); } &&
14014          { ac_try='test -s "conftest.$ac_objext"'
14015   { (eval echo "$as_me:14015: \"$ac_try\"") >&5
14016   (eval $ac_try) 2>&5
14017   ac_status=$?
14018   echo "$as_me:14018: \$? = $ac_status" >&5
14019   (exit "$ac_status"); }; }; then
14020   ac_cv_sys_file_offset_bits=64; break
14021 else
14022   echo "$as_me: failed program was:" >&5
14023 cat "conftest.$ac_ext" >&5
14024 fi
14025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14026   break
14027 done
14028 fi
14029 echo "$as_me:14029: result: $ac_cv_sys_file_offset_bits" >&5
14030 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14031 if test "$ac_cv_sys_file_offset_bits" != no; then
14032
14033 cat >>confdefs.h <<EOF
14034 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14035 EOF
14036
14037 fi
14038 rm -rf conftest*
14039   echo "$as_me:14039: checking for _LARGE_FILES value needed for large files" >&5
14040 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14041 if test "${ac_cv_sys_large_files+set}" = set; then
14042   echo $ECHO_N "(cached) $ECHO_C" >&6
14043 else
14044   while :; do
14045   ac_cv_sys_large_files=no
14046   cat >"conftest.$ac_ext" <<_ACEOF
14047 #line 14047 "configure"
14048 #include "confdefs.h"
14049 #include <sys/types.h>
14050  /* Check that off_t can represent 2**63 - 1 correctly.
14051     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14052     since some C++ compilers masquerading as C compilers
14053     incorrectly reject 9223372036854775807.  */
14054 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14055   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14056                        && LARGE_OFF_T % 2147483647 == 1)
14057                       ? 1 : -1];
14058 int
14059 main (void)
14060 {
14061
14062   ;
14063   return 0;
14064 }
14065 _ACEOF
14066 rm -f "conftest.$ac_objext"
14067 if { (eval echo "$as_me:14067: \"$ac_compile\"") >&5
14068   (eval $ac_compile) 2>&5
14069   ac_status=$?
14070   echo "$as_me:14070: \$? = $ac_status" >&5
14071   (exit "$ac_status"); } &&
14072          { ac_try='test -s "conftest.$ac_objext"'
14073   { (eval echo "$as_me:14073: \"$ac_try\"") >&5
14074   (eval $ac_try) 2>&5
14075   ac_status=$?
14076   echo "$as_me:14076: \$? = $ac_status" >&5
14077   (exit "$ac_status"); }; }; then
14078   break
14079 else
14080   echo "$as_me: failed program was:" >&5
14081 cat "conftest.$ac_ext" >&5
14082 fi
14083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14084   cat >"conftest.$ac_ext" <<_ACEOF
14085 #line 14085 "configure"
14086 #include "confdefs.h"
14087 #define _LARGE_FILES 1
14088 #include <sys/types.h>
14089  /* Check that off_t can represent 2**63 - 1 correctly.
14090     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14091     since some C++ compilers masquerading as C compilers
14092     incorrectly reject 9223372036854775807.  */
14093 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14094   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14095                        && LARGE_OFF_T % 2147483647 == 1)
14096                       ? 1 : -1];
14097 int
14098 main (void)
14099 {
14100
14101   ;
14102   return 0;
14103 }
14104 _ACEOF
14105 rm -f "conftest.$ac_objext"
14106 if { (eval echo "$as_me:14106: \"$ac_compile\"") >&5
14107   (eval $ac_compile) 2>&5
14108   ac_status=$?
14109   echo "$as_me:14109: \$? = $ac_status" >&5
14110   (exit "$ac_status"); } &&
14111          { ac_try='test -s "conftest.$ac_objext"'
14112   { (eval echo "$as_me:14112: \"$ac_try\"") >&5
14113   (eval $ac_try) 2>&5
14114   ac_status=$?
14115   echo "$as_me:14115: \$? = $ac_status" >&5
14116   (exit "$ac_status"); }; }; then
14117   ac_cv_sys_large_files=1; break
14118 else
14119   echo "$as_me: failed program was:" >&5
14120 cat "conftest.$ac_ext" >&5
14121 fi
14122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14123   break
14124 done
14125 fi
14126 echo "$as_me:14126: result: $ac_cv_sys_large_files" >&5
14127 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14128 if test "$ac_cv_sys_large_files" != no; then
14129
14130 cat >>confdefs.h <<EOF
14131 #define _LARGE_FILES $ac_cv_sys_large_files
14132 EOF
14133
14134 fi
14135 rm -rf conftest*
14136 fi
14137
14138         if test "$enable_largefile" != no ; then
14139         echo "$as_me:14139: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14140 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14141 if test "${ac_cv_sys_largefile_source+set}" = set; then
14142   echo $ECHO_N "(cached) $ECHO_C" >&6
14143 else
14144   while :; do
14145   ac_cv_sys_largefile_source=no
14146   cat >"conftest.$ac_ext" <<_ACEOF
14147 #line 14147 "configure"
14148 #include "confdefs.h"
14149 #include <stdio.h>
14150 int
14151 main (void)
14152 {
14153 return !fseeko;
14154   ;
14155   return 0;
14156 }
14157 _ACEOF
14158 rm -f "conftest.$ac_objext"
14159 if { (eval echo "$as_me:14159: \"$ac_compile\"") >&5
14160   (eval $ac_compile) 2>&5
14161   ac_status=$?
14162   echo "$as_me:14162: \$? = $ac_status" >&5
14163   (exit "$ac_status"); } &&
14164          { ac_try='test -s "conftest.$ac_objext"'
14165   { (eval echo "$as_me:14165: \"$ac_try\"") >&5
14166   (eval $ac_try) 2>&5
14167   ac_status=$?
14168   echo "$as_me:14168: \$? = $ac_status" >&5
14169   (exit "$ac_status"); }; }; then
14170   break
14171 else
14172   echo "$as_me: failed program was:" >&5
14173 cat "conftest.$ac_ext" >&5
14174 fi
14175 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14176   cat >"conftest.$ac_ext" <<_ACEOF
14177 #line 14177 "configure"
14178 #include "confdefs.h"
14179 #define _LARGEFILE_SOURCE 1
14180 #include <stdio.h>
14181 int
14182 main (void)
14183 {
14184 return !fseeko;
14185   ;
14186   return 0;
14187 }
14188 _ACEOF
14189 rm -f "conftest.$ac_objext"
14190 if { (eval echo "$as_me:14190: \"$ac_compile\"") >&5
14191   (eval $ac_compile) 2>&5
14192   ac_status=$?
14193   echo "$as_me:14193: \$? = $ac_status" >&5
14194   (exit "$ac_status"); } &&
14195          { ac_try='test -s "conftest.$ac_objext"'
14196   { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197   (eval $ac_try) 2>&5
14198   ac_status=$?
14199   echo "$as_me:14199: \$? = $ac_status" >&5
14200   (exit "$ac_status"); }; }; then
14201   ac_cv_sys_largefile_source=1; break
14202 else
14203   echo "$as_me: failed program was:" >&5
14204 cat "conftest.$ac_ext" >&5
14205 fi
14206 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14207   break
14208 done
14209 fi
14210 echo "$as_me:14210: result: $ac_cv_sys_largefile_source" >&5
14211 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14212 if test "$ac_cv_sys_largefile_source" != no; then
14213
14214 cat >>confdefs.h <<EOF
14215 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14216 EOF
14217
14218 fi
14219 rm -rf conftest*
14220
14221 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14222 # in glibc 2.1.3, but that breaks too many other things.
14223 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14224 echo "$as_me:14224: checking for fseeko" >&5
14225 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14226 if test "${ac_cv_func_fseeko+set}" = set; then
14227   echo $ECHO_N "(cached) $ECHO_C" >&6
14228 else
14229   cat >"conftest.$ac_ext" <<_ACEOF
14230 #line 14230 "configure"
14231 #include "confdefs.h"
14232 #include <stdio.h>
14233 int
14234 main (void)
14235 {
14236 return fseeko && fseeko (stdin, 0, 0);
14237   ;
14238   return 0;
14239 }
14240 _ACEOF
14241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14242 if { (eval echo "$as_me:14242: \"$ac_link\"") >&5
14243   (eval $ac_link) 2>&5
14244   ac_status=$?
14245   echo "$as_me:14245: \$? = $ac_status" >&5
14246   (exit "$ac_status"); } &&
14247          { ac_try='test -s "conftest$ac_exeext"'
14248   { (eval echo "$as_me:14248: \"$ac_try\"") >&5
14249   (eval $ac_try) 2>&5
14250   ac_status=$?
14251   echo "$as_me:14251: \$? = $ac_status" >&5
14252   (exit "$ac_status"); }; }; then
14253   ac_cv_func_fseeko=yes
14254 else
14255   echo "$as_me: failed program was:" >&5
14256 cat "conftest.$ac_ext" >&5
14257 ac_cv_func_fseeko=no
14258 fi
14259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14260 fi
14261 echo "$as_me:14261: result: $ac_cv_func_fseeko" >&5
14262 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14263 if test $ac_cv_func_fseeko = yes; then
14264
14265 cat >>confdefs.h <<\EOF
14266 #define HAVE_FSEEKO 1
14267 EOF
14268
14269 fi
14270
14271         # Normally we would collect these definitions in the config.h,
14272         # but (like _XOPEN_SOURCE), some environments rely on having these
14273         # defined before any of the system headers are included.  Another
14274         # case comes up with C++, e.g., on AIX the compiler compiles the
14275         # header files by themselves before looking at the body files it is
14276         # told to compile.  For ncurses, those header files do not include
14277         # the config.h
14278         if test "$ac_cv_sys_large_files" != no
14279         then
14280
14281         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14282         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14283
14284         fi
14285         if test "$ac_cv_sys_largefile_source" != no
14286         then
14287
14288         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14289         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14290
14291         fi
14292         if test "$ac_cv_sys_file_offset_bits" != no
14293         then
14294
14295         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14296         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14297
14298         fi
14299
14300         echo "$as_me:14300: checking whether to use struct dirent64" >&5
14301 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14302 if test "${cf_cv_struct_dirent64+set}" = set; then
14303   echo $ECHO_N "(cached) $ECHO_C" >&6
14304 else
14305
14306                 cat >"conftest.$ac_ext" <<_ACEOF
14307 #line 14307 "configure"
14308 #include "confdefs.h"
14309
14310 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14311 #include <sys/types.h>
14312 #include <dirent.h>
14313
14314 int
14315 main (void)
14316 {
14317
14318                 /* if transitional largefile support is setup, this is true */
14319                 extern struct dirent64 * readdir(DIR *);
14320                 struct dirent64 *x = readdir((DIR *)0);
14321                 struct dirent *y = readdir((DIR *)0);
14322                 int z = x - y;
14323                 (void)z;
14324
14325   ;
14326   return 0;
14327 }
14328 _ACEOF
14329 rm -f "conftest.$ac_objext"
14330 if { (eval echo "$as_me:14330: \"$ac_compile\"") >&5
14331   (eval $ac_compile) 2>&5
14332   ac_status=$?
14333   echo "$as_me:14333: \$? = $ac_status" >&5
14334   (exit "$ac_status"); } &&
14335          { ac_try='test -s "conftest.$ac_objext"'
14336   { (eval echo "$as_me:14336: \"$ac_try\"") >&5
14337   (eval $ac_try) 2>&5
14338   ac_status=$?
14339   echo "$as_me:14339: \$? = $ac_status" >&5
14340   (exit "$ac_status"); }; }; then
14341   cf_cv_struct_dirent64=yes
14342 else
14343   echo "$as_me: failed program was:" >&5
14344 cat "conftest.$ac_ext" >&5
14345 cf_cv_struct_dirent64=no
14346 fi
14347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14348
14349 fi
14350 echo "$as_me:14350: result: $cf_cv_struct_dirent64" >&5
14351 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14352         test "$cf_cv_struct_dirent64" = yes &&
14353 cat >>confdefs.h <<\EOF
14354 #define HAVE_STRUCT_DIRENT64 1
14355 EOF
14356
14357         fi
14358
14359 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14360 echo "$as_me:14360: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14361 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14362
14363 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14364 if test "${enable_tparm_varargs+set}" = set; then
14365   enableval="$enable_tparm_varargs"
14366   with_tparm_varargs=$enableval
14367 else
14368   with_tparm_varargs=yes
14369 fi;
14370 echo "$as_me:14370: result: $with_tparm_varargs" >&5
14371 echo "${ECHO_T}$with_tparm_varargs" >&6
14372 NCURSES_TPARM_VARARGS=0
14373 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14374
14375 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14376 if test "$with_ticlib" != no ; then
14377 echo "$as_me:14377: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14378 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14379
14380 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14381 if test "${enable_tic_depends+set}" = set; then
14382   enableval="$enable_tic_depends"
14383   with_tic_depends=$enableval
14384 else
14385   with_tic_depends=yes
14386 fi;
14387 echo "$as_me:14387: result: $with_tic_depends" >&5
14388 echo "${ECHO_T}$with_tic_depends" >&6
14389 else
14390         with_tic_depends=no
14391 fi
14392
14393 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14394 echo "$as_me:14394: checking if you want to enable wattr* macros" >&5
14395 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14396
14397 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14398 if test "${enable_wattr_macros+set}" = set; then
14399   enableval="$enable_wattr_macros"
14400   with_wattr_macros=$enableval
14401 else
14402   with_wattr_macros=no
14403 fi;
14404 if [ "x$with_wattr_macros" != xyes ]; then
14405         NCURSES_WATTR_MACROS=0
14406         echo "$as_me:14406: result: no" >&5
14407 echo "${ECHO_T}no" >&6
14408 else
14409         NCURSES_WATTR_MACROS=1
14410         echo "$as_me:14410: result: yes" >&5
14411 echo "${ECHO_T}yes" >&6
14412 fi
14413
14414 echo "$as_me:14414: checking for X11 rgb file" >&5
14415 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14416
14417 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14418 if test "${with_x11_rgb+set}" = set; then
14419   withval="$with_x11_rgb"
14420   RGB_PATH=$withval
14421 else
14422   RGB_PATH=auto
14423 fi;
14424
14425 if test "x$RGB_PATH" = xauto
14426 then
14427         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14428         for cf_path in \
14429                 /opt/local/share/X11/rgb.txt \
14430                 /opt/X11/share/X11/rgb.txt \
14431                 /usr/share/X11/rgb.txt \
14432                 /usr/X11/share/X11/rgb.txt \
14433                 /usr/X11/lib/X11/rgb.txt \
14434                 /usr/lib/X11/rgb.txt \
14435                 /etc/X11/rgb.txt \
14436                 /usr/pkg/lib/X11/rgb.txt \
14437                 /usr/X11R7/lib/X11/rgb.txt \
14438                 /usr/X11R6/lib/X11/rgb.txt \
14439                 /usr/X11R5/lib/X11/rgb.txt \
14440                 /usr/X11R4/lib/X11/rgb.txt \
14441                 /usr/local/lib/X11/rgb.txt \
14442                 /usr/local/share/X11/rgb.txt \
14443                 /usr/lib64/X11/rgb.txt
14444         do
14445                 if test -f "$cf_path" ; then
14446                         RGB_PATH="$cf_path"
14447                         break
14448                 fi
14449         done
14450 else
14451         cf_path=$RGB_PATH
14452
14453 if test "x$prefix" != xNONE; then
14454         cf_path_syntax="$prefix"
14455 else
14456         cf_path_syntax="$ac_default_prefix"
14457 fi
14458
14459 case ".$cf_path" in
14460 (.\$\(*\)*|.\'*\'*)
14461         ;;
14462 (..|./*|.\\*)
14463         ;;
14464 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14465         ;;
14466 (.\$\{*prefix\}*|.\$\{*dir\}*)
14467         eval cf_path="$cf_path"
14468         case ".$cf_path" in
14469         (.NONE/*)
14470                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14471                 ;;
14472         esac
14473         ;;
14474 (.no|.NONE/*)
14475         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14476         ;;
14477 (*)
14478         { { echo "$as_me:14478: error: expected a pathname, not \"$cf_path\"" >&5
14479 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14480    { (exit 1); exit 1; }; }
14481         ;;
14482 esac
14483
14484 fi
14485
14486 echo "$as_me:14486: result: $RGB_PATH" >&5
14487 echo "${ECHO_T}$RGB_PATH" >&6
14488
14489 cat >>confdefs.h <<EOF
14490 #define RGB_PATH "$cf_path"
14491 EOF
14492
14493 no_x11_rgb=
14494 if test "$RGB_PATH" = no
14495 then
14496         no_x11_rgb="#"
14497 fi
14498
14499 ###   use option --with-bool to override bool's type
14500 echo "$as_me:14500: checking for type of bool" >&5
14501 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14502
14503 # Check whether --with-bool or --without-bool was given.
14504 if test "${with_bool+set}" = set; then
14505   withval="$with_bool"
14506   NCURSES_BOOL="$withval"
14507 else
14508   NCURSES_BOOL=auto
14509 fi;
14510 echo "$as_me:14510: result: $NCURSES_BOOL" >&5
14511 echo "${ECHO_T}$NCURSES_BOOL" >&6
14512
14513 echo "$as_me:14513: checking for alternate terminal capabilities file" >&5
14514 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14515
14516 # Check whether --with-caps or --without-caps was given.
14517 if test "${with_caps+set}" = set; then
14518   withval="$with_caps"
14519   TERMINFO_CAPS=Caps.$withval
14520 else
14521   TERMINFO_CAPS=Caps
14522 fi;
14523 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14524 then
14525         { echo "$as_me:14525: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14526 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14527         TERMINFO_CAPS=Caps
14528 fi
14529 echo "$as_me:14529: result: $TERMINFO_CAPS" >&5
14530 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14531
14532 ###   use option --with-chtype to override chtype's type
14533 echo "$as_me:14533: checking for type of chtype" >&5
14534 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14535
14536 # Check whether --with-chtype or --without-chtype was given.
14537 if test "${with_chtype+set}" = set; then
14538   withval="$with_chtype"
14539   NCURSES_CHTYPE="$withval"
14540 else
14541   NCURSES_CHTYPE=$cf_dft_chtype
14542 fi;
14543 echo "$as_me:14543: result: $NCURSES_CHTYPE" >&5
14544 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14545
14546 ###   use option --with-ospeed to override ospeed's type
14547 echo "$as_me:14547: checking for type of ospeed" >&5
14548 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14549
14550 # Check whether --with-ospeed or --without-ospeed was given.
14551 if test "${with_ospeed+set}" = set; then
14552   withval="$with_ospeed"
14553   NCURSES_OSPEED="$withval"
14554 else
14555   NCURSES_OSPEED=short
14556 fi;
14557 echo "$as_me:14557: result: $NCURSES_OSPEED" >&5
14558 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14559
14560 ###   use option --with-mmask-t to override mmask_t's type
14561 echo "$as_me:14561: checking for type of mmask_t" >&5
14562 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14563
14564 # Check whether --with-mmask-t or --without-mmask-t was given.
14565 if test "${with_mmask_t+set}" = set; then
14566   withval="$with_mmask_t"
14567   NCURSES_MMASK_T="$withval"
14568 else
14569   NCURSES_MMASK_T=$cf_dft_mmask_t
14570 fi;
14571 echo "$as_me:14571: result: $NCURSES_MMASK_T" >&5
14572 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14573
14574 ###   use option --with-ccharw-max to override CCHARW_MAX size
14575 echo "$as_me:14575: checking for size CCHARW_MAX" >&5
14576 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14577
14578 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14579 if test "${with_ccharw_max+set}" = set; then
14580   withval="$with_ccharw_max"
14581   NCURSES_CCHARW_MAX="$withval"
14582 else
14583   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14584 fi;
14585 echo "$as_me:14585: result: $NCURSES_CCHARW_MAX" >&5
14586 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14587
14588 echo "$as_me:14588: checking for signed char" >&5
14589 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14590 if test "${ac_cv_type_signed_char+set}" = set; then
14591   echo $ECHO_N "(cached) $ECHO_C" >&6
14592 else
14593   cat >"conftest.$ac_ext" <<_ACEOF
14594 #line 14594 "configure"
14595 #include "confdefs.h"
14596 $ac_includes_default
14597 int
14598 main (void)
14599 {
14600 if ((signed char *) 0)
14601   return 0;
14602 if (sizeof (signed char))
14603   return 0;
14604   ;
14605   return 0;
14606 }
14607 _ACEOF
14608 rm -f "conftest.$ac_objext"
14609 if { (eval echo "$as_me:14609: \"$ac_compile\"") >&5
14610   (eval $ac_compile) 2>&5
14611   ac_status=$?
14612   echo "$as_me:14612: \$? = $ac_status" >&5
14613   (exit "$ac_status"); } &&
14614          { ac_try='test -s "conftest.$ac_objext"'
14615   { (eval echo "$as_me:14615: \"$ac_try\"") >&5
14616   (eval $ac_try) 2>&5
14617   ac_status=$?
14618   echo "$as_me:14618: \$? = $ac_status" >&5
14619   (exit "$ac_status"); }; }; then
14620   ac_cv_type_signed_char=yes
14621 else
14622   echo "$as_me: failed program was:" >&5
14623 cat "conftest.$ac_ext" >&5
14624 ac_cv_type_signed_char=no
14625 fi
14626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14627 fi
14628 echo "$as_me:14628: result: $ac_cv_type_signed_char" >&5
14629 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14630
14631 echo "$as_me:14631: checking size of signed char" >&5
14632 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14633 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14634   echo $ECHO_N "(cached) $ECHO_C" >&6
14635 else
14636   if test "$ac_cv_type_signed_char" = yes; then
14637   if test "$cross_compiling" = yes; then
14638   # Depending upon the size, compute the lo and hi bounds.
14639 cat >"conftest.$ac_ext" <<_ACEOF
14640 #line 14640 "configure"
14641 #include "confdefs.h"
14642 $ac_includes_default
14643 int
14644 main (void)
14645 {
14646 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14647   ;
14648   return 0;
14649 }
14650 _ACEOF
14651 rm -f "conftest.$ac_objext"
14652 if { (eval echo "$as_me:14652: \"$ac_compile\"") >&5
14653   (eval $ac_compile) 2>&5
14654   ac_status=$?
14655   echo "$as_me:14655: \$? = $ac_status" >&5
14656   (exit "$ac_status"); } &&
14657          { ac_try='test -s "conftest.$ac_objext"'
14658   { (eval echo "$as_me:14658: \"$ac_try\"") >&5
14659   (eval $ac_try) 2>&5
14660   ac_status=$?
14661   echo "$as_me:14661: \$? = $ac_status" >&5
14662   (exit "$ac_status"); }; }; then
14663   ac_lo=0 ac_mid=0
14664   while :; do
14665     cat >"conftest.$ac_ext" <<_ACEOF
14666 #line 14666 "configure"
14667 #include "confdefs.h"
14668 $ac_includes_default
14669 int
14670 main (void)
14671 {
14672 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14673   ;
14674   return 0;
14675 }
14676 _ACEOF
14677 rm -f "conftest.$ac_objext"
14678 if { (eval echo "$as_me:14678: \"$ac_compile\"") >&5
14679   (eval $ac_compile) 2>&5
14680   ac_status=$?
14681   echo "$as_me:14681: \$? = $ac_status" >&5
14682   (exit "$ac_status"); } &&
14683          { ac_try='test -s "conftest.$ac_objext"'
14684   { (eval echo "$as_me:14684: \"$ac_try\"") >&5
14685   (eval $ac_try) 2>&5
14686   ac_status=$?
14687   echo "$as_me:14687: \$? = $ac_status" >&5
14688   (exit "$ac_status"); }; }; then
14689   ac_hi=$ac_mid; break
14690 else
14691   echo "$as_me: failed program was:" >&5
14692 cat "conftest.$ac_ext" >&5
14693 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14694 fi
14695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14696   done
14697 else
14698   echo "$as_me: failed program was:" >&5
14699 cat "conftest.$ac_ext" >&5
14700 ac_hi=-1 ac_mid=-1
14701   while :; do
14702     cat >"conftest.$ac_ext" <<_ACEOF
14703 #line 14703 "configure"
14704 #include "confdefs.h"
14705 $ac_includes_default
14706 int
14707 main (void)
14708 {
14709 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14710   ;
14711   return 0;
14712 }
14713 _ACEOF
14714 rm -f "conftest.$ac_objext"
14715 if { (eval echo "$as_me:14715: \"$ac_compile\"") >&5
14716   (eval $ac_compile) 2>&5
14717   ac_status=$?
14718   echo "$as_me:14718: \$? = $ac_status" >&5
14719   (exit "$ac_status"); } &&
14720          { ac_try='test -s "conftest.$ac_objext"'
14721   { (eval echo "$as_me:14721: \"$ac_try\"") >&5
14722   (eval $ac_try) 2>&5
14723   ac_status=$?
14724   echo "$as_me:14724: \$? = $ac_status" >&5
14725   (exit "$ac_status"); }; }; then
14726   ac_lo=$ac_mid; break
14727 else
14728   echo "$as_me: failed program was:" >&5
14729 cat "conftest.$ac_ext" >&5
14730 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14731 fi
14732 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14733   done
14734 fi
14735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14736 # Binary search between lo and hi bounds.
14737 while test "x$ac_lo" != "x$ac_hi"; do
14738   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14739   cat >"conftest.$ac_ext" <<_ACEOF
14740 #line 14740 "configure"
14741 #include "confdefs.h"
14742 $ac_includes_default
14743 int
14744 main (void)
14745 {
14746 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14747   ;
14748   return 0;
14749 }
14750 _ACEOF
14751 rm -f "conftest.$ac_objext"
14752 if { (eval echo "$as_me:14752: \"$ac_compile\"") >&5
14753   (eval $ac_compile) 2>&5
14754   ac_status=$?
14755   echo "$as_me:14755: \$? = $ac_status" >&5
14756   (exit "$ac_status"); } &&
14757          { ac_try='test -s "conftest.$ac_objext"'
14758   { (eval echo "$as_me:14758: \"$ac_try\"") >&5
14759   (eval $ac_try) 2>&5
14760   ac_status=$?
14761   echo "$as_me:14761: \$? = $ac_status" >&5
14762   (exit "$ac_status"); }; }; then
14763   ac_hi=$ac_mid
14764 else
14765   echo "$as_me: failed program was:" >&5
14766 cat "conftest.$ac_ext" >&5
14767 ac_lo=`expr "$ac_mid" + 1`
14768 fi
14769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14770 done
14771 ac_cv_sizeof_signed_char=$ac_lo
14772 else
14773   if test "$cross_compiling" = yes; then
14774   { { echo "$as_me:14774: error: cannot run test program while cross compiling" >&5
14775 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14776    { (exit 1); exit 1; }; }
14777 else
14778   cat >"conftest.$ac_ext" <<_ACEOF
14779 #line 14779 "configure"
14780 #include "confdefs.h"
14781 $ac_includes_default
14782 int
14783 main (void)
14784 {
14785 FILE *f = fopen ("conftest.val", "w");
14786 if (!f)
14787   $ac_main_return (1);
14788 fprintf (f, "%ld", (long)(sizeof (signed char)));
14789 fclose (f);
14790   ;
14791   return 0;
14792 }
14793 _ACEOF
14794 rm -f "conftest$ac_exeext"
14795 if { (eval echo "$as_me:14795: \"$ac_link\"") >&5
14796   (eval $ac_link) 2>&5
14797   ac_status=$?
14798   echo "$as_me:14798: \$? = $ac_status" >&5
14799   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14800   { (eval echo "$as_me:14800: \"$ac_try\"") >&5
14801   (eval $ac_try) 2>&5
14802   ac_status=$?
14803   echo "$as_me:14803: \$? = $ac_status" >&5
14804   (exit "$ac_status"); }; }; then
14805   ac_cv_sizeof_signed_char=`cat conftest.val`
14806 else
14807   echo "$as_me: program exited with status $ac_status" >&5
14808 echo "$as_me: failed program was:" >&5
14809 cat "conftest.$ac_ext" >&5
14810 fi
14811 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14812 fi
14813 fi
14814 rm -f conftest.val
14815 else
14816   ac_cv_sizeof_signed_char=0
14817 fi
14818 fi
14819 echo "$as_me:14819: result: $ac_cv_sizeof_signed_char" >&5
14820 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14821 cat >>confdefs.h <<EOF
14822 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14823 EOF
14824
14825 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14826         NCURSES_SBOOL="signed char"
14827 else
14828         NCURSES_SBOOL="char"
14829 fi
14830 echo "$as_me:14830: checking if you want to use signed Boolean array in term.h" >&5
14831 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14832
14833 # Check whether --enable-signed-char or --disable-signed-char was given.
14834 if test "${enable_signed_char+set}" = set; then
14835   enableval="$enable_signed_char"
14836   with_signed_char=$enableval
14837 else
14838   with_signed_char=$cf_dft_signed_char
14839 fi;
14840 echo "$as_me:14840: result: $with_signed_char" >&5
14841 echo "${ECHO_T}$with_signed_char" >&6
14842 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14843
14844 ###   use option --with-tparm-arg to override tparm's argument type
14845 echo "$as_me:14845: checking for type of tparm args" >&5
14846 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14847
14848 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14849 if test "${with_tparm_arg+set}" = set; then
14850   withval="$with_tparm_arg"
14851   NCURSES_TPARM_ARG="$withval"
14852 else
14853   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14854 fi;
14855 echo "$as_me:14855: result: $NCURSES_TPARM_ARG" >&5
14856 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14857
14858 ### Enable compiling-in rcs id's
14859 echo "$as_me:14859: checking if RCS identifiers should be compiled-in" >&5
14860 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14861
14862 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14863 if test "${with_rcs_ids+set}" = set; then
14864   withval="$with_rcs_ids"
14865   with_rcs_ids=$withval
14866 else
14867   with_rcs_ids=no
14868 fi;
14869 echo "$as_me:14869: result: $with_rcs_ids" >&5
14870 echo "${ECHO_T}$with_rcs_ids" >&6
14871 test "x$with_rcs_ids" = xyes &&
14872 cat >>confdefs.h <<\EOF
14873 #define USE_RCS_IDS 1
14874 EOF
14875
14876 ###############################################################################
14877
14878 echo "$as_me:14878: checking format of man-pages" >&5
14879 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14880
14881 # Check whether --with-manpage-format or --without-manpage-format was given.
14882 if test "${with_manpage_format+set}" = set; then
14883   withval="$with_manpage_format"
14884   MANPAGE_FORMAT=$withval
14885 else
14886   MANPAGE_FORMAT=unknown
14887 fi;
14888
14889 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14890 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14891
14892 cf_unknown=
14893
14894 case "$MANPAGE_FORMAT" in
14895 (unknown)
14896         if test -z "$MANPATH" ; then
14897                 MANPATH="/usr/man:/usr/share/man"
14898         fi
14899
14900         # look for the 'date' man-page (it is most likely to be installed!)
14901         MANPAGE_FORMAT=
14902         cf_preform="no"
14903         cf_catonly="yes"
14904         cf_example="date"
14905
14906         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14907         for cf_dir in $MANPATH; do
14908                 test -z "$cf_dir" && cf_dir=/usr/man
14909                 for cf_name in $cf_dir/man*/$cf_example.[01]* $cf_dir/cat*/$cf_example.[01]* $cf_dir/man*/$cf_example $cf_dir/cat*/$cf_example
14910                 do
14911                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14912                         if test "x$cf_test" = "x$cf_name" ; then
14913
14914                                 case "$cf_name" in
14915                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14916                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14917                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14918                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14919                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14920                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14921                                 esac
14922
14923                                 case "$cf_name" in
14924                                 ($cf_dir/man*)
14925                                         cf_catonly=no
14926                                         ;;
14927                                 ($cf_dir/cat*)
14928                                         cf_preform=yes
14929                                         ;;
14930                                 esac
14931                                 break
14932                         fi
14933
14934                         # if we found a match in either man* or cat*, stop looking
14935                         if test -n "$MANPAGE_FORMAT" ; then
14936                                 cf_found=no
14937                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14938                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14939                                 case "$cf_name" in
14940                                 ($cf_dir/cat*)
14941                                         cf_found=yes
14942                                         ;;
14943                                 esac
14944                                 test "$cf_found" = yes && break
14945                         fi
14946                 done
14947                 # only check the first directory in $MANPATH where we find manpages
14948                 if test -n "$MANPAGE_FORMAT" ; then
14949                         break
14950                 fi
14951         done
14952         # if we did not find the example, just assume it is normal
14953         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14954         IFS="$ac_save_ifs"
14955         ;;
14956 (*)
14957         for cf_option in $MANPAGE_FORMAT; do
14958         case "$cf_option" in
14959         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14960                 ;;
14961         (*)
14962                 cf_unknown="$cf_unknown $cf_option"
14963                 ;;
14964         esac
14965         done
14966         ;;
14967 esac
14968
14969 echo "$as_me:14969: result: $MANPAGE_FORMAT" >&5
14970 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14971 if test -n "$cf_unknown" ; then
14972         { echo "$as_me:14972: WARNING: Unexpected manpage-format $cf_unknown" >&5
14973 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14974 fi
14975
14976 cf_manpage_format=no
14977 cf_manpage_inboth=no
14978 cf_manpage_so_strip=
14979 cf_manpage_compress=
14980
14981 for cf_item in $MANPAGE_FORMAT
14982 do
14983 case "$cf_item" in
14984 (catonly)
14985         cf_manpage_format=yes
14986         cf_manpage_inboth=no
14987         ;;
14988 (formatted)
14989         cf_manpage_format=yes
14990         cf_manpage_inboth=yes
14991         ;;
14992 (compress)
14993         cf_manpage_so_strip="Z"
14994         cf_manpage_compress=compress
14995         ;;
14996 (gzip)
14997         cf_manpage_so_strip="gz"
14998         cf_manpage_compress=gzip
14999         ;;
15000 (bzip2)
15001         cf_manpage_so_strip="bz2"
15002         cf_manpage_compress=bzip2
15003         ;;
15004 (xz)
15005         cf_manpage_so_strip="xz"
15006         cf_manpage_compress=xz
15007         ;;
15008 esac
15009 done
15010
15011 echo "$as_me:15011: checking for manpage renaming" >&5
15012 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15013
15014 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15015 if test "${with_manpage_renames+set}" = set; then
15016   withval="$with_manpage_renames"
15017   MANPAGE_RENAMES=$withval
15018 else
15019   MANPAGE_RENAMES=yes
15020 fi;
15021
15022 case ".$MANPAGE_RENAMES" in
15023 (.no)
15024         ;;
15025 (.|.yes)
15026         # Debian 'man' program?
15027         if test -f /etc/debian_version ; then
15028                 MANPAGE_RENAMES=man/man_db.renames
15029         else
15030                 MANPAGE_RENAMES=no
15031         fi
15032         ;;
15033 esac
15034
15035 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15036         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15037 elif test "$MANPAGE_RENAMES" = no ; then
15038         :
15039 elif test ! -f "$MANPAGE_RENAMES" ; then
15040         { { echo "$as_me:15040: error: not a filename: $MANPAGE_RENAMES" >&5
15041 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15042    { (exit 1); exit 1; }; }
15043 fi
15044
15045 echo "$as_me:15045: result: $MANPAGE_RENAMES" >&5
15046 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15047
15048 echo "$as_me:15048: checking if manpage aliases will be installed" >&5
15049 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15050
15051 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15052 if test "${with_manpage_aliases+set}" = set; then
15053   withval="$with_manpage_aliases"
15054   MANPAGE_ALIASES=$withval
15055 else
15056   MANPAGE_ALIASES=yes
15057 fi;
15058
15059 echo "$as_me:15059: result: $MANPAGE_ALIASES" >&5
15060 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15061
15062 case "x$LN_S" in
15063 (xln*)
15064         cf_use_symlinks=yes
15065         ;;
15066 (*)
15067         cf_use_symlinks=no
15068         ;;
15069 esac
15070
15071 MANPAGE_SYMLINKS=no
15072 if test "$MANPAGE_ALIASES" = yes ; then
15073 echo "$as_me:15073: checking if manpage symlinks should be used" >&5
15074 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15075
15076 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15077 if test "${with_manpage_symlinks+set}" = set; then
15078   withval="$with_manpage_symlinks"
15079   MANPAGE_SYMLINKS=$withval
15080 else
15081   MANPAGE_SYMLINKS=$cf_use_symlinks
15082 fi;
15083
15084 if test "$cf_use_symlinks" = no; then
15085 if test "$MANPAGE_SYMLINKS" = yes ; then
15086         { echo "$as_me:15086: WARNING: cannot make symlinks" >&5
15087 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15088         MANPAGE_SYMLINKS=no
15089 fi
15090 fi
15091
15092 echo "$as_me:15092: result: $MANPAGE_SYMLINKS" >&5
15093 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15094 fi
15095
15096 echo "$as_me:15096: checking for manpage tbl" >&5
15097 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15098
15099 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15100 if test "${with_manpage_tbl+set}" = set; then
15101   withval="$with_manpage_tbl"
15102   MANPAGE_TBL=$withval
15103 else
15104   MANPAGE_TBL=no
15105 fi;
15106
15107 echo "$as_me:15107: result: $MANPAGE_TBL" >&5
15108 echo "${ECHO_T}$MANPAGE_TBL" >&6
15109
15110 if test "$prefix" = "NONE" ; then
15111         cf_prefix="$ac_default_prefix"
15112 else
15113         cf_prefix="$prefix"
15114 fi
15115
15116 test ! -d man && mkdir man
15117
15118 cf_edit_man=./edit_man.sh
15119 cf_man_alias=`pwd`/man_alias.sed
15120
15121 cat >$cf_edit_man <<CF_EOF
15122 #! $SHELL
15123 # this script is generated by the configure-script CF_MAN_PAGES macro.
15124
15125 prefix="$cf_prefix"
15126 datarootdir="$datarootdir"
15127 datadir="$datadir"
15128
15129 NCURSES_MAJOR="$NCURSES_MAJOR"
15130 NCURSES_MINOR="$NCURSES_MINOR"
15131 NCURSES_PATCH="$NCURSES_PATCH"
15132
15133 NCURSES_OSPEED="$NCURSES_OSPEED"
15134 TERMINFO="$TERMINFO"
15135 TERMINFO_DIRS="$TERMINFO_DIRS"
15136
15137 INSTALL="$INSTALL"
15138 INSTALL_DATA="$INSTALL_DATA"
15139
15140 transform="$program_transform_name"
15141
15142 TMP=\${TMPDIR:=/tmp}/man\$\$
15143 trap "rm -f \$TMP; exit 1" 1 2 3 15
15144 trap "rm -f \$TMP" 0
15145
15146 form=\$1
15147 shift || exit 1
15148
15149 verb=\$1
15150 shift || exit 1
15151
15152 mandir=\$1
15153 shift || exit 1
15154
15155 srcdir=\$1
15156 top_srcdir=\$srcdir/..
15157 shift || exit 1
15158
15159 if test "\$form" = normal ; then
15160         if test "$cf_manpage_format" = yes ; then
15161         if test "$cf_manpage_inboth" = no ; then
15162                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15163                 exit $?
15164         fi
15165         fi
15166         cf_subdir=\$mandir/man
15167         cf_tables=$MANPAGE_TBL
15168 else
15169         cf_subdir=\$mandir/cat
15170         cf_tables=yes
15171 fi
15172
15173 # process the list of source-files
15174 for i in "\$@" ; do
15175 case \$i in
15176 (*.orig|*.rej) ;;
15177 (*.[0-9]*)
15178         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15179         if test "\$verb" = installing ; then
15180         if test ! -d "\$cf_subdir\${section}" ; then
15181                 mkdir -p "\$cf_subdir\$section"
15182         fi
15183         fi
15184
15185         # replace variables in man page
15186         if test ! -f "$cf_man_alias" ; then
15187 cat >>$cf_man_alias <<-CF_EOF2
15188                 s,@DATADIR@,\$datadir,g
15189                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15190                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15191                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15192                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15193                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15194                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15195 CF_EOF
15196
15197         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15198         do
15199                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15200                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15201 cat >>$cf_edit_man <<-CF_EOF
15202                 s,@$cf_NAME@,$cf_name,g
15203 CF_EOF
15204         done
15205
15206 cat >>$cf_edit_man <<CF_EOF
15207 CF_EOF2
15208                 echo "...made $cf_man_alias"
15209         fi
15210
15211         aliases=
15212         cf_source=\`basename "\$i"\`
15213         cf_full_alias=\$cf_source
15214         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15215         if test ! -f "\$cf_full_alias" ; then
15216                 echo ".. skipped \$cf_source"
15217                 continue
15218         fi
15219 CF_EOF
15220
15221 if test "$MANPAGE_ALIASES" != no ; then
15222 cat >>$cf_edit_man <<CF_EOF
15223         nCurses=ignore.3x
15224         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15225         test "$with_curses_h" = yes && nCurses=ncurses.3x
15226         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$cf_full_alias" |sed -f "$cf_man_alias" | sort -u; test "\$cf_part_alias" = "\$nCurses" && echo curses\`
15227 CF_EOF
15228 fi
15229
15230 if test "$MANPAGE_RENAMES" = no ; then
15231 cat >>$cf_edit_man <<CF_EOF
15232         # perform program transformations for section 1 man pages
15233         if test \$section = 1 ; then
15234                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15235         else
15236                 cf_target=\$cf_subdir\${section}/\$cf_source
15237         fi
15238 CF_EOF
15239 else
15240 cat >>$cf_edit_man <<CF_EOF
15241         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15242         if test -z "\$cf_target" ; then
15243                 echo "? missing rename for \$cf_source"
15244                 cf_target="\$cf_source"
15245         fi
15246         cf_target="\$cf_subdir\${section}/\${cf_target}"
15247
15248 CF_EOF
15249 fi
15250
15251 cat >>$cf_edit_man <<CF_EOF
15252         sed     -f "$cf_man_alias" \\
15253 CF_EOF
15254
15255 if test "$MANPAGE_RENAMES" != no ; then
15256 cat >>$cf_edit_man <<CF_EOF
15257                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15258 CF_EOF
15259 else
15260 cat >>$cf_edit_man <<CF_EOF
15261                 < "\$i" >\$TMP
15262 CF_EOF
15263 fi
15264
15265 cat >>$cf_edit_man <<CF_EOF
15266 if test \$cf_tables = yes ; then
15267         tbl \$TMP >\$TMP.out
15268         mv \$TMP.out \$TMP
15269 fi
15270 CF_EOF
15271
15272 if test "$with_overwrite" != yes ; then
15273 cat >>$cf_edit_man <<CF_EOF
15274         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15275         mv \$TMP.out \$TMP
15276 CF_EOF
15277 fi
15278
15279 if test "$with_curses_h" != yes ; then
15280 cat >>$cf_edit_man <<CF_EOF
15281         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15282         mv \$TMP.out \$TMP
15283 CF_EOF
15284 fi
15285
15286 cat >>$cf_edit_man <<CF_EOF
15287         if test "\$form" = format ; then
15288                 nroff -man \$TMP >\$TMP.out
15289                 mv \$TMP.out \$TMP
15290         fi
15291 CF_EOF
15292
15293 if test -n "$cf_manpage_compress" ; then
15294 cat >>$cf_edit_man <<CF_EOF
15295         if test "\$verb" = installing ; then
15296         if ( "$cf_manpage_compress" -f \$TMP )
15297         then
15298                 mv \$TMP.$cf_manpage_so_strip \$TMP
15299         fi
15300         fi
15301         cf_target="\$cf_target.$cf_manpage_so_strip"
15302 CF_EOF
15303 fi
15304
15305 case "$MANPAGE_FORMAT" in
15306 (*BSDI*)
15307 cat >>$cf_edit_man <<CF_EOF
15308         if test "\$form" = format ; then
15309                 # BSDI installs only .0 suffixes in the cat directories
15310                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15311         fi
15312 CF_EOF
15313   ;;
15314 esac
15315
15316 cat >>$cf_edit_man <<CF_EOF
15317         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15318         extra_suffix=
15319         if test -n "$EXTRA_SUFFIX" ; then
15320                 case \$cf_target in
15321                 (*${EXTRA_SUFFIX}\$suffix)
15322                         extra_suffix="$EXTRA_SUFFIX"
15323                         ;;
15324                 esac
15325         fi
15326         if test "\$verb" = installing ; then
15327                 echo "\$verb \$cf_target"
15328                 \$INSTALL_DATA \$TMP "\$cf_target"
15329                 test -d "\$cf_subdir\${section}" &&
15330                 test -n "\$aliases" && (
15331                         cd "\$cf_subdir\${section}" && (
15332                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15333                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15334                                 cf_target=\`basename "\$cf_target"\`
15335                                 for cf_alias in \$aliases
15336                                 do
15337                                         if test "\$section" = 1 ; then
15338                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15339                                         fi
15340                                         cf_alias="\${cf_alias}\${extra_suffix}"
15341
15342                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15343                                                 if test -f "\$cf_alias\${suffix}" ; then
15344                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15345                                                         then
15346                                                                 continue
15347                                                         fi
15348                                                 fi
15349                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15350 CF_EOF
15351 case "x$LN_S" in
15352 (*-f)
15353 cat >>$cf_edit_man <<CF_EOF
15354                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15355 CF_EOF
15356         ;;
15357 (*)
15358 cat >>$cf_edit_man <<CF_EOF
15359                                                 rm -f "\$cf_alias\${suffix}"
15360                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15361 CF_EOF
15362         ;;
15363 esac
15364 cat >>$cf_edit_man <<CF_EOF
15365                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15366                                                 echo ".so \$cf_source" >\$TMP
15367 CF_EOF
15368 if test -n "$cf_manpage_compress" ; then
15369 cat >>$cf_edit_man <<CF_EOF
15370                                                 if test -n "$cf_manpage_so_strip" ; then
15371                                                         "$cf_manpage_compress" -f \$TMP
15372                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15373                                                 fi
15374 CF_EOF
15375 fi
15376 cat >>$cf_edit_man <<CF_EOF
15377                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15378                                                 rm -f "\$cf_alias\${suffix}"
15379                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15380                                         fi
15381                                 done
15382                         )
15383                 )
15384         elif test "\$verb" = removing ; then
15385                 test -f "\$cf_target" && (
15386                         echo "\$verb \$cf_target"
15387                         rm -f "\$cf_target"
15388                 )
15389                 test -d "\$cf_subdir\${section}" &&
15390                 test -n "\$aliases" && (
15391                         cd "\$cf_subdir\${section}" && (
15392                                 for cf_alias in \$aliases
15393                                 do
15394                                         if test "\$section" = 1 ; then
15395                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15396                                         fi
15397                                         cf_alias="\${cf_alias}\${extra_suffix}"
15398
15399                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15400                                         rm -f "\$cf_alias\${suffix}"
15401                                 done
15402                         )
15403                 )
15404         else
15405 #               echo ".hy 0"
15406                 cat \$TMP
15407         fi
15408         ;;
15409 esac
15410 done
15411
15412 if test "$cf_manpage_inboth" = yes ; then
15413 if test "\$form" != format ; then
15414         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15415 fi
15416 fi
15417
15418 exit 0
15419 CF_EOF
15420 chmod 755 "$cf_edit_man"
15421
15422 ###############################################################################
15423
15424 ### Note that some functions (such as const) are normally disabled anyway.
15425 echo "$as_me:15425: checking if you want to build with function extensions" >&5
15426 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15427
15428 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15429 if test "${enable_ext_funcs+set}" = set; then
15430   enableval="$enable_ext_funcs"
15431   with_ext_funcs=$enableval
15432 else
15433   with_ext_funcs=yes
15434 fi;
15435 echo "$as_me:15435: result: $with_ext_funcs" >&5
15436 echo "${ECHO_T}$with_ext_funcs" >&6
15437 if test "x$with_ext_funcs" = xyes ; then
15438         NCURSES_EXT_FUNCS=1
15439
15440 cat >>confdefs.h <<\EOF
15441 #define NCURSES_EXT_FUNCS 1
15442 EOF
15443
15444 cat >>confdefs.h <<\EOF
15445 #define HAVE_ASSUME_DEFAULT_COLORS 1
15446 EOF
15447
15448 cat >>confdefs.h <<\EOF
15449 #define HAVE_CURSES_VERSION 1
15450 EOF
15451
15452 cat >>confdefs.h <<\EOF
15453 #define HAVE_HAS_KEY 1
15454 EOF
15455
15456 cat >>confdefs.h <<\EOF
15457 #define HAVE_RESIZETERM 1
15458 EOF
15459
15460 cat >>confdefs.h <<\EOF
15461 #define HAVE_RESIZE_TERM 1
15462 EOF
15463
15464 cat >>confdefs.h <<\EOF
15465 #define HAVE_TERM_ENTRY_H 1
15466 EOF
15467
15468 cat >>confdefs.h <<\EOF
15469 #define HAVE_USE_DEFAULT_COLORS 1
15470 EOF
15471
15472 cat >>confdefs.h <<\EOF
15473 #define HAVE_USE_SCREEN 1
15474 EOF
15475
15476 cat >>confdefs.h <<\EOF
15477 #define HAVE_USE_WINDOW 1
15478 EOF
15479
15480 cat >>confdefs.h <<\EOF
15481 #define HAVE_WRESIZE 1
15482 EOF
15483
15484         GENERATED_EXT_FUNCS=generated
15485         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15486 else
15487         NCURSES_EXT_FUNCS=0
15488         GENERATED_EXT_FUNCS=
15489 fi
15490
15491 echo "$as_me:15491: checking if you want to build with SCREEN extensions" >&5
15492 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15493
15494 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15495 if test "${enable_sp_funcs+set}" = set; then
15496   enableval="$enable_sp_funcs"
15497   with_sp_funcs=$enableval
15498 else
15499   with_sp_funcs=$cf_dft_ext_spfuncs
15500 fi;
15501 echo "$as_me:15501: result: $with_sp_funcs" >&5
15502 echo "${ECHO_T}$with_sp_funcs" >&6
15503 if test "x$with_sp_funcs" = xyes ; then
15504         NCURSES_SP_FUNCS=1
15505
15506 cat >>confdefs.h <<\EOF
15507 #define NCURSES_SP_FUNCS 1
15508 EOF
15509
15510 cat >>confdefs.h <<\EOF
15511 #define HAVE_TPUTS_SP 1
15512 EOF
15513
15514         GENERATED_SP_FUNCS=generated
15515 else
15516         NCURSES_SP_FUNCS=0
15517         GENERATED_SP_FUNCS=
15518 fi
15519
15520 echo "$as_me:15520: checking if you want to build with terminal-driver" >&5
15521 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15522
15523 # Check whether --enable-term-driver or --disable-term-driver was given.
15524 if test "${enable_term_driver+set}" = set; then
15525   enableval="$enable_term_driver"
15526   with_term_driver=$enableval
15527 else
15528   with_term_driver=no
15529 fi;
15530 echo "$as_me:15530: result: $with_term_driver" >&5
15531 echo "${ECHO_T}$with_term_driver" >&6
15532 if test "x$with_term_driver" = xyes ; then
15533
15534 cat >>confdefs.h <<\EOF
15535 #define USE_TERM_DRIVER 1
15536 EOF
15537
15538         if test "x$with_termlib" != xno ; then
15539                 { { echo "$as_me:15539: error: The term-driver option conflicts with the termlib option" >&5
15540 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15541    { (exit 1); exit 1; }; }
15542         fi
15543         if test "x$with_sp_funcs" != xyes ; then
15544                 { { echo "$as_me:15544: error: The term-driver option relies upon sp-funcs" >&5
15545 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15546    { (exit 1); exit 1; }; }
15547         fi
15548 fi
15549
15550 ###   use option --enable-const to turn on use of const beyond that in XSI.
15551 echo "$as_me:15551: checking for extended use of const keyword" >&5
15552 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15553
15554 # Check whether --enable-const or --disable-const was given.
15555 if test "${enable_const+set}" = set; then
15556   enableval="$enable_const"
15557   with_ext_const=$enableval
15558 else
15559   with_ext_const=$cf_dft_ext_const
15560 fi;
15561 echo "$as_me:15561: result: $with_ext_const" >&5
15562 echo "${ECHO_T}$with_ext_const" >&6
15563 NCURSES_CONST='/*nothing*/'
15564 if test "x$with_ext_const" = xyes ; then
15565         NCURSES_CONST=const
15566 fi
15567
15568 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15569 echo "$as_me:15569: checking if you want to use extended colors" >&5
15570 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15571
15572 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15573 if test "${enable_ext_colors+set}" = set; then
15574   enableval="$enable_ext_colors"
15575   with_ext_colors=$enableval
15576 else
15577   with_ext_colors=$cf_dft_ext_colors
15578 fi;
15579 echo "$as_me:15579: result: $with_ext_colors" >&5
15580 echo "${ECHO_T}$with_ext_colors" >&6
15581 NCURSES_EXT_COLORS=0
15582 if test "x$with_ext_colors" = xyes ; then
15583         if test "x$with_widec" != xyes ; then
15584                 { echo "$as_me:15584: WARNING: This option applies only to wide-character library" >&5
15585 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15586         else
15587                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15588
15589 if test "${with_abi_version+set}" != set; then
15590         case "$cf_cv_rel_version" in
15591         (5.*)
15592                 cf_cv_rel_version=6.0
15593                 cf_cv_abi_version=6
15594                 cf_cv_abi_default=6
15595                 { echo "$as_me:15595: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15596 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15597                 ;;
15598         esac
15599 fi
15600
15601                 NCURSES_EXT_COLORS=1
15602
15603 cat >>confdefs.h <<\EOF
15604 #define NCURSES_EXT_COLORS 1
15605 EOF
15606
15607 cat >>confdefs.h <<\EOF
15608 #define HAVE_ALLOC_PAIR 1
15609 EOF
15610
15611 cat >>confdefs.h <<\EOF
15612 #define HAVE_INIT_EXTENDED_COLOR 1
15613 EOF
15614
15615 cat >>confdefs.h <<\EOF
15616 #define HAVE_RESET_COLOR_PAIRS 1
15617 EOF
15618
15619         fi
15620 fi
15621
15622 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15623 echo "$as_me:15623: checking if you want to use extended mouse encoding" >&5
15624 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15625
15626 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15627 if test "${enable_ext_mouse+set}" = set; then
15628   enableval="$enable_ext_mouse"
15629   with_ext_mouse=$enableval
15630 else
15631   with_ext_mouse=$cf_dft_ext_mouse
15632 fi;
15633 echo "$as_me:15633: result: $with_ext_mouse" >&5
15634 echo "${ECHO_T}$with_ext_mouse" >&6
15635 if test "x$with_ext_mouse" = xyes ; then
15636
15637 if test "${with_abi_version+set}" != set; then
15638         case "$cf_cv_rel_version" in
15639         (5.*)
15640                 cf_cv_rel_version=6.0
15641                 cf_cv_abi_version=6
15642                 cf_cv_abi_default=6
15643                 { echo "$as_me:15643: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15644 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15645                 ;;
15646         esac
15647 fi
15648
15649 fi
15650
15651 if test $cf_cv_abi_default -le 5 ; then
15652         NCURSES_MOUSE_VERSION=1
15653 elif test $cf_cv_abi_default -le 6 ; then
15654         NCURSES_MOUSE_VERSION=2
15655 else
15656         NCURSES_MOUSE_VERSION=3
15657 fi
15658
15659 ###   use option --enable-ext-putwin to turn on extended screendumps
15660 echo "$as_me:15660: checking if you want to use extended putwin/screendump" >&5
15661 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15662
15663 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15664 if test "${enable_ext_putwin+set}" = set; then
15665   enableval="$enable_ext_putwin"
15666   with_ext_putwin=$enableval
15667 else
15668   with_ext_putwin=$cf_dft_ext_putwin
15669 fi;
15670 echo "$as_me:15670: result: $with_ext_putwin" >&5
15671 echo "${ECHO_T}$with_ext_putwin" >&6
15672 if test "x$with_ext_putwin" = xyes ; then
15673
15674 cat >>confdefs.h <<\EOF
15675 #define NCURSES_EXT_PUTWIN 1
15676 EOF
15677
15678 fi
15679
15680 echo "$as_me:15680: checking if you want \$NCURSES_NO_PADDING code" >&5
15681 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15682
15683 # Check whether --enable-no-padding or --disable-no-padding was given.
15684 if test "${enable_no_padding+set}" = set; then
15685   enableval="$enable_no_padding"
15686   with_no_padding=$enableval
15687 else
15688   with_no_padding=$with_ext_funcs
15689 fi;
15690 echo "$as_me:15690: result: $with_no_padding" >&5
15691 echo "${ECHO_T}$with_no_padding" >&6
15692 test "x$with_no_padding" = xyes &&
15693 cat >>confdefs.h <<\EOF
15694 #define NCURSES_NO_PADDING 1
15695 EOF
15696
15697 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15698 echo "$as_me:15698: checking if you want SIGWINCH handler" >&5
15699 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15700
15701 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15702 if test "${enable_sigwinch+set}" = set; then
15703   enableval="$enable_sigwinch"
15704   with_sigwinch=$enableval
15705 else
15706   with_sigwinch=$with_ext_funcs
15707 fi;
15708 echo "$as_me:15708: result: $with_sigwinch" >&5
15709 echo "${ECHO_T}$with_sigwinch" >&6
15710 test "x$with_sigwinch" = xyes &&
15711 cat >>confdefs.h <<\EOF
15712 #define USE_SIGWINCH 1
15713 EOF
15714
15715 ###   use option --enable-tcap-names to allow user to define new capabilities
15716 echo "$as_me:15716: checking if you want user-definable terminal capabilities like termcap" >&5
15717 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15718
15719 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15720 if test "${enable_tcap_names+set}" = set; then
15721   enableval="$enable_tcap_names"
15722   with_tcap_names=$enableval
15723 else
15724   with_tcap_names=$with_ext_funcs
15725 fi;
15726 echo "$as_me:15726: result: $with_tcap_names" >&5
15727 echo "${ECHO_T}$with_tcap_names" >&6
15728 NCURSES_XNAMES=0
15729 if test "x$with_tcap_names" = xyes; then
15730         NCURSES_XNAMES=1
15731
15732 cat >>confdefs.h <<\EOF
15733 #define NCURSES_XNAMES 1
15734 EOF
15735
15736 fi
15737
15738 ##############################################################################
15739
15740 echo "$as_me:15740: checking if you want to link with the pthread library" >&5
15741 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15742
15743 # Check whether --with-pthread or --without-pthread was given.
15744 if test "${with_pthread+set}" = set; then
15745   withval="$with_pthread"
15746   with_pthread=$withval
15747 else
15748   with_pthread=no
15749 fi;
15750 echo "$as_me:15750: result: $with_pthread" >&5
15751 echo "${ECHO_T}$with_pthread" >&6
15752
15753 if test "$with_pthread" != no ; then
15754         echo "$as_me:15754: checking for pthread.h" >&5
15755 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15756 if test "${ac_cv_header_pthread_h+set}" = set; then
15757   echo $ECHO_N "(cached) $ECHO_C" >&6
15758 else
15759   cat >"conftest.$ac_ext" <<_ACEOF
15760 #line 15760 "configure"
15761 #include "confdefs.h"
15762 #include <pthread.h>
15763 _ACEOF
15764 if { (eval echo "$as_me:15764: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15765   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15766   ac_status=$?
15767   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15768   rm -f conftest.er1
15769   cat conftest.err >&5
15770   echo "$as_me:15770: \$? = $ac_status" >&5
15771   (exit "$ac_status"); } >/dev/null; then
15772   if test -s conftest.err; then
15773     ac_cpp_err=$ac_c_preproc_warn_flag
15774   else
15775     ac_cpp_err=
15776   fi
15777 else
15778   ac_cpp_err=yes
15779 fi
15780 if test -z "$ac_cpp_err"; then
15781   ac_cv_header_pthread_h=yes
15782 else
15783   echo "$as_me: failed program was:" >&5
15784   cat "conftest.$ac_ext" >&5
15785   ac_cv_header_pthread_h=no
15786 fi
15787 rm -f conftest.err "conftest.$ac_ext"
15788 fi
15789 echo "$as_me:15789: result: $ac_cv_header_pthread_h" >&5
15790 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15791 if test "$ac_cv_header_pthread_h" = yes; then
15792
15793 cat >>confdefs.h <<\EOF
15794 #define HAVE_PTHREADS_H 1
15795 EOF
15796
15797         for cf_lib_pthread in pthread c_r
15798         do
15799             echo "$as_me:15799: checking if we can link with the $cf_lib_pthread library" >&5
15800 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15801             cf_save_LIBS="$LIBS"
15802
15803 cf_add_libs="$LIBS"
15804 # reverse order
15805 cf_add_0lib=
15806 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15807 # filter duplicates
15808 for cf_add_1lib in $cf_add_0lib; do
15809         for cf_add_2lib in $cf_add_libs; do
15810                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15811                         cf_add_1lib=
15812                         break
15813                 fi
15814         done
15815         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15816 done
15817 LIBS="$cf_add_libs"
15818
15819             cat >"conftest.$ac_ext" <<_ACEOF
15820 #line 15820 "configure"
15821 #include "confdefs.h"
15822
15823 #include <pthread.h>
15824
15825 int
15826 main (void)
15827 {
15828
15829                 int rc = pthread_create(0,0,0,0);
15830                 int r2 = pthread_mutexattr_settype(0, 0);
15831
15832   ;
15833   return 0;
15834 }
15835 _ACEOF
15836 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15837 if { (eval echo "$as_me:15837: \"$ac_link\"") >&5
15838   (eval $ac_link) 2>&5
15839   ac_status=$?
15840   echo "$as_me:15840: \$? = $ac_status" >&5
15841   (exit "$ac_status"); } &&
15842          { ac_try='test -s "conftest$ac_exeext"'
15843   { (eval echo "$as_me:15843: \"$ac_try\"") >&5
15844   (eval $ac_try) 2>&5
15845   ac_status=$?
15846   echo "$as_me:15846: \$? = $ac_status" >&5
15847   (exit "$ac_status"); }; }; then
15848   with_pthread=yes
15849 else
15850   echo "$as_me: failed program was:" >&5
15851 cat "conftest.$ac_ext" >&5
15852 with_pthread=no
15853 fi
15854 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15855             LIBS="$cf_save_LIBS"
15856             echo "$as_me:15856: result: $with_pthread" >&5
15857 echo "${ECHO_T}$with_pthread" >&6
15858             test "$with_pthread" = yes && break
15859         done
15860
15861         if test "$with_pthread" = yes ; then
15862
15863 cf_add_libs="$LIBS"
15864 # reverse order
15865 cf_add_0lib=
15866 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15867 # filter duplicates
15868 for cf_add_1lib in $cf_add_0lib; do
15869         for cf_add_2lib in $cf_add_libs; do
15870                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15871                         cf_add_1lib=
15872                         break
15873                 fi
15874         done
15875         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15876 done
15877 LIBS="$cf_add_libs"
15878
15879 cat >>confdefs.h <<\EOF
15880 #define HAVE_LIBPTHREADS 1
15881 EOF
15882
15883         else
15884             { { echo "$as_me:15884: error: Cannot link with pthread library" >&5
15885 echo "$as_me: error: Cannot link with pthread library" >&2;}
15886    { (exit 1); exit 1; }; }
15887         fi
15888
15889 fi
15890
15891 fi
15892
15893 if test "x$with_pthread" != xno; then
15894         echo "$as_me:15894: checking for pthread_kill" >&5
15895 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15896 if test "${ac_cv_func_pthread_kill+set}" = set; then
15897   echo $ECHO_N "(cached) $ECHO_C" >&6
15898 else
15899   cat >"conftest.$ac_ext" <<_ACEOF
15900 #line 15900 "configure"
15901 #include "confdefs.h"
15902 #define pthread_kill autoconf_temporary
15903 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15904 #undef pthread_kill
15905
15906 #ifdef __cplusplus
15907 extern "C"
15908 #endif
15909
15910 /* We use char because int might match the return type of a gcc2
15911    builtin and then its argument prototype would still apply.  */
15912 char pthread_kill (void);
15913
15914 int
15915 main (void)
15916 {
15917
15918 /* The GNU C library defines stubs for functions which it implements
15919     to always fail with ENOSYS.  Some functions are actually named
15920     something starting with __ and the normal name is an alias.  */
15921 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15922 #error found stub for pthread_kill
15923 #endif
15924
15925         return pthread_kill ();
15926   ;
15927   return 0;
15928 }
15929 _ACEOF
15930 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15931 if { (eval echo "$as_me:15931: \"$ac_link\"") >&5
15932   (eval $ac_link) 2>&5
15933   ac_status=$?
15934   echo "$as_me:15934: \$? = $ac_status" >&5
15935   (exit "$ac_status"); } &&
15936          { ac_try='test -s "conftest$ac_exeext"'
15937   { (eval echo "$as_me:15937: \"$ac_try\"") >&5
15938   (eval $ac_try) 2>&5
15939   ac_status=$?
15940   echo "$as_me:15940: \$? = $ac_status" >&5
15941   (exit "$ac_status"); }; }; then
15942   ac_cv_func_pthread_kill=yes
15943 else
15944   echo "$as_me: failed program was:" >&5
15945 cat "conftest.$ac_ext" >&5
15946 ac_cv_func_pthread_kill=no
15947 fi
15948 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15949 fi
15950 echo "$as_me:15950: result: $ac_cv_func_pthread_kill" >&5
15951 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15952 if test "$ac_cv_func_pthread_kill" = yes; then
15953
15954                 echo "$as_me:15954: checking if you want to allow EINTR in wgetch with pthreads" >&5
15955 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15956
15957 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15958 if test "${enable_pthreads_eintr+set}" = set; then
15959   enableval="$enable_pthreads_eintr"
15960   use_pthreads_eintr=$enableval
15961 else
15962   use_pthreads_eintr=no
15963 fi;
15964                 echo "$as_me:15964: result: $use_pthreads_eintr" >&5
15965 echo "${ECHO_T}$use_pthreads_eintr" >&6
15966                 if test "x$use_pthreads_eintr" = xyes ; then
15967
15968 cat >>confdefs.h <<\EOF
15969 #define USE_PTHREADS_EINTR 1
15970 EOF
15971
15972                 fi
15973 fi
15974
15975         echo "$as_me:15975: checking if you want to use weak-symbols for pthreads" >&5
15976 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15977
15978 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15979 if test "${enable_weak_symbols+set}" = set; then
15980   enableval="$enable_weak_symbols"
15981   use_weak_symbols=$enableval
15982 else
15983   use_weak_symbols=no
15984 fi;
15985         echo "$as_me:15985: result: $use_weak_symbols" >&5
15986 echo "${ECHO_T}$use_weak_symbols" >&6
15987         if test "x$use_weak_symbols" = xyes ; then
15988
15989 echo "$as_me:15989: checking if $CC supports weak symbols" >&5
15990 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15991 if test "${cf_cv_weak_symbols+set}" = set; then
15992   echo $ECHO_N "(cached) $ECHO_C" >&6
15993 else
15994
15995 cat >"conftest.$ac_ext" <<_ACEOF
15996 #line 15996 "configure"
15997 #include "confdefs.h"
15998
15999 #include <stdio.h>
16000 int
16001 main (void)
16002 {
16003
16004 #if defined(__GNUC__)
16005 #  if defined __USE_ISOC99
16006 #    define _cat_pragma(exp)    _Pragma(#exp)
16007 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16008 #  else
16009 #    define _weak_pragma(exp)
16010 #  endif
16011 #  define _declare(name)        __extension__ extern __typeof__(name) name
16012 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16013 #endif
16014
16015 weak_symbol(fopen);
16016
16017   ;
16018   return 0;
16019 }
16020 _ACEOF
16021 rm -f "conftest.$ac_objext"
16022 if { (eval echo "$as_me:16022: \"$ac_compile\"") >&5
16023   (eval $ac_compile) 2>&5
16024   ac_status=$?
16025   echo "$as_me:16025: \$? = $ac_status" >&5
16026   (exit "$ac_status"); } &&
16027          { ac_try='test -s "conftest.$ac_objext"'
16028   { (eval echo "$as_me:16028: \"$ac_try\"") >&5
16029   (eval $ac_try) 2>&5
16030   ac_status=$?
16031   echo "$as_me:16031: \$? = $ac_status" >&5
16032   (exit "$ac_status"); }; }; then
16033   cf_cv_weak_symbols=yes
16034 else
16035   echo "$as_me: failed program was:" >&5
16036 cat "conftest.$ac_ext" >&5
16037 cf_cv_weak_symbols=no
16038 fi
16039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16040
16041 fi
16042 echo "$as_me:16042: result: $cf_cv_weak_symbols" >&5
16043 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16044
16045         else
16046                 cf_cv_weak_symbols=no
16047         fi
16048
16049         if test "x$cf_cv_weak_symbols" = xyes ; then
16050
16051 cat >>confdefs.h <<\EOF
16052 #define USE_WEAK_SYMBOLS 1
16053 EOF
16054
16055         fi
16056 fi
16057
16058 PTHREAD=
16059 if test "x$with_pthread" = "xyes" ; then
16060
16061 cat >>confdefs.h <<\EOF
16062 #define USE_PTHREADS 1
16063 EOF
16064
16065         enable_reentrant=yes
16066         if test "x$cf_cv_weak_symbols" = xyes ; then
16067                 PTHREAD=-lpthread
16068
16069 cf_add_libs="$PRIVATE_LIBS"
16070 # reverse order
16071 cf_add_0lib=
16072 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16073 # filter duplicates
16074 for cf_add_1lib in $cf_add_0lib; do
16075         for cf_add_2lib in $cf_add_libs; do
16076                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16077                         cf_add_1lib=
16078                         break
16079                 fi
16080         done
16081         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16082 done
16083 PRIVATE_LIBS="$cf_add_libs"
16084
16085         fi
16086 fi
16087
16088 # Reentrant code has to be opaque; there's little advantage to making ncurses
16089 # opaque outside of that, so there is no --enable-opaque option.  We can use
16090 # this option without --with-pthreads, but this will be always set for
16091 # pthreads.
16092 echo "$as_me:16092: checking if you want reentrant code" >&5
16093 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16094
16095 # Check whether --enable-reentrant or --disable-reentrant was given.
16096 if test "${enable_reentrant+set}" = set; then
16097   enableval="$enable_reentrant"
16098   with_reentrant=$enableval
16099 else
16100   with_reentrant=no
16101 fi;
16102 echo "$as_me:16102: result: $with_reentrant" >&5
16103 echo "${ECHO_T}$with_reentrant" >&6
16104 if test "x$with_reentrant" = xyes ; then
16105         cf_cv_enable_reentrant=1
16106         cf_cv_enable_opaque="NCURSES_INTERNALS"
16107         NCURSES_SIZE_T=int
16108         if test "x$cf_cv_weak_symbols" = xyes ; then
16109
16110 # remove pthread library from $LIBS
16111 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16112
16113 cf_add_libs="$TEST_LIBS"
16114 # reverse order
16115 cf_add_0lib=
16116 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16117 # filter duplicates
16118 for cf_add_1lib in $cf_add_0lib; do
16119         for cf_add_2lib in $cf_add_libs; do
16120                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16121                         cf_add_1lib=
16122                         break
16123                 fi
16124         done
16125         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16126 done
16127 TEST_LIBS="$cf_add_libs"
16128
16129 cf_add_libs="$TEST_LIBS2"
16130 # reverse order
16131 cf_add_0lib=
16132 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16133 # filter duplicates
16134 for cf_add_1lib in $cf_add_0lib; do
16135         for cf_add_2lib in $cf_add_libs; do
16136                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16137                         cf_add_1lib=
16138                         break
16139                 fi
16140         done
16141         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16142 done
16143 TEST_LIBS2="$cf_add_libs"
16144
16145 cf_add_libs="$PRIVATE_LIBS"
16146 # reverse order
16147 cf_add_0lib=
16148 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16149 # filter duplicates
16150 for cf_add_1lib in $cf_add_0lib; do
16151         for cf_add_2lib in $cf_add_libs; do
16152                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16153                         cf_add_1lib=
16154                         break
16155                 fi
16156         done
16157         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16158 done
16159 PRIVATE_LIBS="$cf_add_libs"
16160
16161         else
16162                 # when not using weak symbols but with_reentrant,
16163                 # add 't' to the library suffix on all platforms
16164                 # except cygwin, where we only do that if ALSO
16165                 # compiling with full thread support.
16166                 case "$host" in
16167                 (*cygwin* | *msys*)
16168                         if test "$with_pthread" = "yes" ; then
16169                                 if test "x$disable_lib_suffixes" = "xno" ; then
16170                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16171                                 fi
16172                         fi ;;
16173                 (*)
16174                         if test "x$disable_lib_suffixes" = "xno" ; then
16175                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16176                         fi
16177                         ;;
16178                 esac
16179         fi
16180
16181 cat >>confdefs.h <<\EOF
16182 #define USE_REENTRANT 1
16183 EOF
16184
16185 if test "${with_abi_version+set}" != set; then
16186         case "$cf_cv_rel_version" in
16187         (5.*)
16188                 cf_cv_rel_version=6.0
16189                 cf_cv_abi_version=6
16190                 cf_cv_abi_default=6
16191                 { echo "$as_me:16191: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16192 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16193                 ;;
16194         esac
16195 fi
16196
16197 else
16198         cf_cv_enable_reentrant=0
16199         cf_cv_enable_opaque="NCURSES_OPAQUE"
16200         NCURSES_SIZE_T=$cf_dft_ordinate_type
16201 fi
16202
16203 echo "$as_me:16203: checking if you want opaque curses-library structures" >&5
16204 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16205
16206 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16207 if test "${enable_opaque_curses+set}" = set; then
16208   enableval="$enable_opaque_curses"
16209   test "$enableval" != yes && enableval=no
16210         if test "$enableval" != "no" ; then
16211     enable_opaque_curses=yes
16212         else
16213
16214          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16215          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16216
16217         fi
16218 else
16219   enableval=no
16220
16221          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16222          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16223
16224 fi;
16225 echo "$as_me:16225: result: $enable_opaque_curses" >&5
16226 echo "${ECHO_T}$enable_opaque_curses" >&6
16227
16228 test "$cf_cv_enable_reentrant" = 1 && \
16229 test "$enable_opaque_curses" = no && \
16230 { { echo "$as_me:16230: error: reentrant configuration requires opaque library" >&5
16231 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16232    { (exit 1); exit 1; }; }
16233
16234 echo "$as_me:16234: checking if you want opaque form-library structures" >&5
16235 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16236
16237 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16238 if test "${enable_opaque_form+set}" = set; then
16239   enableval="$enable_opaque_form"
16240   enable_opaque_form=yes
16241 else
16242   enable_opaque_form=no
16243 fi;
16244 echo "$as_me:16244: result: $enable_opaque_form" >&5
16245 echo "${ECHO_T}$enable_opaque_form" >&6
16246
16247 echo "$as_me:16247: checking if you want opaque menu-library structures" >&5
16248 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16249
16250 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16251 if test "${enable_opaque_menu+set}" = set; then
16252   enableval="$enable_opaque_menu"
16253   enable_opaque_menu=yes
16254 else
16255   enable_opaque_menu=no
16256 fi;
16257 echo "$as_me:16257: result: $enable_opaque_menu" >&5
16258 echo "${ECHO_T}$enable_opaque_menu" >&6
16259
16260 echo "$as_me:16260: checking if you want opaque panel-library structures" >&5
16261 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16262
16263 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16264 if test "${enable_opaque_panel+set}" = set; then
16265   enableval="$enable_opaque_panel"
16266   enable_opaque_panel=yes
16267 else
16268   enable_opaque_panel=no
16269 fi;
16270 echo "$as_me:16270: result: $enable_opaque_panel" >&5
16271 echo "${ECHO_T}$enable_opaque_panel" >&6
16272
16273 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16274 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16275 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16276 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16277
16278 ### Allow using a different wrap-prefix
16279 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16280         echo "$as_me:16280: checking for prefix used to wrap public variables" >&5
16281 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16282
16283 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16284 if test "${with_wrap_prefix+set}" = set; then
16285   withval="$with_wrap_prefix"
16286   NCURSES_WRAP_PREFIX=$withval
16287 else
16288   NCURSES_WRAP_PREFIX=_nc_
16289 fi;
16290         echo "$as_me:16290: result: $NCURSES_WRAP_PREFIX" >&5
16291 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16292 else
16293         NCURSES_WRAP_PREFIX=_nc_
16294 fi
16295
16296 cat >>confdefs.h <<EOF
16297 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16298 EOF
16299
16300 ###############################################################################
16301 # These options are relatively safe to experiment with.
16302
16303 echo "$as_me:16303: checking if you want all development code" >&5
16304 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16305
16306 # Check whether --with-develop or --without-develop was given.
16307 if test "${with_develop+set}" = set; then
16308   withval="$with_develop"
16309   with_develop=$withval
16310 else
16311   with_develop=no
16312 fi;
16313 echo "$as_me:16313: result: $with_develop" >&5
16314 echo "${ECHO_T}$with_develop" >&6
16315
16316 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16317 echo "$as_me:16317: checking if you want hard-tabs code" >&5
16318 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16319
16320 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16321 if test "${enable_hard_tabs+set}" = set; then
16322   enableval="$enable_hard_tabs"
16323
16324 else
16325   enable_hard_tabs=$with_develop
16326 fi;
16327 echo "$as_me:16327: result: $enable_hard_tabs" >&5
16328 echo "${ECHO_T}$enable_hard_tabs" >&6
16329 test "x$enable_hard_tabs" = xyes &&
16330 cat >>confdefs.h <<\EOF
16331 #define USE_HARD_TABS 1
16332 EOF
16333
16334 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16335 echo "$as_me:16335: checking if you want limited support for xmc" >&5
16336 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16337
16338 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16339 if test "${enable_xmc_glitch+set}" = set; then
16340   enableval="$enable_xmc_glitch"
16341
16342 else
16343   enable_xmc_glitch=$with_develop
16344 fi;
16345 echo "$as_me:16345: result: $enable_xmc_glitch" >&5
16346 echo "${ECHO_T}$enable_xmc_glitch" >&6
16347 test "x$enable_xmc_glitch" = xyes &&
16348 cat >>confdefs.h <<\EOF
16349 #define USE_XMC_SUPPORT 1
16350 EOF
16351
16352 ###############################################################################
16353 # These are just experimental, probably should not be in a package:
16354
16355 echo "$as_me:16355: checking if you do not want to assume colors are white-on-black" >&5
16356 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16357
16358 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16359 if test "${enable_assumed_color+set}" = set; then
16360   enableval="$enable_assumed_color"
16361   with_assumed_color=$enableval
16362 else
16363   with_assumed_color=yes
16364 fi;
16365 echo "$as_me:16365: result: $with_assumed_color" >&5
16366 echo "${ECHO_T}$with_assumed_color" >&6
16367 test "x$with_assumed_color" = xyes &&
16368 cat >>confdefs.h <<\EOF
16369 #define USE_ASSUMED_COLOR 1
16370 EOF
16371
16372 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16373 echo "$as_me:16373: checking if you want hashmap scrolling-optimization code" >&5
16374 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16375
16376 # Check whether --enable-hashmap or --disable-hashmap was given.
16377 if test "${enable_hashmap+set}" = set; then
16378   enableval="$enable_hashmap"
16379   with_hashmap=$enableval
16380 else
16381   with_hashmap=yes
16382 fi;
16383 echo "$as_me:16383: result: $with_hashmap" >&5
16384 echo "${ECHO_T}$with_hashmap" >&6
16385 test "x$with_hashmap" = xyes &&
16386 cat >>confdefs.h <<\EOF
16387 #define USE_HASHMAP 1
16388 EOF
16389
16390 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16391 echo "$as_me:16391: checking if you want code to check screensize" >&5
16392 echo $ECHO_N "checking if you want code to check screensize... $ECHO_C" >&6
16393
16394 # Check whether --enable-check-size or --disable-check-size was given.
16395 if test "${enable_check_size+set}" = set; then
16396   enableval="$enable_check_size"
16397   with_check_size=$enableval
16398 else
16399   with_check_size=no
16400 fi;
16401 echo "$as_me:16401: result: $with_check_size" >&5
16402 echo "${ECHO_T}$with_check_size" >&6
16403 test "x$with_check_size" = xyes &&
16404 cat >>confdefs.h <<\EOF
16405 #define USE_CHECK_SIZE 1
16406 EOF
16407
16408 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16409 echo "$as_me:16409: checking if you want colorfgbg code" >&5
16410 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16411
16412 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16413 if test "${enable_colorfgbg+set}" = set; then
16414   enableval="$enable_colorfgbg"
16415   with_colorfgbg=$enableval
16416 else
16417   with_colorfgbg=no
16418 fi;
16419 echo "$as_me:16419: result: $with_colorfgbg" >&5
16420 echo "${ECHO_T}$with_colorfgbg" >&6
16421 test "x$with_colorfgbg" = xyes &&
16422 cat >>confdefs.h <<\EOF
16423 #define USE_COLORFGBG 1
16424 EOF
16425
16426 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16427 echo "$as_me:16427: checking if you want to use gcc -fvisibility option" >&5
16428 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16429
16430 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16431 if test "${enable_fvisibility+set}" = set; then
16432   enableval="$enable_fvisibility"
16433   cf_with_fvisibility=$enableval
16434 else
16435   cf_with_fvisibility=no
16436 fi;
16437 echo "$as_me:16437: result: $cf_with_fvisibility" >&5
16438 echo "${ECHO_T}$cf_with_fvisibility" >&6
16439
16440 NCURSES_IMPEXP=
16441 NCURSES_CXX_IMPEXP=
16442 if test "x$cf_with_fvisibility" = xyes; then
16443
16444 echo "$as_me:16444: checking if $CC -fvisibility=hidden option works" >&5
16445 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16446 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16447   echo $ECHO_N "(cached) $ECHO_C" >&6
16448 else
16449
16450     cf_save_cflags="$CFLAGS"
16451     CFLAGS="$CFLAGS -fvisibility=hidden"
16452     cat >"conftest.$ac_ext" <<_ACEOF
16453 #line 16453 "configure"
16454 #include "confdefs.h"
16455
16456 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16457
16458 int
16459 main (void)
16460 {
16461
16462         if (somefunc()) return 1;
16463
16464   ;
16465   return 0;
16466 }
16467 _ACEOF
16468 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16469 if { (eval echo "$as_me:16469: \"$ac_link\"") >&5
16470   (eval $ac_link) 2>&5
16471   ac_status=$?
16472   echo "$as_me:16472: \$? = $ac_status" >&5
16473   (exit "$ac_status"); } &&
16474          { ac_try='test -s "conftest$ac_exeext"'
16475   { (eval echo "$as_me:16475: \"$ac_try\"") >&5
16476   (eval $ac_try) 2>&5
16477   ac_status=$?
16478   echo "$as_me:16478: \$? = $ac_status" >&5
16479   (exit "$ac_status"); }; }; then
16480   cf_cv_fvisibility_hidden=yes
16481 else
16482   echo "$as_me: failed program was:" >&5
16483 cat "conftest.$ac_ext" >&5
16484 cf_cv_fvisibility_hidden=no
16485 fi
16486 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16487     CFLAGS=$cf_save_cflags
16488
16489 fi
16490 echo "$as_me:16490: result: $cf_cv_fvisibility_hidden" >&5
16491 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16492
16493         if test "x$cf_cv_fvisibility_hidden" = xyes
16494         then
16495
16496 cf_fix_cppflags=no
16497 cf_new_cflags=
16498 cf_new_cppflags=
16499 cf_new_extra_cppflags=
16500
16501 for cf_add_cflags in -fvisibility=hidden
16502 do
16503 case "$cf_fix_cppflags" in
16504 (no)
16505         case "$cf_add_cflags" in
16506         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16507                 case "$cf_add_cflags" in
16508                 (-D*)
16509                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16510
16511                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16512                                 && test -z "${cf_tst_cflags}" \
16513                                 && cf_fix_cppflags=yes
16514
16515                         if test "$cf_fix_cppflags" = yes ; then
16516
16517         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16518         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16519
16520                                 continue
16521                         elif test "${cf_tst_cflags}" = "\"'" ; then
16522
16523         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16524         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16525
16526                                 continue
16527                         fi
16528                         ;;
16529                 esac
16530                 case "$CPPFLAGS" in
16531                 (*$cf_add_cflags)
16532                         ;;
16533                 (*)
16534                         case "$cf_add_cflags" in
16535                         (-D*)
16536                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16537
16538 CPPFLAGS=`echo "$CPPFLAGS" | \
16539         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16540                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16541
16542                                 ;;
16543                         esac
16544
16545         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16546         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16547
16548                         ;;
16549                 esac
16550                 ;;
16551         (*)
16552
16553         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16554         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16555
16556                 ;;
16557         esac
16558         ;;
16559 (yes)
16560
16561         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16562         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16563
16564         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16565
16566         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16567                 && test -z "${cf_tst_cflags}" \
16568                 && cf_fix_cppflags=no
16569         ;;
16570 esac
16571 done
16572
16573 if test -n "$cf_new_cflags" ; then
16574
16575         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16576         CFLAGS="${CFLAGS}$cf_new_cflags"
16577
16578 fi
16579
16580 if test -n "$cf_new_cppflags" ; then
16581
16582         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16583         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16584
16585 fi
16586
16587 if test -n "$cf_new_extra_cppflags" ; then
16588
16589         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16590         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16591
16592 fi
16593
16594                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16595         fi
16596         if test -n "$CXX"
16597         then
16598                 ac_ext=cc
16599 ac_cpp='$CXXCPP $CPPFLAGS'
16600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16601 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16603 ac_main_return="return"
16604
16605 echo "$as_me:16605: checking if $CXX -fvisibility=hidden option works" >&5
16606 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16607 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16608   echo $ECHO_N "(cached) $ECHO_C" >&6
16609 else
16610
16611     cf_save_cflags="$CXXFLAGS"
16612     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16613     cat >"conftest.$ac_ext" <<_ACEOF
16614 #line 16614 "configure"
16615 #include "confdefs.h"
16616
16617 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16618
16619 int
16620 main (void)
16621 {
16622
16623         if (somefunc()) return 1;
16624
16625   ;
16626   return 0;
16627 }
16628 _ACEOF
16629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16630 if { (eval echo "$as_me:16630: \"$ac_link\"") >&5
16631   (eval $ac_link) 2>&5
16632   ac_status=$?
16633   echo "$as_me:16633: \$? = $ac_status" >&5
16634   (exit "$ac_status"); } &&
16635          { ac_try='test -s "conftest$ac_exeext"'
16636   { (eval echo "$as_me:16636: \"$ac_try\"") >&5
16637   (eval $ac_try) 2>&5
16638   ac_status=$?
16639   echo "$as_me:16639: \$? = $ac_status" >&5
16640   (exit "$ac_status"); }; }; then
16641   cf_cv_fvisibility_hidden2=yes
16642 else
16643   echo "$as_me: failed program was:" >&5
16644 cat "conftest.$ac_ext" >&5
16645 cf_cv_fvisibility_hidden2=no
16646 fi
16647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16648     CXXFLAGS=$cf_save_cflags
16649
16650 fi
16651 echo "$as_me:16651: result: $cf_cv_fvisibility_hidden2" >&5
16652 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16653
16654                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16655                 then
16656
16657 cf_save_CXXFLAGS="$CFLAGS"
16658 CFLAGS="$CXXFLAGS"
16659
16660 cf_fix_cppflags=no
16661 cf_new_cflags=
16662 cf_new_cppflags=
16663 cf_new_extra_cppflags=
16664
16665 for cf_add_cflags in -fvisibility=hidden
16666 do
16667 case "$cf_fix_cppflags" in
16668 (no)
16669         case "$cf_add_cflags" in
16670         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16671                 case "$cf_add_cflags" in
16672                 (-D*)
16673                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16674
16675                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16676                                 && test -z "${cf_tst_cflags}" \
16677                                 && cf_fix_cppflags=yes
16678
16679                         if test "$cf_fix_cppflags" = yes ; then
16680
16681         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16682         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16683
16684                                 continue
16685                         elif test "${cf_tst_cflags}" = "\"'" ; then
16686
16687         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16688         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16689
16690                                 continue
16691                         fi
16692                         ;;
16693                 esac
16694                 case "$CPPFLAGS" in
16695                 (*$cf_add_cflags)
16696                         ;;
16697                 (*)
16698                         case "$cf_add_cflags" in
16699                         (-D*)
16700                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16701
16702 CPPFLAGS=`echo "$CPPFLAGS" | \
16703         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16704                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16705
16706                                 ;;
16707                         esac
16708
16709         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16710         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16711
16712                         ;;
16713                 esac
16714                 ;;
16715         (*)
16716
16717         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16718         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16719
16720                 ;;
16721         esac
16722         ;;
16723 (yes)
16724
16725         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16726         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16727
16728         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16729
16730         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16731                 && test -z "${cf_tst_cflags}" \
16732                 && cf_fix_cppflags=no
16733         ;;
16734 esac
16735 done
16736
16737 if test -n "$cf_new_cflags" ; then
16738
16739         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16740         CFLAGS="${CFLAGS}$cf_new_cflags"
16741
16742 fi
16743
16744 if test -n "$cf_new_cppflags" ; then
16745
16746         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16747         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16748
16749 fi
16750
16751 if test -n "$cf_new_extra_cppflags" ; then
16752
16753         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16754         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16755
16756 fi
16757
16758 CXXFLAGS="$CFLAGS"
16759 CFLAGS="$cf_save_CXXFLAGS"
16760
16761                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16762                 fi
16763                 ac_ext=c
16764 ac_cpp='$CPP $CPPFLAGS'
16765 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16766 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16767 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16768 ac_main_return="return"
16769
16770         fi
16771 fi
16772
16773 ###   use option --enable-interop to turn on use of bindings used for interop
16774 echo "$as_me:16774: checking if you want interop bindings" >&5
16775 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16776
16777 # Check whether --enable-interop or --disable-interop was given.
16778 if test "${enable_interop+set}" = set; then
16779   enableval="$enable_interop"
16780   with_exp_interop=$enableval
16781 else
16782   with_exp_interop=$cf_dft_interop
16783 fi;
16784 echo "$as_me:16784: result: $with_exp_interop" >&5
16785 echo "${ECHO_T}$with_exp_interop" >&6
16786
16787 NCURSES_INTEROP_FUNCS=0
16788 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16789
16790 echo "$as_me:16790: checking if you want experimental safe-sprintf code" >&5
16791 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16792
16793 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16794 if test "${enable_safe_sprintf+set}" = set; then
16795   enableval="$enable_safe_sprintf"
16796   with_safe_sprintf=$enableval
16797 else
16798   with_safe_sprintf=no
16799 fi;
16800 echo "$as_me:16800: result: $with_safe_sprintf" >&5
16801 echo "${ECHO_T}$with_safe_sprintf" >&6
16802
16803 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16804 # when hashmap is used scroll hints are useless
16805 if test "$with_hashmap" = no ; then
16806 echo "$as_me:16806: checking if you want to experiment without scrolling-hints code" >&5
16807 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16808
16809 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16810 if test "${enable_scroll_hints+set}" = set; then
16811   enableval="$enable_scroll_hints"
16812   with_scroll_hints=$enableval
16813 else
16814   with_scroll_hints=yes
16815 fi;
16816 echo "$as_me:16816: result: $with_scroll_hints" >&5
16817 echo "${ECHO_T}$with_scroll_hints" >&6
16818 test "x$with_scroll_hints" = xyes &&
16819 cat >>confdefs.h <<\EOF
16820 #define USE_SCROLL_HINTS 1
16821 EOF
16822
16823 fi
16824
16825 echo "$as_me:16825: checking if you want wgetch-events code" >&5
16826 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16827
16828 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16829 if test "${enable_wgetch_events+set}" = set; then
16830   enableval="$enable_wgetch_events"
16831   with_wgetch_events=$enableval
16832 else
16833   with_wgetch_events=no
16834 fi;
16835 echo "$as_me:16835: result: $with_wgetch_events" >&5
16836 echo "${ECHO_T}$with_wgetch_events" >&6
16837 if test "x$with_wgetch_events" = xyes ; then
16838
16839 cat >>confdefs.h <<\EOF
16840 #define NCURSES_WGETCH_EVENTS 1
16841 EOF
16842
16843         NCURSES_WGETCH_EVENTS=1
16844 else
16845         NCURSES_WGETCH_EVENTS=0
16846 fi
16847
16848 case "$cf_cv_system_name" in
16849 (*mingw32*|*mingw64*|*-msvc*)
16850         echo "$as_me:16850: checking if you want experimental-Windows driver" >&5
16851 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16852
16853 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16854 if test "${enable_exp_win32+set}" = set; then
16855   enableval="$enable_exp_win32"
16856   with_exp_win32=$enableval
16857 else
16858   with_exp_win32=no
16859 fi;
16860         echo "$as_me:16860: result: $with_exp_win32" >&5
16861 echo "${ECHO_T}$with_exp_win32" >&6
16862         if test "x$with_exp_win32" = xyes
16863         then
16864
16865 cat >>confdefs.h <<\EOF
16866 #define EXP_WIN32_DRIVER 1
16867 EOF
16868
16869                 EXP_WIN32_DRIVER=1
16870                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16871         else
16872                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16873                 EXP_WIN32_DRIVER=0
16874         fi
16875         ;;
16876 (*)
16877         EXP_WIN32_DRIVER=0
16878         INTERNALS_HDR=
16879         ;;
16880 esac
16881
16882 ###############################################################################
16883
16884 ###     use option --disable-echo to suppress full display compiling commands
16885
16886 echo "$as_me:16886: checking if you want to see long compiling messages" >&5
16887 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16888
16889 # Check whether --enable-echo or --disable-echo was given.
16890 if test "${enable_echo+set}" = set; then
16891   enableval="$enable_echo"
16892   test "$enableval" != no && enableval=yes
16893         if test "$enableval" != "yes" ; then
16894
16895         ECHO_LT='--silent'
16896         ECHO_LD='@echo linking $@;'
16897         RULE_CC='@echo compiling $<'
16898         SHOW_CC='@echo compiling $@'
16899         ECHO_CC='@'
16900
16901         else
16902
16903         ECHO_LT=''
16904         ECHO_LD=''
16905         RULE_CC=''
16906         SHOW_CC=''
16907         ECHO_CC=''
16908
16909         fi
16910 else
16911   enableval=yes
16912
16913         ECHO_LT=''
16914         ECHO_LD=''
16915         RULE_CC=''
16916         SHOW_CC=''
16917         ECHO_CC=''
16918
16919 fi;
16920 echo "$as_me:16920: result: $enableval" >&5
16921 echo "${ECHO_T}$enableval" >&6
16922
16923 if test "x$enable_echo" = xyes; then
16924         ECHO_LINK=
16925 else
16926         ECHO_LINK='@ echo linking $@ ... ;'
16927         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16928         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16929 fi
16930
16931 # --disable-stripping is used for debugging
16932
16933 echo "$as_me:16933: checking if you want to install stripped executables" >&5
16934 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16935
16936 # Check whether --enable-stripping or --disable-stripping was given.
16937 if test "${enable_stripping+set}" = set; then
16938   enableval="$enable_stripping"
16939   test "$enableval" != no && enableval=yes
16940         if test "$enableval" != "yes" ; then
16941     enable_stripping=no
16942         else
16943                 enable_stripping=yes
16944         fi
16945 else
16946   enableval=yes
16947         enable_stripping=yes
16948
16949 fi;
16950 echo "$as_me:16950: result: $enable_stripping" >&5
16951 echo "${ECHO_T}$enable_stripping" >&6
16952
16953 if test "$enable_stripping" = yes
16954 then
16955         INSTALL_OPT_S="-s"
16956 else
16957         INSTALL_OPT_S=
16958 fi
16959
16960 : "${INSTALL:=install}"
16961 echo "$as_me:16961: checking if install accepts -p option" >&5
16962 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16963 if test "${cf_cv_install_p+set}" = set; then
16964   echo $ECHO_N "(cached) $ECHO_C" >&6
16965 else
16966
16967         rm -rf ./conftest*
16968         date >conftest.in
16969         mkdir conftest.out
16970         sleep 3
16971         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16972         then
16973                 if test -f conftest.out/conftest.in
16974                 then
16975                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16976                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16977                         if test -s conftest.err
16978                         then
16979                                 cf_cv_install_p=no
16980                         else
16981                                 cf_cv_install_p=yes
16982                         fi
16983                 else
16984                         cf_cv_install_p=no
16985                 fi
16986         else
16987                 cf_cv_install_p=no
16988         fi
16989         rm -rf ./conftest*
16990
16991 fi
16992 echo "$as_me:16992: result: $cf_cv_install_p" >&5
16993 echo "${ECHO_T}$cf_cv_install_p" >&6
16994
16995 echo "$as_me:16995: checking if install needs to be told about ownership" >&5
16996 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16997 case `$ac_config_guess` in
16998 (*minix)
16999         with_install_o=yes
17000         ;;
17001 (*)
17002         with_install_o=no
17003         ;;
17004 esac
17005
17006 echo "$as_me:17006: result: $with_install_o" >&5
17007 echo "${ECHO_T}$with_install_o" >&6
17008 if test "x$with_install_o" = xyes
17009 then
17010         INSTALL_OPT_O="`id root|sed -e 's/uid=[0-9]*(/ -o /' -e 's/gid=[0-9]*(/ -g /' -e 's/ [^=[:space:]][^=[:space:]]*=.*/ /' -e 's/)//g'`"
17011 else
17012         INSTALL_OPT_O=
17013 fi
17014
17015 if test -n "$INSTALL_OPT_S"
17016 then
17017         echo "$as_me:17017: checking if you want to specify strip-program" >&5
17018 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17019
17020 # Check whether --with-strip-program or --without-strip-program was given.
17021 if test "${with_strip_program+set}" = set; then
17022   withval="$with_strip_program"
17023   with_strip_program=$withval
17024 else
17025   with_strip_program=no
17026 fi;
17027         echo "$as_me:17027: result: $with_strip_program" >&5
17028 echo "${ECHO_T}$with_strip_program" >&6
17029         if test "$with_strip_program" != no
17030         then
17031                 echo "$as_me:17031: checking if strip-program is supported with this installer" >&5
17032 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17033                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17034                 check_install_strip=no
17035                 if test -f "$cf_install_program"
17036                 then
17037                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17038                         if test -n "$check_install_version"
17039                         then
17040                                 check_install_strip="option"
17041                         else
17042                                 for check_strip_variable in STRIPBIN STRIP
17043                                 do
17044                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17045                                         then
17046                                                 check_install_strip="environ"
17047                                                 break
17048                                         fi
17049                                 done
17050                         fi
17051                 fi
17052                 echo "$as_me:17052: result: $check_install_strip" >&5
17053 echo "${ECHO_T}$check_install_strip" >&6
17054                 case "$check_install_strip" in
17055                 (no)
17056                         { echo "$as_me:17056: WARNING: $cf_install_program does not support strip program option" >&5
17057 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17058                         with_strip_program=no
17059                         ;;
17060                 (environ)
17061                         cat >install.tmp <<-CF_EOF
17062                         #! $SHELL
17063                         STRIPBIN="$with_strip_program" \\
17064                         STRIP="$with_strip_program" \\
17065                         $INSTALL "$@"
17066                         CF_EOF
17067                         INSTALL="`pwd`/install.tmp"
17068                         chmod +x "$INSTALL"
17069                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17070
17071 echo "${as_me:-configure}:17071: testing created $INSTALL ..." 1>&5
17072
17073                         ;;
17074                 (option)
17075                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17076                         ;;
17077                 esac
17078         fi
17079 fi
17080
17081 # If we're avoiding relinking of shared libraries during install, that is to
17082 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17083 # the install program has "-p" (for preserving timestamps).
17084 cf_cv_do_reranlib=yes
17085 if test "x$cf_cv_install_p" = xyes
17086 then
17087         if test "x$cf_cv_do_relink" != xyes
17088         then
17089                 cf_cv_do_reranlib=no
17090                 INSTALL_OPT_P="-p"
17091                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17092         fi
17093 fi
17094
17095 ###     use option --enable-warnings to turn on all gcc warnings
17096
17097 echo "$as_me:17097: checking if you want to use C11 _Noreturn feature" >&5
17098 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17099
17100 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17101 if test "${enable_stdnoreturn+set}" = set; then
17102   enableval="$enable_stdnoreturn"
17103   test "$enableval" != yes && enableval=no
17104         if test "$enableval" != "no" ; then
17105     enable_stdnoreturn=yes
17106         else
17107                 enable_stdnoreturn=no
17108         fi
17109 else
17110   enableval=no
17111         enable_stdnoreturn=no
17112
17113 fi;
17114 echo "$as_me:17114: result: $enable_stdnoreturn" >&5
17115 echo "${ECHO_T}$enable_stdnoreturn" >&6
17116
17117 if test $enable_stdnoreturn = yes; then
17118 echo "$as_me:17118: checking for C11 _Noreturn feature" >&5
17119 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17120 if test "${cf_cv_c11_noreturn+set}" = set; then
17121   echo $ECHO_N "(cached) $ECHO_C" >&6
17122 else
17123   cat >"conftest.$ac_ext" <<_ACEOF
17124 #line 17124 "configure"
17125 #include "confdefs.h"
17126
17127 $ac_includes_default
17128 #include <stdnoreturn.h>
17129 static _Noreturn void giveup(void) { exit(0); }
17130
17131 int
17132 main (void)
17133 {
17134 if (feof(stdin)) giveup()
17135   ;
17136   return 0;
17137 }
17138 _ACEOF
17139 rm -f "conftest.$ac_objext"
17140 if { (eval echo "$as_me:17140: \"$ac_compile\"") >&5
17141   (eval $ac_compile) 2>&5
17142   ac_status=$?
17143   echo "$as_me:17143: \$? = $ac_status" >&5
17144   (exit "$ac_status"); } &&
17145          { ac_try='test -s "conftest.$ac_objext"'
17146   { (eval echo "$as_me:17146: \"$ac_try\"") >&5
17147   (eval $ac_try) 2>&5
17148   ac_status=$?
17149   echo "$as_me:17149: \$? = $ac_status" >&5
17150   (exit "$ac_status"); }; }; then
17151   cf_cv_c11_noreturn=yes
17152 else
17153   echo "$as_me: failed program was:" >&5
17154 cat "conftest.$ac_ext" >&5
17155 cf_cv_c11_noreturn=no
17156 fi
17157 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17158
17159 fi
17160 echo "$as_me:17160: result: $cf_cv_c11_noreturn" >&5
17161 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17162 else
17163         cf_cv_c11_noreturn=no,
17164 fi
17165
17166 if test "$cf_cv_c11_noreturn" = yes; then
17167
17168 cat >>confdefs.h <<\EOF
17169 #define HAVE_STDNORETURN_H 1
17170 EOF
17171
17172 cat >>confdefs.h <<EOF
17173 #define STDC_NORETURN _Noreturn
17174 EOF
17175
17176         HAVE_STDNORETURN_H=1
17177 else
17178         HAVE_STDNORETURN_H=0
17179 fi
17180
17181 if test "$GCC" = yes || test "$GXX" = yes
17182 then
17183
17184 if test "$GCC" = yes || test "$GXX" = yes
17185 then
17186         case $CFLAGS in
17187         (*-Werror=*)
17188                 cf_temp_flags=
17189                 for cf_temp_scan in $CFLAGS
17190                 do
17191                         case "x$cf_temp_scan" in
17192                         (x-Werror=format*)
17193
17194         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17195         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17196
17197                                 ;;
17198                         (x-Werror=*)
17199
17200         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17201         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17202
17203                                 ;;
17204                         (*)
17205
17206         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17207         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17208
17209                                 ;;
17210                         esac
17211                 done
17212                 if test "x$CFLAGS" != "x$cf_temp_flags"
17213                 then
17214                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17215
17216 echo "${as_me:-configure}:17216: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17217
17218                         CFLAGS="$cf_temp_flags"
17219                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17220
17221 echo "${as_me:-configure}:17221: testing ... fixed $CFLAGS ..." 1>&5
17222
17223                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17224
17225 echo "${as_me:-configure}:17225: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17226
17227                 fi
17228                 ;;
17229         esac
17230 fi
17231
17232 if test "$GCC" = yes || test "$GXX" = yes
17233 then
17234         case $CPPFLAGS in
17235         (*-Werror=*)
17236                 cf_temp_flags=
17237                 for cf_temp_scan in $CPPFLAGS
17238                 do
17239                         case "x$cf_temp_scan" in
17240                         (x-Werror=format*)
17241
17242         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17243         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17244
17245                                 ;;
17246                         (x-Werror=*)
17247
17248         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17249         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17250
17251                                 ;;
17252                         (*)
17253
17254         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17255         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17256
17257                                 ;;
17258                         esac
17259                 done
17260                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17261                 then
17262                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17263
17264 echo "${as_me:-configure}:17264: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17265
17266                         CPPFLAGS="$cf_temp_flags"
17267                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17268
17269 echo "${as_me:-configure}:17269: testing ... fixed $CPPFLAGS ..." 1>&5
17270
17271                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17272
17273 echo "${as_me:-configure}:17273: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17274
17275                 fi
17276                 ;;
17277         esac
17278 fi
17279
17280 if test "$GCC" = yes || test "$GXX" = yes
17281 then
17282         case $LDFLAGS in
17283         (*-Werror=*)
17284                 cf_temp_flags=
17285                 for cf_temp_scan in $LDFLAGS
17286                 do
17287                         case "x$cf_temp_scan" in
17288                         (x-Werror=format*)
17289
17290         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17291         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17292
17293                                 ;;
17294                         (x-Werror=*)
17295
17296         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17297         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17298
17299                                 ;;
17300                         (*)
17301
17302         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17303         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17304
17305                                 ;;
17306                         esac
17307                 done
17308                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17309                 then
17310                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17311
17312 echo "${as_me:-configure}:17312: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17313
17314                         LDFLAGS="$cf_temp_flags"
17315                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17316
17317 echo "${as_me:-configure}:17317: testing ... fixed $LDFLAGS ..." 1>&5
17318
17319                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17320
17321 echo "${as_me:-configure}:17321: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17322
17323                 fi
17324                 ;;
17325         esac
17326 fi
17327
17328 echo "$as_me:17328: checking if you want to turn on gcc warnings" >&5
17329 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17330
17331 # Check whether --enable-warnings or --disable-warnings was given.
17332 if test "${enable_warnings+set}" = set; then
17333   enableval="$enable_warnings"
17334   test "$enableval" != yes && enableval=no
17335         if test "$enableval" != "no" ; then
17336     enable_warnings=yes
17337         else
17338                 enable_warnings=no
17339         fi
17340 else
17341   enableval=no
17342         enable_warnings=no
17343
17344 fi;
17345 echo "$as_me:17345: result: $enable_warnings" >&5
17346 echo "${ECHO_T}$enable_warnings" >&6
17347 if test "$enable_warnings" = "yes"
17348 then
17349
17350 if test "x$have_x" = xyes; then
17351
17352 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17353 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17354 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17355 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17356 for cf_X_CFLAGS in $X_CFLAGS
17357 do
17358         case "x$cf_X_CFLAGS" in
17359         x-[IUD]*)
17360                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17361                 ;;
17362         *)
17363                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17364                 ;;
17365         esac
17366 done
17367
17368 cat >"conftest.$ac_ext" <<_ACEOF
17369 #line 17369 "configure"
17370 #include "confdefs.h"
17371
17372 #include <stdlib.h>
17373 #include <X11/Intrinsic.h>
17374
17375 int
17376 main (void)
17377 {
17378 String foo = malloc(1); free((void*)foo)
17379   ;
17380   return 0;
17381 }
17382 _ACEOF
17383 rm -f "conftest.$ac_objext"
17384 if { (eval echo "$as_me:17384: \"$ac_compile\"") >&5
17385   (eval $ac_compile) 2>&5
17386   ac_status=$?
17387   echo "$as_me:17387: \$? = $ac_status" >&5
17388   (exit "$ac_status"); } &&
17389          { ac_try='test -s "conftest.$ac_objext"'
17390   { (eval echo "$as_me:17390: \"$ac_try\"") >&5
17391   (eval $ac_try) 2>&5
17392   ac_status=$?
17393   echo "$as_me:17393: \$? = $ac_status" >&5
17394   (exit "$ac_status"); }; }; then
17395
17396 echo "$as_me:17396: checking for X11/Xt const-feature" >&5
17397 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17398 if test "${cf_cv_const_x_string+set}" = set; then
17399   echo $ECHO_N "(cached) $ECHO_C" >&6
17400 else
17401
17402         cat >"conftest.$ac_ext" <<_ACEOF
17403 #line 17403 "configure"
17404 #include "confdefs.h"
17405
17406 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17407 #undef  XTSTRINGDEFINES /* X11R5 and later */
17408 #include <stdlib.h>
17409 #include <X11/Intrinsic.h>
17410
17411 int
17412 main (void)
17413 {
17414 String foo = malloc(1); *foo = 0
17415   ;
17416   return 0;
17417 }
17418 _ACEOF
17419 rm -f "conftest.$ac_objext"
17420 if { (eval echo "$as_me:17420: \"$ac_compile\"") >&5
17421   (eval $ac_compile) 2>&5
17422   ac_status=$?
17423   echo "$as_me:17423: \$? = $ac_status" >&5
17424   (exit "$ac_status"); } &&
17425          { ac_try='test -s "conftest.$ac_objext"'
17426   { (eval echo "$as_me:17426: \"$ac_try\"") >&5
17427   (eval $ac_try) 2>&5
17428   ac_status=$?
17429   echo "$as_me:17429: \$? = $ac_status" >&5
17430   (exit "$ac_status"); }; }; then
17431
17432                         cf_cv_const_x_string=no
17433
17434 else
17435   echo "$as_me: failed program was:" >&5
17436 cat "conftest.$ac_ext" >&5
17437
17438                         cf_cv_const_x_string=yes
17439
17440 fi
17441 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17442
17443 fi
17444 echo "$as_me:17444: result: $cf_cv_const_x_string" >&5
17445 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17446
17447 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17448 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17449 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17450
17451 case "$cf_cv_const_x_string" in
17452 (no)
17453
17454         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17455         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17456
17457         ;;
17458 (*)
17459
17460         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17461         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17462
17463         ;;
17464 esac
17465
17466 else
17467   echo "$as_me: failed program was:" >&5
17468 cat "conftest.$ac_ext" >&5
17469 fi
17470 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17471  fi
17472 cat > "conftest.$ac_ext" <<EOF
17473 #line 17473 "${as_me:-configure}"
17474 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17475 EOF
17476 if test "$INTEL_COMPILER" = yes
17477 then
17478 # The "-wdXXX" options suppress warnings:
17479 # remark #1419: external declaration in primary source file
17480 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17481 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17482 # remark #193: zero used for undefined preprocessing identifier
17483 # remark #593: variable "curs_sb_left_arrow" was set but never used
17484 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17485 # remark #869: parameter "tw" was never referenced
17486 # remark #981: operands are evaluated in unspecified order
17487 # warning #279: controlling expression is constant
17488
17489         { echo "$as_me:17489: checking for $CC warning options..." >&5
17490 echo "$as_me: checking for $CC warning options..." >&6;}
17491         cf_save_CFLAGS="$CFLAGS"
17492         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17493         for cf_opt in \
17494                 wd1419 \
17495                 wd1683 \
17496                 wd1684 \
17497                 wd193 \
17498                 wd593 \
17499                 wd279 \
17500                 wd810 \
17501                 wd869 \
17502                 wd981
17503         do
17504                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17505                 if { (eval echo "$as_me:17505: \"$ac_compile\"") >&5
17506   (eval $ac_compile) 2>&5
17507   ac_status=$?
17508   echo "$as_me:17508: \$? = $ac_status" >&5
17509   (exit "$ac_status"); }; then
17510                         test -n "$verbose" && echo "$as_me:17510: result: ... -$cf_opt" >&5
17511 echo "${ECHO_T}... -$cf_opt" >&6
17512                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17513                 fi
17514         done
17515         CFLAGS="$cf_save_CFLAGS"
17516 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17517 then
17518         { echo "$as_me:17518: checking for $CC warning options..." >&5
17519 echo "$as_me: checking for $CC warning options..." >&6;}
17520         cf_save_CFLAGS="$CFLAGS"
17521         cf_warn_CONST=""
17522         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17523         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17524         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17525         for cf_opt in W Wall \
17526                 Wbad-function-cast \
17527                 Wcast-align \
17528                 Wcast-qual \
17529                 Wdeclaration-after-statement \
17530                 Wextra \
17531                 Winline \
17532                 Wmissing-declarations \
17533                 Wmissing-prototypes \
17534                 Wnested-externs \
17535                 Wpointer-arith \
17536                 Wshadow \
17537                 Wstrict-prototypes \
17538                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17539         do
17540                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17541                 if { (eval echo "$as_me:17541: \"$ac_compile\"") >&5
17542   (eval $ac_compile) 2>&5
17543   ac_status=$?
17544   echo "$as_me:17544: \$? = $ac_status" >&5
17545   (exit "$ac_status"); }; then
17546                         test -n "$verbose" && echo "$as_me:17546: result: ... -$cf_opt" >&5
17547 echo "${ECHO_T}... -$cf_opt" >&6
17548                         case "$cf_opt" in
17549                         (Winline)
17550                                 case "$GCC_VERSION" in
17551                                 ([34].*)
17552                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17553
17554 echo "${as_me:-configure}:17554: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17555
17556                                         continue;;
17557                                 esac
17558                                 ;;
17559                         (Wpointer-arith)
17560                                 case "$GCC_VERSION" in
17561                                 ([12].*)
17562                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17563
17564 echo "${as_me:-configure}:17564: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17565
17566                                         continue;;
17567                                 esac
17568                                 ;;
17569                         esac
17570                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17571                 fi
17572         done
17573         CFLAGS="$cf_save_CFLAGS"
17574 fi
17575 rm -rf ./conftest*
17576
17577 fi
17578
17579 if test "$GCC" = yes || test "$GXX" = yes
17580 then
17581 cat > conftest.i <<EOF
17582 #ifndef GCC_PRINTF
17583 #define GCC_PRINTF 0
17584 #endif
17585 #ifndef GCC_SCANF
17586 #define GCC_SCANF 0
17587 #endif
17588 #ifndef GCC_NORETURN
17589 #define GCC_NORETURN /* nothing */
17590 #endif
17591 #ifndef GCC_UNUSED
17592 #define GCC_UNUSED /* nothing */
17593 #endif
17594 EOF
17595 if test "$GCC" = yes
17596 then
17597         { echo "$as_me:17597: checking for $CC __attribute__ directives..." >&5
17598 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17599 cat > "conftest.$ac_ext" <<EOF
17600 #line 17600 "${as_me:-configure}"
17601 #include <stdio.h>
17602 #include "confdefs.h"
17603 #include "conftest.h"
17604 #include "conftest.i"
17605 #if     GCC_PRINTF
17606 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17607 #else
17608 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17609 #endif
17610 #if     GCC_SCANF
17611 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17612 #else
17613 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17614 #endif
17615 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17616 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17617 extern GCC_NORETURN void foo(void);
17618 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17619 EOF
17620         cf_printf_attribute=no
17621         cf_scanf_attribute=no
17622         for cf_attribute in scanf printf unused noreturn
17623         do
17624
17625 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17626
17627                 cf_directive="__attribute__(($cf_attribute))"
17628                 echo "checking for $CC $cf_directive" 1>&5
17629
17630                 case "$cf_attribute" in
17631                 (printf)
17632                         cf_printf_attribute=yes
17633                         cat >conftest.h <<EOF
17634 #define GCC_$cf_ATTRIBUTE 1
17635 EOF
17636                         ;;
17637                 (scanf)
17638                         cf_scanf_attribute=yes
17639                         cat >conftest.h <<EOF
17640 #define GCC_$cf_ATTRIBUTE 1
17641 EOF
17642                         ;;
17643                 (*)
17644                         cat >conftest.h <<EOF
17645 #define GCC_$cf_ATTRIBUTE $cf_directive
17646 EOF
17647                         ;;
17648                 esac
17649
17650                 if { (eval echo "$as_me:17650: \"$ac_compile\"") >&5
17651   (eval $ac_compile) 2>&5
17652   ac_status=$?
17653   echo "$as_me:17653: \$? = $ac_status" >&5
17654   (exit "$ac_status"); }; then
17655                         test -n "$verbose" && echo "$as_me:17655: result: ... $cf_attribute" >&5
17656 echo "${ECHO_T}... $cf_attribute" >&6
17657                         cat conftest.h >>confdefs.h
17658                         case "$cf_attribute" in
17659                         (noreturn)
17660
17661 cat >>confdefs.h <<EOF
17662 #define GCC_NORETURN $cf_directive
17663 EOF
17664
17665                                 ;;
17666                         (printf)
17667                                 cf_value='/* nothing */'
17668                                 if test "$cf_printf_attribute" != no ; then
17669                                         cf_value='__attribute__((format(printf,fmt,var)))'
17670
17671 cat >>confdefs.h <<\EOF
17672 #define GCC_PRINTF 1
17673 EOF
17674
17675                                 fi
17676
17677 cat >>confdefs.h <<EOF
17678 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17679 EOF
17680
17681                                 ;;
17682                         (scanf)
17683                                 cf_value='/* nothing */'
17684                                 if test "$cf_scanf_attribute" != no ; then
17685                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17686
17687 cat >>confdefs.h <<\EOF
17688 #define GCC_SCANF 1
17689 EOF
17690
17691                                 fi
17692
17693 cat >>confdefs.h <<EOF
17694 #define GCC_SCANFLIKE(fmt,var) $cf_value
17695 EOF
17696
17697                                 ;;
17698                         (unused)
17699
17700 cat >>confdefs.h <<EOF
17701 #define GCC_UNUSED $cf_directive
17702 EOF
17703
17704                                 ;;
17705                         esac
17706                 fi
17707         done
17708 else
17709         ${FGREP-fgrep} define conftest.i >>confdefs.h
17710 fi
17711 rm -rf ./conftest*
17712 fi
17713
17714 fi
17715
17716 if test "x$enable_warnings" = "xyes"; then
17717
17718         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17719
17720         if test "x$cf_with_cxx" = xyes ; then
17721
17722 INTEL_CPLUSPLUS=no
17723
17724 if test "$GCC" = yes ; then
17725         case "$host_os" in
17726         (linux*|gnu*)
17727                 echo "$as_me:17727: checking if this is really Intel C++ compiler" >&5
17728 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17729                 cf_save_CFLAGS="$CXXFLAGS"
17730                 CXXFLAGS="$CXXFLAGS -no-gcc"
17731                 cat >"conftest.$ac_ext" <<_ACEOF
17732 #line 17732 "configure"
17733 #include "confdefs.h"
17734
17735 int
17736 main (void)
17737 {
17738
17739 #ifdef __INTEL_COMPILER
17740 #else
17741 #error __INTEL_COMPILER is not defined
17742 #endif
17743
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 rm -f "conftest.$ac_objext"
17749 if { (eval echo "$as_me:17749: \"$ac_compile\"") >&5
17750   (eval $ac_compile) 2>&5
17751   ac_status=$?
17752   echo "$as_me:17752: \$? = $ac_status" >&5
17753   (exit "$ac_status"); } &&
17754          { ac_try='test -s "conftest.$ac_objext"'
17755   { (eval echo "$as_me:17755: \"$ac_try\"") >&5
17756   (eval $ac_try) 2>&5
17757   ac_status=$?
17758   echo "$as_me:17758: \$? = $ac_status" >&5
17759   (exit "$ac_status"); }; }; then
17760   INTEL_CPLUSPLUS=yes
17761 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17762
17763 else
17764   echo "$as_me: failed program was:" >&5
17765 cat "conftest.$ac_ext" >&5
17766 fi
17767 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17768                 CXXFLAGS="$cf_save_CFLAGS"
17769                 echo "$as_me:17769: result: $INTEL_CPLUSPLUS" >&5
17770 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17771                 ;;
17772         esac
17773 fi
17774
17775 CLANG_CPLUSPLUS=no
17776
17777 if test "$GCC" = yes ; then
17778         echo "$as_me:17778: checking if this is really Clang C++ compiler" >&5
17779 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17780         cf_save_CFLAGS="$CXXFLAGS"
17781         cat >"conftest.$ac_ext" <<_ACEOF
17782 #line 17782 "configure"
17783 #include "confdefs.h"
17784
17785 int
17786 main (void)
17787 {
17788
17789 #ifdef __clang__
17790 #else
17791 #error __clang__ is not defined
17792 #endif
17793
17794   ;
17795   return 0;
17796 }
17797 _ACEOF
17798 rm -f "conftest.$ac_objext"
17799 if { (eval echo "$as_me:17799: \"$ac_compile\"") >&5
17800   (eval $ac_compile) 2>&5
17801   ac_status=$?
17802   echo "$as_me:17802: \$? = $ac_status" >&5
17803   (exit "$ac_status"); } &&
17804          { ac_try='test -s "conftest.$ac_objext"'
17805   { (eval echo "$as_me:17805: \"$ac_try\"") >&5
17806   (eval $ac_try) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit "$ac_status"); }; }; then
17810   CLANG_CPLUSPLUS=yes
17811
17812 else
17813   echo "$as_me: failed program was:" >&5
17814 cat "conftest.$ac_ext" >&5
17815 fi
17816 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17817         CXXFLAGS="$cf_save_CFLAGS"
17818         echo "$as_me:17818: result: $CLANG_CPLUSPLUS" >&5
17819 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17820 fi
17821
17822 CLANG_VERSION=none
17823
17824 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17825         case "$CC" in
17826         (c[1-9][0-9]|*/c[1-9][0-9])
17827                 { echo "$as_me:17827: WARNING: replacing broken compiler alias $CC" >&5
17828 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17829                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17830                 CC=clang
17831                 ;;
17832         esac
17833
17834         echo "$as_me:17834: checking version of $CC" >&5
17835 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17836         CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
17837         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17838         echo "$as_me:17838: result: $CLANG_VERSION" >&5
17839 echo "${ECHO_T}$CLANG_VERSION" >&6
17840
17841         for cf_clang_opt in \
17842                 -Qunused-arguments \
17843                 -Wno-error=implicit-function-declaration
17844         do
17845                 echo "$as_me:17845: checking if option $cf_clang_opt works" >&5
17846 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17847                 cf_save_CFLAGS="$CFLAGS"
17848                 CFLAGS="$CFLAGS $cf_clang_opt"
17849                 cat >"conftest.$ac_ext" <<_ACEOF
17850 #line 17850 "configure"
17851 #include "confdefs.h"
17852
17853                         #include <stdio.h>
17854 int
17855 main (void)
17856 {
17857
17858                         printf("hello!\\n");
17859   ;
17860   return 0;
17861 }
17862 _ACEOF
17863 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17864 if { (eval echo "$as_me:17864: \"$ac_link\"") >&5
17865   (eval $ac_link) 2>&5
17866   ac_status=$?
17867   echo "$as_me:17867: \$? = $ac_status" >&5
17868   (exit "$ac_status"); } &&
17869          { ac_try='test -s "conftest$ac_exeext"'
17870   { (eval echo "$as_me:17870: \"$ac_try\"") >&5
17871   (eval $ac_try) 2>&5
17872   ac_status=$?
17873   echo "$as_me:17873: \$? = $ac_status" >&5
17874   (exit "$ac_status"); }; }; then
17875
17876                         cf_clang_optok=yes
17877 else
17878   echo "$as_me: failed program was:" >&5
17879 cat "conftest.$ac_ext" >&5
17880
17881                         cf_clang_optok=no
17882 fi
17883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17884                 echo "$as_me:17884: result: $cf_clang_optok" >&5
17885 echo "${ECHO_T}$cf_clang_optok" >&6
17886                 CFLAGS="$cf_save_CFLAGS"
17887                 if test "$cf_clang_optok" = yes; then
17888                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17889
17890 echo "${as_me:-configure}:17890: testing adding option $cf_clang_opt ..." 1>&5
17891
17892         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17893         CFLAGS="${CFLAGS}$cf_clang_opt"
17894
17895                 fi
17896         done
17897 fi
17898
17899 ac_ext=cc
17900 ac_cpp='$CXXCPP $CPPFLAGS'
17901 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17902 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17903 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17904 ac_main_return="return"
17905
17906 cat > conftest.$ac_ext <<EOF
17907 #line 17907 "configure"
17908 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17909 EOF
17910
17911 if test "$INTEL_CPLUSPLUS" = yes
17912 then
17913 # The "-wdXXX" options suppress warnings:
17914 # remark #1419: external declaration in primary source file
17915 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17916 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17917 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17918 # remark #193: zero used for undefined preprocessing identifier
17919 # remark #593: variable "curs_sb_left_arrow" was set but never used
17920 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17921 # remark #869: parameter "tw" was never referenced
17922 # remark #981: operands are evaluated in unspecified order
17923 # warning #269: invalid format string conversion
17924
17925         { echo "$as_me:17925: checking for $CC warning options..." >&5
17926 echo "$as_me: checking for $CC warning options..." >&6;}
17927         cf_save_CXXFLAGS="$CXXFLAGS"
17928         EXTRA_CXXFLAGS="-Wall"
17929         for cf_opt in \
17930                 wd1419 \
17931                 wd1682 \
17932                 wd1683 \
17933                 wd1684 \
17934                 wd193 \
17935                 wd279 \
17936                 wd593 \
17937                 wd810 \
17938                 wd869 \
17939                 wd981
17940         do
17941                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17942                 if { (eval echo "$as_me:17942: \"$ac_compile\"") >&5
17943   (eval $ac_compile) 2>&5
17944   ac_status=$?
17945   echo "$as_me:17945: \$? = $ac_status" >&5
17946   (exit "$ac_status"); }; then
17947                         test -n "$verbose" && echo "$as_me:17947: result: ... -$cf_opt" >&5
17948 echo "${ECHO_T}... -$cf_opt" >&6
17949                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17950                 fi
17951         done
17952         CXXFLAGS="$cf_save_CXXFLAGS"
17953
17954 elif test "$GXX" = yes
17955 then
17956         { echo "$as_me:17956: checking for $CXX warning options..." >&5
17957 echo "$as_me: checking for $CXX warning options..." >&6;}
17958         cf_save_CXXFLAGS="$CXXFLAGS"
17959         EXTRA_CXXFLAGS="-W -Wall"
17960         cf_gxx_extra_warnings=""
17961         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17962         case "$GXX_VERSION" in
17963         ([1-2].*)
17964                 ;;
17965         (*)
17966                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17967                 ;;
17968         esac
17969         for cf_opt in \
17970                 Wabi \
17971                 fabi-version=0 \
17972                 Wextra \
17973                 Wignored-qualifiers \
17974                 Wlogical-op \
17975                 Woverloaded-virtual \
17976                 Wsign-promo \
17977                 Wsynth \
17978                 Wold-style-cast \
17979                 Wcast-align \
17980                 Wcast-qual \
17981                 Wpointer-arith \
17982                 Wshadow \
17983                 Wundef $cf_gxx_extra_warnings Wno-unused
17984         do
17985                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17986                 if { (eval echo "$as_me:17986: \"$ac_compile\"") >&5
17987   (eval $ac_compile) 2>&5
17988   ac_status=$?
17989   echo "$as_me:17989: \$? = $ac_status" >&5
17990   (exit "$ac_status"); }; then
17991                         test -n "$verbose" && echo "$as_me:17991: result: ... -$cf_opt" >&5
17992 echo "${ECHO_T}... -$cf_opt" >&6
17993                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17994                 else
17995                         test -n "$verbose" && echo "$as_me:17995: result: ... no -$cf_opt" >&5
17996 echo "${ECHO_T}... no -$cf_opt" >&6
17997                 fi
17998         done
17999         CXXFLAGS="$cf_save_CXXFLAGS"
18000 fi
18001
18002 rm -rf ./conftest*
18003 ac_ext=c
18004 ac_cpp='$CPP $CPPFLAGS'
18005 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18006 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18007 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18008 ac_main_return="return"
18009
18010         fi
18011 fi
18012
18013 echo "$as_me:18013: checking if you want to work around bogus compiler/loader warnings" >&5
18014 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18015
18016 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18017 if test "${enable_string_hacks+set}" = set; then
18018   enableval="$enable_string_hacks"
18019   enable_string_hacks=$enableval
18020 else
18021   enable_string_hacks=no
18022 fi;
18023 echo "$as_me:18023: result: $enable_string_hacks" >&5
18024 echo "${ECHO_T}$enable_string_hacks" >&6
18025
18026 if test "x$enable_string_hacks" = "xyes"; then
18027
18028 cat >>confdefs.h <<\EOF
18029 #define USE_STRING_HACKS 1
18030 EOF
18031
18032         { echo "$as_me:18032: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18033 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18034         echo "$as_me:18034: checking for strlcat" >&5
18035 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18036 if test "${ac_cv_func_strlcat+set}" = set; then
18037   echo $ECHO_N "(cached) $ECHO_C" >&6
18038 else
18039   cat >"conftest.$ac_ext" <<_ACEOF
18040 #line 18040 "configure"
18041 #include "confdefs.h"
18042 #define strlcat autoconf_temporary
18043 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18044 #undef strlcat
18045
18046 #ifdef __cplusplus
18047 extern "C"
18048 #endif
18049
18050 /* We use char because int might match the return type of a gcc2
18051    builtin and then its argument prototype would still apply.  */
18052 char strlcat (void);
18053
18054 int
18055 main (void)
18056 {
18057
18058 /* The GNU C library defines stubs for functions which it implements
18059     to always fail with ENOSYS.  Some functions are actually named
18060     something starting with __ and the normal name is an alias.  */
18061 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18062 #error found stub for strlcat
18063 #endif
18064
18065         return strlcat ();
18066   ;
18067   return 0;
18068 }
18069 _ACEOF
18070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18071 if { (eval echo "$as_me:18071: \"$ac_link\"") >&5
18072   (eval $ac_link) 2>&5
18073   ac_status=$?
18074   echo "$as_me:18074: \$? = $ac_status" >&5
18075   (exit "$ac_status"); } &&
18076          { ac_try='test -s "conftest$ac_exeext"'
18077   { (eval echo "$as_me:18077: \"$ac_try\"") >&5
18078   (eval $ac_try) 2>&5
18079   ac_status=$?
18080   echo "$as_me:18080: \$? = $ac_status" >&5
18081   (exit "$ac_status"); }; }; then
18082   ac_cv_func_strlcat=yes
18083 else
18084   echo "$as_me: failed program was:" >&5
18085 cat "conftest.$ac_ext" >&5
18086 ac_cv_func_strlcat=no
18087 fi
18088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18089 fi
18090 echo "$as_me:18090: result: $ac_cv_func_strlcat" >&5
18091 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18092 if test "$ac_cv_func_strlcat" = yes; then
18093
18094 cat >>confdefs.h <<\EOF
18095 #define HAVE_STRLCAT 1
18096 EOF
18097
18098 else
18099
18100                 echo "$as_me:18100: checking for strlcat in -lbsd" >&5
18101 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18102 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18103   echo $ECHO_N "(cached) $ECHO_C" >&6
18104 else
18105   ac_check_lib_save_LIBS=$LIBS
18106 LIBS="-lbsd  $LIBS"
18107 cat >"conftest.$ac_ext" <<_ACEOF
18108 #line 18108 "configure"
18109 #include "confdefs.h"
18110
18111 /* Override any gcc2 internal prototype to avoid an error.  */
18112 #ifdef __cplusplus
18113 extern "C"
18114 #endif
18115 /* We use char because int might match the return type of a gcc2
18116    builtin and then its argument prototype would still apply.  */
18117 char strlcat ();
18118 int
18119 main (void)
18120 {
18121 strlcat ();
18122   ;
18123   return 0;
18124 }
18125 _ACEOF
18126 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18127 if { (eval echo "$as_me:18127: \"$ac_link\"") >&5
18128   (eval $ac_link) 2>&5
18129   ac_status=$?
18130   echo "$as_me:18130: \$? = $ac_status" >&5
18131   (exit "$ac_status"); } &&
18132          { ac_try='test -s "conftest$ac_exeext"'
18133   { (eval echo "$as_me:18133: \"$ac_try\"") >&5
18134   (eval $ac_try) 2>&5
18135   ac_status=$?
18136   echo "$as_me:18136: \$? = $ac_status" >&5
18137   (exit "$ac_status"); }; }; then
18138   ac_cv_lib_bsd_strlcat=yes
18139 else
18140   echo "$as_me: failed program was:" >&5
18141 cat "conftest.$ac_ext" >&5
18142 ac_cv_lib_bsd_strlcat=no
18143 fi
18144 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18145 LIBS=$ac_check_lib_save_LIBS
18146 fi
18147 echo "$as_me:18147: result: $ac_cv_lib_bsd_strlcat" >&5
18148 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18149 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18150
18151 cf_add_libs="$LIBS"
18152 # reverse order
18153 cf_add_0lib=
18154 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18155 # filter duplicates
18156 for cf_add_1lib in $cf_add_0lib; do
18157         for cf_add_2lib in $cf_add_libs; do
18158                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18159                         cf_add_1lib=
18160                         break
18161                 fi
18162         done
18163         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18164 done
18165 LIBS="$cf_add_libs"
18166
18167 for ac_header in bsd/string.h
18168 do
18169 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18170 echo "$as_me:18170: checking for $ac_header" >&5
18171 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18172 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18173   echo $ECHO_N "(cached) $ECHO_C" >&6
18174 else
18175   cat >"conftest.$ac_ext" <<_ACEOF
18176 #line 18176 "configure"
18177 #include "confdefs.h"
18178 #include <$ac_header>
18179 _ACEOF
18180 if { (eval echo "$as_me:18180: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18181   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18182   ac_status=$?
18183   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18184   rm -f conftest.er1
18185   cat conftest.err >&5
18186   echo "$as_me:18186: \$? = $ac_status" >&5
18187   (exit "$ac_status"); } >/dev/null; then
18188   if test -s conftest.err; then
18189     ac_cpp_err=$ac_c_preproc_warn_flag
18190   else
18191     ac_cpp_err=
18192   fi
18193 else
18194   ac_cpp_err=yes
18195 fi
18196 if test -z "$ac_cpp_err"; then
18197   eval "$as_ac_Header=yes"
18198 else
18199   echo "$as_me: failed program was:" >&5
18200   cat "conftest.$ac_ext" >&5
18201   eval "$as_ac_Header=no"
18202 fi
18203 rm -f conftest.err "conftest.$ac_ext"
18204 fi
18205 echo "$as_me:18205: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18206 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18207 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18208   cat >>confdefs.h <<EOF
18209 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18210 EOF
18211
18212 fi
18213 done
18214
18215 cat >>confdefs.h <<\EOF
18216 #define HAVE_STRLCAT 1
18217 EOF
18218
18219 fi
18220
18221 fi
18222
18223 for ac_func in strlcpy snprintf
18224 do
18225 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18226 echo "$as_me:18226: checking for $ac_func" >&5
18227 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18228 if eval "test \"\${$as_ac_var+set}\" = set"; then
18229   echo $ECHO_N "(cached) $ECHO_C" >&6
18230 else
18231   cat >"conftest.$ac_ext" <<_ACEOF
18232 #line 18232 "configure"
18233 #include "confdefs.h"
18234 #define $ac_func autoconf_temporary
18235 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18236 #undef $ac_func
18237
18238 #ifdef __cplusplus
18239 extern "C"
18240 #endif
18241
18242 /* We use char because int might match the return type of a gcc2
18243    builtin and then its argument prototype would still apply.  */
18244 char $ac_func (void);
18245
18246 int
18247 main (void)
18248 {
18249
18250 /* The GNU C library defines stubs for functions which it implements
18251     to always fail with ENOSYS.  Some functions are actually named
18252     something starting with __ and the normal name is an alias.  */
18253 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18254 #error found stub for $ac_func
18255 #endif
18256
18257         return $ac_func ();
18258   ;
18259   return 0;
18260 }
18261 _ACEOF
18262 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18263 if { (eval echo "$as_me:18263: \"$ac_link\"") >&5
18264   (eval $ac_link) 2>&5
18265   ac_status=$?
18266   echo "$as_me:18266: \$? = $ac_status" >&5
18267   (exit "$ac_status"); } &&
18268          { ac_try='test -s "conftest$ac_exeext"'
18269   { (eval echo "$as_me:18269: \"$ac_try\"") >&5
18270   (eval $ac_try) 2>&5
18271   ac_status=$?
18272   echo "$as_me:18272: \$? = $ac_status" >&5
18273   (exit "$ac_status"); }; }; then
18274   eval "$as_ac_var=yes"
18275 else
18276   echo "$as_me: failed program was:" >&5
18277 cat "conftest.$ac_ext" >&5
18278 eval "$as_ac_var=no"
18279 fi
18280 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18281 fi
18282 echo "$as_me:18282: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18283 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18284 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18285   cat >>confdefs.h <<EOF
18286 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18287 EOF
18288
18289 fi
18290 done
18291
18292 fi
18293
18294 ###     use option --enable-assertions to turn on generation of assertion code
18295 echo "$as_me:18295: checking if you want to enable runtime assertions" >&5
18296 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18297
18298 # Check whether --enable-assertions or --disable-assertions was given.
18299 if test "${enable_assertions+set}" = set; then
18300   enableval="$enable_assertions"
18301   with_assertions=$enableval
18302 else
18303   with_assertions=no
18304 fi;
18305 echo "$as_me:18305: result: $with_assertions" >&5
18306 echo "${ECHO_T}$with_assertions" >&6
18307 if test -n "$GCC"
18308 then
18309         if test "$with_assertions" = no
18310         then
18311                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18312         else
18313
18314         ADAFLAGS="$ADAFLAGS -gnata"
18315
18316         fi
18317 fi
18318
18319 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18320
18321 echo "$as_me:18321: checking if you want to use dmalloc for testing" >&5
18322 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18323
18324 # Check whether --with-dmalloc or --without-dmalloc was given.
18325 if test "${with_dmalloc+set}" = set; then
18326   withval="$with_dmalloc"
18327   case "x$withval" in
18328         (x|xno) ;;
18329         (*)
18330                 : "${with_cflags:=-g}"
18331                 : "${enable_leaks:=no}"
18332                 with_dmalloc=yes
18333
18334 cat >>confdefs.h <<EOF
18335 #define USE_DMALLOC 1
18336 EOF
18337
18338                 ;;
18339         esac
18340 else
18341   with_dmalloc=
18342 fi;
18343 echo "$as_me:18343: result: ${with_dmalloc:-no}" >&5
18344 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18345
18346 case ".$with_cflags" in
18347 (.*-g*)
18348         case .$CFLAGS in
18349         (.*-g*)
18350                 ;;
18351         (*)
18352
18353 cf_fix_cppflags=no
18354 cf_new_cflags=
18355 cf_new_cppflags=
18356 cf_new_extra_cppflags=
18357
18358 for cf_add_cflags in -g
18359 do
18360 case "$cf_fix_cppflags" in
18361 (no)
18362         case "$cf_add_cflags" in
18363         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18364                 case "$cf_add_cflags" in
18365                 (-D*)
18366                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18367
18368                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18369                                 && test -z "${cf_tst_cflags}" \
18370                                 && cf_fix_cppflags=yes
18371
18372                         if test "$cf_fix_cppflags" = yes ; then
18373
18374         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18375         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18376
18377                                 continue
18378                         elif test "${cf_tst_cflags}" = "\"'" ; then
18379
18380         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18381         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18382
18383                                 continue
18384                         fi
18385                         ;;
18386                 esac
18387                 case "$CPPFLAGS" in
18388                 (*$cf_add_cflags)
18389                         ;;
18390                 (*)
18391                         case "$cf_add_cflags" in
18392                         (-D*)
18393                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18394
18395 CPPFLAGS=`echo "$CPPFLAGS" | \
18396         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18397                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18398
18399                                 ;;
18400                         esac
18401
18402         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18403         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18404
18405                         ;;
18406                 esac
18407                 ;;
18408         (*)
18409
18410         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18411         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18412
18413                 ;;
18414         esac
18415         ;;
18416 (yes)
18417
18418         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18419         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18420
18421         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18422
18423         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18424                 && test -z "${cf_tst_cflags}" \
18425                 && cf_fix_cppflags=no
18426         ;;
18427 esac
18428 done
18429
18430 if test -n "$cf_new_cflags" ; then
18431
18432         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18433         CFLAGS="${CFLAGS}$cf_new_cflags"
18434
18435 fi
18436
18437 if test -n "$cf_new_cppflags" ; then
18438
18439         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18440         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18441
18442 fi
18443
18444 if test -n "$cf_new_extra_cppflags" ; then
18445
18446         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18447         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18448
18449 fi
18450
18451                 ;;
18452         esac
18453         ;;
18454 esac
18455
18456 if test "$with_dmalloc" = yes ; then
18457         echo "$as_me:18457: checking for dmalloc.h" >&5
18458 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18459 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18460   echo $ECHO_N "(cached) $ECHO_C" >&6
18461 else
18462   cat >"conftest.$ac_ext" <<_ACEOF
18463 #line 18463 "configure"
18464 #include "confdefs.h"
18465 #include <dmalloc.h>
18466 _ACEOF
18467 if { (eval echo "$as_me:18467: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18468   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18469   ac_status=$?
18470   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18471   rm -f conftest.er1
18472   cat conftest.err >&5
18473   echo "$as_me:18473: \$? = $ac_status" >&5
18474   (exit "$ac_status"); } >/dev/null; then
18475   if test -s conftest.err; then
18476     ac_cpp_err=$ac_c_preproc_warn_flag
18477   else
18478     ac_cpp_err=
18479   fi
18480 else
18481   ac_cpp_err=yes
18482 fi
18483 if test -z "$ac_cpp_err"; then
18484   ac_cv_header_dmalloc_h=yes
18485 else
18486   echo "$as_me: failed program was:" >&5
18487   cat "conftest.$ac_ext" >&5
18488   ac_cv_header_dmalloc_h=no
18489 fi
18490 rm -f conftest.err "conftest.$ac_ext"
18491 fi
18492 echo "$as_me:18492: result: $ac_cv_header_dmalloc_h" >&5
18493 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18494 if test "$ac_cv_header_dmalloc_h" = yes; then
18495
18496 echo "$as_me:18496: checking for dmalloc_debug in -ldmalloc" >&5
18497 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18498 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18499   echo $ECHO_N "(cached) $ECHO_C" >&6
18500 else
18501   ac_check_lib_save_LIBS=$LIBS
18502 LIBS="-ldmalloc  $LIBS"
18503 cat >"conftest.$ac_ext" <<_ACEOF
18504 #line 18504 "configure"
18505 #include "confdefs.h"
18506
18507 /* Override any gcc2 internal prototype to avoid an error.  */
18508 #ifdef __cplusplus
18509 extern "C"
18510 #endif
18511 /* We use char because int might match the return type of a gcc2
18512    builtin and then its argument prototype would still apply.  */
18513 char dmalloc_debug ();
18514 int
18515 main (void)
18516 {
18517 dmalloc_debug ();
18518   ;
18519   return 0;
18520 }
18521 _ACEOF
18522 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18523 if { (eval echo "$as_me:18523: \"$ac_link\"") >&5
18524   (eval $ac_link) 2>&5
18525   ac_status=$?
18526   echo "$as_me:18526: \$? = $ac_status" >&5
18527   (exit "$ac_status"); } &&
18528          { ac_try='test -s "conftest$ac_exeext"'
18529   { (eval echo "$as_me:18529: \"$ac_try\"") >&5
18530   (eval $ac_try) 2>&5
18531   ac_status=$?
18532   echo "$as_me:18532: \$? = $ac_status" >&5
18533   (exit "$ac_status"); }; }; then
18534   ac_cv_lib_dmalloc_dmalloc_debug=yes
18535 else
18536   echo "$as_me: failed program was:" >&5
18537 cat "conftest.$ac_ext" >&5
18538 ac_cv_lib_dmalloc_dmalloc_debug=no
18539 fi
18540 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18541 LIBS=$ac_check_lib_save_LIBS
18542 fi
18543 echo "$as_me:18543: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18544 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18545 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18546   cat >>confdefs.h <<EOF
18547 #define HAVE_LIBDMALLOC 1
18548 EOF
18549
18550   LIBS="-ldmalloc $LIBS"
18551
18552 fi
18553
18554 fi
18555
18556 fi
18557
18558 echo "$as_me:18558: checking if you want to use dbmalloc for testing" >&5
18559 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18560
18561 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18562 if test "${with_dbmalloc+set}" = set; then
18563   withval="$with_dbmalloc"
18564   case "x$withval" in
18565         (x|xno) ;;
18566         (*)
18567                 : "${with_cflags:=-g}"
18568                 : "${enable_leaks:=no}"
18569                 with_dbmalloc=yes
18570
18571 cat >>confdefs.h <<EOF
18572 #define USE_DBMALLOC 1
18573 EOF
18574
18575                 ;;
18576         esac
18577 else
18578   with_dbmalloc=
18579 fi;
18580 echo "$as_me:18580: result: ${with_dbmalloc:-no}" >&5
18581 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18582
18583 case ".$with_cflags" in
18584 (.*-g*)
18585         case .$CFLAGS in
18586         (.*-g*)
18587                 ;;
18588         (*)
18589
18590 cf_fix_cppflags=no
18591 cf_new_cflags=
18592 cf_new_cppflags=
18593 cf_new_extra_cppflags=
18594
18595 for cf_add_cflags in -g
18596 do
18597 case "$cf_fix_cppflags" in
18598 (no)
18599         case "$cf_add_cflags" in
18600         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18601                 case "$cf_add_cflags" in
18602                 (-D*)
18603                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18604
18605                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18606                                 && test -z "${cf_tst_cflags}" \
18607                                 && cf_fix_cppflags=yes
18608
18609                         if test "$cf_fix_cppflags" = yes ; then
18610
18611         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18612         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18613
18614                                 continue
18615                         elif test "${cf_tst_cflags}" = "\"'" ; then
18616
18617         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18618         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18619
18620                                 continue
18621                         fi
18622                         ;;
18623                 esac
18624                 case "$CPPFLAGS" in
18625                 (*$cf_add_cflags)
18626                         ;;
18627                 (*)
18628                         case "$cf_add_cflags" in
18629                         (-D*)
18630                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18631
18632 CPPFLAGS=`echo "$CPPFLAGS" | \
18633         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18634                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18635
18636                                 ;;
18637                         esac
18638
18639         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18640         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18641
18642                         ;;
18643                 esac
18644                 ;;
18645         (*)
18646
18647         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18648         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18649
18650                 ;;
18651         esac
18652         ;;
18653 (yes)
18654
18655         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18656         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18657
18658         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18659
18660         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18661                 && test -z "${cf_tst_cflags}" \
18662                 && cf_fix_cppflags=no
18663         ;;
18664 esac
18665 done
18666
18667 if test -n "$cf_new_cflags" ; then
18668
18669         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18670         CFLAGS="${CFLAGS}$cf_new_cflags"
18671
18672 fi
18673
18674 if test -n "$cf_new_cppflags" ; then
18675
18676         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18677         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18678
18679 fi
18680
18681 if test -n "$cf_new_extra_cppflags" ; then
18682
18683         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18684         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18685
18686 fi
18687
18688                 ;;
18689         esac
18690         ;;
18691 esac
18692
18693 if test "$with_dbmalloc" = yes ; then
18694         echo "$as_me:18694: checking for dbmalloc.h" >&5
18695 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18696 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18697   echo $ECHO_N "(cached) $ECHO_C" >&6
18698 else
18699   cat >"conftest.$ac_ext" <<_ACEOF
18700 #line 18700 "configure"
18701 #include "confdefs.h"
18702 #include <dbmalloc.h>
18703 _ACEOF
18704 if { (eval echo "$as_me:18704: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18705   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18706   ac_status=$?
18707   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18708   rm -f conftest.er1
18709   cat conftest.err >&5
18710   echo "$as_me:18710: \$? = $ac_status" >&5
18711   (exit "$ac_status"); } >/dev/null; then
18712   if test -s conftest.err; then
18713     ac_cpp_err=$ac_c_preproc_warn_flag
18714   else
18715     ac_cpp_err=
18716   fi
18717 else
18718   ac_cpp_err=yes
18719 fi
18720 if test -z "$ac_cpp_err"; then
18721   ac_cv_header_dbmalloc_h=yes
18722 else
18723   echo "$as_me: failed program was:" >&5
18724   cat "conftest.$ac_ext" >&5
18725   ac_cv_header_dbmalloc_h=no
18726 fi
18727 rm -f conftest.err "conftest.$ac_ext"
18728 fi
18729 echo "$as_me:18729: result: $ac_cv_header_dbmalloc_h" >&5
18730 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18731 if test "$ac_cv_header_dbmalloc_h" = yes; then
18732
18733 echo "$as_me:18733: checking for debug_malloc in -ldbmalloc" >&5
18734 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18735 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18736   echo $ECHO_N "(cached) $ECHO_C" >&6
18737 else
18738   ac_check_lib_save_LIBS=$LIBS
18739 LIBS="-ldbmalloc  $LIBS"
18740 cat >"conftest.$ac_ext" <<_ACEOF
18741 #line 18741 "configure"
18742 #include "confdefs.h"
18743
18744 /* Override any gcc2 internal prototype to avoid an error.  */
18745 #ifdef __cplusplus
18746 extern "C"
18747 #endif
18748 /* We use char because int might match the return type of a gcc2
18749    builtin and then its argument prototype would still apply.  */
18750 char debug_malloc ();
18751 int
18752 main (void)
18753 {
18754 debug_malloc ();
18755   ;
18756   return 0;
18757 }
18758 _ACEOF
18759 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18760 if { (eval echo "$as_me:18760: \"$ac_link\"") >&5
18761   (eval $ac_link) 2>&5
18762   ac_status=$?
18763   echo "$as_me:18763: \$? = $ac_status" >&5
18764   (exit "$ac_status"); } &&
18765          { ac_try='test -s "conftest$ac_exeext"'
18766   { (eval echo "$as_me:18766: \"$ac_try\"") >&5
18767   (eval $ac_try) 2>&5
18768   ac_status=$?
18769   echo "$as_me:18769: \$? = $ac_status" >&5
18770   (exit "$ac_status"); }; }; then
18771   ac_cv_lib_dbmalloc_debug_malloc=yes
18772 else
18773   echo "$as_me: failed program was:" >&5
18774 cat "conftest.$ac_ext" >&5
18775 ac_cv_lib_dbmalloc_debug_malloc=no
18776 fi
18777 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18778 LIBS=$ac_check_lib_save_LIBS
18779 fi
18780 echo "$as_me:18780: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18781 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18782 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18783   cat >>confdefs.h <<EOF
18784 #define HAVE_LIBDBMALLOC 1
18785 EOF
18786
18787   LIBS="-ldbmalloc $LIBS"
18788
18789 fi
18790
18791 fi
18792
18793 fi
18794
18795 echo "$as_me:18795: checking if you want to use valgrind for testing" >&5
18796 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18797
18798 # Check whether --with-valgrind or --without-valgrind was given.
18799 if test "${with_valgrind+set}" = set; then
18800   withval="$with_valgrind"
18801   case "x$withval" in
18802         (x|xno) ;;
18803         (*)
18804                 : "${with_cflags:=-g}"
18805                 : "${enable_leaks:=no}"
18806                 with_valgrind=yes
18807
18808 cat >>confdefs.h <<EOF
18809 #define USE_VALGRIND 1
18810 EOF
18811
18812                 ;;
18813         esac
18814 else
18815   with_valgrind=
18816 fi;
18817 echo "$as_me:18817: result: ${with_valgrind:-no}" >&5
18818 echo "${ECHO_T}${with_valgrind:-no}" >&6
18819
18820 case ".$with_cflags" in
18821 (.*-g*)
18822         case .$CFLAGS in
18823         (.*-g*)
18824                 ;;
18825         (*)
18826
18827 cf_fix_cppflags=no
18828 cf_new_cflags=
18829 cf_new_cppflags=
18830 cf_new_extra_cppflags=
18831
18832 for cf_add_cflags in -g
18833 do
18834 case "$cf_fix_cppflags" in
18835 (no)
18836         case "$cf_add_cflags" in
18837         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18838                 case "$cf_add_cflags" in
18839                 (-D*)
18840                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18841
18842                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18843                                 && test -z "${cf_tst_cflags}" \
18844                                 && cf_fix_cppflags=yes
18845
18846                         if test "$cf_fix_cppflags" = yes ; then
18847
18848         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18849         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18850
18851                                 continue
18852                         elif test "${cf_tst_cflags}" = "\"'" ; then
18853
18854         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18855         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18856
18857                                 continue
18858                         fi
18859                         ;;
18860                 esac
18861                 case "$CPPFLAGS" in
18862                 (*$cf_add_cflags)
18863                         ;;
18864                 (*)
18865                         case "$cf_add_cflags" in
18866                         (-D*)
18867                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18868
18869 CPPFLAGS=`echo "$CPPFLAGS" | \
18870         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18871                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18872
18873                                 ;;
18874                         esac
18875
18876         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18877         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18878
18879                         ;;
18880                 esac
18881                 ;;
18882         (*)
18883
18884         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18885         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18886
18887                 ;;
18888         esac
18889         ;;
18890 (yes)
18891
18892         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18893         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18894
18895         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18896
18897         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18898                 && test -z "${cf_tst_cflags}" \
18899                 && cf_fix_cppflags=no
18900         ;;
18901 esac
18902 done
18903
18904 if test -n "$cf_new_cflags" ; then
18905
18906         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18907         CFLAGS="${CFLAGS}$cf_new_cflags"
18908
18909 fi
18910
18911 if test -n "$cf_new_cppflags" ; then
18912
18913         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18914         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18915
18916 fi
18917
18918 if test -n "$cf_new_extra_cppflags" ; then
18919
18920         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18921         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18922
18923 fi
18924
18925                 ;;
18926         esac
18927         ;;
18928 esac
18929
18930 echo "$as_me:18930: checking if you want to perform memory-leak testing" >&5
18931 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18932
18933 # Check whether --enable-leaks or --disable-leaks was given.
18934 if test "${enable_leaks+set}" = set; then
18935   enableval="$enable_leaks"
18936   enable_leaks=$enableval
18937 else
18938   enable_leaks=yes
18939 fi;
18940 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18941 echo "$as_me:18941: result: $with_no_leaks" >&5
18942 echo "${ECHO_T}$with_no_leaks" >&6
18943
18944 if test "$enable_leaks" = no ; then
18945
18946 cat >>confdefs.h <<\EOF
18947 #define NO_LEAKS 1
18948 EOF
18949
18950 cat >>confdefs.h <<\EOF
18951 #define YY_NO_LEAKS 1
18952 EOF
18953
18954 fi
18955
18956 cat >>confdefs.h <<\EOF
18957 #define HAVE_NC_ALLOC_H 1
18958 EOF
18959
18960 ###     use option --enable-expanded to generate certain macros as functions
18961
18962 # Check whether --enable-expanded or --disable-expanded was given.
18963 if test "${enable_expanded+set}" = set; then
18964   enableval="$enable_expanded"
18965   test "x$enableval" = xyes &&
18966 cat >>confdefs.h <<\EOF
18967 #define NCURSES_EXPANDED 1
18968 EOF
18969
18970 fi;
18971
18972 ###     use option --disable-macros to suppress macros in favor of functions
18973
18974 # Check whether --enable-macros or --disable-macros was given.
18975 if test "${enable_macros+set}" = set; then
18976   enableval="$enable_macros"
18977   test "$enableval" = no &&
18978 cat >>confdefs.h <<\EOF
18979 #define NCURSES_NOMACROS 1
18980 EOF
18981
18982 fi;
18983
18984 # Normally we only add trace() to the debug-library.  Allow this to be
18985 # extended to all models of the ncurses library:
18986 cf_all_traces=no
18987 case "$CFLAGS $CPPFLAGS" in
18988 (*-DTRACE*)
18989         cf_all_traces=yes
18990         ;;
18991 esac
18992
18993 echo "$as_me:18993: checking whether to add trace feature to all models" >&5
18994 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18995
18996 # Check whether --with-trace or --without-trace was given.
18997 if test "${with_trace+set}" = set; then
18998   withval="$with_trace"
18999   cf_with_trace=$withval
19000 else
19001   cf_with_trace=$cf_all_traces
19002 fi;
19003 echo "$as_me:19003: result: $cf_with_trace" >&5
19004 echo "${ECHO_T}$cf_with_trace" >&6
19005
19006 if test "x$cf_with_trace" = xyes ; then
19007         LIB_TRACING=all
19008         ADA_TRACE=TRUE
19009
19010 cf_fix_cppflags=no
19011 cf_new_cflags=
19012 cf_new_cppflags=
19013 cf_new_extra_cppflags=
19014
19015 for cf_add_cflags in -DTRACE
19016 do
19017 case "$cf_fix_cppflags" in
19018 (no)
19019         case "$cf_add_cflags" in
19020         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19021                 case "$cf_add_cflags" in
19022                 (-D*)
19023                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19024
19025                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19026                                 && test -z "${cf_tst_cflags}" \
19027                                 && cf_fix_cppflags=yes
19028
19029                         if test "$cf_fix_cppflags" = yes ; then
19030
19031         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19032         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19033
19034                                 continue
19035                         elif test "${cf_tst_cflags}" = "\"'" ; then
19036
19037         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19038         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19039
19040                                 continue
19041                         fi
19042                         ;;
19043                 esac
19044                 case "$CPPFLAGS" in
19045                 (*$cf_add_cflags)
19046                         ;;
19047                 (*)
19048                         case "$cf_add_cflags" in
19049                         (-D*)
19050                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19051
19052 CPPFLAGS=`echo "$CPPFLAGS" | \
19053         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19054                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19055
19056                                 ;;
19057                         esac
19058
19059         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19060         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19061
19062                         ;;
19063                 esac
19064                 ;;
19065         (*)
19066
19067         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19068         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19069
19070                 ;;
19071         esac
19072         ;;
19073 (yes)
19074
19075         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19076         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19077
19078         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19079
19080         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19081                 && test -z "${cf_tst_cflags}" \
19082                 && cf_fix_cppflags=no
19083         ;;
19084 esac
19085 done
19086
19087 if test -n "$cf_new_cflags" ; then
19088
19089         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19090         CFLAGS="${CFLAGS}$cf_new_cflags"
19091
19092 fi
19093
19094 if test -n "$cf_new_cppflags" ; then
19095
19096         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19097         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19098
19099 fi
19100
19101 if test -n "$cf_new_extra_cppflags" ; then
19102
19103         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19104         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19105
19106 fi
19107
19108 cat >>confdefs.h <<\EOF
19109 #define HAVE__TRACEF 1
19110 EOF
19111
19112 else
19113         LIB_TRACING=DEBUG
19114         ADA_TRACE=FALSE
19115 fi
19116
19117 echo "$as_me:19117: checking if we want to use GNAT projects" >&5
19118 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19119
19120 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19121 if test "${enable_gnat_projects+set}" = set; then
19122   enableval="$enable_gnat_projects"
19123   test "$enableval" != no && enableval=yes
19124         if test "$enableval" != "yes" ; then
19125     enable_gnat_projects=no
19126         else
19127                 enable_gnat_projects=yes
19128         fi
19129 else
19130   enableval=yes
19131         enable_gnat_projects=yes
19132
19133 fi;
19134 echo "$as_me:19134: result: $enable_gnat_projects" >&5
19135 echo "${ECHO_T}$enable_gnat_projects" >&6
19136
19137 ###     Checks for libraries.
19138 case "$cf_cv_system_name" in
19139 (*mingw32*|*mingw64*)
19140         # Note: WINVER may be a problem with Windows 10
19141         if test "x$with_exp_win32" = xyes ; then
19142                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19143         else
19144                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19145         fi
19146
19147 echo "$as_me:19147: checking if ssp library is needed" >&5
19148 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19149 if test "${cf_cv_need_libssp+set}" = set; then
19150   echo $ECHO_N "(cached) $ECHO_C" >&6
19151 else
19152
19153 cat >"conftest.$ac_ext" <<_ACEOF
19154 #line 19154 "configure"
19155 #include "confdefs.h"
19156
19157 #include <sys/types.h>
19158 #include <dirent.h>
19159
19160 int
19161 main (void)
19162 {
19163
19164        DIR *dp = opendir(".");
19165
19166   ;
19167   return 0;
19168 }
19169 _ACEOF
19170 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19171 if { (eval echo "$as_me:19171: \"$ac_link\"") >&5
19172   (eval $ac_link) 2>&5
19173   ac_status=$?
19174   echo "$as_me:19174: \$? = $ac_status" >&5
19175   (exit "$ac_status"); } &&
19176          { ac_try='test -s "conftest$ac_exeext"'
19177   { (eval echo "$as_me:19177: \"$ac_try\"") >&5
19178   (eval $ac_try) 2>&5
19179   ac_status=$?
19180   echo "$as_me:19180: \$? = $ac_status" >&5
19181   (exit "$ac_status"); }; }; then
19182   cf_cv_need_libssp=no
19183 else
19184   echo "$as_me: failed program was:" >&5
19185 cat "conftest.$ac_ext" >&5
19186
19187         cf_save_LIBS="$LIBS"
19188         LIBS="$LIBS -lssp"
19189         cat >"conftest.$ac_ext" <<_ACEOF
19190 #line 19190 "configure"
19191 #include "confdefs.h"
19192
19193 #include <sys/types.h>
19194 #include <dirent.h>
19195
19196 int
19197 main (void)
19198 {
19199
19200                    DIR *dp = opendir(".");
19201
19202   ;
19203   return 0;
19204 }
19205 _ACEOF
19206 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19207 if { (eval echo "$as_me:19207: \"$ac_link\"") >&5
19208   (eval $ac_link) 2>&5
19209   ac_status=$?
19210   echo "$as_me:19210: \$? = $ac_status" >&5
19211   (exit "$ac_status"); } &&
19212          { ac_try='test -s "conftest$ac_exeext"'
19213   { (eval echo "$as_me:19213: \"$ac_try\"") >&5
19214   (eval $ac_try) 2>&5
19215   ac_status=$?
19216   echo "$as_me:19216: \$? = $ac_status" >&5
19217   (exit "$ac_status"); }; }; then
19218   cf_cv_need_libssp=yes
19219 else
19220   echo "$as_me: failed program was:" >&5
19221 cat "conftest.$ac_ext" >&5
19222 cf_cv_need_libssp=maybe
19223 fi
19224 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19225         LIBS="$cf_save_LIBS"
19226
19227 fi
19228 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19229 fi
19230 echo "$as_me:19230: result: $cf_cv_need_libssp" >&5
19231 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19232
19233 if test "x$cf_cv_need_libssp" = xyes
19234 then
19235
19236 cf_add_libs="$LIBS"
19237 # reverse order
19238 cf_add_0lib=
19239 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19240 # filter duplicates
19241 for cf_add_1lib in $cf_add_0lib; do
19242         for cf_add_2lib in $cf_add_libs; do
19243                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19244                         cf_add_1lib=
19245                         break
19246                 fi
19247         done
19248         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19249 done
19250 LIBS="$cf_add_libs"
19251
19252 fi
19253
19254         ;;
19255 (*)
19256         ;;
19257 esac
19258
19259 echo "$as_me:19259: checking if -lm needed for math functions" >&5
19260 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19261 if test "${cf_cv_need_libm+set}" = set; then
19262   echo $ECHO_N "(cached) $ECHO_C" >&6
19263 else
19264
19265         cat >"conftest.$ac_ext" <<_ACEOF
19266 #line 19266 "configure"
19267 #include "confdefs.h"
19268
19269                 #include <stdio.h>
19270                 #include <stdlib.h>
19271                 #include <math.h>
19272
19273 int
19274 main (void)
19275 {
19276 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19277   ;
19278   return 0;
19279 }
19280 _ACEOF
19281 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19282 if { (eval echo "$as_me:19282: \"$ac_link\"") >&5
19283   (eval $ac_link) 2>&5
19284   ac_status=$?
19285   echo "$as_me:19285: \$? = $ac_status" >&5
19286   (exit "$ac_status"); } &&
19287          { ac_try='test -s "conftest$ac_exeext"'
19288   { (eval echo "$as_me:19288: \"$ac_try\"") >&5
19289   (eval $ac_try) 2>&5
19290   ac_status=$?
19291   echo "$as_me:19291: \$? = $ac_status" >&5
19292   (exit "$ac_status"); }; }; then
19293   cf_cv_need_libm=no
19294 else
19295   echo "$as_me: failed program was:" >&5
19296 cat "conftest.$ac_ext" >&5
19297 cf_cv_need_libm=yes
19298 fi
19299 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19300 fi
19301 echo "$as_me:19301: result: $cf_cv_need_libm" >&5
19302 echo "${ECHO_T}$cf_cv_need_libm" >&6
19303
19304 if test "$cf_cv_need_libm" = yes
19305 then
19306
19307         cf_save_LIBS="$LIBS"
19308         LIBS="$LIBS -lm"
19309         echo "$as_me:19309: checking if -lm is available for math functions" >&5
19310 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19311 if test "${cf_cv_have_libm+set}" = set; then
19312   echo $ECHO_N "(cached) $ECHO_C" >&6
19313 else
19314
19315         cat >"conftest.$ac_ext" <<_ACEOF
19316 #line 19316 "configure"
19317 #include "confdefs.h"
19318
19319                 #include <stdio.h>
19320                 #include <stdlib.h>
19321                 #include <math.h>
19322
19323 int
19324 main (void)
19325 {
19326 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19327   ;
19328   return 0;
19329 }
19330 _ACEOF
19331 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19332 if { (eval echo "$as_me:19332: \"$ac_link\"") >&5
19333   (eval $ac_link) 2>&5
19334   ac_status=$?
19335   echo "$as_me:19335: \$? = $ac_status" >&5
19336   (exit "$ac_status"); } &&
19337          { ac_try='test -s "conftest$ac_exeext"'
19338   { (eval echo "$as_me:19338: \"$ac_try\"") >&5
19339   (eval $ac_try) 2>&5
19340   ac_status=$?
19341   echo "$as_me:19341: \$? = $ac_status" >&5
19342   (exit "$ac_status"); }; }; then
19343   cf_cv_have_libm=yes
19344 else
19345   echo "$as_me: failed program was:" >&5
19346 cat "conftest.$ac_ext" >&5
19347 cf_cv_have_libm=no
19348 fi
19349 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19350 fi
19351 echo "$as_me:19351: result: $cf_cv_have_libm" >&5
19352 echo "${ECHO_T}$cf_cv_have_libm" >&6
19353         LIBS="$cf_save_LIBS"
19354
19355         if test "$cf_cv_have_libm" = yes
19356         then
19357                 MATH_LIB=-lm
19358         fi
19359 else
19360         cf_cv_have_libm=yes
19361 fi
19362
19363 if test "$cf_cv_have_libm" = yes
19364 then
19365
19366 cat >>confdefs.h <<\EOF
19367 #define HAVE_MATH_FUNCS 1
19368 EOF
19369
19370 fi
19371
19372 ###     Checks for header files.
19373 echo "$as_me:19373: checking whether time.h and sys/time.h may both be included" >&5
19374 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19375 if test "${ac_cv_header_time+set}" = set; then
19376   echo $ECHO_N "(cached) $ECHO_C" >&6
19377 else
19378   cat >"conftest.$ac_ext" <<_ACEOF
19379 #line 19379 "configure"
19380 #include "confdefs.h"
19381 #include <sys/types.h>
19382 #include <sys/time.h>
19383 #include <time.h>
19384
19385 int
19386 main (void)
19387 {
19388 if ((struct tm *) 0)
19389 return 0;
19390   ;
19391   return 0;
19392 }
19393 _ACEOF
19394 rm -f "conftest.$ac_objext"
19395 if { (eval echo "$as_me:19395: \"$ac_compile\"") >&5
19396   (eval $ac_compile) 2>&5
19397   ac_status=$?
19398   echo "$as_me:19398: \$? = $ac_status" >&5
19399   (exit "$ac_status"); } &&
19400          { ac_try='test -s "conftest.$ac_objext"'
19401   { (eval echo "$as_me:19401: \"$ac_try\"") >&5
19402   (eval $ac_try) 2>&5
19403   ac_status=$?
19404   echo "$as_me:19404: \$? = $ac_status" >&5
19405   (exit "$ac_status"); }; }; then
19406   ac_cv_header_time=yes
19407 else
19408   echo "$as_me: failed program was:" >&5
19409 cat "conftest.$ac_ext" >&5
19410 ac_cv_header_time=no
19411 fi
19412 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19413 fi
19414 echo "$as_me:19414: result: $ac_cv_header_time" >&5
19415 echo "${ECHO_T}$ac_cv_header_time" >&6
19416 if test $ac_cv_header_time = yes; then
19417
19418 cat >>confdefs.h <<\EOF
19419 #define TIME_WITH_SYS_TIME 1
19420 EOF
19421
19422 fi
19423
19424 cf_regex_func=no
19425 cf_regex_libs=
19426 case "$host_os" in
19427 (mingw*)
19428         # -lsystre -ltre -lintl -liconv
19429         echo "$as_me:19429: checking for regcomp in -lsystre" >&5
19430 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19431 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19432   echo $ECHO_N "(cached) $ECHO_C" >&6
19433 else
19434   ac_check_lib_save_LIBS=$LIBS
19435 LIBS="-lsystre  $LIBS"
19436 cat >"conftest.$ac_ext" <<_ACEOF
19437 #line 19437 "configure"
19438 #include "confdefs.h"
19439
19440 /* Override any gcc2 internal prototype to avoid an error.  */
19441 #ifdef __cplusplus
19442 extern "C"
19443 #endif
19444 /* We use char because int might match the return type of a gcc2
19445    builtin and then its argument prototype would still apply.  */
19446 char regcomp ();
19447 int
19448 main (void)
19449 {
19450 regcomp ();
19451   ;
19452   return 0;
19453 }
19454 _ACEOF
19455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19456 if { (eval echo "$as_me:19456: \"$ac_link\"") >&5
19457   (eval $ac_link) 2>&5
19458   ac_status=$?
19459   echo "$as_me:19459: \$? = $ac_status" >&5
19460   (exit "$ac_status"); } &&
19461          { ac_try='test -s "conftest$ac_exeext"'
19462   { (eval echo "$as_me:19462: \"$ac_try\"") >&5
19463   (eval $ac_try) 2>&5
19464   ac_status=$?
19465   echo "$as_me:19465: \$? = $ac_status" >&5
19466   (exit "$ac_status"); }; }; then
19467   ac_cv_lib_systre_regcomp=yes
19468 else
19469   echo "$as_me: failed program was:" >&5
19470 cat "conftest.$ac_ext" >&5
19471 ac_cv_lib_systre_regcomp=no
19472 fi
19473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19474 LIBS=$ac_check_lib_save_LIBS
19475 fi
19476 echo "$as_me:19476: result: $ac_cv_lib_systre_regcomp" >&5
19477 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19478 if test "$ac_cv_lib_systre_regcomp" = yes; then
19479
19480                 echo "$as_me:19480: checking for libiconv_open in -liconv" >&5
19481 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19482 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19483   echo $ECHO_N "(cached) $ECHO_C" >&6
19484 else
19485   ac_check_lib_save_LIBS=$LIBS
19486 LIBS="-liconv  $LIBS"
19487 cat >"conftest.$ac_ext" <<_ACEOF
19488 #line 19488 "configure"
19489 #include "confdefs.h"
19490
19491 /* Override any gcc2 internal prototype to avoid an error.  */
19492 #ifdef __cplusplus
19493 extern "C"
19494 #endif
19495 /* We use char because int might match the return type of a gcc2
19496    builtin and then its argument prototype would still apply.  */
19497 char libiconv_open ();
19498 int
19499 main (void)
19500 {
19501 libiconv_open ();
19502   ;
19503   return 0;
19504 }
19505 _ACEOF
19506 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19507 if { (eval echo "$as_me:19507: \"$ac_link\"") >&5
19508   (eval $ac_link) 2>&5
19509   ac_status=$?
19510   echo "$as_me:19510: \$? = $ac_status" >&5
19511   (exit "$ac_status"); } &&
19512          { ac_try='test -s "conftest$ac_exeext"'
19513   { (eval echo "$as_me:19513: \"$ac_try\"") >&5
19514   (eval $ac_try) 2>&5
19515   ac_status=$?
19516   echo "$as_me:19516: \$? = $ac_status" >&5
19517   (exit "$ac_status"); }; }; then
19518   ac_cv_lib_iconv_libiconv_open=yes
19519 else
19520   echo "$as_me: failed program was:" >&5
19521 cat "conftest.$ac_ext" >&5
19522 ac_cv_lib_iconv_libiconv_open=no
19523 fi
19524 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19525 LIBS=$ac_check_lib_save_LIBS
19526 fi
19527 echo "$as_me:19527: result: $ac_cv_lib_iconv_libiconv_open" >&5
19528 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19529 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19530
19531 cf_add_libs="$LIBS"
19532 # reverse order
19533 cf_add_0lib=
19534 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19535 # filter duplicates
19536 for cf_add_1lib in $cf_add_0lib; do
19537         for cf_add_2lib in $cf_add_libs; do
19538                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19539                         cf_add_1lib=
19540                         break
19541                 fi
19542         done
19543         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19544 done
19545 LIBS="$cf_add_libs"
19546
19547 fi
19548
19549                 echo "$as_me:19549: checking for libintl_gettext in -lintl" >&5
19550 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19551 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19552   echo $ECHO_N "(cached) $ECHO_C" >&6
19553 else
19554   ac_check_lib_save_LIBS=$LIBS
19555 LIBS="-lintl  $LIBS"
19556 cat >"conftest.$ac_ext" <<_ACEOF
19557 #line 19557 "configure"
19558 #include "confdefs.h"
19559
19560 /* Override any gcc2 internal prototype to avoid an error.  */
19561 #ifdef __cplusplus
19562 extern "C"
19563 #endif
19564 /* We use char because int might match the return type of a gcc2
19565    builtin and then its argument prototype would still apply.  */
19566 char libintl_gettext ();
19567 int
19568 main (void)
19569 {
19570 libintl_gettext ();
19571   ;
19572   return 0;
19573 }
19574 _ACEOF
19575 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19576 if { (eval echo "$as_me:19576: \"$ac_link\"") >&5
19577   (eval $ac_link) 2>&5
19578   ac_status=$?
19579   echo "$as_me:19579: \$? = $ac_status" >&5
19580   (exit "$ac_status"); } &&
19581          { ac_try='test -s "conftest$ac_exeext"'
19582   { (eval echo "$as_me:19582: \"$ac_try\"") >&5
19583   (eval $ac_try) 2>&5
19584   ac_status=$?
19585   echo "$as_me:19585: \$? = $ac_status" >&5
19586   (exit "$ac_status"); }; }; then
19587   ac_cv_lib_intl_libintl_gettext=yes
19588 else
19589   echo "$as_me: failed program was:" >&5
19590 cat "conftest.$ac_ext" >&5
19591 ac_cv_lib_intl_libintl_gettext=no
19592 fi
19593 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19594 LIBS=$ac_check_lib_save_LIBS
19595 fi
19596 echo "$as_me:19596: result: $ac_cv_lib_intl_libintl_gettext" >&5
19597 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19598 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19599
19600 cf_add_libs="$LIBS"
19601 # reverse order
19602 cf_add_0lib=
19603 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19604 # filter duplicates
19605 for cf_add_1lib in $cf_add_0lib; do
19606         for cf_add_2lib in $cf_add_libs; do
19607                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19608                         cf_add_1lib=
19609                         break
19610                 fi
19611         done
19612         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19613 done
19614 LIBS="$cf_add_libs"
19615
19616 fi
19617
19618                 echo "$as_me:19618: checking for tre_regcomp in -ltre" >&5
19619 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19620 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19621   echo $ECHO_N "(cached) $ECHO_C" >&6
19622 else
19623   ac_check_lib_save_LIBS=$LIBS
19624 LIBS="-ltre  $LIBS"
19625 cat >"conftest.$ac_ext" <<_ACEOF
19626 #line 19626 "configure"
19627 #include "confdefs.h"
19628
19629 /* Override any gcc2 internal prototype to avoid an error.  */
19630 #ifdef __cplusplus
19631 extern "C"
19632 #endif
19633 /* We use char because int might match the return type of a gcc2
19634    builtin and then its argument prototype would still apply.  */
19635 char tre_regcomp ();
19636 int
19637 main (void)
19638 {
19639 tre_regcomp ();
19640   ;
19641   return 0;
19642 }
19643 _ACEOF
19644 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19645 if { (eval echo "$as_me:19645: \"$ac_link\"") >&5
19646   (eval $ac_link) 2>&5
19647   ac_status=$?
19648   echo "$as_me:19648: \$? = $ac_status" >&5
19649   (exit "$ac_status"); } &&
19650          { ac_try='test -s "conftest$ac_exeext"'
19651   { (eval echo "$as_me:19651: \"$ac_try\"") >&5
19652   (eval $ac_try) 2>&5
19653   ac_status=$?
19654   echo "$as_me:19654: \$? = $ac_status" >&5
19655   (exit "$ac_status"); }; }; then
19656   ac_cv_lib_tre_tre_regcomp=yes
19657 else
19658   echo "$as_me: failed program was:" >&5
19659 cat "conftest.$ac_ext" >&5
19660 ac_cv_lib_tre_tre_regcomp=no
19661 fi
19662 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19663 LIBS=$ac_check_lib_save_LIBS
19664 fi
19665 echo "$as_me:19665: result: $ac_cv_lib_tre_tre_regcomp" >&5
19666 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19667 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19668
19669 cf_add_libs="$LIBS"
19670 # reverse order
19671 cf_add_0lib=
19672 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19673 # filter duplicates
19674 for cf_add_1lib in $cf_add_0lib; do
19675         for cf_add_2lib in $cf_add_libs; do
19676                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19677                         cf_add_1lib=
19678                         break
19679                 fi
19680         done
19681         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19682 done
19683 LIBS="$cf_add_libs"
19684
19685 fi
19686
19687 cf_add_libs="$LIBS"
19688 # reverse order
19689 cf_add_0lib=
19690 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19691 # filter duplicates
19692 for cf_add_1lib in $cf_add_0lib; do
19693         for cf_add_2lib in $cf_add_libs; do
19694                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19695                         cf_add_1lib=
19696                         break
19697                 fi
19698         done
19699         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19700 done
19701 LIBS="$cf_add_libs"
19702
19703                 cf_regex_func=regcomp
19704
19705 else
19706
19707                 echo "$as_me:19707: checking for regcomp in -lgnurx" >&5
19708 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19709 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19710   echo $ECHO_N "(cached) $ECHO_C" >&6
19711 else
19712   ac_check_lib_save_LIBS=$LIBS
19713 LIBS="-lgnurx  $LIBS"
19714 cat >"conftest.$ac_ext" <<_ACEOF
19715 #line 19715 "configure"
19716 #include "confdefs.h"
19717
19718 /* Override any gcc2 internal prototype to avoid an error.  */
19719 #ifdef __cplusplus
19720 extern "C"
19721 #endif
19722 /* We use char because int might match the return type of a gcc2
19723    builtin and then its argument prototype would still apply.  */
19724 char regcomp ();
19725 int
19726 main (void)
19727 {
19728 regcomp ();
19729   ;
19730   return 0;
19731 }
19732 _ACEOF
19733 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19734 if { (eval echo "$as_me:19734: \"$ac_link\"") >&5
19735   (eval $ac_link) 2>&5
19736   ac_status=$?
19737   echo "$as_me:19737: \$? = $ac_status" >&5
19738   (exit "$ac_status"); } &&
19739          { ac_try='test -s "conftest$ac_exeext"'
19740   { (eval echo "$as_me:19740: \"$ac_try\"") >&5
19741   (eval $ac_try) 2>&5
19742   ac_status=$?
19743   echo "$as_me:19743: \$? = $ac_status" >&5
19744   (exit "$ac_status"); }; }; then
19745   ac_cv_lib_gnurx_regcomp=yes
19746 else
19747   echo "$as_me: failed program was:" >&5
19748 cat "conftest.$ac_ext" >&5
19749 ac_cv_lib_gnurx_regcomp=no
19750 fi
19751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19752 LIBS=$ac_check_lib_save_LIBS
19753 fi
19754 echo "$as_me:19754: result: $ac_cv_lib_gnurx_regcomp" >&5
19755 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19756 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19757
19758 cf_add_libs="$LIBS"
19759 # reverse order
19760 cf_add_0lib=
19761 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19762 # filter duplicates
19763 for cf_add_1lib in $cf_add_0lib; do
19764         for cf_add_2lib in $cf_add_libs; do
19765                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19766                         cf_add_1lib=
19767                         break
19768                 fi
19769         done
19770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19771 done
19772 LIBS="$cf_add_libs"
19773
19774                         cf_regex_func=regcomp
19775 fi
19776
19777 fi
19778
19779         ;;
19780 (*)
19781         cf_regex_libs="regex re"
19782         echo "$as_me:19782: checking for regcomp" >&5
19783 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19784 if test "${ac_cv_func_regcomp+set}" = set; then
19785   echo $ECHO_N "(cached) $ECHO_C" >&6
19786 else
19787   cat >"conftest.$ac_ext" <<_ACEOF
19788 #line 19788 "configure"
19789 #include "confdefs.h"
19790 #define regcomp autoconf_temporary
19791 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19792 #undef regcomp
19793
19794 #ifdef __cplusplus
19795 extern "C"
19796 #endif
19797
19798 /* We use char because int might match the return type of a gcc2
19799    builtin and then its argument prototype would still apply.  */
19800 char regcomp (void);
19801
19802 int
19803 main (void)
19804 {
19805
19806 /* The GNU C library defines stubs for functions which it implements
19807     to always fail with ENOSYS.  Some functions are actually named
19808     something starting with __ and the normal name is an alias.  */
19809 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19810 #error found stub for regcomp
19811 #endif
19812
19813         return regcomp ();
19814   ;
19815   return 0;
19816 }
19817 _ACEOF
19818 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19819 if { (eval echo "$as_me:19819: \"$ac_link\"") >&5
19820   (eval $ac_link) 2>&5
19821   ac_status=$?
19822   echo "$as_me:19822: \$? = $ac_status" >&5
19823   (exit "$ac_status"); } &&
19824          { ac_try='test -s "conftest$ac_exeext"'
19825   { (eval echo "$as_me:19825: \"$ac_try\"") >&5
19826   (eval $ac_try) 2>&5
19827   ac_status=$?
19828   echo "$as_me:19828: \$? = $ac_status" >&5
19829   (exit "$ac_status"); }; }; then
19830   ac_cv_func_regcomp=yes
19831 else
19832   echo "$as_me: failed program was:" >&5
19833 cat "conftest.$ac_ext" >&5
19834 ac_cv_func_regcomp=no
19835 fi
19836 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19837 fi
19838 echo "$as_me:19838: result: $ac_cv_func_regcomp" >&5
19839 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19840 if test "$ac_cv_func_regcomp" = yes; then
19841   cf_regex_func=regcomp
19842 else
19843
19844                 for cf_regex_lib in $cf_regex_libs
19845                 do
19846                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19847 echo "$as_me:19847: checking for regcomp in -l$cf_regex_lib" >&5
19848 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19849 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19850   echo $ECHO_N "(cached) $ECHO_C" >&6
19851 else
19852   ac_check_lib_save_LIBS=$LIBS
19853 LIBS="-l$cf_regex_lib  $LIBS"
19854 cat >"conftest.$ac_ext" <<_ACEOF
19855 #line 19855 "configure"
19856 #include "confdefs.h"
19857
19858 /* Override any gcc2 internal prototype to avoid an error.  */
19859 #ifdef __cplusplus
19860 extern "C"
19861 #endif
19862 /* We use char because int might match the return type of a gcc2
19863    builtin and then its argument prototype would still apply.  */
19864 char regcomp ();
19865 int
19866 main (void)
19867 {
19868 regcomp ();
19869   ;
19870   return 0;
19871 }
19872 _ACEOF
19873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19874 if { (eval echo "$as_me:19874: \"$ac_link\"") >&5
19875   (eval $ac_link) 2>&5
19876   ac_status=$?
19877   echo "$as_me:19877: \$? = $ac_status" >&5
19878   (exit "$ac_status"); } &&
19879          { ac_try='test -s "conftest$ac_exeext"'
19880   { (eval echo "$as_me:19880: \"$ac_try\"") >&5
19881   (eval $ac_try) 2>&5
19882   ac_status=$?
19883   echo "$as_me:19883: \$? = $ac_status" >&5
19884   (exit "$ac_status"); }; }; then
19885   eval "$as_ac_Lib=yes"
19886 else
19887   echo "$as_me: failed program was:" >&5
19888 cat "conftest.$ac_ext" >&5
19889 eval "$as_ac_Lib=no"
19890 fi
19891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19892 LIBS=$ac_check_lib_save_LIBS
19893 fi
19894 echo "$as_me:19894: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19895 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19896 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19897
19898 cf_add_libs="$LIBS"
19899 # reverse order
19900 cf_add_0lib=
19901 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19902 # filter duplicates
19903 for cf_add_1lib in $cf_add_0lib; do
19904         for cf_add_2lib in $cf_add_libs; do
19905                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19906                         cf_add_1lib=
19907                         break
19908                 fi
19909         done
19910         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19911 done
19912 LIBS="$cf_add_libs"
19913
19914                                         cf_regex_func=regcomp
19915                                         break
19916 fi
19917
19918                 done
19919
19920 fi
19921
19922         ;;
19923 esac
19924
19925 if test "$cf_regex_func" = no ; then
19926         echo "$as_me:19926: checking for compile" >&5
19927 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19928 if test "${ac_cv_func_compile+set}" = set; then
19929   echo $ECHO_N "(cached) $ECHO_C" >&6
19930 else
19931   cat >"conftest.$ac_ext" <<_ACEOF
19932 #line 19932 "configure"
19933 #include "confdefs.h"
19934 #define compile autoconf_temporary
19935 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19936 #undef compile
19937
19938 #ifdef __cplusplus
19939 extern "C"
19940 #endif
19941
19942 /* We use char because int might match the return type of a gcc2
19943    builtin and then its argument prototype would still apply.  */
19944 char compile (void);
19945
19946 int
19947 main (void)
19948 {
19949
19950 /* The GNU C library defines stubs for functions which it implements
19951     to always fail with ENOSYS.  Some functions are actually named
19952     something starting with __ and the normal name is an alias.  */
19953 #if defined (__stub_compile) || defined (__stub___compile)
19954 #error found stub for compile
19955 #endif
19956
19957         return compile ();
19958   ;
19959   return 0;
19960 }
19961 _ACEOF
19962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19963 if { (eval echo "$as_me:19963: \"$ac_link\"") >&5
19964   (eval $ac_link) 2>&5
19965   ac_status=$?
19966   echo "$as_me:19966: \$? = $ac_status" >&5
19967   (exit "$ac_status"); } &&
19968          { ac_try='test -s "conftest$ac_exeext"'
19969   { (eval echo "$as_me:19969: \"$ac_try\"") >&5
19970   (eval $ac_try) 2>&5
19971   ac_status=$?
19972   echo "$as_me:19972: \$? = $ac_status" >&5
19973   (exit "$ac_status"); }; }; then
19974   ac_cv_func_compile=yes
19975 else
19976   echo "$as_me: failed program was:" >&5
19977 cat "conftest.$ac_ext" >&5
19978 ac_cv_func_compile=no
19979 fi
19980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19981 fi
19982 echo "$as_me:19982: result: $ac_cv_func_compile" >&5
19983 echo "${ECHO_T}$ac_cv_func_compile" >&6
19984 if test "$ac_cv_func_compile" = yes; then
19985   cf_regex_func=compile
19986 else
19987
19988                 echo "$as_me:19988: checking for compile in -lgen" >&5
19989 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19990 if test "${ac_cv_lib_gen_compile+set}" = set; then
19991   echo $ECHO_N "(cached) $ECHO_C" >&6
19992 else
19993   ac_check_lib_save_LIBS=$LIBS
19994 LIBS="-lgen  $LIBS"
19995 cat >"conftest.$ac_ext" <<_ACEOF
19996 #line 19996 "configure"
19997 #include "confdefs.h"
19998
19999 /* Override any gcc2 internal prototype to avoid an error.  */
20000 #ifdef __cplusplus
20001 extern "C"
20002 #endif
20003 /* We use char because int might match the return type of a gcc2
20004    builtin and then its argument prototype would still apply.  */
20005 char compile ();
20006 int
20007 main (void)
20008 {
20009 compile ();
20010   ;
20011   return 0;
20012 }
20013 _ACEOF
20014 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20015 if { (eval echo "$as_me:20015: \"$ac_link\"") >&5
20016   (eval $ac_link) 2>&5
20017   ac_status=$?
20018   echo "$as_me:20018: \$? = $ac_status" >&5
20019   (exit "$ac_status"); } &&
20020          { ac_try='test -s "conftest$ac_exeext"'
20021   { (eval echo "$as_me:20021: \"$ac_try\"") >&5
20022   (eval $ac_try) 2>&5
20023   ac_status=$?
20024   echo "$as_me:20024: \$? = $ac_status" >&5
20025   (exit "$ac_status"); }; }; then
20026   ac_cv_lib_gen_compile=yes
20027 else
20028   echo "$as_me: failed program was:" >&5
20029 cat "conftest.$ac_ext" >&5
20030 ac_cv_lib_gen_compile=no
20031 fi
20032 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20033 LIBS=$ac_check_lib_save_LIBS
20034 fi
20035 echo "$as_me:20035: result: $ac_cv_lib_gen_compile" >&5
20036 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20037 if test "$ac_cv_lib_gen_compile" = yes; then
20038
20039 cf_add_libs="$LIBS"
20040 # reverse order
20041 cf_add_0lib=
20042 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20043 # filter duplicates
20044 for cf_add_1lib in $cf_add_0lib; do
20045         for cf_add_2lib in $cf_add_libs; do
20046                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20047                         cf_add_1lib=
20048                         break
20049                 fi
20050         done
20051         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20052 done
20053 LIBS="$cf_add_libs"
20054
20055                                 cf_regex_func=compile
20056 fi
20057
20058 fi
20059
20060 fi
20061
20062 if test "$cf_regex_func" = no ; then
20063         { echo "$as_me:20063: WARNING: cannot find regular expression library" >&5
20064 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20065 fi
20066
20067 echo "$as_me:20067: checking for regular-expression headers" >&5
20068 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20069 if test "${cf_cv_regex_hdrs+set}" = set; then
20070   echo $ECHO_N "(cached) $ECHO_C" >&6
20071 else
20072
20073 cf_cv_regex_hdrs=no
20074 case "$cf_regex_func" in
20075 (compile)
20076         for cf_regex_hdr in regexp.h regexpr.h
20077         do
20078                 cat >"conftest.$ac_ext" <<_ACEOF
20079 #line 20079 "configure"
20080 #include "confdefs.h"
20081 #include <$cf_regex_hdr>
20082 int
20083 main (void)
20084 {
20085
20086                         char *p = compile("", "", "", 0);
20087                         int x = step("", "");
20088                         (void)p;
20089                         (void)x;
20090
20091   ;
20092   return 0;
20093 }
20094 _ACEOF
20095 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20096 if { (eval echo "$as_me:20096: \"$ac_link\"") >&5
20097   (eval $ac_link) 2>&5
20098   ac_status=$?
20099   echo "$as_me:20099: \$? = $ac_status" >&5
20100   (exit "$ac_status"); } &&
20101          { ac_try='test -s "conftest$ac_exeext"'
20102   { (eval echo "$as_me:20102: \"$ac_try\"") >&5
20103   (eval $ac_try) 2>&5
20104   ac_status=$?
20105   echo "$as_me:20105: \$? = $ac_status" >&5
20106   (exit "$ac_status"); }; }; then
20107
20108                         cf_cv_regex_hdrs=$cf_regex_hdr
20109                         break
20110
20111 else
20112   echo "$as_me: failed program was:" >&5
20113 cat "conftest.$ac_ext" >&5
20114 fi
20115 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20116         done
20117         ;;
20118 (*)
20119         for cf_regex_hdr in regex.h
20120         do
20121                 cat >"conftest.$ac_ext" <<_ACEOF
20122 #line 20122 "configure"
20123 #include "confdefs.h"
20124 #include <sys/types.h>
20125 #include <$cf_regex_hdr>
20126 int
20127 main (void)
20128 {
20129
20130                         regex_t *p = 0;
20131                         int x = regcomp(p, "", 0);
20132                         int y = regexec(p, "", 0, 0, 0);
20133                         (void)x;
20134                         (void)y;
20135                         regfree(p);
20136
20137   ;
20138   return 0;
20139 }
20140 _ACEOF
20141 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20142 if { (eval echo "$as_me:20142: \"$ac_link\"") >&5
20143   (eval $ac_link) 2>&5
20144   ac_status=$?
20145   echo "$as_me:20145: \$? = $ac_status" >&5
20146   (exit "$ac_status"); } &&
20147          { ac_try='test -s "conftest$ac_exeext"'
20148   { (eval echo "$as_me:20148: \"$ac_try\"") >&5
20149   (eval $ac_try) 2>&5
20150   ac_status=$?
20151   echo "$as_me:20151: \$? = $ac_status" >&5
20152   (exit "$ac_status"); }; }; then
20153
20154                         cf_cv_regex_hdrs=$cf_regex_hdr
20155                         break
20156
20157 else
20158   echo "$as_me: failed program was:" >&5
20159 cat "conftest.$ac_ext" >&5
20160 fi
20161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20162         done
20163         ;;
20164 esac
20165
20166 fi
20167 echo "$as_me:20167: result: $cf_cv_regex_hdrs" >&5
20168 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20169
20170 case "$cf_cv_regex_hdrs" in
20171         (no)            { echo "$as_me:20171: WARNING: no regular expression header found" >&5
20172 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20173         (regex.h)
20174 cat >>confdefs.h <<\EOF
20175 #define HAVE_REGEX_H_FUNCS 1
20176 EOF
20177  ;;
20178         (regexp.h)
20179 cat >>confdefs.h <<\EOF
20180 #define HAVE_REGEXP_H_FUNCS 1
20181 EOF
20182  ;;
20183         (regexpr.h)
20184 cat >>confdefs.h <<\EOF
20185 #define HAVE_REGEXPR_H_FUNCS 1
20186 EOF
20187  ;;
20188 esac
20189
20190 for ac_header in \
20191 fcntl.h \
20192 getopt.h \
20193 limits.h \
20194 locale.h \
20195 math.h \
20196 poll.h \
20197 sys/auxv.h \
20198 sys/ioctl.h \
20199 sys/param.h \
20200 sys/poll.h \
20201 sys/select.h \
20202 sys/time.h \
20203 sys/times.h \
20204 unistd.h \
20205 wctype.h \
20206
20207 do
20208 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20209 echo "$as_me:20209: checking for $ac_header" >&5
20210 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20211 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20212   echo $ECHO_N "(cached) $ECHO_C" >&6
20213 else
20214   cat >"conftest.$ac_ext" <<_ACEOF
20215 #line 20215 "configure"
20216 #include "confdefs.h"
20217 #include <$ac_header>
20218 _ACEOF
20219 if { (eval echo "$as_me:20219: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20220   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20221   ac_status=$?
20222   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20223   rm -f conftest.er1
20224   cat conftest.err >&5
20225   echo "$as_me:20225: \$? = $ac_status" >&5
20226   (exit "$ac_status"); } >/dev/null; then
20227   if test -s conftest.err; then
20228     ac_cpp_err=$ac_c_preproc_warn_flag
20229   else
20230     ac_cpp_err=
20231   fi
20232 else
20233   ac_cpp_err=yes
20234 fi
20235 if test -z "$ac_cpp_err"; then
20236   eval "$as_ac_Header=yes"
20237 else
20238   echo "$as_me: failed program was:" >&5
20239   cat "conftest.$ac_ext" >&5
20240   eval "$as_ac_Header=no"
20241 fi
20242 rm -f conftest.err "conftest.$ac_ext"
20243 fi
20244 echo "$as_me:20244: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20245 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20246 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20247   cat >>confdefs.h <<EOF
20248 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20249 EOF
20250
20251 fi
20252 done
20253
20254 for ac_header in unistd.h getopt.h
20255 do
20256 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20257 echo "$as_me:20257: checking for $ac_header" >&5
20258 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20259 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20260   echo $ECHO_N "(cached) $ECHO_C" >&6
20261 else
20262   cat >"conftest.$ac_ext" <<_ACEOF
20263 #line 20263 "configure"
20264 #include "confdefs.h"
20265 #include <$ac_header>
20266 _ACEOF
20267 if { (eval echo "$as_me:20267: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20268   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20269   ac_status=$?
20270   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20271   rm -f conftest.er1
20272   cat conftest.err >&5
20273   echo "$as_me:20273: \$? = $ac_status" >&5
20274   (exit "$ac_status"); } >/dev/null; then
20275   if test -s conftest.err; then
20276     ac_cpp_err=$ac_c_preproc_warn_flag
20277   else
20278     ac_cpp_err=
20279   fi
20280 else
20281   ac_cpp_err=yes
20282 fi
20283 if test -z "$ac_cpp_err"; then
20284   eval "$as_ac_Header=yes"
20285 else
20286   echo "$as_me: failed program was:" >&5
20287   cat "conftest.$ac_ext" >&5
20288   eval "$as_ac_Header=no"
20289 fi
20290 rm -f conftest.err "conftest.$ac_ext"
20291 fi
20292 echo "$as_me:20292: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20293 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20294 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20295   cat >>confdefs.h <<EOF
20296 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20297 EOF
20298
20299 fi
20300 done
20301
20302 echo "$as_me:20302: checking for header declaring getopt variables" >&5
20303 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20304 if test "${cf_cv_getopt_header+set}" = set; then
20305   echo $ECHO_N "(cached) $ECHO_C" >&6
20306 else
20307
20308 cf_cv_getopt_header=none
20309 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20310 do
20311 cat >"conftest.$ac_ext" <<_ACEOF
20312 #line 20312 "configure"
20313 #include "confdefs.h"
20314
20315 #include <$cf_header>
20316 int
20317 main (void)
20318 {
20319 int x = optind; char *y = optarg; (void)x; (void)y
20320   ;
20321   return 0;
20322 }
20323 _ACEOF
20324 rm -f "conftest.$ac_objext"
20325 if { (eval echo "$as_me:20325: \"$ac_compile\"") >&5
20326   (eval $ac_compile) 2>&5
20327   ac_status=$?
20328   echo "$as_me:20328: \$? = $ac_status" >&5
20329   (exit "$ac_status"); } &&
20330          { ac_try='test -s "conftest.$ac_objext"'
20331   { (eval echo "$as_me:20331: \"$ac_try\"") >&5
20332   (eval $ac_try) 2>&5
20333   ac_status=$?
20334   echo "$as_me:20334: \$? = $ac_status" >&5
20335   (exit "$ac_status"); }; }; then
20336   cf_cv_getopt_header=$cf_header
20337  break
20338 else
20339   echo "$as_me: failed program was:" >&5
20340 cat "conftest.$ac_ext" >&5
20341 fi
20342 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20343 done
20344
20345 fi
20346 echo "$as_me:20346: result: $cf_cv_getopt_header" >&5
20347 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20348 if test "$cf_cv_getopt_header" != none ; then
20349
20350 cat >>confdefs.h <<\EOF
20351 #define HAVE_GETOPT_HEADER 1
20352 EOF
20353
20354 fi
20355 if test "$cf_cv_getopt_header" = getopt.h ; then
20356
20357 cat >>confdefs.h <<\EOF
20358 #define NEED_GETOPT_H 1
20359 EOF
20360
20361 fi
20362
20363 echo "$as_me:20363: checking if external environ is declared" >&5
20364 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20365 if test "${cf_cv_dcl_environ+set}" = set; then
20366   echo $ECHO_N "(cached) $ECHO_C" >&6
20367 else
20368
20369     cat >"conftest.$ac_ext" <<_ACEOF
20370 #line 20370 "configure"
20371 #include "confdefs.h"
20372
20373 $ac_includes_default
20374 int
20375 main (void)
20376 {
20377 void* x = (void*) environ; (void)x
20378   ;
20379   return 0;
20380 }
20381 _ACEOF
20382 rm -f "conftest.$ac_objext"
20383 if { (eval echo "$as_me:20383: \"$ac_compile\"") >&5
20384   (eval $ac_compile) 2>&5
20385   ac_status=$?
20386   echo "$as_me:20386: \$? = $ac_status" >&5
20387   (exit "$ac_status"); } &&
20388          { ac_try='test -s "conftest.$ac_objext"'
20389   { (eval echo "$as_me:20389: \"$ac_try\"") >&5
20390   (eval $ac_try) 2>&5
20391   ac_status=$?
20392   echo "$as_me:20392: \$? = $ac_status" >&5
20393   (exit "$ac_status"); }; }; then
20394   cf_cv_dcl_environ=yes
20395 else
20396   echo "$as_me: failed program was:" >&5
20397 cat "conftest.$ac_ext" >&5
20398 cf_cv_dcl_environ=no
20399 fi
20400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20401
20402 fi
20403 echo "$as_me:20403: result: $cf_cv_dcl_environ" >&5
20404 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20405
20406 if test "$cf_cv_dcl_environ" = no ; then
20407
20408 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20409
20410     cat >>confdefs.h <<EOF
20411 #define $cf_result 1
20412 EOF
20413
20414 fi
20415
20416 # It's possible (for near-UNIX clones) that the data doesn't exist
20417
20418 echo "$as_me:20418: checking if external environ exists" >&5
20419 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20420 if test "${cf_cv_have_environ+set}" = set; then
20421   echo $ECHO_N "(cached) $ECHO_C" >&6
20422 else
20423
20424         cat >"conftest.$ac_ext" <<_ACEOF
20425 #line 20425 "configure"
20426 #include "confdefs.h"
20427
20428 #undef environ
20429 extern int environ;
20430
20431 int
20432 main (void)
20433 {
20434 environ = 2
20435   ;
20436   return 0;
20437 }
20438 _ACEOF
20439 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20440 if { (eval echo "$as_me:20440: \"$ac_link\"") >&5
20441   (eval $ac_link) 2>&5
20442   ac_status=$?
20443   echo "$as_me:20443: \$? = $ac_status" >&5
20444   (exit "$ac_status"); } &&
20445          { ac_try='test -s "conftest$ac_exeext"'
20446   { (eval echo "$as_me:20446: \"$ac_try\"") >&5
20447   (eval $ac_try) 2>&5
20448   ac_status=$?
20449   echo "$as_me:20449: \$? = $ac_status" >&5
20450   (exit "$ac_status"); }; }; then
20451   cf_cv_have_environ=yes
20452 else
20453   echo "$as_me: failed program was:" >&5
20454 cat "conftest.$ac_ext" >&5
20455 cf_cv_have_environ=no
20456 fi
20457 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20458
20459 fi
20460 echo "$as_me:20460: result: $cf_cv_have_environ" >&5
20461 echo "${ECHO_T}$cf_cv_have_environ" >&6
20462
20463 if test "$cf_cv_have_environ" = yes ; then
20464
20465 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20466
20467         cat >>confdefs.h <<EOF
20468 #define $cf_result 1
20469 EOF
20470
20471 fi
20472
20473 echo "$as_me:20473: checking for getenv" >&5
20474 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20475 if test "${ac_cv_func_getenv+set}" = set; then
20476   echo $ECHO_N "(cached) $ECHO_C" >&6
20477 else
20478   cat >"conftest.$ac_ext" <<_ACEOF
20479 #line 20479 "configure"
20480 #include "confdefs.h"
20481 #define getenv autoconf_temporary
20482 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20483 #undef getenv
20484
20485 #ifdef __cplusplus
20486 extern "C"
20487 #endif
20488
20489 /* We use char because int might match the return type of a gcc2
20490    builtin and then its argument prototype would still apply.  */
20491 char getenv (void);
20492
20493 int
20494 main (void)
20495 {
20496
20497 /* The GNU C library defines stubs for functions which it implements
20498     to always fail with ENOSYS.  Some functions are actually named
20499     something starting with __ and the normal name is an alias.  */
20500 #if defined (__stub_getenv) || defined (__stub___getenv)
20501 #error found stub for getenv
20502 #endif
20503
20504         return getenv ();
20505   ;
20506   return 0;
20507 }
20508 _ACEOF
20509 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20510 if { (eval echo "$as_me:20510: \"$ac_link\"") >&5
20511   (eval $ac_link) 2>&5
20512   ac_status=$?
20513   echo "$as_me:20513: \$? = $ac_status" >&5
20514   (exit "$ac_status"); } &&
20515          { ac_try='test -s "conftest$ac_exeext"'
20516   { (eval echo "$as_me:20516: \"$ac_try\"") >&5
20517   (eval $ac_try) 2>&5
20518   ac_status=$?
20519   echo "$as_me:20519: \$? = $ac_status" >&5
20520   (exit "$ac_status"); }; }; then
20521   ac_cv_func_getenv=yes
20522 else
20523   echo "$as_me: failed program was:" >&5
20524 cat "conftest.$ac_ext" >&5
20525 ac_cv_func_getenv=no
20526 fi
20527 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20528 fi
20529 echo "$as_me:20529: result: $ac_cv_func_getenv" >&5
20530 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20531
20532 for ac_func in putenv setenv strdup
20533 do
20534 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20535 echo "$as_me:20535: checking for $ac_func" >&5
20536 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20537 if eval "test \"\${$as_ac_var+set}\" = set"; then
20538   echo $ECHO_N "(cached) $ECHO_C" >&6
20539 else
20540   cat >"conftest.$ac_ext" <<_ACEOF
20541 #line 20541 "configure"
20542 #include "confdefs.h"
20543 #define $ac_func autoconf_temporary
20544 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20545 #undef $ac_func
20546
20547 #ifdef __cplusplus
20548 extern "C"
20549 #endif
20550
20551 /* We use char because int might match the return type of a gcc2
20552    builtin and then its argument prototype would still apply.  */
20553 char $ac_func (void);
20554
20555 int
20556 main (void)
20557 {
20558
20559 /* The GNU C library defines stubs for functions which it implements
20560     to always fail with ENOSYS.  Some functions are actually named
20561     something starting with __ and the normal name is an alias.  */
20562 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20563 #error found stub for $ac_func
20564 #endif
20565
20566         return $ac_func ();
20567   ;
20568   return 0;
20569 }
20570 _ACEOF
20571 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20572 if { (eval echo "$as_me:20572: \"$ac_link\"") >&5
20573   (eval $ac_link) 2>&5
20574   ac_status=$?
20575   echo "$as_me:20575: \$? = $ac_status" >&5
20576   (exit "$ac_status"); } &&
20577          { ac_try='test -s "conftest$ac_exeext"'
20578   { (eval echo "$as_me:20578: \"$ac_try\"") >&5
20579   (eval $ac_try) 2>&5
20580   ac_status=$?
20581   echo "$as_me:20581: \$? = $ac_status" >&5
20582   (exit "$ac_status"); }; }; then
20583   eval "$as_ac_var=yes"
20584 else
20585   echo "$as_me: failed program was:" >&5
20586 cat "conftest.$ac_ext" >&5
20587 eval "$as_ac_var=no"
20588 fi
20589 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20590 fi
20591 echo "$as_me:20591: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20592 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20593 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20594   cat >>confdefs.h <<EOF
20595 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20596 EOF
20597
20598 fi
20599 done
20600
20601 echo "$as_me:20601: checking if getenv returns consistent values" >&5
20602 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20603 if test "${cf_cv_consistent_getenv+set}" = set; then
20604   echo $ECHO_N "(cached) $ECHO_C" >&6
20605 else
20606
20607 if test "$cross_compiling" = yes; then
20608   cf_cv_consistent_getenv=unknown
20609 else
20610   cat >"conftest.$ac_ext" <<_ACEOF
20611 #line 20611 "configure"
20612 #include "confdefs.h"
20613
20614 $ac_includes_default
20615
20616 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20617 extern char **environ;  /* POSIX, but some systems are not... */
20618 #endif
20619
20620 #if defined(HAVE_STRDUP)
20621 #define str_alloc(s) strdup(s)
20622 #else
20623 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20624 #endif
20625
20626 static void set_value(const char *name, const char *value)
20627 {
20628 #if defined(HAVE_SETENV)
20629         setenv(name, value, 1);
20630 #elif defined(HAVE_PUTENV)
20631         char buffer[1024];
20632         sprintf(buffer, "%s=%s", name, value);
20633         putenv(str_alloc(buffer));
20634 #else
20635 #error neither putenv/setenv found
20636 #endif
20637 }
20638 int main(void)
20639 {
20640         int pass;
20641         size_t numenv, limit, j;
20642         char **mynames;
20643         char **myvalues;
20644         char **mypointer;
20645         char *equals;
20646         for (numenv = 0; environ[numenv]; ++numenv) ;
20647         limit = numenv + 10;
20648         mynames = (char **) calloc(limit + 1, sizeof(char *));
20649         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20650         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20651 #if defined(HAVE_ENVIRON)
20652         for (j = 0; environ[j]; ++j) {
20653                 mynames[j] = str_alloc(environ[j]);
20654                 equals = strchr(mynames[j], '=');
20655                 if (equals != 0) {
20656                         *equals++ = '\\0';
20657                         myvalues[j] = str_alloc(equals);
20658                 } else {
20659                         myvalues[j] = str_alloc("");
20660                 }
20661         }
20662 #endif
20663         for (j = numenv; j < limit; ++j) {
20664                 char name[80];
20665                 char value[80];
20666                 size_t found;
20667                 size_t k = 0;
20668                 do {
20669                         size_t jk;
20670                         found = 0;
20671                         sprintf(name, "TERM%lu", (unsigned long) k);
20672                         for (jk = 0; jk < j; ++jk) {
20673                                 if (!strcmp(name, mynames[jk])) {
20674                                         found = 1;
20675                                         ++k;
20676                                         break;
20677                                 }
20678                         }
20679                 } while (found);
20680                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20681                 set_value(name, value);
20682                 mynames[j] = str_alloc(name);
20683                 myvalues[j] = str_alloc(value);
20684         }
20685         for (pass = 0; pass < 3; ++pass) {
20686                 for (j = 0; j < limit; ++j) {
20687                         char *value = getenv(mynames[j]);
20688                         if (pass) {
20689                                 if (value == 0) {
20690                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20691                                         ${cf_cv_main_return:-return}(1);
20692                                 } else if (value != mypointer[j]) {
20693                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20694                                         ${cf_cv_main_return:-return}(1);
20695                                 } else if (strcmp(value, myvalues[j])) {
20696                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20697                                         ${cf_cv_main_return:-return}(1);
20698                                 }
20699                         } else {
20700                                 size_t k;
20701                                 mypointer[j] = value;
20702                                 for (k = 0; k < j; ++k) {
20703                                         if (mypointer[j] == mypointer[k]) {
20704                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20705                                                 ${cf_cv_main_return:-return}(1);
20706                                         }
20707                                 }
20708                         }
20709                 }
20710         }
20711         ${cf_cv_main_return:-return}(0);
20712 }
20713
20714 _ACEOF
20715 rm -f "conftest$ac_exeext"
20716 if { (eval echo "$as_me:20716: \"$ac_link\"") >&5
20717   (eval $ac_link) 2>&5
20718   ac_status=$?
20719   echo "$as_me:20719: \$? = $ac_status" >&5
20720   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20721   { (eval echo "$as_me:20721: \"$ac_try\"") >&5
20722   (eval $ac_try) 2>&5
20723   ac_status=$?
20724   echo "$as_me:20724: \$? = $ac_status" >&5
20725   (exit "$ac_status"); }; }; then
20726   cf_cv_consistent_getenv=yes
20727 else
20728   echo "$as_me: program exited with status $ac_status" >&5
20729 echo "$as_me: failed program was:" >&5
20730 cat "conftest.$ac_ext" >&5
20731 cf_cv_consistent_getenv=no
20732 fi
20733 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20734 fi
20735
20736 fi
20737 echo "$as_me:20737: result: $cf_cv_consistent_getenv" >&5
20738 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20739
20740 if test "x$cf_cv_consistent_getenv" = xno
20741 then
20742
20743 cat >>confdefs.h <<\EOF
20744 #define HAVE_CONSISTENT_GETENV 1
20745 EOF
20746
20747 fi
20748
20749 if test "x$cf_cv_consistent_getenv" = xno && \
20750         test "x$cf_with_trace" = xyes
20751 then
20752         { echo "$as_me:20752: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20753 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20754 fi
20755
20756 echo "$as_me:20756: checking if sys/time.h works with sys/select.h" >&5
20757 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20758 if test "${cf_cv_sys_time_select+set}" = set; then
20759   echo $ECHO_N "(cached) $ECHO_C" >&6
20760 else
20761
20762 cat >"conftest.$ac_ext" <<_ACEOF
20763 #line 20763 "configure"
20764 #include "confdefs.h"
20765
20766 #include <sys/types.h>
20767 #ifdef HAVE_SYS_TIME_H
20768 #include <sys/time.h>
20769 #endif
20770 #ifdef HAVE_SYS_SELECT_H
20771 #include <sys/select.h>
20772 #endif
20773
20774 int
20775 main (void)
20776 {
20777
20778   ;
20779   return 0;
20780 }
20781 _ACEOF
20782 rm -f "conftest.$ac_objext"
20783 if { (eval echo "$as_me:20783: \"$ac_compile\"") >&5
20784   (eval $ac_compile) 2>&5
20785   ac_status=$?
20786   echo "$as_me:20786: \$? = $ac_status" >&5
20787   (exit "$ac_status"); } &&
20788          { ac_try='test -s "conftest.$ac_objext"'
20789   { (eval echo "$as_me:20789: \"$ac_try\"") >&5
20790   (eval $ac_try) 2>&5
20791   ac_status=$?
20792   echo "$as_me:20792: \$? = $ac_status" >&5
20793   (exit "$ac_status"); }; }; then
20794   cf_cv_sys_time_select=yes
20795 else
20796   echo "$as_me: failed program was:" >&5
20797 cat "conftest.$ac_ext" >&5
20798 cf_cv_sys_time_select=no
20799 fi
20800 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20801
20802 fi
20803
20804 echo "$as_me:20804: result: $cf_cv_sys_time_select" >&5
20805 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20806 test "$cf_cv_sys_time_select" = yes &&
20807 cat >>confdefs.h <<\EOF
20808 #define HAVE_SYS_TIME_SELECT 1
20809 EOF
20810
20811 ###     checks for compiler characteristics
20812 ac_ext=c
20813 ac_cpp='$CPP $CPPFLAGS'
20814 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20815 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20816 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20817 ac_main_return="return"
20818
20819 echo "$as_me:20819: checking for an ANSI C-conforming const" >&5
20820 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20821 if test "${ac_cv_c_const+set}" = set; then
20822   echo $ECHO_N "(cached) $ECHO_C" >&6
20823 else
20824   cat >"conftest.$ac_ext" <<_ACEOF
20825 #line 20825 "configure"
20826 #include "confdefs.h"
20827
20828 int
20829 main (void)
20830 {
20831 /* FIXME: Include the comments suggested by Paul. */
20832 #ifndef __cplusplus
20833   /* Ultrix mips cc rejects this.  */
20834   typedef int charset[2];
20835   const charset x;
20836   /* SunOS 4.1.1 cc rejects this.  */
20837   char const *const *ccp;
20838   char **p;
20839   /* NEC SVR4.0.2 mips cc rejects this.  */
20840   struct point {int x, y;};
20841   static struct point const zero = {0,0};
20842   /* AIX XL C 1.02.0.0 rejects this.
20843      It does not let you subtract one const X* pointer from another in
20844      an arm of an if-expression whose if-part is not a constant
20845      expression */
20846   const char *g = "string";
20847   ccp = &g + (g ? g-g : 0);
20848   /* HPUX 7.0 cc rejects these. */
20849   ++ccp;
20850   p = (char**) ccp;
20851   ccp = (char const *const *) p;
20852   { /* SCO 3.2v4 cc rejects this.  */
20853     char *t;
20854     char const *s = 0 ? (char *) 0 : (char const *) 0;
20855
20856     *t++ = 0;
20857   }
20858   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20859     int x[] = {25, 17};
20860     const int *foo = &x[0];
20861     ++foo;
20862   }
20863   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20864     typedef const int *iptr;
20865     iptr p = 0;
20866     ++p;
20867   }
20868   { /* AIX XL C 1.02.0.0 rejects this saying
20869        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20870     struct s { int j; const int *ap[3]; };
20871     struct s *b; b->j = 5;
20872   }
20873   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20874     const int foo = 10;
20875   }
20876 #endif
20877
20878   ;
20879   return 0;
20880 }
20881 _ACEOF
20882 rm -f "conftest.$ac_objext"
20883 if { (eval echo "$as_me:20883: \"$ac_compile\"") >&5
20884   (eval $ac_compile) 2>&5
20885   ac_status=$?
20886   echo "$as_me:20886: \$? = $ac_status" >&5
20887   (exit "$ac_status"); } &&
20888          { ac_try='test -s "conftest.$ac_objext"'
20889   { (eval echo "$as_me:20889: \"$ac_try\"") >&5
20890   (eval $ac_try) 2>&5
20891   ac_status=$?
20892   echo "$as_me:20892: \$? = $ac_status" >&5
20893   (exit "$ac_status"); }; }; then
20894   ac_cv_c_const=yes
20895 else
20896   echo "$as_me: failed program was:" >&5
20897 cat "conftest.$ac_ext" >&5
20898 ac_cv_c_const=no
20899 fi
20900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20901 fi
20902 echo "$as_me:20902: result: $ac_cv_c_const" >&5
20903 echo "${ECHO_T}$ac_cv_c_const" >&6
20904 if test $ac_cv_c_const = no; then
20905
20906 cat >>confdefs.h <<\EOF
20907 #define const
20908 EOF
20909
20910 fi
20911
20912 echo "$as_me:20912: checking for inline" >&5
20913 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20914 if test "${ac_cv_c_inline+set}" = set; then
20915   echo $ECHO_N "(cached) $ECHO_C" >&6
20916 else
20917   ac_cv_c_inline=no
20918 for ac_kw in inline __inline__ __inline; do
20919   cat >"conftest.$ac_ext" <<_ACEOF
20920 #line 20920 "configure"
20921 #include "confdefs.h"
20922 #ifndef __cplusplus
20923 static $ac_kw int static_foo () {return 0; }
20924 $ac_kw int foo () {return 0; }
20925 #endif
20926
20927 _ACEOF
20928 rm -f "conftest.$ac_objext"
20929 if { (eval echo "$as_me:20929: \"$ac_compile\"") >&5
20930   (eval $ac_compile) 2>&5
20931   ac_status=$?
20932   echo "$as_me:20932: \$? = $ac_status" >&5
20933   (exit "$ac_status"); } &&
20934          { ac_try='test -s "conftest.$ac_objext"'
20935   { (eval echo "$as_me:20935: \"$ac_try\"") >&5
20936   (eval $ac_try) 2>&5
20937   ac_status=$?
20938   echo "$as_me:20938: \$? = $ac_status" >&5
20939   (exit "$ac_status"); }; }; then
20940   ac_cv_c_inline=$ac_kw; break
20941 else
20942   echo "$as_me: failed program was:" >&5
20943 cat "conftest.$ac_ext" >&5
20944 fi
20945 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20946 done
20947
20948 fi
20949 echo "$as_me:20949: result: $ac_cv_c_inline" >&5
20950 echo "${ECHO_T}$ac_cv_c_inline" >&6
20951 case $ac_cv_c_inline in
20952   inline | yes) ;;
20953   no)
20954 cat >>confdefs.h <<\EOF
20955 #define inline
20956 EOF
20957  ;;
20958   *)  cat >>confdefs.h <<EOF
20959 #define inline $ac_cv_c_inline
20960 EOF
20961  ;;
20962 esac
20963
20964 NCURSES_INLINE=
20965 if test "$ac_cv_c_inline" != no ; then
20966         NCURSES_INLINE=inline
20967         if test "$INTEL_COMPILER" = yes
20968         then
20969                 :
20970         elif test "$CLANG_COMPILER" = yes
20971         then
20972                 :
20973         elif test "$GCC" = yes
20974         then
20975                 echo "$as_me:20975: checking if $CC supports options to tune inlining" >&5
20976 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20977 if test "${cf_cv_gcc_inline+set}" = set; then
20978   echo $ECHO_N "(cached) $ECHO_C" >&6
20979 else
20980
20981                 cf_save_CFLAGS=$CFLAGS
20982                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20983                 cat >"conftest.$ac_ext" <<_ACEOF
20984 #line 20984 "configure"
20985 #include "confdefs.h"
20986 inline int foo(void) { return 1; }
20987 int
20988 main (void)
20989 {
20990 ${cf_cv_main_return:-return} foo()
20991   ;
20992   return 0;
20993 }
20994 _ACEOF
20995 rm -f "conftest.$ac_objext"
20996 if { (eval echo "$as_me:20996: \"$ac_compile\"") >&5
20997   (eval $ac_compile) 2>&5
20998   ac_status=$?
20999   echo "$as_me:20999: \$? = $ac_status" >&5
21000   (exit "$ac_status"); } &&
21001          { ac_try='test -s "conftest.$ac_objext"'
21002   { (eval echo "$as_me:21002: \"$ac_try\"") >&5
21003   (eval $ac_try) 2>&5
21004   ac_status=$?
21005   echo "$as_me:21005: \$? = $ac_status" >&5
21006   (exit "$ac_status"); }; }; then
21007   cf_cv_gcc_inline=yes
21008 else
21009   echo "$as_me: failed program was:" >&5
21010 cat "conftest.$ac_ext" >&5
21011 cf_cv_gcc_inline=no
21012 fi
21013 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21014                 CFLAGS=$cf_save_CFLAGS
21015
21016 fi
21017 echo "$as_me:21017: result: $cf_cv_gcc_inline" >&5
21018 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21019                 if test "$cf_cv_gcc_inline" = yes ; then
21020
21021 cf_fix_cppflags=no
21022 cf_new_cflags=
21023 cf_new_cppflags=
21024 cf_new_extra_cppflags=
21025
21026 for cf_add_cflags in --param max-inline-insns-single=1200
21027 do
21028 case "$cf_fix_cppflags" in
21029 (no)
21030         case "$cf_add_cflags" in
21031         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21032                 case "$cf_add_cflags" in
21033                 (-D*)
21034                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21035
21036                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21037                                 && test -z "${cf_tst_cflags}" \
21038                                 && cf_fix_cppflags=yes
21039
21040                         if test "$cf_fix_cppflags" = yes ; then
21041
21042         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21043         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21044
21045                                 continue
21046                         elif test "${cf_tst_cflags}" = "\"'" ; then
21047
21048         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21049         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21050
21051                                 continue
21052                         fi
21053                         ;;
21054                 esac
21055                 case "$CPPFLAGS" in
21056                 (*$cf_add_cflags)
21057                         ;;
21058                 (*)
21059                         case "$cf_add_cflags" in
21060                         (-D*)
21061                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21062
21063 CPPFLAGS=`echo "$CPPFLAGS" | \
21064         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21065                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21066
21067                                 ;;
21068                         esac
21069
21070         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21071         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21072
21073                         ;;
21074                 esac
21075                 ;;
21076         (*)
21077
21078         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21079         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21080
21081                 ;;
21082         esac
21083         ;;
21084 (yes)
21085
21086         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21087         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21088
21089         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21090
21091         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21092                 && test -z "${cf_tst_cflags}" \
21093                 && cf_fix_cppflags=no
21094         ;;
21095 esac
21096 done
21097
21098 if test -n "$cf_new_cflags" ; then
21099
21100         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21101         CFLAGS="${CFLAGS}$cf_new_cflags"
21102
21103 fi
21104
21105 if test -n "$cf_new_cppflags" ; then
21106
21107         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21108         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21109
21110 fi
21111
21112 if test -n "$cf_new_extra_cppflags" ; then
21113
21114         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21115         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21116
21117 fi
21118
21119                 fi
21120         fi
21121 fi
21122
21123 echo "$as_me:21123: checking for signal global datatype" >&5
21124 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21125 if test "${cf_cv_sig_atomic_t+set}" = set; then
21126   echo $ECHO_N "(cached) $ECHO_C" >&6
21127 else
21128
21129         for cf_type in \
21130                 "volatile sig_atomic_t" \
21131                 "sig_atomic_t" \
21132                 "int"
21133         do
21134         cat >"conftest.$ac_ext" <<_ACEOF
21135 #line 21135 "configure"
21136 #include "confdefs.h"
21137
21138 #include <sys/types.h>
21139 #include <signal.h>
21140 #include <stdio.h>
21141
21142 extern $cf_type x;
21143 $cf_type x;
21144 static void handler(int sig)
21145 {
21146         (void)sig;
21147         x = 5;
21148 }
21149 int
21150 main (void)
21151 {
21152 signal(SIGINT, handler);
21153                  x = 1
21154   ;
21155   return 0;
21156 }
21157 _ACEOF
21158 rm -f "conftest.$ac_objext"
21159 if { (eval echo "$as_me:21159: \"$ac_compile\"") >&5
21160   (eval $ac_compile) 2>&5
21161   ac_status=$?
21162   echo "$as_me:21162: \$? = $ac_status" >&5
21163   (exit "$ac_status"); } &&
21164          { ac_try='test -s "conftest.$ac_objext"'
21165   { (eval echo "$as_me:21165: \"$ac_try\"") >&5
21166   (eval $ac_try) 2>&5
21167   ac_status=$?
21168   echo "$as_me:21168: \$? = $ac_status" >&5
21169   (exit "$ac_status"); }; }; then
21170   cf_cv_sig_atomic_t=$cf_type
21171 else
21172   echo "$as_me: failed program was:" >&5
21173 cat "conftest.$ac_ext" >&5
21174 cf_cv_sig_atomic_t=no
21175 fi
21176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21177                 test "$cf_cv_sig_atomic_t" != no && break
21178         done
21179
21180 fi
21181
21182 echo "$as_me:21182: result: $cf_cv_sig_atomic_t" >&5
21183 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21184 test "$cf_cv_sig_atomic_t" != no &&
21185 cat >>confdefs.h <<EOF
21186 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21187 EOF
21188
21189 if test "$NCURSES_CHTYPE" = auto ; then
21190
21191 echo "$as_me:21191: checking for type of chtype" >&5
21192 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21193 if test "${cf_cv_typeof_chtype+set}" = set; then
21194   echo $ECHO_N "(cached) $ECHO_C" >&6
21195 else
21196
21197                 if test "$cross_compiling" = yes; then
21198   cf_cv_typeof_chtype=long
21199 else
21200   cat >"conftest.$ac_ext" <<_ACEOF
21201 #line 21201 "configure"
21202 #include "confdefs.h"
21203
21204 $ac_includes_default
21205 #define WANT_BITS 31
21206 int main(void)
21207 {
21208         FILE *fp = fopen("cf_test.out", "w");
21209         if (fp != 0) {
21210                 char *result = "long";
21211                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21212                         int n;
21213                         unsigned int x, y;
21214                         for (n = 0; n < WANT_BITS; n++) {
21215                                 x = (1 << n);
21216                                 y = (x >> n);
21217                                 if (y != 1 || x == 0) {
21218                                         x = 0;
21219                                         break;
21220                                 }
21221                         }
21222                         /*
21223                          * If x is nonzero, an int is big enough for the bits
21224                          * that we want.
21225                          */
21226                         result = (x != 0) ? "int" : "long";
21227                 }
21228                 fputs(result, fp);
21229                 fclose(fp);
21230         }
21231         ${cf_cv_main_return:-return}(0);
21232 }
21233
21234 _ACEOF
21235 rm -f "conftest$ac_exeext"
21236 if { (eval echo "$as_me:21236: \"$ac_link\"") >&5
21237   (eval $ac_link) 2>&5
21238   ac_status=$?
21239   echo "$as_me:21239: \$? = $ac_status" >&5
21240   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21241   { (eval echo "$as_me:21241: \"$ac_try\"") >&5
21242   (eval $ac_try) 2>&5
21243   ac_status=$?
21244   echo "$as_me:21244: \$? = $ac_status" >&5
21245   (exit "$ac_status"); }; }; then
21246   cf_cv_typeof_chtype=`cat cf_test.out`
21247 else
21248   echo "$as_me: program exited with status $ac_status" >&5
21249 echo "$as_me: failed program was:" >&5
21250 cat "conftest.$ac_ext" >&5
21251 cf_cv_typeof_chtype=long
21252 fi
21253 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21254 fi
21255                 rm -f cf_test.out
21256
21257 fi
21258
21259 echo "$as_me:21259: result: $cf_cv_typeof_chtype" >&5
21260 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21261
21262 cat >>confdefs.h <<EOF
21263 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21264 EOF
21265
21266 else
21267         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21268 fi
21269 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21270
21271 echo "$as_me:21271: checking if unsigned literals are legal" >&5
21272 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21273 if test "${cf_cv_unsigned_literals+set}" = set; then
21274   echo $ECHO_N "(cached) $ECHO_C" >&6
21275 else
21276
21277         cat >"conftest.$ac_ext" <<_ACEOF
21278 #line 21278 "configure"
21279 #include "confdefs.h"
21280
21281 int
21282 main (void)
21283 {
21284 long x = 1L + 1UL + 1U + 1
21285   ;
21286   return 0;
21287 }
21288 _ACEOF
21289 rm -f "conftest.$ac_objext"
21290 if { (eval echo "$as_me:21290: \"$ac_compile\"") >&5
21291   (eval $ac_compile) 2>&5
21292   ac_status=$?
21293   echo "$as_me:21293: \$? = $ac_status" >&5
21294   (exit "$ac_status"); } &&
21295          { ac_try='test -s "conftest.$ac_objext"'
21296   { (eval echo "$as_me:21296: \"$ac_try\"") >&5
21297   (eval $ac_try) 2>&5
21298   ac_status=$?
21299   echo "$as_me:21299: \$? = $ac_status" >&5
21300   (exit "$ac_status"); }; }; then
21301   cf_cv_unsigned_literals=yes
21302 else
21303   echo "$as_me: failed program was:" >&5
21304 cat "conftest.$ac_ext" >&5
21305 cf_cv_unsigned_literals=no
21306 fi
21307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21308
21309 fi
21310
21311 echo "$as_me:21311: result: $cf_cv_unsigned_literals" >&5
21312 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21313
21314 cf_cv_1UL="1"
21315 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21316 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21317
21318 if test "$NCURSES_MMASK_T" = auto ; then
21319         cf_cv_typeof_mmask_t=long
21320 else
21321         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21322 fi
21323 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21324
21325 ###     Checks for external-data
21326
21327 echo "$as_me:21327: checking if external errno is declared" >&5
21328 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21329 if test "${cf_cv_dcl_errno+set}" = set; then
21330   echo $ECHO_N "(cached) $ECHO_C" >&6
21331 else
21332
21333         cat >"conftest.$ac_ext" <<_ACEOF
21334 #line 21334 "configure"
21335 #include "confdefs.h"
21336
21337 $ac_includes_default
21338 #include <errno.h>
21339 int
21340 main (void)
21341 {
21342 int x = (int) errno; (void)x
21343   ;
21344   return 0;
21345 }
21346 _ACEOF
21347 rm -f "conftest.$ac_objext"
21348 if { (eval echo "$as_me:21348: \"$ac_compile\"") >&5
21349   (eval $ac_compile) 2>&5
21350   ac_status=$?
21351   echo "$as_me:21351: \$? = $ac_status" >&5
21352   (exit "$ac_status"); } &&
21353          { ac_try='test -s "conftest.$ac_objext"'
21354   { (eval echo "$as_me:21354: \"$ac_try\"") >&5
21355   (eval $ac_try) 2>&5
21356   ac_status=$?
21357   echo "$as_me:21357: \$? = $ac_status" >&5
21358   (exit "$ac_status"); }; }; then
21359   cf_cv_dcl_errno=yes
21360 else
21361   echo "$as_me: failed program was:" >&5
21362 cat "conftest.$ac_ext" >&5
21363 cf_cv_dcl_errno=no
21364 fi
21365 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21366
21367 fi
21368 echo "$as_me:21368: result: $cf_cv_dcl_errno" >&5
21369 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21370
21371 if test "$cf_cv_dcl_errno" = no ; then
21372
21373 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21374
21375         cat >>confdefs.h <<EOF
21376 #define $cf_result 1
21377 EOF
21378
21379 fi
21380
21381 # It's possible (for near-UNIX clones) that the data doesn't exist
21382
21383 echo "$as_me:21383: checking if external errno exists" >&5
21384 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21385 if test "${cf_cv_have_errno+set}" = set; then
21386   echo $ECHO_N "(cached) $ECHO_C" >&6
21387 else
21388
21389         cat >"conftest.$ac_ext" <<_ACEOF
21390 #line 21390 "configure"
21391 #include "confdefs.h"
21392
21393 #undef errno
21394 extern int errno;
21395
21396 int
21397 main (void)
21398 {
21399 errno = 2
21400   ;
21401   return 0;
21402 }
21403 _ACEOF
21404 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21405 if { (eval echo "$as_me:21405: \"$ac_link\"") >&5
21406   (eval $ac_link) 2>&5
21407   ac_status=$?
21408   echo "$as_me:21408: \$? = $ac_status" >&5
21409   (exit "$ac_status"); } &&
21410          { ac_try='test -s "conftest$ac_exeext"'
21411   { (eval echo "$as_me:21411: \"$ac_try\"") >&5
21412   (eval $ac_try) 2>&5
21413   ac_status=$?
21414   echo "$as_me:21414: \$? = $ac_status" >&5
21415   (exit "$ac_status"); }; }; then
21416   cf_cv_have_errno=yes
21417 else
21418   echo "$as_me: failed program was:" >&5
21419 cat "conftest.$ac_ext" >&5
21420 cf_cv_have_errno=no
21421 fi
21422 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21423
21424 fi
21425 echo "$as_me:21425: result: $cf_cv_have_errno" >&5
21426 echo "${ECHO_T}$cf_cv_have_errno" >&6
21427
21428 if test "$cf_cv_have_errno" = yes ; then
21429
21430 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21431
21432         cat >>confdefs.h <<EOF
21433 #define $cf_result 1
21434 EOF
21435
21436 fi
21437
21438 echo "$as_me:21438: checking if data-only library module links" >&5
21439 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21440 if test "${cf_cv_link_dataonly+set}" = set; then
21441   echo $ECHO_N "(cached) $ECHO_C" >&6
21442 else
21443
21444         rm -f conftest.a
21445         cat >conftest.$ac_ext <<EOF
21446 #line 21446 "configure"
21447 int     testdata[3] = { 123, 456, 789 };
21448 EOF
21449         if { (eval echo "$as_me:21449: \"$ac_compile\"") >&5
21450   (eval $ac_compile) 2>&5
21451   ac_status=$?
21452   echo "$as_me:21452: \$? = $ac_status" >&5
21453   (exit "$ac_status"); } ; then
21454                 mv conftest.o data.o && \
21455                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21456         fi
21457         rm -f conftest.$ac_ext data.o
21458         cat >conftest.$ac_ext <<EOF
21459 #line 21459 "configure"
21460 int     testfunc(void)
21461 {
21462 #if defined(NeXT)
21463         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21464 #else
21465         extern int testdata[3];
21466         return testdata[0] == 123
21467            &&  testdata[1] == 456
21468            &&  testdata[2] == 789;
21469 #endif
21470 }
21471 EOF
21472         if { (eval echo "$as_me:21472: \"$ac_compile\"") >&5
21473   (eval $ac_compile) 2>&5
21474   ac_status=$?
21475   echo "$as_me:21475: \$? = $ac_status" >&5
21476   (exit "$ac_status"); }; then
21477                 mv conftest.o func.o && \
21478                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21479         fi
21480         rm -f conftest.$ac_ext func.o
21481         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21482         cf_saveLIBS="$LIBS"
21483         LIBS="conftest.a $LIBS"
21484         if test "$cross_compiling" = yes; then
21485   cf_cv_link_dataonly=unknown
21486 else
21487   cat >"conftest.$ac_ext" <<_ACEOF
21488 #line 21488 "configure"
21489 #include "confdefs.h"
21490
21491         int main(void)
21492         {
21493                 extern int testfunc();
21494                 ${cf_cv_main_return:-return} (!testfunc());
21495         }
21496
21497 _ACEOF
21498 rm -f "conftest$ac_exeext"
21499 if { (eval echo "$as_me:21499: \"$ac_link\"") >&5
21500   (eval $ac_link) 2>&5
21501   ac_status=$?
21502   echo "$as_me:21502: \$? = $ac_status" >&5
21503   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21504   { (eval echo "$as_me:21504: \"$ac_try\"") >&5
21505   (eval $ac_try) 2>&5
21506   ac_status=$?
21507   echo "$as_me:21507: \$? = $ac_status" >&5
21508   (exit "$ac_status"); }; }; then
21509   cf_cv_link_dataonly=yes
21510 else
21511   echo "$as_me: program exited with status $ac_status" >&5
21512 echo "$as_me: failed program was:" >&5
21513 cat "conftest.$ac_ext" >&5
21514 cf_cv_link_dataonly=no
21515 fi
21516 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21517 fi
21518         LIBS="$cf_saveLIBS"
21519
21520 fi
21521
21522 echo "$as_me:21522: result: $cf_cv_link_dataonly" >&5
21523 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21524
21525 if test "$cf_cv_link_dataonly" = no ; then
21526
21527 cat >>confdefs.h <<\EOF
21528 #define BROKEN_LINKER 1
21529 EOF
21530
21531         BROKEN_LINKER=1
21532 fi
21533
21534 ###     Checks for library functions.
21535
21536 echo "$as_me:21536: checking for clock_gettime" >&5
21537 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21538 if test "${cf_cv_func_clock_gettime+set}" = set; then
21539   echo $ECHO_N "(cached) $ECHO_C" >&6
21540 else
21541
21542                 cat >"conftest.$ac_ext" <<_ACEOF
21543 #line 21543 "configure"
21544 #include "confdefs.h"
21545 #include <time.h>
21546 int
21547 main (void)
21548 {
21549 struct timespec ts;
21550                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21551   ;
21552   return 0;
21553 }
21554 _ACEOF
21555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21556 if { (eval echo "$as_me:21556: \"$ac_link\"") >&5
21557   (eval $ac_link) 2>&5
21558   ac_status=$?
21559   echo "$as_me:21559: \$? = $ac_status" >&5
21560   (exit "$ac_status"); } &&
21561          { ac_try='test -s "conftest$ac_exeext"'
21562   { (eval echo "$as_me:21562: \"$ac_try\"") >&5
21563   (eval $ac_try) 2>&5
21564   ac_status=$?
21565   echo "$as_me:21565: \$? = $ac_status" >&5
21566   (exit "$ac_status"); }; }; then
21567   cf_cv_func_clock_gettime=yes
21568 else
21569   echo "$as_me: failed program was:" >&5
21570 cat "conftest.$ac_ext" >&5
21571 cf_cv_func_clock_gettime=no
21572 fi
21573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21574
21575 fi
21576 echo "$as_me:21576: result: $cf_cv_func_clock_gettime" >&5
21577 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21578
21579 if test "$cf_cv_func_clock_gettime" = yes
21580 then
21581
21582 cat >>confdefs.h <<\EOF
21583 #define HAVE_CLOCK_GETTIME 1
21584 EOF
21585
21586 else
21587 echo "$as_me:21587: checking for gettimeofday" >&5
21588 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21589 if test "${ac_cv_func_gettimeofday+set}" = set; then
21590   echo $ECHO_N "(cached) $ECHO_C" >&6
21591 else
21592   cat >"conftest.$ac_ext" <<_ACEOF
21593 #line 21593 "configure"
21594 #include "confdefs.h"
21595 #define gettimeofday autoconf_temporary
21596 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21597 #undef gettimeofday
21598
21599 #ifdef __cplusplus
21600 extern "C"
21601 #endif
21602
21603 /* We use char because int might match the return type of a gcc2
21604    builtin and then its argument prototype would still apply.  */
21605 char gettimeofday (void);
21606
21607 int
21608 main (void)
21609 {
21610
21611 /* The GNU C library defines stubs for functions which it implements
21612     to always fail with ENOSYS.  Some functions are actually named
21613     something starting with __ and the normal name is an alias.  */
21614 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21615 #error found stub for gettimeofday
21616 #endif
21617
21618         return gettimeofday ();
21619   ;
21620   return 0;
21621 }
21622 _ACEOF
21623 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21624 if { (eval echo "$as_me:21624: \"$ac_link\"") >&5
21625   (eval $ac_link) 2>&5
21626   ac_status=$?
21627   echo "$as_me:21627: \$? = $ac_status" >&5
21628   (exit "$ac_status"); } &&
21629          { ac_try='test -s "conftest$ac_exeext"'
21630   { (eval echo "$as_me:21630: \"$ac_try\"") >&5
21631   (eval $ac_try) 2>&5
21632   ac_status=$?
21633   echo "$as_me:21633: \$? = $ac_status" >&5
21634   (exit "$ac_status"); }; }; then
21635   ac_cv_func_gettimeofday=yes
21636 else
21637   echo "$as_me: failed program was:" >&5
21638 cat "conftest.$ac_ext" >&5
21639 ac_cv_func_gettimeofday=no
21640 fi
21641 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21642 fi
21643 echo "$as_me:21643: result: $ac_cv_func_gettimeofday" >&5
21644 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21645 if test "$ac_cv_func_gettimeofday" = yes; then
21646
21647 cat >>confdefs.h <<\EOF
21648 #define HAVE_GETTIMEOFDAY 1
21649 EOF
21650
21651 else
21652
21653 echo "$as_me:21653: checking for gettimeofday in -lbsd" >&5
21654 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21655 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21656   echo $ECHO_N "(cached) $ECHO_C" >&6
21657 else
21658   ac_check_lib_save_LIBS=$LIBS
21659 LIBS="-lbsd  $LIBS"
21660 cat >"conftest.$ac_ext" <<_ACEOF
21661 #line 21661 "configure"
21662 #include "confdefs.h"
21663
21664 /* Override any gcc2 internal prototype to avoid an error.  */
21665 #ifdef __cplusplus
21666 extern "C"
21667 #endif
21668 /* We use char because int might match the return type of a gcc2
21669    builtin and then its argument prototype would still apply.  */
21670 char gettimeofday ();
21671 int
21672 main (void)
21673 {
21674 gettimeofday ();
21675   ;
21676   return 0;
21677 }
21678 _ACEOF
21679 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21680 if { (eval echo "$as_me:21680: \"$ac_link\"") >&5
21681   (eval $ac_link) 2>&5
21682   ac_status=$?
21683   echo "$as_me:21683: \$? = $ac_status" >&5
21684   (exit "$ac_status"); } &&
21685          { ac_try='test -s "conftest$ac_exeext"'
21686   { (eval echo "$as_me:21686: \"$ac_try\"") >&5
21687   (eval $ac_try) 2>&5
21688   ac_status=$?
21689   echo "$as_me:21689: \$? = $ac_status" >&5
21690   (exit "$ac_status"); }; }; then
21691   ac_cv_lib_bsd_gettimeofday=yes
21692 else
21693   echo "$as_me: failed program was:" >&5
21694 cat "conftest.$ac_ext" >&5
21695 ac_cv_lib_bsd_gettimeofday=no
21696 fi
21697 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21698 LIBS=$ac_check_lib_save_LIBS
21699 fi
21700 echo "$as_me:21700: result: $ac_cv_lib_bsd_gettimeofday" >&5
21701 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21702 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21703
21704 cat >>confdefs.h <<\EOF
21705 #define HAVE_GETTIMEOFDAY 1
21706 EOF
21707
21708 cf_add_libs="$LIBS"
21709 # reverse order
21710 cf_add_0lib=
21711 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21712 # filter duplicates
21713 for cf_add_1lib in $cf_add_0lib; do
21714         for cf_add_2lib in $cf_add_libs; do
21715                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21716                         cf_add_1lib=
21717                         break
21718                 fi
21719         done
21720         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21721 done
21722 LIBS="$cf_add_libs"
21723
21724 fi
21725
21726 fi
21727 fi
21728
21729 for ac_func in \
21730 fpathconf \
21731 getcwd \
21732 getauxval \
21733 getegid \
21734 geteuid \
21735 getopt \
21736 getuid \
21737 issetugid \
21738 localeconv \
21739 poll \
21740 putenv \
21741 remove \
21742 select \
21743 setbuf \
21744 setbuffer \
21745 setenv \
21746 setfsuid \
21747 setvbuf \
21748 sigaction \
21749 sigvec \
21750 snprintf \
21751 strdup \
21752 strstr \
21753 sysconf \
21754 tcgetpgrp \
21755 times \
21756 tsearch \
21757 vsnprintf \
21758
21759 do
21760 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21761 echo "$as_me:21761: checking for $ac_func" >&5
21762 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21763 if eval "test \"\${$as_ac_var+set}\" = set"; then
21764   echo $ECHO_N "(cached) $ECHO_C" >&6
21765 else
21766   cat >"conftest.$ac_ext" <<_ACEOF
21767 #line 21767 "configure"
21768 #include "confdefs.h"
21769 #define $ac_func autoconf_temporary
21770 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21771 #undef $ac_func
21772
21773 #ifdef __cplusplus
21774 extern "C"
21775 #endif
21776
21777 /* We use char because int might match the return type of a gcc2
21778    builtin and then its argument prototype would still apply.  */
21779 char $ac_func (void);
21780
21781 int
21782 main (void)
21783 {
21784
21785 /* The GNU C library defines stubs for functions which it implements
21786     to always fail with ENOSYS.  Some functions are actually named
21787     something starting with __ and the normal name is an alias.  */
21788 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21789 #error found stub for $ac_func
21790 #endif
21791
21792         return $ac_func ();
21793   ;
21794   return 0;
21795 }
21796 _ACEOF
21797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21798 if { (eval echo "$as_me:21798: \"$ac_link\"") >&5
21799   (eval $ac_link) 2>&5
21800   ac_status=$?
21801   echo "$as_me:21801: \$? = $ac_status" >&5
21802   (exit "$ac_status"); } &&
21803          { ac_try='test -s "conftest$ac_exeext"'
21804   { (eval echo "$as_me:21804: \"$ac_try\"") >&5
21805   (eval $ac_try) 2>&5
21806   ac_status=$?
21807   echo "$as_me:21807: \$? = $ac_status" >&5
21808   (exit "$ac_status"); }; }; then
21809   eval "$as_ac_var=yes"
21810 else
21811   echo "$as_me: failed program was:" >&5
21812 cat "conftest.$ac_ext" >&5
21813 eval "$as_ac_var=no"
21814 fi
21815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21816 fi
21817 echo "$as_me:21817: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21818 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21819 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21820   cat >>confdefs.h <<EOF
21821 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21822 EOF
21823
21824 fi
21825 done
21826
21827 echo "$as_me:21827: checking if _PATH_TTYS is defined in ttyent.h" >&5
21828 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21829 if test "${cf_cv_PATH_TTYS+set}" = set; then
21830   echo $ECHO_N "(cached) $ECHO_C" >&6
21831 else
21832
21833 cat >"conftest.$ac_ext" <<_ACEOF
21834 #line 21834 "configure"
21835 #include "confdefs.h"
21836
21837 #include <stdio.h>
21838 #include <ttyent.h>
21839 int
21840 main (void)
21841 {
21842
21843 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21844   ;
21845   return 0;
21846 }
21847 _ACEOF
21848 rm -f "conftest.$ac_objext"
21849 if { (eval echo "$as_me:21849: \"$ac_compile\"") >&5
21850   (eval $ac_compile) 2>&5
21851   ac_status=$?
21852   echo "$as_me:21852: \$? = $ac_status" >&5
21853   (exit "$ac_status"); } &&
21854          { ac_try='test -s "conftest.$ac_objext"'
21855   { (eval echo "$as_me:21855: \"$ac_try\"") >&5
21856   (eval $ac_try) 2>&5
21857   ac_status=$?
21858   echo "$as_me:21858: \$? = $ac_status" >&5
21859   (exit "$ac_status"); }; }; then
21860   cf_cv_PATH_TTYS=yes
21861 else
21862   echo "$as_me: failed program was:" >&5
21863 cat "conftest.$ac_ext" >&5
21864 cf_cv_PATH_TTYS=no
21865 fi
21866 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21867 fi
21868 echo "$as_me:21868: result: $cf_cv_PATH_TTYS" >&5
21869 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21870
21871 if test $cf_cv_PATH_TTYS = no
21872 then
21873         for cf_ttys in /etc/ttytype /etc/ttys
21874         do
21875                 if test -f $cf_ttys
21876                 then
21877                         cf_cv_PATH_TTYS=maybe
21878
21879 cat >>confdefs.h <<\EOF
21880 #define _PATH_TTYS $cf_ttys
21881 EOF
21882
21883                         break
21884                 fi
21885         done
21886 fi
21887
21888 if test $cf_cv_PATH_TTYS != no
21889 then
21890         echo "$as_me:21890: checking if _PATH_TTYS file exists" >&5
21891 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21892 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21893   echo $ECHO_N "(cached) $ECHO_C" >&6
21894 else
21895
21896                 if test "$cross_compiling" = yes; then
21897   cf_cv_have_PATH_TTYS=unknown
21898 else
21899   cat >"conftest.$ac_ext" <<_ACEOF
21900 #line 21900 "configure"
21901 #include "confdefs.h"
21902
21903 $ac_includes_default
21904
21905 #include <ttyent.h>
21906
21907 int main(void) {
21908         FILE *fp = fopen(_PATH_TTYS, "r");
21909         ${cf_cv_main_return:-return} (fp == 0);
21910 }
21911 _ACEOF
21912 rm -f "conftest$ac_exeext"
21913 if { (eval echo "$as_me:21913: \"$ac_link\"") >&5
21914   (eval $ac_link) 2>&5
21915   ac_status=$?
21916   echo "$as_me:21916: \$? = $ac_status" >&5
21917   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21918   { (eval echo "$as_me:21918: \"$ac_try\"") >&5
21919   (eval $ac_try) 2>&5
21920   ac_status=$?
21921   echo "$as_me:21921: \$? = $ac_status" >&5
21922   (exit "$ac_status"); }; }; then
21923   cf_cv_have_PATH_TTYS=yes
21924 else
21925   echo "$as_me: program exited with status $ac_status" >&5
21926 echo "$as_me: failed program was:" >&5
21927 cat "conftest.$ac_ext" >&5
21928 cf_cv_have_PATH_TTYS=no
21929 fi
21930 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21931 fi
21932 fi
21933 echo "$as_me:21933: result: $cf_cv_have_PATH_TTYS" >&5
21934 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21935         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21936 fi
21937
21938 if test $cf_cv_PATH_TTYS != no
21939 then
21940
21941 cat >>confdefs.h <<\EOF
21942 #define HAVE_PATH_TTYS 1
21943 EOF
21944
21945         echo "$as_me:21945: checking for getttynam" >&5
21946 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21947 if test "${cf_cv_func_getttynam+set}" = set; then
21948   echo $ECHO_N "(cached) $ECHO_C" >&6
21949 else
21950
21951                 cat >"conftest.$ac_ext" <<_ACEOF
21952 #line 21952 "configure"
21953 #include "confdefs.h"
21954 #include <ttyent.h>
21955 int
21956 main (void)
21957 {
21958 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21959   ;
21960   return 0;
21961 }
21962 _ACEOF
21963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21964 if { (eval echo "$as_me:21964: \"$ac_link\"") >&5
21965   (eval $ac_link) 2>&5
21966   ac_status=$?
21967   echo "$as_me:21967: \$? = $ac_status" >&5
21968   (exit "$ac_status"); } &&
21969          { ac_try='test -s "conftest$ac_exeext"'
21970   { (eval echo "$as_me:21970: \"$ac_try\"") >&5
21971   (eval $ac_try) 2>&5
21972   ac_status=$?
21973   echo "$as_me:21973: \$? = $ac_status" >&5
21974   (exit "$ac_status"); }; }; then
21975   cf_cv_func_getttynam=yes
21976 else
21977   echo "$as_me: failed program was:" >&5
21978 cat "conftest.$ac_ext" >&5
21979 cf_cv_func_getttynam=no
21980 fi
21981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21982 fi
21983 echo "$as_me:21983: result: $cf_cv_func_getttynam" >&5
21984 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21985         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21986 #define HAVE_GETTTYNAM 1
21987 EOF
21988
21989 fi
21990
21991 if test "x$ac_cv_func_getopt" = xno && \
21992    test "x$cf_with_progs$cf_with_tests" != xnono; then
21993         { { echo "$as_me:21993: error: getopt is required for building programs" >&5
21994 echo "$as_me: error: getopt is required for building programs" >&2;}
21995    { (exit 1); exit 1; }; }
21996 fi
21997
21998 if test "x$with_safe_sprintf" = xyes
21999 then
22000         if test "x$ac_cv_func_vsnprintf" = xyes
22001         then
22002                 { echo "$as_me:22002: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22003 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22004         else
22005
22006 cat >>confdefs.h <<\EOF
22007 #define USE_SAFE_SPRINTF 1
22008 EOF
22009
22010         fi
22011 fi
22012
22013 if test "x$with_getcap" = "xyes" ; then
22014
22015 echo "$as_me:22015: checking for terminal-capability database functions" >&5
22016 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22017 if test "${cf_cv_cgetent+set}" = set; then
22018   echo $ECHO_N "(cached) $ECHO_C" >&6
22019 else
22020
22021 cat >"conftest.$ac_ext" <<_ACEOF
22022 #line 22022 "configure"
22023 #include "confdefs.h"
22024
22025 $ac_includes_default
22026 int
22027 main (void)
22028 {
22029
22030         char temp[128];
22031         char *buf = temp;
22032         char *db_array = temp;
22033         cgetent(&buf, &db_array, "vt100");
22034         cgetcap(buf, "tc", '=');
22035         cgetmatch(buf, "tc");
22036
22037   ;
22038   return 0;
22039 }
22040 _ACEOF
22041 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22042 if { (eval echo "$as_me:22042: \"$ac_link\"") >&5
22043   (eval $ac_link) 2>&5
22044   ac_status=$?
22045   echo "$as_me:22045: \$? = $ac_status" >&5
22046   (exit "$ac_status"); } &&
22047          { ac_try='test -s "conftest$ac_exeext"'
22048   { (eval echo "$as_me:22048: \"$ac_try\"") >&5
22049   (eval $ac_try) 2>&5
22050   ac_status=$?
22051   echo "$as_me:22051: \$? = $ac_status" >&5
22052   (exit "$ac_status"); }; }; then
22053   cf_cv_cgetent=yes
22054 else
22055   echo "$as_me: failed program was:" >&5
22056 cat "conftest.$ac_ext" >&5
22057 cf_cv_cgetent=no
22058 fi
22059 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22060
22061 fi
22062 echo "$as_me:22062: result: $cf_cv_cgetent" >&5
22063 echo "${ECHO_T}$cf_cv_cgetent" >&6
22064
22065 if test "$cf_cv_cgetent" = yes
22066 then
22067
22068 cat >>confdefs.h <<\EOF
22069 #define HAVE_BSD_CGETENT 1
22070 EOF
22071
22072 echo "$as_me:22072: checking if cgetent uses const parameter" >&5
22073 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22074 if test "${cf_cv_cgetent_const+set}" = set; then
22075   echo $ECHO_N "(cached) $ECHO_C" >&6
22076 else
22077
22078 cat >"conftest.$ac_ext" <<_ACEOF
22079 #line 22079 "configure"
22080 #include "confdefs.h"
22081
22082 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22083 $ac_includes_default
22084 int
22085 main (void)
22086 {
22087
22088         char temp[128];
22089         char *buf = temp;
22090 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22091         const char *db_array = temp;
22092         cgetent(&buf, &db_array, "vt100");
22093 #endif
22094         cgetcap(buf, "tc", '=');
22095         cgetmatch(buf, "tc");
22096
22097   ;
22098   return 0;
22099 }
22100 _ACEOF
22101 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22102 if { (eval echo "$as_me:22102: \"$ac_link\"") >&5
22103   (eval $ac_link) 2>&5
22104   ac_status=$?
22105   echo "$as_me:22105: \$? = $ac_status" >&5
22106   (exit "$ac_status"); } &&
22107          { ac_try='test -s "conftest$ac_exeext"'
22108   { (eval echo "$as_me:22108: \"$ac_try\"") >&5
22109   (eval $ac_try) 2>&5
22110   ac_status=$?
22111   echo "$as_me:22111: \$? = $ac_status" >&5
22112   (exit "$ac_status"); }; }; then
22113   cf_cv_cgetent_const=yes
22114 else
22115   echo "$as_me: failed program was:" >&5
22116 cat "conftest.$ac_ext" >&5
22117 cf_cv_cgetent_const=no
22118 fi
22119 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22120
22121 fi
22122 echo "$as_me:22122: result: $cf_cv_cgetent_const" >&5
22123 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22124         if test "$cf_cv_cgetent_const" = yes
22125         then
22126
22127 cat >>confdefs.h <<EOF
22128 #define CGETENT_CONST const
22129 EOF
22130
22131         fi
22132 fi
22133
22134 fi
22135
22136 echo "$as_me:22136: checking for isascii" >&5
22137 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22138 if test "${cf_cv_have_isascii+set}" = set; then
22139   echo $ECHO_N "(cached) $ECHO_C" >&6
22140 else
22141
22142         cat >"conftest.$ac_ext" <<_ACEOF
22143 #line 22143 "configure"
22144 #include "confdefs.h"
22145 #include <ctype.h>
22146 int
22147 main (void)
22148 {
22149 int x = isascii(' ')
22150   ;
22151   return 0;
22152 }
22153 _ACEOF
22154 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22155 if { (eval echo "$as_me:22155: \"$ac_link\"") >&5
22156   (eval $ac_link) 2>&5
22157   ac_status=$?
22158   echo "$as_me:22158: \$? = $ac_status" >&5
22159   (exit "$ac_status"); } &&
22160          { ac_try='test -s "conftest$ac_exeext"'
22161   { (eval echo "$as_me:22161: \"$ac_try\"") >&5
22162   (eval $ac_try) 2>&5
22163   ac_status=$?
22164   echo "$as_me:22164: \$? = $ac_status" >&5
22165   (exit "$ac_status"); }; }; then
22166   cf_cv_have_isascii=yes
22167 else
22168   echo "$as_me: failed program was:" >&5
22169 cat "conftest.$ac_ext" >&5
22170 cf_cv_have_isascii=no
22171 fi
22172 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22173
22174 fi
22175 echo "$as_me:22175: result: $cf_cv_have_isascii" >&5
22176 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22177 test "$cf_cv_have_isascii" = yes &&
22178 cat >>confdefs.h <<\EOF
22179 #define HAVE_ISASCII 1
22180 EOF
22181
22182 if test "$ac_cv_func_sigaction" = yes; then
22183 echo "$as_me:22183: checking whether sigaction needs _POSIX_SOURCE" >&5
22184 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22185 cat >"conftest.$ac_ext" <<_ACEOF
22186 #line 22186 "configure"
22187 #include "confdefs.h"
22188
22189 #include <sys/types.h>
22190 #include <signal.h>
22191 int
22192 main (void)
22193 {
22194 struct sigaction act
22195   ;
22196   return 0;
22197 }
22198 _ACEOF
22199 rm -f "conftest.$ac_objext"
22200 if { (eval echo "$as_me:22200: \"$ac_compile\"") >&5
22201   (eval $ac_compile) 2>&5
22202   ac_status=$?
22203   echo "$as_me:22203: \$? = $ac_status" >&5
22204   (exit "$ac_status"); } &&
22205          { ac_try='test -s "conftest.$ac_objext"'
22206   { (eval echo "$as_me:22206: \"$ac_try\"") >&5
22207   (eval $ac_try) 2>&5
22208   ac_status=$?
22209   echo "$as_me:22209: \$? = $ac_status" >&5
22210   (exit "$ac_status"); }; }; then
22211   sigact_bad=no
22212 else
22213   echo "$as_me: failed program was:" >&5
22214 cat "conftest.$ac_ext" >&5
22215
22216 cat >"conftest.$ac_ext" <<_ACEOF
22217 #line 22217 "configure"
22218 #include "confdefs.h"
22219
22220 #define _POSIX_SOURCE
22221 #include <sys/types.h>
22222 #include <signal.h>
22223 int
22224 main (void)
22225 {
22226 struct sigaction act
22227   ;
22228   return 0;
22229 }
22230 _ACEOF
22231 rm -f "conftest.$ac_objext"
22232 if { (eval echo "$as_me:22232: \"$ac_compile\"") >&5
22233   (eval $ac_compile) 2>&5
22234   ac_status=$?
22235   echo "$as_me:22235: \$? = $ac_status" >&5
22236   (exit "$ac_status"); } &&
22237          { ac_try='test -s "conftest.$ac_objext"'
22238   { (eval echo "$as_me:22238: \"$ac_try\"") >&5
22239   (eval $ac_try) 2>&5
22240   ac_status=$?
22241   echo "$as_me:22241: \$? = $ac_status" >&5
22242   (exit "$ac_status"); }; }; then
22243   sigact_bad=yes
22244
22245 cat >>confdefs.h <<\EOF
22246 #define _POSIX_SOURCE 1
22247 EOF
22248
22249 else
22250   echo "$as_me: failed program was:" >&5
22251 cat "conftest.$ac_ext" >&5
22252 sigact_bad=unknown
22253 fi
22254 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22255 fi
22256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22257 echo "$as_me:22257: result: $sigact_bad" >&5
22258 echo "${ECHO_T}$sigact_bad" >&6
22259 fi
22260
22261 echo "$as_me:22261: checking if nanosleep really works" >&5
22262 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22263 if test "${cf_cv_func_nanosleep+set}" = set; then
22264   echo $ECHO_N "(cached) $ECHO_C" >&6
22265 else
22266
22267 if test "$cross_compiling" = yes; then
22268   cf_cv_func_nanosleep=unknown
22269 else
22270   cat >"conftest.$ac_ext" <<_ACEOF
22271 #line 22271 "configure"
22272 #include "confdefs.h"
22273
22274 $ac_includes_default
22275
22276 #include <errno.h>
22277 #include <time.h>
22278
22279 #ifdef HAVE_SYS_TIME_H
22280 #include <sys/time.h>
22281 #endif
22282
22283 int main(void) {
22284         struct timespec ts1, ts2;
22285         int code;
22286         ts1.tv_sec  = 0;
22287         ts1.tv_nsec = 750000000;
22288         ts2.tv_sec  = 0;
22289         ts2.tv_nsec = 0;
22290         errno = 0;
22291         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22292         ${cf_cv_main_return:-return}(code != 0);
22293 }
22294
22295 _ACEOF
22296 rm -f "conftest$ac_exeext"
22297 if { (eval echo "$as_me:22297: \"$ac_link\"") >&5
22298   (eval $ac_link) 2>&5
22299   ac_status=$?
22300   echo "$as_me:22300: \$? = $ac_status" >&5
22301   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22302   { (eval echo "$as_me:22302: \"$ac_try\"") >&5
22303   (eval $ac_try) 2>&5
22304   ac_status=$?
22305   echo "$as_me:22305: \$? = $ac_status" >&5
22306   (exit "$ac_status"); }; }; then
22307   cf_cv_func_nanosleep=yes
22308 else
22309   echo "$as_me: program exited with status $ac_status" >&5
22310 echo "$as_me: failed program was:" >&5
22311 cat "conftest.$ac_ext" >&5
22312 cf_cv_func_nanosleep=no
22313 fi
22314 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22315 fi
22316 fi
22317 echo "$as_me:22317: result: $cf_cv_func_nanosleep" >&5
22318 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22319
22320 test "$cf_cv_func_nanosleep" = "yes" &&
22321 cat >>confdefs.h <<\EOF
22322 #define HAVE_NANOSLEEP 1
22323 EOF
22324
22325 for ac_header in \
22326 termio.h \
22327 termios.h \
22328 unistd.h \
22329 sys/ioctl.h \
22330 sys/termio.h \
22331
22332 do
22333 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22334 echo "$as_me:22334: checking for $ac_header" >&5
22335 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22336 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22337   echo $ECHO_N "(cached) $ECHO_C" >&6
22338 else
22339   cat >"conftest.$ac_ext" <<_ACEOF
22340 #line 22340 "configure"
22341 #include "confdefs.h"
22342 #include <$ac_header>
22343 _ACEOF
22344 if { (eval echo "$as_me:22344: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22345   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22346   ac_status=$?
22347   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22348   rm -f conftest.er1
22349   cat conftest.err >&5
22350   echo "$as_me:22350: \$? = $ac_status" >&5
22351   (exit "$ac_status"); } >/dev/null; then
22352   if test -s conftest.err; then
22353     ac_cpp_err=$ac_c_preproc_warn_flag
22354   else
22355     ac_cpp_err=
22356   fi
22357 else
22358   ac_cpp_err=yes
22359 fi
22360 if test -z "$ac_cpp_err"; then
22361   eval "$as_ac_Header=yes"
22362 else
22363   echo "$as_me: failed program was:" >&5
22364   cat "conftest.$ac_ext" >&5
22365   eval "$as_ac_Header=no"
22366 fi
22367 rm -f conftest.err "conftest.$ac_ext"
22368 fi
22369 echo "$as_me:22369: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22370 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22371 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22372   cat >>confdefs.h <<EOF
22373 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22374 EOF
22375
22376 fi
22377 done
22378
22379 if test "$ac_cv_header_termios_h" = yes ; then
22380         case "$CFLAGS $CPPFLAGS" in
22381         (*-D_POSIX_SOURCE*)
22382                 termios_bad=dunno ;;
22383         (*)     termios_bad=maybe ;;
22384         esac
22385         if test "$termios_bad" = maybe ; then
22386         echo "$as_me:22386: checking whether termios.h needs _POSIX_SOURCE" >&5
22387 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22388         cat >"conftest.$ac_ext" <<_ACEOF
22389 #line 22389 "configure"
22390 #include "confdefs.h"
22391 #include <termios.h>
22392 int
22393 main (void)
22394 {
22395 struct termios foo; int x = foo.c_iflag = 1; (void)x
22396   ;
22397   return 0;
22398 }
22399 _ACEOF
22400 rm -f "conftest.$ac_objext"
22401 if { (eval echo "$as_me:22401: \"$ac_compile\"") >&5
22402   (eval $ac_compile) 2>&5
22403   ac_status=$?
22404   echo "$as_me:22404: \$? = $ac_status" >&5
22405   (exit "$ac_status"); } &&
22406          { ac_try='test -s "conftest.$ac_objext"'
22407   { (eval echo "$as_me:22407: \"$ac_try\"") >&5
22408   (eval $ac_try) 2>&5
22409   ac_status=$?
22410   echo "$as_me:22410: \$? = $ac_status" >&5
22411   (exit "$ac_status"); }; }; then
22412   termios_bad=no
22413 else
22414   echo "$as_me: failed program was:" >&5
22415 cat "conftest.$ac_ext" >&5
22416
22417                 cat >"conftest.$ac_ext" <<_ACEOF
22418 #line 22418 "configure"
22419 #include "confdefs.h"
22420
22421 #define _POSIX_SOURCE
22422 #include <termios.h>
22423 int
22424 main (void)
22425 {
22426 struct termios foo; int x = foo.c_iflag = 2; (void)x
22427   ;
22428   return 0;
22429 }
22430 _ACEOF
22431 rm -f "conftest.$ac_objext"
22432 if { (eval echo "$as_me:22432: \"$ac_compile\"") >&5
22433   (eval $ac_compile) 2>&5
22434   ac_status=$?
22435   echo "$as_me:22435: \$? = $ac_status" >&5
22436   (exit "$ac_status"); } &&
22437          { ac_try='test -s "conftest.$ac_objext"'
22438   { (eval echo "$as_me:22438: \"$ac_try\"") >&5
22439   (eval $ac_try) 2>&5
22440   ac_status=$?
22441   echo "$as_me:22441: \$? = $ac_status" >&5
22442   (exit "$ac_status"); }; }; then
22443   termios_bad=unknown
22444 else
22445   echo "$as_me: failed program was:" >&5
22446 cat "conftest.$ac_ext" >&5
22447 termios_bad=yes
22448 cat >>confdefs.h <<\EOF
22449 #define _POSIX_SOURCE 1
22450 EOF
22451
22452 fi
22453 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22454
22455 fi
22456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22457         echo "$as_me:22457: result: $termios_bad" >&5
22458 echo "${ECHO_T}$termios_bad" >&6
22459         fi
22460 fi
22461
22462 echo "$as_me:22462: checking for tcgetattr" >&5
22463 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22464 if test "${cf_cv_have_tcgetattr+set}" = set; then
22465   echo $ECHO_N "(cached) $ECHO_C" >&6
22466 else
22467
22468 cat >"conftest.$ac_ext" <<_ACEOF
22469 #line 22469 "configure"
22470 #include "confdefs.h"
22471
22472 #include <sys/types.h>
22473 #ifdef HAVE_UNISTD_H
22474 #include <unistd.h>
22475 #endif
22476 #ifdef HAVE_TERMIOS_H
22477 #include <termios.h>
22478 #define TTY struct termios
22479 #else
22480 #ifdef HAVE_TERMIO_H
22481 #include <termio.h>
22482 #define TTY struct termio
22483 #endif
22484 #endif
22485
22486 int
22487 main (void)
22488 {
22489
22490 TTY foo;
22491 tcgetattr(1, &foo);
22492   ;
22493   return 0;
22494 }
22495 _ACEOF
22496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22497 if { (eval echo "$as_me:22497: \"$ac_link\"") >&5
22498   (eval $ac_link) 2>&5
22499   ac_status=$?
22500   echo "$as_me:22500: \$? = $ac_status" >&5
22501   (exit "$ac_status"); } &&
22502          { ac_try='test -s "conftest$ac_exeext"'
22503   { (eval echo "$as_me:22503: \"$ac_try\"") >&5
22504   (eval $ac_try) 2>&5
22505   ac_status=$?
22506   echo "$as_me:22506: \$? = $ac_status" >&5
22507   (exit "$ac_status"); }; }; then
22508   cf_cv_have_tcgetattr=yes
22509 else
22510   echo "$as_me: failed program was:" >&5
22511 cat "conftest.$ac_ext" >&5
22512 cf_cv_have_tcgetattr=no
22513 fi
22514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22515 fi
22516 echo "$as_me:22516: result: $cf_cv_have_tcgetattr" >&5
22517 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22518 test "$cf_cv_have_tcgetattr" = yes &&
22519 cat >>confdefs.h <<\EOF
22520 #define HAVE_TCGETATTR 1
22521 EOF
22522
22523 echo "$as_me:22523: checking for vsscanf function or workaround" >&5
22524 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22525 if test "${cf_cv_func_vsscanf+set}" = set; then
22526   echo $ECHO_N "(cached) $ECHO_C" >&6
22527 else
22528
22529 cat >"conftest.$ac_ext" <<_ACEOF
22530 #line 22530 "configure"
22531 #include "confdefs.h"
22532
22533 #include <stdarg.h>
22534 #include <stdio.h>
22535 int
22536 main (void)
22537 {
22538
22539         va_list ap;
22540         vsscanf("from", "%d", ap)
22541   ;
22542   return 0;
22543 }
22544 _ACEOF
22545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22546 if { (eval echo "$as_me:22546: \"$ac_link\"") >&5
22547   (eval $ac_link) 2>&5
22548   ac_status=$?
22549   echo "$as_me:22549: \$? = $ac_status" >&5
22550   (exit "$ac_status"); } &&
22551          { ac_try='test -s "conftest$ac_exeext"'
22552   { (eval echo "$as_me:22552: \"$ac_try\"") >&5
22553   (eval $ac_try) 2>&5
22554   ac_status=$?
22555   echo "$as_me:22555: \$? = $ac_status" >&5
22556   (exit "$ac_status"); }; }; then
22557   cf_cv_func_vsscanf=vsscanf
22558 else
22559   echo "$as_me: failed program was:" >&5
22560 cat "conftest.$ac_ext" >&5
22561
22562 cat >"conftest.$ac_ext" <<_ACEOF
22563 #line 22563 "configure"
22564 #include "confdefs.h"
22565
22566 #include <stdarg.h>
22567 #include <stdio.h>
22568 int
22569 main (void)
22570 {
22571
22572         FILE strbuf;
22573         char *str = "from";
22574
22575         strbuf._flag = _IOREAD;
22576         strbuf._ptr = strbuf._base = (unsigned char *) str;
22577         strbuf._cnt = strlen(str);
22578         strbuf._file = _NFILE;
22579         return (vfscanf(&strbuf, "%d", ap))
22580   ;
22581   return 0;
22582 }
22583 _ACEOF
22584 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22585 if { (eval echo "$as_me:22585: \"$ac_link\"") >&5
22586   (eval $ac_link) 2>&5
22587   ac_status=$?
22588   echo "$as_me:22588: \$? = $ac_status" >&5
22589   (exit "$ac_status"); } &&
22590          { ac_try='test -s "conftest$ac_exeext"'
22591   { (eval echo "$as_me:22591: \"$ac_try\"") >&5
22592   (eval $ac_try) 2>&5
22593   ac_status=$?
22594   echo "$as_me:22594: \$? = $ac_status" >&5
22595   (exit "$ac_status"); }; }; then
22596   cf_cv_func_vsscanf=vfscanf
22597 else
22598   echo "$as_me: failed program was:" >&5
22599 cat "conftest.$ac_ext" >&5
22600
22601 cat >"conftest.$ac_ext" <<_ACEOF
22602 #line 22602 "configure"
22603 #include "confdefs.h"
22604
22605 #include <stdarg.h>
22606 #include <stdio.h>
22607 int
22608 main (void)
22609 {
22610
22611         FILE strbuf;
22612         char *str = "from";
22613
22614         strbuf._flag = _IOREAD;
22615         strbuf._ptr = strbuf._base = (unsigned char *) str;
22616         strbuf._cnt = strlen(str);
22617         strbuf._file = _NFILE;
22618         return (_doscan(&strbuf, "%d", ap))
22619   ;
22620   return 0;
22621 }
22622 _ACEOF
22623 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22624 if { (eval echo "$as_me:22624: \"$ac_link\"") >&5
22625   (eval $ac_link) 2>&5
22626   ac_status=$?
22627   echo "$as_me:22627: \$? = $ac_status" >&5
22628   (exit "$ac_status"); } &&
22629          { ac_try='test -s "conftest$ac_exeext"'
22630   { (eval echo "$as_me:22630: \"$ac_try\"") >&5
22631   (eval $ac_try) 2>&5
22632   ac_status=$?
22633   echo "$as_me:22633: \$? = $ac_status" >&5
22634   (exit "$ac_status"); }; }; then
22635   cf_cv_func_vsscanf=_doscan
22636 else
22637   echo "$as_me: failed program was:" >&5
22638 cat "conftest.$ac_ext" >&5
22639
22640 cf_cv_func_vsscanf=no
22641 fi
22642 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22643 fi
22644 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22645 fi
22646 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22647 fi
22648 echo "$as_me:22648: result: $cf_cv_func_vsscanf" >&5
22649 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22650
22651 case "$cf_cv_func_vsscanf" in
22652 (vsscanf)
22653 cat >>confdefs.h <<\EOF
22654 #define HAVE_VSSCANF 1
22655 EOF
22656 ;;
22657 (vfscanf)
22658 cat >>confdefs.h <<\EOF
22659 #define HAVE_VFSCANF 1
22660 EOF
22661 ;;
22662 (_doscan)
22663 cat >>confdefs.h <<\EOF
22664 #define HAVE__DOSCAN 1
22665 EOF
22666 ;;
22667 esac
22668
22669 for ac_header in \
22670 unistd.h \
22671
22672 do
22673 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22674 echo "$as_me:22674: checking for $ac_header" >&5
22675 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22676 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22677   echo $ECHO_N "(cached) $ECHO_C" >&6
22678 else
22679   cat >"conftest.$ac_ext" <<_ACEOF
22680 #line 22680 "configure"
22681 #include "confdefs.h"
22682 #include <$ac_header>
22683 _ACEOF
22684 if { (eval echo "$as_me:22684: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22685   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22686   ac_status=$?
22687   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22688   rm -f conftest.er1
22689   cat conftest.err >&5
22690   echo "$as_me:22690: \$? = $ac_status" >&5
22691   (exit "$ac_status"); } >/dev/null; then
22692   if test -s conftest.err; then
22693     ac_cpp_err=$ac_c_preproc_warn_flag
22694   else
22695     ac_cpp_err=
22696   fi
22697 else
22698   ac_cpp_err=yes
22699 fi
22700 if test -z "$ac_cpp_err"; then
22701   eval "$as_ac_Header=yes"
22702 else
22703   echo "$as_me: failed program was:" >&5
22704   cat "conftest.$ac_ext" >&5
22705   eval "$as_ac_Header=no"
22706 fi
22707 rm -f conftest.err "conftest.$ac_ext"
22708 fi
22709 echo "$as_me:22709: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22710 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22711 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22712   cat >>confdefs.h <<EOF
22713 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22714 EOF
22715
22716 fi
22717 done
22718
22719 echo "$as_me:22719: checking for working mkstemp" >&5
22720 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22721 if test "${cf_cv_func_mkstemp+set}" = set; then
22722   echo $ECHO_N "(cached) $ECHO_C" >&6
22723 else
22724
22725 rm -rf ./conftest*
22726 if test "$cross_compiling" = yes; then
22727   cf_cv_func_mkstemp=maybe
22728 else
22729   cat >"conftest.$ac_ext" <<_ACEOF
22730 #line 22730 "configure"
22731 #include "confdefs.h"
22732
22733 $ac_includes_default
22734
22735 int main(void)
22736 {
22737         char *tmpl = "conftestXXXXXX";
22738         char name[2][80];
22739         int n;
22740         int result = 0;
22741         int fd;
22742         struct stat sb;
22743
22744         umask(077);
22745         for (n = 0; n < 2; ++n) {
22746                 strcpy(name[n], tmpl);
22747                 if ((fd = mkstemp(name[n])) >= 0) {
22748                         if (!strcmp(name[n], tmpl)
22749                          || stat(name[n], &sb) != 0
22750                          || (sb.st_mode & S_IFMT) != S_IFREG
22751                          || (sb.st_mode & 077) != 0) {
22752                                 result = 1;
22753                         }
22754                         close(fd);
22755                 }
22756         }
22757         if (result == 0
22758          && !strcmp(name[0], name[1]))
22759                 result = 1;
22760         ${cf_cv_main_return:-return}(result);
22761 }
22762
22763 _ACEOF
22764 rm -f "conftest$ac_exeext"
22765 if { (eval echo "$as_me:22765: \"$ac_link\"") >&5
22766   (eval $ac_link) 2>&5
22767   ac_status=$?
22768   echo "$as_me:22768: \$? = $ac_status" >&5
22769   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22770   { (eval echo "$as_me:22770: \"$ac_try\"") >&5
22771   (eval $ac_try) 2>&5
22772   ac_status=$?
22773   echo "$as_me:22773: \$? = $ac_status" >&5
22774   (exit "$ac_status"); }; }; then
22775   cf_cv_func_mkstemp=yes
22776
22777 else
22778   echo "$as_me: program exited with status $ac_status" >&5
22779 echo "$as_me: failed program was:" >&5
22780 cat "conftest.$ac_ext" >&5
22781 cf_cv_func_mkstemp=no
22782
22783 fi
22784 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22785 fi
22786
22787 fi
22788 echo "$as_me:22788: result: $cf_cv_func_mkstemp" >&5
22789 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22790 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22791         echo "$as_me:22791: checking for mkstemp" >&5
22792 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22793 if test "${ac_cv_func_mkstemp+set}" = set; then
22794   echo $ECHO_N "(cached) $ECHO_C" >&6
22795 else
22796   cat >"conftest.$ac_ext" <<_ACEOF
22797 #line 22797 "configure"
22798 #include "confdefs.h"
22799 #define mkstemp autoconf_temporary
22800 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22801 #undef mkstemp
22802
22803 #ifdef __cplusplus
22804 extern "C"
22805 #endif
22806
22807 /* We use char because int might match the return type of a gcc2
22808    builtin and then its argument prototype would still apply.  */
22809 char mkstemp (void);
22810
22811 int
22812 main (void)
22813 {
22814
22815 /* The GNU C library defines stubs for functions which it implements
22816     to always fail with ENOSYS.  Some functions are actually named
22817     something starting with __ and the normal name is an alias.  */
22818 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22819 #error found stub for mkstemp
22820 #endif
22821
22822         return mkstemp ();
22823   ;
22824   return 0;
22825 }
22826 _ACEOF
22827 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22828 if { (eval echo "$as_me:22828: \"$ac_link\"") >&5
22829   (eval $ac_link) 2>&5
22830   ac_status=$?
22831   echo "$as_me:22831: \$? = $ac_status" >&5
22832   (exit "$ac_status"); } &&
22833          { ac_try='test -s "conftest$ac_exeext"'
22834   { (eval echo "$as_me:22834: \"$ac_try\"") >&5
22835   (eval $ac_try) 2>&5
22836   ac_status=$?
22837   echo "$as_me:22837: \$? = $ac_status" >&5
22838   (exit "$ac_status"); }; }; then
22839   ac_cv_func_mkstemp=yes
22840 else
22841   echo "$as_me: failed program was:" >&5
22842 cat "conftest.$ac_ext" >&5
22843 ac_cv_func_mkstemp=no
22844 fi
22845 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22846 fi
22847 echo "$as_me:22847: result: $ac_cv_func_mkstemp" >&5
22848 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22849
22850 fi
22851 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22852
22853 cat >>confdefs.h <<\EOF
22854 #define HAVE_MKSTEMP 1
22855 EOF
22856
22857 fi
22858
22859 # setup for prototype of fallback for vsscanf()
22860
22861 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22862         HAVE_VSSCANF=1
22863 else
22864         HAVE_VSSCANF=0
22865 fi
22866
22867 if test "x$cross_compiling" = xyes ; then
22868         { echo "$as_me:22868: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22869 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22870 else
22871         echo "$as_me:22871: checking whether setvbuf arguments are reversed" >&5
22872 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22873 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22874   echo $ECHO_N "(cached) $ECHO_C" >&6
22875 else
22876   if test "$cross_compiling" = yes; then
22877   { { echo "$as_me:22877: error: cannot run test program while cross compiling" >&5
22878 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22879    { (exit 1); exit 1; }; }
22880 else
22881   cat >"conftest.$ac_ext" <<_ACEOF
22882 #line 22882 "configure"
22883 #include "confdefs.h"
22884 #include <stdio.h>
22885 /* If setvbuf has the reversed format, exit 0. */
22886 int
22887 main (void)
22888 {
22889   /* This call has the arguments reversed.
22890      A reversed system may check and see that the address of main
22891      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22892   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22893     $ac_main_return(1);
22894   putc('\r', stdout);
22895   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22896 }
22897 _ACEOF
22898 rm -f "conftest$ac_exeext"
22899 if { (eval echo "$as_me:22899: \"$ac_link\"") >&5
22900   (eval $ac_link) 2>&5
22901   ac_status=$?
22902   echo "$as_me:22902: \$? = $ac_status" >&5
22903   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22904   { (eval echo "$as_me:22904: \"$ac_try\"") >&5
22905   (eval $ac_try) 2>&5
22906   ac_status=$?
22907   echo "$as_me:22907: \$? = $ac_status" >&5
22908   (exit "$ac_status"); }; }; then
22909   ac_cv_func_setvbuf_reversed=yes
22910 else
22911   echo "$as_me: program exited with status $ac_status" >&5
22912 echo "$as_me: failed program was:" >&5
22913 cat "conftest.$ac_ext" >&5
22914 ac_cv_func_setvbuf_reversed=no
22915 fi
22916 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22917 fi
22918 rm -f core ./core.* ./*.core
22919 fi
22920 echo "$as_me:22920: result: $ac_cv_func_setvbuf_reversed" >&5
22921 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22922 if test $ac_cv_func_setvbuf_reversed = yes; then
22923
22924 cat >>confdefs.h <<\EOF
22925 #define SETVBUF_REVERSED 1
22926 EOF
22927
22928 fi
22929
22930 fi
22931 echo "$as_me:22931: checking for intptr_t" >&5
22932 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22933 if test "${ac_cv_type_intptr_t+set}" = set; then
22934   echo $ECHO_N "(cached) $ECHO_C" >&6
22935 else
22936   cat >"conftest.$ac_ext" <<_ACEOF
22937 #line 22937 "configure"
22938 #include "confdefs.h"
22939 $ac_includes_default
22940 int
22941 main (void)
22942 {
22943 if ((intptr_t *) 0)
22944   return 0;
22945 if (sizeof (intptr_t))
22946   return 0;
22947   ;
22948   return 0;
22949 }
22950 _ACEOF
22951 rm -f "conftest.$ac_objext"
22952 if { (eval echo "$as_me:22952: \"$ac_compile\"") >&5
22953   (eval $ac_compile) 2>&5
22954   ac_status=$?
22955   echo "$as_me:22955: \$? = $ac_status" >&5
22956   (exit "$ac_status"); } &&
22957          { ac_try='test -s "conftest.$ac_objext"'
22958   { (eval echo "$as_me:22958: \"$ac_try\"") >&5
22959   (eval $ac_try) 2>&5
22960   ac_status=$?
22961   echo "$as_me:22961: \$? = $ac_status" >&5
22962   (exit "$ac_status"); }; }; then
22963   ac_cv_type_intptr_t=yes
22964 else
22965   echo "$as_me: failed program was:" >&5
22966 cat "conftest.$ac_ext" >&5
22967 ac_cv_type_intptr_t=no
22968 fi
22969 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22970 fi
22971 echo "$as_me:22971: result: $ac_cv_type_intptr_t" >&5
22972 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22973 if test "$ac_cv_type_intptr_t" = yes; then
22974   :
22975 else
22976
22977 cat >>confdefs.h <<EOF
22978 #define intptr_t long
22979 EOF
22980
22981 fi
22982
22983 echo "$as_me:22983: checking for ssize_t" >&5
22984 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22985 if test "${ac_cv_type_ssize_t+set}" = set; then
22986   echo $ECHO_N "(cached) $ECHO_C" >&6
22987 else
22988   cat >"conftest.$ac_ext" <<_ACEOF
22989 #line 22989 "configure"
22990 #include "confdefs.h"
22991 $ac_includes_default
22992 int
22993 main (void)
22994 {
22995 if ((ssize_t *) 0)
22996   return 0;
22997 if (sizeof (ssize_t))
22998   return 0;
22999   ;
23000   return 0;
23001 }
23002 _ACEOF
23003 rm -f "conftest.$ac_objext"
23004 if { (eval echo "$as_me:23004: \"$ac_compile\"") >&5
23005   (eval $ac_compile) 2>&5
23006   ac_status=$?
23007   echo "$as_me:23007: \$? = $ac_status" >&5
23008   (exit "$ac_status"); } &&
23009          { ac_try='test -s "conftest.$ac_objext"'
23010   { (eval echo "$as_me:23010: \"$ac_try\"") >&5
23011   (eval $ac_try) 2>&5
23012   ac_status=$?
23013   echo "$as_me:23013: \$? = $ac_status" >&5
23014   (exit "$ac_status"); }; }; then
23015   ac_cv_type_ssize_t=yes
23016 else
23017   echo "$as_me: failed program was:" >&5
23018 cat "conftest.$ac_ext" >&5
23019 ac_cv_type_ssize_t=no
23020 fi
23021 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23022 fi
23023 echo "$as_me:23023: result: $ac_cv_type_ssize_t" >&5
23024 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23025 if test "$ac_cv_type_ssize_t" = yes; then
23026   :
23027 else
23028
23029 cat >>confdefs.h <<EOF
23030 #define ssize_t int
23031 EOF
23032
23033 fi
23034
23035 echo "$as_me:23035: checking for type sigaction_t" >&5
23036 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23037 if test "${cf_cv_type_sigaction+set}" = set; then
23038   echo $ECHO_N "(cached) $ECHO_C" >&6
23039 else
23040
23041         cat >"conftest.$ac_ext" <<_ACEOF
23042 #line 23042 "configure"
23043 #include "confdefs.h"
23044
23045 #include <signal.h>
23046 int
23047 main (void)
23048 {
23049 sigaction_t x
23050   ;
23051   return 0;
23052 }
23053 _ACEOF
23054 rm -f "conftest.$ac_objext"
23055 if { (eval echo "$as_me:23055: \"$ac_compile\"") >&5
23056   (eval $ac_compile) 2>&5
23057   ac_status=$?
23058   echo "$as_me:23058: \$? = $ac_status" >&5
23059   (exit "$ac_status"); } &&
23060          { ac_try='test -s "conftest.$ac_objext"'
23061   { (eval echo "$as_me:23061: \"$ac_try\"") >&5
23062   (eval $ac_try) 2>&5
23063   ac_status=$?
23064   echo "$as_me:23064: \$? = $ac_status" >&5
23065   (exit "$ac_status"); }; }; then
23066   cf_cv_type_sigaction=yes
23067 else
23068   echo "$as_me: failed program was:" >&5
23069 cat "conftest.$ac_ext" >&5
23070 cf_cv_type_sigaction=no
23071 fi
23072 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23073 fi
23074
23075 echo "$as_me:23075: result: $cf_cv_type_sigaction" >&5
23076 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23077 test "$cf_cv_type_sigaction" = yes &&
23078 cat >>confdefs.h <<\EOF
23079 #define HAVE_TYPE_SIGACTION 1
23080 EOF
23081
23082 echo "$as_me:23082: checking declaration of size-change" >&5
23083 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23084 if test "${cf_cv_sizechange+set}" = set; then
23085   echo $ECHO_N "(cached) $ECHO_C" >&6
23086 else
23087
23088         cf_cv_sizechange=unknown
23089         cf_save_CPPFLAGS="$CPPFLAGS"
23090
23091 for cf_opts in "" "NEED_PTEM_H"
23092 do
23093
23094         CPPFLAGS="$cf_save_CPPFLAGS"
23095         if test -n "$cf_opts"
23096         then
23097
23098         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23099         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23100
23101         fi
23102         cat >"conftest.$ac_ext" <<_ACEOF
23103 #line 23103 "configure"
23104 #include "confdefs.h"
23105 #include <sys/types.h>
23106 #ifdef HAVE_TERMIOS_H
23107 #include <termios.h>
23108 #else
23109 #ifdef HAVE_TERMIO_H
23110 #include <termio.h>
23111 #endif
23112 #endif
23113
23114 #ifdef NEED_PTEM_H
23115 /* This is a workaround for SCO:  they neglected to define struct winsize in
23116  * termios.h -- it is only in termio.h and ptem.h
23117  */
23118 #include <sys/stream.h>
23119 #include <sys/ptem.h>
23120 #endif
23121
23122 #ifdef HAVE_SYS_IOCTL_H
23123 #include <sys/ioctl.h>
23124 #endif
23125
23126 int
23127 main (void)
23128 {
23129
23130 #ifdef TIOCGSIZE
23131         struct ttysize win;     /* SunOS 3.0... */
23132         int y = win.ts_lines = 2;
23133         int x = win.ts_cols = 1;
23134         (void)y;
23135         (void)x;
23136 #else
23137 #ifdef TIOCGWINSZ
23138         struct winsize win;     /* everything else */
23139         int y = win.ws_row = 2;
23140         int x = win.ws_col = 1;
23141         (void)y;
23142         (void)x;
23143 #else
23144         no TIOCGSIZE or TIOCGWINSZ
23145 #endif /* TIOCGWINSZ */
23146 #endif /* TIOCGSIZE */
23147
23148   ;
23149   return 0;
23150 }
23151 _ACEOF
23152 rm -f "conftest.$ac_objext"
23153 if { (eval echo "$as_me:23153: \"$ac_compile\"") >&5
23154   (eval $ac_compile) 2>&5
23155   ac_status=$?
23156   echo "$as_me:23156: \$? = $ac_status" >&5
23157   (exit "$ac_status"); } &&
23158          { ac_try='test -s "conftest.$ac_objext"'
23159   { (eval echo "$as_me:23159: \"$ac_try\"") >&5
23160   (eval $ac_try) 2>&5
23161   ac_status=$?
23162   echo "$as_me:23162: \$? = $ac_status" >&5
23163   (exit "$ac_status"); }; }; then
23164   cf_cv_sizechange=yes
23165 else
23166   echo "$as_me: failed program was:" >&5
23167 cat "conftest.$ac_ext" >&5
23168 cf_cv_sizechange=no
23169 fi
23170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23171
23172         CPPFLAGS="$cf_save_CPPFLAGS"
23173         if test "$cf_cv_sizechange" = yes ; then
23174                 echo "size-change succeeded ($cf_opts)" >&5
23175                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23176                 break
23177         fi
23178 done
23179
23180 fi
23181 echo "$as_me:23181: result: $cf_cv_sizechange" >&5
23182 echo "${ECHO_T}$cf_cv_sizechange" >&6
23183 if test "$cf_cv_sizechange" != no ; then
23184
23185 cat >>confdefs.h <<\EOF
23186 #define HAVE_SIZECHANGE 1
23187 EOF
23188
23189         case "$cf_cv_sizechange" in
23190         (NEED*)
23191                 cat >>confdefs.h <<EOF
23192 #define $cf_cv_sizechange  1
23193 EOF
23194
23195                 ;;
23196         esac
23197 fi
23198
23199 echo "$as_me:23199: checking for memmove" >&5
23200 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23201 if test "${ac_cv_func_memmove+set}" = set; then
23202   echo $ECHO_N "(cached) $ECHO_C" >&6
23203 else
23204   cat >"conftest.$ac_ext" <<_ACEOF
23205 #line 23205 "configure"
23206 #include "confdefs.h"
23207 #define memmove autoconf_temporary
23208 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23209 #undef memmove
23210
23211 #ifdef __cplusplus
23212 extern "C"
23213 #endif
23214
23215 /* We use char because int might match the return type of a gcc2
23216    builtin and then its argument prototype would still apply.  */
23217 char memmove (void);
23218
23219 int
23220 main (void)
23221 {
23222
23223 /* The GNU C library defines stubs for functions which it implements
23224     to always fail with ENOSYS.  Some functions are actually named
23225     something starting with __ and the normal name is an alias.  */
23226 #if defined (__stub_memmove) || defined (__stub___memmove)
23227 #error found stub for memmove
23228 #endif
23229
23230         return memmove ();
23231   ;
23232   return 0;
23233 }
23234 _ACEOF
23235 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23236 if { (eval echo "$as_me:23236: \"$ac_link\"") >&5
23237   (eval $ac_link) 2>&5
23238   ac_status=$?
23239   echo "$as_me:23239: \$? = $ac_status" >&5
23240   (exit "$ac_status"); } &&
23241          { ac_try='test -s "conftest$ac_exeext"'
23242   { (eval echo "$as_me:23242: \"$ac_try\"") >&5
23243   (eval $ac_try) 2>&5
23244   ac_status=$?
23245   echo "$as_me:23245: \$? = $ac_status" >&5
23246   (exit "$ac_status"); }; }; then
23247   ac_cv_func_memmove=yes
23248 else
23249   echo "$as_me: failed program was:" >&5
23250 cat "conftest.$ac_ext" >&5
23251 ac_cv_func_memmove=no
23252 fi
23253 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23254 fi
23255 echo "$as_me:23255: result: $ac_cv_func_memmove" >&5
23256 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23257 if test "$ac_cv_func_memmove" = yes; then
23258   :
23259 else
23260
23261 echo "$as_me:23261: checking for bcopy" >&5
23262 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23263 if test "${ac_cv_func_bcopy+set}" = set; then
23264   echo $ECHO_N "(cached) $ECHO_C" >&6
23265 else
23266   cat >"conftest.$ac_ext" <<_ACEOF
23267 #line 23267 "configure"
23268 #include "confdefs.h"
23269 #define bcopy autoconf_temporary
23270 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23271 #undef bcopy
23272
23273 #ifdef __cplusplus
23274 extern "C"
23275 #endif
23276
23277 /* We use char because int might match the return type of a gcc2
23278    builtin and then its argument prototype would still apply.  */
23279 char bcopy (void);
23280
23281 int
23282 main (void)
23283 {
23284
23285 /* The GNU C library defines stubs for functions which it implements
23286     to always fail with ENOSYS.  Some functions are actually named
23287     something starting with __ and the normal name is an alias.  */
23288 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23289 #error found stub for bcopy
23290 #endif
23291
23292         return bcopy ();
23293   ;
23294   return 0;
23295 }
23296 _ACEOF
23297 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23298 if { (eval echo "$as_me:23298: \"$ac_link\"") >&5
23299   (eval $ac_link) 2>&5
23300   ac_status=$?
23301   echo "$as_me:23301: \$? = $ac_status" >&5
23302   (exit "$ac_status"); } &&
23303          { ac_try='test -s "conftest$ac_exeext"'
23304   { (eval echo "$as_me:23304: \"$ac_try\"") >&5
23305   (eval $ac_try) 2>&5
23306   ac_status=$?
23307   echo "$as_me:23307: \$? = $ac_status" >&5
23308   (exit "$ac_status"); }; }; then
23309   ac_cv_func_bcopy=yes
23310 else
23311   echo "$as_me: failed program was:" >&5
23312 cat "conftest.$ac_ext" >&5
23313 ac_cv_func_bcopy=no
23314 fi
23315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23316 fi
23317 echo "$as_me:23317: result: $ac_cv_func_bcopy" >&5
23318 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23319 if test "$ac_cv_func_bcopy" = yes; then
23320
23321         echo "$as_me:23321: checking if bcopy does overlapping moves" >&5
23322 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23323 if test "${cf_cv_good_bcopy+set}" = set; then
23324   echo $ECHO_N "(cached) $ECHO_C" >&6
23325 else
23326
23327                 if test "$cross_compiling" = yes; then
23328   cf_cv_good_bcopy=unknown
23329 else
23330   cat >"conftest.$ac_ext" <<_ACEOF
23331 #line 23331 "configure"
23332 #include "confdefs.h"
23333
23334 $ac_includes_default
23335
23336 int main(void) {
23337         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23338         char temp[40];
23339         bcopy(data, temp, sizeof(data));
23340         bcopy(temp+10, temp, 15);
23341         bcopy(temp+5, temp+15, 10);
23342         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23343 }
23344
23345 _ACEOF
23346 rm -f "conftest$ac_exeext"
23347 if { (eval echo "$as_me:23347: \"$ac_link\"") >&5
23348   (eval $ac_link) 2>&5
23349   ac_status=$?
23350   echo "$as_me:23350: \$? = $ac_status" >&5
23351   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23352   { (eval echo "$as_me:23352: \"$ac_try\"") >&5
23353   (eval $ac_try) 2>&5
23354   ac_status=$?
23355   echo "$as_me:23355: \$? = $ac_status" >&5
23356   (exit "$ac_status"); }; }; then
23357   cf_cv_good_bcopy=yes
23358 else
23359   echo "$as_me: program exited with status $ac_status" >&5
23360 echo "$as_me: failed program was:" >&5
23361 cat "conftest.$ac_ext" >&5
23362 cf_cv_good_bcopy=no
23363 fi
23364 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23365 fi
23366
23367 fi
23368 echo "$as_me:23368: result: $cf_cv_good_bcopy" >&5
23369 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23370
23371 else
23372   cf_cv_good_bcopy=no
23373 fi
23374
23375         if test "$cf_cv_good_bcopy" = yes ; then
23376
23377 cat >>confdefs.h <<\EOF
23378 #define USE_OK_BCOPY 1
23379 EOF
23380
23381         else
23382
23383 cat >>confdefs.h <<\EOF
23384 #define USE_MY_MEMMOVE 1
23385 EOF
23386
23387         fi
23388
23389 fi
23390
23391 tty >/dev/null 2>&1 || {
23392 for ac_func in posix_openpt
23393 do
23394 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23395 echo "$as_me:23395: checking for $ac_func" >&5
23396 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23397 if eval "test \"\${$as_ac_var+set}\" = set"; then
23398   echo $ECHO_N "(cached) $ECHO_C" >&6
23399 else
23400   cat >"conftest.$ac_ext" <<_ACEOF
23401 #line 23401 "configure"
23402 #include "confdefs.h"
23403 #define $ac_func autoconf_temporary
23404 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23405 #undef $ac_func
23406
23407 #ifdef __cplusplus
23408 extern "C"
23409 #endif
23410
23411 /* We use char because int might match the return type of a gcc2
23412    builtin and then its argument prototype would still apply.  */
23413 char $ac_func (void);
23414
23415 int
23416 main (void)
23417 {
23418
23419 /* The GNU C library defines stubs for functions which it implements
23420     to always fail with ENOSYS.  Some functions are actually named
23421     something starting with __ and the normal name is an alias.  */
23422 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23423 #error found stub for $ac_func
23424 #endif
23425
23426         return $ac_func ();
23427   ;
23428   return 0;
23429 }
23430 _ACEOF
23431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23432 if { (eval echo "$as_me:23432: \"$ac_link\"") >&5
23433   (eval $ac_link) 2>&5
23434   ac_status=$?
23435   echo "$as_me:23435: \$? = $ac_status" >&5
23436   (exit "$ac_status"); } &&
23437          { ac_try='test -s "conftest$ac_exeext"'
23438   { (eval echo "$as_me:23438: \"$ac_try\"") >&5
23439   (eval $ac_try) 2>&5
23440   ac_status=$?
23441   echo "$as_me:23441: \$? = $ac_status" >&5
23442   (exit "$ac_status"); }; }; then
23443   eval "$as_ac_var=yes"
23444 else
23445   echo "$as_me: failed program was:" >&5
23446 cat "conftest.$ac_ext" >&5
23447 eval "$as_ac_var=no"
23448 fi
23449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23450 fi
23451 echo "$as_me:23451: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23452 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23453 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23454   cat >>confdefs.h <<EOF
23455 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23456 EOF
23457
23458 fi
23459 done
23460  }
23461 echo "$as_me:23461: checking if poll really works" >&5
23462 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23463 if test "${cf_cv_working_poll+set}" = set; then
23464   echo $ECHO_N "(cached) $ECHO_C" >&6
23465 else
23466
23467 if test "$cross_compiling" = yes; then
23468   cf_cv_working_poll=unknown
23469 else
23470   cat >"conftest.$ac_ext" <<_ACEOF
23471 #line 23471 "configure"
23472 #include "confdefs.h"
23473
23474 $ac_includes_default
23475
23476 #include <fcntl.h>
23477
23478 #ifdef HAVE_POLL_H
23479 #include <poll.h>
23480 #else
23481 #include <sys/poll.h>
23482 #endif
23483
23484 int main(void) {
23485         struct pollfd myfds;
23486         int ret;
23487
23488         /* check for Darwin bug with respect to "devices" */
23489         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23490         if (myfds.fd < 0)
23491                 myfds.fd = 0;
23492         myfds.events = POLLIN;
23493         myfds.revents = 0;
23494
23495         ret = poll(&myfds, 1, 100);
23496
23497         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23498                 ret = -1;
23499         } else {
23500                 int fd = 0;
23501                 if (!isatty(fd)) {
23502                         fd = open("/dev/tty", 2);       /* O_RDWR */
23503                 }
23504 #ifdef HAVE_POSIX_OPENPT
23505                 if (fd < 0) {
23506                         fd = posix_openpt(O_RDWR);
23507                 }
23508 #endif
23509
23510                 if (fd >= 0) {
23511                         /* also check with standard input */
23512                         myfds.fd = fd;
23513                         myfds.events = POLLIN;
23514                         myfds.revents = 0;
23515                         ret = poll(&myfds, 1, 100);
23516                 } else {
23517                         ret = -1;
23518                 }
23519         }
23520         ${cf_cv_main_return:-return}(ret < 0);
23521 }
23522 _ACEOF
23523 rm -f "conftest$ac_exeext"
23524 if { (eval echo "$as_me:23524: \"$ac_link\"") >&5
23525   (eval $ac_link) 2>&5
23526   ac_status=$?
23527   echo "$as_me:23527: \$? = $ac_status" >&5
23528   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23529   { (eval echo "$as_me:23529: \"$ac_try\"") >&5
23530   (eval $ac_try) 2>&5
23531   ac_status=$?
23532   echo "$as_me:23532: \$? = $ac_status" >&5
23533   (exit "$ac_status"); }; }; then
23534   cf_cv_working_poll=yes
23535 else
23536   echo "$as_me: program exited with status $ac_status" >&5
23537 echo "$as_me: failed program was:" >&5
23538 cat "conftest.$ac_ext" >&5
23539 cf_cv_working_poll=no
23540 fi
23541 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23542 fi
23543 fi
23544 echo "$as_me:23544: result: $cf_cv_working_poll" >&5
23545 echo "${ECHO_T}$cf_cv_working_poll" >&6
23546 test "$cf_cv_working_poll" = "yes" &&
23547 cat >>confdefs.h <<\EOF
23548 #define HAVE_WORKING_POLL 1
23549 EOF
23550
23551 echo "$as_me:23551: checking for va_copy" >&5
23552 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23553 if test "${cf_cv_have_va_copy+set}" = set; then
23554   echo $ECHO_N "(cached) $ECHO_C" >&6
23555 else
23556
23557 cat >"conftest.$ac_ext" <<_ACEOF
23558 #line 23558 "configure"
23559 #include "confdefs.h"
23560
23561 #include <stdarg.h>
23562
23563 int
23564 main (void)
23565 {
23566
23567         static va_list dst;
23568         static va_list src;
23569         va_copy(dst, src)
23570   ;
23571   return 0;
23572 }
23573 _ACEOF
23574 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23575 if { (eval echo "$as_me:23575: \"$ac_link\"") >&5
23576   (eval $ac_link) 2>&5
23577   ac_status=$?
23578   echo "$as_me:23578: \$? = $ac_status" >&5
23579   (exit "$ac_status"); } &&
23580          { ac_try='test -s "conftest$ac_exeext"'
23581   { (eval echo "$as_me:23581: \"$ac_try\"") >&5
23582   (eval $ac_try) 2>&5
23583   ac_status=$?
23584   echo "$as_me:23584: \$? = $ac_status" >&5
23585   (exit "$ac_status"); }; }; then
23586   cf_cv_have_va_copy=yes
23587 else
23588   echo "$as_me: failed program was:" >&5
23589 cat "conftest.$ac_ext" >&5
23590 cf_cv_have_va_copy=no
23591 fi
23592 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23593 fi
23594 echo "$as_me:23594: result: $cf_cv_have_va_copy" >&5
23595 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23596
23597 if test "$cf_cv_have_va_copy" = yes;
23598 then
23599
23600 cat >>confdefs.h <<\EOF
23601 #define HAVE_VA_COPY 1
23602 EOF
23603
23604 else # !cf_cv_have_va_copy
23605
23606 echo "$as_me:23606: checking for __va_copy" >&5
23607 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23608 if test "${cf_cv_have___va_copy+set}" = set; then
23609   echo $ECHO_N "(cached) $ECHO_C" >&6
23610 else
23611
23612 cat >"conftest.$ac_ext" <<_ACEOF
23613 #line 23613 "configure"
23614 #include "confdefs.h"
23615
23616 #include <stdarg.h>
23617
23618 int
23619 main (void)
23620 {
23621
23622         static va_list dst;
23623         static va_list src;
23624         __va_copy(dst, src)
23625   ;
23626   return 0;
23627 }
23628 _ACEOF
23629 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23630 if { (eval echo "$as_me:23630: \"$ac_link\"") >&5
23631   (eval $ac_link) 2>&5
23632   ac_status=$?
23633   echo "$as_me:23633: \$? = $ac_status" >&5
23634   (exit "$ac_status"); } &&
23635          { ac_try='test -s "conftest$ac_exeext"'
23636   { (eval echo "$as_me:23636: \"$ac_try\"") >&5
23637   (eval $ac_try) 2>&5
23638   ac_status=$?
23639   echo "$as_me:23639: \$? = $ac_status" >&5
23640   (exit "$ac_status"); }; }; then
23641   cf_cv_have___va_copy=yes
23642 else
23643   echo "$as_me: failed program was:" >&5
23644 cat "conftest.$ac_ext" >&5
23645 cf_cv_have___va_copy=no
23646 fi
23647 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23648 fi
23649 echo "$as_me:23649: result: $cf_cv_have___va_copy" >&5
23650 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23651
23652 if test "$cf_cv_have___va_copy" = yes
23653 then
23654
23655 cat >>confdefs.h <<\EOF
23656 #define HAVE___VA_COPY 1
23657 EOF
23658
23659 else # !cf_cv_have___va_copy
23660
23661 echo "$as_me:23661: checking for __builtin_va_copy" >&5
23662 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23663 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23664   echo $ECHO_N "(cached) $ECHO_C" >&6
23665 else
23666
23667 cat >"conftest.$ac_ext" <<_ACEOF
23668 #line 23668 "configure"
23669 #include "confdefs.h"
23670
23671 #include <stdarg.h>
23672
23673 int
23674 main (void)
23675 {
23676
23677         static va_list dst;
23678         static va_list src;
23679         __builtin_va_copy(dst, src)
23680   ;
23681   return 0;
23682 }
23683 _ACEOF
23684 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23685 if { (eval echo "$as_me:23685: \"$ac_link\"") >&5
23686   (eval $ac_link) 2>&5
23687   ac_status=$?
23688   echo "$as_me:23688: \$? = $ac_status" >&5
23689   (exit "$ac_status"); } &&
23690          { ac_try='test -s "conftest$ac_exeext"'
23691   { (eval echo "$as_me:23691: \"$ac_try\"") >&5
23692   (eval $ac_try) 2>&5
23693   ac_status=$?
23694   echo "$as_me:23694: \$? = $ac_status" >&5
23695   (exit "$ac_status"); }; }; then
23696   cf_cv_have___builtin_va_copy=yes
23697 else
23698   echo "$as_me: failed program was:" >&5
23699 cat "conftest.$ac_ext" >&5
23700 cf_cv_have___builtin_va_copy=no
23701 fi
23702 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23703 fi
23704 echo "$as_me:23704: result: $cf_cv_have___builtin_va_copy" >&5
23705 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23706
23707 test "$cf_cv_have___builtin_va_copy" = yes &&
23708
23709 cat >>confdefs.h <<\EOF
23710 #define HAVE___BUILTIN_VA_COPY 1
23711 EOF
23712
23713 fi # cf_cv_have___va_copy
23714
23715 fi # cf_cv_have_va_copy
23716
23717 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23718 (*yes*)
23719         ;;
23720
23721 (*)
23722         echo "$as_me:23722: checking if we can simply copy va_list" >&5
23723 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23724 if test "${cf_cv_pointer_va_list+set}" = set; then
23725   echo $ECHO_N "(cached) $ECHO_C" >&6
23726 else
23727
23728 cat >"conftest.$ac_ext" <<_ACEOF
23729 #line 23729 "configure"
23730 #include "confdefs.h"
23731
23732 #include <stdarg.h>
23733
23734 int
23735 main (void)
23736 {
23737
23738         va_list dst;
23739         va_list src;
23740         dst = src
23741   ;
23742   return 0;
23743 }
23744 _ACEOF
23745 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23746 if { (eval echo "$as_me:23746: \"$ac_link\"") >&5
23747   (eval $ac_link) 2>&5
23748   ac_status=$?
23749   echo "$as_me:23749: \$? = $ac_status" >&5
23750   (exit "$ac_status"); } &&
23751          { ac_try='test -s "conftest$ac_exeext"'
23752   { (eval echo "$as_me:23752: \"$ac_try\"") >&5
23753   (eval $ac_try) 2>&5
23754   ac_status=$?
23755   echo "$as_me:23755: \$? = $ac_status" >&5
23756   (exit "$ac_status"); }; }; then
23757   cf_cv_pointer_va_list=yes
23758 else
23759   echo "$as_me: failed program was:" >&5
23760 cat "conftest.$ac_ext" >&5
23761 cf_cv_pointer_va_list=no
23762 fi
23763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23764 fi
23765 echo "$as_me:23765: result: $cf_cv_pointer_va_list" >&5
23766 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23767
23768         if test "$cf_cv_pointer_va_list" = no
23769         then
23770                 echo "$as_me:23770: checking if we can copy va_list indirectly" >&5
23771 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23772 if test "${cf_cv_array_va_list+set}" = set; then
23773   echo $ECHO_N "(cached) $ECHO_C" >&6
23774 else
23775
23776 cat >"conftest.$ac_ext" <<_ACEOF
23777 #line 23777 "configure"
23778 #include "confdefs.h"
23779
23780 #include <stdarg.h>
23781
23782 int
23783 main (void)
23784 {
23785
23786         va_list dst;
23787         va_list src;
23788         *dst = *src
23789   ;
23790   return 0;
23791 }
23792 _ACEOF
23793 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23794 if { (eval echo "$as_me:23794: \"$ac_link\"") >&5
23795   (eval $ac_link) 2>&5
23796   ac_status=$?
23797   echo "$as_me:23797: \$? = $ac_status" >&5
23798   (exit "$ac_status"); } &&
23799          { ac_try='test -s "conftest$ac_exeext"'
23800   { (eval echo "$as_me:23800: \"$ac_try\"") >&5
23801   (eval $ac_try) 2>&5
23802   ac_status=$?
23803   echo "$as_me:23803: \$? = $ac_status" >&5
23804   (exit "$ac_status"); }; }; then
23805   cf_cv_array_va_list=yes
23806 else
23807   echo "$as_me: failed program was:" >&5
23808 cat "conftest.$ac_ext" >&5
23809 cf_cv_array_va_list=no
23810 fi
23811 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23812 fi
23813 echo "$as_me:23813: result: $cf_cv_array_va_list" >&5
23814 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23815                 test "$cf_cv_array_va_list" = yes &&
23816 cat >>confdefs.h <<\EOF
23817 #define ARRAY_VA_LIST 1
23818 EOF
23819
23820         fi
23821         ;;
23822 esac
23823
23824 echo "$as_me:23824: checking for pid_t" >&5
23825 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23826 if test "${ac_cv_type_pid_t+set}" = set; then
23827   echo $ECHO_N "(cached) $ECHO_C" >&6
23828 else
23829   cat >"conftest.$ac_ext" <<_ACEOF
23830 #line 23830 "configure"
23831 #include "confdefs.h"
23832 $ac_includes_default
23833 int
23834 main (void)
23835 {
23836 if ((pid_t *) 0)
23837   return 0;
23838 if (sizeof (pid_t))
23839   return 0;
23840   ;
23841   return 0;
23842 }
23843 _ACEOF
23844 rm -f "conftest.$ac_objext"
23845 if { (eval echo "$as_me:23845: \"$ac_compile\"") >&5
23846   (eval $ac_compile) 2>&5
23847   ac_status=$?
23848   echo "$as_me:23848: \$? = $ac_status" >&5
23849   (exit "$ac_status"); } &&
23850          { ac_try='test -s "conftest.$ac_objext"'
23851   { (eval echo "$as_me:23851: \"$ac_try\"") >&5
23852   (eval $ac_try) 2>&5
23853   ac_status=$?
23854   echo "$as_me:23854: \$? = $ac_status" >&5
23855   (exit "$ac_status"); }; }; then
23856   ac_cv_type_pid_t=yes
23857 else
23858   echo "$as_me: failed program was:" >&5
23859 cat "conftest.$ac_ext" >&5
23860 ac_cv_type_pid_t=no
23861 fi
23862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23863 fi
23864 echo "$as_me:23864: result: $ac_cv_type_pid_t" >&5
23865 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23866 if test "$ac_cv_type_pid_t" = yes; then
23867   :
23868 else
23869
23870 cat >>confdefs.h <<EOF
23871 #define pid_t int
23872 EOF
23873
23874 fi
23875
23876 for ac_header in unistd.h vfork.h
23877 do
23878 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23879 echo "$as_me:23879: checking for $ac_header" >&5
23880 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23881 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23882   echo $ECHO_N "(cached) $ECHO_C" >&6
23883 else
23884   cat >"conftest.$ac_ext" <<_ACEOF
23885 #line 23885 "configure"
23886 #include "confdefs.h"
23887 #include <$ac_header>
23888 _ACEOF
23889 if { (eval echo "$as_me:23889: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23890   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23891   ac_status=$?
23892   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23893   rm -f conftest.er1
23894   cat conftest.err >&5
23895   echo "$as_me:23895: \$? = $ac_status" >&5
23896   (exit "$ac_status"); } >/dev/null; then
23897   if test -s conftest.err; then
23898     ac_cpp_err=$ac_c_preproc_warn_flag
23899   else
23900     ac_cpp_err=
23901   fi
23902 else
23903   ac_cpp_err=yes
23904 fi
23905 if test -z "$ac_cpp_err"; then
23906   eval "$as_ac_Header=yes"
23907 else
23908   echo "$as_me: failed program was:" >&5
23909   cat "conftest.$ac_ext" >&5
23910   eval "$as_ac_Header=no"
23911 fi
23912 rm -f conftest.err "conftest.$ac_ext"
23913 fi
23914 echo "$as_me:23914: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23915 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23916 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23917   cat >>confdefs.h <<EOF
23918 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23919 EOF
23920
23921 fi
23922 done
23923
23924 for ac_func in fork vfork
23925 do
23926 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23927 echo "$as_me:23927: checking for $ac_func" >&5
23928 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23929 if eval "test \"\${$as_ac_var+set}\" = set"; then
23930   echo $ECHO_N "(cached) $ECHO_C" >&6
23931 else
23932   cat >"conftest.$ac_ext" <<_ACEOF
23933 #line 23933 "configure"
23934 #include "confdefs.h"
23935 #define $ac_func autoconf_temporary
23936 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23937 #undef $ac_func
23938
23939 #ifdef __cplusplus
23940 extern "C"
23941 #endif
23942
23943 /* We use char because int might match the return type of a gcc2
23944    builtin and then its argument prototype would still apply.  */
23945 char $ac_func (void);
23946
23947 int
23948 main (void)
23949 {
23950
23951 /* The GNU C library defines stubs for functions which it implements
23952     to always fail with ENOSYS.  Some functions are actually named
23953     something starting with __ and the normal name is an alias.  */
23954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23955 #error found stub for $ac_func
23956 #endif
23957
23958         return $ac_func ();
23959   ;
23960   return 0;
23961 }
23962 _ACEOF
23963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23964 if { (eval echo "$as_me:23964: \"$ac_link\"") >&5
23965   (eval $ac_link) 2>&5
23966   ac_status=$?
23967   echo "$as_me:23967: \$? = $ac_status" >&5
23968   (exit "$ac_status"); } &&
23969          { ac_try='test -s "conftest$ac_exeext"'
23970   { (eval echo "$as_me:23970: \"$ac_try\"") >&5
23971   (eval $ac_try) 2>&5
23972   ac_status=$?
23973   echo "$as_me:23973: \$? = $ac_status" >&5
23974   (exit "$ac_status"); }; }; then
23975   eval "$as_ac_var=yes"
23976 else
23977   echo "$as_me: failed program was:" >&5
23978 cat "conftest.$ac_ext" >&5
23979 eval "$as_ac_var=no"
23980 fi
23981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23982 fi
23983 echo "$as_me:23983: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23984 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23985 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23986   cat >>confdefs.h <<EOF
23987 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23988 EOF
23989
23990 fi
23991 done
23992
23993 ac_cv_func_fork_works=$ac_cv_func_fork
23994 if test "x$ac_cv_func_fork" = xyes; then
23995   echo "$as_me:23995: checking for working fork" >&5
23996 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23997 if test "${ac_cv_func_fork_works+set}" = set; then
23998   echo $ECHO_N "(cached) $ECHO_C" >&6
23999 else
24000   if test "$cross_compiling" = yes; then
24001   ac_cv_func_fork_works=cross
24002 else
24003   cat >"conftest.$ac_ext" <<_ACEOF
24004 /* By Rüdiger Kuhlmann. */
24005       #include <sys/types.h>
24006       #if HAVE_UNISTD_H
24007       # include <unistd.h>
24008       #endif
24009       /* Some systems only have a dummy stub for fork() */
24010       int main (void)
24011       {
24012         if (fork() < 0)
24013           $ac_main_return (1);
24014         $ac_main_return (0);
24015       }
24016 _ACEOF
24017 rm -f "conftest$ac_exeext"
24018 if { (eval echo "$as_me:24018: \"$ac_link\"") >&5
24019   (eval $ac_link) 2>&5
24020   ac_status=$?
24021   echo "$as_me:24021: \$? = $ac_status" >&5
24022   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24023   { (eval echo "$as_me:24023: \"$ac_try\"") >&5
24024   (eval $ac_try) 2>&5
24025   ac_status=$?
24026   echo "$as_me:24026: \$? = $ac_status" >&5
24027   (exit "$ac_status"); }; }; then
24028   ac_cv_func_fork_works=yes
24029 else
24030   echo "$as_me: program exited with status $ac_status" >&5
24031 echo "$as_me: failed program was:" >&5
24032 cat "conftest.$ac_ext" >&5
24033 ac_cv_func_fork_works=no
24034 fi
24035 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24036 fi
24037 fi
24038 echo "$as_me:24038: result: $ac_cv_func_fork_works" >&5
24039 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24040
24041 fi
24042 if test "x$ac_cv_func_fork_works" = xcross; then
24043   case $host in
24044     *-*-amigaos* | *-*-msdosdjgpp*)
24045       # Override, as these systems have only a dummy fork() stub
24046       ac_cv_func_fork_works=no
24047       ;;
24048     *)
24049       ac_cv_func_fork_works=yes
24050       ;;
24051   esac
24052   { echo "$as_me:24052: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24053 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24054 fi
24055 ac_cv_func_vfork_works=$ac_cv_func_vfork
24056 if test "x$ac_cv_func_vfork" = xyes; then
24057   echo "$as_me:24057: checking for working vfork" >&5
24058 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24059 if test "${ac_cv_func_vfork_works+set}" = set; then
24060   echo $ECHO_N "(cached) $ECHO_C" >&6
24061 else
24062   if test "$cross_compiling" = yes; then
24063   ac_cv_func_vfork_works=cross
24064 else
24065   cat >"conftest.$ac_ext" <<_ACEOF
24066 #line 24066 "configure"
24067 #include "confdefs.h"
24068 /* Thanks to Paul Eggert for this test.  */
24069 #include <stdio.h>
24070 #include <sys/types.h>
24071 #include <sys/stat.h>
24072 #if HAVE_UNISTD_H
24073 # include <unistd.h>
24074 #endif
24075 #if HAVE_VFORK_H
24076 # include <vfork.h>
24077 #endif
24078 /* On some sparc systems, changes by the child to local and incoming
24079    argument registers are propagated back to the parent.  The compiler
24080    is told about this with #include <vfork.h>, but some compilers
24081    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24082    static variable whose address is put into a register that is
24083    clobbered by the vfork.  */
24084 static
24085 sparc_address_test (int arg)
24086 {
24087   static pid_t child;
24088   if (!child) {
24089     child = vfork ();
24090     if (child < 0) {
24091       perror ("vfork");
24092       _exit(2);
24093     }
24094     if (!child) {
24095       arg = getpid();
24096       write(-1, "", 0);
24097       _exit (arg);
24098     }
24099   }
24100 }
24101
24102 int
24103 main (void)
24104 {
24105   pid_t parent = getpid ();
24106   pid_t child;
24107
24108   sparc_address_test ();
24109
24110   child = vfork ();
24111
24112   if (child == 0) {
24113     /* Here is another test for sparc vfork register problems.  This
24114        test uses lots of local variables, at least as many local
24115        variables as main has allocated so far including compiler
24116        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24117        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24118        reuse the register of parent for one of the local variables,
24119        since it will think that parent can't possibly be used any more
24120        in this routine.  Assigning to the local variable will thus
24121        munge parent in the parent process.  */
24122     pid_t
24123       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24124       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24125     /* Convince the compiler that p..p7 are live; otherwise, it might
24126        use the same hardware register for all 8 local variables.  */
24127     if (p != p1 || p != p2 || p != p3 || p != p4
24128         || p != p5 || p != p6 || p != p7)
24129       _exit(1);
24130
24131     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24132        from child file descriptors.  If the child closes a descriptor
24133        before it execs or exits, this munges the parent's descriptor
24134        as well.  Test for this by closing stdout in the child.  */
24135     _exit(close(fileno(stdout)) != 0);
24136   } else {
24137     int status;
24138     struct stat st;
24139
24140     while (wait(&status) != child)
24141       ;
24142     $ac_main_return(
24143          /* Was there some problem with vforking?  */
24144          child < 0
24145
24146          /* Did the child fail?  (This shouldn't happen.)  */
24147          || status
24148
24149          /* Did the vfork/compiler bug occur?  */
24150          || parent != getpid()
24151
24152          /* Did the file descriptor bug occur?  */
24153          || fstat(fileno(stdout), &st) != 0
24154          );
24155   }
24156 }
24157 _ACEOF
24158 rm -f "conftest$ac_exeext"
24159 if { (eval echo "$as_me:24159: \"$ac_link\"") >&5
24160   (eval $ac_link) 2>&5
24161   ac_status=$?
24162   echo "$as_me:24162: \$? = $ac_status" >&5
24163   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24164   { (eval echo "$as_me:24164: \"$ac_try\"") >&5
24165   (eval $ac_try) 2>&5
24166   ac_status=$?
24167   echo "$as_me:24167: \$? = $ac_status" >&5
24168   (exit "$ac_status"); }; }; then
24169   ac_cv_func_vfork_works=yes
24170 else
24171   echo "$as_me: program exited with status $ac_status" >&5
24172 echo "$as_me: failed program was:" >&5
24173 cat "conftest.$ac_ext" >&5
24174 ac_cv_func_vfork_works=no
24175 fi
24176 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24177 fi
24178 fi
24179 echo "$as_me:24179: result: $ac_cv_func_vfork_works" >&5
24180 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24181
24182 fi;
24183 if test "x$ac_cv_func_fork_works" = xcross; then
24184   ac_cv_func_vfork_works=ac_cv_func_vfork
24185   { echo "$as_me:24185: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24186 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24187 fi
24188
24189 if test "x$ac_cv_func_vfork_works" = xyes; then
24190
24191 cat >>confdefs.h <<\EOF
24192 #define HAVE_WORKING_VFORK 1
24193 EOF
24194
24195 else
24196
24197 cat >>confdefs.h <<\EOF
24198 #define vfork fork
24199 EOF
24200
24201 fi
24202 if test "x$ac_cv_func_fork_works" = xyes; then
24203
24204 cat >>confdefs.h <<\EOF
24205 #define HAVE_WORKING_FORK 1
24206 EOF
24207
24208 fi
24209
24210 echo "$as_me:24210: checking if fopen accepts explicit binary mode" >&5
24211 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24212 if test "${cf_cv_fopen_bin_r+set}" = set; then
24213   echo $ECHO_N "(cached) $ECHO_C" >&6
24214 else
24215
24216         if test "$cross_compiling" = yes; then
24217   cf_cv_fopen_bin_r=unknown
24218 else
24219   cat >"conftest.$ac_ext" <<_ACEOF
24220 #line 24220 "configure"
24221 #include "confdefs.h"
24222
24223 $ac_includes_default
24224
24225 int main(void)
24226 {
24227         FILE *fp = fopen("conftest.tmp", "wb");
24228         int rc = 0;
24229         if (fp != 0) {
24230                 int p, q;
24231                 for (p = 0; p < 256; ++p) {
24232                         fputc(p, fp);
24233                 }
24234                 fclose(fp);
24235                 fp = fopen("conftest.tmp", "rb");
24236                 if (fp != 0) {
24237                         for (p = 0; p < 256; ++p) {
24238                                 q = fgetc(fp);
24239                                 if (q != p) {
24240                                         rc = 1;
24241                                         break;
24242                                 }
24243                         }
24244                 } else {
24245                         rc = 1;
24246                 }
24247         } else {
24248                 rc = 1;
24249         }
24250         ${cf_cv_main_return:-return} (rc);
24251 }
24252
24253 _ACEOF
24254 rm -f "conftest$ac_exeext"
24255 if { (eval echo "$as_me:24255: \"$ac_link\"") >&5
24256   (eval $ac_link) 2>&5
24257   ac_status=$?
24258   echo "$as_me:24258: \$? = $ac_status" >&5
24259   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24260   { (eval echo "$as_me:24260: \"$ac_try\"") >&5
24261   (eval $ac_try) 2>&5
24262   ac_status=$?
24263   echo "$as_me:24263: \$? = $ac_status" >&5
24264   (exit "$ac_status"); }; }; then
24265   cf_cv_fopen_bin_r=yes
24266 else
24267   echo "$as_me: program exited with status $ac_status" >&5
24268 echo "$as_me: failed program was:" >&5
24269 cat "conftest.$ac_ext" >&5
24270 cf_cv_fopen_bin_r=no
24271 fi
24272 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24273 fi
24274
24275 fi
24276 echo "$as_me:24276: result: $cf_cv_fopen_bin_r" >&5
24277 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24278 test "x$cf_cv_fopen_bin_r" != xno &&
24279 cat >>confdefs.h <<\EOF
24280 #define USE_FOPEN_BIN_R 1
24281 EOF
24282
24283 # special check for test/ditto.c
24284
24285 echo "$as_me:24285: checking for openpty in -lutil" >&5
24286 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24287 if test "${ac_cv_lib_util_openpty+set}" = set; then
24288   echo $ECHO_N "(cached) $ECHO_C" >&6
24289 else
24290   ac_check_lib_save_LIBS=$LIBS
24291 LIBS="-lutil  $LIBS"
24292 cat >"conftest.$ac_ext" <<_ACEOF
24293 #line 24293 "configure"
24294 #include "confdefs.h"
24295
24296 /* Override any gcc2 internal prototype to avoid an error.  */
24297 #ifdef __cplusplus
24298 extern "C"
24299 #endif
24300 /* We use char because int might match the return type of a gcc2
24301    builtin and then its argument prototype would still apply.  */
24302 char openpty ();
24303 int
24304 main (void)
24305 {
24306 openpty ();
24307   ;
24308   return 0;
24309 }
24310 _ACEOF
24311 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24312 if { (eval echo "$as_me:24312: \"$ac_link\"") >&5
24313   (eval $ac_link) 2>&5
24314   ac_status=$?
24315   echo "$as_me:24315: \$? = $ac_status" >&5
24316   (exit "$ac_status"); } &&
24317          { ac_try='test -s "conftest$ac_exeext"'
24318   { (eval echo "$as_me:24318: \"$ac_try\"") >&5
24319   (eval $ac_try) 2>&5
24320   ac_status=$?
24321   echo "$as_me:24321: \$? = $ac_status" >&5
24322   (exit "$ac_status"); }; }; then
24323   ac_cv_lib_util_openpty=yes
24324 else
24325   echo "$as_me: failed program was:" >&5
24326 cat "conftest.$ac_ext" >&5
24327 ac_cv_lib_util_openpty=no
24328 fi
24329 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24330 LIBS=$ac_check_lib_save_LIBS
24331 fi
24332 echo "$as_me:24332: result: $ac_cv_lib_util_openpty" >&5
24333 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24334 if test "$ac_cv_lib_util_openpty" = yes; then
24335   cf_cv_lib_util=yes
24336 else
24337   cf_cv_lib_util=no
24338 fi
24339
24340 echo "$as_me:24340: checking for openpty header" >&5
24341 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24342 if test "${cf_cv_func_openpty+set}" = set; then
24343   echo $ECHO_N "(cached) $ECHO_C" >&6
24344 else
24345
24346         cf_save_LIBS="$LIBS"
24347         test "$cf_cv_lib_util" = yes && {
24348 cf_add_libs="$LIBS"
24349 # reverse order
24350 cf_add_0lib=
24351 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24352 # filter duplicates
24353 for cf_add_1lib in $cf_add_0lib; do
24354         for cf_add_2lib in $cf_add_libs; do
24355                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24356                         cf_add_1lib=
24357                         break
24358                 fi
24359         done
24360         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24361 done
24362 LIBS="$cf_add_libs"
24363  }
24364         for cf_header in pty.h libutil.h util.h
24365         do
24366         cat >"conftest.$ac_ext" <<_ACEOF
24367 #line 24367 "configure"
24368 #include "confdefs.h"
24369
24370 #include <$cf_header>
24371
24372 int
24373 main (void)
24374 {
24375
24376         int x = openpty((int *)0, (int *)0, (char *)0,
24377                                    (struct termios *)0, (struct winsize *)0);
24378
24379   ;
24380   return 0;
24381 }
24382 _ACEOF
24383 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24384 if { (eval echo "$as_me:24384: \"$ac_link\"") >&5
24385   (eval $ac_link) 2>&5
24386   ac_status=$?
24387   echo "$as_me:24387: \$? = $ac_status" >&5
24388   (exit "$ac_status"); } &&
24389          { ac_try='test -s "conftest$ac_exeext"'
24390   { (eval echo "$as_me:24390: \"$ac_try\"") >&5
24391   (eval $ac_try) 2>&5
24392   ac_status=$?
24393   echo "$as_me:24393: \$? = $ac_status" >&5
24394   (exit "$ac_status"); }; }; then
24395
24396                 cf_cv_func_openpty=$cf_header
24397                 break
24398
24399 else
24400   echo "$as_me: failed program was:" >&5
24401 cat "conftest.$ac_ext" >&5
24402
24403                 cf_cv_func_openpty=no
24404
24405 fi
24406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24407         done
24408         LIBS="$cf_save_LIBS"
24409
24410 fi
24411 echo "$as_me:24411: result: $cf_cv_func_openpty" >&5
24412 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24413
24414 if test "$cf_cv_func_openpty" != no ; then
24415
24416 cat >>confdefs.h <<EOF
24417 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24418 EOF
24419
24420 cat >>confdefs.h <<\EOF
24421 #define USE_XTERM_PTY 1
24422 EOF
24423
24424         if test "x$cf_cv_lib_util" = xyes ; then
24425
24426 cf_add_libs="$TEST_LIBS"
24427 # reverse order
24428 cf_add_0lib=
24429 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24430 # filter duplicates
24431 for cf_add_1lib in $cf_add_0lib; do
24432         for cf_add_2lib in $cf_add_libs; do
24433                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24434                         cf_add_1lib=
24435                         break
24436                 fi
24437         done
24438         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24439 done
24440 TEST_LIBS="$cf_add_libs"
24441
24442         fi
24443 fi
24444
24445 if test "$with_hashed_db" != no ; then
24446
24447 cat >>confdefs.h <<\EOF
24448 #define USE_HASHED_DB 1
24449 EOF
24450
24451 case $with_hashed_db in
24452 (yes|*able*)
24453         ;;
24454 (*)
24455         if test -d "$with_hashed_db" ; then
24456
24457 if test -n "$with_hashed_db/include" ; then
24458   for cf_add_incdir in $with_hashed_db/include
24459   do
24460         while test "$cf_add_incdir" != /usr/include
24461         do
24462           if test -d "$cf_add_incdir"
24463           then
24464                 cf_have_incdir=no
24465                 if test -n "$CFLAGS$CPPFLAGS" ; then
24466                   # a loop is needed to ensure we can add subdirs of existing dirs
24467                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24468                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24469                           cf_have_incdir=yes; break
24470                         fi
24471                   done
24472                 fi
24473
24474                 if test "$cf_have_incdir" = no ; then
24475                   if test "$cf_add_incdir" = /usr/local/include ; then
24476                         if test "$GCC" = yes
24477                         then
24478                           cf_save_CPPFLAGS=$CPPFLAGS
24479
24480         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24481         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24482
24483                           cat >"conftest.$ac_ext" <<_ACEOF
24484 #line 24484 "configure"
24485 #include "confdefs.h"
24486 #include <stdio.h>
24487 int
24488 main (void)
24489 {
24490 printf("Hello")
24491   ;
24492   return 0;
24493 }
24494 _ACEOF
24495 rm -f "conftest.$ac_objext"
24496 if { (eval echo "$as_me:24496: \"$ac_compile\"") >&5
24497   (eval $ac_compile) 2>&5
24498   ac_status=$?
24499   echo "$as_me:24499: \$? = $ac_status" >&5
24500   (exit "$ac_status"); } &&
24501          { ac_try='test -s "conftest.$ac_objext"'
24502   { (eval echo "$as_me:24502: \"$ac_try\"") >&5
24503   (eval $ac_try) 2>&5
24504   ac_status=$?
24505   echo "$as_me:24505: \$? = $ac_status" >&5
24506   (exit "$ac_status"); }; }; then
24507   :
24508 else
24509   echo "$as_me: failed program was:" >&5
24510 cat "conftest.$ac_ext" >&5
24511 cf_have_incdir=yes
24512 fi
24513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24514                           CPPFLAGS=$cf_save_CPPFLAGS
24515                         fi
24516                   fi
24517                 fi
24518
24519                 if test "$cf_have_incdir" = no ; then
24520                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24521
24522 echo "${as_me:-configure}:24522: testing adding $cf_add_incdir to include-path ..." 1>&5
24523
24524                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24525
24526                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24527                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24528                   cf_add_incdir="$cf_top_incdir"
24529                 else
24530                   break
24531                 fi
24532           else
24533                 break
24534           fi
24535         done
24536   done
24537 fi
24538
24539 if test -n "$with_hashed_db/lib" ; then
24540         for cf_add_libdir in $with_hashed_db/lib
24541         do
24542                 if test "$cf_add_libdir" = /usr/lib ; then
24543                         :
24544                 elif test -d "$cf_add_libdir"
24545                 then
24546                         cf_have_libdir=no
24547                         if test -n "$LDFLAGS$LIBS" ; then
24548                                 # a loop is needed to ensure we can add subdirs of existing dirs
24549                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24550                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24551                                                 cf_have_libdir=yes; break
24552                                         fi
24553                                 done
24554                         fi
24555                         if test "$cf_have_libdir" = no ; then
24556                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24557
24558 echo "${as_me:-configure}:24558: testing adding $cf_add_libdir to library-path ..." 1>&5
24559
24560                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24561                         fi
24562                 fi
24563         done
24564 fi
24565
24566         else
24567                 case "$with_hashed_db" in
24568                 (./*|../*|/*)
24569                         { echo "$as_me:24569: WARNING: no such directory $with_hashed_db" >&5
24570 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24571                         ;;
24572                 (*)
24573
24574 cf_search=
24575
24576 test "x$prefix" != "xNONE" && \
24577 test -d "$prefix" && \
24578  {
24579         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24580         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24581         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24582         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24583         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24584         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24585 }
24586
24587 for cf_subdir_prefix in \
24588         /usr \
24589         /usr/local \
24590         /usr/pkg \
24591         /opt \
24592         /opt/local \
24593         $HOME
24594 do
24595
24596 test "x$cf_subdir_prefix" != "x$prefix" && \
24597 test -d "$cf_subdir_prefix" && \
24598 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24599         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24600         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24601         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24602         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24603         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24604         test -d "$cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include/$with_hashed_db"
24605 }
24606
24607 done
24608
24609         for cf_item in $cf_search
24610         do
24611                 case "$cf_item" in
24612                 (*/$with_hashed_db)
24613
24614 if test -n "$cf_item" ; then
24615   for cf_add_incdir in $cf_item
24616   do
24617         while test "$cf_add_incdir" != /usr/include
24618         do
24619           if test -d "$cf_add_incdir"
24620           then
24621                 cf_have_incdir=no
24622                 if test -n "$CFLAGS$CPPFLAGS" ; then
24623                   # a loop is needed to ensure we can add subdirs of existing dirs
24624                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24625                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24626                           cf_have_incdir=yes; break
24627                         fi
24628                   done
24629                 fi
24630
24631                 if test "$cf_have_incdir" = no ; then
24632                   if test "$cf_add_incdir" = /usr/local/include ; then
24633                         if test "$GCC" = yes
24634                         then
24635                           cf_save_CPPFLAGS=$CPPFLAGS
24636
24637         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24638         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24639
24640                           cat >"conftest.$ac_ext" <<_ACEOF
24641 #line 24641 "configure"
24642 #include "confdefs.h"
24643 #include <stdio.h>
24644 int
24645 main (void)
24646 {
24647 printf("Hello")
24648   ;
24649   return 0;
24650 }
24651 _ACEOF
24652 rm -f "conftest.$ac_objext"
24653 if { (eval echo "$as_me:24653: \"$ac_compile\"") >&5
24654   (eval $ac_compile) 2>&5
24655   ac_status=$?
24656   echo "$as_me:24656: \$? = $ac_status" >&5
24657   (exit "$ac_status"); } &&
24658          { ac_try='test -s "conftest.$ac_objext"'
24659   { (eval echo "$as_me:24659: \"$ac_try\"") >&5
24660   (eval $ac_try) 2>&5
24661   ac_status=$?
24662   echo "$as_me:24662: \$? = $ac_status" >&5
24663   (exit "$ac_status"); }; }; then
24664   :
24665 else
24666   echo "$as_me: failed program was:" >&5
24667 cat "conftest.$ac_ext" >&5
24668 cf_have_incdir=yes
24669 fi
24670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24671                           CPPFLAGS=$cf_save_CPPFLAGS
24672                         fi
24673                   fi
24674                 fi
24675
24676                 if test "$cf_have_incdir" = no ; then
24677                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24678
24679 echo "${as_me:-configure}:24679: testing adding $cf_add_incdir to include-path ..." 1>&5
24680
24681                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24682
24683                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24684                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24685                   cf_add_incdir="$cf_top_incdir"
24686                 else
24687                   break
24688                 fi
24689           else
24690                 break
24691           fi
24692         done
24693   done
24694 fi
24695
24696                         ;;
24697                 esac
24698         done
24699
24700 cf_search=
24701
24702 test "x$prefix" != "xNONE" && \
24703 test -d "$prefix" && \
24704  {
24705         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24706         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24707         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24708         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24709         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24710         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24711 }
24712
24713 for cf_subdir_prefix in \
24714         /usr \
24715         /usr/local \
24716         /usr/pkg \
24717         /opt \
24718         /opt/local \
24719         $HOME
24720 do
24721
24722 test "x$cf_subdir_prefix" != "x$prefix" && \
24723 test -d "$cf_subdir_prefix" && \
24724 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24725         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24726         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24727         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24728         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24729         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24730         test -d "$cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib/$with_hashed_db"
24731 }
24732
24733 done
24734
24735         for cf_item in $cf_search
24736         do
24737                 case "$cf_item" in
24738                 (*/$with_hashed_db)
24739
24740 if test -n "$cf_item" ; then
24741         for cf_add_libdir in $cf_item
24742         do
24743                 if test "$cf_add_libdir" = /usr/lib ; then
24744                         :
24745                 elif test -d "$cf_add_libdir"
24746                 then
24747                         cf_have_libdir=no
24748                         if test -n "$LDFLAGS$LIBS" ; then
24749                                 # a loop is needed to ensure we can add subdirs of existing dirs
24750                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24751                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24752                                                 cf_have_libdir=yes; break
24753                                         fi
24754                                 done
24755                         fi
24756                         if test "$cf_have_libdir" = no ; then
24757                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24758
24759 echo "${as_me:-configure}:24759: testing adding $cf_add_libdir to library-path ..." 1>&5
24760
24761                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24762                         fi
24763                 fi
24764         done
24765 fi
24766
24767                         ;;
24768                 esac
24769         done
24770
24771                         ;;
24772                 esac
24773         fi
24774 esac
24775
24776 echo "$as_me:24776: checking for db.h" >&5
24777 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24778 if test "${ac_cv_header_db_h+set}" = set; then
24779   echo $ECHO_N "(cached) $ECHO_C" >&6
24780 else
24781   cat >"conftest.$ac_ext" <<_ACEOF
24782 #line 24782 "configure"
24783 #include "confdefs.h"
24784 #include <db.h>
24785 _ACEOF
24786 if { (eval echo "$as_me:24786: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24787   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24788   ac_status=$?
24789   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24790   rm -f conftest.er1
24791   cat conftest.err >&5
24792   echo "$as_me:24792: \$? = $ac_status" >&5
24793   (exit "$ac_status"); } >/dev/null; then
24794   if test -s conftest.err; then
24795     ac_cpp_err=$ac_c_preproc_warn_flag
24796   else
24797     ac_cpp_err=
24798   fi
24799 else
24800   ac_cpp_err=yes
24801 fi
24802 if test -z "$ac_cpp_err"; then
24803   ac_cv_header_db_h=yes
24804 else
24805   echo "$as_me: failed program was:" >&5
24806   cat "conftest.$ac_ext" >&5
24807   ac_cv_header_db_h=no
24808 fi
24809 rm -f conftest.err "conftest.$ac_ext"
24810 fi
24811 echo "$as_me:24811: result: $ac_cv_header_db_h" >&5
24812 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24813 if test "$ac_cv_header_db_h" = yes; then
24814
24815 echo "$as_me:24815: checking for version of db" >&5
24816 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24817 if test "${cf_cv_hashed_db_version+set}" = set; then
24818   echo $ECHO_N "(cached) $ECHO_C" >&6
24819 else
24820
24821 cf_cv_hashed_db_version=unknown
24822
24823 for cf_db_version in 1 2 3 4 5 6
24824 do
24825
24826 echo "${as_me:-configure}:24826: testing checking for db version $cf_db_version ..." 1>&5
24827
24828         cat >"conftest.$ac_ext" <<_ACEOF
24829 #line 24829 "configure"
24830 #include "confdefs.h"
24831
24832 $ac_includes_default
24833 #include <db.h>
24834
24835 #ifdef DB_VERSION_MAJOR
24836         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24837 #if $cf_db_version == DB_VERSION_MAJOR
24838         /* ok */
24839 #else
24840         #error $cf_db_version is not DB_VERSION_MAJOR
24841 #endif
24842 #else
24843 #if $cf_db_version == 1
24844         /* ok: assuming this is DB 1.8.5 */
24845 #else
24846         #error $cf_db_version is not 1
24847 #endif
24848 #endif
24849
24850 int
24851 main (void)
24852 {
24853 DBT *foo = 0
24854   ;
24855   return 0;
24856 }
24857 _ACEOF
24858 rm -f "conftest.$ac_objext"
24859 if { (eval echo "$as_me:24859: \"$ac_compile\"") >&5
24860   (eval $ac_compile) 2>&5
24861   ac_status=$?
24862   echo "$as_me:24862: \$? = $ac_status" >&5
24863   (exit "$ac_status"); } &&
24864          { ac_try='test -s "conftest.$ac_objext"'
24865   { (eval echo "$as_me:24865: \"$ac_try\"") >&5
24866   (eval $ac_try) 2>&5
24867   ac_status=$?
24868   echo "$as_me:24868: \$? = $ac_status" >&5
24869   (exit "$ac_status"); }; }; then
24870
24871         cf_cv_hashed_db_version=$cf_db_version
24872         break
24873
24874 else
24875   echo "$as_me: failed program was:" >&5
24876 cat "conftest.$ac_ext" >&5
24877 fi
24878 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24879 done
24880
24881 fi
24882 echo "$as_me:24882: result: $cf_cv_hashed_db_version" >&5
24883 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24884
24885 if test "$cf_cv_hashed_db_version" = unknown ; then
24886         { { echo "$as_me:24886: error: Cannot determine version of db" >&5
24887 echo "$as_me: error: Cannot determine version of db" >&2;}
24888    { (exit 1); exit 1; }; }
24889 else
24890
24891 echo "$as_me:24891: checking for db libraries" >&5
24892 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24893 if test "${cf_cv_hashed_db_libs+set}" = set; then
24894   echo $ECHO_N "(cached) $ECHO_C" >&6
24895 else
24896
24897 cf_cv_hashed_db_libs=unknown
24898 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24899 do
24900         cf_save_libs="$LIBS"
24901         if test -n "$cf_db_libs"; then
24902
24903 cf_add_libs="$LIBS"
24904 # reverse order
24905 cf_add_0lib=
24906 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24907 # filter duplicates
24908 for cf_add_1lib in $cf_add_0lib; do
24909         for cf_add_2lib in $cf_add_libs; do
24910                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24911                         cf_add_1lib=
24912                         break
24913                 fi
24914         done
24915         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24916 done
24917 LIBS="$cf_add_libs"
24918
24919         fi
24920
24921 echo "${as_me:-configure}:24921: testing checking for library $cf_db_libs ..." 1>&5
24922
24923         cat >"conftest.$ac_ext" <<_ACEOF
24924 #line 24924 "configure"
24925 #include "confdefs.h"
24926
24927 $ac_includes_default
24928 #include <db.h>
24929
24930 int
24931 main (void)
24932 {
24933
24934         char *path = "/tmp/foo";
24935 #ifdef DB_VERSION_MAJOR
24936 #if DB_VERSION_MAJOR >= 4
24937         DB *result = 0;
24938         db_create(&result, NULL, 0);
24939         result->open(result,
24940                 NULL,
24941                 path,
24942                 path,
24943                 DB_HASH,
24944                 DB_CREATE,
24945                 0644);
24946 #elif DB_VERSION_MAJOR >= 3
24947         DB *result = 0;
24948         db_create(&result, NULL, 0);
24949         result->open(result,
24950                 path,
24951                 path,
24952                 DB_HASH,
24953                 DB_CREATE,
24954                 0644);
24955 #elif DB_VERSION_MAJOR >= 2
24956         DB *result = 0;
24957         db_open(path,
24958                 DB_HASH,
24959                 DB_CREATE,
24960                 0644,
24961                 (DB_ENV *) 0,
24962                 (DB_INFO *) 0,
24963                 &result);
24964 #endif /* DB_VERSION_MAJOR */
24965 #else
24966         DB *result = dbopen(path,
24967                      2,
24968                      0644,
24969                      DB_HASH,
24970                      0);
24971 #endif
24972         ${cf_cv_main_return:-return}(result != 0)
24973
24974   ;
24975   return 0;
24976 }
24977 _ACEOF
24978 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24979 if { (eval echo "$as_me:24979: \"$ac_link\"") >&5
24980   (eval $ac_link) 2>&5
24981   ac_status=$?
24982   echo "$as_me:24982: \$? = $ac_status" >&5
24983   (exit "$ac_status"); } &&
24984          { ac_try='test -s "conftest$ac_exeext"'
24985   { (eval echo "$as_me:24985: \"$ac_try\"") >&5
24986   (eval $ac_try) 2>&5
24987   ac_status=$?
24988   echo "$as_me:24988: \$? = $ac_status" >&5
24989   (exit "$ac_status"); }; }; then
24990
24991         if test -n "$cf_db_libs" ; then
24992                 cf_cv_hashed_db_libs=$cf_db_libs
24993         else
24994                 cf_cv_hashed_db_libs=default
24995         fi
24996         LIBS="$cf_save_libs"
24997         break
24998
24999 else
25000   echo "$as_me: failed program was:" >&5
25001 cat "conftest.$ac_ext" >&5
25002 fi
25003 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25004         LIBS="$cf_save_libs"
25005 done
25006
25007 fi
25008 echo "$as_me:25008: result: $cf_cv_hashed_db_libs" >&5
25009 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25010
25011         if test "$cf_cv_hashed_db_libs" = unknown ; then
25012                 { { echo "$as_me:25012: error: Cannot determine library for db" >&5
25013 echo "$as_me: error: Cannot determine library for db" >&2;}
25014    { (exit 1); exit 1; }; }
25015         elif test "$cf_cv_hashed_db_libs" != default ; then
25016
25017 cf_add_libs="$LIBS"
25018 # reverse order
25019 cf_add_0lib=
25020 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25021 # filter duplicates
25022 for cf_add_1lib in $cf_add_0lib; do
25023         for cf_add_2lib in $cf_add_libs; do
25024                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25025                         cf_add_1lib=
25026                         break
25027                 fi
25028         done
25029         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25030 done
25031 LIBS="$cf_add_libs"
25032
25033         fi
25034 fi
25035
25036 else
25037
25038         { { echo "$as_me:25038: error: Cannot find db.h" >&5
25039 echo "$as_me: error: Cannot find db.h" >&2;}
25040    { (exit 1); exit 1; }; }
25041
25042 fi
25043
25044 fi
25045
25046 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25047         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25048         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25049 fi
25050
25051 # Just in case, check if the C compiler has a bool type.
25052
25053 echo "$as_me:25053: checking if we should include stdbool.h" >&5
25054 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25055
25056 if test "${cf_cv_header_stdbool_h+set}" = set; then
25057   echo $ECHO_N "(cached) $ECHO_C" >&6
25058 else
25059
25060         cat >"conftest.$ac_ext" <<_ACEOF
25061 #line 25061 "configure"
25062 #include "confdefs.h"
25063
25064 int
25065 main (void)
25066 {
25067 bool foo = false
25068   ;
25069   return 0;
25070 }
25071 _ACEOF
25072 rm -f "conftest.$ac_objext"
25073 if { (eval echo "$as_me:25073: \"$ac_compile\"") >&5
25074   (eval $ac_compile) 2>&5
25075   ac_status=$?
25076   echo "$as_me:25076: \$? = $ac_status" >&5
25077   (exit "$ac_status"); } &&
25078          { ac_try='test -s "conftest.$ac_objext"'
25079   { (eval echo "$as_me:25079: \"$ac_try\"") >&5
25080   (eval $ac_try) 2>&5
25081   ac_status=$?
25082   echo "$as_me:25082: \$? = $ac_status" >&5
25083   (exit "$ac_status"); }; }; then
25084   cf_cv_header_stdbool_h=0
25085 else
25086   echo "$as_me: failed program was:" >&5
25087 cat "conftest.$ac_ext" >&5
25088 cat >"conftest.$ac_ext" <<_ACEOF
25089 #line 25089 "configure"
25090 #include "confdefs.h"
25091
25092 #ifndef __BEOS__
25093 #include <stdbool.h>
25094 #endif
25095
25096 int
25097 main (void)
25098 {
25099 bool foo = false
25100   ;
25101   return 0;
25102 }
25103 _ACEOF
25104 rm -f "conftest.$ac_objext"
25105 if { (eval echo "$as_me:25105: \"$ac_compile\"") >&5
25106   (eval $ac_compile) 2>&5
25107   ac_status=$?
25108   echo "$as_me:25108: \$? = $ac_status" >&5
25109   (exit "$ac_status"); } &&
25110          { ac_try='test -s "conftest.$ac_objext"'
25111   { (eval echo "$as_me:25111: \"$ac_try\"") >&5
25112   (eval $ac_try) 2>&5
25113   ac_status=$?
25114   echo "$as_me:25114: \$? = $ac_status" >&5
25115   (exit "$ac_status"); }; }; then
25116   cf_cv_header_stdbool_h=1
25117 else
25118   echo "$as_me: failed program was:" >&5
25119 cat "conftest.$ac_ext" >&5
25120 cf_cv_header_stdbool_h=0
25121 fi
25122 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25123 fi
25124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25125 fi
25126
25127 if test "$cf_cv_header_stdbool_h" = 1
25128 then    echo "$as_me:25128: result: yes" >&5
25129 echo "${ECHO_T}yes" >&6
25130 else    echo "$as_me:25130: result: no" >&5
25131 echo "${ECHO_T}no" >&6
25132 fi
25133
25134 echo "$as_me:25134: checking for builtin bool type" >&5
25135 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25136
25137 if test "${cf_cv_cc_bool_type+set}" = set; then
25138   echo $ECHO_N "(cached) $ECHO_C" >&6
25139 else
25140
25141         cat >"conftest.$ac_ext" <<_ACEOF
25142 #line 25142 "configure"
25143 #include "confdefs.h"
25144
25145 #include <stdio.h>
25146 #include <sys/types.h>
25147
25148 int
25149 main (void)
25150 {
25151 bool x = false
25152   ;
25153   return 0;
25154 }
25155 _ACEOF
25156 rm -f "conftest.$ac_objext"
25157 if { (eval echo "$as_me:25157: \"$ac_compile\"") >&5
25158   (eval $ac_compile) 2>&5
25159   ac_status=$?
25160   echo "$as_me:25160: \$? = $ac_status" >&5
25161   (exit "$ac_status"); } &&
25162          { ac_try='test -s "conftest.$ac_objext"'
25163   { (eval echo "$as_me:25163: \"$ac_try\"") >&5
25164   (eval $ac_try) 2>&5
25165   ac_status=$?
25166   echo "$as_me:25166: \$? = $ac_status" >&5
25167   (exit "$ac_status"); }; }; then
25168   cf_cv_cc_bool_type=1
25169 else
25170   echo "$as_me: failed program was:" >&5
25171 cat "conftest.$ac_ext" >&5
25172 cf_cv_cc_bool_type=0
25173 fi
25174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25175
25176 fi
25177
25178 if test "$cf_cv_cc_bool_type" = 1
25179 then    echo "$as_me:25179: result: yes" >&5
25180 echo "${ECHO_T}yes" >&6
25181 else    echo "$as_me:25181: result: no" >&5
25182 echo "${ECHO_T}no" >&6
25183 fi
25184
25185 # Check for C++ compiler characteristics (and ensure that it's there!)
25186 if test -n "$CXX" ; then
25187         ac_ext=cc
25188 ac_cpp='$CXXCPP $CPPFLAGS'
25189 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25190 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25191 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25192 ac_main_return="return"
25193
25194 if test -n "$GXX" ; then
25195
25196         cf_save="$LIBS"
25197         LIBS="$LIBS $CXXLIBS"
25198         echo "$as_me:25198: checking if we already have C++ library" >&5
25199 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25200         cat >"conftest.$ac_ext" <<_ACEOF
25201 #line 25201 "configure"
25202 #include "confdefs.h"
25203
25204                         #include <iostream>
25205 int
25206 main (void)
25207 {
25208
25209                         std::cout << "Hello World!" << std::endl;
25210   ;
25211   return 0;
25212 }
25213 _ACEOF
25214 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25215 if { (eval echo "$as_me:25215: \"$ac_link\"") >&5
25216   (eval $ac_link) 2>&5
25217   ac_status=$?
25218   echo "$as_me:25218: \$? = $ac_status" >&5
25219   (exit "$ac_status"); } &&
25220          { ac_try='test -s "conftest$ac_exeext"'
25221   { (eval echo "$as_me:25221: \"$ac_try\"") >&5
25222   (eval $ac_try) 2>&5
25223   ac_status=$?
25224   echo "$as_me:25224: \$? = $ac_status" >&5
25225   (exit "$ac_status"); }; }; then
25226   cf_have_libstdcpp=yes
25227 else
25228   echo "$as_me: failed program was:" >&5
25229 cat "conftest.$ac_ext" >&5
25230 cf_have_libstdcpp=no
25231 fi
25232 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25233         echo "$as_me:25233: result: $cf_have_libstdcpp" >&5
25234 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25235         LIBS="$cf_save"
25236
25237         if test "$cf_have_libstdcpp" != yes
25238         then
25239                 case "$cf_cv_system_name" in
25240                 (os2*)
25241                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25242                                 cf_stdcpp_libname=stdcpp
25243                         else
25244                                 cf_stdcpp_libname=stdc++
25245                         fi
25246                         ;;
25247                 (*)
25248                         cf_stdcpp_libname=stdc++
25249                         ;;
25250                 esac
25251
25252                 echo "$as_me:25252: checking for library $cf_stdcpp_libname" >&5
25253 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25254 if test "${cf_cv_libstdcpp+set}" = set; then
25255   echo $ECHO_N "(cached) $ECHO_C" >&6
25256 else
25257
25258                         cf_save="$LIBS"
25259                         LIBS="$LIBS $CXXLIBS"
25260
25261 cf_add_libs="$LIBS"
25262 # reverse order
25263 cf_add_0lib=
25264 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25265 # filter duplicates
25266 for cf_add_1lib in $cf_add_0lib; do
25267         for cf_add_2lib in $cf_add_libs; do
25268                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25269                         cf_add_1lib=
25270                         break
25271                 fi
25272         done
25273         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25274 done
25275 LIBS="$cf_add_libs"
25276
25277                 cat >"conftest.$ac_ext" <<_ACEOF
25278 #line 25278 "configure"
25279 #include "confdefs.h"
25280
25281                                 #include <iostream>
25282 int
25283 main (void)
25284 {
25285
25286                                 std::cout << "Hello World!" << std::endl;
25287   ;
25288   return 0;
25289 }
25290 _ACEOF
25291 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25292 if { (eval echo "$as_me:25292: \"$ac_link\"") >&5
25293   (eval $ac_link) 2>&5
25294   ac_status=$?
25295   echo "$as_me:25295: \$? = $ac_status" >&5
25296   (exit "$ac_status"); } &&
25297          { ac_try='test -s "conftest$ac_exeext"'
25298   { (eval echo "$as_me:25298: \"$ac_try\"") >&5
25299   (eval $ac_try) 2>&5
25300   ac_status=$?
25301   echo "$as_me:25301: \$? = $ac_status" >&5
25302   (exit "$ac_status"); }; }; then
25303   cf_cv_libstdcpp=yes
25304 else
25305   echo "$as_me: failed program was:" >&5
25306 cat "conftest.$ac_ext" >&5
25307 cf_cv_libstdcpp=no
25308 fi
25309 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25310                         LIBS="$cf_save"
25311
25312 fi
25313 echo "$as_me:25313: result: $cf_cv_libstdcpp" >&5
25314 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25315                 test "$cf_cv_libstdcpp" = yes && {
25316 cf_add_libs="$CXXLIBS"
25317 # reverse order
25318 cf_add_0lib=
25319 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25320 # filter duplicates
25321 for cf_add_1lib in $cf_add_0lib; do
25322         for cf_add_2lib in $cf_add_libs; do
25323                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25324                         cf_add_1lib=
25325                         break
25326                 fi
25327         done
25328         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25329 done
25330 CXXLIBS="$cf_add_libs"
25331  }
25332         fi
25333 fi
25334
25335         echo "$as_me:25335: checking whether $CXX understands -c and -o together" >&5
25336 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25337 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25338   echo $ECHO_N "(cached) $ECHO_C" >&6
25339 else
25340
25341 cat > conftest.$ac_ext <<CF_EOF
25342 int main(void)
25343 {
25344         ${cf_cv_main_return:-return}(0);
25345 }
25346 CF_EOF
25347 # We do the test twice because some compilers refuse to overwrite an
25348 # existing .o file with -o, though they will create one.
25349 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25350 if { (eval echo "$as_me:25350: \"$ac_try\"") >&5
25351   (eval $ac_try) 2>&5
25352   ac_status=$?
25353   echo "$as_me:25353: \$? = $ac_status" >&5
25354   (exit "$ac_status"); } &&
25355   test -f conftest2.$ac_objext && { (eval echo "$as_me:25355: \"$ac_try\"") >&5
25356   (eval $ac_try) 2>&5
25357   ac_status=$?
25358   echo "$as_me:25358: \$? = $ac_status" >&5
25359   (exit "$ac_status"); };
25360 then
25361   eval cf_cv_prog_CXX_c_o=yes
25362 else
25363   eval cf_cv_prog_CXX_c_o=no
25364 fi
25365 rm -rf ./conftest*
25366
25367 fi
25368 if test "$cf_cv_prog_CXX_c_o" = yes; then
25369   echo "$as_me:25369: result: yes" >&5
25370 echo "${ECHO_T}yes" >&6
25371 else
25372   echo "$as_me:25372: result: no" >&5
25373 echo "${ECHO_T}no" >&6
25374 fi
25375
25376         case "$GXX_VERSION" in
25377         (1.*|2.[0-6]*|[1-9][0-9].*)
25378                 cf_cxx_library=yes
25379                 ;;
25380         (*-2.7*|2.7*)
25381
25382 cf_cxx_library=unknown
25383 case "$cf_cv_system_name" in
25384 (os2*)
25385         cf_gpp_libname=gpp
25386         ;;
25387 (*)
25388         cf_gpp_libname=g++
25389         ;;
25390 esac
25391 if test "$GXX" = yes; then
25392         echo "$as_me:25392: checking for lib$cf_gpp_libname" >&5
25393 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25394         cf_save="$LIBS"
25395
25396 cf_add_libs="$LIBS"
25397 # reverse order
25398 cf_add_0lib=
25399 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25400 # filter duplicates
25401 for cf_add_1lib in $cf_add_0lib; do
25402         for cf_add_2lib in $cf_add_libs; do
25403                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25404                         cf_add_1lib=
25405                         break
25406                 fi
25407         done
25408         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25409 done
25410 LIBS="$cf_add_libs"
25411
25412         cat >"conftest.$ac_ext" <<_ACEOF
25413 #line 25413 "configure"
25414 #include "confdefs.h"
25415
25416 #include <$cf_gpp_libname/builtin.h>
25417
25418 int
25419 main (void)
25420 {
25421 two_arg_error_handler_t foo2 = lib_error_handler
25422   ;
25423   return 0;
25424 }
25425 _ACEOF
25426 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25427 if { (eval echo "$as_me:25427: \"$ac_link\"") >&5
25428   (eval $ac_link) 2>&5
25429   ac_status=$?
25430   echo "$as_me:25430: \$? = $ac_status" >&5
25431   (exit "$ac_status"); } &&
25432          { ac_try='test -s "conftest$ac_exeext"'
25433   { (eval echo "$as_me:25433: \"$ac_try\"") >&5
25434   (eval $ac_try) 2>&5
25435   ac_status=$?
25436   echo "$as_me:25436: \$? = $ac_status" >&5
25437   (exit "$ac_status"); }; }; then
25438   cf_cxx_library=yes
25439
25440 cf_add_libs="$CXXLIBS"
25441 # reverse order
25442 cf_add_0lib=
25443 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25444 # filter duplicates
25445 for cf_add_1lib in $cf_add_0lib; do
25446         for cf_add_2lib in $cf_add_libs; do
25447                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25448                         cf_add_1lib=
25449                         break
25450                 fi
25451         done
25452         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25453 done
25454 CXXLIBS="$cf_add_libs"
25455
25456          if test "$cf_gpp_libname" = cpp ; then
25457
25458 cat >>confdefs.h <<\EOF
25459 #define HAVE_GPP_BUILTIN_H 1
25460 EOF
25461
25462          else
25463
25464 cat >>confdefs.h <<\EOF
25465 #define HAVE_GXX_BUILTIN_H 1
25466 EOF
25467
25468          fi
25469 else
25470   echo "$as_me: failed program was:" >&5
25471 cat "conftest.$ac_ext" >&5
25472 cat >"conftest.$ac_ext" <<_ACEOF
25473 #line 25473 "configure"
25474 #include "confdefs.h"
25475
25476 #include <builtin.h>
25477
25478 int
25479 main (void)
25480 {
25481 two_arg_error_handler_t foo2 = lib_error_handler
25482   ;
25483   return 0;
25484 }
25485 _ACEOF
25486 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25487 if { (eval echo "$as_me:25487: \"$ac_link\"") >&5
25488   (eval $ac_link) 2>&5
25489   ac_status=$?
25490   echo "$as_me:25490: \$? = $ac_status" >&5
25491   (exit "$ac_status"); } &&
25492          { ac_try='test -s "conftest$ac_exeext"'
25493   { (eval echo "$as_me:25493: \"$ac_try\"") >&5
25494   (eval $ac_try) 2>&5
25495   ac_status=$?
25496   echo "$as_me:25496: \$? = $ac_status" >&5
25497   (exit "$ac_status"); }; }; then
25498   cf_cxx_library=yes
25499
25500 cf_add_libs="$CXXLIBS"
25501 # reverse order
25502 cf_add_0lib=
25503 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25504 # filter duplicates
25505 for cf_add_1lib in $cf_add_0lib; do
25506         for cf_add_2lib in $cf_add_libs; do
25507                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25508                         cf_add_1lib=
25509                         break
25510                 fi
25511         done
25512         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25513 done
25514 CXXLIBS="$cf_add_libs"
25515
25516 cat >>confdefs.h <<\EOF
25517 #define HAVE_BUILTIN_H 1
25518 EOF
25519
25520 else
25521   echo "$as_me: failed program was:" >&5
25522 cat "conftest.$ac_ext" >&5
25523 cf_cxx_library=no
25524 fi
25525 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25526 fi
25527 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25528         LIBS="$cf_save"
25529         echo "$as_me:25529: result: $cf_cxx_library" >&5
25530 echo "${ECHO_T}$cf_cxx_library" >&6
25531 fi
25532
25533                 ;;
25534         (*)
25535                 cf_cxx_library=no
25536                 ;;
25537         esac
25538
25539         ac_ext=cc
25540 ac_cpp='$CXXCPP $CPPFLAGS'
25541 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25542 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25543 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25544 ac_main_return="return"
25545 echo "$as_me:25545: checking how to run the C++ preprocessor" >&5
25546 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25547 if test -z "$CXXCPP"; then
25548   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25549   echo $ECHO_N "(cached) $ECHO_C" >&6
25550 else
25551       # Double quotes because CXXCPP needs to be expanded
25552     for CXXCPP in "$CXX -E" "/lib/cpp"
25553     do
25554       ac_preproc_ok=false
25555 for ac_cxx_preproc_warn_flag in '' yes
25556 do
25557   # Use a header file that comes with gcc, so configuring glibc
25558   # with a fresh cross-compiler works.
25559   # On the NeXT, cc -E runs the code through the compiler's parser,
25560   # not just through cpp. "Syntax error" is here to catch this case.
25561   cat >"conftest.$ac_ext" <<_ACEOF
25562 #line 25562 "configure"
25563 #include "confdefs.h"
25564 #include <assert.h>
25565                      Syntax error
25566 _ACEOF
25567 if { (eval echo "$as_me:25567: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25568   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25569   ac_status=$?
25570   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25571   rm -f conftest.er1
25572   cat conftest.err >&5
25573   echo "$as_me:25573: \$? = $ac_status" >&5
25574   (exit "$ac_status"); } >/dev/null; then
25575   if test -s conftest.err; then
25576     ac_cpp_err=$ac_cxx_preproc_warn_flag
25577   else
25578     ac_cpp_err=
25579   fi
25580 else
25581   ac_cpp_err=yes
25582 fi
25583 if test -z "$ac_cpp_err"; then
25584   :
25585 else
25586   echo "$as_me: failed program was:" >&5
25587   cat "conftest.$ac_ext" >&5
25588   # Broken: fails on valid input.
25589 continue
25590 fi
25591 rm -f conftest.err "conftest.$ac_ext"
25592
25593   # OK, works on sane cases.  Now check whether non-existent headers
25594   # can be detected and how.
25595   cat >"conftest.$ac_ext" <<_ACEOF
25596 #line 25596 "configure"
25597 #include "confdefs.h"
25598 #include <ac_nonexistent.h>
25599 _ACEOF
25600 if { (eval echo "$as_me:25600: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25601   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25602   ac_status=$?
25603   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25604   rm -f conftest.er1
25605   cat conftest.err >&5
25606   echo "$as_me:25606: \$? = $ac_status" >&5
25607   (exit "$ac_status"); } >/dev/null; then
25608   if test -s conftest.err; then
25609     ac_cpp_err=$ac_cxx_preproc_warn_flag
25610   else
25611     ac_cpp_err=
25612   fi
25613 else
25614   ac_cpp_err=yes
25615 fi
25616 if test -z "$ac_cpp_err"; then
25617   # Broken: success on invalid input.
25618 continue
25619 else
25620   echo "$as_me: failed program was:" >&5
25621   cat "conftest.$ac_ext" >&5
25622   # Passes both tests.
25623 ac_preproc_ok=:
25624 break
25625 fi
25626 rm -f conftest.err "conftest.$ac_ext"
25627
25628 done
25629 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25630 rm -f conftest.err "conftest.$ac_ext"
25631 if $ac_preproc_ok; then
25632   break
25633 fi
25634
25635     done
25636     ac_cv_prog_CXXCPP=$CXXCPP
25637
25638 fi
25639   CXXCPP=$ac_cv_prog_CXXCPP
25640 else
25641   ac_cv_prog_CXXCPP=$CXXCPP
25642 fi
25643 echo "$as_me:25643: result: $CXXCPP" >&5
25644 echo "${ECHO_T}$CXXCPP" >&6
25645 ac_preproc_ok=false
25646 for ac_cxx_preproc_warn_flag in '' yes
25647 do
25648   # Use a header file that comes with gcc, so configuring glibc
25649   # with a fresh cross-compiler works.
25650   # On the NeXT, cc -E runs the code through the compiler's parser,
25651   # not just through cpp. "Syntax error" is here to catch this case.
25652   cat >"conftest.$ac_ext" <<_ACEOF
25653 #line 25653 "configure"
25654 #include "confdefs.h"
25655 #include <assert.h>
25656                      Syntax error
25657 _ACEOF
25658 if { (eval echo "$as_me:25658: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25659   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25660   ac_status=$?
25661   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25662   rm -f conftest.er1
25663   cat conftest.err >&5
25664   echo "$as_me:25664: \$? = $ac_status" >&5
25665   (exit "$ac_status"); } >/dev/null; then
25666   if test -s conftest.err; then
25667     ac_cpp_err=$ac_cxx_preproc_warn_flag
25668   else
25669     ac_cpp_err=
25670   fi
25671 else
25672   ac_cpp_err=yes
25673 fi
25674 if test -z "$ac_cpp_err"; then
25675   :
25676 else
25677   echo "$as_me: failed program was:" >&5
25678   cat "conftest.$ac_ext" >&5
25679   # Broken: fails on valid input.
25680 continue
25681 fi
25682 rm -f conftest.err "conftest.$ac_ext"
25683
25684   # OK, works on sane cases.  Now check whether non-existent headers
25685   # can be detected and how.
25686   cat >"conftest.$ac_ext" <<_ACEOF
25687 #line 25687 "configure"
25688 #include "confdefs.h"
25689 #include <ac_nonexistent.h>
25690 _ACEOF
25691 if { (eval echo "$as_me:25691: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25692   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25693   ac_status=$?
25694   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25695   rm -f conftest.er1
25696   cat conftest.err >&5
25697   echo "$as_me:25697: \$? = $ac_status" >&5
25698   (exit "$ac_status"); } >/dev/null; then
25699   if test -s conftest.err; then
25700     ac_cpp_err=$ac_cxx_preproc_warn_flag
25701   else
25702     ac_cpp_err=
25703   fi
25704 else
25705   ac_cpp_err=yes
25706 fi
25707 if test -z "$ac_cpp_err"; then
25708   # Broken: success on invalid input.
25709 continue
25710 else
25711   echo "$as_me: failed program was:" >&5
25712   cat "conftest.$ac_ext" >&5
25713   # Passes both tests.
25714 ac_preproc_ok=:
25715 break
25716 fi
25717 rm -f conftest.err "conftest.$ac_ext"
25718
25719 done
25720 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25721 rm -f conftest.err "conftest.$ac_ext"
25722 if $ac_preproc_ok; then
25723   :
25724 else
25725   { { echo "$as_me:25725: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25726 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25727    { (exit 1); exit 1; }; }
25728 fi
25729
25730 ac_ext=cc
25731 ac_cpp='$CXXCPP $CPPFLAGS'
25732 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25733 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25734 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25735 ac_main_return="return"
25736
25737 for ac_header in typeinfo
25738 do
25739 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25740 echo "$as_me:25740: checking for $ac_header" >&5
25741 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25742 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25743   echo $ECHO_N "(cached) $ECHO_C" >&6
25744 else
25745   cat >"conftest.$ac_ext" <<_ACEOF
25746 #line 25746 "configure"
25747 #include "confdefs.h"
25748 #include <$ac_header>
25749 _ACEOF
25750 if { (eval echo "$as_me:25750: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25751   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25752   ac_status=$?
25753   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25754   rm -f conftest.er1
25755   cat conftest.err >&5
25756   echo "$as_me:25756: \$? = $ac_status" >&5
25757   (exit "$ac_status"); } >/dev/null; then
25758   if test -s conftest.err; then
25759     ac_cpp_err=$ac_cxx_preproc_warn_flag
25760   else
25761     ac_cpp_err=
25762   fi
25763 else
25764   ac_cpp_err=yes
25765 fi
25766 if test -z "$ac_cpp_err"; then
25767   eval "$as_ac_Header=yes"
25768 else
25769   echo "$as_me: failed program was:" >&5
25770   cat "conftest.$ac_ext" >&5
25771   eval "$as_ac_Header=no"
25772 fi
25773 rm -f conftest.err "conftest.$ac_ext"
25774 fi
25775 echo "$as_me:25775: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25776 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25777 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25778   cat >>confdefs.h <<EOF
25779 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25780 EOF
25781
25782 fi
25783 done
25784
25785 for ac_header in iostream
25786 do
25787 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25788 echo "$as_me:25788: checking for $ac_header" >&5
25789 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25790 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25791   echo $ECHO_N "(cached) $ECHO_C" >&6
25792 else
25793   cat >"conftest.$ac_ext" <<_ACEOF
25794 #line 25794 "configure"
25795 #include "confdefs.h"
25796 #include <$ac_header>
25797 _ACEOF
25798 if { (eval echo "$as_me:25798: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25799   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25800   ac_status=$?
25801   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25802   rm -f conftest.er1
25803   cat conftest.err >&5
25804   echo "$as_me:25804: \$? = $ac_status" >&5
25805   (exit "$ac_status"); } >/dev/null; then
25806   if test -s conftest.err; then
25807     ac_cpp_err=$ac_cxx_preproc_warn_flag
25808   else
25809     ac_cpp_err=
25810   fi
25811 else
25812   ac_cpp_err=yes
25813 fi
25814 if test -z "$ac_cpp_err"; then
25815   eval "$as_ac_Header=yes"
25816 else
25817   echo "$as_me: failed program was:" >&5
25818   cat "conftest.$ac_ext" >&5
25819   eval "$as_ac_Header=no"
25820 fi
25821 rm -f conftest.err "conftest.$ac_ext"
25822 fi
25823 echo "$as_me:25823: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25824 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25825 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25826   cat >>confdefs.h <<EOF
25827 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25828 EOF
25829
25830 fi
25831 done
25832
25833 if test x"$ac_cv_header_iostream" = xyes ; then
25834         echo "$as_me:25834: checking if iostream uses std-namespace" >&5
25835 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25836         cat >"conftest.$ac_ext" <<_ACEOF
25837 #line 25837 "configure"
25838 #include "confdefs.h"
25839
25840 #include <iostream>
25841 using std::endl;
25842 using std::cerr;
25843 int
25844 main (void)
25845 {
25846
25847 cerr << "testing" << endl;
25848
25849   ;
25850   return 0;
25851 }
25852 _ACEOF
25853 rm -f "conftest.$ac_objext"
25854 if { (eval echo "$as_me:25854: \"$ac_compile\"") >&5
25855   (eval $ac_compile) 2>&5
25856   ac_status=$?
25857   echo "$as_me:25857: \$? = $ac_status" >&5
25858   (exit "$ac_status"); } &&
25859          { ac_try='test -s "conftest.$ac_objext"'
25860   { (eval echo "$as_me:25860: \"$ac_try\"") >&5
25861   (eval $ac_try) 2>&5
25862   ac_status=$?
25863   echo "$as_me:25863: \$? = $ac_status" >&5
25864   (exit "$ac_status"); }; }; then
25865   cf_iostream_namespace=yes
25866 else
25867   echo "$as_me: failed program was:" >&5
25868 cat "conftest.$ac_ext" >&5
25869 cf_iostream_namespace=no
25870 fi
25871 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25872         echo "$as_me:25872: result: $cf_iostream_namespace" >&5
25873 echo "${ECHO_T}$cf_iostream_namespace" >&6
25874         if test "$cf_iostream_namespace" = yes ; then
25875
25876 cat >>confdefs.h <<\EOF
25877 #define IOSTREAM_NAMESPACE 1
25878 EOF
25879
25880         fi
25881 fi
25882
25883 echo "$as_me:25883: checking if we should include stdbool.h" >&5
25884 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25885
25886 if test "${cf_cv_header_stdbool_h+set}" = set; then
25887   echo $ECHO_N "(cached) $ECHO_C" >&6
25888 else
25889
25890         cat >"conftest.$ac_ext" <<_ACEOF
25891 #line 25891 "configure"
25892 #include "confdefs.h"
25893
25894 int
25895 main (void)
25896 {
25897 bool foo = false
25898   ;
25899   return 0;
25900 }
25901 _ACEOF
25902 rm -f "conftest.$ac_objext"
25903 if { (eval echo "$as_me:25903: \"$ac_compile\"") >&5
25904   (eval $ac_compile) 2>&5
25905   ac_status=$?
25906   echo "$as_me:25906: \$? = $ac_status" >&5
25907   (exit "$ac_status"); } &&
25908          { ac_try='test -s "conftest.$ac_objext"'
25909   { (eval echo "$as_me:25909: \"$ac_try\"") >&5
25910   (eval $ac_try) 2>&5
25911   ac_status=$?
25912   echo "$as_me:25912: \$? = $ac_status" >&5
25913   (exit "$ac_status"); }; }; then
25914   cf_cv_header_stdbool_h=0
25915 else
25916   echo "$as_me: failed program was:" >&5
25917 cat "conftest.$ac_ext" >&5
25918 cat >"conftest.$ac_ext" <<_ACEOF
25919 #line 25919 "configure"
25920 #include "confdefs.h"
25921
25922 #ifndef __BEOS__
25923 #include <stdbool.h>
25924 #endif
25925
25926 int
25927 main (void)
25928 {
25929 bool foo = false
25930   ;
25931   return 0;
25932 }
25933 _ACEOF
25934 rm -f "conftest.$ac_objext"
25935 if { (eval echo "$as_me:25935: \"$ac_compile\"") >&5
25936   (eval $ac_compile) 2>&5
25937   ac_status=$?
25938   echo "$as_me:25938: \$? = $ac_status" >&5
25939   (exit "$ac_status"); } &&
25940          { ac_try='test -s "conftest.$ac_objext"'
25941   { (eval echo "$as_me:25941: \"$ac_try\"") >&5
25942   (eval $ac_try) 2>&5
25943   ac_status=$?
25944   echo "$as_me:25944: \$? = $ac_status" >&5
25945   (exit "$ac_status"); }; }; then
25946   cf_cv_header_stdbool_h=1
25947 else
25948   echo "$as_me: failed program was:" >&5
25949 cat "conftest.$ac_ext" >&5
25950 cf_cv_header_stdbool_h=0
25951 fi
25952 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25953 fi
25954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25955 fi
25956
25957 if test "$cf_cv_header_stdbool_h" = 1
25958 then    echo "$as_me:25958: result: yes" >&5
25959 echo "${ECHO_T}yes" >&6
25960 else    echo "$as_me:25960: result: no" >&5
25961 echo "${ECHO_T}no" >&6
25962 fi
25963
25964 echo "$as_me:25964: checking for builtin bool type" >&5
25965 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25966
25967 if test "${cf_cv_builtin_bool+set}" = set; then
25968   echo $ECHO_N "(cached) $ECHO_C" >&6
25969 else
25970
25971         cat >"conftest.$ac_ext" <<_ACEOF
25972 #line 25972 "configure"
25973 #include "confdefs.h"
25974
25975 #include <stdio.h>
25976 #include <sys/types.h>
25977
25978 int
25979 main (void)
25980 {
25981 bool x = false
25982   ;
25983   return 0;
25984 }
25985 _ACEOF
25986 rm -f "conftest.$ac_objext"
25987 if { (eval echo "$as_me:25987: \"$ac_compile\"") >&5
25988   (eval $ac_compile) 2>&5
25989   ac_status=$?
25990   echo "$as_me:25990: \$? = $ac_status" >&5
25991   (exit "$ac_status"); } &&
25992          { ac_try='test -s "conftest.$ac_objext"'
25993   { (eval echo "$as_me:25993: \"$ac_try\"") >&5
25994   (eval $ac_try) 2>&5
25995   ac_status=$?
25996   echo "$as_me:25996: \$? = $ac_status" >&5
25997   (exit "$ac_status"); }; }; then
25998   cf_cv_builtin_bool=1
25999 else
26000   echo "$as_me: failed program was:" >&5
26001 cat "conftest.$ac_ext" >&5
26002 cf_cv_builtin_bool=0
26003 fi
26004 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26005
26006 fi
26007
26008 if test "$cf_cv_builtin_bool" = 1
26009 then    echo "$as_me:26009: result: yes" >&5
26010 echo "${ECHO_T}yes" >&6
26011 else    echo "$as_me:26011: result: no" >&5
26012 echo "${ECHO_T}no" >&6
26013 fi
26014
26015 echo "$as_me:26015: checking for bool" >&5
26016 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26017 if test "${ac_cv_type_bool+set}" = set; then
26018   echo $ECHO_N "(cached) $ECHO_C" >&6
26019 else
26020   cat >"conftest.$ac_ext" <<_ACEOF
26021 #line 26021 "configure"
26022 #include "confdefs.h"
26023
26024 $ac_includes_default
26025
26026 #if defined(__cplusplus)
26027
26028 #ifdef HAVE_GXX_BUILTIN_H
26029 #include <g++/builtin.h>
26030 #elif HAVE_GPP_BUILTIN_H
26031 #include <gpp/builtin.h>
26032 #elif HAVE_BUILTIN_H
26033 #include <builtin.h>
26034 #endif
26035
26036 #else
26037
26038 #if $cf_cv_header_stdbool_h
26039 #include <stdbool.h>
26040 #endif
26041
26042 #endif
26043
26044 int
26045 main (void)
26046 {
26047 if ((bool *) 0)
26048   return 0;
26049 if (sizeof (bool))
26050   return 0;
26051   ;
26052   return 0;
26053 }
26054 _ACEOF
26055 rm -f "conftest.$ac_objext"
26056 if { (eval echo "$as_me:26056: \"$ac_compile\"") >&5
26057   (eval $ac_compile) 2>&5
26058   ac_status=$?
26059   echo "$as_me:26059: \$? = $ac_status" >&5
26060   (exit "$ac_status"); } &&
26061          { ac_try='test -s "conftest.$ac_objext"'
26062   { (eval echo "$as_me:26062: \"$ac_try\"") >&5
26063   (eval $ac_try) 2>&5
26064   ac_status=$?
26065   echo "$as_me:26065: \$? = $ac_status" >&5
26066   (exit "$ac_status"); }; }; then
26067   ac_cv_type_bool=yes
26068 else
26069   echo "$as_me: failed program was:" >&5
26070 cat "conftest.$ac_ext" >&5
26071 ac_cv_type_bool=no
26072 fi
26073 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26074 fi
26075 echo "$as_me:26075: result: $ac_cv_type_bool" >&5
26076 echo "${ECHO_T}$ac_cv_type_bool" >&6
26077
26078 echo "$as_me:26078: checking size of bool" >&5
26079 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26080 if test "${ac_cv_sizeof_bool+set}" = set; then
26081   echo $ECHO_N "(cached) $ECHO_C" >&6
26082 else
26083   if test "$ac_cv_type_bool" = yes; then
26084   if test "$cross_compiling" = yes; then
26085   # Depending upon the size, compute the lo and hi bounds.
26086 cat >"conftest.$ac_ext" <<_ACEOF
26087 #line 26087 "configure"
26088 #include "confdefs.h"
26089
26090 $ac_includes_default
26091
26092 #if defined(__cplusplus)
26093
26094 #ifdef HAVE_GXX_BUILTIN_H
26095 #include <g++/builtin.h>
26096 #elif HAVE_GPP_BUILTIN_H
26097 #include <gpp/builtin.h>
26098 #elif HAVE_BUILTIN_H
26099 #include <builtin.h>
26100 #endif
26101
26102 #else
26103
26104 #if $cf_cv_header_stdbool_h
26105 #include <stdbool.h>
26106 #endif
26107
26108 #endif
26109
26110 int
26111 main (void)
26112 {
26113 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26114   ;
26115   return 0;
26116 }
26117 _ACEOF
26118 rm -f "conftest.$ac_objext"
26119 if { (eval echo "$as_me:26119: \"$ac_compile\"") >&5
26120   (eval $ac_compile) 2>&5
26121   ac_status=$?
26122   echo "$as_me:26122: \$? = $ac_status" >&5
26123   (exit "$ac_status"); } &&
26124          { ac_try='test -s "conftest.$ac_objext"'
26125   { (eval echo "$as_me:26125: \"$ac_try\"") >&5
26126   (eval $ac_try) 2>&5
26127   ac_status=$?
26128   echo "$as_me:26128: \$? = $ac_status" >&5
26129   (exit "$ac_status"); }; }; then
26130   ac_lo=0 ac_mid=0
26131   while :; do
26132     cat >"conftest.$ac_ext" <<_ACEOF
26133 #line 26133 "configure"
26134 #include "confdefs.h"
26135
26136 $ac_includes_default
26137
26138 #if defined(__cplusplus)
26139
26140 #ifdef HAVE_GXX_BUILTIN_H
26141 #include <g++/builtin.h>
26142 #elif HAVE_GPP_BUILTIN_H
26143 #include <gpp/builtin.h>
26144 #elif HAVE_BUILTIN_H
26145 #include <builtin.h>
26146 #endif
26147
26148 #else
26149
26150 #if $cf_cv_header_stdbool_h
26151 #include <stdbool.h>
26152 #endif
26153
26154 #endif
26155
26156 int
26157 main (void)
26158 {
26159 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26160   ;
26161   return 0;
26162 }
26163 _ACEOF
26164 rm -f "conftest.$ac_objext"
26165 if { (eval echo "$as_me:26165: \"$ac_compile\"") >&5
26166   (eval $ac_compile) 2>&5
26167   ac_status=$?
26168   echo "$as_me:26168: \$? = $ac_status" >&5
26169   (exit "$ac_status"); } &&
26170          { ac_try='test -s "conftest.$ac_objext"'
26171   { (eval echo "$as_me:26171: \"$ac_try\"") >&5
26172   (eval $ac_try) 2>&5
26173   ac_status=$?
26174   echo "$as_me:26174: \$? = $ac_status" >&5
26175   (exit "$ac_status"); }; }; then
26176   ac_hi=$ac_mid; break
26177 else
26178   echo "$as_me: failed program was:" >&5
26179 cat "conftest.$ac_ext" >&5
26180 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26181 fi
26182 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26183   done
26184 else
26185   echo "$as_me: failed program was:" >&5
26186 cat "conftest.$ac_ext" >&5
26187 ac_hi=-1 ac_mid=-1
26188   while :; do
26189     cat >"conftest.$ac_ext" <<_ACEOF
26190 #line 26190 "configure"
26191 #include "confdefs.h"
26192
26193 $ac_includes_default
26194
26195 #if defined(__cplusplus)
26196
26197 #ifdef HAVE_GXX_BUILTIN_H
26198 #include <g++/builtin.h>
26199 #elif HAVE_GPP_BUILTIN_H
26200 #include <gpp/builtin.h>
26201 #elif HAVE_BUILTIN_H
26202 #include <builtin.h>
26203 #endif
26204
26205 #else
26206
26207 #if $cf_cv_header_stdbool_h
26208 #include <stdbool.h>
26209 #endif
26210
26211 #endif
26212
26213 int
26214 main (void)
26215 {
26216 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26217   ;
26218   return 0;
26219 }
26220 _ACEOF
26221 rm -f "conftest.$ac_objext"
26222 if { (eval echo "$as_me:26222: \"$ac_compile\"") >&5
26223   (eval $ac_compile) 2>&5
26224   ac_status=$?
26225   echo "$as_me:26225: \$? = $ac_status" >&5
26226   (exit "$ac_status"); } &&
26227          { ac_try='test -s "conftest.$ac_objext"'
26228   { (eval echo "$as_me:26228: \"$ac_try\"") >&5
26229   (eval $ac_try) 2>&5
26230   ac_status=$?
26231   echo "$as_me:26231: \$? = $ac_status" >&5
26232   (exit "$ac_status"); }; }; then
26233   ac_lo=$ac_mid; break
26234 else
26235   echo "$as_me: failed program was:" >&5
26236 cat "conftest.$ac_ext" >&5
26237 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26238 fi
26239 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26240   done
26241 fi
26242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26243 # Binary search between lo and hi bounds.
26244 while test "x$ac_lo" != "x$ac_hi"; do
26245   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26246   cat >"conftest.$ac_ext" <<_ACEOF
26247 #line 26247 "configure"
26248 #include "confdefs.h"
26249
26250 $ac_includes_default
26251
26252 #if defined(__cplusplus)
26253
26254 #ifdef HAVE_GXX_BUILTIN_H
26255 #include <g++/builtin.h>
26256 #elif HAVE_GPP_BUILTIN_H
26257 #include <gpp/builtin.h>
26258 #elif HAVE_BUILTIN_H
26259 #include <builtin.h>
26260 #endif
26261
26262 #else
26263
26264 #if $cf_cv_header_stdbool_h
26265 #include <stdbool.h>
26266 #endif
26267
26268 #endif
26269
26270 int
26271 main (void)
26272 {
26273 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26274   ;
26275   return 0;
26276 }
26277 _ACEOF
26278 rm -f "conftest.$ac_objext"
26279 if { (eval echo "$as_me:26279: \"$ac_compile\"") >&5
26280   (eval $ac_compile) 2>&5
26281   ac_status=$?
26282   echo "$as_me:26282: \$? = $ac_status" >&5
26283   (exit "$ac_status"); } &&
26284          { ac_try='test -s "conftest.$ac_objext"'
26285   { (eval echo "$as_me:26285: \"$ac_try\"") >&5
26286   (eval $ac_try) 2>&5
26287   ac_status=$?
26288   echo "$as_me:26288: \$? = $ac_status" >&5
26289   (exit "$ac_status"); }; }; then
26290   ac_hi=$ac_mid
26291 else
26292   echo "$as_me: failed program was:" >&5
26293 cat "conftest.$ac_ext" >&5
26294 ac_lo=`expr "$ac_mid" + 1`
26295 fi
26296 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26297 done
26298 ac_cv_sizeof_bool=$ac_lo
26299 else
26300   if test "$cross_compiling" = yes; then
26301   { { echo "$as_me:26301: error: cannot run test program while cross compiling" >&5
26302 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26303    { (exit 1); exit 1; }; }
26304 else
26305   cat >"conftest.$ac_ext" <<_ACEOF
26306 #line 26306 "configure"
26307 #include "confdefs.h"
26308
26309 $ac_includes_default
26310
26311 #if defined(__cplusplus)
26312
26313 #ifdef HAVE_GXX_BUILTIN_H
26314 #include <g++/builtin.h>
26315 #elif HAVE_GPP_BUILTIN_H
26316 #include <gpp/builtin.h>
26317 #elif HAVE_BUILTIN_H
26318 #include <builtin.h>
26319 #endif
26320
26321 #else
26322
26323 #if $cf_cv_header_stdbool_h
26324 #include <stdbool.h>
26325 #endif
26326
26327 #endif
26328
26329 int
26330 main (void)
26331 {
26332 FILE *f = fopen ("conftest.val", "w");
26333 if (!f)
26334   $ac_main_return (1);
26335 fprintf (f, "%ld", (long)(sizeof (bool)));
26336 fclose (f);
26337   ;
26338   return 0;
26339 }
26340 _ACEOF
26341 rm -f "conftest$ac_exeext"
26342 if { (eval echo "$as_me:26342: \"$ac_link\"") >&5
26343   (eval $ac_link) 2>&5
26344   ac_status=$?
26345   echo "$as_me:26345: \$? = $ac_status" >&5
26346   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26347   { (eval echo "$as_me:26347: \"$ac_try\"") >&5
26348   (eval $ac_try) 2>&5
26349   ac_status=$?
26350   echo "$as_me:26350: \$? = $ac_status" >&5
26351   (exit "$ac_status"); }; }; then
26352   ac_cv_sizeof_bool=`cat conftest.val`
26353 else
26354   echo "$as_me: program exited with status $ac_status" >&5
26355 echo "$as_me: failed program was:" >&5
26356 cat "conftest.$ac_ext" >&5
26357 fi
26358 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26359 fi
26360 fi
26361 rm -f conftest.val
26362 else
26363   ac_cv_sizeof_bool=0
26364 fi
26365 fi
26366 echo "$as_me:26366: result: $ac_cv_sizeof_bool" >&5
26367 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26368 cat >>confdefs.h <<EOF
26369 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26370 EOF
26371
26372 echo "$as_me:26372: checking for type of bool" >&5
26373 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26374 if test "${cf_cv_type_of_bool+set}" = set; then
26375   echo $ECHO_N "(cached) $ECHO_C" >&6
26376 else
26377
26378         rm -f cf_test.out
26379         if test "$cross_compiling" = yes; then
26380
26381                 case x$ac_cv_sizeof_bool in
26382                 (x1) cf_cv_type_of_bool="unsigned char";;
26383                 (x2) cf_cv_type_of_bool="unsigned short";;
26384                 (x4) cf_cv_type_of_bool="unsigned int";;
26385                 (x8) cf_cv_type_of_bool="unsigned long";;
26386                 (*)  cf_cv_type_of_bool=unknown;;
26387                 esac
26388
26389 else
26390   cat >"conftest.$ac_ext" <<_ACEOF
26391 #line 26391 "configure"
26392 #include "confdefs.h"
26393
26394 $ac_includes_default
26395
26396 #if defined(__cplusplus)
26397
26398 #ifdef HAVE_GXX_BUILTIN_H
26399 #include <g++/builtin.h>
26400 #elif HAVE_GPP_BUILTIN_H
26401 #include <gpp/builtin.h>
26402 #elif HAVE_BUILTIN_H
26403 #include <builtin.h>
26404 #endif
26405
26406 #else
26407
26408 #if $cf_cv_header_stdbool_h
26409 #include <stdbool.h>
26410 #endif
26411
26412 #endif
26413
26414 int main(void)
26415 {
26416         FILE *fp = fopen("cf_test.out", "w");
26417         if (fp != 0) {
26418                 bool x = true;
26419                 if ((bool)(-x) >= 0)
26420                         fputs("unsigned ", fp);
26421                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26422                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26423                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26424                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26425                 fclose(fp);
26426         }
26427         ${cf_cv_main_return:-return}(0);
26428 }
26429
26430 _ACEOF
26431 rm -f "conftest$ac_exeext"
26432 if { (eval echo "$as_me:26432: \"$ac_link\"") >&5
26433   (eval $ac_link) 2>&5
26434   ac_status=$?
26435   echo "$as_me:26435: \$? = $ac_status" >&5
26436   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26437   { (eval echo "$as_me:26437: \"$ac_try\"") >&5
26438   (eval $ac_try) 2>&5
26439   ac_status=$?
26440   echo "$as_me:26440: \$? = $ac_status" >&5
26441   (exit "$ac_status"); }; }; then
26442   cf_cv_type_of_bool=`cat cf_test.out`
26443                  if test -z "$cf_cv_type_of_bool"; then
26444                    cf_cv_type_of_bool=unknown
26445                  fi
26446 else
26447   echo "$as_me: program exited with status $ac_status" >&5
26448 echo "$as_me: failed program was:" >&5
26449 cat "conftest.$ac_ext" >&5
26450 cf_cv_type_of_bool=unknown
26451 fi
26452 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26453 fi
26454         rm -f cf_test.out
26455
26456 fi
26457 echo "$as_me:26457: result: $cf_cv_type_of_bool" >&5
26458 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26459
26460 if test "$cf_cv_type_of_bool" = unknown ; then
26461         case .$NCURSES_BOOL in
26462         (.auto|.) NCURSES_BOOL=unsigned;;
26463         esac
26464         { echo "$as_me:26464: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26465 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26466         cf_cv_type_of_bool=$NCURSES_BOOL
26467 fi
26468
26469 echo "$as_me:26469: checking for special defines needed for etip.h" >&5
26470 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26471 cf_save_CXXFLAGS="$CXXFLAGS"
26472 cf_result="none"
26473
26474 # etip.h includes ncurses.h which includes ncurses_dll.h
26475 # But ncurses_dll.h is generated - fix here.
26476 test -d include || mkdir include
26477 test -f include/ncurses_dll.h || sed -e 's/@NCURSES_WRAP_PREFIX@/'$NCURSES_WRAP_PREFIX'/g' "${srcdir}/include/ncurses_dll.h.in" >include/ncurses_dll.h
26478
26479 for cf_math in "" MATH_H
26480 do
26481 for cf_excp in "" MATH_EXCEPTION
26482 do
26483         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26484         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26485         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26486 cat >"conftest.$ac_ext" <<_ACEOF
26487 #line 26487 "configure"
26488 #include "confdefs.h"
26489
26490 #include <etip.h.in>
26491
26492 int
26493 main (void)
26494 {
26495
26496   ;
26497   return 0;
26498 }
26499 _ACEOF
26500 rm -f "conftest.$ac_objext"
26501 if { (eval echo "$as_me:26501: \"$ac_compile\"") >&5
26502   (eval $ac_compile) 2>&5
26503   ac_status=$?
26504   echo "$as_me:26504: \$? = $ac_status" >&5
26505   (exit "$ac_status"); } &&
26506          { ac_try='test -s "conftest.$ac_objext"'
26507   { (eval echo "$as_me:26507: \"$ac_try\"") >&5
26508   (eval $ac_try) 2>&5
26509   ac_status=$?
26510   echo "$as_me:26510: \$? = $ac_status" >&5
26511   (exit "$ac_status"); }; }; then
26512
26513         test -n "$cf_math" && cat >>confdefs.h <<EOF
26514 #define ETIP_NEEDS_${cf_math} 1
26515 EOF
26516
26517         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26518 #define ETIP_NEEDS_${cf_excp} 1
26519 EOF
26520
26521         cf_result="$cf_math $cf_excp"
26522         break 2
26523
26524 else
26525   echo "$as_me: failed program was:" >&5
26526 cat "conftest.$ac_ext" >&5
26527 fi
26528 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26529 done
26530 done
26531 echo "$as_me:26531: result: $cf_result" >&5
26532 echo "${ECHO_T}$cf_result" >&6
26533 CXXFLAGS="$cf_save_CXXFLAGS"
26534
26535 if test -n "$CXX"; then
26536 echo "$as_me:26536: checking if $CXX accepts override keyword" >&5
26537 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26538 if test "${cf_cv_cpp_override+set}" = set; then
26539   echo $ECHO_N "(cached) $ECHO_C" >&6
26540 else
26541
26542         ac_ext=cc
26543 ac_cpp='$CXXCPP $CPPFLAGS'
26544 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26545 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26546 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26547 ac_main_return="return"
26548
26549         if test "$cross_compiling" = yes; then
26550   cf_cv_cpp_override=unknown
26551 else
26552   cat >"conftest.$ac_ext" <<_ACEOF
26553 #line 26553 "configure"
26554 #include "confdefs.h"
26555
26556 class base
26557 {
26558 public:
26559         virtual int foo(float x) = 0;
26560 };
26561
26562 class derived: public base
26563 {
26564 public:
26565         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26566 };
26567
26568 int main(void) { }
26569
26570 _ACEOF
26571 rm -f "conftest$ac_exeext"
26572 if { (eval echo "$as_me:26572: \"$ac_link\"") >&5
26573   (eval $ac_link) 2>&5
26574   ac_status=$?
26575   echo "$as_me:26575: \$? = $ac_status" >&5
26576   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26577   { (eval echo "$as_me:26577: \"$ac_try\"") >&5
26578   (eval $ac_try) 2>&5
26579   ac_status=$?
26580   echo "$as_me:26580: \$? = $ac_status" >&5
26581   (exit "$ac_status"); }; }; then
26582   cf_cv_cpp_override=yes
26583 else
26584   echo "$as_me: program exited with status $ac_status" >&5
26585 echo "$as_me: failed program was:" >&5
26586 cat "conftest.$ac_ext" >&5
26587 cf_cv_cpp_override=no
26588 fi
26589 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26590 fi
26591         ac_ext=cc
26592 ac_cpp='$CXXCPP $CPPFLAGS'
26593 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26594 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26595 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26596 ac_main_return="return"
26597
26598 fi
26599 echo "$as_me:26599: result: $cf_cv_cpp_override" >&5
26600 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26601 fi
26602 test "$cf_cv_cpp_override" = yes &&
26603 cat >>confdefs.h <<\EOF
26604 #define CPP_HAS_OVERRIDE 1
26605 EOF
26606
26607 if test -n "$CXX"; then
26608 echo "$as_me:26608: checking if $CXX accepts parameter initialization" >&5
26609 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26610 if test "${cf_cv_cpp_param_init+set}" = set; then
26611   echo $ECHO_N "(cached) $ECHO_C" >&6
26612 else
26613
26614         ac_ext=cc
26615 ac_cpp='$CXXCPP $CPPFLAGS'
26616 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26617 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26618 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26619 ac_main_return="return"
26620
26621         if test "$cross_compiling" = yes; then
26622   cf_cv_cpp_param_init=unknown
26623 else
26624   cat >"conftest.$ac_ext" <<_ACEOF
26625 #line 26625 "configure"
26626 #include "confdefs.h"
26627
26628 class TEST {
26629 private:
26630         int value;
26631 public:
26632         TEST(int x = 1);
26633         ~TEST();
26634 };
26635
26636 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26637 {
26638         value = x;
26639 }
26640 int main(void) { }
26641
26642 _ACEOF
26643 rm -f "conftest$ac_exeext"
26644 if { (eval echo "$as_me:26644: \"$ac_link\"") >&5
26645   (eval $ac_link) 2>&5
26646   ac_status=$?
26647   echo "$as_me:26647: \$? = $ac_status" >&5
26648   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26649   { (eval echo "$as_me:26649: \"$ac_try\"") >&5
26650   (eval $ac_try) 2>&5
26651   ac_status=$?
26652   echo "$as_me:26652: \$? = $ac_status" >&5
26653   (exit "$ac_status"); }; }; then
26654   cf_cv_cpp_param_init=yes
26655 else
26656   echo "$as_me: program exited with status $ac_status" >&5
26657 echo "$as_me: failed program was:" >&5
26658 cat "conftest.$ac_ext" >&5
26659 cf_cv_cpp_param_init=no
26660 fi
26661 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26662 fi
26663         ac_ext=cc
26664 ac_cpp='$CXXCPP $CPPFLAGS'
26665 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26666 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26667 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26668 ac_main_return="return"
26669
26670 fi
26671 echo "$as_me:26671: result: $cf_cv_cpp_param_init" >&5
26672 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26673 fi
26674 test "$cf_cv_cpp_param_init" = yes &&
26675 cat >>confdefs.h <<\EOF
26676 #define CPP_HAS_PARAM_INIT 1
26677 EOF
26678
26679 if test -n "$CXX"; then
26680
26681 echo "$as_me:26681: checking if $CXX accepts static_cast" >&5
26682 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26683 if test "${cf_cv_cpp_static_cast+set}" = set; then
26684   echo $ECHO_N "(cached) $ECHO_C" >&6
26685 else
26686
26687         ac_ext=cc
26688 ac_cpp='$CXXCPP $CPPFLAGS'
26689 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26690 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26691 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26692 ac_main_return="return"
26693
26694         cat >"conftest.$ac_ext" <<_ACEOF
26695 #line 26695 "configure"
26696 #include "confdefs.h"
26697
26698 class NCursesPanel
26699 {
26700 public:
26701   NCursesPanel(int nlines,
26702                int ncols,
26703                int begin_y = 0,
26704                int begin_x = 0)
26705   {
26706   }
26707   NCursesPanel();
26708   ~NCursesPanel();
26709 };
26710
26711 template<class T> class NCursesUserPanel : public NCursesPanel
26712 {
26713 public:
26714   NCursesUserPanel (int nlines,
26715                     int ncols,
26716                     int begin_y = 0,
26717                     int begin_x = 0,
26718                     const T* p_UserData = static_cast<T*>(0))
26719     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26720   {
26721   };
26722   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26723   {
26724   };
26725
26726   virtual ~NCursesUserPanel() {};
26727 };
26728
26729 int
26730 main (void)
26731 {
26732
26733         const char* p_UserData = static_cast<char*>(0)
26734   ;
26735   return 0;
26736 }
26737 _ACEOF
26738 rm -f "conftest.$ac_objext"
26739 if { (eval echo "$as_me:26739: \"$ac_compile\"") >&5
26740   (eval $ac_compile) 2>&5
26741   ac_status=$?
26742   echo "$as_me:26742: \$? = $ac_status" >&5
26743   (exit "$ac_status"); } &&
26744          { ac_try='test -s "conftest.$ac_objext"'
26745   { (eval echo "$as_me:26745: \"$ac_try\"") >&5
26746   (eval $ac_try) 2>&5
26747   ac_status=$?
26748   echo "$as_me:26748: \$? = $ac_status" >&5
26749   (exit "$ac_status"); }; }; then
26750   cf_cv_cpp_static_cast=yes
26751 else
26752   echo "$as_me: failed program was:" >&5
26753 cat "conftest.$ac_ext" >&5
26754 cf_cv_cpp_static_cast=no
26755 fi
26756 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26757
26758         ac_ext=cc
26759 ac_cpp='$CXXCPP $CPPFLAGS'
26760 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26761 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26762 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26763 ac_main_return="return"
26764
26765 fi
26766 echo "$as_me:26766: result: $cf_cv_cpp_static_cast" >&5
26767 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26768
26769 fi
26770
26771 test "$cf_cv_cpp_static_cast" = yes &&
26772 cat >>confdefs.h <<\EOF
26773 #define CPP_HAS_STATIC_CAST 1
26774 EOF
26775
26776         CXX_AR='$(AR)'
26777         CXX_ARFLAGS='$(ARFLAGS)'
26778         case "$cf_cv_system_name" in
26779         (irix*)
26780             if test "$GXX" != yes ; then
26781                 CXX_AR='$(CXX)'
26782                 CXX_ARFLAGS='-ar -o'
26783             fi
26784             ;;
26785         (sco3.2v5*)
26786             CXXLDFLAGS="-u main"
26787             ;;
26788         (solaris2*)
26789             if test "$GXX" != yes ; then
26790                 CXX_AR='$(CXX)'
26791                 CXX_ARFLAGS='-xar -o'
26792             fi
26793             ;;
26794         esac
26795
26796 else
26797         cf_cxx_library=no
26798         cf_cv_builtin_bool=1
26799
26800         # Just because we are not configuring against C++ right now does not
26801         # mean that a user will not want to use C++.  Some distributors disable
26802         # the C++ portion of this configuration as a shortcut (or just to avoid
26803         # compiling the demo in the c++ directory).  So we need a reasonable
26804         # default for the 'bool' type.
26805         #
26806         # Caveat: since the storage of the bool type is not standardized, it
26807         # may change.
26808
26809         if test "$NCURSES_BOOL" != auto ; then
26810                 cf_cv_type_of_bool=$NCURSES_BOOL
26811                 cf_cv_header_stdbool_h=0
26812         else
26813                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26814
26815 echo "$as_me:26815: checking for bool" >&5
26816 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26817 if test "${ac_cv_type_bool+set}" = set; then
26818   echo $ECHO_N "(cached) $ECHO_C" >&6
26819 else
26820   cat >"conftest.$ac_ext" <<_ACEOF
26821 #line 26821 "configure"
26822 #include "confdefs.h"
26823
26824 $ac_includes_default
26825
26826 #if defined(__cplusplus)
26827
26828 #ifdef HAVE_GXX_BUILTIN_H
26829 #include <g++/builtin.h>
26830 #elif HAVE_GPP_BUILTIN_H
26831 #include <gpp/builtin.h>
26832 #elif HAVE_BUILTIN_H
26833 #include <builtin.h>
26834 #endif
26835
26836 #else
26837
26838 #if $cf_cv_header_stdbool_h
26839 #include <stdbool.h>
26840 #endif
26841
26842 #endif
26843
26844 int
26845 main (void)
26846 {
26847 if ((bool *) 0)
26848   return 0;
26849 if (sizeof (bool))
26850   return 0;
26851   ;
26852   return 0;
26853 }
26854 _ACEOF
26855 rm -f "conftest.$ac_objext"
26856 if { (eval echo "$as_me:26856: \"$ac_compile\"") >&5
26857   (eval $ac_compile) 2>&5
26858   ac_status=$?
26859   echo "$as_me:26859: \$? = $ac_status" >&5
26860   (exit "$ac_status"); } &&
26861          { ac_try='test -s "conftest.$ac_objext"'
26862   { (eval echo "$as_me:26862: \"$ac_try\"") >&5
26863   (eval $ac_try) 2>&5
26864   ac_status=$?
26865   echo "$as_me:26865: \$? = $ac_status" >&5
26866   (exit "$ac_status"); }; }; then
26867   ac_cv_type_bool=yes
26868 else
26869   echo "$as_me: failed program was:" >&5
26870 cat "conftest.$ac_ext" >&5
26871 ac_cv_type_bool=no
26872 fi
26873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26874 fi
26875 echo "$as_me:26875: result: $ac_cv_type_bool" >&5
26876 echo "${ECHO_T}$ac_cv_type_bool" >&6
26877
26878 echo "$as_me:26878: checking size of bool" >&5
26879 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26880 if test "${ac_cv_sizeof_bool+set}" = set; then
26881   echo $ECHO_N "(cached) $ECHO_C" >&6
26882 else
26883   if test "$ac_cv_type_bool" = yes; then
26884   if test "$cross_compiling" = yes; then
26885   # Depending upon the size, compute the lo and hi bounds.
26886 cat >"conftest.$ac_ext" <<_ACEOF
26887 #line 26887 "configure"
26888 #include "confdefs.h"
26889
26890 $ac_includes_default
26891
26892 #if defined(__cplusplus)
26893
26894 #ifdef HAVE_GXX_BUILTIN_H
26895 #include <g++/builtin.h>
26896 #elif HAVE_GPP_BUILTIN_H
26897 #include <gpp/builtin.h>
26898 #elif HAVE_BUILTIN_H
26899 #include <builtin.h>
26900 #endif
26901
26902 #else
26903
26904 #if $cf_cv_header_stdbool_h
26905 #include <stdbool.h>
26906 #endif
26907
26908 #endif
26909
26910 int
26911 main (void)
26912 {
26913 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26914   ;
26915   return 0;
26916 }
26917 _ACEOF
26918 rm -f "conftest.$ac_objext"
26919 if { (eval echo "$as_me:26919: \"$ac_compile\"") >&5
26920   (eval $ac_compile) 2>&5
26921   ac_status=$?
26922   echo "$as_me:26922: \$? = $ac_status" >&5
26923   (exit "$ac_status"); } &&
26924          { ac_try='test -s "conftest.$ac_objext"'
26925   { (eval echo "$as_me:26925: \"$ac_try\"") >&5
26926   (eval $ac_try) 2>&5
26927   ac_status=$?
26928   echo "$as_me:26928: \$? = $ac_status" >&5
26929   (exit "$ac_status"); }; }; then
26930   ac_lo=0 ac_mid=0
26931   while :; do
26932     cat >"conftest.$ac_ext" <<_ACEOF
26933 #line 26933 "configure"
26934 #include "confdefs.h"
26935
26936 $ac_includes_default
26937
26938 #if defined(__cplusplus)
26939
26940 #ifdef HAVE_GXX_BUILTIN_H
26941 #include <g++/builtin.h>
26942 #elif HAVE_GPP_BUILTIN_H
26943 #include <gpp/builtin.h>
26944 #elif HAVE_BUILTIN_H
26945 #include <builtin.h>
26946 #endif
26947
26948 #else
26949
26950 #if $cf_cv_header_stdbool_h
26951 #include <stdbool.h>
26952 #endif
26953
26954 #endif
26955
26956 int
26957 main (void)
26958 {
26959 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26960   ;
26961   return 0;
26962 }
26963 _ACEOF
26964 rm -f "conftest.$ac_objext"
26965 if { (eval echo "$as_me:26965: \"$ac_compile\"") >&5
26966   (eval $ac_compile) 2>&5
26967   ac_status=$?
26968   echo "$as_me:26968: \$? = $ac_status" >&5
26969   (exit "$ac_status"); } &&
26970          { ac_try='test -s "conftest.$ac_objext"'
26971   { (eval echo "$as_me:26971: \"$ac_try\"") >&5
26972   (eval $ac_try) 2>&5
26973   ac_status=$?
26974   echo "$as_me:26974: \$? = $ac_status" >&5
26975   (exit "$ac_status"); }; }; then
26976   ac_hi=$ac_mid; break
26977 else
26978   echo "$as_me: failed program was:" >&5
26979 cat "conftest.$ac_ext" >&5
26980 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26981 fi
26982 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26983   done
26984 else
26985   echo "$as_me: failed program was:" >&5
26986 cat "conftest.$ac_ext" >&5
26987 ac_hi=-1 ac_mid=-1
26988   while :; do
26989     cat >"conftest.$ac_ext" <<_ACEOF
26990 #line 26990 "configure"
26991 #include "confdefs.h"
26992
26993 $ac_includes_default
26994
26995 #if defined(__cplusplus)
26996
26997 #ifdef HAVE_GXX_BUILTIN_H
26998 #include <g++/builtin.h>
26999 #elif HAVE_GPP_BUILTIN_H
27000 #include <gpp/builtin.h>
27001 #elif HAVE_BUILTIN_H
27002 #include <builtin.h>
27003 #endif
27004
27005 #else
27006
27007 #if $cf_cv_header_stdbool_h
27008 #include <stdbool.h>
27009 #endif
27010
27011 #endif
27012
27013 int
27014 main (void)
27015 {
27016 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27017   ;
27018   return 0;
27019 }
27020 _ACEOF
27021 rm -f "conftest.$ac_objext"
27022 if { (eval echo "$as_me:27022: \"$ac_compile\"") >&5
27023   (eval $ac_compile) 2>&5
27024   ac_status=$?
27025   echo "$as_me:27025: \$? = $ac_status" >&5
27026   (exit "$ac_status"); } &&
27027          { ac_try='test -s "conftest.$ac_objext"'
27028   { (eval echo "$as_me:27028: \"$ac_try\"") >&5
27029   (eval $ac_try) 2>&5
27030   ac_status=$?
27031   echo "$as_me:27031: \$? = $ac_status" >&5
27032   (exit "$ac_status"); }; }; then
27033   ac_lo=$ac_mid; break
27034 else
27035   echo "$as_me: failed program was:" >&5
27036 cat "conftest.$ac_ext" >&5
27037 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27038 fi
27039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27040   done
27041 fi
27042 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27043 # Binary search between lo and hi bounds.
27044 while test "x$ac_lo" != "x$ac_hi"; do
27045   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27046   cat >"conftest.$ac_ext" <<_ACEOF
27047 #line 27047 "configure"
27048 #include "confdefs.h"
27049
27050 $ac_includes_default
27051
27052 #if defined(__cplusplus)
27053
27054 #ifdef HAVE_GXX_BUILTIN_H
27055 #include <g++/builtin.h>
27056 #elif HAVE_GPP_BUILTIN_H
27057 #include <gpp/builtin.h>
27058 #elif HAVE_BUILTIN_H
27059 #include <builtin.h>
27060 #endif
27061
27062 #else
27063
27064 #if $cf_cv_header_stdbool_h
27065 #include <stdbool.h>
27066 #endif
27067
27068 #endif
27069
27070 int
27071 main (void)
27072 {
27073 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27074   ;
27075   return 0;
27076 }
27077 _ACEOF
27078 rm -f "conftest.$ac_objext"
27079 if { (eval echo "$as_me:27079: \"$ac_compile\"") >&5
27080   (eval $ac_compile) 2>&5
27081   ac_status=$?
27082   echo "$as_me:27082: \$? = $ac_status" >&5
27083   (exit "$ac_status"); } &&
27084          { ac_try='test -s "conftest.$ac_objext"'
27085   { (eval echo "$as_me:27085: \"$ac_try\"") >&5
27086   (eval $ac_try) 2>&5
27087   ac_status=$?
27088   echo "$as_me:27088: \$? = $ac_status" >&5
27089   (exit "$ac_status"); }; }; then
27090   ac_hi=$ac_mid
27091 else
27092   echo "$as_me: failed program was:" >&5
27093 cat "conftest.$ac_ext" >&5
27094 ac_lo=`expr "$ac_mid" + 1`
27095 fi
27096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27097 done
27098 ac_cv_sizeof_bool=$ac_lo
27099 else
27100   if test "$cross_compiling" = yes; then
27101   { { echo "$as_me:27101: error: cannot run test program while cross compiling" >&5
27102 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27103    { (exit 1); exit 1; }; }
27104 else
27105   cat >"conftest.$ac_ext" <<_ACEOF
27106 #line 27106 "configure"
27107 #include "confdefs.h"
27108
27109 $ac_includes_default
27110
27111 #if defined(__cplusplus)
27112
27113 #ifdef HAVE_GXX_BUILTIN_H
27114 #include <g++/builtin.h>
27115 #elif HAVE_GPP_BUILTIN_H
27116 #include <gpp/builtin.h>
27117 #elif HAVE_BUILTIN_H
27118 #include <builtin.h>
27119 #endif
27120
27121 #else
27122
27123 #if $cf_cv_header_stdbool_h
27124 #include <stdbool.h>
27125 #endif
27126
27127 #endif
27128
27129 int
27130 main (void)
27131 {
27132 FILE *f = fopen ("conftest.val", "w");
27133 if (!f)
27134   $ac_main_return (1);
27135 fprintf (f, "%ld", (long)(sizeof (bool)));
27136 fclose (f);
27137   ;
27138   return 0;
27139 }
27140 _ACEOF
27141 rm -f "conftest$ac_exeext"
27142 if { (eval echo "$as_me:27142: \"$ac_link\"") >&5
27143   (eval $ac_link) 2>&5
27144   ac_status=$?
27145   echo "$as_me:27145: \$? = $ac_status" >&5
27146   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27147   { (eval echo "$as_me:27147: \"$ac_try\"") >&5
27148   (eval $ac_try) 2>&5
27149   ac_status=$?
27150   echo "$as_me:27150: \$? = $ac_status" >&5
27151   (exit "$ac_status"); }; }; then
27152   ac_cv_sizeof_bool=`cat conftest.val`
27153 else
27154   echo "$as_me: program exited with status $ac_status" >&5
27155 echo "$as_me: failed program was:" >&5
27156 cat "conftest.$ac_ext" >&5
27157 fi
27158 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27159 fi
27160 fi
27161 rm -f conftest.val
27162 else
27163   ac_cv_sizeof_bool=0
27164 fi
27165 fi
27166 echo "$as_me:27166: result: $ac_cv_sizeof_bool" >&5
27167 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27168 cat >>confdefs.h <<EOF
27169 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27170 EOF
27171
27172 echo "$as_me:27172: checking for type of bool" >&5
27173 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27174 if test "${cf_cv_type_of_bool+set}" = set; then
27175   echo $ECHO_N "(cached) $ECHO_C" >&6
27176 else
27177
27178         rm -f cf_test.out
27179         if test "$cross_compiling" = yes; then
27180
27181                 case x$ac_cv_sizeof_bool in
27182                 (x1) cf_cv_type_of_bool="unsigned char";;
27183                 (x2) cf_cv_type_of_bool="unsigned short";;
27184                 (x4) cf_cv_type_of_bool="unsigned int";;
27185                 (x8) cf_cv_type_of_bool="unsigned long";;
27186                 (*)  cf_cv_type_of_bool=unknown;;
27187                 esac
27188
27189 else
27190   cat >"conftest.$ac_ext" <<_ACEOF
27191 #line 27191 "configure"
27192 #include "confdefs.h"
27193
27194 $ac_includes_default
27195
27196 #if defined(__cplusplus)
27197
27198 #ifdef HAVE_GXX_BUILTIN_H
27199 #include <g++/builtin.h>
27200 #elif HAVE_GPP_BUILTIN_H
27201 #include <gpp/builtin.h>
27202 #elif HAVE_BUILTIN_H
27203 #include <builtin.h>
27204 #endif
27205
27206 #else
27207
27208 #if $cf_cv_header_stdbool_h
27209 #include <stdbool.h>
27210 #endif
27211
27212 #endif
27213
27214 int main(void)
27215 {
27216         FILE *fp = fopen("cf_test.out", "w");
27217         if (fp != 0) {
27218                 bool x = true;
27219                 if ((bool)(-x) >= 0)
27220                         fputs("unsigned ", fp);
27221                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27222                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27223                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27224                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27225                 fclose(fp);
27226         }
27227         ${cf_cv_main_return:-return}(0);
27228 }
27229
27230 _ACEOF
27231 rm -f "conftest$ac_exeext"
27232 if { (eval echo "$as_me:27232: \"$ac_link\"") >&5
27233   (eval $ac_link) 2>&5
27234   ac_status=$?
27235   echo "$as_me:27235: \$? = $ac_status" >&5
27236   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27237   { (eval echo "$as_me:27237: \"$ac_try\"") >&5
27238   (eval $ac_try) 2>&5
27239   ac_status=$?
27240   echo "$as_me:27240: \$? = $ac_status" >&5
27241   (exit "$ac_status"); }; }; then
27242   cf_cv_type_of_bool=`cat cf_test.out`
27243                  if test -z "$cf_cv_type_of_bool"; then
27244                    cf_cv_type_of_bool=unknown
27245                  fi
27246 else
27247   echo "$as_me: program exited with status $ac_status" >&5
27248 echo "$as_me: failed program was:" >&5
27249 cat "conftest.$ac_ext" >&5
27250 cf_cv_type_of_bool=unknown
27251 fi
27252 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27253 fi
27254         rm -f cf_test.out
27255
27256 fi
27257 echo "$as_me:27257: result: $cf_cv_type_of_bool" >&5
27258 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27259
27260 if test "$cf_cv_type_of_bool" = unknown ; then
27261         case .$NCURSES_BOOL in
27262         (.auto|.) NCURSES_BOOL=unsigned;;
27263         esac
27264         { echo "$as_me:27264: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27265 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27266         cf_cv_type_of_bool=$NCURSES_BOOL
27267 fi
27268
27269                 else
27270                         echo "$as_me:27270: checking for fallback type of bool" >&5
27271 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27272                         case "$host_cpu" in
27273                         (i?86)  cf_cv_type_of_bool=char ;;
27274                         (*)     cf_cv_type_of_bool=int  ;;
27275                         esac
27276                         echo "$as_me:27276: result: $cf_cv_type_of_bool" >&5
27277 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27278                 fi
27279         fi
27280 fi
27281
27282 # If the C compiler did not declare bool, and we did not determine that the C++
27283 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27284 # ncurses library use the same type as C++ bool.  Note that this allows one to
27285 # specify the type of bool in a configure-script option and postpone
27286 # integration with the C++ compiler provided that the types are compatible.
27287 USE_CXX_BOOL=1
27288 if test "$cf_cv_cc_bool_type" = 1
27289 then
27290         # oops: C has a bool.  Unlikely, but C++ could differ.
27291         USE_CXX_BOOL=0
27292 elif test "$cf_cv_builtin_bool" = 0
27293 then
27294         # C++ has no bool
27295         USE_CXX_BOOL=0
27296 else
27297         # this is the normal case
27298         USE_CXX_BOOL='defined(__cplusplus)'
27299 fi
27300
27301 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27302
27303         if test "$cf_with_ada" != "no" ; then
27304                 if test "$with_libtool" != "no"; then
27305                         { echo "$as_me:27305: WARNING: libtool does not support Ada - disabling feature" >&5
27306 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27307                         cf_with_ada=no
27308                 fi
27309         fi
27310
27311         if test "$cf_with_ada" != "no" ; then
27312
27313 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27314 do
27315
27316 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27317
27318         unset ac_cv_path_cf_TEMP_gnat
27319         unset cf_TEMP_gnat
27320         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27321 set dummy $cf_prog_gnat; ac_word=$2
27322 echo "$as_me:27322: checking for $ac_word" >&5
27323 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27324 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27325   echo $ECHO_N "(cached) $ECHO_C" >&6
27326 else
27327   case $cf_TEMP_gnat in
27328   [\\/]* | ?:[\\/]*)
27329   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27330   ;;
27331   *)
27332   ac_save_IFS=$IFS; IFS=$ac_path_separator
27333 ac_dummy="$PATH"
27334 for ac_dir in $ac_dummy; do
27335   IFS=$ac_save_IFS
27336   test -z "$ac_dir" && ac_dir=.
27337   if $as_executable_p "$ac_dir/$ac_word"; then
27338    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27339    echo "$as_me:27339: found $ac_dir/$ac_word" >&5
27340    break
27341 fi
27342 done
27343
27344   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27345   ;;
27346 esac
27347 fi
27348 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27349
27350 if test -n "$cf_TEMP_gnat"; then
27351   echo "$as_me:27351: result: $cf_TEMP_gnat" >&5
27352 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27353 else
27354   echo "$as_me:27354: result: no" >&5
27355 echo "${ECHO_T}no" >&6
27356 fi
27357
27358         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27359
27360         if test "x$cf_TEMP_gnat" != xno; then
27361                 unset cf_cv_gnat_version
27362                 unset cf_TEMP_gnat
27363
27364 echo "$as_me:27364: checking for $cf_prog_gnat version" >&5
27365 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27366 if test "${cf_cv_gnat_version+set}" = set; then
27367   echo $ECHO_N "(cached) $ECHO_C" >&6
27368 else
27369
27370 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27371         grep '[0-9].[0-9][0-9]*' |\
27372         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27373
27374 fi
27375 echo "$as_me:27375: result: $cf_cv_gnat_version" >&5
27376 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27377 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27378 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27379
27380         fi
27381         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27382
27383         unset cf_TEMP_gnat
27384         unset cf_cv_gnat_version
27385         unset ac_cv_path_cf_TEMP_gnat
27386 done
27387
27388 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27389         cf_ada_make=
27390         cf_cv_prog_gnat_correct=no
27391 else
27392         cf_ada_make=gnatmake
27393         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27394                 # gprconfig is newer than gnatmake; we can continue...
27395                 cf_ada_config="##"
27396         else
27397                 rm -rf ./conftest* ./*~conftest*
27398                 if mkdir conftest.src
27399                 then
27400                         cf_ada_config=""
27401                         cd conftest.src
27402                         for cf_gprconfig in Ada C
27403                         do
27404                                 echo "$as_me:27404: checking for gprconfig name for $cf_gprconfig" >&5
27405 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27406                                 if test "$cf_gprconfig" = C
27407                                 then
27408                                         for cf_gprconfig_param in \
27409                                                 "$cf_gprconfig,,,,GNATGCC" \
27410                                                 "$cf_gprconfig,,,,GCC" \
27411                                                 "$cf_gprconfig"
27412                                         do
27413                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27414                                                 test -n "$cf_gprconfig_value" && break
27415                                         done
27416                                 else
27417                                         cf_gprconfig_param=$cf_gprconfig
27418                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27419                                 fi
27420                                 if test -n "$cf_gprconfig_value"
27421                                 then
27422                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27423                                         echo "$as_me:27423: result: $cf_gprconfig_value" >&5
27424 echo "${ECHO_T}$cf_gprconfig_value" >&6
27425                                 else
27426                                         echo "$as_me:27426: result: missing" >&5
27427 echo "${ECHO_T}missing" >&6
27428                                         cf_ada_config="#"
27429                                         break
27430                                 fi
27431                         done
27432                         cd ..
27433                         rm -rf ./conftest* ./*~conftest*
27434                 fi
27435         fi
27436         if test "x$cf_ada_config" != "x#"
27437         then
27438
27439 echo "$as_me:27439: checking for gnat version" >&5
27440 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27441 if test "${cf_cv_gnat_version+set}" = set; then
27442   echo $ECHO_N "(cached) $ECHO_C" >&6
27443 else
27444
27445 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27446         grep '[0-9].[0-9][0-9]*' |\
27447         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27448
27449 fi
27450 echo "$as_me:27450: result: $cf_cv_gnat_version" >&5
27451 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27452 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27453
27454 case "$cf_cv_gnat_version" in
27455 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27456         cf_cv_prog_gnat_correct=yes
27457         ;;
27458 (*)
27459         { echo "$as_me:27459: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27460 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27461         cf_cv_prog_gnat_correct=no
27462         ;;
27463 esac
27464
27465                 # Extract the first word of "m4", so it can be a program name with args.
27466 set dummy m4; ac_word=$2
27467 echo "$as_me:27467: checking for $ac_word" >&5
27468 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27469 if test "${ac_cv_prog_M4_exists+set}" = set; then
27470   echo $ECHO_N "(cached) $ECHO_C" >&6
27471 else
27472   if test -n "$M4_exists"; then
27473   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27474 else
27475   ac_save_IFS=$IFS; IFS=$ac_path_separator
27476 ac_dummy="$PATH"
27477 for ac_dir in $ac_dummy; do
27478   IFS=$ac_save_IFS
27479   test -z "$ac_dir" && ac_dir=.
27480   $as_executable_p "$ac_dir/$ac_word" || continue
27481 ac_cv_prog_M4_exists="yes"
27482 echo "$as_me:27482: found $ac_dir/$ac_word" >&5
27483 break
27484 done
27485
27486   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27487 fi
27488 fi
27489 M4_exists=$ac_cv_prog_M4_exists
27490 if test -n "$M4_exists"; then
27491   echo "$as_me:27491: result: $M4_exists" >&5
27492 echo "${ECHO_T}$M4_exists" >&6
27493 else
27494   echo "$as_me:27494: result: no" >&5
27495 echo "${ECHO_T}no" >&6
27496 fi
27497
27498                 if test "$ac_cv_prog_M4_exists" = no; then
27499                         cf_cv_prog_gnat_correct=no
27500                         { echo "$as_me:27500: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27501 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27502                 fi
27503                 if test "$cf_cv_prog_gnat_correct" = yes; then
27504                         echo "$as_me:27504: checking if GNAT works" >&5
27505 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27506
27507 rm -rf ./conftest* ./*~conftest*
27508 cat >>conftest.ads <<CF_EOF
27509 procedure conftest;
27510 CF_EOF
27511 cat >>conftest.adb <<CF_EOF
27512 with Text_IO;
27513 with GNAT.OS_Lib;
27514 procedure conftest is
27515 begin
27516    Text_IO.Put ("Hello World");
27517    Text_IO.New_Line;
27518    GNAT.OS_Lib.OS_Exit (0);
27519 end conftest;
27520 CF_EOF
27521 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27522    if ( ./conftest 1>&5 2>&1 ) ; then
27523       cf_cv_prog_gnat_correct=yes
27524    else
27525       cf_cv_prog_gnat_correct=no
27526    fi
27527 else
27528    cf_cv_prog_gnat_correct=no
27529 fi
27530 rm -rf ./conftest* ./*~conftest*
27531
27532                         echo "$as_me:27532: result: $cf_cv_prog_gnat_correct" >&5
27533 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27534                 fi
27535         else
27536                 cf_cv_prog_gnat_correct=no
27537         fi
27538 fi
27539
27540                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27541
27542         ADAFLAGS="$ADAFLAGS -gnatpn"
27543
27544         echo "$as_me:27544: checking optimization options for ADAFLAGS" >&5
27545 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27546         case "$CFLAGS" in
27547         (*-g*)
27548
27549         ADAFLAGS="$ADAFLAGS -g"
27550
27551                 ;;
27552         esac
27553         case "$CFLAGS" in
27554         (*-O*)
27555                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27556
27557         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27558
27559                 ;;
27560         esac
27561         echo "$as_me:27561: result: $ADAFLAGS" >&5
27562 echo "${ECHO_T}$ADAFLAGS" >&6
27563
27564 echo "$as_me:27564: checking if GNATPREP supports -T option" >&5
27565 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27566 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27567   echo $ECHO_N "(cached) $ECHO_C" >&6
27568 else
27569
27570 cf_cv_gnatprep_opt_t=no
27571 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27572
27573 fi
27574 echo "$as_me:27574: result: $cf_cv_gnatprep_opt_t" >&5
27575 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27576 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27577
27578 echo "$as_me:27578: checking if GNAT supports generics" >&5
27579 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27580 case "$cf_cv_gnat_version" in
27581 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27582         cf_gnat_generics=yes
27583         ;;
27584 (*)
27585         cf_gnat_generics=no
27586         ;;
27587 esac
27588 echo "$as_me:27588: result: $cf_gnat_generics" >&5
27589 echo "${ECHO_T}$cf_gnat_generics" >&6
27590
27591 if test "$cf_gnat_generics" = yes
27592 then
27593         cf_compile_generics=generics
27594         cf_generic_objects="\${GENOBJS}"
27595 else
27596         cf_compile_generics=
27597         cf_generic_objects=
27598 fi
27599
27600 echo "$as_me:27600: checking if GNAT supports SIGINT" >&5
27601 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27602 if test "${cf_cv_gnat_sigint+set}" = set; then
27603   echo $ECHO_N "(cached) $ECHO_C" >&6
27604 else
27605
27606 rm -rf ./conftest* ./*~conftest*
27607 cat >>conftest.ads <<CF_EOF
27608 with Ada.Interrupts.Names;
27609
27610 package ConfTest is
27611
27612    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27613    pragma Unreserve_All_Interrupts;
27614    pragma Warnings (On);
27615
27616    protected Process is
27617       procedure Stop;
27618       function Continue return Boolean;
27619       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27620    private
27621       Done : Boolean := False;
27622    end Process;
27623
27624 end ConfTest;
27625 CF_EOF
27626 cat >>conftest.adb <<CF_EOF
27627 package body ConfTest is
27628    protected body Process is
27629       procedure Stop is
27630       begin
27631          Done := True;
27632       end Stop;
27633       function Continue return Boolean is
27634       begin
27635          return not Done;
27636       end Continue;
27637    end Process;
27638 end ConfTest;
27639 CF_EOF
27640 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27641       cf_cv_gnat_sigint=yes
27642 else
27643    cf_cv_gnat_sigint=no
27644 fi
27645 rm -rf ./conftest* ./*~conftest*
27646
27647 fi
27648 echo "$as_me:27648: result: $cf_cv_gnat_sigint" >&5
27649 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27650
27651 if test "$cf_cv_gnat_sigint" = yes ; then
27652         USE_GNAT_SIGINT=""
27653 else
27654         USE_GNAT_SIGINT="#"
27655 fi
27656
27657 cf_gnat_libraries=no
27658 cf_gnat_projects=no
27659
27660 if test "$enable_gnat_projects" != no ; then
27661 echo "$as_me:27661: checking if GNAT supports project files" >&5
27662 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27663 case "$cf_cv_gnat_version" in
27664 (3.[0-9]*)
27665         ;;
27666 (*)
27667         case "$cf_cv_system_name" in
27668         (cygwin*|msys*)
27669                 ;;
27670         (*)
27671                 rm -rf ./conftest* ./*~conftest*
27672                 if mkdir conftest.src conftest.bin conftest.lib
27673                 then
27674                         cd conftest.src
27675                         rm -rf ./conftest* ./*~conftest*
27676                         cat >>library.gpr <<CF_EOF
27677 project Library is
27678   Kind := External ("LIB_KIND");
27679   for Library_Name use "ConfTest";
27680   for Object_Dir use ".";
27681   for Library_ALI_Dir use External("LIBRARY_DIR");
27682   for Library_Version use External ("SONAME");
27683   for Library_Kind use Kind;
27684   for Library_Dir use External("BUILD_DIR");
27685   Source_Dir := External ("SOURCE_DIR");
27686   for Source_Dirs use (Source_Dir);
27687 end Library;
27688 CF_EOF
27689                         cat >>confpackage.ads <<CF_EOF
27690 package ConfPackage is
27691    procedure conftest;
27692 end ConfPackage;
27693 CF_EOF
27694                         cat >>confpackage.adb <<CF_EOF
27695 with Text_IO;
27696 package body ConfPackage is
27697    procedure conftest is
27698    begin
27699       Text_IO.Put ("Hello World");
27700       Text_IO.New_Line;
27701    end conftest;
27702 end ConfPackage;
27703 CF_EOF
27704                         if ( "$cf_ada_make" $ADAFLAGS \
27705                                         -Plibrary.gpr \
27706                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27707                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27708                                         -XSOURCE_DIR="`pwd`" \
27709                                         -XSONAME=libConfTest.so.1 \
27710                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27711                                 cf_gnat_projects=yes
27712                         fi
27713                         cd ..
27714                 fi
27715                 if test -f conftest.lib/confpackage.ali
27716                 then
27717                         cf_gnat_libraries=yes
27718                 fi
27719                 rm -rf ./conftest* ./*~conftest*
27720                 ;;
27721         esac
27722         ;;
27723 esac
27724 echo "$as_me:27724: result: $cf_gnat_projects" >&5
27725 echo "${ECHO_T}$cf_gnat_projects" >&6
27726 fi # enable_gnat_projects
27727
27728 if test "$cf_gnat_projects" = yes
27729 then
27730         echo "$as_me:27730: checking if GNAT supports libraries" >&5
27731 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27732         echo "$as_me:27732: result: $cf_gnat_libraries" >&5
27733 echo "${ECHO_T}$cf_gnat_libraries" >&6
27734 fi
27735
27736 USE_OLD_MAKERULES=""
27737 USE_GNAT_PROJECTS="#"
27738 USE_GNAT_MAKE_GPR="#"
27739 USE_GNAT_GPRBUILD="#"
27740
27741 if test "$cf_gnat_projects" = yes
27742 then
27743         USE_OLD_MAKERULES="#"
27744         USE_GNAT_PROJECTS=""
27745         if test "$cf_cv_VERSION_GPRBUILD" != no
27746         then
27747                 USE_GNAT_GPRBUILD=""
27748         elif test "$cf_cv_VERSION_GNATMAKE" != no
27749         then
27750                 USE_GNAT_MAKE_GPR=""
27751         else
27752                 { echo "$as_me:27752: WARNING: use old makefile rules since tools are missing" >&5
27753 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27754         fi
27755 fi
27756
27757 if test "$cf_gnat_libraries" = yes
27758 then
27759         USE_GNAT_LIBRARIES=""
27760 else
27761         USE_GNAT_LIBRARIES="#"
27762 fi
27763
27764 echo "$as_me:27764: checking for ada-compiler" >&5
27765 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27766
27767 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27768 if test "${with_ada_compiler+set}" = set; then
27769   withval="$with_ada_compiler"
27770   cf_ada_compiler=$withval
27771 else
27772   cf_ada_compiler=gnatmake
27773 fi;
27774
27775 echo "$as_me:27775: result: $cf_ada_compiler" >&5
27776 echo "${ECHO_T}$cf_ada_compiler" >&6
27777
27778                         cf_ada_package=terminal_interface
27779
27780 echo "$as_me:27780: checking for ada-include" >&5
27781 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27782
27783 # Check whether --with-ada-include or --without-ada-include was given.
27784 if test "${with_ada_include+set}" = set; then
27785   withval="$with_ada_include"
27786
27787 else
27788   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27789 fi; if test -n "$prefix/share/ada/adainclude" ; then
27790
27791 if test "x$prefix" != xNONE; then
27792         cf_path_syntax="$prefix"
27793 else
27794         cf_path_syntax="$ac_default_prefix"
27795 fi
27796
27797 case ".$withval" in
27798 (.\$\(*\)*|.\'*\'*)
27799         ;;
27800 (..|./*|.\\*)
27801         ;;
27802 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27803         ;;
27804 (.\$\{*prefix\}*|.\$\{*dir\}*)
27805         eval withval="$withval"
27806         case ".$withval" in
27807         (.NONE/*)
27808                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27809                 ;;
27810         esac
27811         ;;
27812 (.no|.NONE/*)
27813         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27814         ;;
27815 (*)
27816         { { echo "$as_me:27816: error: expected a pathname, not \"$withval\"" >&5
27817 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27818    { (exit 1); exit 1; }; }
27819         ;;
27820 esac
27821
27822 fi
27823 eval ADA_INCLUDE="$withval"
27824
27825 echo "$as_me:27825: result: $ADA_INCLUDE" >&5
27826 echo "${ECHO_T}$ADA_INCLUDE" >&6
27827
27828 echo "$as_me:27828: checking for ada-objects" >&5
27829 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27830
27831 # Check whether --with-ada-objects or --without-ada-objects was given.
27832 if test "${with_ada_objects+set}" = set; then
27833   withval="$with_ada_objects"
27834
27835 else
27836   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27837 fi; if test -n "$prefix/lib/ada/adalib" ; then
27838
27839 if test "x$prefix" != xNONE; then
27840         cf_path_syntax="$prefix"
27841 else
27842         cf_path_syntax="$ac_default_prefix"
27843 fi
27844
27845 case ".$withval" in
27846 (.\$\(*\)*|.\'*\'*)
27847         ;;
27848 (..|./*|.\\*)
27849         ;;
27850 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27851         ;;
27852 (.\$\{*prefix\}*|.\$\{*dir\}*)
27853         eval withval="$withval"
27854         case ".$withval" in
27855         (.NONE/*)
27856                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27857                 ;;
27858         esac
27859         ;;
27860 (.no|.NONE/*)
27861         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27862         ;;
27863 (*)
27864         { { echo "$as_me:27864: error: expected a pathname, not \"$withval\"" >&5
27865 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27866    { (exit 1); exit 1; }; }
27867         ;;
27868 esac
27869
27870 fi
27871 eval ADA_OBJECTS="$withval"
27872
27873 echo "$as_me:27873: result: $ADA_OBJECTS" >&5
27874 echo "${ECHO_T}$ADA_OBJECTS" >&6
27875
27876 echo "$as_me:27876: checking if an Ada95 shared-library should be built" >&5
27877 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27878
27879 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27880 if test "${with_ada_sharedlib+set}" = set; then
27881   withval="$with_ada_sharedlib"
27882   with_ada_sharedlib=$withval
27883 else
27884   with_ada_sharedlib=no
27885 fi;
27886 echo "$as_me:27886: result: $with_ada_sharedlib" >&5
27887 echo "${ECHO_T}$with_ada_sharedlib" >&6
27888
27889 if test "x$with_ada_sharedlib" != xno
27890 then
27891         if test "x$cf_gnat_projects" != xyes
27892         then
27893                 { echo "$as_me:27893: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27894 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27895                 with_ada_sharedlib=no
27896         fi
27897 fi
27898
27899 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27900 MAKE_ADA_SHAREDLIB="#"
27901
27902 if test "x$with_ada_sharedlib" != xno
27903 then
27904         MAKE_ADA_SHAREDLIB=
27905         if test "x$with_ada_sharedlib" != xyes
27906         then
27907                 ADA_SHAREDLIB="$with_ada_sharedlib"
27908         fi
27909 fi
27910
27911                         # allow the Ada binding to be renamed
27912
27913 echo "$as_me:27913: checking for ada-libname" >&5
27914 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27915
27916 # Check whether --with-ada-libname or --without-ada-libname was given.
27917 if test "${with_ada_libname+set}" = set; then
27918   withval="$with_ada_libname"
27919   ADA_LIBNAME=$withval
27920 else
27921   ADA_LIBNAME=AdaCurses
27922 fi;
27923 case "x$ADA_LIBNAME" in
27924 (x|xyes|xno)
27925         ADA_LIBNAME=AdaCurses
27926         ;;
27927 esac
27928
27929 echo "$as_me:27929: result: $ADA_LIBNAME" >&5
27930 echo "${ECHO_T}$ADA_LIBNAME" >&6
27931
27932                 fi
27933         fi
27934 else
27935         cf_with_ada=no
27936 fi
27937
27938 # do this "late" to avoid conflict with header-checks
27939 if test "x$with_widec" = xyes ; then
27940         echo "$as_me:27940: checking for wchar_t" >&5
27941 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27942 if test "${ac_cv_type_wchar_t+set}" = set; then
27943   echo $ECHO_N "(cached) $ECHO_C" >&6
27944 else
27945   cat >"conftest.$ac_ext" <<_ACEOF
27946 #line 27946 "configure"
27947 #include "confdefs.h"
27948 $ac_includes_default
27949 int
27950 main (void)
27951 {
27952 if ((wchar_t *) 0)
27953   return 0;
27954 if (sizeof (wchar_t))
27955   return 0;
27956   ;
27957   return 0;
27958 }
27959 _ACEOF
27960 rm -f "conftest.$ac_objext"
27961 if { (eval echo "$as_me:27961: \"$ac_compile\"") >&5
27962   (eval $ac_compile) 2>&5
27963   ac_status=$?
27964   echo "$as_me:27964: \$? = $ac_status" >&5
27965   (exit "$ac_status"); } &&
27966          { ac_try='test -s "conftest.$ac_objext"'
27967   { (eval echo "$as_me:27967: \"$ac_try\"") >&5
27968   (eval $ac_try) 2>&5
27969   ac_status=$?
27970   echo "$as_me:27970: \$? = $ac_status" >&5
27971   (exit "$ac_status"); }; }; then
27972   ac_cv_type_wchar_t=yes
27973 else
27974   echo "$as_me: failed program was:" >&5
27975 cat "conftest.$ac_ext" >&5
27976 ac_cv_type_wchar_t=no
27977 fi
27978 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27979 fi
27980 echo "$as_me:27980: result: $ac_cv_type_wchar_t" >&5
27981 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27982
27983 echo "$as_me:27983: checking size of wchar_t" >&5
27984 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27985 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27986   echo $ECHO_N "(cached) $ECHO_C" >&6
27987 else
27988   if test "$ac_cv_type_wchar_t" = yes; then
27989   if test "$cross_compiling" = yes; then
27990   # Depending upon the size, compute the lo and hi bounds.
27991 cat >"conftest.$ac_ext" <<_ACEOF
27992 #line 27992 "configure"
27993 #include "confdefs.h"
27994 $ac_includes_default
27995 int
27996 main (void)
27997 {
27998 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27999   ;
28000   return 0;
28001 }
28002 _ACEOF
28003 rm -f "conftest.$ac_objext"
28004 if { (eval echo "$as_me:28004: \"$ac_compile\"") >&5
28005   (eval $ac_compile) 2>&5
28006   ac_status=$?
28007   echo "$as_me:28007: \$? = $ac_status" >&5
28008   (exit "$ac_status"); } &&
28009          { ac_try='test -s "conftest.$ac_objext"'
28010   { (eval echo "$as_me:28010: \"$ac_try\"") >&5
28011   (eval $ac_try) 2>&5
28012   ac_status=$?
28013   echo "$as_me:28013: \$? = $ac_status" >&5
28014   (exit "$ac_status"); }; }; then
28015   ac_lo=0 ac_mid=0
28016   while :; do
28017     cat >"conftest.$ac_ext" <<_ACEOF
28018 #line 28018 "configure"
28019 #include "confdefs.h"
28020 $ac_includes_default
28021 int
28022 main (void)
28023 {
28024 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28025   ;
28026   return 0;
28027 }
28028 _ACEOF
28029 rm -f "conftest.$ac_objext"
28030 if { (eval echo "$as_me:28030: \"$ac_compile\"") >&5
28031   (eval $ac_compile) 2>&5
28032   ac_status=$?
28033   echo "$as_me:28033: \$? = $ac_status" >&5
28034   (exit "$ac_status"); } &&
28035          { ac_try='test -s "conftest.$ac_objext"'
28036   { (eval echo "$as_me:28036: \"$ac_try\"") >&5
28037   (eval $ac_try) 2>&5
28038   ac_status=$?
28039   echo "$as_me:28039: \$? = $ac_status" >&5
28040   (exit "$ac_status"); }; }; then
28041   ac_hi=$ac_mid; break
28042 else
28043   echo "$as_me: failed program was:" >&5
28044 cat "conftest.$ac_ext" >&5
28045 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28046 fi
28047 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28048   done
28049 else
28050   echo "$as_me: failed program was:" >&5
28051 cat "conftest.$ac_ext" >&5
28052 ac_hi=-1 ac_mid=-1
28053   while :; do
28054     cat >"conftest.$ac_ext" <<_ACEOF
28055 #line 28055 "configure"
28056 #include "confdefs.h"
28057 $ac_includes_default
28058 int
28059 main (void)
28060 {
28061 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28062   ;
28063   return 0;
28064 }
28065 _ACEOF
28066 rm -f "conftest.$ac_objext"
28067 if { (eval echo "$as_me:28067: \"$ac_compile\"") >&5
28068   (eval $ac_compile) 2>&5
28069   ac_status=$?
28070   echo "$as_me:28070: \$? = $ac_status" >&5
28071   (exit "$ac_status"); } &&
28072          { ac_try='test -s "conftest.$ac_objext"'
28073   { (eval echo "$as_me:28073: \"$ac_try\"") >&5
28074   (eval $ac_try) 2>&5
28075   ac_status=$?
28076   echo "$as_me:28076: \$? = $ac_status" >&5
28077   (exit "$ac_status"); }; }; then
28078   ac_lo=$ac_mid; break
28079 else
28080   echo "$as_me: failed program was:" >&5
28081 cat "conftest.$ac_ext" >&5
28082 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28083 fi
28084 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28085   done
28086 fi
28087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28088 # Binary search between lo and hi bounds.
28089 while test "x$ac_lo" != "x$ac_hi"; do
28090   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28091   cat >"conftest.$ac_ext" <<_ACEOF
28092 #line 28092 "configure"
28093 #include "confdefs.h"
28094 $ac_includes_default
28095 int
28096 main (void)
28097 {
28098 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28099   ;
28100   return 0;
28101 }
28102 _ACEOF
28103 rm -f "conftest.$ac_objext"
28104 if { (eval echo "$as_me:28104: \"$ac_compile\"") >&5
28105   (eval $ac_compile) 2>&5
28106   ac_status=$?
28107   echo "$as_me:28107: \$? = $ac_status" >&5
28108   (exit "$ac_status"); } &&
28109          { ac_try='test -s "conftest.$ac_objext"'
28110   { (eval echo "$as_me:28110: \"$ac_try\"") >&5
28111   (eval $ac_try) 2>&5
28112   ac_status=$?
28113   echo "$as_me:28113: \$? = $ac_status" >&5
28114   (exit "$ac_status"); }; }; then
28115   ac_hi=$ac_mid
28116 else
28117   echo "$as_me: failed program was:" >&5
28118 cat "conftest.$ac_ext" >&5
28119 ac_lo=`expr "$ac_mid" + 1`
28120 fi
28121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28122 done
28123 ac_cv_sizeof_wchar_t=$ac_lo
28124 else
28125   if test "$cross_compiling" = yes; then
28126   { { echo "$as_me:28126: error: cannot run test program while cross compiling" >&5
28127 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28128    { (exit 1); exit 1; }; }
28129 else
28130   cat >"conftest.$ac_ext" <<_ACEOF
28131 #line 28131 "configure"
28132 #include "confdefs.h"
28133 $ac_includes_default
28134 int
28135 main (void)
28136 {
28137 FILE *f = fopen ("conftest.val", "w");
28138 if (!f)
28139   $ac_main_return (1);
28140 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28141 fclose (f);
28142   ;
28143   return 0;
28144 }
28145 _ACEOF
28146 rm -f "conftest$ac_exeext"
28147 if { (eval echo "$as_me:28147: \"$ac_link\"") >&5
28148   (eval $ac_link) 2>&5
28149   ac_status=$?
28150   echo "$as_me:28150: \$? = $ac_status" >&5
28151   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28152   { (eval echo "$as_me:28152: \"$ac_try\"") >&5
28153   (eval $ac_try) 2>&5
28154   ac_status=$?
28155   echo "$as_me:28155: \$? = $ac_status" >&5
28156   (exit "$ac_status"); }; }; then
28157   ac_cv_sizeof_wchar_t=`cat conftest.val`
28158 else
28159   echo "$as_me: program exited with status $ac_status" >&5
28160 echo "$as_me: failed program was:" >&5
28161 cat "conftest.$ac_ext" >&5
28162 fi
28163 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28164 fi
28165 fi
28166 rm -f conftest.val
28167 else
28168   ac_cv_sizeof_wchar_t=0
28169 fi
28170 fi
28171 echo "$as_me:28171: result: $ac_cv_sizeof_wchar_t" >&5
28172 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28173 cat >>confdefs.h <<EOF
28174 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28175 EOF
28176
28177         # cross-compiling to mingw can run into the problem that attempting to
28178         # link with the regex library fails, causing the test to not set this to
28179         # a number.  "recent" autoconf does not address this problem either -TD
28180         if test -z "$ac_cv_sizeof_wchar_t"
28181         then
28182                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28183
28184 echo "${as_me:-configure}:28184: testing test failed (assume 2) ..." 1>&5
28185
28186                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28187                 mv confdefs.tmp confdefs.h
28188                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28189         fi
28190 fi
28191
28192 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28193 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28194 ###
28195 ### ticlib modules may be a separate library, otherwise contained in termlib.
28196 ### termlib modules may be a separate library, otherwise contained in ncurses.
28197 ###
28198 ### The of "+" or " " between the tokens controls the way the script
28199 ### chooses to split module lists into libraries.
28200 ###
28201 ### (see CF_LIB_RULES).
28202 echo "$as_me:28202: checking for library subsets" >&5
28203 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28204 LIB_SUBSETS=
28205
28206 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28207         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28208         if test "$with_ticlib" != no ; then
28209                 LIB_SUBSETS="${LIB_SUBSETS} "
28210         else
28211                 LIB_SUBSETS="${LIB_SUBSETS}+"
28212         fi
28213 fi
28214
28215 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28216 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28217
28218 if test "$with_termlib" != no ; then
28219         LIB_SUBSETS="${LIB_SUBSETS} "
28220 else
28221         LIB_SUBSETS="${LIB_SUBSETS}+"
28222 fi
28223
28224 LIB_SUBSETS="${LIB_SUBSETS}base"
28225
28226 # Most term-driver calls are to tinfo, but some like init_pair are to the
28227 # base library (so it resides in base).
28228 if test "$with_term_driver" != no ; then
28229         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28230         case "$cf_cv_system_name" in
28231         (*mingw32*|*mingw64*)
28232                 if test "x$with_exp_win32" = xyes ; then
28233                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28234                 else
28235                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28236                 fi
28237                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28238                 ;;
28239         (*)
28240                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28241                 ;;
28242         esac
28243 elif test "x$with_exp_win32" = xyes ; then
28244         case "$cf_cv_system_name" in
28245         (*mingw32*|*mingw64*)
28246                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28247                 ;;
28248         (*)
28249                 ;;
28250         esac
28251 fi
28252
28253 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28254 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28255
28256 echo "$as_me:28256: result: $LIB_SUBSETS" >&5
28257 echo "${ECHO_T}$LIB_SUBSETS" >&6
28258
28259 ### Construct the list of include-directories to be generated
28260
28261 if test "$srcdir" != "."; then
28262         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28263 fi
28264 CPPFLAGS="-I../include $CPPFLAGS"
28265 if test "$srcdir" != "."; then
28266         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28267 fi
28268 CPPFLAGS="-I. $CPPFLAGS"
28269
28270 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28271 if test "$srcdir" != "."; then
28272         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28273 fi
28274 if test "$GCC" != yes; then
28275         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28276 elif test "$includedir" != "/usr/include"; then
28277         if test "$includedir" = '${prefix}/include' ; then
28278                 if test x$prefix != x/usr ; then
28279                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28280                 fi
28281         else
28282                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28283         fi
28284 fi
28285
28286 ### Build up pieces for makefile rules
28287 echo "$as_me:28287: checking default library suffix" >&5
28288 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28289
28290         case $DFT_LWR_MODEL in
28291         (libtool) DFT_ARG_SUFFIX=''   ;;
28292         (normal)  DFT_ARG_SUFFIX=''   ;;
28293         (debug)   DFT_ARG_SUFFIX='_g' ;;
28294         (profile) DFT_ARG_SUFFIX='_p' ;;
28295         (shared)  DFT_ARG_SUFFIX=''   ;;
28296         esac
28297         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28298 echo "$as_me:28298: result: $DFT_ARG_SUFFIX" >&5
28299 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28300
28301 echo "$as_me:28301: checking default library-dependency suffix" >&5
28302 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28303
28304         case X$DFT_LWR_MODEL in
28305         (Xlibtool)
28306                 DFT_LIB_SUFFIX='.la'
28307                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28308                 ;;
28309         (Xdebug)
28310                 case "$cf_cv_system_name" in
28311                 (*-msvc*)
28312                         DFT_LIB_SUFFIX='_g.lib'
28313                         ;;
28314                 (*)
28315                         DFT_LIB_SUFFIX='_g.a'
28316                         ;;
28317                 esac
28318                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28319                 ;;
28320         (Xprofile)
28321                 case "$cf_cv_system_name" in
28322                 (*-msvc*)
28323                         DFT_LIB_SUFFIX='_p.lib'
28324                         ;;
28325                 (*)
28326                         DFT_LIB_SUFFIX='_p.a'
28327                         ;;
28328                 esac
28329                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28330                 ;;
28331         (Xshared)
28332                 case "$cf_cv_system_name" in
28333                 (aix[5-7]*)
28334                         DFT_LIB_SUFFIX='.so'
28335                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28336                         ;;
28337                 (*-msvc*)
28338                         DFT_LIB_SUFFIX='.dll'
28339                         DFT_DEP_SUFFIX='.dll.lib'
28340                         ;;
28341                 (cygwin*|msys*|mingw*)
28342                         DFT_LIB_SUFFIX='.dll'
28343                         DFT_DEP_SUFFIX='.dll.a'
28344                         ;;
28345                 (darwin*)
28346                         DFT_LIB_SUFFIX='.dylib'
28347                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28348                         ;;
28349                 (hpux*)
28350                         case "$target" in
28351                         (ia64*)
28352                                 DFT_LIB_SUFFIX='.so'
28353                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28354                                 ;;
28355                         (*)
28356                                 DFT_LIB_SUFFIX='.sl'
28357                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28358                                 ;;
28359                         esac
28360                         ;;
28361                 (*)
28362                         DFT_LIB_SUFFIX='.so'
28363                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28364                         ;;
28365                 esac
28366                 ;;
28367         (*)
28368                 case "$target" in
28369                 (*-msvc*)
28370                         DFT_LIB_SUFFIX='.lib'
28371                         ;;
28372                 (*)
28373                         DFT_LIB_SUFFIX='.a'
28374                         ;;
28375                 esac
28376                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28377                 ;;
28378         esac
28379         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28380         then
28381                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28382                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28383         fi
28384 echo "$as_me:28384: result: $DFT_DEP_SUFFIX" >&5
28385 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28386
28387 echo "$as_me:28387: checking default object directory" >&5
28388 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28389
28390         case $DFT_LWR_MODEL in
28391         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28392         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28393         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28394         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28395         (shared)
28396                 case "$cf_cv_system_name" in
28397                 (cygwin|msys)
28398                         DFT_OBJ_SUBDIR='objects' ;;
28399                 (*)
28400                         DFT_OBJ_SUBDIR='obj_s' ;;
28401                 esac
28402         esac
28403 echo "$as_me:28403: result: $DFT_OBJ_SUBDIR" >&5
28404 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28405
28406 if test "x$cf_with_cxx" = xyes ; then
28407 echo "$as_me:28407: checking c++ library-dependency suffix" >&5
28408 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28409 if test "$with_libtool" != "no"; then
28410         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28411         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28412 elif test "$with_shared_cxx" != "no"; then
28413         # also for g++ users...
28414         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28415 else
28416         # we normally make a static library because C/C++ library rules differ
28417
28418         case Xnormal in
28419         (Xlibtool)
28420                 CXX_LIB_SUFFIX='.la'
28421                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28422                 ;;
28423         (Xdebug)
28424                 case "$cf_cv_system_name" in
28425                 (*-msvc*)
28426                         CXX_LIB_SUFFIX='_g.lib'
28427                         ;;
28428                 (*)
28429                         CXX_LIB_SUFFIX='_g.a'
28430                         ;;
28431                 esac
28432                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28433                 ;;
28434         (Xprofile)
28435                 case "$cf_cv_system_name" in
28436                 (*-msvc*)
28437                         CXX_LIB_SUFFIX='_p.lib'
28438                         ;;
28439                 (*)
28440                         CXX_LIB_SUFFIX='_p.a'
28441                         ;;
28442                 esac
28443                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28444                 ;;
28445         (Xshared)
28446                 case "$cf_cv_system_name" in
28447                 (aix[5-7]*)
28448                         CXX_LIB_SUFFIX='.so'
28449                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28450                         ;;
28451                 (*-msvc*)
28452                         CXX_LIB_SUFFIX='.dll'
28453                         CXX_DEP_SUFFIX='.dll.lib'
28454                         ;;
28455                 (cygwin*|msys*|mingw*)
28456                         CXX_LIB_SUFFIX='.dll'
28457                         CXX_DEP_SUFFIX='.dll.a'
28458                         ;;
28459                 (darwin*)
28460                         CXX_LIB_SUFFIX='.dylib'
28461                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28462                         ;;
28463                 (hpux*)
28464                         case "$target" in
28465                         (ia64*)
28466                                 CXX_LIB_SUFFIX='.so'
28467                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28468                                 ;;
28469                         (*)
28470                                 CXX_LIB_SUFFIX='.sl'
28471                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28472                                 ;;
28473                         esac
28474                         ;;
28475                 (*)
28476                         CXX_LIB_SUFFIX='.so'
28477                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28478                         ;;
28479                 esac
28480                 ;;
28481         (*)
28482                 case "$target" in
28483                 (*-msvc*)
28484                         CXX_LIB_SUFFIX='.lib'
28485                         ;;
28486                 (*)
28487                         CXX_LIB_SUFFIX='.a'
28488                         ;;
28489                 esac
28490                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28491                 ;;
28492         esac
28493         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28494         then
28495                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28496                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28497         fi
28498
28499 fi
28500 echo "$as_me:28500: result: $CXX_LIB_SUFFIX" >&5
28501 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28502
28503 fi
28504
28505 # do not want -ldl in build except as needed for -lncurses dependency
28506 if test "x$with_dlsym" = xyes ; then
28507 if test "$DFT_LWR_MODEL" = shared || \
28508    test "$DFT_LWR_MODEL" = libtool ; then
28509
28510 # remove dl library from $LIBS
28511 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28512
28513 fi
28514 fi
28515 ### Set up low-level terminfo dependencies for makefiles.
28516
28517 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28518 # do not need libdl
28519 TICS_LIST=
28520 if test "x$with_dlsym" = xyes ; then
28521
28522 # remove dl library from $SHLIB_LIST
28523 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28524
28525 fi
28526
28527 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28528 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28529 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28530 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28531 then
28532         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28533 fi
28534
28535 if test "$with_ticlib" != no ; then
28536
28537         if test "x$with_ticlib" != xyes ; then
28538                 TICS_NAME=$with_ticlib
28539                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28540                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28541                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28542                 TICS_LIB_SUFFIX="${with_ticlib}"
28543         else
28544                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28545                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28546                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28547                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28548         fi
28549         TICS_LDFLAGS="-L${LIB_DIR}"
28550         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28551 else
28552         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28553         TICS_LDFLAGS="-L${LIB_DIR}"
28554         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28555 fi
28556
28557 if test "$with_termlib" != no ; then
28558
28559         if test "x$with_termlib" != xyes ; then
28560                 TINFO_NAME=$with_termlib
28561                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28562                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28563                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28564                 TINFO_LIB_SUFFIX="${with_termlib}"
28565         else
28566                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28567                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28568                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28569                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28570         fi
28571
28572         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28573         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28574         if test "$DFT_LWR_MODEL" = "libtool"; then
28575                 TEST_ARGS="${TEST_DEPS}"
28576                 TEST_ARG2="${TEST_DEP2}"
28577                 TINFO_LDFLAGS="-L${LIB_DIR}"
28578                 TINFO_LIBS="$TEST_ARGS"
28579                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28580                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28581         else
28582                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28583                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28584                 if test "x$with_term_driver" != xno ; then
28585                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28586                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28587                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28588                 else
28589                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28590                         TINFO_LIBS="$TEST_ARGS"
28591                 fi
28592                 TINFO_LDFLAGS="-L${LIB_DIR}"
28593                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28594         fi
28595 else
28596         # the next lines are needed for linking libtic over libncurses
28597         TINFO_NAME=${LIB_NAME}
28598         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28599         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28600         if test "x$with_tic_depends" = xyes ; then
28601                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28602         else
28603                 TICS_LIST="$SHLIB_LIST"
28604         fi
28605
28606         TINFO_LDFLAGS="-L${LIB_DIR}"
28607         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28608 fi
28609
28610 if test "$DFT_LWR_MODEL" = shared ; then
28611         case "$cf_cv_system_name" in
28612         (cygwin*|msys*)
28613                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28614                 TINFO_SUFFIX=.dll
28615                 ;;
28616         esac
28617 fi
28618
28619 if test "x$with_dlsym" = xyes ; then
28620
28621 # remove dl library from $TICS_LIST
28622 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28623
28624 fi
28625
28626 if test "$DFT_LWR_MODEL" = "libtool"; then
28627         OBJEXT=lo
28628 fi
28629
28630 # needed for Ada95
28631 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28632
28633 case "$DFT_LWR_MODEL" in
28634 (normal|debug|profile)
28635
28636 if test "$GCC" = yes ; then
28637         case "$cf_cv_system_name" in
28638         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28639                 LDFLAGS_STATIC=
28640                 LDFLAGS_SHARED=
28641                 ;;
28642         (*)     # normally, except when broken
28643                 LDFLAGS_STATIC=-static
28644                 LDFLAGS_SHARED=-dynamic
28645                 ;;
28646         esac
28647 else
28648         case "$cf_cv_system_name" in
28649         (aix[4-7]*)     # from ld manpage
28650                 LDFLAGS_STATIC=-bstatic
28651                 LDFLAGS_SHARED=-bdynamic
28652                 ;;
28653         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28654                 # We could also use just "archive" and "shared".
28655                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28656                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28657                 ;;
28658         (irix*)         # from ld manpage IRIX64
28659                 LDFLAGS_STATIC=-Bstatic
28660                 LDFLAGS_SHARED=-Bdynamic
28661                 ;;
28662         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28663                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28664                 LDFLAGS_STATIC=-noso
28665                 LDFLAGS_SHARED=-so_archive
28666                 ;;
28667         (solaris2*)
28668                 LDFLAGS_STATIC=-Bstatic
28669                 LDFLAGS_SHARED=-Bdynamic
28670                 ;;
28671         esac
28672 fi
28673
28674 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28675 then
28676         echo "$as_me:28676: checking if linker supports switching between static/dynamic" >&5
28677 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28678
28679         rm -f libconftest.a
28680         cat >conftest.$ac_ext <<EOF
28681 #line 28681 "configure"
28682 #include <stdio.h>
28683 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28684 EOF
28685         if { (eval echo "$as_me:28685: \"$ac_compile\"") >&5
28686   (eval $ac_compile) 2>&5
28687   ac_status=$?
28688   echo "$as_me:28688: \$? = $ac_status" >&5
28689   (exit "$ac_status"); } ; then
28690                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28691                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28692         fi
28693         rm -f conftest.*
28694
28695         cf_save_LIBS="$LIBS"
28696
28697         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28698         cat >"conftest.$ac_ext" <<_ACEOF
28699 #line 28699 "configure"
28700 #include "confdefs.h"
28701
28702 #line 28702 "configure"
28703 #include <stdio.h>
28704 int cf_ldflags_static(FILE *fp);
28705
28706 int
28707 main (void)
28708 {
28709
28710         return cf_ldflags_static(stdin);
28711
28712   ;
28713   return 0;
28714 }
28715 _ACEOF
28716 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28717 if { (eval echo "$as_me:28717: \"$ac_link\"") >&5
28718   (eval $ac_link) 2>&5
28719   ac_status=$?
28720   echo "$as_me:28720: \$? = $ac_status" >&5
28721   (exit "$ac_status"); } &&
28722          { ac_try='test -s "conftest$ac_exeext"'
28723   { (eval echo "$as_me:28723: \"$ac_try\"") >&5
28724   (eval $ac_try) 2>&5
28725   ac_status=$?
28726   echo "$as_me:28726: \$? = $ac_status" >&5
28727   (exit "$ac_status"); }; }; then
28728
28729         # some linkers simply ignore the -dynamic
28730         case x`file "conftest$ac_exeext" 2>/dev/null` in
28731         (*static*)
28732                 cf_ldflags_static=no
28733                 ;;
28734         (*)
28735                 cf_ldflags_static=yes
28736                 ;;
28737         esac
28738
28739 else
28740   echo "$as_me: failed program was:" >&5
28741 cat "conftest.$ac_ext" >&5
28742 cf_ldflags_static=no
28743 fi
28744 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28745
28746         rm -f libconftest.*
28747         LIBS="$cf_save_LIBS"
28748
28749         echo "$as_me:28749: result: $cf_ldflags_static" >&5
28750 echo "${ECHO_T}$cf_ldflags_static" >&6
28751
28752         if test "$cf_ldflags_static" != yes
28753         then
28754                 LDFLAGS_STATIC=
28755                 LDFLAGS_SHARED=
28756         fi
28757 else
28758         LDFLAGS_STATIC=
28759         LDFLAGS_SHARED=
28760 fi
28761
28762         ;;
28763 esac
28764
28765 echo "$as_me:28765: checking where we will install curses.h" >&5
28766 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28767
28768 includesubdir=
28769 if test "$with_overwrite" = no && \
28770  { test "x$includedir" = 'x${prefix}/include' || \
28771    test "x$includedir" = "x${prefix}/include"; }
28772 then
28773         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28774 fi
28775 echo "$as_me:28775: result: ${includedir}${includesubdir}" >&5
28776 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28777
28778 ### Resolve a conflict between normal and wide-curses by forcing applications
28779 ### that will need libutf8 to add it to their configure script.
28780 if test "$with_overwrite" != no ; then
28781 if test "$NCURSES_LIBUTF8" = 1 ; then
28782         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28783         { echo "$as_me:28783: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28784 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28785 fi
28786 fi
28787 WITH_OVERWRITE=$with_overwrite
28788
28789 ### At least on MinGW a shared library build without libtool
28790 ### requires adding the additional libs to the link list.
28791 case "$cf_cv_system_name" in
28792 (*mingw32*|*mingw64*)
28793         if test "$DFT_LWR_MODEL" != "libtool"; then
28794            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28795         fi
28796         ;;
28797 *)      ;;
28798 esac
28799
28800 ### predefined stuff for the test programs
28801
28802 cat >>confdefs.h <<\EOF
28803 #define HAVE_SLK_COLOR 1
28804 EOF
28805
28806 # pkgsrc uses these
28807
28808 echo "$as_me:28808: checking for desired basename for form library" >&5
28809 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28810
28811 # Check whether --with-form-libname or --without-form-libname was given.
28812 if test "${with_form_libname+set}" = set; then
28813   withval="$with_form_libname"
28814   with_lib_basename=$withval
28815 else
28816   with_lib_basename=form
28817 fi;
28818 FORM_NAME="$with_lib_basename"
28819
28820 case "x$FORM_NAME" in
28821 (x|xno|xnone|xyes)
28822         FORM_NAME=form
28823         ;;
28824 (*)
28825         ;;
28826 esac
28827
28828 echo "$as_me:28828: result: $FORM_NAME" >&5
28829 echo "${ECHO_T}$FORM_NAME" >&6
28830
28831 echo "$as_me:28831: checking for desired basename for menu library" >&5
28832 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28833
28834 # Check whether --with-menu-libname or --without-menu-libname was given.
28835 if test "${with_menu_libname+set}" = set; then
28836   withval="$with_menu_libname"
28837   with_lib_basename=$withval
28838 else
28839   with_lib_basename=menu
28840 fi;
28841 MENU_NAME="$with_lib_basename"
28842
28843 case "x$MENU_NAME" in
28844 (x|xno|xnone|xyes)
28845         MENU_NAME=menu
28846         ;;
28847 (*)
28848         ;;
28849 esac
28850
28851 echo "$as_me:28851: result: $MENU_NAME" >&5
28852 echo "${ECHO_T}$MENU_NAME" >&6
28853
28854 echo "$as_me:28854: checking for desired basename for panel library" >&5
28855 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28856
28857 # Check whether --with-panel-libname or --without-panel-libname was given.
28858 if test "${with_panel_libname+set}" = set; then
28859   withval="$with_panel_libname"
28860   with_lib_basename=$withval
28861 else
28862   with_lib_basename=panel
28863 fi;
28864 PANEL_NAME="$with_lib_basename"
28865
28866 case "x$PANEL_NAME" in
28867 (x|xno|xnone|xyes)
28868         PANEL_NAME=panel
28869         ;;
28870 (*)
28871         ;;
28872 esac
28873
28874 echo "$as_me:28874: result: $PANEL_NAME" >&5
28875 echo "${ECHO_T}$PANEL_NAME" >&6
28876
28877 echo "$as_me:28877: checking for desired basename for cxx library" >&5
28878 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28879
28880 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28881 if test "${with_cxx_libname+set}" = set; then
28882   withval="$with_cxx_libname"
28883   with_lib_basename=$withval
28884 else
28885   with_lib_basename=ncurses++
28886 fi;
28887 CXX_NAME="$with_lib_basename"
28888
28889 case "x$CXX_NAME" in
28890 (x|xno|xnone|xyes)
28891         CXX_NAME=ncurses++
28892         ;;
28893 (*)
28894         ;;
28895 esac
28896
28897 echo "$as_me:28897: result: $CXX_NAME" >&5
28898 echo "${ECHO_T}$CXX_NAME" >&6
28899
28900 ### Construct the list of subdirectories for which we'll customize makefiles
28901 ### with the appropriate compile-rules.
28902
28903 echo "$as_me:28903: checking for src modules" >&5
28904 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28905
28906 # dependencies and linker-arguments for test-programs
28907 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28908 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28909 if test "$DFT_LWR_MODEL" = "libtool"; then
28910         TEST_ARGS="${TEST_DEPS}"
28911         TEST_ARG2="${TEST_DEP2}"
28912 else
28913         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28914         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28915 fi
28916
28917 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28918 cf_cv_src_modules=
28919 for cf_dir in $modules_to_build
28920 do
28921         if test -f "$srcdir/$cf_dir/modules" ; then
28922
28923                 if test -z "$cf_cv_src_modules"; then
28924                         cf_cv_src_modules=$cf_dir
28925                 else
28926                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28927                 fi
28928
28929                 # Make the ncurses_cfg.h file record the library interface files as
28930                 # well.  These are header files that are the same name as their
28931                 # directory.  Ncurses is the only library that does not follow
28932                 # that pattern.
28933                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28934
28935 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28936
28937                         cat >>confdefs.h <<EOF
28938 #define HAVE_${cf_have_include}_H 1
28939 EOF
28940
28941                         cat >>confdefs.h <<EOF
28942 #define HAVE_LIB${cf_have_include} 1
28943 EOF
28944
28945 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28946
28947 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28948
28949                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28950                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28951                         if test "$DFT_LWR_MODEL" = "libtool"; then
28952                                 TEST_ARGS="${TEST_DEPS}"
28953                                 TEST_ARG2="${TEST_DEP2}"
28954                         else
28955                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28956                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28957                         fi
28958                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28959                 fi
28960         fi
28961 done
28962 echo "$as_me:28962: result: $cf_cv_src_modules" >&5
28963 echo "${ECHO_T}$cf_cv_src_modules" >&6
28964
28965 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28966 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28967
28968 SRC_SUBDIRS=
28969 if test "x$cf_with_manpages" != xno ; then
28970         SRC_SUBDIRS="$SRC_SUBDIRS man"
28971 fi
28972 SRC_SUBDIRS="$SRC_SUBDIRS include"
28973 for cf_dir in $cf_cv_src_modules
28974 do
28975         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28976 done
28977 if test "x$cf_with_tests" != "xno" ; then
28978         SRC_SUBDIRS="$SRC_SUBDIRS test"
28979 fi
28980 # always make this, to install the ncurses-config script
28981 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28982 if test "$cf_with_cxx_binding" != no; then
28983         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28984         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28985 fi
28986
28987 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28988 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28989
28990 ADA_SUBDIRS=
28991 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28992         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28993         ADA_SUBDIRS="gen src"
28994         if test "x$cf_with_tests" != "xno" ; then
28995                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28996         fi
28997 fi
28998
28999 SUB_MAKEFILES=
29000 for cf_dir in $SRC_SUBDIRS
29001 do
29002         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29003 done
29004
29005 if test -n "$ADA_SUBDIRS"; then
29006         for cf_dir in $ADA_SUBDIRS
29007         do
29008                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29009         done
29010
29011 fi
29012
29013 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29014    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29015    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29016    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29017 fi
29018
29019 DIRS_TO_MAKE="lib"
29020 for cf_item in $cf_list_models
29021 do
29022
29023         case $cf_item in
29024         (libtool) cf_subdir='obj_lo'  ;;
29025         (normal)  cf_subdir='objects' ;;
29026         (debug)   cf_subdir='obj_g' ;;
29027         (profile) cf_subdir='obj_p' ;;
29028         (shared)
29029                 case "$cf_cv_system_name" in
29030                 (cygwin|msys)
29031                         cf_subdir='objects' ;;
29032                 (*)
29033                         cf_subdir='obj_s' ;;
29034                 esac
29035         esac
29036
29037         for cf_item2 in $DIRS_TO_MAKE
29038         do
29039                 test "$cf_item2" = "$cf_subdir" && break
29040         done
29041         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29042 done
29043 for cf_dir in $DIRS_TO_MAKE
29044 do
29045         test ! -d "$cf_dir" && mkdir "$cf_dir"
29046 done
29047
29048 # symbols that differ when compiling Ada95 by itself.
29049 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29050
29051 # values to use as strings
29052
29053 cat >>confdefs.h <<EOF
29054 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29055 EOF
29056
29057 cat >>confdefs.h <<EOF
29058 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29059 EOF
29060
29061 ### Define substitutions for header files to avoid name-pollution
29062
29063 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29064         HAVE_TCGETATTR=1
29065 else
29066         HAVE_TCGETATTR=0
29067 fi
29068
29069 if test "x$ac_cv_header_stdint_h" = xyes ; then
29070         HAVE_STDINT_H=1
29071 else
29072         HAVE_STDINT_H=0
29073 fi
29074
29075 if test "x$ac_cv_header_termio_h" = xyes ; then
29076         HAVE_TERMIO_H=1
29077 else
29078         HAVE_TERMIO_H=0
29079 fi
29080
29081 if test "x$ac_cv_header_termios_h" = xyes ; then
29082         HAVE_TERMIOS_H=1
29083 else
29084         HAVE_TERMIOS_H=0
29085 fi
29086
29087 ################################################################################
29088 test "x$use_database" = xyes && \
29089 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29090
29091 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29092 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29093
29094 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29095 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29096 fi
29097
29098 if test "x$cf_with_tests" != xno ; then
29099         MAKE_TESTS=
29100 else
29101         MAKE_TESTS="#"
29102 fi
29103
29104 ADAHTML_DIR=../../doc/html/ada
29105
29106 # workaround for OS/2 (20151017)
29107 case "$cf_cv_system_name" in
29108 (os2*)
29109         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29110         ;;
29111 (*)
29112         LIBTOOL_OPTS_CXX=
29113         ;;
29114 esac
29115
29116 # workaround for g++ versus Solaris (20131116)
29117 case "$cf_cv_system_name" in
29118 (solaris2*)
29119         case "x$CPPFLAGS" in
29120         (*-D_XOPEN_SOURCE_EXTENDED*)
29121                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29122
29123 echo "${as_me:-configure}:29123: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29124
29125                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29126                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29127                 ;;
29128         esac
29129         ;;
29130 esac
29131
29132 # Help to automatically enable the extended curses features when using either
29133 # the *-config or the ".pc" files by adding defines.
29134 echo "$as_me:29134: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29135 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29136 PKG_CFLAGS=
29137 for cf_loop1 in $CPPFLAGS_after_XOPEN
29138 do
29139         cf_found=no
29140         for cf_loop2 in $CPPFLAGS_before_XOPEN
29141         do
29142                 if test "x$cf_loop1" = "x$cf_loop2"
29143                 then
29144                         cf_found=yes
29145                         break
29146                 fi
29147         done
29148         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29149 done
29150 echo "$as_me:29150: result: $PKG_CFLAGS" >&5
29151 echo "${ECHO_T}$PKG_CFLAGS" >&6
29152
29153 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29154 case "x$NCURSES_OSPEED" in
29155 (*short*)
29156         cf_compatible=1
29157         ;;
29158 (*)
29159         cf_compatible=0
29160         ;;
29161 esac
29162
29163 cat >>confdefs.h <<EOF
29164 #define NCURSES_OSPEED_COMPAT $cf_compatible
29165 EOF
29166
29167 case "x$cf_cv_typeof_chtype" in
29168 (xshort|xint|xlong)
29169         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29170         ;;
29171 esac
29172
29173 case "x$cf_cv_typeof_mmask_t" in
29174 (xshort|xint|xlong)
29175         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29176         ;;
29177 esac
29178
29179 # substitute into misc/Makefile to suppress
29180 # (un)install.data from the
29181 # (un)install rules.
29182 if test "x$cf_with_db_install" = "xno"; then
29183         MISC_INSTALL_DATA=
29184         MISC_UNINSTALL_DATA=
29185 else
29186         MISC_INSTALL_DATA=install.data
29187         MISC_UNINSTALL_DATA=uninstall.data
29188 fi
29189
29190 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29191         MAKE_DATABASE="#"
29192 else
29193         MAKE_DATABASE="$MAKE_TERMINFO"
29194 fi
29195
29196 if test -n "$PACKAGE"
29197 then
29198         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29199         export PACKAGE
29200         echo "package: $PACKAGE"
29201 fi
29202
29203 UNALTERED_SYMS=
29204 cf_filter_syms=no
29205
29206 if test -n "$RESULTING_SYMS"
29207 then
29208         cf_filter_syms=$cf_dft_filter_syms
29209         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29210
29211 echo "${as_me:-configure}:29211: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29212
29213 fi
29214
29215 if test "x$WILDCARD_SYMS" = xno
29216 then
29217         cf_filter_syms=yes
29218 fi
29219
29220 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29221
29222 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29223 if test "$cf_filter_syms" = yes
29224 then
29225         RESULTING_SYMS=resulting.map
29226 fi
29227
29228 if test "x$cross_compiling" = xyes ; then
29229         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29230         CHECK_BUILD="#"
29231 else
29232         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29233         CHECK_BUILD=
29234 fi
29235
29236 # This is used for the *-config script and *.pc data files.
29237
29238 echo "$as_me:29238: checking for linker search path" >&5
29239 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29240 if test "${cf_cv_ld_searchpath+set}" = set; then
29241   echo $ECHO_N "(cached) $ECHO_C" >&6
29242 else
29243
29244 if test "$cross_compiling" != yes ; then
29245
29246 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29247 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29248
29249 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29250 # update the cache, which makes it run faster.
29251 test -z "$cf_pathlist" && \
29252         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29253
29254 test -z "$cf_pathlist" &&
29255         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29256
29257 # This works with OpenBSD 6.5, which lists only filenames
29258 test -z "$cf_pathlist" &&
29259         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29260
29261 if test -z "$cf_pathlist"
29262 then
29263         # dyld default path with MacOS
29264         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29265         then
29266                 # do this to bypass check
29267                 cf_cv_ld_searchpath='$HOME/lib'
29268                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29269         fi
29270 fi
29271
29272 if test -z "$cf_pathlist"
29273 then
29274         # Solaris is "SunOS"
29275         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29276         then
29277                 case x`(isainfo -b)` in
29278                 (x64)
29279                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29280                         ;;
29281                 (x32)
29282                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29283                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29284                         ;;
29285                 (*)
29286                         { echo "$as_me:29286: WARNING: problem with Solaris architecture" >&5
29287 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29288                         ;;
29289                 esac
29290         fi
29291 fi
29292
29293 if test -z "$cf_pathlist"
29294 then
29295         # HP-UX
29296         if test x"`uname -s`" = xHP-UX
29297         then
29298                 case x`getconf LONG_BIT` in
29299                 (x64)
29300                         cf_pathlist="/usr/lib/hpux64"
29301                         ;;
29302                 (x*)
29303                         cf_pathlist="/usr/lib/hpux32"
29304                         ;;
29305                 esac
29306         fi
29307 fi
29308
29309 fi
29310
29311 # If nothing else, assume it is conventional
29312 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29313
29314 # Finally, check that this is only directories
29315 for cf_path in $0 $cf_pathlist
29316 do
29317         if test -d "$cf_path"; then
29318                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29319                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29320         fi
29321 done
29322
29323 # Ensure that it is nonempty
29324 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29325
29326 fi
29327 echo "$as_me:29327: result: $cf_cv_ld_searchpath" >&5
29328 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29329
29330 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29331
29332 ac_config_files="$ac_config_files include/MKterm.h.awk include/curses.head:include/curses.h.in include/ncurses_dll.h include/termcap.h include/unctrl.h man/man_db.renames $SUB_MAKEFILES Makefile"
29333 ac_config_commands="$ac_config_commands default"
29334 cat >confcache <<\_ACEOF
29335 # This file is a shell script that caches the results of configure
29336 # tests run on this system so they can be shared between configure
29337 # scripts and configure runs, see configure's option --config-cache.
29338 # It is not useful on other systems.  If it contains results you don't
29339 # want to keep, you may remove or edit it.
29340 #
29341 # config.status only pays attention to the cache file if you give it
29342 # the --recheck option to rerun configure.
29343 #
29344 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29345 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29346 # following values.
29347
29348 _ACEOF
29349
29350 # The following way of writing the cache mishandles newlines in values,
29351 # but we know of no workaround that is simple, portable, and efficient.
29352 # So, don't put newlines in cache variables' values.
29353 # Ultrix sh set writes to stderr and can't be redirected directly,
29354 # and sets the high bit in the cache file unless we assign to the vars.
29355 {
29356   (set) 2>&1 |
29357     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29358     *ac_space=\ *)
29359       # `set' does not quote correctly, so add quotes (double-quote
29360       # substitution turns \\\\ into \\, and sed turns \\ into \).
29361       sed -n \
29362         "s/'/'\\\\''/g;
29363           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29364       ;;
29365     *)
29366       # `set' quotes correctly as required by POSIX, so do not add quotes.
29367       sed -n \
29368         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29369       ;;
29370     esac;
29371 } |
29372   sed '
29373      t clear
29374      : clear
29375      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29376      t end
29377      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29378      : end' >>confcache
29379 if cmp -s $cache_file confcache; then :; else
29380   if test -w $cache_file; then
29381     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29382     cat confcache >$cache_file
29383   else
29384     echo "not updating unwritable cache $cache_file"
29385   fi
29386 fi
29387 rm -f confcache
29388
29389 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29390 # Let make expand exec_prefix.
29391 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29392
29393 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29394 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29395 # trailing colons and then remove the whole line if VPATH becomes empty
29396 # (actually we leave an empty line to preserve line numbers).
29397 if test "x$srcdir" = x.; then
29398   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29399 s/:*\$(srcdir):*/:/;
29400 s/:*\${srcdir}:*/:/;
29401 s/:*@srcdir@:*/:/;
29402 s/^\([^=]*=[    ]*\):*/\1/;
29403 s/:*$//;
29404 s/^[^=]*=[      ]*$//;
29405 }'
29406 fi
29407
29408 DEFS=-DHAVE_CONFIG_H
29409
29410 : "${CONFIG_STATUS=./config.status}"
29411 ac_clean_files_save=$ac_clean_files
29412 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29413 { echo "$as_me:29413: creating $CONFIG_STATUS" >&5
29414 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29415 cat >"$CONFIG_STATUS" <<_ACEOF
29416 #! $SHELL
29417 # Generated automatically by configure.
29418 # Run this file to recreate the current configuration.
29419 # Compiler output produced by configure, useful for debugging
29420 # configure, is in config.log if it exists.
29421
29422 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29423
29424 debug=false
29425 SHELL=\${CONFIG_SHELL-$SHELL}
29426 ac_cs_invocation="\$0 \$@"
29427
29428 CLICOLOR_FORCE= GREP_OPTIONS=
29429 unset CLICOLOR_FORCE GREP_OPTIONS
29430 _ACEOF
29431
29432 cat >>"$CONFIG_STATUS" <<\_ACEOF
29433 # Be Bourne compatible
29434 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29435   emulate sh
29436   NULLCMD=:
29437 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29438   set -o posix
29439 fi
29440
29441 # Name of the executable.
29442 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29443
29444 if expr a : '\(a\)' >/dev/null 2>&1; then
29445   as_expr="expr"
29446 else
29447   as_expr="false"
29448 fi
29449
29450 rm -f conf$$ conf$$.exe conf$$.file
29451 echo >conf$$.file
29452 if ln -s conf$$.file conf$$ 2>/dev/null; then
29453   # We could just check for DJGPP; but this test a) works b) is more generic
29454   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29455   if test -f conf$$.exe; then
29456     # Don't use ln at all; we don't have any links
29457     as_ln_s='cp -p'
29458   else
29459     as_ln_s='ln -s'
29460   fi
29461 elif ln conf$$.file conf$$ 2>/dev/null; then
29462   as_ln_s='ln'
29463 else
29464   as_ln_s='cp -p'
29465 fi
29466 rm -f conf$$ conf$$.exe conf$$.file
29467
29468 as_executable_p="test -f"
29469
29470 # Support unset when possible.
29471 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29472   as_unset="unset"
29473 else
29474   as_unset="false"
29475 fi
29476
29477 # NLS nuisances.
29478 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29479 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29480 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29481 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29482 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29483 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29484 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29485 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29486
29487 # IFS
29488 # We need space, tab and new line, in precisely that order.
29489 as_nl='
29490 '
29491 IFS="   $as_nl"
29492
29493 # CDPATH.
29494 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29495
29496 exec 6>&1
29497
29498 _ACEOF
29499
29500 # Files that config.status was made for.
29501 if test -n "$ac_config_files"; then
29502   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29503 fi
29504
29505 if test -n "$ac_config_headers"; then
29506   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29507 fi
29508
29509 if test -n "$ac_config_links"; then
29510   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29511 fi
29512
29513 if test -n "$ac_config_commands"; then
29514   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29515 fi
29516
29517 cat >>"$CONFIG_STATUS" <<\EOF
29518
29519 ac_cs_usage="\
29520 \`$as_me' instantiates files from templates according to the
29521 current configuration.
29522
29523 Usage: $0 [OPTIONS] [FILE]...
29524
29525   -h, --help       print this help, then exit
29526   -V, --version    print version number, then exit
29527   -d, --debug      don't remove temporary files
29528       --recheck    update $as_me by reconfiguring in the same conditions
29529   --file=FILE[:TEMPLATE]
29530                    instantiate the configuration file FILE
29531   --header=FILE[:TEMPLATE]
29532                    instantiate the configuration header FILE
29533
29534 Configuration files:
29535 $config_files
29536
29537 Configuration headers:
29538 $config_headers
29539
29540 Configuration commands:
29541 $config_commands
29542
29543 Report bugs to <dickey@invisible-island.net>."
29544 EOF
29545
29546 cat >>"$CONFIG_STATUS" <<EOF
29547 ac_cs_version="\\
29548 config.status
29549 configured by $0, generated by GNU Autoconf 2.52.20230903,
29550   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29551
29552 Copyright 2003-2022,2023        Thomas E. Dickey
29553 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29554 Free Software Foundation, Inc.
29555 This config.status script is free software; the Free Software Foundation
29556 gives unlimited permission to copy, distribute and modify it."
29557 srcdir="$srcdir"
29558 INSTALL="$INSTALL"
29559 EOF
29560
29561 cat >>"$CONFIG_STATUS" <<\EOF
29562 # If no file are specified by the user, then we need to provide default
29563 # value.  By we need to know if files were specified by the user.
29564 ac_need_defaults=:
29565 while test $# != 0
29566 do
29567   case $1 in
29568   --*=*)
29569     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29570     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29571     shift
29572     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29573     shift
29574     ;;
29575   -*);;
29576   *) # This is not an option, so the user has probably given explicit
29577      # arguments.
29578      ac_need_defaults=false;;
29579   esac
29580
29581   case $1 in
29582   # Handling of the options.
29583 EOF
29584 cat >>"$CONFIG_STATUS" <<EOF
29585   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29586     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29587     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29588 EOF
29589 cat >>"$CONFIG_STATUS" <<\EOF
29590   --version | --vers* | -V )
29591     echo "$ac_cs_version"; exit 0 ;;
29592   --he | --h)
29593     # Conflict between --help and --header
29594     { { echo "$as_me:29594: error: ambiguous option: $1
29595 Try \`$0 --help' for more information." >&5
29596 echo "$as_me: error: ambiguous option: $1
29597 Try \`$0 --help' for more information." >&2;}
29598    { (exit 1); exit 1; }; };;
29599   --help | --hel | -h )
29600     echo "$ac_cs_usage"; exit 0 ;;
29601   --debug | --d* | -d )
29602     debug=: ;;
29603   --file | --fil | --fi | --f )
29604     shift
29605     CONFIG_FILES="$CONFIG_FILES $1"
29606     ac_need_defaults=false;;
29607   --header | --heade | --head | --hea )
29608     shift
29609     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29610     ac_need_defaults=false;;
29611
29612   # This is an error.
29613   -*) { { echo "$as_me:29613: error: unrecognized option: $1
29614 Try \`$0 --help' for more information." >&5
29615 echo "$as_me: error: unrecognized option: $1
29616 Try \`$0 --help' for more information." >&2;}
29617    { (exit 1); exit 1; }; } ;;
29618
29619   *) ac_config_targets="$ac_config_targets $1" ;;
29620
29621   esac
29622   shift
29623 done
29624
29625 exec 5>>config.log
29626 cat >&5 << _ACEOF
29627
29628 ## ----------------------- ##
29629 ## Running config.status.  ##
29630 ## ----------------------- ##
29631
29632 This file was extended by $as_me 2.52.20230903, executed with
29633   CONFIG_FILES    = $CONFIG_FILES
29634   CONFIG_HEADERS  = $CONFIG_HEADERS
29635   CONFIG_LINKS    = $CONFIG_LINKS
29636   CONFIG_COMMANDS = $CONFIG_COMMANDS
29637   > "$ac_cs_invocation"
29638 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29639
29640 _ACEOF
29641 EOF
29642
29643 cat >>"$CONFIG_STATUS" <<EOF
29644 #
29645 # INIT-COMMANDS section.
29646 #
29647
29648 ### Special initialization commands, used to pass information from the
29649 ### configuration-run into config.status
29650
29651 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29652 AWK="$AWK"
29653 CXX_NAME="$CXX_NAME"
29654 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29655 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29656 ECHO_LD="$ECHO_LD"
29657 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29658 FORM_NAME="$FORM_NAME"
29659 LDCONFIG="$LDCONFIG"
29660 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29661 LIB_NAME="$LIB_NAME"
29662 LIB_PREFIX="$LIB_PREFIX"
29663 LIB_SUBSETS="$LIB_SUBSETS"
29664 LIB_SUFFIX="$LIB_SUFFIX"
29665 LIB_TRACING="$LIB_TRACING"
29666 LN_S="$LN_S"
29667 MAKE_TERMINFO="$MAKE_TERMINFO"
29668 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29669 MENU_NAME="$MENU_NAME"
29670 NCURSES_MAJOR="$NCURSES_MAJOR"
29671 NCURSES_MINOR="$NCURSES_MINOR"
29672 NCURSES_OSPEED="$NCURSES_OSPEED"
29673 NCURSES_PATCH="$NCURSES_PATCH"
29674 PANEL_NAME="$PANEL_NAME"
29675 SRC_SUBDIRS="$SRC_SUBDIRS"
29676 TERMINFO="$TERMINFO"
29677 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29678 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29679 TICS_NAME="$TICS_NAME"
29680 TICS_SUFFIX="$TICS_SUFFIX"
29681 TIC_PATH="$TIC_PATH"
29682 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29683 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29684 TINFO_NAME="$TINFO_NAME"
29685 TINFO_SUFFIX="$TINFO_SUFFIX"
29686 UNALTERED_SYMS="$UNALTERED_SYMS"
29687 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29688 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29689 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29690 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29691 WILDCARD_SYMS="$WILDCARD_SYMS"
29692 WITH_CURSES_H="$with_curses_h"
29693 WITH_ECHO="${enable_echo:=yes}"
29694 WITH_OVERWRITE="$with_overwrite"
29695 cf_LIST_MODELS="$cf_list_models"
29696 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29697 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29698 cf_cv_abi_default="$cf_cv_abi_default"
29699 cf_cv_abi_version="$cf_cv_abi_version"
29700 cf_cv_do_relink="$cf_cv_do_relink"
29701 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29702 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29703 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29704 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29705 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29706 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29707 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29708 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29709 cf_cv_rel_version="$cf_cv_rel_version"
29710 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29711 cf_cv_shared_soname='$cf_cv_shared_soname'
29712 cf_cv_shlib_version="$cf_cv_shlib_version"
29713 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29714 cf_cv_system_name="$cf_cv_system_name"
29715 cf_cv_term_driver="$with_term_driver"
29716 cf_with_ada="$cf_with_ada"
29717 cf_with_cxx_binding="$cf_with_cxx_binding"
29718 cf_with_db_install="$cf_with_db_install"
29719 cf_with_manpages="$cf_with_manpages"
29720 cf_with_tests="$cf_with_tests"
29721 host="$host"
29722 target="$target"
29723 verbose="$verbose"
29724 with_shared_cxx="$with_shared_cxx"
29725
29726 EOF
29727
29728 cat >>"$CONFIG_STATUS" <<\EOF
29729 for ac_config_target in $ac_config_targets
29730 do
29731   case "$ac_config_target" in
29732   # Handling of arguments.
29733   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29734   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29735   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29736   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29737   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29738   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29739   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29740   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29741   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29742   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29743   *) { { echo "$as_me:29743: error: invalid argument: $ac_config_target" >&5
29744 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29745    { (exit 1); exit 1; }; };;
29746   esac
29747 done
29748
29749 # If the user did not use the arguments to specify the items to instantiate,
29750 # then the envvar interface is used.  Set only those that are not.
29751 # We use the long form for the default assignment because of an extremely
29752 # bizarre bug on SunOS 4.1.3.
29753 if "$ac_need_defaults"; then
29754   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29755   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29756   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29757 fi
29758
29759 # Create a temporary directory, and hook for its removal unless debugging.
29760 $debug ||
29761 {
29762   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29763   trap '{ (exit 1); exit 1; }' 1 2 13 15
29764 }
29765
29766 # Create a (secure) tmp directory for tmp files.
29767 : "${TMPDIR=/tmp}"
29768 {
29769   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29770   test -n "$tmp" && test -d "$tmp"
29771 }  ||
29772 {
29773   tmp=$TMPDIR/cs$$-$RANDOM
29774   (umask 077 && mkdir "$tmp")
29775 } ||
29776 {
29777    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29778    { (exit 1); exit 1; }
29779 }
29780
29781 EOF
29782
29783 cat >>"$CONFIG_STATUS" <<EOF
29784
29785 #
29786 # CONFIG_FILES section.
29787 #
29788
29789 # No need to generate the scripts if there are no CONFIG_FILES.
29790 # This happens for instance when ./config.status config.h
29791 if test -n "\$CONFIG_FILES"; then
29792   # Protect against being on the right side of a sed subst in config.status.
29793   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29794    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29795 s,@SHELL@,$SHELL,;t t
29796 s,@exec_prefix@,$exec_prefix,;t t
29797 s,@prefix@,$prefix,;t t
29798 s,@program_transform_name@,$program_transform_name,;t t
29799 s,@bindir@,$bindir,;t t
29800 s,@sbindir@,$sbindir,;t t
29801 s,@libexecdir@,$libexecdir,;t t
29802 s,@datarootdir@,$datarootdir,;t t
29803 s,@datadir@,$datadir,;t t
29804 s,@sysconfdir@,$sysconfdir,;t t
29805 s,@sharedstatedir@,$sharedstatedir,;t t
29806 s,@localstatedir@,$localstatedir,;t t
29807 s,@runstatedir@,$runstatedir,;t t
29808 s,@libdir@,$libdir,;t t
29809 s,@includedir@,$includedir,;t t
29810 s,@oldincludedir@,$oldincludedir,;t t
29811 s,@infodir@,$infodir,;t t
29812 s,@mandir@,$mandir,;t t
29813 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29814 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29815 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29816 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29817 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29818 s,@build_alias@,$build_alias,;t t
29819 s,@host_alias@,$host_alias,;t t
29820 s,@target_alias@,$target_alias,;t t
29821 s,@ECHO_C@,$ECHO_C,;t t
29822 s,@ECHO_N@,$ECHO_N,;t t
29823 s,@ECHO_T@,$ECHO_T,;t t
29824 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29825 s,@DEFS@,$DEFS,;t t
29826 s,@LIBS@,$LIBS,;t t
29827 s,@top_builddir@,$top_builddir,;t t
29828 s,@GREP@,$GREP,;t t
29829 s,@EGREP@,$EGREP,;t t
29830 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29831 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29832 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29833 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29834 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29835 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29836 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29837 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29838 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29839 s,@VERSION@,$VERSION,;t t
29840 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29841 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29842 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29843 s,@PACKAGE@,$PACKAGE,;t t
29844 s,@build@,$build,;t t
29845 s,@build_cpu@,$build_cpu,;t t
29846 s,@build_vendor@,$build_vendor,;t t
29847 s,@build_os@,$build_os,;t t
29848 s,@host@,$host,;t t
29849 s,@host_cpu@,$host_cpu,;t t
29850 s,@host_vendor@,$host_vendor,;t t
29851 s,@host_os@,$host_os,;t t
29852 s,@target@,$target,;t t
29853 s,@target_cpu@,$target_cpu,;t t
29854 s,@target_vendor@,$target_vendor,;t t
29855 s,@target_os@,$target_os,;t t
29856 s,@FGREP@,$FGREP,;t t
29857 s,@CC@,$CC,;t t
29858 s,@CFLAGS@,$CFLAGS,;t t
29859 s,@LDFLAGS@,$LDFLAGS,;t t
29860 s,@CPPFLAGS@,$CPPFLAGS,;t t
29861 s,@ac_ct_CC@,$ac_ct_CC,;t t
29862 s,@EXEEXT@,$EXEEXT,;t t
29863 s,@OBJEXT@,$OBJEXT,;t t
29864 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29865 s,@CPP@,$CPP,;t t
29866 s,@LDCONFIG@,$LDCONFIG,;t t
29867 s,@CXX@,$CXX,;t t
29868 s,@CXXFLAGS@,$CXXFLAGS,;t t
29869 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29870 s,@AWK@,$AWK,;t t
29871 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29872 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29873 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29874 s,@LINT@,$LINT,;t t
29875 s,@LINT_OPTS@,$LINT_OPTS,;t t
29876 s,@LINT_LIBS@,$LINT_LIBS,;t t
29877 s,@LN_S@,$LN_S,;t t
29878 s,@cf_config_suffix@,$cf_config_suffix,;t t
29879 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29880 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29881 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29882 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29883 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29884 s,@SET_MAKE@,$SET_MAKE,;t t
29885 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29886 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29887 s,@CTAGS@,$CTAGS,;t t
29888 s,@ETAGS@,$ETAGS,;t t
29889 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29890 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29891 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29892 s,@RANLIB@,$RANLIB,;t t
29893 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29894 s,@LD@,$LD,;t t
29895 s,@ac_ct_LD@,$ac_ct_LD,;t t
29896 s,@AR@,$AR,;t t
29897 s,@ac_ct_AR@,$ac_ct_AR,;t t
29898 s,@NM@,$NM,;t t
29899 s,@ac_ct_NM@,$ac_ct_NM,;t t
29900 s,@ARFLAGS@,$ARFLAGS,;t t
29901 s,@DESTDIR@,$DESTDIR,;t t
29902 s,@BUILD_CC@,$BUILD_CC,;t t
29903 s,@BUILD_CPP@,$BUILD_CPP,;t t
29904 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29905 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29906 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29907 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29908 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29909 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29910 s,@cf_list_models@,$cf_list_models,;t t
29911 s,@ABI_VERSION@,$ABI_VERSION,;t t
29912 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29913 s,@LIBTOOL@,$LIBTOOL,;t t
29914 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29915 s,@LT_UNDEF@,$LT_UNDEF,;t t
29916 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29917 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29918 s,@LIB_CREATE@,$LIB_CREATE,;t t
29919 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29920 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29921 s,@LIB_PREP@,$LIB_PREP,;t t
29922 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29923 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29924 s,@LIB_LINK@,$LIB_LINK,;t t
29925 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29926 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29927 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29928 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29929 s,@TICS_NAME@,$TICS_NAME,;t t
29930 s,@TINFO_NAME@,$TINFO_NAME,;t t
29931 s,@LIB_NAME@,$LIB_NAME,;t t
29932 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29933 s,@CC_G_OPT@,$CC_G_OPT,;t t
29934 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29935 s,@LD_MODEL@,$LD_MODEL,;t t
29936 s,@shlibdir@,$shlibdir,;t t
29937 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29938 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29939 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29940 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29941 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29942 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29943 s,@LINK_PROGS@,$LINK_PROGS,;t t
29944 s,@LINK_TESTS@,$LINK_TESTS,;t t
29945 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29946 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29947 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29948 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29949 s,@RPATH_LIST@,$RPATH_LIST,;t t
29950 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29951 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29952 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29953 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29954 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29955 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29956 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29957 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29958 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29959 s,@TIC@,$TIC,;t t
29960 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29961 s,@INFOCMP@,$INFOCMP,;t t
29962 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29963 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29964 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29965 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29966 s,@XTERM_KBS@,$XTERM_KBS,;t t
29967 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29968 s,@TERMINFO@,$TERMINFO,;t t
29969 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29970 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29971 s,@TERMPATH@,$TERMPATH,;t t
29972 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29973 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29974 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29975 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29976 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29977 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29978 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29979 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29980 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29981 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29982 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29983 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29984 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29985 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29986 s,@RGB_PATH@,$RGB_PATH,;t t
29987 s,@no_x11_rgb@,$no_x11_rgb,;t t
29988 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29989 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29990 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29991 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29992 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29993 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29994 s,@cf_manpage_format@,$cf_manpage_format,;t t
29995 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
29996 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
29997 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
29998 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29999 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30000 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30001 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30002 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30003 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30004 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30005 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30006 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30007 s,@PTHREAD@,$PTHREAD,;t t
30008 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30009 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30010 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30011 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30012 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30013 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30014 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30015 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30016 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30017 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30018 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30019 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30020 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30021 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30022 s,@ECHO_LT@,$ECHO_LT,;t t
30023 s,@ECHO_LD@,$ECHO_LD,;t t
30024 s,@RULE_CC@,$RULE_CC,;t t
30025 s,@SHOW_CC@,$SHOW_CC,;t t
30026 s,@ECHO_CC@,$ECHO_CC,;t t
30027 s,@ECHO_LINK@,$ECHO_LINK,;t t
30028 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30029 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30030 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30031 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30032 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30033 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30034 s,@ADAFLAGS@,$ADAFLAGS,;t t
30035 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30036 s,@ADA_TRACE@,$ADA_TRACE,;t t
30037 s,@MATH_LIB@,$MATH_LIB,;t t
30038 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30039 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30040 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30041 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30042 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30043 s,@TEST_LIBS@,$TEST_LIBS,;t t
30044 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30045 s,@CXXCPP@,$CXXCPP,;t t
30046 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30047 s,@CXX_AR@,$CXX_AR,;t t
30048 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30049 s,@CXXLIBS@,$CXXLIBS,;t t
30050 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30051 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30052 s,@M4_exists@,$M4_exists,;t t
30053 s,@cf_ada_make@,$cf_ada_make,;t t
30054 s,@cf_ada_config@,$cf_ada_config,;t t
30055 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30056 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30057 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30058 s,@cf_compile_generics@,$cf_compile_generics,;t t
30059 s,@cf_generic_objects@,$cf_generic_objects,;t t
30060 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30061 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30062 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30063 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30064 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30065 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30066 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30067 s,@cf_ada_package@,$cf_ada_package,;t t
30068 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30069 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30070 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30071 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30072 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30073 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30074 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30075 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30076 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30077 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30078 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30079 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30080 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30081 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30082 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30083 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30084 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30085 s,@TICS_LIBS@,$TICS_LIBS,;t t
30086 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30087 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30088 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30089 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30090 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30091 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30092 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30093 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30094 s,@includesubdir@,$includesubdir,;t t
30095 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30096 s,@TICS_LIST@,$TICS_LIST,;t t
30097 s,@TINFO_LIST@,$TINFO_LIST,;t t
30098 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30099 s,@FORM_NAME@,$FORM_NAME,;t t
30100 s,@MENU_NAME@,$MENU_NAME,;t t
30101 s,@PANEL_NAME@,$PANEL_NAME,;t t
30102 s,@CXX_NAME@,$CXX_NAME,;t t
30103 s,@TEST_ARGS@,$TEST_ARGS,;t t
30104 s,@TEST_DEPS@,$TEST_DEPS,;t t
30105 s,@TEST_ARG2@,$TEST_ARG2,;t t
30106 s,@TEST_DEP2@,$TEST_DEP2,;t t
30107 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30108 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30109 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30110 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30111 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30112 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30113 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30114 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30115 s,@cross_compiling@,$cross_compiling,;t t
30116 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30117 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30118 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30119 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30120 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30121 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30122 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30123 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30124 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30125 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30126 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30127 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30128 CEOF
30129
30130 EOF
30131
30132   cat >>"$CONFIG_STATUS" <<\EOF
30133   # Split the substitutions into bite-sized pieces for seds with
30134   # small command number limits, like on Digital OSF/1 and HP-UX.
30135   ac_max_sed_lines=48
30136   ac_sed_frag=1 # Number of current file.
30137   ac_beg=1 # First line for current file.
30138   ac_end=$ac_max_sed_lines # Line after last line for current file.
30139   ac_more_lines=:
30140   ac_sed_cmds=
30141   while "$ac_more_lines"; do
30142     if test "$ac_beg" -gt 1; then
30143       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30144     else
30145       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30146     fi
30147     if test ! -s "$tmp"/subs.frag; then
30148       ac_more_lines=false
30149     else
30150       # The purpose of the label and of the branching condition is to
30151       # speed up the sed processing (if there are no `@' at all, there
30152       # is no need to browse any of the substitutions).
30153       # These are the two extra sed commands mentioned above.
30154       (echo ':t
30155   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30156       # It is possible to make a multiline substitution using escaped newlines.
30157       # Ensure that we do not split the substitution between script fragments.
30158       ac_BEG=$ac_end
30159       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30160       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30161       if test -s "$tmp"/subs.next; then
30162         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30163         if test ! -s "$tmp"/subs.edit; then
30164           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30165           if test ! -s "$tmp"/subs.edit; then
30166             if test "$ac_beg" -gt 1; then
30167               ac_end=`expr "$ac_end" - 1`
30168               continue
30169             fi
30170           fi
30171         fi
30172       fi
30173
30174       if test -z "$ac_sed_cmds"; then
30175         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30176       else
30177         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30178       fi
30179       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30180       ac_beg=$ac_end
30181       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30182     fi
30183   done
30184   if test -z "$ac_sed_cmds"; then
30185     ac_sed_cmds="cat"
30186   fi
30187 fi # test -n "$CONFIG_FILES"
30188
30189 EOF
30190 cat >>"$CONFIG_STATUS" <<\EOF
30191 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30192   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30193   case "$ac_file" in
30194   - | *:- | *:-:* ) # input from stdin
30195         cat >"$tmp"/stdin
30196         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30197         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30198   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30199         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30200   * )   ac_file_in=$ac_file.in ;;
30201   esac
30202
30203   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30204   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30205          X"$ac_file" : 'X\(//\)[^/]' \| \
30206          X"$ac_file" : 'X\(//\)$' \| \
30207          X"$ac_file" : 'X\(/\)' \| \
30208          .     : '\(.\)' 2>/dev/null ||
30209 echo X"$ac_file" |
30210     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30211           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30212           /^X\(\/\/\)$/{ s//\1/; q; }
30213           /^X\(\/\).*/{ s//\1/; q; }
30214           s/.*/./; q'`
30215   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30216     { case "$ac_dir" in
30217   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30218   *)                      as_incr_dir=.;;
30219 esac
30220 as_dummy="$ac_dir"
30221 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30222   case $as_mkdir_dir in
30223     # Skip DOS drivespec
30224     ?:) as_incr_dir=$as_mkdir_dir ;;
30225     *)
30226       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30227       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30228     ;;
30229   esac
30230 done; }
30231
30232     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30233     # A "../" for each directory in $ac_dir_suffix.
30234     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30235   else
30236     ac_dir_suffix= ac_dots=
30237   fi
30238
30239   case "$srcdir" in
30240   .)  ac_srcdir=.
30241       if test -z "$ac_dots"; then
30242          ac_top_srcdir=.
30243       else
30244          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30245       fi ;;
30246   [\\/]* | ?:[\\/]* )
30247       ac_srcdir="$srcdir$ac_dir_suffix";
30248       ac_top_srcdir="$srcdir" ;;
30249   *) # Relative path.
30250     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30251     ac_top_srcdir="$ac_dots$srcdir" ;;
30252   esac
30253
30254   case $INSTALL in
30255   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30256   *) ac_INSTALL=$ac_dots$INSTALL ;;
30257   esac
30258
30259   if test x"$ac_file" != x-; then
30260     { echo "$as_me:30260: creating $ac_file" >&5
30261 echo "$as_me: creating $ac_file" >&6;}
30262     rm -f "$ac_file"
30263   fi
30264   # Let's still pretend it is `configure' which instantiates (i.e., don't
30265   # use $as_me), people would be surprised to read:
30266   #    /* config.h.  Generated automatically by config.status.  */
30267   configure_input="Generated automatically from `echo $ac_file_in |
30268                                                  sed 's,.*/,,'` by configure."
30269
30270   # First look for the input files in the build tree, otherwise in the
30271   # src tree.
30272   ac_file_inputs=`IFS=:
30273     for f in $ac_file_in; do
30274       case $f in
30275       -) echo "$tmp"/stdin ;;
30276       [\\/$]*)
30277          # Absolute (can't be DOS-style, as IFS=:)
30278          test -f "$f" || { { echo "$as_me:30278: error: cannot find input file: $f" >&5
30279 echo "$as_me: error: cannot find input file: $f" >&2;}
30280    { (exit 1); exit 1; }; }
30281          echo "$f";;
30282       *) # Relative
30283          if test -f "$f"; then
30284            # Build tree
30285            echo "$f"
30286          elif test -f "$srcdir/$f"; then
30287            # Source tree
30288            echo "$srcdir/$f"
30289          else
30290            # /dev/null tree
30291            { { echo "$as_me:30291: error: cannot find input file: $f" >&5
30292 echo "$as_me: error: cannot find input file: $f" >&2;}
30293    { (exit 1); exit 1; }; }
30294          fi;;
30295       esac
30296     done` || { (exit 1); exit 1; }
30297 EOF
30298 cat >>"$CONFIG_STATUS" <<\EOF
30299   ac_warn_datarootdir=no
30300   if test x"$ac_file" != x-; then
30301     for ac_item in $ac_file_inputs
30302     do
30303       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30304       if test -n "$ac_seen"; then
30305         ac_used=`grep '@datarootdir@' "$ac_item"`
30306         if test -z "$ac_used"; then
30307           { echo "$as_me:30307: WARNING: datarootdir was used implicitly but not set:
30308 $ac_seen" >&5
30309 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30310 $ac_seen" >&2;}
30311           ac_warn_datarootdir=yes
30312         fi
30313       fi
30314       ac_seen=`grep '${datarootdir}' "$ac_item"`
30315       if test -n "$ac_seen"; then
30316         { echo "$as_me:30316: WARNING: datarootdir was used explicitly but not set:
30317 $ac_seen" >&5
30318 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30319 $ac_seen" >&2;}
30320         ac_warn_datarootdir=yes
30321       fi
30322     done
30323   fi
30324
30325 if test "x$ac_warn_datarootdir" = xyes; then
30326   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30327 fi
30328
30329 EOF
30330 cat >>"$CONFIG_STATUS" <<EOF
30331   sed "$ac_vpsub
30332 $extrasub
30333 EOF
30334 cat >>"$CONFIG_STATUS" <<\EOF
30335 :t
30336 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30337 s,@configure_input@,$configure_input,;t t
30338 s,@srcdir@,$ac_srcdir,;t t
30339 s,@top_srcdir@,$ac_top_srcdir,;t t
30340 s,@INSTALL@,$ac_INSTALL,;t t
30341 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30342   rm -f "$tmp"/stdin
30343 EOF
30344 test -n "${FGREP}" || FGREP="grep -F"
30345 test -n "${EGREP}" || EGREP="grep -E"
30346 cat >>"$CONFIG_STATUS" <<EOF
30347   test -n "\${FGREP}" || FGREP="$FGREP"
30348   test -n "\${EGREP}" || EGREP="$EGREP"
30349 EOF
30350 cat >>"$CONFIG_STATUS" <<\EOF
30351   if test x"$ac_file" != x-; then
30352     cp "$tmp/out" "$ac_file"
30353
30354     for ac_name in prefix exec_prefix datarootdir
30355     do
30356         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30357         if test -n "$ac_seen"; then
30358             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30359             if test -z "$ac_init"; then
30360               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30361               { echo "$as_me:30361: WARNING: Variable $ac_name is used but was not set:
30362 $ac_seen" >&5
30363 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30364 $ac_seen" >&2;}
30365             fi
30366         fi
30367     done
30368     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30369     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30370     if test -s "$tmp"/out; then
30371       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30372       { echo "$as_me:30372: WARNING: Some variables may not be substituted:
30373 $ac_seen" >&5
30374 echo "$as_me: WARNING: Some variables may not be substituted:
30375 $ac_seen" >&2;}
30376     fi
30377   else
30378     cat "$tmp"/out
30379   fi
30380   rm -f "$tmp"/out
30381
30382 done
30383 EOF
30384 cat >>"$CONFIG_STATUS" <<\EOF
30385
30386 #
30387 # CONFIG_HEADER section.
30388 #
30389
30390 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30391 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30392 #
30393 # ac_d sets the value in "#define NAME VALUE" lines.
30394 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30395 ac_dB='[        ].*$,\1#\2'
30396 ac_dC=' '
30397 ac_dD=',;t'
30398 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30399 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30400 ac_iB='\([      ]\),\1#\2define\3'
30401 ac_iC=' '
30402 ac_iD='\4,;t'
30403 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30404 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30405 ac_uB='$,\1#\2define\3'
30406 ac_uC=' '
30407 ac_uD=',;t'
30408
30409 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30410   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30411   case "$ac_file" in
30412   - | *:- | *:-:* ) # input from stdin
30413         cat >"$tmp"/stdin
30414         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30415         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30416   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30417         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30418   * )   ac_file_in=$ac_file.in ;;
30419   esac
30420
30421   test x"$ac_file" != x- && { echo "$as_me:30421: creating $ac_file" >&5
30422 echo "$as_me: creating $ac_file" >&6;}
30423
30424   # First look for the input files in the build tree, otherwise in the
30425   # src tree.
30426   ac_file_inputs=`IFS=:
30427     for f in $ac_file_in; do
30428       case $f in
30429       -) echo "$tmp"/stdin ;;
30430       [\\/$]*)
30431          # Absolute (can't be DOS-style, as IFS=:)
30432          test -f "$f" || { { echo "$as_me:30432: error: cannot find input file: $f" >&5
30433 echo "$as_me: error: cannot find input file: $f" >&2;}
30434    { (exit 1); exit 1; }; }
30435          echo $f;;
30436       *) # Relative
30437          if test -f "$f"; then
30438            # Build tree
30439            echo $f
30440          elif test -f "$srcdir/$f"; then
30441            # Source tree
30442            echo "$srcdir/$f"
30443          else
30444            # /dev/null tree
30445            { { echo "$as_me:30445: error: cannot find input file: $f" >&5
30446 echo "$as_me: error: cannot find input file: $f" >&2;}
30447    { (exit 1); exit 1; }; }
30448          fi;;
30449       esac
30450     done` || { (exit 1); exit 1; }
30451   # Remove the trailing spaces.
30452   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30453
30454 EOF
30455
30456 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30457 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30458 # be either 'cat' or 'sort'.
30459 cat confdefs.h | uniq >conftest.vals
30460
30461 # Break up conftest.vals because some shells have a limit on
30462 # the size of here documents, and old seds have small limits too.
30463
30464 rm -f conftest.tail
30465 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30466 while grep . conftest.vals >/dev/null
30467 do
30468   # Write chunks of a limited-size here document to conftest.frag.
30469   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30470   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30471   echo 'CEOF' >> "$CONFIG_STATUS"
30472   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30473   rm -f conftest.vals
30474   mv conftest.tail conftest.vals
30475 done
30476 rm -f conftest.vals
30477
30478 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30479 # marker @DEFS@.
30480 echo '  cat >> conftest.edit <<CEOF
30481 /@DEFS@/r conftest.frag
30482 /@DEFS@/d
30483 CEOF
30484 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30485 rm -f "$tmp"/in
30486 mv "$tmp"/out "$tmp"/in
30487 rm -f conftest.edit conftest.frag
30488 ' >> "$CONFIG_STATUS"
30489
30490 cat >>"$CONFIG_STATUS" <<\EOF
30491   # Let's still pretend it is `configure' which instantiates (i.e., don't
30492   # use $as_me), people would be surprised to read:
30493   #    /* config.h.  Generated automatically by config.status.  */
30494   if test x"$ac_file" = x-; then
30495     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30496   else
30497     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30498   fi
30499   cat "$tmp"/in >>"$tmp"/config.h
30500   rm -f "$tmp"/in
30501   if test x"$ac_file" != x-; then
30502     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30503       { echo "$as_me:30503: $ac_file is unchanged" >&5
30504 echo "$as_me: $ac_file is unchanged" >&6;}
30505     else
30506       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30507          X"$ac_file" : 'X\(//\)[^/]' \| \
30508          X"$ac_file" : 'X\(//\)$' \| \
30509          X"$ac_file" : 'X\(/\)' \| \
30510          .     : '\(.\)' 2>/dev/null ||
30511 echo X"$ac_file" |
30512     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30513           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30514           /^X\(\/\/\)$/{ s//\1/; q; }
30515           /^X\(\/\).*/{ s//\1/; q; }
30516           s/.*/./; q'`
30517       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30518         { case "$ac_dir" in
30519   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30520   *)                      as_incr_dir=.;;
30521 esac
30522 as_dummy="$ac_dir"
30523 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30524   case $as_mkdir_dir in
30525     # Skip DOS drivespec
30526     ?:) as_incr_dir=$as_mkdir_dir ;;
30527     *)
30528       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30529       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30530     ;;
30531   esac
30532 done; }
30533
30534       fi
30535       rm -f "$ac_file"
30536       mv "$tmp/config.h" "$ac_file"
30537     fi
30538   else
30539     cat "$tmp"/config.h
30540     rm -f "$tmp"/config.h
30541   fi
30542 done
30543 EOF
30544 cat >>"$CONFIG_STATUS" <<\EOF
30545 #
30546 # CONFIG_COMMANDS section.
30547 #
30548 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30549   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30550   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30551
30552   case "$ac_dest" in
30553     default )
30554 if test "x$cf_with_tests" != xno ; then
30555
30556 for cf_dir in test
30557 do
30558         if test ! -d "$srcdir/$cf_dir" ; then
30559                 continue
30560         elif test -f "$srcdir/$cf_dir/programs" ; then
30561                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30562         fi
30563 done
30564
30565 fi
30566
30567 cf_prefix=$LIB_PREFIX
30568
30569 case "$cf_cv_shlib_version" in
30570 (cygdll|msysdll|mingw|msvcdll)
30571         TINFO_NAME=$TINFO_ARG_SUFFIX
30572         TINFO_SUFFIX=.dll
30573         ;;
30574 esac
30575
30576 if test -n "$TINFO_SUFFIX" ; then
30577         case "$TINFO_SUFFIX" in
30578         (tw*)
30579                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30580                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30581                 ;;
30582         (t*)
30583                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30584                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30585                 ;;
30586         (w*)
30587                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30588                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30589                 ;;
30590         esac
30591 fi
30592
30593 for cf_dir in $SRC_SUBDIRS
30594 do
30595         if test ! -d "$srcdir/$cf_dir" ; then
30596                 continue
30597         elif test -f "$srcdir/$cf_dir/modules" ; then
30598
30599                 SHARED_LIB=
30600                 Libs_To_Make=
30601                 cf_awk_program=
30602                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30603                 then
30604                         cf_awk_program="$cf_awk_program\
30605 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30606 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30607 "
30608                 fi
30609
30610                 if test "x$WILDCARD_SYMS" = xno
30611                 then
30612                         cf_awk_program="$cf_awk_program\
30613 /[      ]_\\*;/ { skip=1; next; }\
30614 "
30615                 fi
30616
30617                 if test "x$cf_awk_program" != "x"
30618                 then
30619                         cat >>$cf_dir/Makefile <<CF_EOF
30620
30621 # Generated by CF_LIB_RULES
30622 resulting.map: $UNALTERED_SYMS
30623         $AWK 'BEGIN { skip = 1; last=""; } \
30624 $cf_awk_program \
30625 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30626  skip = 0; last = \$\$0; } \
30627 END { print last; }' < "$UNALTERED_SYMS" >\$@
30628
30629 distclean::
30630         rm -f resulting.map
30631 CF_EOF
30632                 fi
30633
30634                 for cf_item in $cf_LIST_MODELS
30635                 do
30636
30637         case X$cf_item in
30638         (Xlibtool)
30639                 cf_suffix='.la'
30640                 cf_depsuf=$cf_suffix
30641                 ;;
30642         (Xdebug)
30643                 case "$cf_cv_system_name" in
30644                 (*-msvc*)
30645                         cf_suffix='_g.lib'
30646                         ;;
30647                 (*)
30648                         cf_suffix='_g.a'
30649                         ;;
30650                 esac
30651                 cf_depsuf=$cf_suffix
30652                 ;;
30653         (Xprofile)
30654                 case "$cf_cv_system_name" in
30655                 (*-msvc*)
30656                         cf_suffix='_p.lib'
30657                         ;;
30658                 (*)
30659                         cf_suffix='_p.a'
30660                         ;;
30661                 esac
30662                 cf_depsuf=$cf_suffix
30663                 ;;
30664         (Xshared)
30665                 case "$cf_cv_system_name" in
30666                 (aix[5-7]*)
30667                         cf_suffix='.so'
30668                         cf_depsuf=$cf_suffix
30669                         ;;
30670                 (*-msvc*)
30671                         cf_suffix='.dll'
30672                         cf_depsuf='.dll.lib'
30673                         ;;
30674                 (cygwin*|msys*|mingw*)
30675                         cf_suffix='.dll'
30676                         cf_depsuf='.dll.a'
30677                         ;;
30678                 (darwin*)
30679                         cf_suffix='.dylib'
30680                         cf_depsuf=$cf_suffix
30681                         ;;
30682                 (hpux*)
30683                         case "$target" in
30684                         (ia64*)
30685                                 cf_suffix='.so'
30686                                 cf_depsuf=$cf_suffix
30687                                 ;;
30688                         (*)
30689                                 cf_suffix='.sl'
30690                                 cf_depsuf=$cf_suffix
30691                                 ;;
30692                         esac
30693                         ;;
30694                 (*)
30695                         cf_suffix='.so'
30696                         cf_depsuf=$cf_suffix
30697                         ;;
30698                 esac
30699                 ;;
30700         (*)
30701                 case "$target" in
30702                 (*-msvc*)
30703                         cf_suffix='.lib'
30704                         ;;
30705                 (*)
30706                         cf_suffix='.a'
30707                         ;;
30708                 esac
30709                 cf_depsuf=$cf_suffix
30710                 ;;
30711         esac
30712         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30713         then
30714                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30715                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30716         fi
30717
30718                         if test "$cf_dir" = "c++"
30719                         then
30720
30721 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30722
30723 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30724
30725                         else
30726
30727 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30728
30729 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30730
30731                         fi
30732                         test -z "$cf_libname" && cf_libname="$cf_dir"
30733                         if test "$cf_item" = shared ; then
30734                                 if test -n "${LIB_SUFFIX}"
30735                                 then
30736                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30737                                 else
30738                                         cf_shared_suffix="$cf_suffix"
30739                                 fi
30740                                 if test "$cf_cv_do_symlinks" = yes ; then
30741                                         cf_version_name=
30742
30743                                         case "$cf_cv_shlib_version" in
30744                                         (rel)
30745                                                 cf_version_name=REL_VERSION
30746                                                 ;;
30747                                         (abi)
30748                                                 cf_version_name=ABI_VERSION
30749                                                 ;;
30750                                         esac
30751
30752                                         if test -n "$cf_version_name"
30753                                         then
30754                                                 case "$cf_cv_system_name" in
30755                                                 (darwin*)
30756                                                         # "w", etc?
30757                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30758                                                         ;;
30759                                                 (*)
30760                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30761                                                         ;;
30762                                                 esac
30763                                         fi
30764                                         if test -n "${USE_LIB_SUFFIX}"
30765                                         then
30766                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30767                                         else
30768                                                 cf_shared_suffix="$cf_suffix"
30769                                         fi
30770                                 fi
30771                                 # cygwin needs import library, and has unique naming convention
30772                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30773                                 # use 'cyg' prefix for shared lib.
30774                                 case "$cf_cv_shlib_version" in
30775                                 (cygdll)
30776                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30777                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30778                                         ;;
30779                                 (msysdll)
30780                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30781                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30782                                         ;;
30783                                 (mingw)
30784                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30785                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30786                                         ;;
30787                                 (msvcdll)
30788                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30789                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30790                                         ;;
30791                                 (*)
30792                                         cf_add_lib=
30793                                         ;;
30794                                 esac
30795                                 if test -n "$cf_add_lib"
30796                                 then
30797                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30798                                         continue
30799                                 fi
30800                         fi
30801                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30802                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30803                 done
30804
30805                 if test "$cf_dir" = ncurses ; then
30806                         cf_subsets="$LIB_SUBSETS"
30807                         cf_r_parts="$cf_subsets"
30808                         cf_liblist="$Libs_To_Make"
30809
30810                         while test -n "$cf_r_parts"
30811                         do
30812                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30813                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30814                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30815                                         cf_add_lib=
30816                                         case "$cf_l_parts" in
30817                                         (*termlib*)
30818                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30819                                                 ;;
30820                                         (*ticlib*)
30821                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30822                                                 ;;
30823                                         (*)
30824                                                 break
30825                                                 ;;
30826                                         esac
30827                                         if test -n "$cf_add_lib"; then
30828                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30829                                         fi
30830                                 else
30831                                         break
30832                                 fi
30833                         done
30834                 else
30835                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30836                 fi
30837
30838                 if test "$cf_dir" = c++; then
30839                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30840                                 cf_list=
30841                                 for cf_item in $Libs_To_Make
30842                                 do
30843                                         case "$cf_item" in
30844                                         (*.a)
30845                                                 ;;
30846                                         (*)
30847                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30848                                                 ;;
30849                                         esac
30850                                         for cf_test in $cf_list
30851                                         do
30852                                                 if test "$cf_test" = "$cf_item"
30853                                                 then
30854                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30855                                                         cf_item=
30856                                                         break
30857                                                 fi
30858                                         done
30859                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30860                                 done
30861                                 Libs_To_Make="$cf_list"
30862                         fi
30863                 fi
30864
30865                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30866                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30867                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30868                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30869
30870                 $AWK -f "$srcdir/mk-0th.awk" \
30871                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30872                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30873
30874                 for cf_subset in $cf_subsets
30875                 do
30876                         cf_subdirs=
30877                         for cf_item in $cf_LIST_MODELS
30878                         do
30879
30880                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30881
30882 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30883
30884                         CXX_MODEL=$cf_ITEM
30885                         if test "$CXX_MODEL" = SHARED; then
30886                                 case "$cf_cv_shlib_version" in
30887                                 (cygdll|msysdll|mingw|msvcdll)
30888                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30889
30890 echo "${as_me:-configure}:30890: testing overriding CXX_MODEL to SHARED ..." 1>&5
30891
30892                                         with_shared_cxx=yes
30893                                         ;;
30894                                 (*)
30895                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30896                                         ;;
30897                                 esac
30898                         fi
30899
30900         case X$cf_item in
30901         (Xlibtool)
30902                 cf_suffix='.la'
30903                 cf_depsuf=$cf_suffix
30904                 ;;
30905         (Xdebug)
30906                 case "$cf_cv_system_name" in
30907                 (*-msvc*)
30908                         cf_suffix='_g.lib'
30909                         ;;
30910                 (*)
30911                         cf_suffix='_g.a'
30912                         ;;
30913                 esac
30914                 cf_depsuf=$cf_suffix
30915                 ;;
30916         (Xprofile)
30917                 case "$cf_cv_system_name" in
30918                 (*-msvc*)
30919                         cf_suffix='_p.lib'
30920                         ;;
30921                 (*)
30922                         cf_suffix='_p.a'
30923                         ;;
30924                 esac
30925                 cf_depsuf=$cf_suffix
30926                 ;;
30927         (Xshared)
30928                 case "$cf_cv_system_name" in
30929                 (aix[5-7]*)
30930                         cf_suffix='.so'
30931                         cf_depsuf=$cf_suffix
30932                         ;;
30933                 (*-msvc*)
30934                         cf_suffix='.dll'
30935                         cf_depsuf='.dll.lib'
30936                         ;;
30937                 (cygwin*|msys*|mingw*)
30938                         cf_suffix='.dll'
30939                         cf_depsuf='.dll.a'
30940                         ;;
30941                 (darwin*)
30942                         cf_suffix='.dylib'
30943                         cf_depsuf=$cf_suffix
30944                         ;;
30945                 (hpux*)
30946                         case "$target" in
30947                         (ia64*)
30948                                 cf_suffix='.so'
30949                                 cf_depsuf=$cf_suffix
30950                                 ;;
30951                         (*)
30952                                 cf_suffix='.sl'
30953                                 cf_depsuf=$cf_suffix
30954                                 ;;
30955                         esac
30956                         ;;
30957                 (*)
30958                         cf_suffix='.so'
30959                         cf_depsuf=$cf_suffix
30960                         ;;
30961                 esac
30962                 ;;
30963         (*)
30964                 case "$target" in
30965                 (*-msvc*)
30966                         cf_suffix='.lib'
30967                         ;;
30968                 (*)
30969                         cf_suffix='.a'
30970                         ;;
30971                 esac
30972                 cf_depsuf=$cf_suffix
30973                 ;;
30974         esac
30975         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30976         then
30977                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30978                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30979         fi
30980
30981         case $cf_item in
30982         (libtool) cf_subdir='obj_lo'  ;;
30983         (normal)  cf_subdir='objects' ;;
30984         (debug)   cf_subdir='obj_g' ;;
30985         (profile) cf_subdir='obj_p' ;;
30986         (shared)
30987                 case "$cf_cv_system_name" in
30988                 (cygwin|msys)
30989                         cf_subdir='objects' ;;
30990                 (*)
30991                         cf_subdir='obj_s' ;;
30992                 esac
30993         esac
30994
30995                         # Test for case where we build libtinfo with a different name.
30996                         cf_libname=$cf_dir
30997                         if test "$cf_dir" = ncurses ; then
30998                                 case "$cf_subset" in
30999                                 (*base*)
31000                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31001                                         ;;
31002                                 (*termlib*)
31003                                         cf_libname=$TINFO_LIB_SUFFIX
31004                                         ;;
31005                                 (ticlib*)
31006                                         cf_libname=$TICS_LIB_SUFFIX
31007                                         ;;
31008                                 esac
31009                         elif test "$cf_dir" = c++ ; then
31010
31011 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31012
31013 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31014
31015                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31016                         else
31017
31018 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31019
31020 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31021
31022                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31023                         fi
31024                         if test -n "${USE_ARG_SUFFIX}" ; then
31025                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31026                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31027                         fi
31028
31029                         # These dependencies really are for development, not
31030                         # builds, but they are useful in porting, too.
31031                         cf_depend="../include/ncurses_cfg.h"
31032                         if test "$srcdir" = "."; then
31033                                 cf_reldir="."
31034                         else
31035                                 cf_reldir="\${srcdir}"
31036                         fi
31037
31038                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31039                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31040                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31041                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31042                         fi
31043
31044                         cf_dir_suffix=
31045                         old_cf_suffix="$cf_suffix"
31046                         if test "$cf_cv_shlib_version_infix" = yes ; then
31047                         if test -n "$USE_LIB_SUFFIX" ; then
31048                                 case "$USE_LIB_SUFFIX" in
31049                                 (tw*)
31050                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31051                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31052                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31053                                         ;;
31054                                 (t*)
31055                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31056                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31057                                         cf_dir_suffix=t$EXTRA_SUFFIX
31058                                         ;;
31059                                 (w*)
31060                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31061                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31062                                         cf_dir_suffix=w$EXTRA_SUFFIX
31063                                         ;;
31064                                 (*)
31065                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31066                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31067                                         cf_dir_suffix=$EXTRA_SUFFIX
31068                                         ;;
31069                                 esac
31070                         fi
31071                         fi
31072
31073                         $AWK -f "$srcdir/mk-1st.awk" \
31074                                 name=${cf_libname}${cf_dir_suffix} \
31075                                 traces=$LIB_TRACING \
31076                                 MODEL=$cf_ITEM \
31077                                 CXX_MODEL=$CXX_MODEL \
31078                                 LIB_SUFFIX=$LIB_SUFFIX \
31079                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31080                                 make_phony="${cf_cv_make_PHONY:-no}" \
31081                                 model=$cf_subdir \
31082                                 prefix=$cf_prefix \
31083                                 suffix=$cf_suffix \
31084                                 subset=$cf_subset \
31085                                 driver=$cf_cv_term_driver \
31086                                 SymLink="$LN_S" \
31087                                 TermlibRoot=$TINFO_NAME \
31088                                 TermlibSuffix=$TINFO_SUFFIX \
31089                                 ShlibVer=$cf_cv_shlib_version \
31090                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31091                                 ReLink=${cf_cv_do_relink:-no} \
31092                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31093                                 DoLinks=$cf_cv_do_symlinks \
31094                                 rmSoLocs=$cf_cv_rm_so_locs \
31095                                 ldconfig="$LDCONFIG" \
31096                                 overwrite=$WITH_OVERWRITE \
31097                                 depend="$cf_depend" \
31098                                 host="$host" \
31099                                 libtool_version="$LIBTOOL_VERSION" \
31100                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31101
31102                         cf_suffix="$old_cf_suffix"
31103
31104                         for cf_subdir2 in $cf_subdirs lib
31105                         do
31106                                 test "$cf_subdir" = "$cf_subdir2" && break
31107                         done
31108                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31109                         $AWK -f "$srcdir/mk-2nd.awk" \
31110                                 name=$cf_dir \
31111                                 traces=$LIB_TRACING \
31112                                 MODEL=$cf_ITEM \
31113                                 model=$cf_subdir \
31114                                 subset=$cf_subset \
31115                                 srcdir=$srcdir \
31116                                 echo=$WITH_ECHO \
31117                                 crenames=$cf_cv_prog_CC_c_o \
31118                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31119                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31120                         cf_subdirs="$cf_subdirs $cf_subdir"
31121                         done
31122                 done
31123         fi
31124
31125         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31126 done
31127
31128 echo >> Makefile
31129 echo '# generated by CF_LIB_RULES' >> Makefile
31130
31131 if test "x$cf_cv_make_PHONY" = xyes ; then
31132         cat >> Makefile <<-CF_EOF
31133
31134         .PHONY :        libs
31135         .PHONY :        lintlib
31136         .PHONY :        install.includes
31137         .PHONY :        uninstall.includes
31138         .PHONY :        install.libs
31139         .PHONY :        uninstall.libs
31140 CF_EOF
31141 fi
31142
31143 for cf_dir in $SRC_SUBDIRS
31144 do
31145         if test ! -d "$srcdir/$cf_dir" ; then
31146                 continue
31147         fi
31148
31149         if test -f "$cf_dir/Makefile" ; then
31150                 case "$cf_dir" in
31151                 (Ada95)
31152                         echo 'libs \' >> Makefile
31153                         echo 'install.libs \' >> Makefile
31154                         echo 'uninstall.libs ::' >> Makefile
31155                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31156                         ;;
31157                 esac
31158         fi
31159
31160         if test -f "$srcdir/$cf_dir/modules" ; then
31161
31162                 if test "x$cf_cv_make_PHONY" = xyes ; then
31163                         cat >> Makefile <<-CF_EOF
31164
31165                         .PHONY :        install.$cf_dir
31166                         .PHONY :        uninstall.$cf_dir
31167 CF_EOF
31168                 fi
31169
31170                 echo >> Makefile
31171                 if test -f "$srcdir/$cf_dir/headers" ; then
31172 cat >> Makefile <<CF_EOF
31173 install.includes \\
31174 uninstall.includes \\
31175 CF_EOF
31176                 fi
31177
31178 cat >> Makefile <<CF_EOF
31179 lint \\
31180 libs \\
31181 lintlib \\
31182 install.libs \\
31183 uninstall.libs \\
31184 install.$cf_dir \\
31185 uninstall.$cf_dir ::
31186         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31187 CF_EOF
31188         elif test -f "$srcdir/$cf_dir/headers" ; then
31189 cat >> Makefile <<CF_EOF
31190
31191 libs \\
31192 install.libs \\
31193 uninstall.libs \\
31194 install.includes \\
31195 uninstall.includes ::
31196         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31197 CF_EOF
31198 fi
31199 done
31200
31201 if test "x$cf_cv_make_PHONY" = xyes ; then
31202         cat >> Makefile <<-CF_EOF
31203
31204         .PHONY :        install.data
31205         .PHONY :        uninstall.data
31206 CF_EOF
31207 fi
31208
31209 if test "x$cf_with_db_install" = xyes; then
31210 cat >> Makefile <<CF_EOF
31211
31212 install.libs uninstall.libs \\
31213 install.data uninstall.data ::
31214 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31215 CF_EOF
31216 else
31217 cat >> Makefile <<CF_EOF
31218
31219 install.libs uninstall.libs ::
31220         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31221 CF_EOF
31222 fi
31223
31224 if test "x$cf_with_manpages" = xyes; then
31225
31226 if test "x$cf_cv_make_PHONY" = xyes ; then
31227         cat >> Makefile <<-CF_EOF
31228
31229         .PHONY :        install.man
31230         .PHONY :        uninstall.man
31231 CF_EOF
31232 fi
31233
31234 cat >> Makefile <<CF_EOF
31235
31236 install.man \\
31237 uninstall.man ::
31238         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31239 CF_EOF
31240 fi
31241
31242 cat >> Makefile <<CF_EOF
31243
31244 distclean ::
31245         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31246         rm -f headers.sh headers.sed mk_shared_lib.sh
31247         rm -f edit_man.* man_alias.* *.tmp
31248         rm -rf \${DIRS_TO_MAKE}
31249 CF_EOF
31250
31251 rm -f headers.sed headers.sh
31252
31253 echo creating headers.sh
31254 cat >headers.sh <<CF_EOF
31255 #! $SHELL
31256 # This shell script is generated by the 'configure' script.  It is invoked in a
31257 # subdirectory of the build tree.  It generates a sed-script in the parent
31258 # directory that is used to adjust includes for header files that reside in a
31259 # subdirectory of /usr/include, etc.
31260 PRG=""
31261 while test \$# != 3
31262 do
31263 PRG="\$PRG \$1"; shift
31264 done
31265 DST=\$1
31266 REF=\$2
31267 SRC=\$3
31268 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31269 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31270 echo installing \$SRC in \$DST
31271 CF_EOF
31272
31273 if test "$WITH_CURSES_H" = yes; then
31274         cat >>headers.sh <<CF_EOF
31275 case \$DST in
31276 (/*/include/*)
31277         END=\`basename \$DST\`
31278         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31279         do
31280                 NAME=\`basename \$i\`
31281                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31282         done
31283         ;;
31284 (*)
31285         echo "" >> \$TMPSED
31286         ;;
31287 esac
31288 CF_EOF
31289
31290 else
31291         cat >>headers.sh <<CF_EOF
31292 case \$DST in
31293 (/*/include/*)
31294         END=\`basename \$DST\`
31295         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31296         do
31297                 NAME=\`basename \$i\`
31298                 if test "\$NAME" = "curses.h"
31299                 then
31300                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31301                         NAME=ncurses.h
31302                 fi
31303                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31304         done
31305         ;;
31306 (*)
31307         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31308         ;;
31309 esac
31310 CF_EOF
31311 fi
31312 cat >>headers.sh <<CF_EOF
31313 rm -f \$TMPSRC
31314 sed -f \$TMPSED \$SRC > \$TMPSRC
31315 NAME=\`basename \$SRC\`
31316 CF_EOF
31317 if test "$WITH_CURSES_H" != yes; then
31318         cat >>headers.sh <<CF_EOF
31319 test "\$NAME" = "curses.h" && NAME=ncurses.h
31320 CF_EOF
31321 fi
31322 cat >>headers.sh <<CF_EOF
31323 # Just in case someone gzip'd manpages, remove the conflicting copy.
31324 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31325
31326 eval \$PRG \$TMPSRC \$DST/\$NAME
31327 rm -f \$TMPSRC \$TMPSED
31328 CF_EOF
31329
31330 chmod 0755 headers.sh
31331
31332 for cf_dir in $SRC_SUBDIRS
31333 do
31334         if test ! -d "$srcdir/$cf_dir" ; then
31335                 continue
31336         fi
31337
31338         if test -f "$srcdir/$cf_dir/headers" ; then
31339                 $AWK -f "$srcdir/mk-hdr.awk" \
31340                         subset="$LIB_SUBSETS" \
31341                         compat="$WITH_CURSES_H" \
31342                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31343         fi
31344
31345         if test -f "$srcdir/$cf_dir/modules" ; then
31346                 if test "$cf_dir" != "c++" ; then
31347                         if test "x$cf_cv_make_PHONY" = xyes ; then
31348                                 cat >> $cf_dir/Makefile <<-CF_EOF
31349
31350                                 .PHONY :        depend
31351 CF_EOF
31352                         fi
31353
31354                         cat >>$cf_dir/Makefile <<"CF_EOF"
31355 depend : ${AUTO_SRC}
31356         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31357
31358 # DO NOT DELETE THIS LINE -- make depend depends on it.
31359 CF_EOF
31360                 fi
31361         fi
31362 done
31363
31364 if test "$MANPAGE_RENAMES" != no ; then
31365         # Construct a sed-script to perform renaming within man-pages
31366         test -n "$verbose" && echo "creating edit_man.sed"
31367         test ! -d man && mkdir man
31368         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31369 fi
31370
31371 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31372 if test -z "$USE_OLD_MAKERULES" ; then
31373         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31374 fi
31375 fi
31376  ;;
31377   esac
31378 done
31379 EOF
31380
31381 cat >>"$CONFIG_STATUS" <<\EOF
31382
31383 { (exit 0); exit 0; }
31384 EOF
31385 chmod +x "$CONFIG_STATUS"
31386 ac_clean_files=$ac_clean_files_save
31387
31388 # configure is writing to config.log, and then calls config.status.
31389 # config.status does its own redirection, appending to config.log.
31390 # Unfortunately, on DOS this fails, as config.log is still kept open
31391 # by configure, so config.status won't be able to write to it; its
31392 # output is simply discarded.  So we exec the FD to /dev/null,
31393 # effectively closing config.log, so it can be properly (re)opened and
31394 # appended to by config.status.  When coming back to configure, we
31395 # need to make the FD available again.
31396 if test "$no_create" != yes; then
31397   ac_cs_success=:
31398   exec 5>/dev/null
31399   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31400   exec 5>>config.log
31401   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31402   # would make configure fail if this is the last instruction.
31403   "$ac_cs_success" || { (exit 1); exit 1; }
31404 fi
31405 ${MAKE:-make} preinstall