]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
4a74babd4029c408960eca97898c2104baed9570
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.782 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20231210.
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
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  name ncurses*X-config file with X
729   --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
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[=XXX]  suffix pkg-config files with XXX
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
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[={rel|abi}] use release or ABI version in shared library file names
756   --with-libtool-opts[=XXX] give libtool additional options XXX
757   --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
758   --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
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 X 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   --disable-widec         compile without wide character and UTF-8 support
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     obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        fall back to TYPE for curses 'bool' typedef
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    use signed chars for Boolean array 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   --disable-opaque-curses do not make WINDOW, etc., structures opaque
833   --disable-opaque-form   do not make form library structures opaque
834   --disable-opaque-menu   do not make menu library structures opaque
835   --disable-opaque-panel  do not 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-check-size     compile-in code to detect screensize of serial terminals
840   --enable-hard-tabs      compile with hard-tabs code
841   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
842 Experimental Code:
843   --disable-assumed-color do not assume anything about default-colors
844   --disable-hashmap       compile without hashmap scrolling-optimization
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] use CMD as Ada95 compiler (default: gnatmake)
870   --with-ada-include=DIR  find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
871   --with-ada-objects=DIR  find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
872   --with-ada-sharedlib    build Ada95 shared library; requires GNAT project support
873   --with-ada-libname[=XXX]  use XXX as Ada95 library name
874 Library basenames for pkgsrc:
875   --with-form-libname[=XXX] override ifelse(,,form,) basename of library
876   --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
877   --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
878   --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library
879
880 Some influential environment variables:
881   CC          C compiler command
882   CFLAGS      C compiler flags
883   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
884               nonstandard directory <lib dir>
885   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
886               headers in a nonstandard directory <include dir>
887   CPP         C preprocessor
888   CXX         C++ compiler command
889   CXXFLAGS    C++ compiler flags
890   CXXCPP      C++ preprocessor
891
892 Use these variables to override the choices made by `configure' or to help
893 it to find libraries and programs with nonstandard names/locations.
894
895 EOF
896 fi
897
898 if test "$ac_init_help" = "recursive"; then
899   # If there are subdirs, report their specific --help.
900   ac_popdir=`pwd`
901   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
902     cd "$ac_subdir"
903     # A "../" for each directory in /$ac_subdir.
904     ac_dots=`echo "$ac_subdir" |
905              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
906
907     case "$srcdir" in
908     .) # No --srcdir option.  We are building in place.
909       ac_sub_srcdir="$srcdir" ;;
910     [\\/]* | ?:[\\/]* ) # Absolute path.
911       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
912     *) # Relative path.
913       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
914     esac
915
916     # Check for guested configure; otherwise get Cygnus style configure.
917     if test -f "$ac_sub_srcdir/configure.gnu"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure"; then
921       echo
922       $SHELL "$ac_sub_srcdir/configure" --help=recursive
923     elif test -f "$ac_sub_srcdir/configure.ac" ||
924            test -f "$ac_sub_srcdir/configure.in"; then
925       echo
926       "$ac_configure" --help
927     else
928       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
929     fi
930     cd "$ac_popdir"
931   done
932 fi
933
934 test -n "$ac_init_help" && exit 0
935 if "$ac_init_version"; then
936   cat <<\EOF
937
938 Copyright 2003-2022,2023        Thomas E. Dickey
939 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
940 Free Software Foundation, Inc.
941 This configure script is free software; the Free Software Foundation
942 gives unlimited permission to copy, distribute and modify it.
943 EOF
944   exit 0
945 fi
946 exec 5>config.log
947 cat >&5 <<EOF
948 This file contains any messages produced by compilers while
949 running configure, to aid debugging if configure makes a mistake.
950
951 It was created by $as_me, which was
952 generated by GNU Autoconf 2.52.20231210.  Invocation command line was
953
954   $ $0 $@
955
956 EOF
957 {
958 cat <<_ASUNAME
959 ## ---------- ##
960 ## Platform.  ##
961 ## ---------- ##
962
963 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
964 uname -m = `(uname -m) 2>/dev/null || echo unknown`
965 uname -r = `(uname -r) 2>/dev/null || echo unknown`
966 uname -s = `(uname -s) 2>/dev/null || echo unknown`
967 uname -v = `(uname -v) 2>/dev/null || echo unknown`
968
969 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
970 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
971
972 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
973 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
974 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
975 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
976 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
977 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
978 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
979
980 PATH = $PATH
981
982 _ASUNAME
983 } >&5
984
985 cat >&5 <<EOF
986 ## ------------ ##
987 ## Core tests.  ##
988 ## ------------ ##
989
990 EOF
991
992 # Keep a trace of the command line.
993 # Strip out --no-create and --no-recursion so they do not pile up.
994 # Also quote any args containing shell meta-characters.
995 ac_configure_args=
996 ac_sep=
997 for ac_arg
998 do
999   case "$ac_arg" in
1000   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1001   | --no-cr | --no-c) ;;
1002   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1003   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1004   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1006     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1007     ac_sep=" " ;;
1008   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1009      ac_sep=" " ;;
1010   esac
1011   # Get rid of the leading space.
1012 done
1013
1014 # When interrupted or exit'd, cleanup temporary files, and complete
1015 # config.log.  We remove comments because anyway the quotes in there
1016 # would cause problems or look ugly.
1017 trap 'exit_status=$?
1018   # Save into config.log some information that might help in debugging.
1019   echo >&5
1020   echo "## ----------------- ##" >&5
1021   echo "## Cache variables.  ##" >&5
1022   echo "## ----------------- ##" >&5
1023   echo >&5
1024   # The following way of writing the cache mishandles newlines in values,
1025 {
1026   (set) 2>&1 |
1027     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1028     *ac_space=\ *)
1029       sed -n \
1030         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1031           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1032       ;;
1033     *)
1034       sed -n \
1035         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1036       ;;
1037     esac;
1038 } >&5
1039   sed "/^$/d" confdefs.h >conftest.log
1040   if test -s conftest.log; then
1041     echo >&5
1042     echo "## ------------ ##" >&5
1043     echo "## confdefs.h.  ##" >&5
1044     echo "## ------------ ##" >&5
1045     echo >&5
1046     cat conftest.log >&5
1047   fi
1048   (echo; echo) >&5
1049   test "$ac_signal" != 0 &&
1050     echo "$as_me: caught signal $ac_signal" >&5
1051   echo "$as_me: exit $exit_status" >&5
1052   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1053     exit $exit_status
1054      ' 0
1055 for ac_signal in 1 2 13 15; do
1056   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1057 done
1058 ac_signal=0
1059
1060 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1061 rm -rf conftest* confdefs.h
1062 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1063 echo >confdefs.h
1064
1065 # Let the site file select an alternate cache file if it wants to.
1066 # Prefer explicitly selected file to automatically selected ones.
1067 if test -z "$CONFIG_SITE"; then
1068   if test "x$prefix" != xNONE; then
1069     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1070   else
1071     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1072   fi
1073 fi
1074 for ac_site_file in $CONFIG_SITE; do
1075   if test -r "$ac_site_file"; then
1076     { echo "$as_me:1076: loading site script $ac_site_file" >&5
1077 echo "$as_me: loading site script $ac_site_file" >&6;}
1078     cat "$ac_site_file" >&5
1079     . "$ac_site_file"
1080   fi
1081 done
1082
1083 if test -r "$cache_file"; then
1084   # Some versions of bash will fail to source /dev/null (special
1085   # files actually), so we avoid doing that.
1086   if test -f "$cache_file"; then
1087     { echo "$as_me:1087: loading cache $cache_file" >&5
1088 echo "$as_me: loading cache $cache_file" >&6;}
1089     case $cache_file in
1090       [\\/]* | ?:[\\/]* ) . $cache_file;;
1091       *)                      . ./$cache_file;;
1092     esac
1093   fi
1094 else
1095   { echo "$as_me:1095: creating cache $cache_file" >&5
1096 echo "$as_me: creating cache $cache_file" >&6;}
1097   >$cache_file
1098 fi
1099
1100 # Check that the precious variables saved in the cache have kept the same
1101 # value.
1102 ac_cache_corrupted=false
1103 for ac_var in `(set) 2>&1 |
1104                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1105   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1106   eval ac_new_set=\$ac_env_${ac_var}_set
1107   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1108   eval ac_new_val="\$ac_env_${ac_var}_value"
1109   case "$ac_old_set,$ac_new_set" in
1110     set,)
1111       { echo "$as_me:1111: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1112 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1113       ac_cache_corrupted=: ;;
1114     ,set)
1115       { echo "$as_me:1115: error: \`$ac_var' was not set in the previous run" >&5
1116 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1117       ac_cache_corrupted=: ;;
1118     ,);;
1119     *)
1120       if test "x$ac_old_val" != "x$ac_new_val"; then
1121         { echo "$as_me:1121: error: \`$ac_var' has changed since the previous run:" >&5
1122 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1123         { echo "$as_me:1123:   former value:  $ac_old_val" >&5
1124 echo "$as_me:   former value:  $ac_old_val" >&2;}
1125         { echo "$as_me:1125:   current value: $ac_new_val" >&5
1126 echo "$as_me:   current value: $ac_new_val" >&2;}
1127         ac_cache_corrupted=:
1128       fi;;
1129   esac
1130   # Pass precious variables to config.status.  It doesn't matter if
1131   # we pass some twice (in addition to the command line arguments).
1132   if test "$ac_new_set" = set; then
1133     case "$ac_new_val" in
1134     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1135       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1136       ac_configure_args="$ac_configure_args '$ac_arg'"
1137       ;;
1138     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1139        ;;
1140     esac
1141   fi
1142 done
1143 if "$ac_cache_corrupted"; then
1144   { echo "$as_me:1144: error: changes in the environment can compromise the build" >&5
1145 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1146   { { echo "$as_me:1146: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1147 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1148    { (exit 1); exit 1; }; }
1149 fi
1150
1151 ac_ext=c
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1154 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return="return"
1157
1158 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1159   *c*,-n*) ECHO_N=
1160            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1161            ECHO_T='     '
1162            ;;
1163   *c*,*  ) ECHO_N=-n
1164            ECHO_C=
1165            ECHO_T=
1166            ;;
1167   *)       ECHO_N=
1168            ECHO_C='\c'
1169            ECHO_T=
1170            ;;
1171 esac
1172 echo "#! $SHELL" >conftest.sh
1173 echo  "exit 0"   >>conftest.sh
1174 chmod +x conftest.sh
1175 if { (echo "$as_me:1175: PATH=\".;.\"; conftest.sh") >&5
1176   (PATH=".;."; conftest.sh) 2>&5
1177   ac_status=$?
1178   echo "$as_me:1178: \$? = $ac_status" >&5
1179   (exit "$ac_status"); }; then
1180   ac_path_separator=';'
1181 else
1182   ac_path_separator=:
1183 fi
1184 PATH_SEPARATOR="$ac_path_separator"
1185 rm -f conftest.sh
1186
1187 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1188
1189 top_builddir=`pwd`
1190
1191 for ac_prog in ggrep grep
1192 do
1193   # Extract the first word of "$ac_prog", so it can be a program name with args.
1194 set dummy $ac_prog; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_GREP+set}" = set; then
1198   echo $ECHO_N "(cached) $ECHO_C" >&6
1199 else
1200   if test -n "$GREP"; then
1201   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1202 else
1203   ac_save_IFS=$IFS; IFS=$ac_path_separator
1204 ac_dummy="$PATH"
1205 for ac_dir in $ac_dummy; do
1206   IFS=$ac_save_IFS
1207   test -z "$ac_dir" && ac_dir=.
1208   $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_GREP="$ac_prog"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211 break
1212 done
1213
1214 fi
1215 fi
1216 GREP=$ac_cv_prog_GREP
1217 if test -n "$GREP"; then
1218   echo "$as_me:1218: result: $GREP" >&5
1219 echo "${ECHO_T}$GREP" >&6
1220 else
1221   echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1223 fi
1224
1225   test -n "$GREP" && break
1226 done
1227 test -n "$GREP" || GREP=": "
1228
1229 echo "$as_me:1229: checking for egrep" >&5
1230 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1231 if test "${ac_cv_path_EGREP+set}" = set; then
1232   echo $ECHO_N "(cached) $ECHO_C" >&6
1233 else
1234   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1235    then ac_cv_path_EGREP="$GREP -E"
1236    else
1237      for ac_prog in gegrep egrep
1238 do
1239   # Extract the first word of "$ac_prog", so it can be a program name with args.
1240 set dummy $ac_prog; ac_word=$2
1241 echo "$as_me:1241: checking for $ac_word" >&5
1242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1243 if test "${ac_cv_path_EGREP+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   case $EGREP in
1247   [\\/]* | ?:[\\/]*)
1248   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1249   ;;
1250   *)
1251   ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254   IFS=$ac_save_IFS
1255   test -z "$ac_dir" && ac_dir=.
1256   if $as_executable_p "$ac_dir/$ac_word"; then
1257    ac_cv_path_EGREP="$ac_dir/$ac_word"
1258    echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259    break
1260 fi
1261 done
1262
1263   ;;
1264 esac
1265 fi
1266 EGREP=$ac_cv_path_EGREP
1267
1268 if test -n "$EGREP"; then
1269   echo "$as_me:1269: result: $EGREP" >&5
1270 echo "${ECHO_T}$EGREP" >&6
1271 else
1272   echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1274 fi
1275
1276   test -n "$EGREP" && break
1277 done
1278 test -n "$EGREP" || EGREP=": "
1279
1280      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1280: error: cannot find workable egrep" >&5
1281 echo "$as_me: error: cannot find workable egrep" >&2;}
1282    { (exit 1); exit 1; }; }
1283    fi
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_path_EGREP" >&5
1286 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1287  EGREP="$ac_cv_path_EGREP"
1288
1289 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1292 cf_cv_abi_version=${NCURSES_MAJOR}
1293 cf_cv_abi_default=${NCURSES_MAJOR}
1294 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1295 cf_cv_timestamp=`date`
1296 echo "$as_me:1296: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1297 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1298
1299 if test -f "$srcdir/VERSION" ; then
1300         echo "$as_me:1300: checking for package version" >&5
1301 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1302
1303         # if there are not enough fields, cut returns the last one...
1304         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1305         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1306         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1307
1308         # this is how CF_BUNDLED_INTL uses $VERSION:
1309         VERSION="$cf_field1"
1310
1311         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1312         test -z "$VERSION_MAJOR" && { { echo "$as_me:1312: error: missing major-version" >&5
1313 echo "$as_me: error: missing major-version" >&2;}
1314    { (exit 1); exit 1; }; }
1315
1316         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1317         test -z "$VERSION_MINOR" && { { echo "$as_me:1317: error: missing minor-version" >&5
1318 echo "$as_me: error: missing minor-version" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321         echo "$as_me:1321: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1322 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1323
1324         echo "$as_me:1324: checking for package patch date" >&5
1325 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1326         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1327         case .$VERSION_PATCH in
1328         (.)
1329                 { { echo "$as_me:1329: error: missing patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1334                 ;;
1335         (*)
1336                 { { echo "$as_me:1336: error: illegal patch-date $VERSION_PATCH" >&5
1337 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1338    { (exit 1); exit 1; }; }
1339                 ;;
1340         esac
1341         echo "$as_me:1341: result: $VERSION_PATCH" >&5
1342 echo "${ECHO_T}$VERSION_PATCH" >&6
1343 else
1344         { { echo "$as_me:1344: error: did not find $srcdir/VERSION" >&5
1345 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # show the actual data that we have for versions:
1350 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1351
1352 echo "${as_me:-configure}:1352: testing ABI VERSION $VERSION ..." 1>&5
1353
1354 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1355
1356 echo "${as_me:-configure}:1356: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1357
1358 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1359
1360 echo "${as_me:-configure}:1360: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1361
1362 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1363
1364 echo "${as_me:-configure}:1364: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1365
1366         cf_PACKAGE=NCURSES
1367         PACKAGE=ncurses
1368
1369 cat >>confdefs.h <<EOF
1370 #define PACKAGE "$PACKAGE"
1371 EOF
1372
1373 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1374
1375         cat >>confdefs.h <<EOF
1376 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1377 EOF
1378
1379         cat >>confdefs.h <<EOF
1380 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1381 EOF
1382
1383 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1384
1385 # Check whether --with-rel-version or --without-rel-version was given.
1386 if test "${with_rel_version+set}" = set; then
1387   withval="$with_rel_version"
1388   { echo "$as_me:1388: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1389 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1390  cf_cv_rel_version=$withval
1391 fi;
1392
1393  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1394  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1395  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1396
1397 if test -n "$NCURSES_MAJOR" ; then
1398   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1399   (0)
1400         ;;
1401   (*)
1402         { { echo "$as_me:1402: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1403 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1404    { (exit 1); exit 1; }; }
1405         ;;
1406   esac
1407 else
1408   { { echo "$as_me:1408: error: Release major-version value is empty" >&5
1409 echo "$as_me: error: Release major-version value is empty" >&2;}
1410    { (exit 1); exit 1; }; }
1411 fi
1412
1413 if test -n "$NCURSES_MINOR" ; then
1414   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1415   (0)
1416         ;;
1417   (*)
1418         { { echo "$as_me:1418: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1419 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1420    { (exit 1); exit 1; }; }
1421         ;;
1422   esac
1423 else
1424   { { echo "$as_me:1424: error: Release minor-version value is empty" >&5
1425 echo "$as_me: error: Release minor-version value is empty" >&2;}
1426    { (exit 1); exit 1; }; }
1427 fi
1428
1429 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1430
1431 # Check whether --with-abi-version or --without-abi-version was given.
1432 if test "${with_abi_version+set}" = set; then
1433   withval="$with_abi_version"
1434
1435         if test "x$cf_cv_abi_version" != "x$withval"
1436         then
1437                 { echo "$as_me:1437: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1438 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1439                 case "$cf_cv_rel_version" in
1440                 (5.*)
1441                         cf_cv_rel_version=$withval.0
1442                         ;;
1443                 (6.*)
1444                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1445                         ;;
1446                 esac
1447         fi
1448         cf_cv_abi_version=$withval
1449 fi;
1450
1451 if test -n "$cf_cv_abi_version" ; then
1452   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1453   (0)
1454         ;;
1455   (*)
1456         { { echo "$as_me:1456: error: ABI version is not a number: $cf_cv_abi_version" >&5
1457 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1458    { (exit 1); exit 1; }; }
1459         ;;
1460   esac
1461 else
1462   { { echo "$as_me:1462: error: ABI version value is empty" >&5
1463 echo "$as_me: error: ABI version value is empty" >&2;}
1464    { (exit 1); exit 1; }; }
1465 fi
1466
1467 cf_cv_abi_default=$cf_cv_abi_version
1468
1469 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1470 then
1471         case "$cf_cv_rel_version" in
1472         (5.*)
1473                 cf_cv_rel_version=$with_abi_version.0
1474                 ;;
1475         esac
1476 fi
1477
1478 ac_aux_dir=
1479 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1480   if test -f "$ac_dir/install-sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install-sh -c"
1483     break
1484   elif test -f "$ac_dir/install.sh"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/install.sh -c"
1487     break
1488   elif test -f "$ac_dir/shtool"; then
1489     ac_aux_dir=$ac_dir
1490     ac_install_sh="$ac_aux_dir/shtool install -c"
1491     break
1492   fi
1493 done
1494 if test -z "$ac_aux_dir"; then
1495   { { echo "$as_me:1495: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1496 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1497    { (exit 1); exit 1; }; }
1498 fi
1499 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1500 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1501 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1502
1503 # Make sure we can run config.sub.
1504 $ac_config_sub sun4 >/dev/null 2>&1 ||
1505   { { echo "$as_me:1505: error: cannot run $ac_config_sub" >&5
1506 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1507    { (exit 1); exit 1; }; }
1508
1509 echo "$as_me:1509: checking build system type" >&5
1510 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1511 if test "${ac_cv_build+set}" = set; then
1512   echo $ECHO_N "(cached) $ECHO_C" >&6
1513 else
1514   ac_cv_build_alias=$build_alias
1515 test -z "$ac_cv_build_alias" &&
1516   ac_cv_build_alias=`$ac_config_guess`
1517 test -z "$ac_cv_build_alias" &&
1518   { { echo "$as_me:1518: error: cannot guess build type; you must specify one" >&5
1519 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1520    { (exit 1); exit 1; }; }
1521 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1522   { { echo "$as_me:1522: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1523 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 fi
1527 echo "$as_me:1527: result: $ac_cv_build" >&5
1528 echo "${ECHO_T}$ac_cv_build" >&6
1529 build=$ac_cv_build
1530 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1531 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1532 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1533
1534 echo "$as_me:1534: checking host system type" >&5
1535 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1536 if test "${ac_cv_host+set}" = set; then
1537   echo $ECHO_N "(cached) $ECHO_C" >&6
1538 else
1539   ac_cv_host_alias=$host_alias
1540 test -z "$ac_cv_host_alias" &&
1541   ac_cv_host_alias=$ac_cv_build_alias
1542 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1543   { { echo "$as_me:1543: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1544 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1545    { (exit 1); exit 1; }; }
1546
1547 fi
1548 echo "$as_me:1548: result: $ac_cv_host" >&5
1549 echo "${ECHO_T}$ac_cv_host" >&6
1550 host=$ac_cv_host
1551 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1552 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1553 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1554
1555 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1556         echo "$as_me:1556: checking target system type" >&5
1557 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1558 if test "${ac_cv_target+set}" = set; then
1559   echo $ECHO_N "(cached) $ECHO_C" >&6
1560 else
1561   ac_cv_target_alias=$target_alias
1562 test "x$ac_cv_target_alias" = "x" &&
1563   ac_cv_target_alias=$ac_cv_host_alias
1564 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1565   { { echo "$as_me:1565: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1566 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1567    { (exit 1); exit 1; }; }
1568
1569 fi
1570 echo "$as_me:1570: result: $ac_cv_target" >&5
1571 echo "${ECHO_T}$ac_cv_target" >&6
1572 target=$ac_cv_target
1573 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1574 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1575 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1576
1577 # The aliases save the names the user supplied, while $host etc.
1578 # will get canonicalized.
1579 test -n "$target_alias" &&
1580   test "$program_prefix$program_suffix$program_transform_name" = \
1581     NONENONEs,x,x, &&
1582   program_prefix=${target_alias}-
1583         system_name="$host_os"
1584 else
1585         system_name="`(uname -s -r) 2>/dev/null`"
1586         if test -z "$system_name" ; then
1587                 system_name="`(hostname) 2>/dev/null`"
1588         fi
1589 fi
1590 test -n "$system_name" &&
1591 cat >>confdefs.h <<EOF
1592 #define SYSTEM_NAME "$system_name"
1593 EOF
1594
1595 if test "${cf_cv_system_name+set}" = set; then
1596   echo $ECHO_N "(cached) $ECHO_C" >&6
1597 else
1598   cf_cv_system_name="$system_name"
1599 fi
1600
1601 test -z "$system_name" && system_name="$cf_cv_system_name"
1602 test -n "$cf_cv_system_name" && echo "$as_me:1602: result: Configuring for $cf_cv_system_name" >&5
1603 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1604
1605 if test ".$system_name" != ".$cf_cv_system_name" ; then
1606         echo "$as_me:1606: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1607 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1608         { { echo "$as_me:1608: error: \"Please remove config.cache and try again.\"" >&5
1609 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 # Check whether --with-system-type or --without-system-type was given.
1614 if test "${with_system_type+set}" = set; then
1615   withval="$with_system_type"
1616   { echo "$as_me:1616: WARNING: overriding system type to $withval" >&5
1617 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1618         cf_cv_system_name=$withval
1619         host_os=$withval
1620
1621 fi;
1622
1623 ###     Save the given $CFLAGS to allow user-override.
1624 cf_user_CFLAGS="$CFLAGS"
1625
1626 ###     Default install-location
1627 echo "$as_me:1627: checking for fgrep" >&5
1628 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1629 if test "${ac_cv_path_FGREP+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1633    then ac_cv_path_FGREP="$GREP -F"
1634    else
1635      for ac_prog in gfgrep fgrep
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_path_FGREP+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   case $FGREP in
1645   [\\/]* | ?:[\\/]*)
1646   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1647   ;;
1648   *)
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   if $as_executable_p "$ac_dir/$ac_word"; then
1655    ac_cv_path_FGREP="$ac_dir/$ac_word"
1656    echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657    break
1658 fi
1659 done
1660
1661   ;;
1662 esac
1663 fi
1664 FGREP=$ac_cv_path_FGREP
1665
1666 if test -n "$FGREP"; then
1667   echo "$as_me:1667: result: $FGREP" >&5
1668 echo "${ECHO_T}$FGREP" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$FGREP" && break
1675 done
1676 test -n "$FGREP" || FGREP=": "
1677
1678      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1678: error: cannot find workable fgrep" >&5
1679 echo "$as_me: error: cannot find workable fgrep" >&2;}
1680    { (exit 1); exit 1; }; }
1681    fi
1682 fi
1683 echo "$as_me:1683: result: $ac_cv_path_FGREP" >&5
1684 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1685  FGREP="$ac_cv_path_FGREP"
1686
1687 echo "$as_me:1687: checking for prefix" >&5
1688 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1689 if test "x$prefix" = "xNONE" ; then
1690         case "$cf_cv_system_name" in
1691                 # non-vendor systems don't have a conflict
1692         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1693                 prefix=/usr
1694                 ;;
1695         (*)     prefix=$ac_default_prefix
1696                 ;;
1697         esac
1698 fi
1699 echo "$as_me:1699: result: $prefix" >&5
1700 echo "${ECHO_T}$prefix" >&6
1701
1702 if test "x$prefix" = "xNONE" ; then
1703 echo "$as_me:1703: checking for default include-directory" >&5
1704 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1705 test -n "$verbose" && echo 1>&6
1706 for cf_symbol in \
1707         "$includedir" \
1708         "$includedir/ncurses" \
1709         "$prefix/include" \
1710         "$prefix/include/ncurses" \
1711         /usr/local/include \
1712         /usr/local/include/ncurses \
1713         /usr/include \
1714         /usr/include/ncurses
1715 do
1716         cf_dir=`eval echo "$cf_symbol"`
1717         if test -f "$cf_dir/curses.h" ; then
1718         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1719                 includedir="$cf_symbol"
1720                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1721                 break
1722         fi
1723         fi
1724         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1725 done
1726 echo "$as_me:1726: result: $includedir" >&5
1727 echo "${ECHO_T}$includedir" >&6
1728 fi
1729
1730 ### Defaults for ncurses ABI
1731
1732 # ABI 5 defaults:
1733 cf_dft_ccharw_max=5
1734 cf_dft_chtype=auto
1735 cf_dft_ext_colors=no
1736 cf_dft_ext_const=no
1737 cf_dft_ext_mouse=no
1738 cf_dft_ext_putwin=no
1739 cf_dft_ext_spfuncs=no
1740 cf_dft_filter_syms=no
1741 cf_dft_interop=no
1742 cf_dft_mmask_t=auto
1743 cf_dft_opaque_curses=no
1744 cf_dft_ordinate_type=short
1745 cf_dft_signed_char=no
1746 cf_dft_tparm_arg=long
1747 cf_dft_widec=no
1748 cf_dft_with_lp64=no
1749
1750 # ABI 6 default differences from ABI 5:
1751 case x$cf_cv_abi_default in
1752 (x[6789])
1753         cf_dft_chtype=uint32_t
1754         cf_dft_ext_colors=yes
1755         cf_dft_ext_const=yes
1756         cf_dft_ext_mouse=yes
1757         cf_dft_ext_putwin=yes
1758         cf_dft_ext_spfuncs=yes
1759         cf_dft_filter_syms=yes
1760         cf_dft_interop=yes
1761         cf_dft_mmask_t=uint32_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_tparm_arg=intptr_t
1764         cf_dft_widec=yes
1765         cf_dft_with_lp64=yes
1766         ;;
1767 esac
1768
1769 # ABI 7 default differences from ABI 6:
1770 case x$cf_cv_abi_default in
1771 (x[789])
1772         cf_dft_ccharw_max=6
1773         cf_dft_mmask_t=uint64_t
1774         cf_dft_ordinate_type=int
1775         cf_dft_signed_char=yes
1776         # also: remove the wgetch-events feature in ABI 7
1777         ;;
1778 esac
1779
1780 ### override ABI version, e.g., packagers
1781
1782 # Check whether --with-abi-altered or --without-abi-altered was given.
1783 if test "${with_abi_altered+set}" = set; then
1784   withval="$with_abi_altered"
1785
1786 if test -n "$withval" ; then
1787   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1788   (0)
1789         ;;
1790   (*)
1791         { { echo "$as_me:1791: error: ABI altered is not a number: $withval" >&5
1792 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1793    { (exit 1); exit 1; }; }
1794         ;;
1795   esac
1796 else
1797   { { echo "$as_me:1797: error: ABI altered value is empty" >&5
1798 echo "$as_me: error: ABI altered value is empty" >&2;}
1799    { (exit 1); exit 1; }; }
1800 fi
1801
1802         if test "$cf_cv_abi_version" != "$withval"
1803         then
1804                 { echo "$as_me:1804: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1805 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1806                 cf_cv_abi_version=$withval
1807         fi
1808
1809 fi;
1810
1811 ###     Checks for programs.
1812
1813 # Check whether --with-ada or --without-ada was given.
1814 if test "${with_ada+set}" = set; then
1815   withval="$with_ada"
1816   cf_with_ada=$withval
1817 else
1818   cf_with_ada=yes
1819 fi;
1820
1821 cf_prog_cc="gcc cc"
1822 if test "x$cf_with_ada" = xyes
1823 then
1824
1825 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
1826 do
1827
1828 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1829
1830         unset ac_cv_path_cf_TEMP_gnat
1831         unset cf_TEMP_gnat
1832         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
1833 set dummy $cf_prog_gnat; ac_word=$2
1834 echo "$as_me:1834: checking for $ac_word" >&5
1835 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1836 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
1837   echo $ECHO_N "(cached) $ECHO_C" >&6
1838 else
1839   case $cf_TEMP_gnat in
1840   [\\/]* | ?:[\\/]*)
1841   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
1842   ;;
1843   *)
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   if $as_executable_p "$ac_dir/$ac_word"; then
1850    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
1851    echo "$as_me:1851: found $ac_dir/$ac_word" >&5
1852    break
1853 fi
1854 done
1855
1856   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
1857   ;;
1858 esac
1859 fi
1860 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
1861
1862 if test -n "$cf_TEMP_gnat"; then
1863   echo "$as_me:1863: result: $cf_TEMP_gnat" >&5
1864 echo "${ECHO_T}$cf_TEMP_gnat" >&6
1865 else
1866   echo "$as_me:1866: result: no" >&5
1867 echo "${ECHO_T}no" >&6
1868 fi
1869
1870         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
1871
1872         if test "x$cf_TEMP_gnat" != xno; then
1873                 unset cf_cv_gnat_version
1874                 unset cf_TEMP_gnat
1875
1876 echo "$as_me:1876: checking for $cf_prog_gnat version" >&5
1877 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
1878 if test "${cf_cv_gnat_version+set}" = set; then
1879   echo $ECHO_N "(cached) $ECHO_C" >&6
1880 else
1881
1882 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
1883         grep '[0-9].[0-9][0-9]*' |\
1884         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1885
1886 fi
1887 echo "$as_me:1887: result: $cf_cv_gnat_version" >&5
1888 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1889 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1890 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
1891
1892         fi
1893         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
1894
1895         unset cf_TEMP_gnat
1896         unset cf_cv_gnat_version
1897         unset ac_cv_path_cf_TEMP_gnat
1898 done
1899
1900 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
1901         cf_ada_make=
1902         cf_cv_prog_gnat_correct=no
1903 else
1904         cf_ada_make=gnatmake
1905         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
1906                 # gprconfig is newer than gnatmake; we can continue...
1907                 cf_ada_config="##"
1908         else
1909                 rm -rf ./conftest* ./*~conftest*
1910                 if mkdir conftest.src
1911                 then
1912                         cf_ada_config=""
1913                         cd conftest.src
1914                         for cf_gprconfig in Ada C
1915                         do
1916                                 echo "$as_me:1916: checking for gprconfig name for $cf_gprconfig" >&5
1917 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
1918                                 if test "$cf_gprconfig" = C
1919                                 then
1920                                         for cf_gprconfig_param in \
1921                                                 "$cf_gprconfig,,,,GNATGCC" \
1922                                                 "$cf_gprconfig,,,,GCC" \
1923                                                 "$cf_gprconfig"
1924                                         do
1925                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1926                                                 test -n "$cf_gprconfig_value" && break
1927                                         done
1928                                 else
1929                                         cf_gprconfig_param=$cf_gprconfig
1930                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
1931                                 fi
1932                                 if test -n "$cf_gprconfig_value"
1933                                 then
1934                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
1935                                         echo "$as_me:1935: result: $cf_gprconfig_value" >&5
1936 echo "${ECHO_T}$cf_gprconfig_value" >&6
1937                                 else
1938                                         echo "$as_me:1938: result: missing" >&5
1939 echo "${ECHO_T}missing" >&6
1940                                         cf_ada_config="#"
1941                                         break
1942                                 fi
1943                         done
1944                         cd ..
1945                         rm -rf ./conftest* ./*~conftest*
1946                 fi
1947         fi
1948         if test "x$cf_ada_config" != "x#"
1949         then
1950
1951 echo "$as_me:1951: checking for gnat version" >&5
1952 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
1953 if test "${cf_cv_gnat_version+set}" = set; then
1954   echo $ECHO_N "(cached) $ECHO_C" >&6
1955 else
1956
1957 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
1958         grep '[0-9].[0-9][0-9]*' |\
1959         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
1960
1961 fi
1962 echo "$as_me:1962: result: $cf_cv_gnat_version" >&5
1963 echo "${ECHO_T}$cf_cv_gnat_version" >&6
1964 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
1965
1966 case "$cf_cv_gnat_version" in
1967 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
1968         cf_cv_prog_gnat_correct=yes
1969         ;;
1970 (*)
1971         { echo "$as_me:1971: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
1972 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
1973         cf_cv_prog_gnat_correct=no
1974         ;;
1975 esac
1976
1977                 # Extract the first word of "m4", so it can be a program name with args.
1978 set dummy m4; ac_word=$2
1979 echo "$as_me:1979: checking for $ac_word" >&5
1980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1981 if test "${ac_cv_prog_M4_exists+set}" = set; then
1982   echo $ECHO_N "(cached) $ECHO_C" >&6
1983 else
1984   if test -n "$M4_exists"; then
1985   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
1986 else
1987   ac_save_IFS=$IFS; IFS=$ac_path_separator
1988 ac_dummy="$PATH"
1989 for ac_dir in $ac_dummy; do
1990   IFS=$ac_save_IFS
1991   test -z "$ac_dir" && ac_dir=.
1992   $as_executable_p "$ac_dir/$ac_word" || continue
1993 ac_cv_prog_M4_exists="yes"
1994 echo "$as_me:1994: found $ac_dir/$ac_word" >&5
1995 break
1996 done
1997
1998   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
1999 fi
2000 fi
2001 M4_exists=$ac_cv_prog_M4_exists
2002 if test -n "$M4_exists"; then
2003   echo "$as_me:2003: result: $M4_exists" >&5
2004 echo "${ECHO_T}$M4_exists" >&6
2005 else
2006   echo "$as_me:2006: result: no" >&5
2007 echo "${ECHO_T}no" >&6
2008 fi
2009
2010                 if test "$ac_cv_prog_M4_exists" = no; then
2011                         cf_cv_prog_gnat_correct=no
2012                         { echo "$as_me:2012: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
2013 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
2014                 fi
2015                 if test "$cf_cv_prog_gnat_correct" = yes; then
2016                         echo "$as_me:2016: checking if GNAT works" >&5
2017 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
2018
2019 rm -rf ./conftest* ./*~conftest*
2020 cat >>conftest.ads <<CF_EOF
2021 procedure conftest;
2022 CF_EOF
2023 cat >>conftest.adb <<CF_EOF
2024 with Text_IO;
2025 with GNAT.OS_Lib;
2026 procedure conftest is
2027 begin
2028    Text_IO.Put ("Hello World");
2029    Text_IO.New_Line;
2030    GNAT.OS_Lib.OS_Exit (0);
2031 end conftest;
2032 CF_EOF
2033 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
2034    if ( ./conftest 1>&5 2>&1 ) ; then
2035       cf_cv_prog_gnat_correct=yes
2036    else
2037       cf_cv_prog_gnat_correct=no
2038    fi
2039 else
2040    cf_cv_prog_gnat_correct=no
2041 fi
2042 rm -rf ./conftest* ./*~conftest*
2043
2044                         echo "$as_me:2044: result: $cf_cv_prog_gnat_correct" >&5
2045 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
2046                 fi
2047         else
2048                 cf_cv_prog_gnat_correct=no
2049         fi
2050 fi
2051
2052         if test "x$cf_cv_prog_gnat_correct" = xyes; then
2053                 # gcc's developers chose to deprecate gnatgcc before making gprconfig
2054                 # work.  They replaced gnatgcc in gcc 13 with a script which spits out
2055                 # a warning offering advice which could never work.
2056                 #
2057                 # Here is a workaround.
2058                 # Extract the first word of "gnatgcc", so it can be a program name with args.
2059 set dummy gnatgcc; ac_word=$2
2060 echo "$as_me:2060: checking for $ac_word" >&5
2061 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2062 if test "${ac_cv_path_cf_cv_path_gnatgcc+set}" = set; then
2063   echo $ECHO_N "(cached) $ECHO_C" >&6
2064 else
2065   case $cf_cv_path_gnatgcc in
2066   [\\/]* | ?:[\\/]*)
2067   ac_cv_path_cf_cv_path_gnatgcc="$cf_cv_path_gnatgcc" # Let the user override the test with a path.
2068   ;;
2069   *)
2070   ac_save_IFS=$IFS; IFS=$ac_path_separator
2071 ac_dummy="$PATH"
2072 for ac_dir in $ac_dummy; do
2073   IFS=$ac_save_IFS
2074   test -z "$ac_dir" && ac_dir=.
2075   if $as_executable_p "$ac_dir/$ac_word"; then
2076    ac_cv_path_cf_cv_path_gnatgcc="$ac_dir/$ac_word"
2077    echo "$as_me:2077: found $ac_dir/$ac_word" >&5
2078    break
2079 fi
2080 done
2081
2082   test -z "$ac_cv_path_cf_cv_path_gnatgcc" && ac_cv_path_cf_cv_path_gnatgcc="no"
2083   ;;
2084 esac
2085 fi
2086 cf_cv_path_gnatgcc=$ac_cv_path_cf_cv_path_gnatgcc
2087
2088 if test -n "$cf_cv_path_gnatgcc"; then
2089   echo "$as_me:2089: result: $cf_cv_path_gnatgcc" >&5
2090 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
2091 else
2092   echo "$as_me:2092: result: no" >&5
2093 echo "${ECHO_T}no" >&6
2094 fi
2095
2096                 if test "$cf_cv_path_gnatgcc" != no
2097                 then
2098                         echo "$as_me:2098: checking for improvement" >&5
2099 echo $ECHO_N "checking for improvement... $ECHO_C" >&6
2100                         cf_file_gnatgcc=`file -L "$cf_cv_path_gnatgcc" 2>/dev/null`
2101                         case "x$cf_file_gnatgcc" in
2102                         (*script*)
2103                                 cf_cv_path_gnatgcc=`sh -x "$cf_cv_path_gnatgcc" --version 2>&1 | grep -w exec | sed -e 's/^[    ]*+[    ]*//' -e 's/exec[       ]//' -e 's/ .*//'`
2104                                 ;;
2105                         (*)
2106                                 cf_cv_path_gnatgcc=no
2107                                 ;;
2108                         esac
2109                         echo "$as_me:2109: result: $cf_cv_path_gnatgcc" >&5
2110 echo "${ECHO_T}$cf_cv_path_gnatgcc" >&6
2111                         test "$cf_cv_path_gnatgcc" = no && cf_cv_path_gnatgcc=gnatgcc
2112                         cf_prog_cc="$cf_cv_path_gnatgcc $cf_prog_cc"
2113                 fi
2114         fi
2115 fi
2116 case "$cf_prog_cc" in
2117 (*/*)
2118         CC="$cf_prog_cc"
2119
2120         ;;
2121 (*)
2122
2123 ac_ext=c
2124 ac_cpp='$CPP $CPPFLAGS'
2125 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2126 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2127 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2128 ac_main_return="return"
2129 if test -n "$ac_tool_prefix"; then
2130   for ac_prog in $cf_prog_cc
2131   do
2132     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2133 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2134 echo "$as_me:2134: checking for $ac_word" >&5
2135 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2136 if test "${ac_cv_prog_CC+set}" = set; then
2137   echo $ECHO_N "(cached) $ECHO_C" >&6
2138 else
2139   if test -n "$CC"; then
2140   ac_cv_prog_CC="$CC" # Let the user override the test.
2141 else
2142   ac_save_IFS=$IFS; IFS=$ac_path_separator
2143 ac_dummy="$PATH"
2144 for ac_dir in $ac_dummy; do
2145   IFS=$ac_save_IFS
2146   test -z "$ac_dir" && ac_dir=.
2147   $as_executable_p "$ac_dir/$ac_word" || continue
2148 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2149 echo "$as_me:2149: found $ac_dir/$ac_word" >&5
2150 break
2151 done
2152
2153 fi
2154 fi
2155 CC=$ac_cv_prog_CC
2156 if test -n "$CC"; then
2157   echo "$as_me:2157: result: $CC" >&5
2158 echo "${ECHO_T}$CC" >&6
2159 else
2160   echo "$as_me:2160: result: no" >&5
2161 echo "${ECHO_T}no" >&6
2162 fi
2163
2164     test -n "$CC" && break
2165   done
2166 fi
2167 if test -z "$CC"; then
2168   ac_ct_CC=$CC
2169   for ac_prog in $cf_prog_cc
2170 do
2171   # Extract the first word of "$ac_prog", so it can be a program name with args.
2172 set dummy $ac_prog; ac_word=$2
2173 echo "$as_me:2173: checking for $ac_word" >&5
2174 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2175 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
2176   echo $ECHO_N "(cached) $ECHO_C" >&6
2177 else
2178   if test -n "$ac_ct_CC"; then
2179   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2180 else
2181   ac_save_IFS=$IFS; IFS=$ac_path_separator
2182 ac_dummy="$PATH"
2183 for ac_dir in $ac_dummy; do
2184   IFS=$ac_save_IFS
2185   test -z "$ac_dir" && ac_dir=.
2186   $as_executable_p "$ac_dir/$ac_word" || continue
2187 ac_cv_prog_ac_ct_CC="$ac_prog"
2188 echo "$as_me:2188: found $ac_dir/$ac_word" >&5
2189 break
2190 done
2191
2192 fi
2193 fi
2194 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2195 if test -n "$ac_ct_CC"; then
2196   echo "$as_me:2196: result: $ac_ct_CC" >&5
2197 echo "${ECHO_T}$ac_ct_CC" >&6
2198 else
2199   echo "$as_me:2199: result: no" >&5
2200 echo "${ECHO_T}no" >&6
2201 fi
2202
2203   test -n "$ac_ct_CC" && break
2204 done
2205
2206   CC=$ac_ct_CC
2207 fi
2208
2209 test -z "$CC" && { { echo "$as_me:2209: error: no acceptable cc found in \$PATH" >&5
2210 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
2211    { (exit 1); exit 1; }; }
2212
2213 # Provide some information about the compiler.
2214 echo "$as_me:2214:" \
2215      "checking for C compiler version" >&5
2216 ac_compiler=`set X $ac_compile; echo "$2"`
2217 { (eval echo "$as_me:2217: \"$ac_compiler --version </dev/null >&5\"") >&5
2218   (eval $ac_compiler --version </dev/null >&5) 2>&5
2219   ac_status=$?
2220   echo "$as_me:2220: \$? = $ac_status" >&5
2221   (exit "$ac_status"); }
2222 { (eval echo "$as_me:2222: \"$ac_compiler -v </dev/null >&5\"") >&5
2223   (eval $ac_compiler -v </dev/null >&5) 2>&5
2224   ac_status=$?
2225   echo "$as_me:2225: \$? = $ac_status" >&5
2226   (exit "$ac_status"); }
2227 { (eval echo "$as_me:2227: \"$ac_compiler -V </dev/null >&5\"") >&5
2228   (eval $ac_compiler -V </dev/null >&5) 2>&5
2229   ac_status=$?
2230   echo "$as_me:2230: \$? = $ac_status" >&5
2231   (exit "$ac_status"); }
2232
2233 cat >"conftest.$ac_ext" <<_ACEOF
2234 #line 2234 "configure"
2235 #include "confdefs.h"
2236
2237 int
2238 main (void)
2239 {
2240
2241   ;
2242   return 0;
2243 }
2244 _ACEOF
2245 ac_clean_files_save=$ac_clean_files
2246 ac_clean_files="$ac_clean_files a.out a.exe"
2247 # Try to create an executable without -o first, disregard a.out.
2248 # It will help us diagnose broken compilers, and finding out an intuition
2249 # of exeext.
2250 echo "$as_me:2250: checking for C compiler default output" >&5
2251 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
2252 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
2253 if { (eval echo "$as_me:2253: \"$ac_link_default\"") >&5
2254   (eval $ac_link_default) 2>&5
2255   ac_status=$?
2256   echo "$as_me:2256: \$? = $ac_status" >&5
2257   (exit "$ac_status"); }; then
2258   # Find the output, starting from the most likely.  This scheme is
2259 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
2260 # resort.
2261 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
2262                 ls a.out conftest 2>/dev/null;
2263                 ls a.* conftest.* 2>/dev/null`; do
2264   case $ac_file in
2265     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2266     a.out ) # We found the default executable, but exeext='' is most
2267             # certainly right.
2268             break;;
2269     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2270           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
2271           export ac_cv_exeext
2272           break;;
2273     * ) break;;
2274   esac
2275 done
2276 else
2277   echo "$as_me: failed program was:" >&5
2278 cat "conftest.$ac_ext" >&5
2279 { { echo "$as_me:2279: error: C compiler cannot create executables" >&5
2280 echo "$as_me: error: C compiler cannot create executables" >&2;}
2281    { (exit 77); exit 77; }; }
2282 fi
2283
2284 ac_exeext=$ac_cv_exeext
2285 echo "$as_me:2285: result: $ac_file" >&5
2286 echo "${ECHO_T}$ac_file" >&6
2287
2288 # Check the compiler produces executables we can run.  If not, either
2289 # the compiler is broken, or we cross compile.
2290 echo "$as_me:2290: checking whether the C compiler works" >&5
2291 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
2292 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2293 # If not cross compiling, check that we can run a simple program.
2294 if test "$cross_compiling" != yes; then
2295   if { ac_try='./$ac_file'
2296   { (eval echo "$as_me:2296: \"$ac_try\"") >&5
2297   (eval $ac_try) 2>&5
2298   ac_status=$?
2299   echo "$as_me:2299: \$? = $ac_status" >&5
2300   (exit "$ac_status"); }; }; then
2301     cross_compiling=no
2302   else
2303     if test "$cross_compiling" = maybe; then
2304         cross_compiling=yes
2305     else
2306         { { echo "$as_me:2306: error: cannot run C compiled programs.
2307 If you meant to cross compile, use \`--host'." >&5
2308 echo "$as_me: error: cannot run C compiled programs.
2309 If you meant to cross compile, use \`--host'." >&2;}
2310    { (exit 1); exit 1; }; }
2311     fi
2312   fi
2313 fi
2314 echo "$as_me:2314: result: yes" >&5
2315 echo "${ECHO_T}yes" >&6
2316
2317 rm -f a.out a.exe "conftest$ac_cv_exeext"
2318 ac_clean_files=$ac_clean_files_save
2319 # Check the compiler produces executables we can run.  If not, either
2320 # the compiler is broken, or we cross compile.
2321 echo "$as_me:2321: checking whether we are cross compiling" >&5
2322 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2323 echo "$as_me:2323: result: $cross_compiling" >&5
2324 echo "${ECHO_T}$cross_compiling" >&6
2325
2326 echo "$as_me:2326: checking for executable suffix" >&5
2327 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2328 if { (eval echo "$as_me:2328: \"$ac_link\"") >&5
2329   (eval $ac_link) 2>&5
2330   ac_status=$?
2331   echo "$as_me:2331: \$? = $ac_status" >&5
2332   (exit "$ac_status"); }; then
2333   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2334 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2335 # work properly (i.e., refer to `conftest.exe'), while it won't with
2336 # `rm'.
2337 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2338   case $ac_file in
2339     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2340     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2341           export ac_cv_exeext
2342           break;;
2343     * ) break;;
2344   esac
2345 done
2346 else
2347   { { echo "$as_me:2347: error: cannot compute EXEEXT: cannot compile and link" >&5
2348 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2349    { (exit 1); exit 1; }; }
2350 fi
2351
2352 rm -f "conftest$ac_cv_exeext"
2353 echo "$as_me:2353: result: $ac_cv_exeext" >&5
2354 echo "${ECHO_T}$ac_cv_exeext" >&6
2355
2356 rm -f "conftest.$ac_ext"
2357 EXEEXT=$ac_cv_exeext
2358 ac_exeext=$EXEEXT
2359 echo "$as_me:2359: checking for object suffix" >&5
2360 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2361 if test "${ac_cv_objext+set}" = set; then
2362   echo $ECHO_N "(cached) $ECHO_C" >&6
2363 else
2364   cat >"conftest.$ac_ext" <<_ACEOF
2365 #line 2365 "configure"
2366 #include "confdefs.h"
2367
2368 int
2369 main (void)
2370 {
2371
2372   ;
2373   return 0;
2374 }
2375 _ACEOF
2376 rm -f conftest.o conftest.obj
2377 if { (eval echo "$as_me:2377: \"$ac_compile\"") >&5
2378   (eval $ac_compile) 2>&5
2379   ac_status=$?
2380   echo "$as_me:2380: \$? = $ac_status" >&5
2381   (exit "$ac_status"); }; then
2382   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2383   case $ac_file in
2384     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2385     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2386        break;;
2387   esac
2388 done
2389 else
2390   echo "$as_me: failed program was:" >&5
2391 cat "conftest.$ac_ext" >&5
2392 { { echo "$as_me:2392: error: cannot compute OBJEXT: cannot compile" >&5
2393 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2394    { (exit 1); exit 1; }; }
2395 fi
2396
2397 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2398 fi
2399 echo "$as_me:2399: result: $ac_cv_objext" >&5
2400 echo "${ECHO_T}$ac_cv_objext" >&6
2401 OBJEXT=$ac_cv_objext
2402 ac_objext=$OBJEXT
2403 echo "$as_me:2403: checking whether we are using the GNU C compiler" >&5
2404 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2405 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2406   echo $ECHO_N "(cached) $ECHO_C" >&6
2407 else
2408   cat >"conftest.$ac_ext" <<_ACEOF
2409 #line 2409 "configure"
2410 #include "confdefs.h"
2411
2412 int
2413 main (void)
2414 {
2415 #ifndef __GNUC__
2416        choke me
2417 #endif
2418
2419   ;
2420   return 0;
2421 }
2422 _ACEOF
2423 rm -f "conftest.$ac_objext"
2424 if { (eval echo "$as_me:2424: \"$ac_compile\"") >&5
2425   (eval $ac_compile) 2>&5
2426   ac_status=$?
2427   echo "$as_me:2427: \$? = $ac_status" >&5
2428   (exit "$ac_status"); } &&
2429          { ac_try='test -s "conftest.$ac_objext"'
2430   { (eval echo "$as_me:2430: \"$ac_try\"") >&5
2431   (eval $ac_try) 2>&5
2432   ac_status=$?
2433   echo "$as_me:2433: \$? = $ac_status" >&5
2434   (exit "$ac_status"); }; }; then
2435   ac_compiler_gnu=yes
2436 else
2437   echo "$as_me: failed program was:" >&5
2438 cat "conftest.$ac_ext" >&5
2439 ac_compiler_gnu=no
2440 fi
2441 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2442 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2443
2444 fi
2445 echo "$as_me:2445: result: $ac_cv_c_compiler_gnu" >&5
2446 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2447 GCC=`test $ac_compiler_gnu = yes && echo yes`
2448 ac_test_CFLAGS=${CFLAGS+set}
2449 ac_save_CFLAGS=$CFLAGS
2450 CFLAGS="-g"
2451 echo "$as_me:2451: checking whether $CC accepts -g" >&5
2452 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2453 if test "${ac_cv_prog_cc_g+set}" = set; then
2454   echo $ECHO_N "(cached) $ECHO_C" >&6
2455 else
2456   cat >"conftest.$ac_ext" <<_ACEOF
2457 #line 2457 "configure"
2458 #include "confdefs.h"
2459
2460 int
2461 main (void)
2462 {
2463
2464   ;
2465   return 0;
2466 }
2467 _ACEOF
2468 rm -f "conftest.$ac_objext"
2469 if { (eval echo "$as_me:2469: \"$ac_compile\"") >&5
2470   (eval $ac_compile) 2>&5
2471   ac_status=$?
2472   echo "$as_me:2472: \$? = $ac_status" >&5
2473   (exit "$ac_status"); } &&
2474          { ac_try='test -s "conftest.$ac_objext"'
2475   { (eval echo "$as_me:2475: \"$ac_try\"") >&5
2476   (eval $ac_try) 2>&5
2477   ac_status=$?
2478   echo "$as_me:2478: \$? = $ac_status" >&5
2479   (exit "$ac_status"); }; }; then
2480   ac_cv_prog_cc_g=yes
2481 else
2482   echo "$as_me: failed program was:" >&5
2483 cat "conftest.$ac_ext" >&5
2484 ac_cv_prog_cc_g=no
2485 fi
2486 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2487 fi
2488 echo "$as_me:2488: result: $ac_cv_prog_cc_g" >&5
2489 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2490 if test "$ac_test_CFLAGS" = set; then
2491   CFLAGS=$ac_save_CFLAGS
2492 elif test $ac_cv_prog_cc_g = yes; then
2493   if test "$GCC" = yes; then
2494     CFLAGS="-g -O2"
2495   else
2496     CFLAGS="-g"
2497   fi
2498 else
2499   if test "$GCC" = yes; then
2500     CFLAGS="-O2"
2501   else
2502     CFLAGS=
2503   fi
2504 fi
2505 # Some people use a C++ compiler to compile C.  Since we use `exit',
2506 # in C++ we need to declare it.  In case someone uses the same compiler
2507 # for both compiling C and C++ we need to have the C++ compiler decide
2508 # the declaration of exit, since it's the most demanding environment.
2509 cat >"conftest.$ac_ext" <<_ACEOF
2510 #ifndef __cplusplus
2511   choke me
2512 #endif
2513 _ACEOF
2514 rm -f "conftest.$ac_objext"
2515 if { (eval echo "$as_me:2515: \"$ac_compile\"") >&5
2516   (eval $ac_compile) 2>&5
2517   ac_status=$?
2518   echo "$as_me:2518: \$? = $ac_status" >&5
2519   (exit "$ac_status"); } &&
2520          { ac_try='test -s "conftest.$ac_objext"'
2521   { (eval echo "$as_me:2521: \"$ac_try\"") >&5
2522   (eval $ac_try) 2>&5
2523   ac_status=$?
2524   echo "$as_me:2524: \$? = $ac_status" >&5
2525   (exit "$ac_status"); }; }; then
2526   for ac_declaration in \
2527    ''\
2528    '#include <stdlib.h>' \
2529    'extern "C" void std::exit (int) throw (); using std::exit;' \
2530    'extern "C" void std::exit (int); using std::exit;' \
2531    'extern "C" void exit (int) throw ();' \
2532    'extern "C" void exit (int);' \
2533    'void exit (int);'
2534 do
2535   cat >"conftest.$ac_ext" <<_ACEOF
2536 #line 2536 "configure"
2537 #include "confdefs.h"
2538 #include <stdlib.h>
2539 $ac_declaration
2540 int
2541 main (void)
2542 {
2543 exit (42);
2544   ;
2545   return 0;
2546 }
2547 _ACEOF
2548 rm -f "conftest.$ac_objext"
2549 if { (eval echo "$as_me:2549: \"$ac_compile\"") >&5
2550   (eval $ac_compile) 2>&5
2551   ac_status=$?
2552   echo "$as_me:2552: \$? = $ac_status" >&5
2553   (exit "$ac_status"); } &&
2554          { ac_try='test -s "conftest.$ac_objext"'
2555   { (eval echo "$as_me:2555: \"$ac_try\"") >&5
2556   (eval $ac_try) 2>&5
2557   ac_status=$?
2558   echo "$as_me:2558: \$? = $ac_status" >&5
2559   (exit "$ac_status"); }; }; then
2560   :
2561 else
2562   echo "$as_me: failed program was:" >&5
2563 cat "conftest.$ac_ext" >&5
2564 continue
2565 fi
2566 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2567   cat >"conftest.$ac_ext" <<_ACEOF
2568 #line 2568 "configure"
2569 #include "confdefs.h"
2570 $ac_declaration
2571 int
2572 main (void)
2573 {
2574 exit (42);
2575   ;
2576   return 0;
2577 }
2578 _ACEOF
2579 rm -f "conftest.$ac_objext"
2580 if { (eval echo "$as_me:2580: \"$ac_compile\"") >&5
2581   (eval $ac_compile) 2>&5
2582   ac_status=$?
2583   echo "$as_me:2583: \$? = $ac_status" >&5
2584   (exit "$ac_status"); } &&
2585          { ac_try='test -s "conftest.$ac_objext"'
2586   { (eval echo "$as_me:2586: \"$ac_try\"") >&5
2587   (eval $ac_try) 2>&5
2588   ac_status=$?
2589   echo "$as_me:2589: \$? = $ac_status" >&5
2590   (exit "$ac_status"); }; }; then
2591   break
2592 else
2593   echo "$as_me: failed program was:" >&5
2594 cat "conftest.$ac_ext" >&5
2595 fi
2596 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2597 done
2598 rm -rf conftest*
2599 if test -n "$ac_declaration"; then
2600   echo '#ifdef __cplusplus' >>confdefs.h
2601   echo "$ac_declaration"    >>confdefs.h
2602   echo '#endif'             >>confdefs.h
2603 fi
2604
2605 else
2606   echo "$as_me: failed program was:" >&5
2607 cat "conftest.$ac_ext" >&5
2608 fi
2609 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2610 ac_ext=c
2611 ac_cpp='$CPP $CPPFLAGS'
2612 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2613 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2614 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2615 ac_main_return="return"
2616
2617 GCC_VERSION=none
2618 if test "$GCC" = yes ; then
2619         echo "$as_me:2619: checking version of $CC" >&5
2620 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2621         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2622         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2623         echo "$as_me:2623: result: $GCC_VERSION" >&5
2624 echo "${ECHO_T}$GCC_VERSION" >&6
2625 fi
2626
2627 INTEL_COMPILER=no
2628
2629 if test "$GCC" = yes ; then
2630         case "$host_os" in
2631         (linux*|gnu*)
2632                 echo "$as_me:2632: checking if this is really Intel C compiler" >&5
2633 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2634                 cf_save_CFLAGS="$CFLAGS"
2635                 CFLAGS="$CFLAGS -no-gcc"
2636                 cat >"conftest.$ac_ext" <<_ACEOF
2637 #line 2637 "configure"
2638 #include "confdefs.h"
2639
2640 int
2641 main (void)
2642 {
2643
2644 #ifdef __INTEL_COMPILER
2645 #else
2646 #error __INTEL_COMPILER is not defined
2647 #endif
2648
2649   ;
2650   return 0;
2651 }
2652 _ACEOF
2653 rm -f "conftest.$ac_objext"
2654 if { (eval echo "$as_me:2654: \"$ac_compile\"") >&5
2655   (eval $ac_compile) 2>&5
2656   ac_status=$?
2657   echo "$as_me:2657: \$? = $ac_status" >&5
2658   (exit "$ac_status"); } &&
2659          { ac_try='test -s "conftest.$ac_objext"'
2660   { (eval echo "$as_me:2660: \"$ac_try\"") >&5
2661   (eval $ac_try) 2>&5
2662   ac_status=$?
2663   echo "$as_me:2663: \$? = $ac_status" >&5
2664   (exit "$ac_status"); }; }; then
2665   INTEL_COMPILER=yes
2666 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2667
2668 else
2669   echo "$as_me: failed program was:" >&5
2670 cat "conftest.$ac_ext" >&5
2671 fi
2672 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2673                 CFLAGS="$cf_save_CFLAGS"
2674                 echo "$as_me:2674: result: $INTEL_COMPILER" >&5
2675 echo "${ECHO_T}$INTEL_COMPILER" >&6
2676                 ;;
2677         esac
2678 fi
2679
2680 CLANG_COMPILER=no
2681
2682 if test "$GCC" = yes ; then
2683         echo "$as_me:2683: checking if this is really Clang C compiler" >&5
2684 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2685         cf_save_CFLAGS="$CFLAGS"
2686         cat >"conftest.$ac_ext" <<_ACEOF
2687 #line 2687 "configure"
2688 #include "confdefs.h"
2689
2690 int
2691 main (void)
2692 {
2693
2694 #ifdef __clang__
2695 #else
2696 #error __clang__ is not defined
2697 #endif
2698
2699   ;
2700   return 0;
2701 }
2702 _ACEOF
2703 rm -f "conftest.$ac_objext"
2704 if { (eval echo "$as_me:2704: \"$ac_compile\"") >&5
2705   (eval $ac_compile) 2>&5
2706   ac_status=$?
2707   echo "$as_me:2707: \$? = $ac_status" >&5
2708   (exit "$ac_status"); } &&
2709          { ac_try='test -s "conftest.$ac_objext"'
2710   { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2711   (eval $ac_try) 2>&5
2712   ac_status=$?
2713   echo "$as_me:2713: \$? = $ac_status" >&5
2714   (exit "$ac_status"); }; }; then
2715   CLANG_COMPILER=yes
2716
2717 else
2718   echo "$as_me: failed program was:" >&5
2719 cat "conftest.$ac_ext" >&5
2720 fi
2721 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2722         CFLAGS="$cf_save_CFLAGS"
2723         echo "$as_me:2723: result: $CLANG_COMPILER" >&5
2724 echo "${ECHO_T}$CLANG_COMPILER" >&6
2725 fi
2726
2727 CLANG_VERSION=none
2728
2729 if test "x$CLANG_COMPILER" = "xyes" ; then
2730         case "$CC" in
2731         (c[1-9][0-9]|*/c[1-9][0-9])
2732                 { echo "$as_me:2732: WARNING: replacing broken compiler alias $CC" >&5
2733 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2734                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2735                 CC=clang
2736                 ;;
2737         esac
2738
2739         echo "$as_me:2739: checking version of $CC" >&5
2740 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2741         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.].*//'`"
2742         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2743         echo "$as_me:2743: result: $CLANG_VERSION" >&5
2744 echo "${ECHO_T}$CLANG_VERSION" >&6
2745
2746         for cf_clang_opt in \
2747                 -Qunused-arguments \
2748                 -Wno-error=implicit-function-declaration
2749         do
2750                 echo "$as_me:2750: checking if option $cf_clang_opt works" >&5
2751 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2752                 cf_save_CFLAGS="$CFLAGS"
2753                 CFLAGS="$CFLAGS $cf_clang_opt"
2754                 cat >"conftest.$ac_ext" <<_ACEOF
2755 #line 2755 "configure"
2756 #include "confdefs.h"
2757
2758                         #include <stdio.h>
2759 int
2760 main (void)
2761 {
2762
2763                         printf("hello!\\n");
2764   ;
2765   return 0;
2766 }
2767 _ACEOF
2768 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2769 if { (eval echo "$as_me:2769: \"$ac_link\"") >&5
2770   (eval $ac_link) 2>&5
2771   ac_status=$?
2772   echo "$as_me:2772: \$? = $ac_status" >&5
2773   (exit "$ac_status"); } &&
2774          { ac_try='test -s "conftest$ac_exeext"'
2775   { (eval echo "$as_me:2775: \"$ac_try\"") >&5
2776   (eval $ac_try) 2>&5
2777   ac_status=$?
2778   echo "$as_me:2778: \$? = $ac_status" >&5
2779   (exit "$ac_status"); }; }; then
2780
2781                         cf_clang_optok=yes
2782 else
2783   echo "$as_me: failed program was:" >&5
2784 cat "conftest.$ac_ext" >&5
2785
2786                         cf_clang_optok=no
2787 fi
2788 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2789                 echo "$as_me:2789: result: $cf_clang_optok" >&5
2790 echo "${ECHO_T}$cf_clang_optok" >&6
2791                 CFLAGS="$cf_save_CFLAGS"
2792                 if test "$cf_clang_optok" = yes; then
2793                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2794
2795 echo "${as_me:-configure}:2795: testing adding option $cf_clang_opt ..." 1>&5
2796
2797         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2798         CFLAGS="${CFLAGS}$cf_clang_opt"
2799
2800                 fi
2801         done
2802 fi
2803
2804 echo "$as_me:2804: checking for $CC option to accept ANSI C" >&5
2805 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2806 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2807   echo $ECHO_N "(cached) $ECHO_C" >&6
2808 else
2809   ac_cv_prog_cc_stdc=no
2810 ac_save_CC=$CC
2811 cat >"conftest.$ac_ext" <<_ACEOF
2812 #line 2812 "configure"
2813 #include "confdefs.h"
2814 #include <stdarg.h>
2815 #include <stdio.h>
2816 #include <sys/types.h>
2817 #include <sys/stat.h>
2818 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2819 struct buf { int x; };
2820 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2821 static char *e (char **p, int i)
2822 {
2823   return p[i];
2824 }
2825 static char *f (char * (*g) (char **, int), char **p, ...)
2826 {
2827   char *s;
2828   va_list v;
2829   va_start (v,p);
2830   s = g (p, va_arg (v,int));
2831   va_end (v);
2832   return s;
2833 }
2834 int test (int i, double x);
2835 struct s1 {int (*f) (int a);};
2836 struct s2 {int (*f) (double a);};
2837 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2838 int argc;
2839 char **argv;
2840 int
2841 main (void)
2842 {
2843 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2844   ;
2845   return 0;
2846 }
2847 _ACEOF
2848 # Don't try gcc -ansi; that turns off useful extensions and
2849 # breaks some systems' header files.
2850 # AIX                   -qlanglvl=ansi
2851 # Ultrix and OSF/1      -std1
2852 # HP-UX 10.20 and later -Ae
2853 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2854 # SVR4                  -Xc -D__EXTENSIONS__
2855 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2856 do
2857   CC="$ac_save_CC $ac_arg"
2858   rm -f "conftest.$ac_objext"
2859 if { (eval echo "$as_me:2859: \"$ac_compile\"") >&5
2860   (eval $ac_compile) 2>&5
2861   ac_status=$?
2862   echo "$as_me:2862: \$? = $ac_status" >&5
2863   (exit "$ac_status"); } &&
2864          { ac_try='test -s "conftest.$ac_objext"'
2865   { (eval echo "$as_me:2865: \"$ac_try\"") >&5
2866   (eval $ac_try) 2>&5
2867   ac_status=$?
2868   echo "$as_me:2868: \$? = $ac_status" >&5
2869   (exit "$ac_status"); }; }; then
2870   ac_cv_prog_cc_stdc=$ac_arg
2871 break
2872 else
2873   echo "$as_me: failed program was:" >&5
2874 cat "conftest.$ac_ext" >&5
2875 fi
2876 rm -f "conftest.$ac_objext"
2877 done
2878 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2879 CC=$ac_save_CC
2880
2881 fi
2882
2883 case "x$ac_cv_prog_cc_stdc" in
2884   x|xno)
2885     echo "$as_me:2885: result: none needed" >&5
2886 echo "${ECHO_T}none needed" >&6 ;;
2887   *)
2888     echo "$as_me:2888: result: $ac_cv_prog_cc_stdc" >&5
2889 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2890     CC="$CC $ac_cv_prog_cc_stdc" ;;
2891 esac
2892
2893 # This should have been defined by AC_PROG_CC
2894 : "${CC:=cc}"
2895
2896 echo "$as_me:2896: checking \$CFLAGS variable" >&5
2897 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2898 case "x$CFLAGS" in
2899 (*-[IUD]*)
2900         echo "$as_me:2900: result: broken" >&5
2901 echo "${ECHO_T}broken" >&6
2902         { echo "$as_me:2902: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2903 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2904         cf_flags="$CFLAGS"
2905         CFLAGS=
2906         for cf_arg in $cf_flags
2907         do
2908
2909 cf_fix_cppflags=no
2910 cf_new_cflags=
2911 cf_new_cppflags=
2912 cf_new_extra_cppflags=
2913
2914 for cf_add_cflags in $cf_arg
2915 do
2916 case "$cf_fix_cppflags" in
2917 (no)
2918         case "$cf_add_cflags" in
2919         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2920                 case "$cf_add_cflags" in
2921                 (-D*)
2922                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2923
2924                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2925                                 && test -z "${cf_tst_cflags}" \
2926                                 && cf_fix_cppflags=yes
2927
2928                         if test "$cf_fix_cppflags" = yes ; then
2929
2930         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2931         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2932
2933                                 continue
2934                         elif test "${cf_tst_cflags}" = "\"'" ; then
2935
2936         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2937         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2938
2939                                 continue
2940                         fi
2941                         ;;
2942                 esac
2943                 case "$CPPFLAGS" in
2944                 (*$cf_add_cflags)
2945                         ;;
2946                 (*)
2947                         case "$cf_add_cflags" in
2948                         (-D*)
2949                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2950
2951 CPPFLAGS=`echo "$CPPFLAGS" | \
2952         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2953                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2954
2955                                 ;;
2956                         esac
2957
2958         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2959         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2960
2961                         ;;
2962                 esac
2963                 ;;
2964         (*)
2965
2966         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2967         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2968
2969                 ;;
2970         esac
2971         ;;
2972 (yes)
2973
2974         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2975         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2976
2977         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2978
2979         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2980                 && test -z "${cf_tst_cflags}" \
2981                 && cf_fix_cppflags=no
2982         ;;
2983 esac
2984 done
2985
2986 if test -n "$cf_new_cflags" ; then
2987
2988         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2989         CFLAGS="${CFLAGS}$cf_new_cflags"
2990
2991 fi
2992
2993 if test -n "$cf_new_cppflags" ; then
2994
2995         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2996         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2997
2998 fi
2999
3000 if test -n "$cf_new_extra_cppflags" ; then
3001
3002         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3003         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3004
3005 fi
3006
3007         done
3008         ;;
3009 (*)
3010         echo "$as_me:3010: result: ok" >&5
3011 echo "${ECHO_T}ok" >&6
3012         ;;
3013 esac
3014
3015 echo "$as_me:3015: checking \$CC variable" >&5
3016 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
3017 case "$CC" in
3018 (*[\ \  ]-*)
3019         echo "$as_me:3019: result: broken" >&5
3020 echo "${ECHO_T}broken" >&6
3021         { echo "$as_me:3021: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
3022 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
3023         # humor him...
3024         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
3025         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
3026         CC="$cf_prog"
3027         for cf_arg in $cf_flags
3028         do
3029                 case "x$cf_arg" in
3030                 (x-[IUDfgOW]*)
3031
3032 cf_fix_cppflags=no
3033 cf_new_cflags=
3034 cf_new_cppflags=
3035 cf_new_extra_cppflags=
3036
3037 for cf_add_cflags in $cf_arg
3038 do
3039 case "$cf_fix_cppflags" in
3040 (no)
3041         case "$cf_add_cflags" in
3042         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3043                 case "$cf_add_cflags" in
3044                 (-D*)
3045                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3046
3047                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3048                                 && test -z "${cf_tst_cflags}" \
3049                                 && cf_fix_cppflags=yes
3050
3051                         if test "$cf_fix_cppflags" = yes ; then
3052
3053         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3054         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3055
3056                                 continue
3057                         elif test "${cf_tst_cflags}" = "\"'" ; then
3058
3059         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3060         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3061
3062                                 continue
3063                         fi
3064                         ;;
3065                 esac
3066                 case "$CPPFLAGS" in
3067                 (*$cf_add_cflags)
3068                         ;;
3069                 (*)
3070                         case "$cf_add_cflags" in
3071                         (-D*)
3072                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3073
3074 CPPFLAGS=`echo "$CPPFLAGS" | \
3075         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
3076                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
3077
3078                                 ;;
3079                         esac
3080
3081         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3082         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3083
3084                         ;;
3085                 esac
3086                 ;;
3087         (*)
3088
3089         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3090         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3091
3092                 ;;
3093         esac
3094         ;;
3095 (yes)
3096
3097         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3098         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3099
3100         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3101
3102         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3103                 && test -z "${cf_tst_cflags}" \
3104                 && cf_fix_cppflags=no
3105         ;;
3106 esac
3107 done
3108
3109 if test -n "$cf_new_cflags" ; then
3110
3111         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3112         CFLAGS="${CFLAGS}$cf_new_cflags"
3113
3114 fi
3115
3116 if test -n "$cf_new_cppflags" ; then
3117
3118         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3119         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3120
3121 fi
3122
3123 if test -n "$cf_new_extra_cppflags" ; then
3124
3125         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3126         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3127
3128 fi
3129
3130                         ;;
3131                 (*)
3132                         CC="$CC $cf_arg"
3133                         ;;
3134                 esac
3135         done
3136         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
3137
3138 echo "${as_me:-configure}:3138: testing resulting CC: '$CC' ..." 1>&5
3139
3140         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
3141
3142 echo "${as_me:-configure}:3142: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
3143
3144         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
3145
3146 echo "${as_me:-configure}:3146: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
3147
3148         ;;
3149 (*)
3150         echo "$as_me:3150: result: ok" >&5
3151 echo "${ECHO_T}ok" >&6
3152         ;;
3153 esac
3154
3155         ;;
3156 esac
3157
3158 ac_ext=c
3159 ac_cpp='$CPP $CPPFLAGS'
3160 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3161 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3162 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3163 ac_main_return="return"
3164 echo "$as_me:3164: checking how to run the C preprocessor" >&5
3165 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
3166 # On Suns, sometimes $CPP names a directory.
3167 if test -n "$CPP" && test -d "$CPP"; then
3168   CPP=
3169 fi
3170 if test -z "$CPP"; then
3171   if test "${ac_cv_prog_CPP+set}" = set; then
3172   echo $ECHO_N "(cached) $ECHO_C" >&6
3173 else
3174       # Double quotes because CPP needs to be expanded
3175     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3176     do
3177       ac_preproc_ok=false
3178 for ac_c_preproc_warn_flag in '' yes
3179 do
3180   # Use a header file that comes with gcc, so configuring glibc
3181   # with a fresh cross-compiler works.
3182   # On the NeXT, cc -E runs the code through the compiler's parser,
3183   # not just through cpp. "Syntax error" is here to catch this case.
3184   cat >"conftest.$ac_ext" <<_ACEOF
3185 #line 3185 "configure"
3186 #include "confdefs.h"
3187 #include <assert.h>
3188                      Syntax error
3189 _ACEOF
3190 if { (eval echo "$as_me:3190: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3191   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3192   ac_status=$?
3193   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3194   rm -f conftest.er1
3195   cat conftest.err >&5
3196   echo "$as_me:3196: \$? = $ac_status" >&5
3197   (exit "$ac_status"); } >/dev/null; then
3198   if test -s conftest.err; then
3199     ac_cpp_err=$ac_c_preproc_warn_flag
3200   else
3201     ac_cpp_err=
3202   fi
3203 else
3204   ac_cpp_err=yes
3205 fi
3206 if test -z "$ac_cpp_err"; then
3207   :
3208 else
3209   echo "$as_me: failed program was:" >&5
3210   cat "conftest.$ac_ext" >&5
3211   # Broken: fails on valid input.
3212 continue
3213 fi
3214 rm -f conftest.err "conftest.$ac_ext"
3215
3216   # OK, works on sane cases.  Now check whether non-existent headers
3217   # can be detected and how.
3218   cat >"conftest.$ac_ext" <<_ACEOF
3219 #line 3219 "configure"
3220 #include "confdefs.h"
3221 #include <ac_nonexistent.h>
3222 _ACEOF
3223 if { (eval echo "$as_me:3223: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3224   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3225   ac_status=$?
3226   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3227   rm -f conftest.er1
3228   cat conftest.err >&5
3229   echo "$as_me:3229: \$? = $ac_status" >&5
3230   (exit "$ac_status"); } >/dev/null; then
3231   if test -s conftest.err; then
3232     ac_cpp_err=$ac_c_preproc_warn_flag
3233   else
3234     ac_cpp_err=
3235   fi
3236 else
3237   ac_cpp_err=yes
3238 fi
3239 if test -z "$ac_cpp_err"; then
3240   # Broken: success on invalid input.
3241 continue
3242 else
3243   echo "$as_me: failed program was:" >&5
3244   cat "conftest.$ac_ext" >&5
3245   # Passes both tests.
3246 ac_preproc_ok=:
3247 break
3248 fi
3249 rm -f conftest.err "conftest.$ac_ext"
3250
3251 done
3252 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3253 rm -f conftest.err "conftest.$ac_ext"
3254 if $ac_preproc_ok; then
3255   break
3256 fi
3257
3258     done
3259     ac_cv_prog_CPP=$CPP
3260
3261 fi
3262   CPP=$ac_cv_prog_CPP
3263 else
3264   ac_cv_prog_CPP=$CPP
3265 fi
3266 echo "$as_me:3266: result: $CPP" >&5
3267 echo "${ECHO_T}$CPP" >&6
3268 ac_preproc_ok=false
3269 for ac_c_preproc_warn_flag in '' yes
3270 do
3271   # Use a header file that comes with gcc, so configuring glibc
3272   # with a fresh cross-compiler works.
3273   # On the NeXT, cc -E runs the code through the compiler's parser,
3274   # not just through cpp. "Syntax error" is here to catch this case.
3275   cat >"conftest.$ac_ext" <<_ACEOF
3276 #line 3276 "configure"
3277 #include "confdefs.h"
3278 #include <assert.h>
3279                      Syntax error
3280 _ACEOF
3281 if { (eval echo "$as_me:3281: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3282   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3283   ac_status=$?
3284   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3285   rm -f conftest.er1
3286   cat conftest.err >&5
3287   echo "$as_me:3287: \$? = $ac_status" >&5
3288   (exit "$ac_status"); } >/dev/null; then
3289   if test -s conftest.err; then
3290     ac_cpp_err=$ac_c_preproc_warn_flag
3291   else
3292     ac_cpp_err=
3293   fi
3294 else
3295   ac_cpp_err=yes
3296 fi
3297 if test -z "$ac_cpp_err"; then
3298   :
3299 else
3300   echo "$as_me: failed program was:" >&5
3301   cat "conftest.$ac_ext" >&5
3302   # Broken: fails on valid input.
3303 continue
3304 fi
3305 rm -f conftest.err "conftest.$ac_ext"
3306
3307   # OK, works on sane cases.  Now check whether non-existent headers
3308   # can be detected and how.
3309   cat >"conftest.$ac_ext" <<_ACEOF
3310 #line 3310 "configure"
3311 #include "confdefs.h"
3312 #include <ac_nonexistent.h>
3313 _ACEOF
3314 if { (eval echo "$as_me:3314: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3315   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3316   ac_status=$?
3317   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3318   rm -f conftest.er1
3319   cat conftest.err >&5
3320   echo "$as_me:3320: \$? = $ac_status" >&5
3321   (exit "$ac_status"); } >/dev/null; then
3322   if test -s conftest.err; then
3323     ac_cpp_err=$ac_c_preproc_warn_flag
3324   else
3325     ac_cpp_err=
3326   fi
3327 else
3328   ac_cpp_err=yes
3329 fi
3330 if test -z "$ac_cpp_err"; then
3331   # Broken: success on invalid input.
3332 continue
3333 else
3334   echo "$as_me: failed program was:" >&5
3335   cat "conftest.$ac_ext" >&5
3336   # Passes both tests.
3337 ac_preproc_ok=:
3338 break
3339 fi
3340 rm -f conftest.err "conftest.$ac_ext"
3341
3342 done
3343 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3344 rm -f conftest.err "conftest.$ac_ext"
3345 if $ac_preproc_ok; then
3346   :
3347 else
3348   { { echo "$as_me:3348: error: C preprocessor \"$CPP\" fails sanity check" >&5
3349 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3350    { (exit 1); exit 1; }; }
3351 fi
3352
3353 ac_ext=c
3354 ac_cpp='$CPP $CPPFLAGS'
3355 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3356 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3357 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3358 ac_main_return="return"
3359
3360 if test $ac_cv_c_compiler_gnu = yes; then
3361     echo "$as_me:3361: checking whether $CC needs -traditional" >&5
3362 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3363 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3364   echo $ECHO_N "(cached) $ECHO_C" >&6
3365 else
3366     ac_pattern="Autoconf.*'x'"
3367   cat >"conftest.$ac_ext" <<_ACEOF
3368 #line 3368 "configure"
3369 #include "confdefs.h"
3370 #include <sgtty.h>
3371 int Autoconf = TIOCGETP;
3372 _ACEOF
3373 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3374   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3375   ac_cv_prog_gcc_traditional=yes
3376 else
3377   ac_cv_prog_gcc_traditional=no
3378 fi
3379 rm -rf conftest*
3380
3381   if test $ac_cv_prog_gcc_traditional = no; then
3382     cat >"conftest.$ac_ext" <<_ACEOF
3383 #line 3383 "configure"
3384 #include "confdefs.h"
3385 #include <termio.h>
3386 int Autoconf = TCGETA;
3387 _ACEOF
3388 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3389   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3390   ac_cv_prog_gcc_traditional=yes
3391 fi
3392 rm -rf conftest*
3393
3394   fi
3395 fi
3396 echo "$as_me:3396: result: $ac_cv_prog_gcc_traditional" >&5
3397 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3398   if test $ac_cv_prog_gcc_traditional = yes; then
3399     CC="$CC -traditional"
3400   fi
3401 fi
3402
3403 echo "$as_me:3403: checking whether $CC understands -c and -o together" >&5
3404 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3405 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3406   echo $ECHO_N "(cached) $ECHO_C" >&6
3407 else
3408
3409 cat > conftest.$ac_ext <<CF_EOF
3410 int main(void)
3411 {
3412         ${cf_cv_main_return:-return}(0);
3413 }
3414 CF_EOF
3415 # We do the test twice because some compilers refuse to overwrite an
3416 # existing .o file with -o, though they will create one.
3417 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3418 if { (eval echo "$as_me:3418: \"$ac_try\"") >&5
3419   (eval $ac_try) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423   test -f conftest2.$ac_objext && { (eval echo "$as_me:3423: \"$ac_try\"") >&5
3424   (eval $ac_try) 2>&5
3425   ac_status=$?
3426   echo "$as_me:3426: \$? = $ac_status" >&5
3427   (exit "$ac_status"); };
3428 then
3429   eval cf_cv_prog_CC_c_o=yes
3430 else
3431   eval cf_cv_prog_CC_c_o=no
3432 fi
3433 rm -rf ./conftest*
3434
3435 fi
3436 if test "$cf_cv_prog_CC_c_o" = yes; then
3437   echo "$as_me:3437: result: yes" >&5
3438 echo "${ECHO_T}yes" >&6
3439 else
3440   echo "$as_me:3440: result: no" >&5
3441 echo "${ECHO_T}no" >&6
3442 fi
3443
3444 if test "$cross_compiling" = yes ; then
3445         LDCONFIG=:
3446 else
3447         case "$cf_cv_system_name" in
3448         (dragonfly*|mirbsd*|freebsd*)
3449                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3450                 ;;
3451         (*) LDPATH=$PATH:/sbin:/usr/sbin
3452                 # Extract the first word of "ldconfig", so it can be a program name with args.
3453 set dummy ldconfig; ac_word=$2
3454 echo "$as_me:3454: checking for $ac_word" >&5
3455 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3456 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3457   echo $ECHO_N "(cached) $ECHO_C" >&6
3458 else
3459   case $LDCONFIG in
3460   [\\/]* | ?:[\\/]*)
3461   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3462   ;;
3463   *)
3464   ac_save_IFS=$IFS; IFS=$ac_path_separator
3465 ac_dummy="$LDPATH"
3466 for ac_dir in $ac_dummy; do
3467   IFS=$ac_save_IFS
3468   test -z "$ac_dir" && ac_dir=.
3469   if $as_executable_p "$ac_dir/$ac_word"; then
3470    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3471    echo "$as_me:3471: found $ac_dir/$ac_word" >&5
3472    break
3473 fi
3474 done
3475
3476   ;;
3477 esac
3478 fi
3479 LDCONFIG=$ac_cv_path_LDCONFIG
3480
3481 if test -n "$LDCONFIG"; then
3482   echo "$as_me:3482: result: $LDCONFIG" >&5
3483 echo "${ECHO_T}$LDCONFIG" >&6
3484 else
3485   echo "$as_me:3485: result: no" >&5
3486 echo "${ECHO_T}no" >&6
3487 fi
3488
3489                 ;;
3490         esac
3491 fi
3492
3493 echo "$as_me:3493: checking if you want to ensure bool is consistent with C++" >&5
3494 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3495
3496 # Check whether --with-cxx or --without-cxx was given.
3497 if test "${with_cxx+set}" = set; then
3498   withval="$with_cxx"
3499   cf_with_cxx=$withval
3500 else
3501   cf_with_cxx=yes
3502 fi;
3503 echo "$as_me:3503: result: $cf_with_cxx" >&5
3504 echo "${ECHO_T}$cf_with_cxx" >&6
3505 if test "X$cf_with_cxx" = Xno ; then
3506         CXX=""
3507         GXX=""
3508 else
3509         # with autoconf 2.13, we can change the error to a warning:
3510                 ac_ext=cc
3511 ac_cpp='$CXXCPP $CPPFLAGS'
3512 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3513 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3514 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3515 ac_main_return="return"
3516 if test -n "$ac_tool_prefix"; then
3517   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3518   do
3519     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3520 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3521 echo "$as_me:3521: checking for $ac_word" >&5
3522 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3523 if test "${ac_cv_prog_CXX+set}" = set; then
3524   echo $ECHO_N "(cached) $ECHO_C" >&6
3525 else
3526   if test -n "$CXX"; then
3527   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3528 else
3529   ac_save_IFS=$IFS; IFS=$ac_path_separator
3530 ac_dummy="$PATH"
3531 for ac_dir in $ac_dummy; do
3532   IFS=$ac_save_IFS
3533   test -z "$ac_dir" && ac_dir=.
3534   $as_executable_p "$ac_dir/$ac_word" || continue
3535 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3536 echo "$as_me:3536: found $ac_dir/$ac_word" >&5
3537 break
3538 done
3539
3540 fi
3541 fi
3542 CXX=$ac_cv_prog_CXX
3543 if test -n "$CXX"; then
3544   echo "$as_me:3544: result: $CXX" >&5
3545 echo "${ECHO_T}$CXX" >&6
3546 else
3547   echo "$as_me:3547: result: no" >&5
3548 echo "${ECHO_T}no" >&6
3549 fi
3550
3551     test -n "$CXX" && break
3552   done
3553 fi
3554 if test -z "$CXX"; then
3555   ac_ct_CXX=$CXX
3556   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3557 do
3558   # Extract the first word of "$ac_prog", so it can be a program name with args.
3559 set dummy $ac_prog; ac_word=$2
3560 echo "$as_me:3560: checking for $ac_word" >&5
3561 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3562 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3563   echo $ECHO_N "(cached) $ECHO_C" >&6
3564 else
3565   if test -n "$ac_ct_CXX"; then
3566   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3567 else
3568   ac_save_IFS=$IFS; IFS=$ac_path_separator
3569 ac_dummy="$PATH"
3570 for ac_dir in $ac_dummy; do
3571   IFS=$ac_save_IFS
3572   test -z "$ac_dir" && ac_dir=.
3573   $as_executable_p "$ac_dir/$ac_word" || continue
3574 ac_cv_prog_ac_ct_CXX="$ac_prog"
3575 echo "$as_me:3575: found $ac_dir/$ac_word" >&5
3576 break
3577 done
3578
3579 fi
3580 fi
3581 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3582 if test -n "$ac_ct_CXX"; then
3583   echo "$as_me:3583: result: $ac_ct_CXX" >&5
3584 echo "${ECHO_T}$ac_ct_CXX" >&6
3585 else
3586   echo "$as_me:3586: result: no" >&5
3587 echo "${ECHO_T}no" >&6
3588 fi
3589
3590   test -n "$ac_ct_CXX" && break
3591 done
3592 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3593
3594   CXX=$ac_ct_CXX
3595 fi
3596
3597 # Provide some information about the compiler.
3598 echo "$as_me:3598:" \
3599      "checking for C++ compiler version" >&5
3600 ac_compiler=`set X $ac_compile; echo $2`
3601 { (eval echo "$as_me:3601: \"$ac_compiler --version </dev/null >&5\"") >&5
3602   (eval $ac_compiler --version </dev/null >&5) 2>&5
3603   ac_status=$?
3604   echo "$as_me:3604: \$? = $ac_status" >&5
3605   (exit "$ac_status"); }
3606 { (eval echo "$as_me:3606: \"$ac_compiler -v </dev/null >&5\"") >&5
3607   (eval $ac_compiler -v </dev/null >&5) 2>&5
3608   ac_status=$?
3609   echo "$as_me:3609: \$? = $ac_status" >&5
3610   (exit "$ac_status"); }
3611 { (eval echo "$as_me:3611: \"$ac_compiler -V </dev/null >&5\"") >&5
3612   (eval $ac_compiler -V </dev/null >&5) 2>&5
3613   ac_status=$?
3614   echo "$as_me:3614: \$? = $ac_status" >&5
3615   (exit "$ac_status"); }
3616
3617 echo "$as_me:3617: checking whether we are using the GNU C++ compiler" >&5
3618 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3619 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3620   echo $ECHO_N "(cached) $ECHO_C" >&6
3621 else
3622   cat >"conftest.$ac_ext" <<_ACEOF
3623 #line 3623 "configure"
3624 #include "confdefs.h"
3625
3626 int
3627 main (void)
3628 {
3629 #ifndef __GNUC__
3630        choke me
3631 #endif
3632
3633   ;
3634   return 0;
3635 }
3636 _ACEOF
3637 rm -f "conftest.$ac_objext"
3638 if { (eval echo "$as_me:3638: \"$ac_compile\"") >&5
3639   (eval $ac_compile) 2>&5
3640   ac_status=$?
3641   echo "$as_me:3641: \$? = $ac_status" >&5
3642   (exit "$ac_status"); } &&
3643          { ac_try='test -s "conftest.$ac_objext"'
3644   { (eval echo "$as_me:3644: \"$ac_try\"") >&5
3645   (eval $ac_try) 2>&5
3646   ac_status=$?
3647   echo "$as_me:3647: \$? = $ac_status" >&5
3648   (exit "$ac_status"); }; }; then
3649   ac_compiler_gnu=yes
3650 else
3651   echo "$as_me: failed program was:" >&5
3652 cat "conftest.$ac_ext" >&5
3653 ac_compiler_gnu=no
3654 fi
3655 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3656 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3657
3658 fi
3659 echo "$as_me:3659: result: $ac_cv_cxx_compiler_gnu" >&5
3660 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3661 GXX=`test $ac_compiler_gnu = yes && echo yes`
3662 ac_test_CXXFLAGS=${CXXFLAGS+set}
3663 ac_save_CXXFLAGS=$CXXFLAGS
3664 CXXFLAGS="-g"
3665 echo "$as_me:3665: checking whether $CXX accepts -g" >&5
3666 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3667 if test "${ac_cv_prog_cxx_g+set}" = set; then
3668   echo $ECHO_N "(cached) $ECHO_C" >&6
3669 else
3670   cat >"conftest.$ac_ext" <<_ACEOF
3671 #line 3671 "configure"
3672 #include "confdefs.h"
3673
3674 int
3675 main (void)
3676 {
3677
3678   ;
3679   return 0;
3680 }
3681 _ACEOF
3682 rm -f "conftest.$ac_objext"
3683 if { (eval echo "$as_me:3683: \"$ac_compile\"") >&5
3684   (eval $ac_compile) 2>&5
3685   ac_status=$?
3686   echo "$as_me:3686: \$? = $ac_status" >&5
3687   (exit "$ac_status"); } &&
3688          { ac_try='test -s "conftest.$ac_objext"'
3689   { (eval echo "$as_me:3689: \"$ac_try\"") >&5
3690   (eval $ac_try) 2>&5
3691   ac_status=$?
3692   echo "$as_me:3692: \$? = $ac_status" >&5
3693   (exit "$ac_status"); }; }; then
3694   ac_cv_prog_cxx_g=yes
3695 else
3696   echo "$as_me: failed program was:" >&5
3697 cat "conftest.$ac_ext" >&5
3698 ac_cv_prog_cxx_g=no
3699 fi
3700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3701 fi
3702 echo "$as_me:3702: result: $ac_cv_prog_cxx_g" >&5
3703 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3704 if test "$ac_test_CXXFLAGS" = set; then
3705   CXXFLAGS=$ac_save_CXXFLAGS
3706 elif test $ac_cv_prog_cxx_g = yes; then
3707   if test "$GXX" = yes; then
3708     CXXFLAGS="-g -O2"
3709   else
3710     CXXFLAGS="-g"
3711   fi
3712 else
3713   if test "$GXX" = yes; then
3714     CXXFLAGS="-O2"
3715   else
3716     CXXFLAGS=
3717   fi
3718 fi
3719 for ac_declaration in \
3720    ''\
3721    '#include <stdlib.h>' \
3722    'extern "C" void std::exit (int) throw (); using std::exit;' \
3723    'extern "C" void std::exit (int); using std::exit;' \
3724    'extern "C" void exit (int) throw ();' \
3725    'extern "C" void exit (int);' \
3726    'void exit (int);'
3727 do
3728   cat >"conftest.$ac_ext" <<_ACEOF
3729 #line 3729 "configure"
3730 #include "confdefs.h"
3731 #include <stdlib.h>
3732 $ac_declaration
3733 int
3734 main (void)
3735 {
3736 exit (42);
3737   ;
3738   return 0;
3739 }
3740 _ACEOF
3741 rm -f "conftest.$ac_objext"
3742 if { (eval echo "$as_me:3742: \"$ac_compile\"") >&5
3743   (eval $ac_compile) 2>&5
3744   ac_status=$?
3745   echo "$as_me:3745: \$? = $ac_status" >&5
3746   (exit "$ac_status"); } &&
3747          { ac_try='test -s "conftest.$ac_objext"'
3748   { (eval echo "$as_me:3748: \"$ac_try\"") >&5
3749   (eval $ac_try) 2>&5
3750   ac_status=$?
3751   echo "$as_me:3751: \$? = $ac_status" >&5
3752   (exit "$ac_status"); }; }; then
3753   :
3754 else
3755   echo "$as_me: failed program was:" >&5
3756 cat "conftest.$ac_ext" >&5
3757 continue
3758 fi
3759 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3760   cat >"conftest.$ac_ext" <<_ACEOF
3761 #line 3761 "configure"
3762 #include "confdefs.h"
3763 $ac_declaration
3764 int
3765 main (void)
3766 {
3767 exit (42);
3768   ;
3769   return 0;
3770 }
3771 _ACEOF
3772 rm -f "conftest.$ac_objext"
3773 if { (eval echo "$as_me:3773: \"$ac_compile\"") >&5
3774   (eval $ac_compile) 2>&5
3775   ac_status=$?
3776   echo "$as_me:3776: \$? = $ac_status" >&5
3777   (exit "$ac_status"); } &&
3778          { ac_try='test -s "conftest.$ac_objext"'
3779   { (eval echo "$as_me:3779: \"$ac_try\"") >&5
3780   (eval $ac_try) 2>&5
3781   ac_status=$?
3782   echo "$as_me:3782: \$? = $ac_status" >&5
3783   (exit "$ac_status"); }; }; then
3784   break
3785 else
3786   echo "$as_me: failed program was:" >&5
3787 cat "conftest.$ac_ext" >&5
3788 fi
3789 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3790 done
3791 rm -rf conftest*
3792 if test -n "$ac_declaration"; then
3793   echo '#ifdef __cplusplus' >>confdefs.h
3794   echo "$ac_declaration"    >>confdefs.h
3795   echo '#endif'             >>confdefs.h
3796 fi
3797
3798 ac_ext=c
3799 ac_cpp='$CPP $CPPFLAGS'
3800 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3801 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3802 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3803 ac_main_return="return"
3804
3805         ac_ext=cc
3806 ac_cpp='$CXXCPP $CPPFLAGS'
3807 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3808 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3809 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3810 ac_main_return="return"
3811
3812         if test "x$cf_with_cxx" != xno
3813         then
3814                 # Several of the C++ configurations do not work, particularly when
3815                 # cross-compiling (20140913 -TD)
3816                 echo "$as_me:3816: checking if $CXX works" >&5
3817 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3818
3819                 save_CPPFLAGS="$CPPFLAGS"
3820                 eval cf_includedir=${includedir}
3821                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3822
3823 cat >"conftest.$ac_ext" <<_ACEOF
3824 #line 3824 "configure"
3825 #include "confdefs.h"
3826
3827 #include <stdlib.h>
3828 #include <stdio.h>
3829
3830 int
3831 main (void)
3832 {
3833
3834                 printf("Hello world!\n")
3835
3836   ;
3837   return 0;
3838 }
3839 _ACEOF
3840 rm -f "conftest.$ac_objext"
3841 if { (eval echo "$as_me:3841: \"$ac_compile\"") >&5
3842   (eval $ac_compile) 2>&5
3843   ac_status=$?
3844   echo "$as_me:3844: \$? = $ac_status" >&5
3845   (exit "$ac_status"); } &&
3846          { ac_try='test -s "conftest.$ac_objext"'
3847   { (eval echo "$as_me:3847: \"$ac_try\"") >&5
3848   (eval $ac_try) 2>&5
3849   ac_status=$?
3850   echo "$as_me:3850: \$? = $ac_status" >&5
3851   (exit "$ac_status"); }; }; then
3852   cf_cxx_works=yes
3853 else
3854   echo "$as_me: failed program was:" >&5
3855 cat "conftest.$ac_ext" >&5
3856 cf_cxx_works=no
3857 fi
3858 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3859                 CPPFLAGS="$save_CPPFLAGS"
3860
3861                 echo "$as_me:3861: result: $cf_cxx_works" >&5
3862 echo "${ECHO_T}$cf_cxx_works" >&6
3863                 if test "x$cf_cxx_works" = xno
3864                 then
3865                         { echo "$as_me:3865: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3866 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3867                         cf_with_cxx=no; CXX=""; GXX="";
3868                 fi
3869         fi
3870         ac_ext=c
3871 ac_cpp='$CPP $CPPFLAGS'
3872 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3873 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3874 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3875 ac_main_return="return"
3876
3877         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3878         if test "$CXX" = "g++" ; then
3879                 # Extract the first word of "g++", so it can be a program name with args.
3880 set dummy g++; ac_word=$2
3881 echo "$as_me:3881: checking for $ac_word" >&5
3882 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3883 if test "${ac_cv_path_CXX+set}" = set; then
3884   echo $ECHO_N "(cached) $ECHO_C" >&6
3885 else
3886   case $CXX in
3887   [\\/]* | ?:[\\/]*)
3888   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3889   ;;
3890   *)
3891   ac_save_IFS=$IFS; IFS=$ac_path_separator
3892 ac_dummy="$PATH"
3893 for ac_dir in $ac_dummy; do
3894   IFS=$ac_save_IFS
3895   test -z "$ac_dir" && ac_dir=.
3896   if $as_executable_p "$ac_dir/$ac_word"; then
3897    ac_cv_path_CXX="$ac_dir/$ac_word"
3898    echo "$as_me:3898: found $ac_dir/$ac_word" >&5
3899    break
3900 fi
3901 done
3902
3903   ;;
3904 esac
3905 fi
3906 CXX=$ac_cv_path_CXX
3907
3908 if test -n "$CXX"; then
3909   echo "$as_me:3909: result: $CXX" >&5
3910 echo "${ECHO_T}$CXX" >&6
3911 else
3912   echo "$as_me:3912: result: no" >&5
3913 echo "${ECHO_T}no" >&6
3914 fi
3915
3916         fi
3917         case "x$CXX" in
3918         (x|xg++)
3919                 { echo "$as_me:3919: WARNING: You don't have any C++ compiler, too bad" >&5
3920 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3921                 cf_with_cxx=no; CXX=""; GXX="";
3922                 ;;
3923         esac
3924 fi
3925
3926 GXX_VERSION=none
3927 if test "$GXX" = yes; then
3928         echo "$as_me:3928: checking version of ${CXX:-g++}" >&5
3929 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3930         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3931         if test -z "$GXX_VERSION"
3932         then
3933                 GXX_VERSION=unknown
3934                 GXX=no
3935         fi
3936         echo "$as_me:3936: result: $GXX_VERSION" >&5
3937 echo "${ECHO_T}$GXX_VERSION" >&6
3938 fi
3939
3940 case "$GXX_VERSION" in
3941 ([1-9][0-9].*)
3942         ;;
3943 (1.*|2.[0-6]*)
3944         { echo "$as_me:3944: WARNING: templates do not work" >&5
3945 echo "$as_me: WARNING: templates do not work" >&2;}
3946         ;;
3947 esac
3948
3949 echo "$as_me:3949: checking if you want to build C++ binding and demo" >&5
3950 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3951
3952 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3953 if test "${with_cxx_binding+set}" = set; then
3954   withval="$with_cxx_binding"
3955   cf_with_cxx_binding=$withval
3956 else
3957   cf_with_cxx_binding=$cf_with_cxx
3958 fi;
3959 echo "$as_me:3959: result: $cf_with_cxx_binding" >&5
3960 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3961
3962 echo "$as_me:3962: checking if you want to build with Ada" >&5
3963 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3964 echo "$as_me:3964: result: $cf_with_ada" >&5
3965 echo "${ECHO_T}$cf_with_ada" >&6
3966
3967 echo "$as_me:3967: checking if you want to install terminal database" >&5
3968 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3969
3970 # Check whether --enable-db-install or --disable-db-install was given.
3971 if test "${enable_db_install+set}" = set; then
3972   enableval="$enable_db_install"
3973   cf_with_db_install=$enableval
3974 else
3975   cf_with_db_install=yes
3976 fi;
3977 echo "$as_me:3977: result: $cf_with_db_install" >&5
3978 echo "${ECHO_T}$cf_with_db_install" >&6
3979
3980 echo "$as_me:3980: checking if you want to install manpages" >&5
3981 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3982
3983 # Check whether --with-manpages or --without-manpages was given.
3984 if test "${with_manpages+set}" = set; then
3985   withval="$with_manpages"
3986   cf_with_manpages=$withval
3987 else
3988   cf_with_manpages=yes
3989 fi;
3990 echo "$as_me:3990: result: $cf_with_manpages" >&5
3991 echo "${ECHO_T}$cf_with_manpages" >&6
3992
3993 echo "$as_me:3993: checking if you want to build programs such as tic" >&5
3994 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3995
3996 # Check whether --with-progs or --without-progs was given.
3997 if test "${with_progs+set}" = set; then
3998   withval="$with_progs"
3999   cf_with_progs=$withval
4000 else
4001   cf_with_progs=yes
4002 fi;
4003 echo "$as_me:4003: result: $cf_with_progs" >&5
4004 echo "${ECHO_T}$cf_with_progs" >&6
4005
4006 echo "$as_me:4006: checking if you want to build test-programs" >&5
4007 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
4008
4009 # Check whether --with-tests or --without-tests was given.
4010 if test "${with_tests+set}" = set; then
4011   withval="$with_tests"
4012   cf_with_tests=$withval
4013 else
4014   cf_with_tests=yes
4015 fi;
4016 echo "$as_me:4016: result: $cf_with_tests" >&5
4017 echo "${ECHO_T}$cf_with_tests" >&6
4018
4019 echo "$as_me:4019: checking if you wish to install curses.h" >&5
4020 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
4021
4022 # Check whether --with-curses-h or --without-curses-h was given.
4023 if test "${with_curses_h+set}" = set; then
4024   withval="$with_curses_h"
4025   with_curses_h=$withval
4026 else
4027   with_curses_h=yes
4028 fi;
4029 echo "$as_me:4029: result: $with_curses_h" >&5
4030 echo "${ECHO_T}$with_curses_h" >&6
4031
4032 modules_to_build="ncurses"
4033 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
4034 modules_to_build="$modules_to_build panel menu form"
4035
4036 test "$program_prefix" != NONE &&
4037   program_transform_name="s,^,$program_prefix,;$program_transform_name"
4038 # Use a double $ so make ignores it.
4039 test "$program_suffix" != NONE &&
4040   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
4041 # Double any \ or $.  echo might interpret backslashes.
4042 # By default was `s,x,x', remove it if useless.
4043 cat <<\_ACEOF >conftest.sed
4044 s/[\\$]/&&/g;s/;s,x,x,$//
4045 _ACEOF
4046 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
4047 rm conftest.sed
4048
4049 for ac_prog in mawk gawk nawk awk
4050 do
4051   # Extract the first word of "$ac_prog", so it can be a program name with args.
4052 set dummy $ac_prog; ac_word=$2
4053 echo "$as_me:4053: checking for $ac_word" >&5
4054 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4055 if test "${ac_cv_prog_AWK+set}" = set; then
4056   echo $ECHO_N "(cached) $ECHO_C" >&6
4057 else
4058   if test -n "$AWK"; then
4059   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4060 else
4061   ac_save_IFS=$IFS; IFS=$ac_path_separator
4062 ac_dummy="$PATH"
4063 for ac_dir in $ac_dummy; do
4064   IFS=$ac_save_IFS
4065   test -z "$ac_dir" && ac_dir=.
4066   $as_executable_p "$ac_dir/$ac_word" || continue
4067 ac_cv_prog_AWK="$ac_prog"
4068 echo "$as_me:4068: found $ac_dir/$ac_word" >&5
4069 break
4070 done
4071
4072 fi
4073 fi
4074 AWK=$ac_cv_prog_AWK
4075 if test -n "$AWK"; then
4076   echo "$as_me:4076: result: $AWK" >&5
4077 echo "${ECHO_T}$AWK" >&6
4078 else
4079   echo "$as_me:4079: result: no" >&5
4080 echo "${ECHO_T}no" >&6
4081 fi
4082
4083   test -n "$AWK" && break
4084 done
4085
4086 test -z "$AWK" && { { echo "$as_me:4086: error: No awk program found" >&5
4087 echo "$as_me: error: No awk program found" >&2;}
4088    { (exit 1); exit 1; }; }
4089
4090 # Find a good install program.  We prefer a C program (faster),
4091 # so one script is as good as another.  But avoid the broken or
4092 # incompatible versions:
4093 # SysV /etc/install, /usr/sbin/install
4094 # SunOS /usr/etc/install
4095 # IRIX /sbin/install
4096 # AIX /bin/install
4097 # AmigaOS /C/install, which installs bootblocks on floppy discs
4098 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4099 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4100 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4101 # ./install, which can be erroneously created by make from ./install.sh.
4102 echo "$as_me:4102: checking for a BSD compatible install" >&5
4103 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
4104 if test -z "$INSTALL"; then
4105 if test "${ac_cv_path_install+set}" = set; then
4106   echo $ECHO_N "(cached) $ECHO_C" >&6
4107 else
4108     ac_save_IFS=$IFS; IFS=$ac_path_separator
4109   for ac_dir in $PATH; do
4110     IFS=$ac_save_IFS
4111     # Account for people who put trailing slashes in PATH elements.
4112     case $ac_dir/ in
4113     / | ./ | .// | /cC/* \
4114     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
4115     | /usr/ucb/* ) ;;
4116     *)
4117       # OSF1 and SCO ODT 3.0 have their own names for install.
4118       # Don't use installbsd from OSF since it installs stuff as root
4119       # by default.
4120       for ac_prog in ginstall scoinst install; do
4121         if $as_executable_p "$ac_dir/$ac_prog"; then
4122           if test $ac_prog = install &&
4123             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
4124             # AIX install.  It has an incompatible calling convention.
4125             :
4126           elif test $ac_prog = install &&
4127             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
4128             # program-specific install script used by HP pwplus--don't use.
4129             :
4130           else
4131             ac_cv_path_install="$ac_dir/$ac_prog -c"
4132             break 2
4133           fi
4134         fi
4135       done
4136       ;;
4137     esac
4138   done
4139
4140 fi
4141   if test "${ac_cv_path_install+set}" = set; then
4142     INSTALL=$ac_cv_path_install
4143   else
4144     # As a last resort, use the slow shell script.  We don't cache a
4145     # path for INSTALL within a source directory, because that will
4146     # break other packages using the cache if that directory is
4147     # removed, or if the path is relative.
4148     INSTALL=$ac_install_sh
4149   fi
4150 fi
4151 echo "$as_me:4151: result: $INSTALL" >&5
4152 echo "${ECHO_T}$INSTALL" >&6
4153
4154 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4155 # It thinks the first close brace ends the variable substitution.
4156 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4157
4158 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4159
4160 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4161
4162 case $INSTALL in
4163 (/*)
4164         ;;
4165 (*)
4166         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
4167         test -z "$cf_dir" && cf_dir=.
4168         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
4169         ;;
4170 esac
4171
4172 for ac_prog in lint cppcheck splint
4173 do
4174   # Extract the first word of "$ac_prog", so it can be a program name with args.
4175 set dummy $ac_prog; ac_word=$2
4176 echo "$as_me:4176: checking for $ac_word" >&5
4177 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4178 if test "${ac_cv_prog_LINT+set}" = set; then
4179   echo $ECHO_N "(cached) $ECHO_C" >&6
4180 else
4181   if test -n "$LINT"; then
4182   ac_cv_prog_LINT="$LINT" # Let the user override the test.
4183 else
4184   ac_save_IFS=$IFS; IFS=$ac_path_separator
4185 ac_dummy="$PATH"
4186 for ac_dir in $ac_dummy; do
4187   IFS=$ac_save_IFS
4188   test -z "$ac_dir" && ac_dir=.
4189   $as_executable_p "$ac_dir/$ac_word" || continue
4190 ac_cv_prog_LINT="$ac_prog"
4191 echo "$as_me:4191: found $ac_dir/$ac_word" >&5
4192 break
4193 done
4194
4195 fi
4196 fi
4197 LINT=$ac_cv_prog_LINT
4198 if test -n "$LINT"; then
4199   echo "$as_me:4199: result: $LINT" >&5
4200 echo "${ECHO_T}$LINT" >&6
4201 else
4202   echo "$as_me:4202: result: no" >&5
4203 echo "${ECHO_T}no" >&6
4204 fi
4205
4206   test -n "$LINT" && break
4207 done
4208
4209 case "x$LINT" in
4210 (xcppcheck|x*/cppcheck)
4211         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
4212         ;;
4213 esac
4214
4215 echo "$as_me:4215: checking whether ln -s works" >&5
4216 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4217 LN_S=$as_ln_s
4218 if test "$LN_S" = "ln -s"; then
4219   echo "$as_me:4219: result: yes" >&5
4220 echo "${ECHO_T}yes" >&6
4221 else
4222   echo "$as_me:4222: result: no, using $LN_S" >&5
4223 echo "${ECHO_T}no, using $LN_S" >&6
4224 fi
4225
4226 echo "$as_me:4226: checking if $LN_S -f options work" >&5
4227 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
4228
4229 rm -f conf$$.src conf$$dst
4230 echo >conf$$.dst
4231 echo first >conf$$.src
4232 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
4233         cf_prog_ln_sf=yes
4234 else
4235         cf_prog_ln_sf=no
4236 fi
4237 rm -f conf$$.dst conf$$src
4238 echo "$as_me:4238: result: $cf_prog_ln_sf" >&5
4239 echo "${ECHO_T}$cf_prog_ln_sf" >&6
4240
4241 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
4242
4243 echo "$as_me:4243: checking for long file names" >&5
4244 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
4245 if test "${ac_cv_sys_long_file_names+set}" = set; then
4246   echo $ECHO_N "(cached) $ECHO_C" >&6
4247 else
4248   ac_cv_sys_long_file_names=yes
4249 # Test for long file names in all the places we know might matter:
4250 #      .                the current directory, where building will happen
4251 #      $prefix/lib      where we will be installing things
4252 #      $exec_prefix/lib likewise
4253 # eval it to expand exec_prefix.
4254 #      $TMPDIR          if set, where it might want to write temporary files
4255 # if $TMPDIR is not set:
4256 #      /tmp             where it might want to write temporary files
4257 #      /var/tmp         likewise
4258 #      /usr/tmp         likewise
4259 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
4260   ac_tmpdirs=$TMPDIR
4261 else
4262   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
4263 fi
4264 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
4265   test -d "$ac_dir" || continue
4266   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
4267   ac_xdir=$ac_dir/cf$$
4268   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
4269   ac_tf1=$ac_xdir/conftest9012345
4270   ac_tf2=$ac_xdir/conftest9012346
4271   (echo 1 >"$ac_tf1") 2>/dev/null
4272   (echo 2 >"$ac_tf2") 2>/dev/null
4273   ac_val=`cat "$ac_tf1" 2>/dev/null`
4274   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
4275     ac_cv_sys_long_file_names=no
4276     rm -rf "$ac_xdir" 2>/dev/null
4277     break
4278   fi
4279   rm -rf "$ac_xdir" 2>/dev/null
4280 done
4281 fi
4282 echo "$as_me:4282: result: $ac_cv_sys_long_file_names" >&5
4283 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
4284 if test "$ac_cv_sys_long_file_names" = yes; then
4285
4286 cat >>confdefs.h <<\EOF
4287 #define HAVE_LONG_FILE_NAMES 1
4288 EOF
4289
4290 fi
4291
4292 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
4293 # of package conflict.
4294 cf_config_suffix=
4295
4296 # Check whether --with-config-suffix or --without-config-suffix was given.
4297 if test "${with_config_suffix+set}" = set; then
4298   withval="$with_config_suffix"
4299   case "x$withval" in
4300         (xyes|xno)
4301                 { echo "$as_me:4301: WARNING: expected a value for config-suffix option" >&5
4302 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4303                 ;;
4304         (*)     cf_config_suffix="$withval"
4305                 ;;
4306         esac
4307 fi;
4308
4309 # If we find pkg-config, check if we should install the ".pc" files.
4310
4311 echo "$as_me:4311: checking if you want to use pkg-config" >&5
4312 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4313
4314 # Check whether --with-pkg-config or --without-pkg-config was given.
4315 if test "${with_pkg_config+set}" = set; then
4316   withval="$with_pkg_config"
4317   cf_pkg_config=$withval
4318 else
4319   cf_pkg_config=yes
4320 fi;
4321 echo "$as_me:4321: result: $cf_pkg_config" >&5
4322 echo "${ECHO_T}$cf_pkg_config" >&6
4323
4324 case "$cf_pkg_config" in
4325 (no)
4326         PKG_CONFIG=none
4327         ;;
4328 (yes)
4329
4330 if test -n "$ac_tool_prefix"; then
4331   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4332 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4333 echo "$as_me:4333: checking for $ac_word" >&5
4334 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4335 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4336   echo $ECHO_N "(cached) $ECHO_C" >&6
4337 else
4338   case $PKG_CONFIG in
4339   [\\/]* | ?:[\\/]*)
4340   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4341   ;;
4342   *)
4343   ac_save_IFS=$IFS; IFS=$ac_path_separator
4344 ac_dummy="$PATH"
4345 for ac_dir in $ac_dummy; do
4346   IFS=$ac_save_IFS
4347   test -z "$ac_dir" && ac_dir=.
4348   if $as_executable_p "$ac_dir/$ac_word"; then
4349    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4350    echo "$as_me:4350: found $ac_dir/$ac_word" >&5
4351    break
4352 fi
4353 done
4354
4355   ;;
4356 esac
4357 fi
4358 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4359
4360 if test -n "$PKG_CONFIG"; then
4361   echo "$as_me:4361: result: $PKG_CONFIG" >&5
4362 echo "${ECHO_T}$PKG_CONFIG" >&6
4363 else
4364   echo "$as_me:4364: result: no" >&5
4365 echo "${ECHO_T}no" >&6
4366 fi
4367
4368 fi
4369 if test -z "$ac_cv_path_PKG_CONFIG"; then
4370   ac_pt_PKG_CONFIG=$PKG_CONFIG
4371   # Extract the first word of "pkg-config", so it can be a program name with args.
4372 set dummy pkg-config; ac_word=$2
4373 echo "$as_me:4373: checking for $ac_word" >&5
4374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4375 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4376   echo $ECHO_N "(cached) $ECHO_C" >&6
4377 else
4378   case $ac_pt_PKG_CONFIG in
4379   [\\/]* | ?:[\\/]*)
4380   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4381   ;;
4382   *)
4383   ac_save_IFS=$IFS; IFS=$ac_path_separator
4384 ac_dummy="$PATH"
4385 for ac_dir in $ac_dummy; do
4386   IFS=$ac_save_IFS
4387   test -z "$ac_dir" && ac_dir=.
4388   if $as_executable_p "$ac_dir/$ac_word"; then
4389    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4390    echo "$as_me:4390: found $ac_dir/$ac_word" >&5
4391    break
4392 fi
4393 done
4394
4395   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4396   ;;
4397 esac
4398 fi
4399 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4400
4401 if test -n "$ac_pt_PKG_CONFIG"; then
4402   echo "$as_me:4402: result: $ac_pt_PKG_CONFIG" >&5
4403 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4404 else
4405   echo "$as_me:4405: result: no" >&5
4406 echo "${ECHO_T}no" >&6
4407 fi
4408
4409   PKG_CONFIG=$ac_pt_PKG_CONFIG
4410 else
4411   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4412 fi
4413
4414         ;;
4415 (*)
4416         PKG_CONFIG=$withval
4417         ;;
4418 esac
4419
4420 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4421 if test "$PKG_CONFIG" != none ; then
4422
4423 if test "x$prefix" != xNONE; then
4424         cf_path_syntax="$prefix"
4425 else
4426         cf_path_syntax="$ac_default_prefix"
4427 fi
4428
4429 case ".$PKG_CONFIG" in
4430 (.\$\(*\)*|.\'*\'*)
4431         ;;
4432 (..|./*|.\\*)
4433         ;;
4434 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4435         ;;
4436 (.\$\{*prefix\}*|.\$\{*dir\}*)
4437         eval PKG_CONFIG="$PKG_CONFIG"
4438         case ".$PKG_CONFIG" in
4439         (.NONE/*)
4440                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4441                 ;;
4442         esac
4443         ;;
4444 (.no|.NONE/*)
4445         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4446         ;;
4447 (*)
4448         { { echo "$as_me:4448: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4449 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4450    { (exit 1); exit 1; }; }
4451         ;;
4452 esac
4453
4454 elif test "x$cf_pkg_config" != xno ; then
4455         { echo "$as_me:4455: WARNING: pkg-config is not installed" >&5
4456 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4457 fi
4458
4459 case "$PKG_CONFIG" in
4460 (no|none|yes)
4461         echo "$as_me:4461: checking for pkg-config library directory" >&5
4462 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4463         ;;
4464 (*)
4465         echo "$as_me:4465: checking for $PKG_CONFIG library directory" >&5
4466 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4467         ;;
4468 esac
4469
4470 # if $PKG_CONFIG_LIBDIR is set, try to use that
4471 if test -n "$PKG_CONFIG_PATH"; then
4472         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4473 elif test -n "$PKG_CONFIG_LIBDIR"; then
4474         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4475 else
4476         cf_search_path=auto
4477 fi
4478
4479 # if the option is used, let that override.  otherwise default to "libdir"
4480
4481 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4482 if test "${with_pkg_config_libdir+set}" = set; then
4483   withval="$with_pkg_config_libdir"
4484   cf_search_path=$withval
4485 else
4486   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4487 fi;
4488
4489 case "x$cf_search_path" in
4490 (xlibdir)
4491         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4492         echo "$as_me:4492: result: $PKG_CONFIG_LIBDIR" >&5
4493 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4494         cf_search_path=
4495         ;;
4496 (x)
4497         ;;
4498 (x/*\ *)
4499         PKG_CONFIG_LIBDIR=
4500         ;;
4501 (x/*)
4502         PKG_CONFIG_LIBDIR="$cf_search_path"
4503         echo "$as_me:4503: result: $PKG_CONFIG_LIBDIR" >&5
4504 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4505         cf_search_path=
4506         ;;
4507 (xyes|xauto)
4508         echo "$as_me:4508: result: auto" >&5
4509 echo "${ECHO_T}auto" >&6
4510         cf_search_path=
4511         # Look for the library directory using the same prefix as the executable
4512         echo "$as_me:4512: checking for search-list" >&5
4513 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4514         if test "x$PKG_CONFIG" != xnone
4515         then
4516                 # works for pkg-config since version 0.24 (2009)
4517                 # works for pkgconf since version 0.8.3 (2012)
4518                 for cf_pkg_program in \
4519                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4520                         pkg-config \
4521                         pkgconf
4522                 do
4523                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4524                         test -n "$cf_search_path" && break
4525                 done
4526
4527                 # works for pkg-config since import in 2005 of original 2001 HP code.
4528                 test -z "$cf_search_path" && \
4529                 cf_search_path=`
4530                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4531 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4532         sub(\"^[^']*'\",\"\"); \
4533         sub(\"'.*\",\"\"); \
4534         printf \" %s\", \\$0; } \
4535 { next; } \
4536 "`
4537         fi
4538
4539         echo "$as_me:4539: result: $cf_search_path" >&5
4540 echo "${ECHO_T}$cf_search_path" >&6
4541         ;;
4542 (*)
4543         { { echo "$as_me:4543: error: Unexpected option value: $cf_search_path" >&5
4544 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4545    { (exit 1); exit 1; }; }
4546         ;;
4547 esac
4548
4549 if test -n "$cf_search_path"
4550 then
4551         echo "$as_me:4551: checking for first directory" >&5
4552 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4553         cf_pkg_config_path=none
4554         for cf_config in $cf_search_path
4555         do
4556                 if test -d "$cf_config"
4557                 then
4558                         cf_pkg_config_path=$cf_config
4559                         break
4560                 fi
4561         done
4562         echo "$as_me:4562: result: $cf_pkg_config_path" >&5
4563 echo "${ECHO_T}$cf_pkg_config_path" >&6
4564
4565         if test "x$cf_pkg_config_path" != xnone ; then
4566                 # limit this to the first directory found
4567                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4568         fi
4569
4570         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4571         then
4572                 echo "$as_me:4572: checking for workaround" >&5
4573 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4574                 if test "$prefix" = "NONE" ; then
4575                         cf_prefix="$ac_default_prefix"
4576                 else
4577                         cf_prefix="$prefix"
4578                 fi
4579                 eval cf_libdir=$libdir
4580                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4581                 cf_backup=
4582                 for cf_config in $cf_search_path
4583                 do
4584                         case $cf_config in
4585                         $cf_libdir/pkgconfig)
4586                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4587                                 break
4588                                 ;;
4589                         *)
4590                                 test -z "$cf_backup" && cf_backup=$cf_config
4591                                 ;;
4592                         esac
4593                 done
4594                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4595                 echo "$as_me:4595: result: $PKG_CONFIG_LIBDIR" >&5
4596 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4597         fi
4598 fi
4599
4600 if test "x$PKG_CONFIG" != xnone
4601 then
4602         echo "$as_me:4602: checking if we should install .pc files for $PKG_CONFIG" >&5
4603 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4604 else
4605         echo "$as_me:4605: checking if we should install .pc files" >&5
4606 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4607 fi
4608
4609 # Check whether --enable-pc-files or --disable-pc-files was given.
4610 if test "${enable_pc_files+set}" = set; then
4611   enableval="$enable_pc_files"
4612   enable_pc_files=$enableval
4613 else
4614   enable_pc_files=no
4615 fi;
4616 echo "$as_me:4616: result: $enable_pc_files" >&5
4617 echo "${ECHO_T}$enable_pc_files" >&6
4618
4619 if test "x$enable_pc_files" != xno
4620 then
4621         MAKE_PC_FILES=
4622         case "x$PKG_CONFIG_LIBDIR" in
4623         (xno|xnone|xyes|x)
4624                 { echo "$as_me:4624: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4625 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4626                 ;;
4627         (*)
4628                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4629
4630 if test "x$prefix" != xNONE; then
4631         cf_path_syntax="$prefix"
4632 else
4633         cf_path_syntax="$ac_default_prefix"
4634 fi
4635
4636 case ".$cf_pkg_config_libdir" in
4637 (.\$\(*\)*|.\'*\'*)
4638         ;;
4639 (..|./*|.\\*)
4640         ;;
4641 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4642         ;;
4643 (.\$\{*prefix\}*|.\$\{*dir\}*)
4644         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4645         case ".$cf_pkg_config_libdir" in
4646         (.NONE/*)
4647                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4648                 ;;
4649         esac
4650         ;;
4651 (.no|.NONE/*)
4652         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4653         ;;
4654 (*)
4655         { { echo "$as_me:4655: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4656 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4657    { (exit 1); exit 1; }; }
4658         ;;
4659 esac
4660
4661                 ;;
4662         esac
4663 else
4664         MAKE_PC_FILES="#"
4665 fi
4666
4667 if test -z "$MAKE_PC_FILES"
4668 then
4669         echo "$as_me:4669: checking for suffix to add to pkg-config files" >&5
4670 echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
4671
4672 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4673 if test "${with_pc_suffix+set}" = set; then
4674   withval="$with_pc_suffix"
4675   case "x$withval" in
4676         (xyes|xno)
4677                 PC_MODULE_SUFFIX=
4678                 ;;
4679         (*)     PC_MODULE_SUFFIX="$withval"
4680                 ;;
4681         esac
4682 fi;
4683         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4684         echo "$as_me:4684: result: $PC_MODULE_SUFFIX" >&5
4685 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4686         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4687
4688 fi
4689
4690 echo "$as_me:4690: checking if we should assume mixed-case filenames" >&5
4691 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4692
4693 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4694 if test "${enable_mixed_case+set}" = set; then
4695   enableval="$enable_mixed_case"
4696   enable_mixedcase=$enableval
4697 else
4698   enable_mixedcase=auto
4699 fi;
4700 echo "$as_me:4700: result: $enable_mixedcase" >&5
4701 echo "${ECHO_T}$enable_mixedcase" >&6
4702 if test "$enable_mixedcase" = "auto" ; then
4703
4704 echo "$as_me:4704: checking if filesystem supports mixed-case filenames" >&5
4705 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4706 if test "${cf_cv_mixedcase+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709
4710 if test "$cross_compiling" = yes ; then
4711         case "$target_alias" in
4712         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4713                 cf_cv_mixedcase=no
4714                 ;;
4715         (*)
4716                 cf_cv_mixedcase=yes
4717                 ;;
4718         esac
4719 else
4720         rm -f conftest CONFTEST
4721         echo test >conftest
4722         if test -f CONFTEST ; then
4723                 cf_cv_mixedcase=no
4724         else
4725                 cf_cv_mixedcase=yes
4726         fi
4727         rm -f conftest CONFTEST
4728 fi
4729
4730 fi
4731 echo "$as_me:4731: result: $cf_cv_mixedcase" >&5
4732 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4733 test "$cf_cv_mixedcase" = yes &&
4734 cat >>confdefs.h <<\EOF
4735 #define MIXEDCASE_FILENAMES 1
4736 EOF
4737
4738 else
4739         cf_cv_mixedcase=$enable_mixedcase
4740         if test "x$enable_mixedcase" = "xyes" ; then
4741
4742 cat >>confdefs.h <<\EOF
4743 #define MIXEDCASE_FILENAMES 1
4744 EOF
4745
4746         fi
4747 fi
4748
4749 # do this after mixed-case option (tags/TAGS is not as important as tic).
4750 echo "$as_me:4750: checking whether ${MAKE-make} sets \${MAKE}" >&5
4751 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4752 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4753 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4754   echo $ECHO_N "(cached) $ECHO_C" >&6
4755 else
4756   cat >conftest.make <<\EOF
4757 all:
4758         @echo 'ac_maketemp="${MAKE}"'
4759 EOF
4760 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4761 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4762 if test -n "$ac_maketemp"; then
4763   eval ac_cv_prog_make_${ac_make}_set=yes
4764 else
4765   eval ac_cv_prog_make_${ac_make}_set=no
4766 fi
4767 rm -f conftest.make
4768 fi
4769 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4770   echo "$as_me:4770: result: yes" >&5
4771 echo "${ECHO_T}yes" >&6
4772   SET_MAKE=
4773 else
4774   echo "$as_me:4774: result: no" >&5
4775 echo "${ECHO_T}no" >&6
4776   SET_MAKE="MAKE=${MAKE-make}"
4777 fi
4778
4779 echo "$as_me:4779: checking for \".PHONY\" make-support" >&5
4780 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4781 if test "${cf_cv_make_PHONY+set}" = set; then
4782   echo $ECHO_N "(cached) $ECHO_C" >&6
4783 else
4784
4785         rm -rf conftest*
4786         (
4787                 mkdir conftest || exit 1
4788                 cd conftest
4789                 cat >makefile <<'CF_EOF'
4790 .PHONY: always
4791 DATA=0
4792 always: always.out
4793         @echo "** making $@ $(DATA)"
4794 once: once.out
4795         @echo "** making $@ $(DATA)"
4796 always.out:
4797         @echo "** making $@ $(DATA)"
4798         echo $(DATA) > $@
4799 once.out:
4800         @echo "** making $@ $(DATA)"
4801         echo $(DATA) > $@
4802 CF_EOF
4803                 for cf_data in 1 2 3
4804                 do
4805                         ${MAKE:-make} always DATA=$cf_data
4806                         ${MAKE:-make} once   DATA=$cf_data
4807                         ${MAKE:-make} -t always once
4808                         if test -f always ; then
4809                                 echo "no (case 1)" > ../conftest.tmp
4810                         elif test ! -f always.out ; then
4811                                 echo "no (case 2)" > ../conftest.tmp
4812                         elif test ! -f once.out ; then
4813                                 echo "no (case 3)" > ../conftest.tmp
4814                         elif ! cmp -s always.out once.out ; then
4815                                 echo "no (case 4)" > ../conftest.tmp
4816                                 diff always.out once.out
4817                         else
4818                                 cf_check="`cat always.out`"
4819                                 if test "x$cf_check" != "x$cf_data" ; then
4820                                         echo "no (case 5)" > ../conftest.tmp
4821                                 else
4822                                         echo yes > ../conftest.tmp
4823                                         rm -f ./*.out
4824                                         continue
4825                                 fi
4826                         fi
4827                         break
4828                 done
4829         ) >&5 2>&1
4830         cf_cv_make_PHONY="`cat conftest.tmp`"
4831         rm -rf conftest*
4832
4833 fi
4834 echo "$as_me:4834: result: $cf_cv_make_PHONY" >&5
4835 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4836 MAKE_NO_PHONY="#"
4837 MAKE_PHONY="#"
4838 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4839 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4840
4841 for ac_prog in exctags ctags
4842 do
4843   # Extract the first word of "$ac_prog", so it can be a program name with args.
4844 set dummy $ac_prog; ac_word=$2
4845 echo "$as_me:4845: checking for $ac_word" >&5
4846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4847 if test "${ac_cv_prog_CTAGS+set}" = set; then
4848   echo $ECHO_N "(cached) $ECHO_C" >&6
4849 else
4850   if test -n "$CTAGS"; then
4851   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4852 else
4853   ac_save_IFS=$IFS; IFS=$ac_path_separator
4854 ac_dummy="$PATH"
4855 for ac_dir in $ac_dummy; do
4856   IFS=$ac_save_IFS
4857   test -z "$ac_dir" && ac_dir=.
4858   $as_executable_p "$ac_dir/$ac_word" || continue
4859 ac_cv_prog_CTAGS="$ac_prog"
4860 echo "$as_me:4860: found $ac_dir/$ac_word" >&5
4861 break
4862 done
4863
4864 fi
4865 fi
4866 CTAGS=$ac_cv_prog_CTAGS
4867 if test -n "$CTAGS"; then
4868   echo "$as_me:4868: result: $CTAGS" >&5
4869 echo "${ECHO_T}$CTAGS" >&6
4870 else
4871   echo "$as_me:4871: result: no" >&5
4872 echo "${ECHO_T}no" >&6
4873 fi
4874
4875   test -n "$CTAGS" && break
4876 done
4877
4878 for ac_prog in exetags etags
4879 do
4880   # Extract the first word of "$ac_prog", so it can be a program name with args.
4881 set dummy $ac_prog; ac_word=$2
4882 echo "$as_me:4882: checking for $ac_word" >&5
4883 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4884 if test "${ac_cv_prog_ETAGS+set}" = set; then
4885   echo $ECHO_N "(cached) $ECHO_C" >&6
4886 else
4887   if test -n "$ETAGS"; then
4888   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4889 else
4890   ac_save_IFS=$IFS; IFS=$ac_path_separator
4891 ac_dummy="$PATH"
4892 for ac_dir in $ac_dummy; do
4893   IFS=$ac_save_IFS
4894   test -z "$ac_dir" && ac_dir=.
4895   $as_executable_p "$ac_dir/$ac_word" || continue
4896 ac_cv_prog_ETAGS="$ac_prog"
4897 echo "$as_me:4897: found $ac_dir/$ac_word" >&5
4898 break
4899 done
4900
4901 fi
4902 fi
4903 ETAGS=$ac_cv_prog_ETAGS
4904 if test -n "$ETAGS"; then
4905   echo "$as_me:4905: result: $ETAGS" >&5
4906 echo "${ECHO_T}$ETAGS" >&6
4907 else
4908   echo "$as_me:4908: result: no" >&5
4909 echo "${ECHO_T}no" >&6
4910 fi
4911
4912   test -n "$ETAGS" && break
4913 done
4914
4915 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4916 set dummy ${CTAGS:-ctags}; ac_word=$2
4917 echo "$as_me:4917: checking for $ac_word" >&5
4918 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4919 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4920   echo $ECHO_N "(cached) $ECHO_C" >&6
4921 else
4922   if test -n "$MAKE_LOWER_TAGS"; then
4923   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4924 else
4925   ac_save_IFS=$IFS; IFS=$ac_path_separator
4926 ac_dummy="$PATH"
4927 for ac_dir in $ac_dummy; do
4928   IFS=$ac_save_IFS
4929   test -z "$ac_dir" && ac_dir=.
4930   $as_executable_p "$ac_dir/$ac_word" || continue
4931 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4932 echo "$as_me:4932: found $ac_dir/$ac_word" >&5
4933 break
4934 done
4935
4936   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4937 fi
4938 fi
4939 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4940 if test -n "$MAKE_LOWER_TAGS"; then
4941   echo "$as_me:4941: result: $MAKE_LOWER_TAGS" >&5
4942 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4943 else
4944   echo "$as_me:4944: result: no" >&5
4945 echo "${ECHO_T}no" >&6
4946 fi
4947
4948 if test "$cf_cv_mixedcase" = yes ; then
4949         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4950 set dummy ${ETAGS:-etags}; ac_word=$2
4951 echo "$as_me:4951: checking for $ac_word" >&5
4952 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4953 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4954   echo $ECHO_N "(cached) $ECHO_C" >&6
4955 else
4956   if test -n "$MAKE_UPPER_TAGS"; then
4957   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4958 else
4959   ac_save_IFS=$IFS; IFS=$ac_path_separator
4960 ac_dummy="$PATH"
4961 for ac_dir in $ac_dummy; do
4962   IFS=$ac_save_IFS
4963   test -z "$ac_dir" && ac_dir=.
4964   $as_executable_p "$ac_dir/$ac_word" || continue
4965 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4966 echo "$as_me:4966: found $ac_dir/$ac_word" >&5
4967 break
4968 done
4969
4970   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4971 fi
4972 fi
4973 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4974 if test -n "$MAKE_UPPER_TAGS"; then
4975   echo "$as_me:4975: result: $MAKE_UPPER_TAGS" >&5
4976 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4977 else
4978   echo "$as_me:4978: result: no" >&5
4979 echo "${ECHO_T}no" >&6
4980 fi
4981
4982 else
4983         MAKE_UPPER_TAGS=no
4984 fi
4985
4986 if test "$MAKE_UPPER_TAGS" = yes ; then
4987         MAKE_UPPER_TAGS=
4988 else
4989         MAKE_UPPER_TAGS="#"
4990 fi
4991
4992 if test "$MAKE_LOWER_TAGS" = yes ; then
4993         MAKE_LOWER_TAGS=
4994 else
4995         MAKE_LOWER_TAGS="#"
4996 fi
4997
4998 echo "$as_me:4998: checking for makeflags variable" >&5
4999 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
5000 if test "${cf_cv_makeflags+set}" = set; then
5001   echo $ECHO_N "(cached) $ECHO_C" >&6
5002 else
5003
5004         cf_cv_makeflags=''
5005         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
5006         do
5007                 cat >cf_makeflags.tmp <<CF_EOF
5008 SHELL = $SHELL
5009 all :
5010         @ echo '.$cf_option'
5011 CF_EOF
5012                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
5013                 case "$cf_result" in
5014                 (.*k|.*kw)
5015                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
5016                         case "$cf_result" in
5017                         (.*CC=*)        cf_cv_makeflags=
5018                                 ;;
5019                         (*)     cf_cv_makeflags=$cf_option
5020                                 ;;
5021                         esac
5022                         break
5023                         ;;
5024                 (.-)
5025                         ;;
5026                 (*)
5027
5028 echo "${as_me:-configure}:5028: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
5029
5030                         ;;
5031                 esac
5032         done
5033         rm -f cf_makeflags.tmp
5034
5035 fi
5036 echo "$as_me:5036: result: $cf_cv_makeflags" >&5
5037 echo "${ECHO_T}$cf_cv_makeflags" >&6
5038
5039 if test -n "$ac_tool_prefix"; then
5040   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5041 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5042 echo "$as_me:5042: checking for $ac_word" >&5
5043 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5044 if test "${ac_cv_prog_RANLIB+set}" = set; then
5045   echo $ECHO_N "(cached) $ECHO_C" >&6
5046 else
5047   if test -n "$RANLIB"; then
5048   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5049 else
5050   ac_save_IFS=$IFS; IFS=$ac_path_separator
5051 ac_dummy="$PATH"
5052 for ac_dir in $ac_dummy; do
5053   IFS=$ac_save_IFS
5054   test -z "$ac_dir" && ac_dir=.
5055   $as_executable_p "$ac_dir/$ac_word" || continue
5056 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5057 echo "$as_me:5057: found $ac_dir/$ac_word" >&5
5058 break
5059 done
5060
5061 fi
5062 fi
5063 RANLIB=$ac_cv_prog_RANLIB
5064 if test -n "$RANLIB"; then
5065   echo "$as_me:5065: result: $RANLIB" >&5
5066 echo "${ECHO_T}$RANLIB" >&6
5067 else
5068   echo "$as_me:5068: result: no" >&5
5069 echo "${ECHO_T}no" >&6
5070 fi
5071
5072 fi
5073 if test -z "$ac_cv_prog_RANLIB"; then
5074   ac_ct_RANLIB=$RANLIB
5075   # Extract the first word of "ranlib", so it can be a program name with args.
5076 set dummy ranlib; ac_word=$2
5077 echo "$as_me:5077: checking for $ac_word" >&5
5078 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5079 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5080   echo $ECHO_N "(cached) $ECHO_C" >&6
5081 else
5082   if test -n "$ac_ct_RANLIB"; then
5083   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5084 else
5085   ac_save_IFS=$IFS; IFS=$ac_path_separator
5086 ac_dummy="$PATH"
5087 for ac_dir in $ac_dummy; do
5088   IFS=$ac_save_IFS
5089   test -z "$ac_dir" && ac_dir=.
5090   $as_executable_p "$ac_dir/$ac_word" || continue
5091 ac_cv_prog_ac_ct_RANLIB="ranlib"
5092 echo "$as_me:5092: found $ac_dir/$ac_word" >&5
5093 break
5094 done
5095
5096   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
5097 fi
5098 fi
5099 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5100 if test -n "$ac_ct_RANLIB"; then
5101   echo "$as_me:5101: result: $ac_ct_RANLIB" >&5
5102 echo "${ECHO_T}$ac_ct_RANLIB" >&6
5103 else
5104   echo "$as_me:5104: result: no" >&5
5105 echo "${ECHO_T}no" >&6
5106 fi
5107
5108   RANLIB=$ac_ct_RANLIB
5109 else
5110   RANLIB="$ac_cv_prog_RANLIB"
5111 fi
5112
5113 if test -n "$ac_tool_prefix"; then
5114   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
5115 set dummy ${ac_tool_prefix}ld; ac_word=$2
5116 echo "$as_me:5116: checking for $ac_word" >&5
5117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5118 if test "${ac_cv_prog_LD+set}" = set; then
5119   echo $ECHO_N "(cached) $ECHO_C" >&6
5120 else
5121   if test -n "$LD"; then
5122   ac_cv_prog_LD="$LD" # Let the user override the test.
5123 else
5124   ac_save_IFS=$IFS; IFS=$ac_path_separator
5125 ac_dummy="$PATH"
5126 for ac_dir in $ac_dummy; do
5127   IFS=$ac_save_IFS
5128   test -z "$ac_dir" && ac_dir=.
5129   $as_executable_p "$ac_dir/$ac_word" || continue
5130 ac_cv_prog_LD="${ac_tool_prefix}ld"
5131 echo "$as_me:5131: found $ac_dir/$ac_word" >&5
5132 break
5133 done
5134
5135 fi
5136 fi
5137 LD=$ac_cv_prog_LD
5138 if test -n "$LD"; then
5139   echo "$as_me:5139: result: $LD" >&5
5140 echo "${ECHO_T}$LD" >&6
5141 else
5142   echo "$as_me:5142: result: no" >&5
5143 echo "${ECHO_T}no" >&6
5144 fi
5145
5146 fi
5147 if test -z "$ac_cv_prog_LD"; then
5148   ac_ct_LD=$LD
5149   # Extract the first word of "ld", so it can be a program name with args.
5150 set dummy ld; ac_word=$2
5151 echo "$as_me:5151: checking for $ac_word" >&5
5152 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5153 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
5154   echo $ECHO_N "(cached) $ECHO_C" >&6
5155 else
5156   if test -n "$ac_ct_LD"; then
5157   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
5158 else
5159   ac_save_IFS=$IFS; IFS=$ac_path_separator
5160 ac_dummy="$PATH"
5161 for ac_dir in $ac_dummy; do
5162   IFS=$ac_save_IFS
5163   test -z "$ac_dir" && ac_dir=.
5164   $as_executable_p "$ac_dir/$ac_word" || continue
5165 ac_cv_prog_ac_ct_LD="ld"
5166 echo "$as_me:5166: found $ac_dir/$ac_word" >&5
5167 break
5168 done
5169
5170   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
5171 fi
5172 fi
5173 ac_ct_LD=$ac_cv_prog_ac_ct_LD
5174 if test -n "$ac_ct_LD"; then
5175   echo "$as_me:5175: result: $ac_ct_LD" >&5
5176 echo "${ECHO_T}$ac_ct_LD" >&6
5177 else
5178   echo "$as_me:5178: result: no" >&5
5179 echo "${ECHO_T}no" >&6
5180 fi
5181
5182   LD=$ac_ct_LD
5183 else
5184   LD="$ac_cv_prog_LD"
5185 fi
5186
5187 if test -n "$ac_tool_prefix"; then
5188   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5189 set dummy ${ac_tool_prefix}ar; ac_word=$2
5190 echo "$as_me:5190: checking for $ac_word" >&5
5191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5192 if test "${ac_cv_prog_AR+set}" = set; then
5193   echo $ECHO_N "(cached) $ECHO_C" >&6
5194 else
5195   if test -n "$AR"; then
5196   ac_cv_prog_AR="$AR" # Let the user override the test.
5197 else
5198   ac_save_IFS=$IFS; IFS=$ac_path_separator
5199 ac_dummy="$PATH"
5200 for ac_dir in $ac_dummy; do
5201   IFS=$ac_save_IFS
5202   test -z "$ac_dir" && ac_dir=.
5203   $as_executable_p "$ac_dir/$ac_word" || continue
5204 ac_cv_prog_AR="${ac_tool_prefix}ar"
5205 echo "$as_me:5205: found $ac_dir/$ac_word" >&5
5206 break
5207 done
5208
5209 fi
5210 fi
5211 AR=$ac_cv_prog_AR
5212 if test -n "$AR"; then
5213   echo "$as_me:5213: result: $AR" >&5
5214 echo "${ECHO_T}$AR" >&6
5215 else
5216   echo "$as_me:5216: result: no" >&5
5217 echo "${ECHO_T}no" >&6
5218 fi
5219
5220 fi
5221 if test -z "$ac_cv_prog_AR"; then
5222   ac_ct_AR=$AR
5223   # Extract the first word of "ar", so it can be a program name with args.
5224 set dummy ar; ac_word=$2
5225 echo "$as_me:5225: checking for $ac_word" >&5
5226 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5227 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5228   echo $ECHO_N "(cached) $ECHO_C" >&6
5229 else
5230   if test -n "$ac_ct_AR"; then
5231   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5232 else
5233   ac_save_IFS=$IFS; IFS=$ac_path_separator
5234 ac_dummy="$PATH"
5235 for ac_dir in $ac_dummy; do
5236   IFS=$ac_save_IFS
5237   test -z "$ac_dir" && ac_dir=.
5238   $as_executable_p "$ac_dir/$ac_word" || continue
5239 ac_cv_prog_ac_ct_AR="ar"
5240 echo "$as_me:5240: found $ac_dir/$ac_word" >&5
5241 break
5242 done
5243
5244   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5245 fi
5246 fi
5247 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5248 if test -n "$ac_ct_AR"; then
5249   echo "$as_me:5249: result: $ac_ct_AR" >&5
5250 echo "${ECHO_T}$ac_ct_AR" >&6
5251 else
5252   echo "$as_me:5252: result: no" >&5
5253 echo "${ECHO_T}no" >&6
5254 fi
5255
5256   AR=$ac_ct_AR
5257 else
5258   AR="$ac_cv_prog_AR"
5259 fi
5260
5261 if test -n "$ac_tool_prefix"; then
5262   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
5263 set dummy ${ac_tool_prefix}nm; ac_word=$2
5264 echo "$as_me:5264: checking for $ac_word" >&5
5265 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5266 if test "${ac_cv_prog_NM+set}" = set; then
5267   echo $ECHO_N "(cached) $ECHO_C" >&6
5268 else
5269   if test -n "$NM"; then
5270   ac_cv_prog_NM="$NM" # Let the user override the test.
5271 else
5272   ac_save_IFS=$IFS; IFS=$ac_path_separator
5273 ac_dummy="$PATH"
5274 for ac_dir in $ac_dummy; do
5275   IFS=$ac_save_IFS
5276   test -z "$ac_dir" && ac_dir=.
5277   $as_executable_p "$ac_dir/$ac_word" || continue
5278 ac_cv_prog_NM="${ac_tool_prefix}nm"
5279 echo "$as_me:5279: found $ac_dir/$ac_word" >&5
5280 break
5281 done
5282
5283 fi
5284 fi
5285 NM=$ac_cv_prog_NM
5286 if test -n "$NM"; then
5287   echo "$as_me:5287: result: $NM" >&5
5288 echo "${ECHO_T}$NM" >&6
5289 else
5290   echo "$as_me:5290: result: no" >&5
5291 echo "${ECHO_T}no" >&6
5292 fi
5293
5294 fi
5295 if test -z "$ac_cv_prog_NM"; then
5296   ac_ct_NM=$NM
5297   # Extract the first word of "nm", so it can be a program name with args.
5298 set dummy nm; ac_word=$2
5299 echo "$as_me:5299: checking for $ac_word" >&5
5300 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5301 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5302   echo $ECHO_N "(cached) $ECHO_C" >&6
5303 else
5304   if test -n "$ac_ct_NM"; then
5305   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5306 else
5307   ac_save_IFS=$IFS; IFS=$ac_path_separator
5308 ac_dummy="$PATH"
5309 for ac_dir in $ac_dummy; do
5310   IFS=$ac_save_IFS
5311   test -z "$ac_dir" && ac_dir=.
5312   $as_executable_p "$ac_dir/$ac_word" || continue
5313 ac_cv_prog_ac_ct_NM="nm"
5314 echo "$as_me:5314: found $ac_dir/$ac_word" >&5
5315 break
5316 done
5317
5318   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5319 fi
5320 fi
5321 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5322 if test -n "$ac_ct_NM"; then
5323   echo "$as_me:5323: result: $ac_ct_NM" >&5
5324 echo "${ECHO_T}$ac_ct_NM" >&6
5325 else
5326   echo "$as_me:5326: result: no" >&5
5327 echo "${ECHO_T}no" >&6
5328 fi
5329
5330   NM=$ac_ct_NM
5331 else
5332   NM="$ac_cv_prog_NM"
5333 fi
5334
5335 if test -n "$ac_tool_prefix"; then
5336   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5337 set dummy ${ac_tool_prefix}ar; ac_word=$2
5338 echo "$as_me:5338: checking for $ac_word" >&5
5339 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5340 if test "${ac_cv_prog_AR+set}" = set; then
5341   echo $ECHO_N "(cached) $ECHO_C" >&6
5342 else
5343   if test -n "$AR"; then
5344   ac_cv_prog_AR="$AR" # Let the user override the test.
5345 else
5346   ac_save_IFS=$IFS; IFS=$ac_path_separator
5347 ac_dummy="$PATH"
5348 for ac_dir in $ac_dummy; do
5349   IFS=$ac_save_IFS
5350   test -z "$ac_dir" && ac_dir=.
5351   $as_executable_p "$ac_dir/$ac_word" || continue
5352 ac_cv_prog_AR="${ac_tool_prefix}ar"
5353 echo "$as_me:5353: found $ac_dir/$ac_word" >&5
5354 break
5355 done
5356
5357 fi
5358 fi
5359 AR=$ac_cv_prog_AR
5360 if test -n "$AR"; then
5361   echo "$as_me:5361: result: $AR" >&5
5362 echo "${ECHO_T}$AR" >&6
5363 else
5364   echo "$as_me:5364: result: no" >&5
5365 echo "${ECHO_T}no" >&6
5366 fi
5367
5368 fi
5369 if test -z "$ac_cv_prog_AR"; then
5370   ac_ct_AR=$AR
5371   # Extract the first word of "ar", so it can be a program name with args.
5372 set dummy ar; ac_word=$2
5373 echo "$as_me:5373: checking for $ac_word" >&5
5374 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5375 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5376   echo $ECHO_N "(cached) $ECHO_C" >&6
5377 else
5378   if test -n "$ac_ct_AR"; then
5379   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5380 else
5381   ac_save_IFS=$IFS; IFS=$ac_path_separator
5382 ac_dummy="$PATH"
5383 for ac_dir in $ac_dummy; do
5384   IFS=$ac_save_IFS
5385   test -z "$ac_dir" && ac_dir=.
5386   $as_executable_p "$ac_dir/$ac_word" || continue
5387 ac_cv_prog_ac_ct_AR="ar"
5388 echo "$as_me:5388: found $ac_dir/$ac_word" >&5
5389 break
5390 done
5391
5392   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5393 fi
5394 fi
5395 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5396 if test -n "$ac_ct_AR"; then
5397   echo "$as_me:5397: result: $ac_ct_AR" >&5
5398 echo "${ECHO_T}$ac_ct_AR" >&6
5399 else
5400   echo "$as_me:5400: result: no" >&5
5401 echo "${ECHO_T}no" >&6
5402 fi
5403
5404   AR=$ac_ct_AR
5405 else
5406   AR="$ac_cv_prog_AR"
5407 fi
5408
5409 echo "$as_me:5409: checking for options to update archives" >&5
5410 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5411 if test "${cf_cv_ar_flags+set}" = set; then
5412   echo $ECHO_N "(cached) $ECHO_C" >&6
5413 else
5414
5415         case "$cf_cv_system_name" in
5416         (*-msvc*)
5417                 cf_cv_ar_flags=''
5418                 cat >mk_static_lib.sh <<-EOF
5419                 #!$SHELL
5420                 MSVC_BIN="$AR"
5421                 out="\$1"
5422                 shift
5423                 exec \$MSVC_BIN -out:"\$out" \$@
5424                 EOF
5425                 chmod +x mk_static_lib.sh
5426                 AR=`pwd`/mk_static_lib.sh
5427                 ;;
5428         (*)
5429                 cf_cv_ar_flags=unknown
5430                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5431                 do
5432
5433                         # check if $ARFLAGS already contains this choice
5434                         if test "x$ARFLAGS" != "x" ; then
5435                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5436                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5437                                         cf_cv_ar_flags=
5438                                         break
5439                                 fi
5440                         fi
5441
5442                         rm -f "conftest.$ac_cv_objext"
5443                         rm -f conftest.a
5444
5445                         cat >"conftest.$ac_ext" <<EOF
5446 #line 5446 "configure"
5447 int     testdata[3] = { 123, 456, 789 };
5448 EOF
5449                         if { (eval echo "$as_me:5449: \"$ac_compile\"") >&5
5450   (eval $ac_compile) 2>&5
5451   ac_status=$?
5452   echo "$as_me:5452: \$? = $ac_status" >&5
5453   (exit "$ac_status"); } ; then
5454                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5455                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5456                                 if test -f conftest.a ; then
5457                                         cf_cv_ar_flags="$cf_ar_flags"
5458                                         break
5459                                 fi
5460                         else
5461                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5462
5463 echo "${as_me:-configure}:5463: testing cannot compile test-program ..." 1>&5
5464
5465                                 break
5466                         fi
5467                 done
5468                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5469                 ;;
5470         esac
5471
5472 fi
5473 echo "$as_me:5473: result: $cf_cv_ar_flags" >&5
5474 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5475
5476 if test -n "$ARFLAGS" ; then
5477         if test -n "$cf_cv_ar_flags" ; then
5478                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5479         fi
5480 else
5481         ARFLAGS=$cf_cv_ar_flags
5482 fi
5483
5484 echo "$as_me:5484: checking for an installation directory prefix" >&5
5485 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
5486
5487 # Check whether --with-install-prefix or --without-install-prefix was given.
5488 if test "${with_install_prefix+set}" = set; then
5489   withval="$with_install_prefix"
5490   case "x$withval" in
5491         (xyes|xno)
5492                 ;;
5493         (*)     DESTDIR="$withval"
5494                 ;;
5495         esac
5496 fi;
5497 echo "$as_me:5497: result: ${DESTDIR:-(none)}" >&5
5498 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
5499
5500 ###############################################################################
5501
5502 # If we're cross-compiling, allow the user to override the tools and their
5503 # options.  The configure script is oriented toward identifying the host
5504 # compiler, etc., but we need a build compiler to generate parts of the source.
5505
5506 case "$cf_cv_system_name" in
5507 (*-msvc*)
5508         LDFLAGS="$LDFLAGS user32.lib"
5509         export LDFLAGS
5510         ;;
5511 esac
5512
5513 if test "$cross_compiling" = yes ; then
5514
5515         # defaults that we might want to override
5516         : ${BUILD_CFLAGS:=''}
5517         : ${BUILD_CPPFLAGS:=''}
5518         : ${BUILD_LDFLAGS:=''}
5519         : ${BUILD_LIBS:=''}
5520         : ${BUILD_EXEEXT:='$x'}
5521         : ${BUILD_OBJEXT:='o'}
5522
5523 # Check whether --with-build-cc or --without-build-cc was given.
5524 if test "${with_build_cc+set}" = set; then
5525   withval="$with_build_cc"
5526   BUILD_CC="$withval"
5527 else
5528   for ac_prog in gcc clang c99 c89 cc cl
5529 do
5530   # Extract the first word of "$ac_prog", so it can be a program name with args.
5531 set dummy $ac_prog; ac_word=$2
5532 echo "$as_me:5532: checking for $ac_word" >&5
5533 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5534 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5535   echo $ECHO_N "(cached) $ECHO_C" >&6
5536 else
5537   if test -n "$BUILD_CC"; then
5538   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5539 else
5540   ac_save_IFS=$IFS; IFS=$ac_path_separator
5541 ac_dummy="$PATH"
5542 for ac_dir in $ac_dummy; do
5543   IFS=$ac_save_IFS
5544   test -z "$ac_dir" && ac_dir=.
5545   $as_executable_p "$ac_dir/$ac_word" || continue
5546 ac_cv_prog_BUILD_CC="$ac_prog"
5547 echo "$as_me:5547: found $ac_dir/$ac_word" >&5
5548 break
5549 done
5550
5551 fi
5552 fi
5553 BUILD_CC=$ac_cv_prog_BUILD_CC
5554 if test -n "$BUILD_CC"; then
5555   echo "$as_me:5555: result: $BUILD_CC" >&5
5556 echo "${ECHO_T}$BUILD_CC" >&6
5557 else
5558   echo "$as_me:5558: result: no" >&5
5559 echo "${ECHO_T}no" >&6
5560 fi
5561
5562   test -n "$BUILD_CC" && break
5563 done
5564 test -n "$BUILD_CC" || BUILD_CC="none"
5565
5566 fi;
5567         echo "$as_me:5567: checking for native build C compiler" >&5
5568 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5569         echo "$as_me:5569: result: $BUILD_CC" >&5
5570 echo "${ECHO_T}$BUILD_CC" >&6
5571
5572         echo "$as_me:5572: checking for native build C preprocessor" >&5
5573 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5574
5575 # Check whether --with-build-cpp or --without-build-cpp was given.
5576 if test "${with_build_cpp+set}" = set; then
5577   withval="$with_build_cpp"
5578   BUILD_CPP="$withval"
5579 else
5580   BUILD_CPP='${BUILD_CC} -E'
5581 fi;
5582         echo "$as_me:5582: result: $BUILD_CPP" >&5
5583 echo "${ECHO_T}$BUILD_CPP" >&6
5584
5585         echo "$as_me:5585: checking for native build C flags" >&5
5586 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5587
5588 # Check whether --with-build-cflags or --without-build-cflags was given.
5589 if test "${with_build_cflags+set}" = set; then
5590   withval="$with_build_cflags"
5591   BUILD_CFLAGS="$withval"
5592 fi;
5593         echo "$as_me:5593: result: $BUILD_CFLAGS" >&5
5594 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5595
5596         echo "$as_me:5596: checking for native build C preprocessor-flags" >&5
5597 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5598
5599 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5600 if test "${with_build_cppflags+set}" = set; then
5601   withval="$with_build_cppflags"
5602   BUILD_CPPFLAGS="$withval"
5603 fi;
5604         echo "$as_me:5604: result: $BUILD_CPPFLAGS" >&5
5605 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5606
5607         echo "$as_me:5607: checking for native build linker-flags" >&5
5608 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5609
5610 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5611 if test "${with_build_ldflags+set}" = set; then
5612   withval="$with_build_ldflags"
5613   BUILD_LDFLAGS="$withval"
5614 fi;
5615         echo "$as_me:5615: result: $BUILD_LDFLAGS" >&5
5616 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5617
5618         echo "$as_me:5618: checking for native build linker-libraries" >&5
5619 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5620
5621 # Check whether --with-build-libs or --without-build-libs was given.
5622 if test "${with_build_libs+set}" = set; then
5623   withval="$with_build_libs"
5624   BUILD_LIBS="$withval"
5625 fi;
5626         echo "$as_me:5626: result: $BUILD_LIBS" >&5
5627 echo "${ECHO_T}$BUILD_LIBS" >&6
5628
5629         # this assumes we're on Unix.
5630         BUILD_EXEEXT=
5631         BUILD_OBJEXT=o
5632
5633         : ${BUILD_CC:='${CC}'}
5634
5635         echo "$as_me:5635: checking if the build-compiler \"$BUILD_CC\" works" >&5
5636 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5637
5638         cf_save_crossed=$cross_compiling
5639         cf_save_ac_link=$ac_link
5640         cross_compiling=no
5641         cf_build_cppflags=$BUILD_CPPFLAGS
5642         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5643         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5644
5645         if test "$cross_compiling" = yes; then
5646   cf_ok_build_cc=unknown
5647 else
5648   cat >"conftest.$ac_ext" <<_ACEOF
5649 #line 5649 "configure"
5650 #include "confdefs.h"
5651 #include <stdio.h>
5652                 int main(int argc, char *argv[])
5653                 {
5654                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5655                 }
5656
5657 _ACEOF
5658 rm -f "conftest$ac_exeext"
5659 if { (eval echo "$as_me:5659: \"$ac_link\"") >&5
5660   (eval $ac_link) 2>&5
5661   ac_status=$?
5662   echo "$as_me:5662: \$? = $ac_status" >&5
5663   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5664   { (eval echo "$as_me:5664: \"$ac_try\"") >&5
5665   (eval $ac_try) 2>&5
5666   ac_status=$?
5667   echo "$as_me:5667: \$? = $ac_status" >&5
5668   (exit "$ac_status"); }; }; then
5669   cf_ok_build_cc=yes
5670 else
5671   echo "$as_me: program exited with status $ac_status" >&5
5672 echo "$as_me: failed program was:" >&5
5673 cat "conftest.$ac_ext" >&5
5674 cf_ok_build_cc=no
5675 fi
5676 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5677 fi
5678
5679         cross_compiling=$cf_save_crossed
5680         ac_link=$cf_save_ac_link
5681
5682         echo "$as_me:5682: result: $cf_ok_build_cc" >&5
5683 echo "${ECHO_T}$cf_ok_build_cc" >&6
5684
5685         if test "$cf_ok_build_cc" != yes
5686         then
5687                 { { echo "$as_me:5687: error: Cross-build requires two compilers.
5688 Use --with-build-cc to specify the native compiler." >&5
5689 echo "$as_me: error: Cross-build requires two compilers.
5690 Use --with-build-cc to specify the native compiler." >&2;}
5691    { (exit 1); exit 1; }; }
5692         fi
5693
5694 else
5695         : ${BUILD_CC:='${CC}'}
5696         : ${BUILD_CPP:='${CPP}'}
5697         : ${BUILD_CFLAGS:='${CFLAGS}'}
5698         : ${BUILD_CPPFLAGS:=''${CPPFLAGS}''}
5699         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5700         : ${BUILD_LIBS:=''${LIBS}''}
5701         : ${BUILD_EXEEXT:='$x'}
5702         : ${BUILD_OBJEXT:='o'}
5703 fi
5704
5705 ###############################################################################
5706
5707 ### Options to allow the user to specify the set of libraries which are used.
5708 ### Use "--without-normal --with-shared" to allow the default model to be
5709 ### shared, for example.
5710 cf_list_models=""
5711
5712 echo "$as_me:5712: checking if libtool -version-number should be used" >&5
5713 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5714
5715 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5716 if test "${enable_libtool_version+set}" = set; then
5717   enableval="$enable_libtool_version"
5718   test "$enableval" != no && enableval=yes
5719         if test "$enableval" != "yes" ; then
5720     cf_libtool_version=no
5721         else
5722                 cf_libtool_version=yes
5723         fi
5724 else
5725   enableval=yes
5726         cf_libtool_version=yes
5727
5728 fi;
5729 echo "$as_me:5729: result: $cf_libtool_version" >&5
5730 echo "${ECHO_T}$cf_libtool_version" >&6
5731
5732 if test "$cf_libtool_version" = yes ; then
5733         LIBTOOL_VERSION="-version-number"
5734 else
5735         LIBTOOL_VERSION="-version-info"
5736         case "x$VERSION" in
5737         (x)
5738                 { echo "$as_me:5738: WARNING: VERSION was not set" >&5
5739 echo "$as_me: WARNING: VERSION was not set" >&2;}
5740                 ;;
5741         (x*.*.*)
5742                 ABI_VERSION="$VERSION"
5743                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5744
5745 echo "${as_me:-configure}:5745: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5746
5747                 ;;
5748         (x*:*:*)
5749                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5750                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5751
5752 echo "${as_me:-configure}:5752: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5753
5754                 ;;
5755         (*)
5756                 { echo "$as_me:5756: WARNING: unexpected VERSION value: $VERSION" >&5
5757 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5758                 ;;
5759         esac
5760 fi
5761
5762 LIBTOOL=
5763
5764 # common library maintenance symbols that are convenient for libtool scripts:
5765 LIB_CREATE='${AR} -cr'
5766 LIB_OBJECT='${OBJECTS}'
5767 LIB_SUFFIX=.a
5768 LIB_PREP="$RANLIB"
5769
5770 # symbols used to prop libtool up to enable it to determine what it should be
5771 # doing:
5772 LIB_CLEAN=
5773 LIB_COMPILE=
5774 LIB_LINK='${CC}'
5775 LIB_INSTALL=
5776 LIB_UNINSTALL=
5777
5778 echo "$as_me:5778: checking if you want to build libraries with libtool" >&5
5779 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5780
5781 # Check whether --with-libtool or --without-libtool was given.
5782 if test "${with_libtool+set}" = set; then
5783   withval="$with_libtool"
5784   with_libtool=$withval
5785 else
5786   with_libtool=no
5787 fi;
5788 echo "$as_me:5788: result: $with_libtool" >&5
5789 echo "${ECHO_T}$with_libtool" >&6
5790 if test "$with_libtool" != "no"; then
5791
5792         if test "$with_libtool" != "yes" ; then
5793
5794 if test "x$prefix" != xNONE; then
5795         cf_path_syntax="$prefix"
5796 else
5797         cf_path_syntax="$ac_default_prefix"
5798 fi
5799
5800 case ".$with_libtool" in
5801 (.\$\(*\)*|.\'*\'*)
5802         ;;
5803 (..|./*|.\\*)
5804         ;;
5805 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5806         ;;
5807 (.\$\{*prefix\}*|.\$\{*dir\}*)
5808         eval with_libtool="$with_libtool"
5809         case ".$with_libtool" in
5810         (.NONE/*)
5811                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5812                 ;;
5813         esac
5814         ;;
5815 (.no|.NONE/*)
5816         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5817         ;;
5818 (*)
5819         { { echo "$as_me:5819: error: expected a pathname, not \"$with_libtool\"" >&5
5820 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5821    { (exit 1); exit 1; }; }
5822         ;;
5823 esac
5824
5825                 LIBTOOL=$with_libtool
5826         else
5827                 if test -n "$ac_tool_prefix"; then
5828   for ac_prog in libtool glibtool
5829   do
5830     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5831 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5832 echo "$as_me:5832: checking for $ac_word" >&5
5833 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5834 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5835   echo $ECHO_N "(cached) $ECHO_C" >&6
5836 else
5837   if test -n "$LIBTOOL"; then
5838   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5839 else
5840   ac_save_IFS=$IFS; IFS=$ac_path_separator
5841 ac_dummy="$PATH"
5842 for ac_dir in $ac_dummy; do
5843   IFS=$ac_save_IFS
5844   test -z "$ac_dir" && ac_dir=.
5845   $as_executable_p "$ac_dir/$ac_word" || continue
5846 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5847 echo "$as_me:5847: found $ac_dir/$ac_word" >&5
5848 break
5849 done
5850
5851 fi
5852 fi
5853 LIBTOOL=$ac_cv_prog_LIBTOOL
5854 if test -n "$LIBTOOL"; then
5855   echo "$as_me:5855: result: $LIBTOOL" >&5
5856 echo "${ECHO_T}$LIBTOOL" >&6
5857 else
5858   echo "$as_me:5858: result: no" >&5
5859 echo "${ECHO_T}no" >&6
5860 fi
5861
5862     test -n "$LIBTOOL" && break
5863   done
5864 fi
5865 if test -z "$LIBTOOL"; then
5866   ac_ct_LIBTOOL=$LIBTOOL
5867   for ac_prog in libtool glibtool
5868 do
5869   # Extract the first word of "$ac_prog", so it can be a program name with args.
5870 set dummy $ac_prog; ac_word=$2
5871 echo "$as_me:5871: checking for $ac_word" >&5
5872 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5873 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5874   echo $ECHO_N "(cached) $ECHO_C" >&6
5875 else
5876   if test -n "$ac_ct_LIBTOOL"; then
5877   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5878 else
5879   ac_save_IFS=$IFS; IFS=$ac_path_separator
5880 ac_dummy="$PATH"
5881 for ac_dir in $ac_dummy; do
5882   IFS=$ac_save_IFS
5883   test -z "$ac_dir" && ac_dir=.
5884   $as_executable_p "$ac_dir/$ac_word" || continue
5885 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5886 echo "$as_me:5886: found $ac_dir/$ac_word" >&5
5887 break
5888 done
5889
5890 fi
5891 fi
5892 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5893 if test -n "$ac_ct_LIBTOOL"; then
5894   echo "$as_me:5894: result: $ac_ct_LIBTOOL" >&5
5895 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5896 else
5897   echo "$as_me:5897: result: no" >&5
5898 echo "${ECHO_T}no" >&6
5899 fi
5900
5901   test -n "$ac_ct_LIBTOOL" && break
5902 done
5903 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5904
5905   LIBTOOL=$ac_ct_LIBTOOL
5906 fi
5907
5908 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5909 then
5910         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.].*//'`
5911 else
5912         cf_cv_libtool_version=
5913 fi
5914 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5915
5916                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5917                 then
5918
5919 unset ac_cv_prog_ac_ct_LIBTOOL
5920 unset ac_ct_LIBTOOL
5921 unset LIBTOOL
5922
5923                         if test -n "$ac_tool_prefix"; then
5924   for ac_prog in glibtool
5925   do
5926     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5927 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5928 echo "$as_me:5928: checking for $ac_word" >&5
5929 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5930 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5931   echo $ECHO_N "(cached) $ECHO_C" >&6
5932 else
5933   if test -n "$LIBTOOL"; then
5934   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5935 else
5936   ac_save_IFS=$IFS; IFS=$ac_path_separator
5937 ac_dummy="$PATH"
5938 for ac_dir in $ac_dummy; do
5939   IFS=$ac_save_IFS
5940   test -z "$ac_dir" && ac_dir=.
5941   $as_executable_p "$ac_dir/$ac_word" || continue
5942 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5943 echo "$as_me:5943: found $ac_dir/$ac_word" >&5
5944 break
5945 done
5946
5947 fi
5948 fi
5949 LIBTOOL=$ac_cv_prog_LIBTOOL
5950 if test -n "$LIBTOOL"; then
5951   echo "$as_me:5951: result: $LIBTOOL" >&5
5952 echo "${ECHO_T}$LIBTOOL" >&6
5953 else
5954   echo "$as_me:5954: result: no" >&5
5955 echo "${ECHO_T}no" >&6
5956 fi
5957
5958     test -n "$LIBTOOL" && break
5959   done
5960 fi
5961 if test -z "$LIBTOOL"; then
5962   ac_ct_LIBTOOL=$LIBTOOL
5963   for ac_prog in glibtool
5964 do
5965   # Extract the first word of "$ac_prog", so it can be a program name with args.
5966 set dummy $ac_prog; ac_word=$2
5967 echo "$as_me:5967: checking for $ac_word" >&5
5968 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5969 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5970   echo $ECHO_N "(cached) $ECHO_C" >&6
5971 else
5972   if test -n "$ac_ct_LIBTOOL"; then
5973   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5974 else
5975   ac_save_IFS=$IFS; IFS=$ac_path_separator
5976 ac_dummy="$PATH"
5977 for ac_dir in $ac_dummy; do
5978   IFS=$ac_save_IFS
5979   test -z "$ac_dir" && ac_dir=.
5980   $as_executable_p "$ac_dir/$ac_word" || continue
5981 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5982 echo "$as_me:5982: found $ac_dir/$ac_word" >&5
5983 break
5984 done
5985
5986 fi
5987 fi
5988 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5989 if test -n "$ac_ct_LIBTOOL"; then
5990   echo "$as_me:5990: result: $ac_ct_LIBTOOL" >&5
5991 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5992 else
5993   echo "$as_me:5993: result: no" >&5
5994 echo "${ECHO_T}no" >&6
5995 fi
5996
5997   test -n "$ac_ct_LIBTOOL" && break
5998 done
5999 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
6000
6001   LIBTOOL=$ac_ct_LIBTOOL
6002 fi
6003
6004 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6005 then
6006         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.].*//'`
6007 else
6008         cf_cv_libtool_version=
6009 fi
6010 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
6011
6012                 fi
6013         fi
6014         if test -z "$LIBTOOL" ; then
6015                 { { echo "$as_me:6015: error: Cannot find libtool" >&5
6016 echo "$as_me: error: Cannot find libtool" >&2;}
6017    { (exit 1); exit 1; }; }
6018         fi
6019         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
6020         LIB_OBJECT='${OBJECTS:.o=.lo}'
6021         LIB_SUFFIX=.la
6022         LIB_CLEAN='${LIBTOOL} --mode=clean'
6023         LIB_COMPILE='${LIBTOOL} --mode=compile'
6024         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
6025         LIB_INSTALL='${LIBTOOL} --mode=install'
6026         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
6027         LIB_PREP=:
6028
6029 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6030 then
6031         echo "$as_me:6031: checking version of $LIBTOOL" >&5
6032 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
6033
6034 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
6035 then
6036         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.].*//'`
6037 else
6038         cf_cv_libtool_version=
6039 fi
6040 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
6041
6042         echo "$as_me:6042: result: $cf_cv_libtool_version" >&5
6043 echo "${ECHO_T}$cf_cv_libtool_version" >&6
6044         if test -n "$cf_cv_libtool_version"
6045         then
6046                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
6047                 case "x$cf_check_libtool_version" in
6048                 (*...GNU-libtool...*)
6049                         ;;
6050                 (*)
6051                         { { echo "$as_me:6051: error: This is not GNU libtool" >&5
6052 echo "$as_me: error: This is not GNU libtool" >&2;}
6053    { (exit 1); exit 1; }; }
6054                         ;;
6055                 esac
6056         else
6057                 { { echo "$as_me:6057: error: No version found for $LIBTOOL" >&5
6058 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
6059    { (exit 1); exit 1; }; }
6060         fi
6061 else
6062         { { echo "$as_me:6062: error: GNU libtool has not been found" >&5
6063 echo "$as_me: error: GNU libtool has not been found" >&2;}
6064    { (exit 1); exit 1; }; }
6065 fi
6066
6067         # special hack to add -no-undefined (which libtool should do for itself)
6068         LT_UNDEF=
6069         case "$cf_cv_system_name" in
6070         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
6071                 LT_UNDEF=-no-undefined
6072                 ;;
6073         esac
6074
6075         # special hack to add --tag option for C++ compiler
6076         case "$cf_cv_libtool_version" in
6077         (1.[5-9]*|[2-9].[0-9.a-z]*)
6078                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
6079                 LIBTOOL="$LIBTOOL --tag=CC"
6080                 ;;
6081         (*)
6082                 LIBTOOL_CXX="$LIBTOOL"
6083                 ;;
6084         esac
6085 else
6086         LIBTOOL=""
6087         LIBTOOL_CXX=""
6088 fi
6089
6090 test -z "$LIBTOOL" && ECHO_LT=
6091
6092 if test "$with_libtool" != "no" ; then
6093
6094 cf_list_models="$cf_list_models libtool"
6095
6096 else
6097
6098 echo "$as_me:6098: checking if you want to build shared libraries" >&5
6099 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
6100
6101 # Check whether --with-shared or --without-shared was given.
6102 if test "${with_shared+set}" = set; then
6103   withval="$with_shared"
6104   with_shared=$withval
6105 else
6106   with_shared=no
6107 fi;
6108 echo "$as_me:6108: result: $with_shared" >&5
6109 echo "${ECHO_T}$with_shared" >&6
6110 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
6111
6112 echo "$as_me:6112: checking if you want to build static libraries" >&5
6113 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
6114
6115 # Check whether --with-normal or --without-normal was given.
6116 if test "${with_normal+set}" = set; then
6117   withval="$with_normal"
6118   with_normal=$withval
6119 else
6120   with_normal=yes
6121 fi;
6122 echo "$as_me:6122: result: $with_normal" >&5
6123 echo "${ECHO_T}$with_normal" >&6
6124 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
6125
6126 echo "$as_me:6126: checking if you want to build debug libraries" >&5
6127 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
6128
6129 # Check whether --with-debug or --without-debug was given.
6130 if test "${with_debug+set}" = set; then
6131   withval="$with_debug"
6132   with_debug=$withval
6133 else
6134   with_debug=yes
6135 fi;
6136 echo "$as_me:6136: result: $with_debug" >&5
6137 echo "${ECHO_T}$with_debug" >&6
6138 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
6139
6140 echo "$as_me:6140: checking if you want to build profiling libraries" >&5
6141 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
6142
6143 # Check whether --with-profile or --without-profile was given.
6144 if test "${with_profile+set}" = set; then
6145   withval="$with_profile"
6146   with_profile=$withval
6147 else
6148   with_profile=no
6149 fi;
6150 echo "$as_me:6150: result: $with_profile" >&5
6151 echo "${ECHO_T}$with_profile" >&6
6152 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
6153
6154 fi
6155
6156 if test "X$cf_with_cxx_binding" != Xno; then
6157 if test "x$with_shared" = "xyes"; then
6158 echo "$as_me:6158: checking if you want to build C++ shared libraries" >&5
6159 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
6160
6161 # Check whether --with-cxx-shared or --without-cxx-shared was given.
6162 if test "${with_cxx_shared+set}" = set; then
6163   withval="$with_cxx_shared"
6164   with_shared_cxx=$withval
6165 else
6166   with_shared_cxx=no
6167 fi;
6168 echo "$as_me:6168: result: $with_shared_cxx" >&5
6169 echo "${ECHO_T}$with_shared_cxx" >&6
6170 fi
6171 fi
6172
6173 ###############################################################################
6174
6175 echo "$as_me:6175: checking for specified models" >&5
6176 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
6177 test -z "$cf_list_models" && cf_list_models=normal
6178 test "$with_libtool" != "no" && cf_list_models=libtool
6179 echo "$as_me:6179: result: $cf_list_models" >&5
6180 echo "${ECHO_T}$cf_list_models" >&6
6181
6182 ### Use the first model as the default, and save its suffix for use in building
6183 ### up test-applications.
6184 echo "$as_me:6184: checking for default model" >&5
6185 echo $ECHO_N "checking for default model... $ECHO_C" >&6
6186 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
6187 echo "$as_me:6187: result: $DFT_LWR_MODEL" >&5
6188 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
6189
6190 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6191
6192 TICS_NAME=tic
6193
6194 TINFO_NAME=tinfo
6195
6196 LIB_NAME=ncurses
6197
6198 LIB_DIR=../lib
6199 LIB_2ND=../../lib
6200
6201 echo "$as_me:6201: checking if you want to have a library-prefix" >&5
6202 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
6203
6204 # Check whether --with-lib-prefix or --without-lib-prefix was given.
6205 if test "${with_lib_prefix+set}" = set; then
6206   withval="$with_lib_prefix"
6207   with_lib_prefix=$withval
6208 else
6209   with_lib_prefix=auto
6210 fi;
6211 echo "$as_me:6211: result: $with_lib_prefix" >&5
6212 echo "${ECHO_T}$with_lib_prefix" >&6
6213
6214 if test "$with_lib_prefix" = auto
6215 then
6216
6217         case "$cf_cv_system_name" in
6218         (OS/2*|os2*)
6219                 if test "$DFT_LWR_MODEL" = libtool; then
6220                         LIB_PREFIX='lib'
6221                 else
6222                         LIB_PREFIX=''
6223                 fi
6224                 ;;
6225         (*-msvc*)
6226                 LIB_PREFIX=''
6227                 ;;
6228         (*)     LIB_PREFIX='lib'
6229                 ;;
6230         esac
6231 cf_prefix=$LIB_PREFIX
6232
6233 elif test "$with_lib_prefix" = no
6234 then
6235         LIB_PREFIX=
6236 else
6237         LIB_PREFIX=$with_lib_prefix
6238 fi
6239
6240 LIB_SUFFIX=
6241
6242         echo "$as_me:6242: checking for PATH separator" >&5
6243 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
6244         case "$cf_cv_system_name" in
6245         (os2*)  PATH_SEPARATOR=';'  ;;
6246         (*)     ${PATH_SEPARATOR:=':'}  ;;
6247         esac
6248
6249         echo "$as_me:6249: result: $PATH_SEPARATOR" >&5
6250 echo "${ECHO_T}$PATH_SEPARATOR" >&6
6251
6252 # headers needed for checks...
6253 echo "$as_me:6253: checking for ANSI C header files" >&5
6254 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
6255 if test "${ac_cv_header_stdc+set}" = set; then
6256   echo $ECHO_N "(cached) $ECHO_C" >&6
6257 else
6258   cat >"conftest.$ac_ext" <<_ACEOF
6259 #line 6259 "configure"
6260 #include "confdefs.h"
6261 #include <stdlib.h>
6262 #include <stdarg.h>
6263 #include <string.h>
6264 #include <float.h>
6265
6266 _ACEOF
6267 if { (eval echo "$as_me:6267: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6268   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6269   ac_status=$?
6270   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6271   rm -f conftest.er1
6272   cat conftest.err >&5
6273   echo "$as_me:6273: \$? = $ac_status" >&5
6274   (exit "$ac_status"); } >/dev/null; then
6275   if test -s conftest.err; then
6276     ac_cpp_err=$ac_c_preproc_warn_flag
6277   else
6278     ac_cpp_err=
6279   fi
6280 else
6281   ac_cpp_err=yes
6282 fi
6283 if test -z "$ac_cpp_err"; then
6284   ac_cv_header_stdc=yes
6285 else
6286   echo "$as_me: failed program was:" >&5
6287   cat "conftest.$ac_ext" >&5
6288   ac_cv_header_stdc=no
6289 fi
6290 rm -f conftest.err "conftest.$ac_ext"
6291
6292 if test $ac_cv_header_stdc = yes; then
6293   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6294   cat >"conftest.$ac_ext" <<_ACEOF
6295 #line 6295 "configure"
6296 #include "confdefs.h"
6297 #include <string.h>
6298
6299 _ACEOF
6300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6301   $EGREP "memchr" >/dev/null 2>&1; then
6302   :
6303 else
6304   ac_cv_header_stdc=no
6305 fi
6306 rm -rf conftest*
6307
6308 fi
6309
6310 if test $ac_cv_header_stdc = yes; then
6311   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6312   cat >"conftest.$ac_ext" <<_ACEOF
6313 #line 6313 "configure"
6314 #include "confdefs.h"
6315 #include <stdlib.h>
6316
6317 _ACEOF
6318 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6319   $EGREP "free" >/dev/null 2>&1; then
6320   :
6321 else
6322   ac_cv_header_stdc=no
6323 fi
6324 rm -rf conftest*
6325
6326 fi
6327
6328 if test $ac_cv_header_stdc = yes; then
6329   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6330   if test "$cross_compiling" = yes; then
6331   :
6332 else
6333   cat >"conftest.$ac_ext" <<_ACEOF
6334 #line 6334 "configure"
6335 #include "confdefs.h"
6336 #include <ctype.h>
6337 #if ((' ' & 0x0FF) == 0x020)
6338 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6339 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6340 #else
6341 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6342                      || ('j' <= (c) && (c) <= 'r') \
6343                      || ('s' <= (c) && (c) <= 'z'))
6344 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6345 #endif
6346
6347 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6348 int
6349 main (void)
6350 {
6351   int i;
6352   for (i = 0; i < 256; i++)
6353     if (XOR (islower (i), ISLOWER (i))
6354         || toupper (i) != TOUPPER (i))
6355       $ac_main_return(2);
6356   $ac_main_return (0);
6357 }
6358 _ACEOF
6359 rm -f "conftest$ac_exeext"
6360 if { (eval echo "$as_me:6360: \"$ac_link\"") >&5
6361   (eval $ac_link) 2>&5
6362   ac_status=$?
6363   echo "$as_me:6363: \$? = $ac_status" >&5
6364   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6365   { (eval echo "$as_me:6365: \"$ac_try\"") >&5
6366   (eval $ac_try) 2>&5
6367   ac_status=$?
6368   echo "$as_me:6368: \$? = $ac_status" >&5
6369   (exit "$ac_status"); }; }; then
6370   :
6371 else
6372   echo "$as_me: program exited with status $ac_status" >&5
6373 echo "$as_me: failed program was:" >&5
6374 cat "conftest.$ac_ext" >&5
6375 ac_cv_header_stdc=no
6376 fi
6377 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6378 fi
6379 fi
6380 fi
6381 echo "$as_me:6381: result: $ac_cv_header_stdc" >&5
6382 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6383 if test $ac_cv_header_stdc = yes; then
6384
6385 cat >>confdefs.h <<\EOF
6386 #define STDC_HEADERS 1
6387 EOF
6388
6389 fi
6390
6391 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6392
6393 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6394                   inttypes.h stdint.h unistd.h
6395 do
6396 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6397 echo "$as_me:6397: checking for $ac_header" >&5
6398 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6399 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6400   echo $ECHO_N "(cached) $ECHO_C" >&6
6401 else
6402   cat >"conftest.$ac_ext" <<_ACEOF
6403 #line 6403 "configure"
6404 #include "confdefs.h"
6405 $ac_includes_default
6406 #include <$ac_header>
6407 _ACEOF
6408 rm -f "conftest.$ac_objext"
6409 if { (eval echo "$as_me:6409: \"$ac_compile\"") >&5
6410   (eval $ac_compile) 2>&5
6411   ac_status=$?
6412   echo "$as_me:6412: \$? = $ac_status" >&5
6413   (exit "$ac_status"); } &&
6414          { ac_try='test -s "conftest.$ac_objext"'
6415   { (eval echo "$as_me:6415: \"$ac_try\"") >&5
6416   (eval $ac_try) 2>&5
6417   ac_status=$?
6418   echo "$as_me:6418: \$? = $ac_status" >&5
6419   (exit "$ac_status"); }; }; then
6420   eval "$as_ac_Header=yes"
6421 else
6422   echo "$as_me: failed program was:" >&5
6423 cat "conftest.$ac_ext" >&5
6424 eval "$as_ac_Header=no"
6425 fi
6426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6427 fi
6428 echo "$as_me:6428: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6429 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6430 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6431   cat >>confdefs.h <<EOF
6432 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6433 EOF
6434
6435 fi
6436 done
6437
6438 echo "$as_me:6438: checking whether exit is declared" >&5
6439 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6440 if test "${ac_cv_have_decl_exit+set}" = set; then
6441   echo $ECHO_N "(cached) $ECHO_C" >&6
6442 else
6443   cat >"conftest.$ac_ext" <<_ACEOF
6444 #line 6444 "configure"
6445 #include "confdefs.h"
6446 $ac_includes_default
6447 int
6448 main (void)
6449 {
6450 #ifndef exit
6451   (void) exit;
6452 #endif
6453
6454   ;
6455   return 0;
6456 }
6457 _ACEOF
6458 rm -f "conftest.$ac_objext"
6459 if { (eval echo "$as_me:6459: \"$ac_compile\"") >&5
6460   (eval $ac_compile) 2>&5
6461   ac_status=$?
6462   echo "$as_me:6462: \$? = $ac_status" >&5
6463   (exit "$ac_status"); } &&
6464          { ac_try='test -s "conftest.$ac_objext"'
6465   { (eval echo "$as_me:6465: \"$ac_try\"") >&5
6466   (eval $ac_try) 2>&5
6467   ac_status=$?
6468   echo "$as_me:6468: \$? = $ac_status" >&5
6469   (exit "$ac_status"); }; }; then
6470   ac_cv_have_decl_exit=yes
6471 else
6472   echo "$as_me: failed program was:" >&5
6473 cat "conftest.$ac_ext" >&5
6474 ac_cv_have_decl_exit=no
6475 fi
6476 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6477 fi
6478 echo "$as_me:6478: result: $ac_cv_have_decl_exit" >&5
6479 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6480
6481 ac_header_dirent=no
6482 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6483   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6484 echo "$as_me:6484: checking for $ac_hdr that defines DIR" >&5
6485 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6486 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6487   echo $ECHO_N "(cached) $ECHO_C" >&6
6488 else
6489   cat >"conftest.$ac_ext" <<_ACEOF
6490 #line 6490 "configure"
6491 #include "confdefs.h"
6492 #include <sys/types.h>
6493 #include <$ac_hdr>
6494
6495 int
6496 main (void)
6497 {
6498 if ((DIR *) 0)
6499 return 0;
6500   ;
6501   return 0;
6502 }
6503 _ACEOF
6504 rm -f "conftest.$ac_objext"
6505 if { (eval echo "$as_me:6505: \"$ac_compile\"") >&5
6506   (eval $ac_compile) 2>&5
6507   ac_status=$?
6508   echo "$as_me:6508: \$? = $ac_status" >&5
6509   (exit "$ac_status"); } &&
6510          { ac_try='test -s "conftest.$ac_objext"'
6511   { (eval echo "$as_me:6511: \"$ac_try\"") >&5
6512   (eval $ac_try) 2>&5
6513   ac_status=$?
6514   echo "$as_me:6514: \$? = $ac_status" >&5
6515   (exit "$ac_status"); }; }; then
6516   eval "$as_ac_Header=yes"
6517 else
6518   echo "$as_me: failed program was:" >&5
6519 cat "conftest.$ac_ext" >&5
6520 eval "$as_ac_Header=no"
6521 fi
6522 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6523 fi
6524 echo "$as_me:6524: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6525 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6526 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6527   cat >>confdefs.h <<EOF
6528 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6529 EOF
6530
6531 ac_header_dirent=$ac_hdr; break
6532 fi
6533
6534 done
6535 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6536 if test $ac_header_dirent = dirent.h; then
6537   echo "$as_me:6537: checking for opendir in -ldir" >&5
6538 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6539 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6540   echo $ECHO_N "(cached) $ECHO_C" >&6
6541 else
6542   ac_check_lib_save_LIBS=$LIBS
6543 LIBS="-ldir  $LIBS"
6544 cat >"conftest.$ac_ext" <<_ACEOF
6545 #line 6545 "configure"
6546 #include "confdefs.h"
6547
6548 /* Override any gcc2 internal prototype to avoid an error.  */
6549 #ifdef __cplusplus
6550 extern "C"
6551 #endif
6552 /* We use char because int might match the return type of a gcc2
6553    builtin and then its argument prototype would still apply.  */
6554 char opendir (void);
6555 int
6556 main (void)
6557 {
6558 opendir ();
6559   ;
6560   return 0;
6561 }
6562 _ACEOF
6563 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6564 if { (eval echo "$as_me:6564: \"$ac_link\"") >&5
6565   (eval $ac_link) 2>&5
6566   ac_status=$?
6567   echo "$as_me:6567: \$? = $ac_status" >&5
6568   (exit "$ac_status"); } &&
6569          { ac_try='test -s "conftest$ac_exeext"'
6570   { (eval echo "$as_me:6570: \"$ac_try\"") >&5
6571   (eval $ac_try) 2>&5
6572   ac_status=$?
6573   echo "$as_me:6573: \$? = $ac_status" >&5
6574   (exit "$ac_status"); }; }; then
6575   ac_cv_lib_dir_opendir=yes
6576 else
6577   echo "$as_me: failed program was:" >&5
6578 cat "conftest.$ac_ext" >&5
6579 ac_cv_lib_dir_opendir=no
6580 fi
6581 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6582 LIBS=$ac_check_lib_save_LIBS
6583 fi
6584 echo "$as_me:6584: result: $ac_cv_lib_dir_opendir" >&5
6585 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6586 if test "$ac_cv_lib_dir_opendir" = yes; then
6587   LIBS="$LIBS -ldir"
6588 fi
6589
6590 else
6591   echo "$as_me:6591: checking for opendir in -lx" >&5
6592 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6593 if test "${ac_cv_lib_x_opendir+set}" = set; then
6594   echo $ECHO_N "(cached) $ECHO_C" >&6
6595 else
6596   ac_check_lib_save_LIBS=$LIBS
6597 LIBS="-lx  $LIBS"
6598 cat >"conftest.$ac_ext" <<_ACEOF
6599 #line 6599 "configure"
6600 #include "confdefs.h"
6601
6602 /* Override any gcc2 internal prototype to avoid an error.  */
6603 #ifdef __cplusplus
6604 extern "C"
6605 #endif
6606 /* We use char because int might match the return type of a gcc2
6607    builtin and then its argument prototype would still apply.  */
6608 char opendir (void);
6609 int
6610 main (void)
6611 {
6612 opendir ();
6613   ;
6614   return 0;
6615 }
6616 _ACEOF
6617 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6618 if { (eval echo "$as_me:6618: \"$ac_link\"") >&5
6619   (eval $ac_link) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit "$ac_status"); } &&
6623          { ac_try='test -s "conftest$ac_exeext"'
6624   { (eval echo "$as_me:6624: \"$ac_try\"") >&5
6625   (eval $ac_try) 2>&5
6626   ac_status=$?
6627   echo "$as_me:6627: \$? = $ac_status" >&5
6628   (exit "$ac_status"); }; }; then
6629   ac_cv_lib_x_opendir=yes
6630 else
6631   echo "$as_me: failed program was:" >&5
6632 cat "conftest.$ac_ext" >&5
6633 ac_cv_lib_x_opendir=no
6634 fi
6635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6636 LIBS=$ac_check_lib_save_LIBS
6637 fi
6638 echo "$as_me:6638: result: $ac_cv_lib_x_opendir" >&5
6639 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6640 if test "$ac_cv_lib_x_opendir" = yes; then
6641   LIBS="$LIBS -lx"
6642 fi
6643
6644 fi
6645
6646 ###############################################################################
6647
6648 echo "$as_me:6648: checking if you want to build a separate terminfo library" >&5
6649 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6650
6651 # Check whether --with-termlib or --without-termlib was given.
6652 if test "${with_termlib+set}" = set; then
6653   withval="$with_termlib"
6654   with_termlib=$withval
6655 else
6656   with_termlib=no
6657 fi;
6658 echo "$as_me:6658: result: $with_termlib" >&5
6659 echo "${ECHO_T}$with_termlib" >&6
6660
6661 echo "$as_me:6661: checking if you want to build a separate tic library" >&5
6662 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6663
6664 # Check whether --with-ticlib or --without-ticlib was given.
6665 if test "${with_ticlib+set}" = set; then
6666   withval="$with_ticlib"
6667   with_ticlib=$withval
6668 else
6669   with_ticlib=no
6670 fi;
6671 echo "$as_me:6671: result: $with_ticlib" >&5
6672 echo "${ECHO_T}$with_ticlib" >&6
6673
6674 if test X"$CC_G_OPT" = X"" ; then
6675         CC_G_OPT='-g'
6676         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6677 fi
6678
6679 if test X"$CXX_G_OPT" = X"" ; then
6680         CXX_G_OPT='-g'
6681         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6682 fi
6683
6684 echo "$as_me:6684: checking for default loader flags" >&5
6685 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6686 case "$DFT_LWR_MODEL" in
6687 (libtool) LD_MODEL=''   ;;
6688 (normal)  LD_MODEL=''   ;;
6689 (debug)   LD_MODEL=$CC_G_OPT ;;
6690 (profile) LD_MODEL='-pg';;
6691 (shared)  LD_MODEL=''   ;;
6692 esac
6693 echo "$as_me:6693: result: ${LD_MODEL:-(none)}" >&5
6694 echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
6695
6696 case "$DFT_LWR_MODEL" in
6697 (shared)
6698
6699 echo "$as_me:6699: checking if rpath option should be used" >&5
6700 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6701
6702 # Check whether --enable-rpath or --disable-rpath was given.
6703 if test "${enable_rpath+set}" = set; then
6704   enableval="$enable_rpath"
6705   cf_cv_enable_rpath=$enableval
6706 else
6707   cf_cv_enable_rpath=no
6708 fi;
6709 echo "$as_me:6709: result: $cf_cv_enable_rpath" >&5
6710 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6711
6712 echo "$as_me:6712: checking if shared libraries should be relinked during install" >&5
6713 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6714
6715 # Check whether --enable-relink or --disable-relink was given.
6716 if test "${enable_relink+set}" = set; then
6717   enableval="$enable_relink"
6718   cf_cv_do_relink=$enableval
6719 else
6720   cf_cv_do_relink=yes
6721 fi;
6722 echo "$as_me:6722: result: $cf_cv_do_relink" >&5
6723 echo "${ECHO_T}$cf_cv_do_relink" >&6
6724         ;;
6725 esac
6726
6727 # we will build libraries one-level down.
6728 rel_builddir=..
6729
6730 LD_RPATH_OPT=
6731 if test "x$cf_cv_enable_rpath" != xno
6732 then
6733         echo "$as_me:6733: checking for an rpath option" >&5
6734 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6735         case "$cf_cv_system_name" in
6736         (irix*)
6737                 if test "$GCC" = yes; then
6738                         LD_RPATH_OPT="-Wl,-rpath,"
6739                 else
6740                         LD_RPATH_OPT="-rpath "
6741                 fi
6742                 ;;
6743         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6744                 LD_RPATH_OPT="-Wl,-rpath,"
6745                 ;;
6746         (openbsd[2-9].*|mirbsd*)
6747                 LD_RPATH_OPT="-Wl,-rpath,"
6748                 ;;
6749         (dragonfly*)
6750                 LD_RPATH_OPT="-rpath "
6751                 ;;
6752         (netbsd*)
6753                 LD_RPATH_OPT="-Wl,-rpath,"
6754                 ;;
6755         (osf*|mls+*)
6756                 LD_RPATH_OPT="-rpath "
6757                 ;;
6758         (solaris2*)
6759                 LD_RPATH_OPT="-R"
6760                 ;;
6761         (*)
6762                 ;;
6763         esac
6764         echo "$as_me:6764: result: $LD_RPATH_OPT" >&5
6765 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6766
6767         case "x$LD_RPATH_OPT" in
6768         (x-R*)
6769                 echo "$as_me:6769: checking if we need a space after rpath option" >&5
6770 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6771                 cf_save_LIBS="$LIBS"
6772
6773 cf_add_libs="$LIBS"
6774 # reverse order
6775 cf_add_0lib=
6776 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6777 # filter duplicates
6778 for cf_add_1lib in $cf_add_0lib; do
6779         for cf_add_2lib in $cf_add_libs; do
6780                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6781                         cf_add_1lib=
6782                         break
6783                 fi
6784         done
6785         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6786 done
6787 LIBS="$cf_add_libs"
6788
6789                 cat >"conftest.$ac_ext" <<_ACEOF
6790 #line 6790 "configure"
6791 #include "confdefs.h"
6792
6793 int
6794 main (void)
6795 {
6796
6797   ;
6798   return 0;
6799 }
6800 _ACEOF
6801 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6802 if { (eval echo "$as_me:6802: \"$ac_link\"") >&5
6803   (eval $ac_link) 2>&5
6804   ac_status=$?
6805   echo "$as_me:6805: \$? = $ac_status" >&5
6806   (exit "$ac_status"); } &&
6807          { ac_try='test -s "conftest$ac_exeext"'
6808   { (eval echo "$as_me:6808: \"$ac_try\"") >&5
6809   (eval $ac_try) 2>&5
6810   ac_status=$?
6811   echo "$as_me:6811: \$? = $ac_status" >&5
6812   (exit "$ac_status"); }; }; then
6813   cf_rpath_space=no
6814 else
6815   echo "$as_me: failed program was:" >&5
6816 cat "conftest.$ac_ext" >&5
6817 cf_rpath_space=yes
6818 fi
6819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6820                 LIBS="$cf_save_LIBS"
6821                 echo "$as_me:6821: result: $cf_rpath_space" >&5
6822 echo "${ECHO_T}$cf_rpath_space" >&6
6823                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6824                 ;;
6825         esac
6826 fi
6827
6828         RM_SHARED_OPTS=
6829         LOCAL_LDFLAGS=
6830         LOCAL_LDFLAGS2=
6831         LD_SHARED_OPTS=
6832         INSTALL_LIB="-m 644"
6833         : ${rel_builddir:=.}
6834
6835         shlibdir=$libdir
6836
6837         MAKE_DLLS="#"
6838
6839         cf_cv_do_symlinks=no
6840         cf_ld_rpath_opt=
6841         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6842
6843         echo "$as_me:6843: checking whether to use release or ABI version in shared library file names" >&5
6844 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
6845
6846 # Check whether --with-shlib-version or --without-shlib-version was given.
6847 if test "${with_shlib_version+set}" = set; then
6848   withval="$with_shlib_version"
6849   test -z "$withval" && withval=auto
6850         case "$withval" in
6851         (yes)
6852                 cf_cv_shlib_version=auto
6853                 ;;
6854         (rel|abi|auto)
6855                 cf_cv_shlib_version=$withval
6856                 ;;
6857         (*)
6858                 echo "$as_me:6858: result: $withval" >&5
6859 echo "${ECHO_T}$withval" >&6
6860                 { { echo "$as_me:6860: error: option value must be one of: rel, abi, or auto" >&5
6861 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6862    { (exit 1); exit 1; }; }
6863                 ;;
6864         esac
6865
6866 else
6867   cf_cv_shlib_version=auto
6868 fi;
6869         echo "$as_me:6869: result: $cf_cv_shlib_version" >&5
6870 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6871
6872         cf_cv_rm_so_locs=no
6873         cf_try_cflags=
6874
6875         # Some less-capable ports of gcc support only -fpic
6876         CC_SHARED_OPTS=
6877
6878         cf_try_fPIC=no
6879         if test "$GCC" = yes
6880         then
6881                 cf_try_fPIC=yes
6882         else
6883                 case "$cf_cv_system_name" in
6884                 (*linux*)       # e.g., PGI compiler
6885                         cf_try_fPIC=yes
6886                         ;;
6887                 esac
6888         fi
6889
6890         if test "$cf_try_fPIC" = yes
6891         then
6892                 echo "$as_me:6892: checking which $CC option to use" >&5
6893 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6894                 cf_save_CFLAGS="$CFLAGS"
6895                 for CC_SHARED_OPTS in -fPIC -fpic ''
6896                 do
6897                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6898                         cat >"conftest.$ac_ext" <<_ACEOF
6899 #line 6899 "configure"
6900 #include "confdefs.h"
6901 #include <stdio.h>
6902 int
6903 main (void)
6904 {
6905 int x = 1; (void)x
6906   ;
6907   return 0;
6908 }
6909 _ACEOF
6910 rm -f "conftest.$ac_objext"
6911 if { (eval echo "$as_me:6911: \"$ac_compile\"") >&5
6912   (eval $ac_compile) 2>&5
6913   ac_status=$?
6914   echo "$as_me:6914: \$? = $ac_status" >&5
6915   (exit "$ac_status"); } &&
6916          { ac_try='test -s "conftest.$ac_objext"'
6917   { (eval echo "$as_me:6917: \"$ac_try\"") >&5
6918   (eval $ac_try) 2>&5
6919   ac_status=$?
6920   echo "$as_me:6920: \$? = $ac_status" >&5
6921   (exit "$ac_status"); }; }; then
6922   break
6923 else
6924   echo "$as_me: failed program was:" >&5
6925 cat "conftest.$ac_ext" >&5
6926 fi
6927 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6928                 done
6929                 echo "$as_me:6929: result: $CC_SHARED_OPTS" >&5
6930 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6931                 CFLAGS="$cf_save_CFLAGS"
6932         fi
6933
6934         cf_cv_shlib_version_infix=no
6935
6936         case "$cf_cv_system_name" in
6937         (aix4.3-9*|aix[5-7]*)
6938                 if test "$GCC" = yes; then
6939                         CC_SHARED_OPTS='-Wl,-brtl'
6940                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6941                 else
6942                         CC_SHARED_OPTS='-brtl'
6943                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6944                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6945                 fi
6946                 ;;
6947         (beos*)
6948                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6949                 ;;
6950         (cygwin*)
6951                 CC_SHARED_OPTS=
6952                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6953                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6954                 cf_cv_shlib_version=cygdll
6955                 cf_cv_shlib_version_infix=cygdll
6956                 shlibdir=$bindir
6957                 MAKE_DLLS=
6958                 cat >mk_shared_lib.sh <<-CF_EOF
6959                 #!$SHELL
6960                 SHARED_LIB=\$1
6961                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6962                 shift
6963                 cat <<-EOF
6964                 Linking shared library
6965                 ** SHARED_LIB \$SHARED_LIB
6966                 ** IMPORT_LIB \$IMPORT_LIB
6967 EOF
6968                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6969 CF_EOF
6970                 chmod +x mk_shared_lib.sh
6971                 ;;
6972         (msys*)
6973                 CC_SHARED_OPTS=
6974                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6975                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6976                 cf_cv_shlib_version=msysdll
6977                 cf_cv_shlib_version_infix=msysdll
6978                 shlibdir=$bindir
6979                 MAKE_DLLS=
6980                 cat >mk_shared_lib.sh <<-CF_EOF
6981                 #!$SHELL
6982                 SHARED_LIB=\$1
6983                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6984                 shift
6985                 cat <<-EOF
6986                 Linking shared library
6987                 ** SHARED_LIB \$SHARED_LIB
6988                 ** IMPORT_LIB \$IMPORT_LIB
6989 EOF
6990                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6991 CF_EOF
6992                 chmod +x mk_shared_lib.sh
6993                 ;;
6994         (darwin*)
6995                 cf_try_cflags="no-cpp-precomp"
6996                 CC_SHARED_OPTS="-dynamic"
6997                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6998                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6999                 cf_cv_shlib_version_infix=yes
7000                 echo "$as_me:7000: checking if ld -search_paths_first works" >&5
7001 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
7002 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
7003   echo $ECHO_N "(cached) $ECHO_C" >&6
7004 else
7005
7006                         cf_save_LDFLAGS=$LDFLAGS
7007                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7008                         cat >"conftest.$ac_ext" <<_ACEOF
7009 #line 7009 "configure"
7010 #include "confdefs.h"
7011
7012 int
7013 main (void)
7014 {
7015 int i;
7016   ;
7017   return 0;
7018 }
7019 _ACEOF
7020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7021 if { (eval echo "$as_me:7021: \"$ac_link\"") >&5
7022   (eval $ac_link) 2>&5
7023   ac_status=$?
7024   echo "$as_me:7024: \$? = $ac_status" >&5
7025   (exit "$ac_status"); } &&
7026          { ac_try='test -s "conftest$ac_exeext"'
7027   { (eval echo "$as_me:7027: \"$ac_try\"") >&5
7028   (eval $ac_try) 2>&5
7029   ac_status=$?
7030   echo "$as_me:7030: \$? = $ac_status" >&5
7031   (exit "$ac_status"); }; }; then
7032   cf_cv_ldflags_search_paths_first=yes
7033 else
7034   echo "$as_me: failed program was:" >&5
7035 cat "conftest.$ac_ext" >&5
7036 cf_cv_ldflags_search_paths_first=no
7037 fi
7038 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7039                                 LDFLAGS=$cf_save_LDFLAGS
7040 fi
7041 echo "$as_me:7041: result: $cf_cv_ldflags_search_paths_first" >&5
7042 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
7043                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
7044                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
7045                 fi
7046                 ;;
7047         (haiku*)
7048
7049         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7050         if test "$cf_cv_shlib_version" = rel; then
7051                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7052         else
7053                 cf_cv_shared_soname='`basename $@`'
7054         fi
7055
7056                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7057                 ;;
7058         (hpux[7-8]*)
7059                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
7060                 if test "$GCC" != yes; then
7061                         CC_SHARED_OPTS='+Z'
7062                 fi
7063                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
7064                 INSTALL_LIB="-m 555"
7065                 ;;
7066         (hpux*)
7067                 # (tested with gcc 2.7.2 -- I don't have c89)
7068                 if test "$GCC" = yes; then
7069                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
7070                 else
7071                         CC_SHARED_OPTS='+Z'
7072                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
7073                 fi
7074                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
7075                 # HP-UX shared libraries must be executable, and should be
7076                 # readonly to exploit a quirk in the memory manager.
7077                 INSTALL_LIB="-m 555"
7078                 ;;
7079         (interix*)
7080                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7081                 if test "$cf_cv_shlib_version" = rel; then
7082                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7083                 else
7084                         cf_shared_soname='`basename $@`'
7085                 fi
7086                 CC_SHARED_OPTS=
7087                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
7088                 ;;
7089         (irix*)
7090                 if test "$cf_cv_enable_rpath" = yes ; then
7091                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7092                 fi
7093                 # tested with IRIX 5.2 and 'cc'.
7094                 if test "$GCC" != yes; then
7095                         CC_SHARED_OPTS='-KPIC'
7096                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
7097                 else
7098                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
7099                 fi
7100                 cf_cv_rm_so_locs=yes
7101                 ;;
7102         (linux*|gnu*|k*bsd*-gnu)
7103                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7104                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7105                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7106                 fi
7107                 if test "$cf_cv_enable_rpath" = yes ; then
7108                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7109                 fi
7110
7111         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7112         if test "$cf_cv_shlib_version" = rel; then
7113                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7114         else
7115                 cf_cv_shared_soname='`basename $@`'
7116         fi
7117
7118                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7119                 ;;
7120         (mingw*msvc*)
7121                 cf_cv_shlib_version=msvcdll
7122                 cf_cv_shlib_version_infix=msvcdll
7123                 shlibdir=$bindir
7124                 MAKE_DLLS=
7125                 if test "$DFT_LWR_MODEL" = "shared" ; then
7126                         LOCAL_LDFLAGS="-link -dll"
7127                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7128                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
7129                 fi
7130                 CC_SHARED_OPTS=
7131                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
7132                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
7133                 cat >mk_shared_lib.sh <<-CF_EOF
7134                 #!$SHELL
7135                 SHARED_LIB=\$1
7136                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
7137                 shift
7138                 my_ld=\$1
7139                 shift
7140                 cat <<-EOF
7141                 Linking shared library
7142                 ** SHARED LIB \$SHARED_LIB
7143                 ** IMPORT_LIB \$IMPORT_LIB
7144 EOF
7145                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
7146                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
7147                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
7148 CF_EOF
7149                 chmod +x mk_shared_lib.sh
7150                 cat >mk_prog.sh <<-CF_EOF
7151                 #!$SHELL
7152                 shift
7153                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
7154                 LD="$LD"
7155                 clopts=()
7156                 ldopts=("/subsystem:console")
7157                 libs=()
7158                 isdll=0
7159                 while test \$# -gt 0; do
7160                         case "\$1" in
7161                                 -link)
7162                                         # ignore -link argument
7163                                         ;;
7164                                 -M[TD] | -M[TD]d)
7165                                         # ignore runtime-library option
7166                                         ;;
7167                                 -dll)
7168                                         isdll=1
7169                                         ;;
7170                                 -W* | -w*)
7171                                         # ignore warnings
7172                                         ;;
7173                                 -D*)
7174                                         clopts+=("\$1")
7175                                         ;;
7176                                 -I*)
7177                                         clopts+=("\$1")
7178                                         ;;
7179                                 -l*)
7180                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
7181                                         ;;
7182                                 -L*)
7183                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
7184                                         ;;
7185                                 *.obj | *.o)
7186                                         ldopts+=("\$1")
7187                                         ;;
7188                                 -Wl,*)
7189                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
7190                                                 ldopts+=("\${linkarg}")
7191                                         done
7192                                         ;;
7193                                 *.lib)
7194                                         ldopts+=("\$1")
7195                                         ;;
7196                                 -o)
7197                                         shift
7198                                         ldopts+=("-out:\$1")
7199                                         ;;
7200                                 *)
7201                                         clopts+=("\$1")
7202                                         ldopts+=("\$1")
7203                                         ;;
7204                         esac
7205                         shift
7206                 done
7207                 if [ "\$isdll" -ne 0 ]; then
7208                         for lib in \${libs[*]}; do
7209                                 ldopts+=("\$lib.dll.lib")
7210                         done
7211                 else
7212                         for lib in \${libs[*]}; do
7213                                 ldopts+=("\$lib.lib")
7214                         done
7215                 fi
7216                 cat <<-EOF
7217                 Creating program
7218                 ** ld options:   "\${ldopts[@]}"
7219 EOF
7220                 exec \$LD \${ldopts[@]}
7221 CF_EOF
7222                 chmod +x mk_prog.sh
7223                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
7224                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
7225                 ;;
7226         (mingw*)
7227                 cf_cv_shlib_version=mingw
7228                 cf_cv_shlib_version_infix=mingw
7229                 shlibdir=$bindir
7230                 MAKE_DLLS=
7231                 if test "$DFT_LWR_MODEL" = "shared" ; then
7232                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
7233                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7234                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
7235                 fi
7236                 CC_SHARED_OPTS=
7237                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
7238                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
7239                 cat >mk_shared_lib.sh <<-CF_EOF
7240                 #!$SHELL
7241                 SHARED_LIB=\$1
7242                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
7243                 shift
7244                 cat <<-EOF
7245                 Linking shared library
7246                 ** SHARED_LIB \$SHARED_LIB
7247                 ** IMPORT_LIB \$IMPORT_LIB
7248 EOF
7249                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
7250 CF_EOF
7251                 chmod +x mk_shared_lib.sh
7252                 ;;
7253         (openbsd[2-9].*|mirbsd*)
7254                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7255                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7256                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7257                 fi
7258                 if test "$cf_cv_enable_rpath" = yes ; then
7259                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7260                 fi
7261                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7262
7263         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7264         if test "$cf_cv_shlib_version" = rel; then
7265                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7266         else
7267                 cf_cv_shared_soname='`basename $@`'
7268         fi
7269
7270                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7271                 ;;
7272         (nskJ*)
7273                 CC_SHARED_OPTS=
7274                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
7275                 ;;
7276         (nskL*)
7277                 CC_SHARED_OPTS=
7278                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
7279                 ;;
7280         (nto-qnx*|openbsd*|freebsd[12].*)
7281                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7282                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
7283                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7284                 ;;
7285         (dragonfly*|freebsd*)
7286                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7287                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7288                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7289                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
7290                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7291                 fi
7292
7293         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7294         if test "$cf_cv_shlib_version" = rel; then
7295                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7296         else
7297                 cf_cv_shared_soname='`basename $@`'
7298         fi
7299
7300                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7301                 ;;
7302         (netbsd*)
7303                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7304                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7305                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7306                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7307                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7308                         if test "$cf_cv_shlib_version" = auto; then
7309                         if test -f /usr/libexec/ld.elf_so; then
7310                                 cf_cv_shlib_version=abi
7311                         else
7312                                 cf_cv_shlib_version=rel
7313                         fi
7314                         fi
7315
7316         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7317         if test "$cf_cv_shlib_version" = rel; then
7318                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7319         else
7320                 cf_cv_shared_soname='`basename $@`'
7321         fi
7322
7323                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7324                 else
7325                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7326                 fi
7327                 ;;
7328         (osf*|mls+*)
7329                 # tested with OSF/1 V3.2 and 'cc'
7330                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7331                 # link with shared libs).
7332                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7333                 case "$host_os" in
7334                 (osf4*)
7335                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7336                         ;;
7337                 esac
7338                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7339                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7340                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7341                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7342                 fi
7343                 cf_cv_rm_so_locs=yes
7344                 ;;
7345         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7346                 # tested with osr5.0.5
7347                 if test "$GCC" != yes; then
7348                         CC_SHARED_OPTS='-belf -KPIC'
7349                 fi
7350                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7351                 if test "$cf_cv_enable_rpath" = yes ; then
7352                         # only way is to set LD_RUN_PATH but no switch for it
7353                         RUN_PATH=$libdir
7354                 fi
7355                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7356                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7357                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7358                 ;;
7359         (sunos4*)
7360                 # tested with SunOS 4.1.1 and gcc 2.7.0
7361                 if test "$GCC" != yes; then
7362                         CC_SHARED_OPTS='-KPIC'
7363                 fi
7364                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7365                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7366                 ;;
7367         (solaris2*)
7368                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7369                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7370                 if test "$DFT_LWR_MODEL" = "shared" ; then
7371                         LOCAL_LDFLAGS="-R\$(LOCAL_LIBDIR):\${libdir}"
7372                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7373                 fi
7374                 if test "$cf_cv_enable_rpath" = yes ; then
7375                         EXTRA_LDFLAGS="-R\${libdir} $EXTRA_LDFLAGS"
7376                 fi
7377
7378         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7379         if test "$cf_cv_shlib_version" = rel; then
7380                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7381         else
7382                 cf_cv_shared_soname='`basename $@`'
7383         fi
7384
7385                 if test "$GCC" != yes; then
7386                         cf_save_CFLAGS="$CFLAGS"
7387                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7388                         do
7389                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7390                                 cat >"conftest.$ac_ext" <<_ACEOF
7391 #line 7391 "configure"
7392 #include "confdefs.h"
7393 #include <stdio.h>
7394 int
7395 main (void)
7396 {
7397 printf("Hello\\n");
7398   ;
7399   return 0;
7400 }
7401 _ACEOF
7402 rm -f "conftest.$ac_objext"
7403 if { (eval echo "$as_me:7403: \"$ac_compile\"") >&5
7404   (eval $ac_compile) 2>&5
7405   ac_status=$?
7406   echo "$as_me:7406: \$? = $ac_status" >&5
7407   (exit "$ac_status"); } &&
7408          { ac_try='test -s "conftest.$ac_objext"'
7409   { (eval echo "$as_me:7409: \"$ac_try\"") >&5
7410   (eval $ac_try) 2>&5
7411   ac_status=$?
7412   echo "$as_me:7412: \$? = $ac_status" >&5
7413   (exit "$ac_status"); }; }; then
7414   break
7415 else
7416   echo "$as_me: failed program was:" >&5
7417 cat "conftest.$ac_ext" >&5
7418 fi
7419 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7420                         done
7421                         CFLAGS="$cf_save_CFLAGS"
7422                         CC_SHARED_OPTS=$cf_shared_opts
7423                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
7424                 else
7425                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -Wl,-h,'$cf_cv_shared_soname' -o $@'
7426                 fi
7427                 ;;
7428         (sysv5uw7*|unix_sv*)
7429                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7430                 if test "$GCC" != yes; then
7431                         CC_SHARED_OPTS='-KPIC'
7432                 fi
7433                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7434                 ;;
7435         (*)
7436                 CC_SHARED_OPTS='unknown'
7437                 MK_SHARED_LIB='echo unknown'
7438                 ;;
7439         esac
7440
7441         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7442         case "$cf_cv_shlib_version" in
7443         (rel|abi)
7444                 case "$MK_SHARED_LIB" in
7445                 (*'-o $@')
7446                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7447                         ;;
7448                 (*)
7449                         { echo "$as_me:7449: WARNING: ignored --with-shlib-version" >&5
7450 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7451                         ;;
7452                 esac
7453                 ;;
7454         esac
7455
7456         if test -n "$cf_try_cflags"
7457         then
7458 cat > conftest.$ac_ext <<EOF
7459 #line 7459 "${as_me:-configure}"
7460 #include <stdio.h>
7461 int main(int argc, char *argv[])
7462 {
7463         printf("hello\\n");
7464         return (argv[argc-1] == 0) ;
7465 }
7466 EOF
7467                 cf_save_CFLAGS="$CFLAGS"
7468                 for cf_opt in $cf_try_cflags
7469                 do
7470                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7471                         echo "$as_me:7471: checking if CFLAGS option -$cf_opt works" >&5
7472 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7473                         if { (eval echo "$as_me:7473: \"$ac_compile\"") >&5
7474   (eval $ac_compile) 2>&5
7475   ac_status=$?
7476   echo "$as_me:7476: \$? = $ac_status" >&5
7477   (exit "$ac_status"); }; then
7478                                 echo "$as_me:7478: result: yes" >&5
7479 echo "${ECHO_T}yes" >&6
7480                                 cf_save_CFLAGS="$CFLAGS"
7481                         else
7482                                 echo "$as_me:7482: result: no" >&5
7483 echo "${ECHO_T}no" >&6
7484                         fi
7485                 done
7486                 CFLAGS="$cf_save_CFLAGS"
7487         fi
7488
7489         # RPATH_LIST is a colon-separated list of directories
7490         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7491         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7492
7493         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7494
7495         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7496
7497 echo "${as_me:-configure}:7497: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7498
7499         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7500
7501 echo "${as_me:-configure}:7501: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7502
7503 for model in $cf_list_models ; do
7504         case "$model" in
7505         (libtool)
7506
7507 echo "$as_me:7507: checking for additional libtool options" >&5
7508 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7509
7510 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7511 if test "${with_libtool_opts+set}" = set; then
7512   withval="$with_libtool_opts"
7513   with_libtool_opts=$withval
7514 else
7515   with_libtool_opts=no
7516 fi;
7517 echo "$as_me:7517: result: $with_libtool_opts" >&5
7518 echo "${ECHO_T}$with_libtool_opts" >&6
7519
7520 case .$with_libtool_opts in
7521 (.yes|.no|.)
7522         ;;
7523 (*)
7524         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7525         ;;
7526 esac
7527
7528 echo "$as_me:7528: checking if exported-symbols file should be used" >&5
7529 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7530
7531 # Check whether --with-export-syms or --without-export-syms was given.
7532 if test "${with_export_syms+set}" = set; then
7533   withval="$with_export_syms"
7534   with_export_syms=$withval
7535 else
7536   with_export_syms=no
7537 fi;
7538 if test "x$with_export_syms" = xyes
7539 then
7540         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7541
7542 fi
7543 echo "$as_me:7543: result: $with_export_syms" >&5
7544 echo "${ECHO_T}$with_export_syms" >&6
7545 if test "x$with_export_syms" != xno
7546 then
7547         EXPORT_SYMS="-export-symbols $with_export_syms"
7548
7549 fi
7550
7551                 ;;
7552         (shared)
7553                 if test "$CC_SHARED_OPTS" = "unknown"; then
7554                         { { echo "$as_me:7554: error: Shared libraries are not supported in this version" >&5
7555 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7556    { (exit 1); exit 1; }; }
7557                 fi
7558                 # workaround for inept transition to PIE vs PIC...
7559                 echo "$as_me:7559: checking if current CFLAGS link properly" >&5
7560 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7561                 cat >"conftest.$ac_ext" <<_ACEOF
7562 #line 7562 "configure"
7563 #include "confdefs.h"
7564 #include <stdio.h>
7565 int
7566 main (void)
7567 {
7568 printf("Hello work\\n");
7569   ;
7570   return 0;
7571 }
7572 _ACEOF
7573 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7574 if { (eval echo "$as_me:7574: \"$ac_link\"") >&5
7575   (eval $ac_link) 2>&5
7576   ac_status=$?
7577   echo "$as_me:7577: \$? = $ac_status" >&5
7578   (exit "$ac_status"); } &&
7579          { ac_try='test -s "conftest$ac_exeext"'
7580   { (eval echo "$as_me:7580: \"$ac_try\"") >&5
7581   (eval $ac_try) 2>&5
7582   ac_status=$?
7583   echo "$as_me:7583: \$? = $ac_status" >&5
7584   (exit "$ac_status"); }; }; then
7585   cf_cflags_work=yes
7586 else
7587   echo "$as_me: failed program was:" >&5
7588 cat "conftest.$ac_ext" >&5
7589 cf_cflags_work=no
7590 fi
7591 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7592                 echo "$as_me:7592: result: $cf_cflags_work" >&5
7593 echo "${ECHO_T}$cf_cflags_work" >&6
7594                 if test "$cf_cflags_work" = no
7595                 then
7596                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7597
7598 echo "${as_me:-configure}:7598: testing try to work around by appending shared-options ..." 1>&5
7599
7600                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7601                 fi
7602
7603 echo "$as_me:7603: checking if versioned-symbols file should be used" >&5
7604 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7605
7606 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7607 if test "${with_versioned_syms+set}" = set; then
7608   withval="$with_versioned_syms"
7609   with_versioned_syms=$withval
7610 else
7611   with_versioned_syms=no
7612 fi;
7613 case "x$with_versioned_syms" in
7614 (xyes)
7615         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7616
7617         ;;
7618 (xno)
7619         ;;
7620 (x/*)
7621         test -f "$with_versioned_syms" || { { echo "$as_me:7621: error: expected a filename: $with_versioned_syms" >&5
7622 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7623    { (exit 1); exit 1; }; }
7624         ;;
7625 (*)
7626         test -f "$with_versioned_syms" || { { echo "$as_me:7626: error: expected a filename: $with_versioned_syms" >&5
7627 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7628    { (exit 1); exit 1; }; }
7629         with_versioned_syms=`pwd`/"$with_versioned_syms"
7630         ;;
7631 esac
7632 echo "$as_me:7632: result: $with_versioned_syms" >&5
7633 echo "${ECHO_T}$with_versioned_syms" >&6
7634
7635 RESULTING_SYMS=
7636 VERSIONED_SYMS=
7637 WILDCARD_SYMS=
7638
7639 if test "x$with_versioned_syms" != xno
7640 then
7641         RESULTING_SYMS=$with_versioned_syms
7642         case "x$MK_SHARED_LIB" in
7643         (*-Wl,*)
7644                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7645                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7646                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7647
7648 echo "${as_me:-configure}:7648: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7649
7650                 ;;
7651         (*-dy\ *)
7652                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7653                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7654                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7655
7656 echo "${as_me:-configure}:7656: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7657
7658                 ;;
7659         (*)
7660                 { echo "$as_me:7660: WARNING: this system does not support versioned-symbols" >&5
7661 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7662                 ;;
7663         esac
7664
7665         # Linux ld can selectively override scope, e.g., of symbols beginning with
7666         # "_" by first declaring some as global, and then using a wildcard to
7667         # declare the others as local.  Some other loaders cannot do this.  Check
7668         # by constructing a (very) simple shared library and inspecting its
7669         # symbols.
7670         if test "x$VERSIONED_SYMS" != "x"
7671         then
7672                 echo "$as_me:7672: checking if wildcards can be used to selectively omit symbols" >&5
7673 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7674                 WILDCARD_SYMS=no
7675
7676                 # make sources
7677                 rm -f conftest.*
7678
7679                 cat >conftest.ver <<EOF
7680 module_1.0 {
7681 global:
7682         globalf1;
7683 local:
7684         localf1;
7685 };
7686 module_2.0 {
7687 global:
7688         globalf2;
7689 local:
7690         localf2;
7691         _*;
7692 } module_1.0;
7693 submodule_1.0 {
7694 global:
7695         subglobalf1;
7696         _ismissing;
7697 local:
7698         sublocalf1;
7699 };
7700 submodule_2.0 {
7701 global:
7702         subglobalf2;
7703 local:
7704         sublocalf2;
7705         _*;
7706 } submodule_1.0;
7707 EOF
7708                 cat >conftest.$ac_ext <<EOF
7709 #line 7709 "configure"
7710 extern int _ismissing(void);    int _ismissing(void)  { return 1; }
7711 extern int _localf1(void);      int _localf1(void)    { return 1; }
7712 extern int _localf2(void);      int _localf2(void)    { return 2; }
7713 extern int globalf1(void);      int globalf1(void)    { return 1; }
7714 extern int globalf2(void);      int globalf2(void)    { return 2; }
7715 extern int _sublocalf1(void);   int _sublocalf1(void) { return 1; }
7716 extern int _sublocalf2(void);   int _sublocalf2(void) { return 2; }
7717 extern int subglobalf1(void);   int subglobalf1(void) { return 1; }
7718 extern int subglobalf2(void);   int subglobalf2(void) { return 2; }
7719 EOF
7720                 cat >conftest.mk <<EOF
7721 CC=${CC}
7722 CFLAGS=${CFLAGS}
7723 CPPFLAGS=${CPPFLAGS}
7724 LDFLAGS=${LDFLAGS}
7725 LIBS=${LIBS}
7726 VERSIONED_SYMS=${VERSIONED_SYMS}
7727 RESULTING_SYMS=conftest.ver
7728 MK_SHARED_LIB=${MK_SHARED_LIB}
7729 conftest.so: conftest.$ac_cv_objext
7730                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7731 EOF
7732
7733                 # compile source, make library
7734                 if make -f conftest.mk 2>&5 >/dev/null
7735                 then
7736                         # test for missing symbol in either Data or Text section
7737                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7738                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7739                 fi
7740                 echo "$as_me:7740: result: $WILDCARD_SYMS" >&5
7741 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7742                 rm -f conftest.*
7743         fi
7744 fi
7745
7746                 ;;
7747         esac
7748 done
7749
7750 ### Checks for special libraries, must be done up-front.
7751 SHLIB_LIST=""
7752
7753 echo "$as_me:7753: checking if you want to link with the GPM mouse library" >&5
7754 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7755
7756 # Check whether --with-gpm or --without-gpm was given.
7757 if test "${with_gpm+set}" = set; then
7758   withval="$with_gpm"
7759   with_gpm=$withval
7760 else
7761   with_gpm=maybe
7762 fi;
7763 echo "$as_me:7763: result: $with_gpm" >&5
7764 echo "${ECHO_T}$with_gpm" >&6
7765
7766 if test "$with_gpm" != no ; then
7767         echo "$as_me:7767: checking for gpm.h" >&5
7768 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7769 if test "${ac_cv_header_gpm_h+set}" = set; then
7770   echo $ECHO_N "(cached) $ECHO_C" >&6
7771 else
7772   cat >"conftest.$ac_ext" <<_ACEOF
7773 #line 7773 "configure"
7774 #include "confdefs.h"
7775 #include <gpm.h>
7776 _ACEOF
7777 if { (eval echo "$as_me:7777: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7778   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7779   ac_status=$?
7780   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7781   rm -f conftest.er1
7782   cat conftest.err >&5
7783   echo "$as_me:7783: \$? = $ac_status" >&5
7784   (exit "$ac_status"); } >/dev/null; then
7785   if test -s conftest.err; then
7786     ac_cpp_err=$ac_c_preproc_warn_flag
7787   else
7788     ac_cpp_err=
7789   fi
7790 else
7791   ac_cpp_err=yes
7792 fi
7793 if test -z "$ac_cpp_err"; then
7794   ac_cv_header_gpm_h=yes
7795 else
7796   echo "$as_me: failed program was:" >&5
7797   cat "conftest.$ac_ext" >&5
7798   ac_cv_header_gpm_h=no
7799 fi
7800 rm -f conftest.err "conftest.$ac_ext"
7801 fi
7802 echo "$as_me:7802: result: $ac_cv_header_gpm_h" >&5
7803 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7804 if test "$ac_cv_header_gpm_h" = yes; then
7805
7806 cat >>confdefs.h <<\EOF
7807 #define HAVE_GPM_H 1
7808 EOF
7809
7810                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7811                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7812
7813 echo "${as_me:-configure}:7813: testing assuming we really have GPM library ..." 1>&5
7814
7815 cat >>confdefs.h <<\EOF
7816 #define HAVE_LIBGPM 1
7817 EOF
7818
7819                         with_gpm=yes
7820                 else
7821                         echo "$as_me:7821: checking for Gpm_Open in -lgpm" >&5
7822 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7823 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7824   echo $ECHO_N "(cached) $ECHO_C" >&6
7825 else
7826   ac_check_lib_save_LIBS=$LIBS
7827 LIBS="-lgpm  $LIBS"
7828 cat >"conftest.$ac_ext" <<_ACEOF
7829 #line 7829 "configure"
7830 #include "confdefs.h"
7831
7832 /* Override any gcc2 internal prototype to avoid an error.  */
7833 #ifdef __cplusplus
7834 extern "C"
7835 #endif
7836 /* We use char because int might match the return type of a gcc2
7837    builtin and then its argument prototype would still apply.  */
7838 char Gpm_Open (void);
7839 int
7840 main (void)
7841 {
7842 Gpm_Open ();
7843   ;
7844   return 0;
7845 }
7846 _ACEOF
7847 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7848 if { (eval echo "$as_me:7848: \"$ac_link\"") >&5
7849   (eval $ac_link) 2>&5
7850   ac_status=$?
7851   echo "$as_me:7851: \$? = $ac_status" >&5
7852   (exit "$ac_status"); } &&
7853          { ac_try='test -s "conftest$ac_exeext"'
7854   { (eval echo "$as_me:7854: \"$ac_try\"") >&5
7855   (eval $ac_try) 2>&5
7856   ac_status=$?
7857   echo "$as_me:7857: \$? = $ac_status" >&5
7858   (exit "$ac_status"); }; }; then
7859   ac_cv_lib_gpm_Gpm_Open=yes
7860 else
7861   echo "$as_me: failed program was:" >&5
7862 cat "conftest.$ac_ext" >&5
7863 ac_cv_lib_gpm_Gpm_Open=no
7864 fi
7865 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7866 LIBS=$ac_check_lib_save_LIBS
7867 fi
7868 echo "$as_me:7868: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7869 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7870 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7871   with_gpm=yes
7872 else
7873
7874                                 if test "$with_gpm" = maybe; then
7875                                         { echo "$as_me:7875: WARNING: Cannot link with GPM library" >&5
7876 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7877                                         with_gpm=no
7878                                 else
7879                                         { { echo "$as_me:7879: error: Cannot link with GPM library" >&5
7880 echo "$as_me: error: Cannot link with GPM library" >&2;}
7881    { (exit 1); exit 1; }; }
7882                                 fi
7883
7884 fi
7885
7886                 fi
7887
7888 else
7889
7890                 test "$with_gpm" != maybe && { echo "$as_me:7890: WARNING: Cannot find GPM header" >&5
7891 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7892                 with_gpm=no
7893
7894 fi
7895
7896 fi
7897
7898 if test "$with_gpm" != no ; then
7899         echo "$as_me:7899: checking if you want to load GPM dynamically" >&5
7900 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7901
7902 # Check whether --with-dlsym or --without-dlsym was given.
7903 if test "${with_dlsym+set}" = set; then
7904   withval="$with_dlsym"
7905   with_dlsym=$withval
7906 else
7907   with_dlsym=yes
7908 fi;
7909         echo "$as_me:7909: result: $with_dlsym" >&5
7910 echo "${ECHO_T}$with_dlsym" >&6
7911         if test "x$with_dlsym" = xyes ; then
7912
7913 cf_have_dlsym=no
7914 echo "$as_me:7914: checking for dlsym" >&5
7915 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7916 if test "${ac_cv_func_dlsym+set}" = set; then
7917   echo $ECHO_N "(cached) $ECHO_C" >&6
7918 else
7919   cat >"conftest.$ac_ext" <<_ACEOF
7920 #line 7920 "configure"
7921 #include "confdefs.h"
7922 #define dlsym autoconf_temporary
7923 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7924 #undef dlsym
7925
7926 #ifdef __cplusplus
7927 extern "C"
7928 #endif
7929
7930 /* We use char because int might match the return type of a gcc2
7931    builtin and then its argument prototype would still apply.  */
7932 char dlsym (void);
7933
7934 int
7935 main (void)
7936 {
7937
7938 /* The GNU C library defines stubs for functions which it implements
7939     to always fail with ENOSYS.  Some functions are actually named
7940     something starting with __ and the normal name is an alias.  */
7941 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7942 #error found stub for dlsym
7943 #endif
7944
7945         return dlsym ();
7946   ;
7947   return 0;
7948 }
7949 _ACEOF
7950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7951 if { (eval echo "$as_me:7951: \"$ac_link\"") >&5
7952   (eval $ac_link) 2>&5
7953   ac_status=$?
7954   echo "$as_me:7954: \$? = $ac_status" >&5
7955   (exit "$ac_status"); } &&
7956          { ac_try='test -s "conftest$ac_exeext"'
7957   { (eval echo "$as_me:7957: \"$ac_try\"") >&5
7958   (eval $ac_try) 2>&5
7959   ac_status=$?
7960   echo "$as_me:7960: \$? = $ac_status" >&5
7961   (exit "$ac_status"); }; }; then
7962   ac_cv_func_dlsym=yes
7963 else
7964   echo "$as_me: failed program was:" >&5
7965 cat "conftest.$ac_ext" >&5
7966 ac_cv_func_dlsym=no
7967 fi
7968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7969 fi
7970 echo "$as_me:7970: result: $ac_cv_func_dlsym" >&5
7971 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7972 if test "$ac_cv_func_dlsym" = yes; then
7973   cf_have_dlsym=yes
7974 else
7975
7976 cf_have_libdl=no
7977 echo "$as_me:7977: checking for dlsym in -ldl" >&5
7978 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7979 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7980   echo $ECHO_N "(cached) $ECHO_C" >&6
7981 else
7982   ac_check_lib_save_LIBS=$LIBS
7983 LIBS="-ldl  $LIBS"
7984 cat >"conftest.$ac_ext" <<_ACEOF
7985 #line 7985 "configure"
7986 #include "confdefs.h"
7987
7988 /* Override any gcc2 internal prototype to avoid an error.  */
7989 #ifdef __cplusplus
7990 extern "C"
7991 #endif
7992 /* We use char because int might match the return type of a gcc2
7993    builtin and then its argument prototype would still apply.  */
7994 char dlsym (void);
7995 int
7996 main (void)
7997 {
7998 dlsym ();
7999   ;
8000   return 0;
8001 }
8002 _ACEOF
8003 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8004 if { (eval echo "$as_me:8004: \"$ac_link\"") >&5
8005   (eval $ac_link) 2>&5
8006   ac_status=$?
8007   echo "$as_me:8007: \$? = $ac_status" >&5
8008   (exit "$ac_status"); } &&
8009          { ac_try='test -s "conftest$ac_exeext"'
8010   { (eval echo "$as_me:8010: \"$ac_try\"") >&5
8011   (eval $ac_try) 2>&5
8012   ac_status=$?
8013   echo "$as_me:8013: \$? = $ac_status" >&5
8014   (exit "$ac_status"); }; }; then
8015   ac_cv_lib_dl_dlsym=yes
8016 else
8017   echo "$as_me: failed program was:" >&5
8018 cat "conftest.$ac_ext" >&5
8019 ac_cv_lib_dl_dlsym=no
8020 fi
8021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8022 LIBS=$ac_check_lib_save_LIBS
8023 fi
8024 echo "$as_me:8024: result: $ac_cv_lib_dl_dlsym" >&5
8025 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
8026 if test "$ac_cv_lib_dl_dlsym" = yes; then
8027
8028         cf_have_dlsym=yes
8029         cf_have_libdl=yes
8030 fi
8031
8032 fi
8033
8034 if test "$cf_have_dlsym" = yes ; then
8035         test "$cf_have_libdl" = yes && {
8036 cf_add_libs="$LIBS"
8037 # reverse order
8038 cf_add_0lib=
8039 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8040 # filter duplicates
8041 for cf_add_1lib in $cf_add_0lib; do
8042         for cf_add_2lib in $cf_add_libs; do
8043                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8044                         cf_add_1lib=
8045                         break
8046                 fi
8047         done
8048         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8049 done
8050 LIBS="$cf_add_libs"
8051  }
8052
8053         echo "$as_me:8053: checking whether able to link to dl*() functions" >&5
8054 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
8055         cat >"conftest.$ac_ext" <<_ACEOF
8056 #line 8056 "configure"
8057 #include "confdefs.h"
8058 #include <dlfcn.h>
8059 int
8060 main (void)
8061 {
8062
8063                 void *obj;
8064                 if ((obj = dlopen("filename", 0)) != 0) {
8065                         if (dlsym(obj, "symbolname") == 0) {
8066                         dlclose(obj);
8067                         }
8068                 }
8069   ;
8070   return 0;
8071 }
8072 _ACEOF
8073 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8074 if { (eval echo "$as_me:8074: \"$ac_link\"") >&5
8075   (eval $ac_link) 2>&5
8076   ac_status=$?
8077   echo "$as_me:8077: \$? = $ac_status" >&5
8078   (exit "$ac_status"); } &&
8079          { ac_try='test -s "conftest$ac_exeext"'
8080   { (eval echo "$as_me:8080: \"$ac_try\"") >&5
8081   (eval $ac_try) 2>&5
8082   ac_status=$?
8083   echo "$as_me:8083: \$? = $ac_status" >&5
8084   (exit "$ac_status"); }; }; then
8085
8086 cat >>confdefs.h <<\EOF
8087 #define HAVE_LIBDL 1
8088 EOF
8089
8090 else
8091   echo "$as_me: failed program was:" >&5
8092 cat "conftest.$ac_ext" >&5
8093
8094                 { { echo "$as_me:8094: error: Cannot link test program for libdl" >&5
8095 echo "$as_me: error: Cannot link test program for libdl" >&2;}
8096    { (exit 1); exit 1; }; }
8097 fi
8098 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8099         echo "$as_me:8099: result: ok" >&5
8100 echo "${ECHO_T}ok" >&6
8101 else
8102         { { echo "$as_me:8102: error: Cannot find dlsym function" >&5
8103 echo "$as_me: error: Cannot find dlsym function" >&2;}
8104    { (exit 1); exit 1; }; }
8105 fi
8106
8107                 if test "x$with_gpm" != xyes ; then
8108                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
8109
8110 echo "${as_me:-configure}:8110: testing assuming soname for gpm is $with_gpm ..." 1>&5
8111
8112                         cf_cv_gpm_soname="$with_gpm"
8113                 else
8114
8115 echo "$as_me:8115: checking for soname of gpm library" >&5
8116 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
8117 if test "${cf_cv_gpm_soname+set}" = set; then
8118   echo $ECHO_N "(cached) $ECHO_C" >&6
8119 else
8120
8121 cf_cv_gpm_soname=unknown
8122 if test "$cross_compiling" != yes ; then
8123 cat >conftest.$ac_ext <<CF_EOF
8124 #include <gpm.h>
8125 int main(void)
8126 {
8127 if (Gpm_Open(0,0)) Gpm_Close();
8128         ${cf_cv_main_return:-return}(0);
8129 }
8130 CF_EOF
8131 cf_save_LIBS="$LIBS"
8132
8133 cf_add_libs="$LIBS"
8134 # reverse order
8135 cf_add_0lib=
8136 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8137 # filter duplicates
8138 for cf_add_1lib in $cf_add_0lib; do
8139         for cf_add_2lib in $cf_add_libs; do
8140                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8141                         cf_add_1lib=
8142                         break
8143                 fi
8144         done
8145         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8146 done
8147 LIBS="$cf_add_libs"
8148
8149         if { (eval echo "$as_me:8149: \"$ac_compile\"") >&5
8150   (eval $ac_compile) 2>&5
8151   ac_status=$?
8152   echo "$as_me:8152: \$? = $ac_status" >&5
8153   (exit "$ac_status"); } ; then
8154                 if { (eval echo "$as_me:8154: \"$ac_link\"") >&5
8155   (eval $ac_link) 2>&5
8156   ac_status=$?
8157   echo "$as_me:8157: \$? = $ac_status" >&5
8158   (exit "$ac_status"); } ; then
8159                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
8160                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
8161                 fi
8162         fi
8163 rm -rf ./conftest*
8164 LIBS="$cf_save_LIBS"
8165 fi
8166
8167 fi
8168 echo "$as_me:8168: result: $cf_cv_gpm_soname" >&5
8169 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
8170
8171                 fi
8172                 test "$cf_cv_gpm_soname" != "unknown" &&
8173 cat >>confdefs.h <<EOF
8174 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
8175 EOF
8176
8177                 SHLIB_LIST="-ldl $SHLIB_LIST"
8178
8179 cf_add_libs="$PRIVATE_LIBS"
8180 # reverse order
8181 cf_add_0lib=
8182 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8183 # filter duplicates
8184 for cf_add_1lib in $cf_add_0lib; do
8185         for cf_add_2lib in $cf_add_libs; do
8186                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8187                         cf_add_1lib=
8188                         break
8189                 fi
8190         done
8191         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8192 done
8193 PRIVATE_LIBS="$cf_add_libs"
8194
8195         else
8196                 SHLIB_LIST="-lgpm $SHLIB_LIST"
8197
8198 cf_add_libs="$TEST_LIBS"
8199 # reverse order
8200 cf_add_0lib=
8201 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8202 # filter duplicates
8203 for cf_add_1lib in $cf_add_0lib; do
8204         for cf_add_2lib in $cf_add_libs; do
8205                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8206                         cf_add_1lib=
8207                         break
8208                 fi
8209         done
8210         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8211 done
8212 TEST_LIBS="$cf_add_libs"
8213
8214 cf_add_libs="$PRIVATE_LIBS"
8215 # reverse order
8216 cf_add_0lib=
8217 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8218 # filter duplicates
8219 for cf_add_1lib in $cf_add_0lib; do
8220         for cf_add_2lib in $cf_add_libs; do
8221                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8222                         cf_add_1lib=
8223                         break
8224                 fi
8225         done
8226         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8227 done
8228 PRIVATE_LIBS="$cf_add_libs"
8229
8230         fi
8231
8232 cat >>confdefs.h <<\EOF
8233 #define HAVE_LIBGPM 1
8234 EOF
8235
8236 echo "$as_me:8236: checking for Gpm_Wgetch in -lgpm" >&5
8237 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
8238 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
8239   echo $ECHO_N "(cached) $ECHO_C" >&6
8240 else
8241   ac_check_lib_save_LIBS=$LIBS
8242 LIBS="-lgpm  $LIBS"
8243 cat >"conftest.$ac_ext" <<_ACEOF
8244 #line 8244 "configure"
8245 #include "confdefs.h"
8246
8247 /* Override any gcc2 internal prototype to avoid an error.  */
8248 #ifdef __cplusplus
8249 extern "C"
8250 #endif
8251 /* We use char because int might match the return type of a gcc2
8252    builtin and then its argument prototype would still apply.  */
8253 char Gpm_Wgetch (void);
8254 int
8255 main (void)
8256 {
8257 Gpm_Wgetch ();
8258   ;
8259   return 0;
8260 }
8261 _ACEOF
8262 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8263 if { (eval echo "$as_me:8263: \"$ac_link\"") >&5
8264   (eval $ac_link) 2>&5
8265   ac_status=$?
8266   echo "$as_me:8266: \$? = $ac_status" >&5
8267   (exit "$ac_status"); } &&
8268          { ac_try='test -s "conftest$ac_exeext"'
8269   { (eval echo "$as_me:8269: \"$ac_try\"") >&5
8270   (eval $ac_try) 2>&5
8271   ac_status=$?
8272   echo "$as_me:8272: \$? = $ac_status" >&5
8273   (exit "$ac_status"); }; }; then
8274   ac_cv_lib_gpm_Gpm_Wgetch=yes
8275 else
8276   echo "$as_me: failed program was:" >&5
8277 cat "conftest.$ac_ext" >&5
8278 ac_cv_lib_gpm_Gpm_Wgetch=no
8279 fi
8280 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8281 LIBS=$ac_check_lib_save_LIBS
8282 fi
8283 echo "$as_me:8283: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
8284 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
8285 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
8286
8287 echo "$as_me:8287: checking if GPM is weakly bound to curses library" >&5
8288 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
8289 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
8290   echo $ECHO_N "(cached) $ECHO_C" >&6
8291 else
8292
8293 cf_cv_check_gpm_wgetch=unknown
8294 if test "$cross_compiling" != yes ; then
8295
8296 cat >conftest.$ac_ext <<CF_EOF
8297 #include <gpm.h>
8298 int main(void)
8299 {
8300         Gpm_Wgetch();
8301         ${cf_cv_main_return:-return}(0);
8302 }
8303 CF_EOF
8304
8305         cf_save_LIBS="$LIBS"
8306         # This only works if we can look at the symbol table.  If a shared
8307         # library is stripped for install, we cannot use that.  So we're forced
8308         # to rely on the static library, noting that some packagers may not
8309         # include it.
8310         LIBS="-static -lgpm -dynamic $LIBS"
8311         if { (eval echo "$as_me:8311: \"$ac_compile\"") >&5
8312   (eval $ac_compile) 2>&5
8313   ac_status=$?
8314   echo "$as_me:8314: \$? = $ac_status" >&5
8315   (exit "$ac_status"); } ; then
8316                 if { (eval echo "$as_me:8316: \"$ac_link\"") >&5
8317   (eval $ac_link) 2>&5
8318   ac_status=$?
8319   echo "$as_me:8319: \$? = $ac_status" >&5
8320   (exit "$ac_status"); } ; then
8321                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8322                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8323                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8324                 fi
8325         fi
8326         rm -rf ./conftest*
8327         LIBS="$cf_save_LIBS"
8328 fi
8329
8330 fi
8331 echo "$as_me:8331: result: $cf_cv_check_gpm_wgetch" >&5
8332 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8333
8334 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8335         { echo "$as_me:8335: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8336 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8337 fi
8338
8339 fi
8340
8341 fi
8342
8343 echo "$as_me:8343: checking if you want to use PCRE2 for regular-expressions" >&5
8344 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8345
8346 # Check whether --with-pcre2 or --without-pcre2 was given.
8347 if test "${with_pcre2+set}" = set; then
8348   withval="$with_pcre2"
8349
8350 fi;
8351 test -z "$with_pcre2" && with_pcre2=no
8352 echo "$as_me:8352: result: $with_pcre2" >&5
8353 echo "${ECHO_T}$with_pcre2" >&6
8354
8355 if test "x$with_pcre2" != xno ; then
8356         cf_with_pcre2_ok=no
8357         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8358         do
8359
8360 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8361         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8362
8363 echo "${as_me:-configure}:8363: testing found package $cf_with_pcre2 ..." 1>&5
8364
8365         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8366         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8367         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8368
8369 echo "${as_me:-configure}:8369: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8370
8371         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8372
8373 echo "${as_me:-configure}:8373: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8374
8375 cf_fix_cppflags=no
8376 cf_new_cflags=
8377 cf_new_cppflags=
8378 cf_new_extra_cppflags=
8379
8380 for cf_add_cflags in $cf_pkgconfig_incs
8381 do
8382 case "$cf_fix_cppflags" in
8383 (no)
8384         case "$cf_add_cflags" in
8385         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8386                 case "$cf_add_cflags" in
8387                 (-D*)
8388                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8389
8390                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8391                                 && test -z "${cf_tst_cflags}" \
8392                                 && cf_fix_cppflags=yes
8393
8394                         if test "$cf_fix_cppflags" = yes ; then
8395
8396         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8397         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8398
8399                                 continue
8400                         elif test "${cf_tst_cflags}" = "\"'" ; then
8401
8402         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8403         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8404
8405                                 continue
8406                         fi
8407                         ;;
8408                 esac
8409                 case "$CPPFLAGS" in
8410                 (*$cf_add_cflags)
8411                         ;;
8412                 (*)
8413                         case "$cf_add_cflags" in
8414                         (-D*)
8415                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8416
8417 CPPFLAGS=`echo "$CPPFLAGS" | \
8418         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8419                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8420
8421                                 ;;
8422                         esac
8423
8424         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8425         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8426
8427                         ;;
8428                 esac
8429                 ;;
8430         (*)
8431
8432         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8433         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8434
8435                 ;;
8436         esac
8437         ;;
8438 (yes)
8439
8440         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8441         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8442
8443         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8444
8445         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8446                 && test -z "${cf_tst_cflags}" \
8447                 && cf_fix_cppflags=no
8448         ;;
8449 esac
8450 done
8451
8452 if test -n "$cf_new_cflags" ; then
8453
8454         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8455         CFLAGS="${CFLAGS}$cf_new_cflags"
8456
8457 fi
8458
8459 if test -n "$cf_new_cppflags" ; then
8460
8461         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8462         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8463
8464 fi
8465
8466 if test -n "$cf_new_extra_cppflags" ; then
8467
8468         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8469         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8470
8471 fi
8472
8473 cf_add_libs="$LIBS"
8474 # reverse order
8475 cf_add_0lib=
8476 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8477 # filter duplicates
8478 for cf_add_1lib in $cf_add_0lib; do
8479         for cf_add_2lib in $cf_add_libs; do
8480                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8481                         cf_add_1lib=
8482                         break
8483                 fi
8484         done
8485         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8486 done
8487 LIBS="$cf_add_libs"
8488
8489         cf_with_pcre2_ok=yes; break
8490 else
8491         cf_pkgconfig_incs=
8492         cf_pkgconfig_libs=
8493         :
8494 fi
8495
8496         done
8497         cf_with_pcre2_ok=yes || { { echo "$as_me:8497: error: Cannot find PCRE2 library" >&5
8498 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8499    { (exit 1); exit 1; }; }
8500
8501 cat >>confdefs.h <<\EOF
8502 #define HAVE_LIB_PCRE2 1
8503 EOF
8504
8505         # if pkgconfig gave no results, look for the libraries directly
8506         case "$LIBS" in
8507         (*pcre2-posix*|*pcreposix*)
8508                 ;;
8509         (*)
8510                 echo "$as_me:8510: checking for regcomp in -lpcre2-posix" >&5
8511 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8512 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8513   echo $ECHO_N "(cached) $ECHO_C" >&6
8514 else
8515   ac_check_lib_save_LIBS=$LIBS
8516 LIBS="-lpcre2-posix  $LIBS"
8517 cat >"conftest.$ac_ext" <<_ACEOF
8518 #line 8518 "configure"
8519 #include "confdefs.h"
8520
8521 /* Override any gcc2 internal prototype to avoid an error.  */
8522 #ifdef __cplusplus
8523 extern "C"
8524 #endif
8525 /* We use char because int might match the return type of a gcc2
8526    builtin and then its argument prototype would still apply.  */
8527 char regcomp (void);
8528 int
8529 main (void)
8530 {
8531 regcomp ();
8532   ;
8533   return 0;
8534 }
8535 _ACEOF
8536 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8537 if { (eval echo "$as_me:8537: \"$ac_link\"") >&5
8538   (eval $ac_link) 2>&5
8539   ac_status=$?
8540   echo "$as_me:8540: \$? = $ac_status" >&5
8541   (exit "$ac_status"); } &&
8542          { ac_try='test -s "conftest$ac_exeext"'
8543   { (eval echo "$as_me:8543: \"$ac_try\"") >&5
8544   (eval $ac_try) 2>&5
8545   ac_status=$?
8546   echo "$as_me:8546: \$? = $ac_status" >&5
8547   (exit "$ac_status"); }; }; then
8548   ac_cv_lib_pcre2_posix_regcomp=yes
8549 else
8550   echo "$as_me: failed program was:" >&5
8551 cat "conftest.$ac_ext" >&5
8552 ac_cv_lib_pcre2_posix_regcomp=no
8553 fi
8554 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8555 LIBS=$ac_check_lib_save_LIBS
8556 fi
8557 echo "$as_me:8557: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8558 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8559 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8560
8561 cf_add_libs="$LIBS"
8562 # reverse order
8563 cf_add_0lib=
8564 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8565 # filter duplicates
8566 for cf_add_1lib in $cf_add_0lib; do
8567         for cf_add_2lib in $cf_add_libs; do
8568                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8569                         cf_add_1lib=
8570                         break
8571                 fi
8572         done
8573         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8574 done
8575 LIBS="$cf_add_libs"
8576
8577 else
8578   echo "$as_me:8578: checking for regcomp in -lpcreposix" >&5
8579 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8580 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8581   echo $ECHO_N "(cached) $ECHO_C" >&6
8582 else
8583   ac_check_lib_save_LIBS=$LIBS
8584 LIBS="-lpcreposix  $LIBS"
8585 cat >"conftest.$ac_ext" <<_ACEOF
8586 #line 8586 "configure"
8587 #include "confdefs.h"
8588
8589 /* Override any gcc2 internal prototype to avoid an error.  */
8590 #ifdef __cplusplus
8591 extern "C"
8592 #endif
8593 /* We use char because int might match the return type of a gcc2
8594    builtin and then its argument prototype would still apply.  */
8595 char regcomp (void);
8596 int
8597 main (void)
8598 {
8599 regcomp ();
8600   ;
8601   return 0;
8602 }
8603 _ACEOF
8604 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8605 if { (eval echo "$as_me:8605: \"$ac_link\"") >&5
8606   (eval $ac_link) 2>&5
8607   ac_status=$?
8608   echo "$as_me:8608: \$? = $ac_status" >&5
8609   (exit "$ac_status"); } &&
8610          { ac_try='test -s "conftest$ac_exeext"'
8611   { (eval echo "$as_me:8611: \"$ac_try\"") >&5
8612   (eval $ac_try) 2>&5
8613   ac_status=$?
8614   echo "$as_me:8614: \$? = $ac_status" >&5
8615   (exit "$ac_status"); }; }; then
8616   ac_cv_lib_pcreposix_regcomp=yes
8617 else
8618   echo "$as_me: failed program was:" >&5
8619 cat "conftest.$ac_ext" >&5
8620 ac_cv_lib_pcreposix_regcomp=no
8621 fi
8622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8623 LIBS=$ac_check_lib_save_LIBS
8624 fi
8625 echo "$as_me:8625: result: $ac_cv_lib_pcreposix_regcomp" >&5
8626 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8627 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8628
8629 cf_add_libs="$LIBS"
8630 # reverse order
8631 cf_add_0lib=
8632 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8633 # filter duplicates
8634 for cf_add_1lib in $cf_add_0lib; do
8635         for cf_add_2lib in $cf_add_libs; do
8636                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8637                         cf_add_1lib=
8638                         break
8639                 fi
8640         done
8641         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8642 done
8643 LIBS="$cf_add_libs"
8644
8645 else
8646   { { echo "$as_me:8646: error: Cannot find PCRE2 POSIX library" >&5
8647 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8648    { (exit 1); exit 1; }; }
8649 fi
8650
8651 fi
8652
8653                 ;;
8654         esac
8655
8656         # either way, check for the library header files
8657
8658 for ac_header in pcre2posix.h pcreposix.h
8659 do
8660 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8661 echo "$as_me:8661: checking for $ac_header" >&5
8662 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8663 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8664   echo $ECHO_N "(cached) $ECHO_C" >&6
8665 else
8666   cat >"conftest.$ac_ext" <<_ACEOF
8667 #line 8667 "configure"
8668 #include "confdefs.h"
8669 #include <$ac_header>
8670 _ACEOF
8671 if { (eval echo "$as_me:8671: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8672   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8673   ac_status=$?
8674   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8675   rm -f conftest.er1
8676   cat conftest.err >&5
8677   echo "$as_me:8677: \$? = $ac_status" >&5
8678   (exit "$ac_status"); } >/dev/null; then
8679   if test -s conftest.err; then
8680     ac_cpp_err=$ac_c_preproc_warn_flag
8681   else
8682     ac_cpp_err=
8683   fi
8684 else
8685   ac_cpp_err=yes
8686 fi
8687 if test -z "$ac_cpp_err"; then
8688   eval "$as_ac_Header=yes"
8689 else
8690   echo "$as_me: failed program was:" >&5
8691   cat "conftest.$ac_ext" >&5
8692   eval "$as_ac_Header=no"
8693 fi
8694 rm -f conftest.err "conftest.$ac_ext"
8695 fi
8696 echo "$as_me:8696: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8697 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8698 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8699   cat >>confdefs.h <<EOF
8700 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8701 EOF
8702
8703 fi
8704 done
8705
8706 for ac_func in PCRE2regcomp
8707 do
8708 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8709 echo "$as_me:8709: checking for $ac_func" >&5
8710 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8711 if eval "test \"\${$as_ac_var+set}\" = set"; then
8712   echo $ECHO_N "(cached) $ECHO_C" >&6
8713 else
8714   cat >"conftest.$ac_ext" <<_ACEOF
8715 #line 8715 "configure"
8716 #include "confdefs.h"
8717 #define $ac_func autoconf_temporary
8718 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8719 #undef $ac_func
8720
8721 #ifdef __cplusplus
8722 extern "C"
8723 #endif
8724
8725 /* We use char because int might match the return type of a gcc2
8726    builtin and then its argument prototype would still apply.  */
8727 char $ac_func (void);
8728
8729 int
8730 main (void)
8731 {
8732
8733 /* The GNU C library defines stubs for functions which it implements
8734     to always fail with ENOSYS.  Some functions are actually named
8735     something starting with __ and the normal name is an alias.  */
8736 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8737 #error found stub for $ac_func
8738 #endif
8739
8740         return $ac_func ();
8741   ;
8742   return 0;
8743 }
8744 _ACEOF
8745 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8746 if { (eval echo "$as_me:8746: \"$ac_link\"") >&5
8747   (eval $ac_link) 2>&5
8748   ac_status=$?
8749   echo "$as_me:8749: \$? = $ac_status" >&5
8750   (exit "$ac_status"); } &&
8751          { ac_try='test -s "conftest$ac_exeext"'
8752   { (eval echo "$as_me:8752: \"$ac_try\"") >&5
8753   (eval $ac_try) 2>&5
8754   ac_status=$?
8755   echo "$as_me:8755: \$? = $ac_status" >&5
8756   (exit "$ac_status"); }; }; then
8757   eval "$as_ac_var=yes"
8758 else
8759   echo "$as_me: failed program was:" >&5
8760 cat "conftest.$ac_ext" >&5
8761 eval "$as_ac_var=no"
8762 fi
8763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8764 fi
8765 echo "$as_me:8765: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8766 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8767 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8768   cat >>confdefs.h <<EOF
8769 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8770 EOF
8771
8772 fi
8773 done
8774
8775 fi
8776
8777 # not everyone has "test -c"
8778 if test -c /dev/sysmouse 2>/dev/null ; then
8779 echo "$as_me:8779: checking if you want to use sysmouse" >&5
8780 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8781
8782 # Check whether --with-sysmouse or --without-sysmouse was given.
8783 if test "${with_sysmouse+set}" = set; then
8784   withval="$with_sysmouse"
8785   cf_with_sysmouse=$withval
8786 else
8787   cf_with_sysmouse=maybe
8788 fi;
8789         if test "$cf_with_sysmouse" != no ; then
8790         cat >"conftest.$ac_ext" <<_ACEOF
8791 #line 8791 "configure"
8792 #include "confdefs.h"
8793
8794 #include <osreldate.h>
8795 #if (__FreeBSD_version >= 400017)
8796 #include <sys/consio.h>
8797 #include <sys/fbio.h>
8798 #else
8799 #include <machine/console.h>
8800 #endif
8801
8802 int
8803 main (void)
8804 {
8805
8806         struct mouse_info the_mouse;
8807         ioctl(0, CONS_MOUSECTL, &the_mouse);
8808
8809   ;
8810   return 0;
8811 }
8812 _ACEOF
8813 rm -f "conftest.$ac_objext"
8814 if { (eval echo "$as_me:8814: \"$ac_compile\"") >&5
8815   (eval $ac_compile) 2>&5
8816   ac_status=$?
8817   echo "$as_me:8817: \$? = $ac_status" >&5
8818   (exit "$ac_status"); } &&
8819          { ac_try='test -s "conftest.$ac_objext"'
8820   { (eval echo "$as_me:8820: \"$ac_try\"") >&5
8821   (eval $ac_try) 2>&5
8822   ac_status=$?
8823   echo "$as_me:8823: \$? = $ac_status" >&5
8824   (exit "$ac_status"); }; }; then
8825   cf_with_sysmouse=yes
8826 else
8827   echo "$as_me: failed program was:" >&5
8828 cat "conftest.$ac_ext" >&5
8829 cf_with_sysmouse=no
8830 fi
8831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8832         fi
8833 echo "$as_me:8833: result: $cf_with_sysmouse" >&5
8834 echo "${ECHO_T}$cf_with_sysmouse" >&6
8835 test "$cf_with_sysmouse" = yes &&
8836 cat >>confdefs.h <<\EOF
8837 #define USE_SYSMOUSE 1
8838 EOF
8839
8840 fi
8841
8842 # pretend that ncurses==ncursesw==ncursest
8843 echo "$as_me:8843: checking if you want to disable library suffixes" >&5
8844 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8845
8846 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8847 if test "${enable_lib_suffixes+set}" = set; then
8848   enableval="$enable_lib_suffixes"
8849   test "$enableval" != no && enableval=yes
8850         if test "$enableval" != "yes" ; then
8851     disable_lib_suffixes=yes
8852         else
8853                 disable_lib_suffixes=no
8854         fi
8855 else
8856   enableval=yes
8857         disable_lib_suffixes=no
8858
8859 fi;
8860 echo "$as_me:8860: result: $disable_lib_suffixes" >&5
8861 echo "${ECHO_T}$disable_lib_suffixes" >&6
8862
8863 ### If we're building with rpath, try to link non-standard libs that way too.
8864 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8865
8866 echo "$as_me:8866: checking if rpath-hack should be disabled" >&5
8867 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8868
8869 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8870 if test "${enable_rpath_hack+set}" = set; then
8871   enableval="$enable_rpath_hack"
8872   test "$enableval" != no && enableval=yes
8873         if test "$enableval" != "yes" ; then
8874     enable_rpath_hack=no
8875         else
8876                 enable_rpath_hack=yes
8877         fi
8878 else
8879   enableval=yes
8880         enable_rpath_hack=yes
8881
8882 fi;
8883 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8884 echo "$as_me:8884: result: $cf_disable_rpath_hack" >&5
8885 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8886
8887 if test "$enable_rpath_hack" = yes ; then
8888
8889 echo "$as_me:8889: checking for updated LDFLAGS" >&5
8890 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8891 if test -n "$LD_RPATH_OPT" ; then
8892         echo "$as_me:8892: result: maybe" >&5
8893 echo "${ECHO_T}maybe" >&6
8894
8895         for ac_prog in ldd
8896 do
8897   # Extract the first word of "$ac_prog", so it can be a program name with args.
8898 set dummy $ac_prog; ac_word=$2
8899 echo "$as_me:8899: checking for $ac_word" >&5
8900 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8901 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8902   echo $ECHO_N "(cached) $ECHO_C" >&6
8903 else
8904   if test -n "$cf_ldd_prog"; then
8905   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8906 else
8907   ac_save_IFS=$IFS; IFS=$ac_path_separator
8908 ac_dummy="$PATH"
8909 for ac_dir in $ac_dummy; do
8910   IFS=$ac_save_IFS
8911   test -z "$ac_dir" && ac_dir=.
8912   $as_executable_p "$ac_dir/$ac_word" || continue
8913 ac_cv_prog_cf_ldd_prog="$ac_prog"
8914 echo "$as_me:8914: found $ac_dir/$ac_word" >&5
8915 break
8916 done
8917
8918 fi
8919 fi
8920 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8921 if test -n "$cf_ldd_prog"; then
8922   echo "$as_me:8922: result: $cf_ldd_prog" >&5
8923 echo "${ECHO_T}$cf_ldd_prog" >&6
8924 else
8925   echo "$as_me:8925: result: no" >&5
8926 echo "${ECHO_T}no" >&6
8927 fi
8928
8929   test -n "$cf_ldd_prog" && break
8930 done
8931 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8932
8933         cf_rpath_list="/usr/lib /lib"
8934         if test "$cf_ldd_prog" != no
8935         then
8936                 cf_rpath_oops=
8937
8938 cat >"conftest.$ac_ext" <<_ACEOF
8939 #line 8939 "configure"
8940 #include "confdefs.h"
8941 #include <stdio.h>
8942 int
8943 main (void)
8944 {
8945 printf("Hello");
8946   ;
8947   return 0;
8948 }
8949 _ACEOF
8950 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8951 if { (eval echo "$as_me:8951: \"$ac_link\"") >&5
8952   (eval $ac_link) 2>&5
8953   ac_status=$?
8954   echo "$as_me:8954: \$? = $ac_status" >&5
8955   (exit "$ac_status"); } &&
8956          { ac_try='test -s "conftest$ac_exeext"'
8957   { (eval echo "$as_me:8957: \"$ac_try\"") >&5
8958   (eval $ac_try) 2>&5
8959   ac_status=$?
8960   echo "$as_me:8960: \$? = $ac_status" >&5
8961   (exit "$ac_status"); }; }; then
8962   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8963                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8964 else
8965   echo "$as_me: failed program was:" >&5
8966 cat "conftest.$ac_ext" >&5
8967 fi
8968 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8969
8970                 # If we passed the link-test, but get a "not found" on a given library,
8971                 # this could be due to inept reconfiguration of gcc to make it only
8972                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8973                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8974                 # /usr/local libraries.
8975                 if test -n "$cf_rpath_oops"
8976                 then
8977                         for cf_rpath_src in $cf_rpath_oops
8978                         do
8979                                 for cf_rpath_dir in \
8980                                         /usr/local \
8981                                         /usr/pkg \
8982                                         /opt/sfw
8983                                 do
8984                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8985                                         then
8986                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8987
8988 echo "${as_me:-configure}:8988: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8989
8990                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8991                                                 break
8992                                         fi
8993                                 done
8994                         done
8995                 fi
8996         fi
8997
8998         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8999
9000 echo "${as_me:-configure}:9000: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
9001
9002 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
9003
9004 echo "${as_me:-configure}:9004: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
9005
9006 cf_rpath_dst=
9007 for cf_rpath_src in $LDFLAGS
9008 do
9009         case "$cf_rpath_src" in
9010         (-L*)
9011
9012                 # check if this refers to a directory which we will ignore
9013                 cf_rpath_skip=no
9014                 if test -n "$cf_rpath_list"
9015                 then
9016                         for cf_rpath_item in $cf_rpath_list
9017                         do
9018                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
9019                                 then
9020                                         cf_rpath_skip=yes
9021                                         break
9022                                 fi
9023                         done
9024                 fi
9025
9026                 if test "$cf_rpath_skip" = no
9027                 then
9028                         # transform the option
9029                         if test "$LD_RPATH_OPT" = "-R " ; then
9030                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
9031                         else
9032                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
9033                         fi
9034
9035                         # if we have not already added this, add it now
9036                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
9037                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
9038                         then
9039                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
9040
9041 echo "${as_me:-configure}:9041: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
9042
9043                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
9044                         fi
9045                 fi
9046                 ;;
9047         esac
9048         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
9049 done
9050 LDFLAGS=$cf_rpath_dst
9051
9052 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
9053
9054 echo "${as_me:-configure}:9054: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
9055
9056 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
9057
9058 echo "${as_me:-configure}:9058: testing ...checking LIBS $LIBS ..." 1>&5
9059
9060 cf_rpath_dst=
9061 for cf_rpath_src in $LIBS
9062 do
9063         case "$cf_rpath_src" in
9064         (-L*)
9065
9066                 # check if this refers to a directory which we will ignore
9067                 cf_rpath_skip=no
9068                 if test -n "$cf_rpath_list"
9069                 then
9070                         for cf_rpath_item in $cf_rpath_list
9071                         do
9072                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
9073                                 then
9074                                         cf_rpath_skip=yes
9075                                         break
9076                                 fi
9077                         done
9078                 fi
9079
9080                 if test "$cf_rpath_skip" = no
9081                 then
9082                         # transform the option
9083                         if test "$LD_RPATH_OPT" = "-R " ; then
9084                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
9085                         else
9086                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
9087                         fi
9088
9089                         # if we have not already added this, add it now
9090                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
9091                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
9092                         then
9093                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
9094
9095 echo "${as_me:-configure}:9095: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
9096
9097                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
9098                         fi
9099                 fi
9100                 ;;
9101         esac
9102         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
9103 done
9104 LIBS=$cf_rpath_dst
9105
9106 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
9107
9108 echo "${as_me:-configure}:9108: testing ...checked LIBS $LIBS ..." 1>&5
9109
9110         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
9111
9112 echo "${as_me:-configure}:9112: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
9113
9114 else
9115         echo "$as_me:9115: result: no" >&5
9116 echo "${ECHO_T}no" >&6
9117 fi
9118
9119 fi
9120
9121 fi
9122
9123 ### Depending on the system, someone may use rpath to build ncurses but not
9124 # want users of the package to rely upon that feature.  Give those people an
9125 # option to suppress that detail from EXTRA_LDFLAGS.
9126 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
9127 if test -n "$EXTRA_PKG_LDFLAGS"
9128 then
9129         echo "$as_me:9129: checking if you want to disable extra LDFLAGS for package-scripts" >&5
9130 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
9131
9132 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
9133 if test "${enable_pkg_ldflags+set}" = set; then
9134   enableval="$enable_pkg_ldflags"
9135   test "$enableval" != no && enableval=yes
9136         if test "$enableval" != "yes" ; then
9137     disable_pkg_ldflags=yes
9138         else
9139                 disable_pkg_ldflags=no
9140         fi
9141 else
9142   enableval=yes
9143         disable_pkg_ldflags=no
9144
9145 fi;
9146         echo "$as_me:9146: result: $disable_pkg_ldflags" >&5
9147 echo "${ECHO_T}$disable_pkg_ldflags" >&6
9148         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
9149 fi
9150
9151 ###############################################################################
9152
9153 ###     use option --with-extra-suffix to append suffix to headers and libraries
9154 echo "$as_me:9154: checking for extra suffix to append to header/library paths" >&5
9155 echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
9156 EXTRA_SUFFIX=
9157
9158 # Check whether --with-extra-suffix or --without-extra-suffix was given.
9159 if test "${with_extra_suffix+set}" = set; then
9160   withval="$with_extra_suffix"
9161   case x$withval in
9162         (xno)
9163                 ;;
9164         (xyes|x)
9165                 EXTRA_SUFFIX=$cf_cv_abi_version
9166                 ;;
9167         (*)
9168                 EXTRA_SUFFIX=$withval
9169                 ;;
9170         esac
9171
9172 fi;
9173 echo "$as_me:9173: result: ${EXTRA_SUFFIX:-(none)}" >&5
9174 echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
9175
9176 ###     use option --disable-overwrite to leave out the link to -lcurses
9177 echo "$as_me:9177: checking if you wish to install ncurses overwriting curses" >&5
9178 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
9179
9180 # Check whether --enable-overwrite or --disable-overwrite was given.
9181 if test "${enable_overwrite+set}" = set; then
9182   enableval="$enable_overwrite"
9183   with_overwrite=$enableval
9184 else
9185   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
9186 fi;
9187 echo "$as_me:9187: result: $with_overwrite" >&5
9188 echo "${ECHO_T}$with_overwrite" >&6
9189
9190 echo "$as_me:9190: checking if external terminfo-database is used" >&5
9191 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
9192
9193 # Check whether --enable-database or --disable-database was given.
9194 if test "${enable_database+set}" = set; then
9195   enableval="$enable_database"
9196   use_database=$enableval
9197 else
9198   use_database=yes
9199 fi;
9200 echo "$as_me:9200: result: $use_database" >&5
9201 echo "${ECHO_T}$use_database" >&6
9202
9203 case "$host_os" in
9204 (os2*)
9205         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
9206         ;;
9207 (*)
9208         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
9209         ;;
9210 esac
9211
9212 NCURSES_USE_DATABASE=0
9213 if test "$use_database" != no ; then
9214         NCURSES_USE_DATABASE=1
9215
9216         echo "$as_me:9216: checking which terminfo source-file will be installed" >&5
9217 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
9218
9219 # Check whether --with-database or --without-database was given.
9220 if test "${with_database+set}" = set; then
9221   withval="$with_database"
9222   TERMINFO_SRC=$withval
9223 fi;
9224         echo "$as_me:9224: result: $TERMINFO_SRC" >&5
9225 echo "${ECHO_T}$TERMINFO_SRC" >&6
9226
9227         echo "$as_me:9227: checking whether to use hashed database instead of directory/tree" >&5
9228 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
9229
9230 # Check whether --with-hashed-db or --without-hashed-db was given.
9231 if test "${with_hashed_db+set}" = set; then
9232   withval="$with_hashed_db"
9233
9234 else
9235   with_hashed_db=no
9236 fi;
9237         echo "$as_me:9237: result: $with_hashed_db" >&5
9238 echo "${ECHO_T}$with_hashed_db" >&6
9239 else
9240         with_hashed_db=no
9241 fi
9242
9243 echo "$as_me:9243: checking for list of fallback terminal descriptions" >&5
9244 echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
9245
9246 # Check whether --with-fallbacks or --without-fallbacks was given.
9247 if test "${with_fallbacks+set}" = set; then
9248   withval="$with_fallbacks"
9249   with_fallback=$withval
9250 else
9251   with_fallback=
9252 fi;
9253 echo "$as_me:9253: result: ${with_fallback:-(none)}" >&5
9254 echo "${ECHO_T}${with_fallback:-(none)}" >&6
9255
9256 case ".$with_fallback" in
9257 (.|.no)
9258         FALLBACK_LIST=
9259         ;;
9260 (.yes)
9261         { echo "$as_me:9261: WARNING: expected a list of terminal descriptions" >&5
9262 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
9263         ;;
9264 (*)
9265         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
9266         ;;
9267 esac
9268
9269 # The fallback feature in ncurses relies upon tic/infocmp outside the build
9270 # tree for generating the terminal descriptions that will be compiled into the
9271 # library.  If your toolchain is old, it may not handle current terminal
9272 # databases.  Use configure-options to point to the tools which will be used,
9273 # rather than the first ones found on the $PATH.
9274 if test -n "$ac_tool_prefix"; then
9275   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
9276 set dummy ${ac_tool_prefix}tic; ac_word=$2
9277 echo "$as_me:9277: checking for $ac_word" >&5
9278 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9279 if test "${ac_cv_prog_TIC+set}" = set; then
9280   echo $ECHO_N "(cached) $ECHO_C" >&6
9281 else
9282   if test -n "$TIC"; then
9283   ac_cv_prog_TIC="$TIC" # Let the user override the test.
9284 else
9285   ac_save_IFS=$IFS; IFS=$ac_path_separator
9286 ac_dummy="$PATH"
9287 for ac_dir in $ac_dummy; do
9288   IFS=$ac_save_IFS
9289   test -z "$ac_dir" && ac_dir=.
9290   $as_executable_p "$ac_dir/$ac_word" || continue
9291 ac_cv_prog_TIC="${ac_tool_prefix}tic"
9292 echo "$as_me:9292: found $ac_dir/$ac_word" >&5
9293 break
9294 done
9295
9296 fi
9297 fi
9298 TIC=$ac_cv_prog_TIC
9299 if test -n "$TIC"; then
9300   echo "$as_me:9300: result: $TIC" >&5
9301 echo "${ECHO_T}$TIC" >&6
9302 else
9303   echo "$as_me:9303: result: no" >&5
9304 echo "${ECHO_T}no" >&6
9305 fi
9306
9307 fi
9308 if test -z "$ac_cv_prog_TIC"; then
9309   ac_ct_TIC=$TIC
9310   # Extract the first word of "tic", so it can be a program name with args.
9311 set dummy tic; ac_word=$2
9312 echo "$as_me:9312: checking for $ac_word" >&5
9313 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9314 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9315   echo $ECHO_N "(cached) $ECHO_C" >&6
9316 else
9317   if test -n "$ac_ct_TIC"; then
9318   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9319 else
9320   ac_save_IFS=$IFS; IFS=$ac_path_separator
9321 ac_dummy="$PATH"
9322 for ac_dir in $ac_dummy; do
9323   IFS=$ac_save_IFS
9324   test -z "$ac_dir" && ac_dir=.
9325   $as_executable_p "$ac_dir/$ac_word" || continue
9326 ac_cv_prog_ac_ct_TIC="tic"
9327 echo "$as_me:9327: found $ac_dir/$ac_word" >&5
9328 break
9329 done
9330
9331 fi
9332 fi
9333 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9334 if test -n "$ac_ct_TIC"; then
9335   echo "$as_me:9335: result: $ac_ct_TIC" >&5
9336 echo "${ECHO_T}$ac_ct_TIC" >&6
9337 else
9338   echo "$as_me:9338: result: no" >&5
9339 echo "${ECHO_T}no" >&6
9340 fi
9341
9342   TIC=$ac_ct_TIC
9343 else
9344   TIC="$ac_cv_prog_TIC"
9345 fi
9346
9347 if test -n "$ac_tool_prefix"; then
9348   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9349 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9350 echo "$as_me:9350: checking for $ac_word" >&5
9351 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9352 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9353   echo $ECHO_N "(cached) $ECHO_C" >&6
9354 else
9355   if test -n "$INFOCMP"; then
9356   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9357 else
9358   ac_save_IFS=$IFS; IFS=$ac_path_separator
9359 ac_dummy="$PATH"
9360 for ac_dir in $ac_dummy; do
9361   IFS=$ac_save_IFS
9362   test -z "$ac_dir" && ac_dir=.
9363   $as_executable_p "$ac_dir/$ac_word" || continue
9364 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9365 echo "$as_me:9365: found $ac_dir/$ac_word" >&5
9366 break
9367 done
9368
9369 fi
9370 fi
9371 INFOCMP=$ac_cv_prog_INFOCMP
9372 if test -n "$INFOCMP"; then
9373   echo "$as_me:9373: result: $INFOCMP" >&5
9374 echo "${ECHO_T}$INFOCMP" >&6
9375 else
9376   echo "$as_me:9376: result: no" >&5
9377 echo "${ECHO_T}no" >&6
9378 fi
9379
9380 fi
9381 if test -z "$ac_cv_prog_INFOCMP"; then
9382   ac_ct_INFOCMP=$INFOCMP
9383   # Extract the first word of "infocmp", so it can be a program name with args.
9384 set dummy infocmp; ac_word=$2
9385 echo "$as_me:9385: checking for $ac_word" >&5
9386 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9387 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9388   echo $ECHO_N "(cached) $ECHO_C" >&6
9389 else
9390   if test -n "$ac_ct_INFOCMP"; then
9391   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9392 else
9393   ac_save_IFS=$IFS; IFS=$ac_path_separator
9394 ac_dummy="$PATH"
9395 for ac_dir in $ac_dummy; do
9396   IFS=$ac_save_IFS
9397   test -z "$ac_dir" && ac_dir=.
9398   $as_executable_p "$ac_dir/$ac_word" || continue
9399 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9400 echo "$as_me:9400: found $ac_dir/$ac_word" >&5
9401 break
9402 done
9403
9404 fi
9405 fi
9406 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9407 if test -n "$ac_ct_INFOCMP"; then
9408   echo "$as_me:9408: result: $ac_ct_INFOCMP" >&5
9409 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9410 else
9411   echo "$as_me:9411: result: no" >&5
9412 echo "${ECHO_T}no" >&6
9413 fi
9414
9415   INFOCMP=$ac_ct_INFOCMP
9416 else
9417   INFOCMP="$ac_cv_prog_INFOCMP"
9418 fi
9419
9420 if test -n "$FALLBACK_LIST"
9421 then
9422
9423 # Check whether --with-tic-path or --without-tic-path was given.
9424 if test "${with_tic_path+set}" = set; then
9425   withval="$with_tic_path"
9426   echo "$as_me:9426: checking for tic program for fallbacks" >&5
9427 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9428                 TIC=$withval
9429                 echo "$as_me:9429: result: $TIC" >&5
9430 echo "${ECHO_T}$TIC" >&6
9431
9432 if test "x$prefix" != xNONE; then
9433         cf_path_syntax="$prefix"
9434 else
9435         cf_path_syntax="$ac_default_prefix"
9436 fi
9437
9438 case ".$TIC" in
9439 (.\$\(*\)*|.\'*\'*)
9440         ;;
9441 (..|./*|.\\*)
9442         ;;
9443 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9444         ;;
9445 (.\$\{*prefix\}*|.\$\{*dir\}*)
9446         eval TIC="$TIC"
9447         case ".$TIC" in
9448         (.NONE/*)
9449                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9450                 ;;
9451         esac
9452         ;;
9453 (.no|.NONE/*)
9454         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9455         ;;
9456 (*)
9457         { { echo "$as_me:9457: error: expected a pathname, not \"$TIC\"" >&5
9458 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9459    { (exit 1); exit 1; }; }
9460         ;;
9461 esac
9462
9463 else
9464
9465 test -z "$TIC" && TIC="tic"
9466 for ac_prog in $TIC tic
9467 do
9468   # Extract the first word of "$ac_prog", so it can be a program name with args.
9469 set dummy $ac_prog; ac_word=$2
9470 echo "$as_me:9470: checking for $ac_word" >&5
9471 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9472 if test "${ac_cv_path_TIC+set}" = set; then
9473   echo $ECHO_N "(cached) $ECHO_C" >&6
9474 else
9475   case $TIC in
9476   [\\/]* | ?:[\\/]*)
9477   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9478   ;;
9479   *)
9480   ac_save_IFS=$IFS; IFS=$ac_path_separator
9481 ac_dummy="$PATH:/usr/local/ncurses/bin"
9482 for ac_dir in $ac_dummy; do
9483   IFS=$ac_save_IFS
9484   test -z "$ac_dir" && ac_dir=.
9485   if $as_executable_p "$ac_dir/$ac_word"; then
9486    ac_cv_path_TIC="$ac_dir/$ac_word"
9487    echo "$as_me:9487: found $ac_dir/$ac_word" >&5
9488    break
9489 fi
9490 done
9491
9492   ;;
9493 esac
9494 fi
9495 TIC=$ac_cv_path_TIC
9496
9497 if test -n "$TIC"; then
9498   echo "$as_me:9498: result: $TIC" >&5
9499 echo "${ECHO_T}$TIC" >&6
9500 else
9501   echo "$as_me:9501: result: no" >&5
9502 echo "${ECHO_T}no" >&6
9503 fi
9504
9505   test -n "$TIC" && break
9506 done
9507 test -n "$TIC" || TIC="$TIC"
9508
9509 cf_path_prog=""
9510 cf_path_args=""
9511 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9512 for cf_temp in $ac_cv_path_TIC
9513 do
9514         if test -z "$cf_path_prog" ; then
9515                 if test "$with_full_paths" = yes ; then
9516
9517 if test "x$prefix" != xNONE; then
9518         cf_path_syntax="$prefix"
9519 else
9520         cf_path_syntax="$ac_default_prefix"
9521 fi
9522
9523 case ".$cf_temp" in
9524 (.\$\(*\)*|.\'*\'*)
9525         ;;
9526 (..|./*|.\\*)
9527         ;;
9528 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9529         ;;
9530 (.\$\{*prefix\}*|.\$\{*dir\}*)
9531         eval cf_temp="$cf_temp"
9532         case ".$cf_temp" in
9533         (.NONE/*)
9534                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9535                 ;;
9536         esac
9537         ;;
9538 (.no|.NONE/*)
9539         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9540         ;;
9541 (*)
9542         break
9543         ;;
9544 esac
9545
9546                         cf_path_prog="$cf_temp"
9547                 else
9548                         cf_path_prog="`basename "$cf_temp"`"
9549                 fi
9550         elif test -z "$cf_path_args" ; then
9551                 cf_path_args="$cf_temp"
9552         else
9553                 cf_path_args="$cf_path_args $cf_temp"
9554         fi
9555 done
9556 IFS="$cf_save_ifs"
9557
9558 if test -n "$cf_path_prog" ; then
9559
9560 echo "${as_me:-configure}:9560: testing defining path for ${cf_path_prog} ..." 1>&5
9561
9562 cat >>confdefs.h <<EOF
9563 #define TIC_PATH "$cf_path_prog"
9564 EOF
9565
9566         test -n "$cf_path_args" &&
9567 cat >>confdefs.h <<EOF
9568 #define TIC_ARGS "$cf_path_args"
9569 EOF
9570
9571 fi
9572
9573                 if test -z "$TIC"
9574                 then
9575                         { echo "$as_me:9575: WARNING: no tic program found for fallbacks" >&5
9576 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9577                 fi
9578
9579 fi;
9580
9581 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9582 if test "${with_infocmp_path+set}" = set; then
9583   withval="$with_infocmp_path"
9584   echo "$as_me:9584: checking for infocmp program for fallbacks" >&5
9585 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9586                 INFOCMP=$withval
9587                 echo "$as_me:9587: result: $INFOCMP" >&5
9588 echo "${ECHO_T}$INFOCMP" >&6
9589
9590 if test "x$prefix" != xNONE; then
9591         cf_path_syntax="$prefix"
9592 else
9593         cf_path_syntax="$ac_default_prefix"
9594 fi
9595
9596 case ".$INFOCMP" in
9597 (.\$\(*\)*|.\'*\'*)
9598         ;;
9599 (..|./*|.\\*)
9600         ;;
9601 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9602         ;;
9603 (.\$\{*prefix\}*|.\$\{*dir\}*)
9604         eval INFOCMP="$INFOCMP"
9605         case ".$INFOCMP" in
9606         (.NONE/*)
9607                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9608                 ;;
9609         esac
9610         ;;
9611 (.no|.NONE/*)
9612         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9613         ;;
9614 (*)
9615         { { echo "$as_me:9615: error: expected a pathname, not \"$INFOCMP\"" >&5
9616 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9617    { (exit 1); exit 1; }; }
9618         ;;
9619 esac
9620
9621 else
9622
9623 test -z "$INFOCMP" && INFOCMP="infocmp"
9624 for ac_prog in $INFOCMP infocmp
9625 do
9626   # Extract the first word of "$ac_prog", so it can be a program name with args.
9627 set dummy $ac_prog; ac_word=$2
9628 echo "$as_me:9628: checking for $ac_word" >&5
9629 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9630 if test "${ac_cv_path_INFOCMP+set}" = set; then
9631   echo $ECHO_N "(cached) $ECHO_C" >&6
9632 else
9633   case $INFOCMP in
9634   [\\/]* | ?:[\\/]*)
9635   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9636   ;;
9637   *)
9638   ac_save_IFS=$IFS; IFS=$ac_path_separator
9639 ac_dummy="$PATH:/usr/local/ncurses/bin"
9640 for ac_dir in $ac_dummy; do
9641   IFS=$ac_save_IFS
9642   test -z "$ac_dir" && ac_dir=.
9643   if $as_executable_p "$ac_dir/$ac_word"; then
9644    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9645    echo "$as_me:9645: found $ac_dir/$ac_word" >&5
9646    break
9647 fi
9648 done
9649
9650   ;;
9651 esac
9652 fi
9653 INFOCMP=$ac_cv_path_INFOCMP
9654
9655 if test -n "$INFOCMP"; then
9656   echo "$as_me:9656: result: $INFOCMP" >&5
9657 echo "${ECHO_T}$INFOCMP" >&6
9658 else
9659   echo "$as_me:9659: result: no" >&5
9660 echo "${ECHO_T}no" >&6
9661 fi
9662
9663   test -n "$INFOCMP" && break
9664 done
9665 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9666
9667 cf_path_prog=""
9668 cf_path_args=""
9669 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9670 for cf_temp in $ac_cv_path_INFOCMP
9671 do
9672         if test -z "$cf_path_prog" ; then
9673                 if test "$with_full_paths" = yes ; then
9674
9675 if test "x$prefix" != xNONE; then
9676         cf_path_syntax="$prefix"
9677 else
9678         cf_path_syntax="$ac_default_prefix"
9679 fi
9680
9681 case ".$cf_temp" in
9682 (.\$\(*\)*|.\'*\'*)
9683         ;;
9684 (..|./*|.\\*)
9685         ;;
9686 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9687         ;;
9688 (.\$\{*prefix\}*|.\$\{*dir\}*)
9689         eval cf_temp="$cf_temp"
9690         case ".$cf_temp" in
9691         (.NONE/*)
9692                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9693                 ;;
9694         esac
9695         ;;
9696 (.no|.NONE/*)
9697         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9698         ;;
9699 (*)
9700         break
9701         ;;
9702 esac
9703
9704                         cf_path_prog="$cf_temp"
9705                 else
9706                         cf_path_prog="`basename "$cf_temp"`"
9707                 fi
9708         elif test -z "$cf_path_args" ; then
9709                 cf_path_args="$cf_temp"
9710         else
9711                 cf_path_args="$cf_path_args $cf_temp"
9712         fi
9713 done
9714 IFS="$cf_save_ifs"
9715
9716 if test -n "$cf_path_prog" ; then
9717
9718 echo "${as_me:-configure}:9718: testing defining path for ${cf_path_prog} ..." 1>&5
9719
9720 cat >>confdefs.h <<EOF
9721 #define INFOCMP_PATH "$cf_path_prog"
9722 EOF
9723
9724         test -n "$cf_path_args" &&
9725 cat >>confdefs.h <<EOF
9726 #define INFOCMP_ARGS "$cf_path_args"
9727 EOF
9728
9729 fi
9730
9731                 if test -z "$INFOCMP"
9732                 then
9733                         { echo "$as_me:9733: WARNING: no infocmp program found for fallbacks" >&5
9734 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9735                 fi
9736
9737 fi;
9738
9739         test -z "$TIC" && FALLBACK_LIST=
9740         test -z "$INFOCMP" && FALLBACK_LIST=
9741         if test -z "$FALLBACK_LIST"
9742         then
9743                 { echo "$as_me:9743: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9744 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9745         fi
9746 fi
9747
9748 USE_FALLBACKS=
9749 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9750
9751 echo "$as_me:9751: checking if you want modern xterm or antique" >&5
9752 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9753
9754 # Check whether --with-xterm-new or --without-xterm-new was given.
9755 if test "${with_xterm_new+set}" = set; then
9756   withval="$with_xterm_new"
9757   with_xterm_new=$withval
9758 else
9759   with_xterm_new=yes
9760 fi;
9761 case "$with_xterm_new" in
9762 (no) with_xterm_new=xterm-old;;
9763 (*)      with_xterm_new=xterm-new;;
9764 esac
9765 echo "$as_me:9765: result: $with_xterm_new" >&5
9766 echo "${ECHO_T}$with_xterm_new" >&6
9767 WHICH_XTERM=$with_xterm_new
9768
9769 case $host_os in
9770 (*linux-gnu|*cygwin|*mingw32|*msys)
9771         want_xterm_kbs=DEL
9772         ;;
9773 (*)
9774         want_xterm_kbs=BS
9775         ;;
9776 esac
9777
9778 echo "$as_me:9778: checking if xterm backspace sends BS or DEL" >&5
9779 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9780
9781 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9782 if test "${with_xterm_kbs+set}" = set; then
9783   withval="$with_xterm_kbs"
9784   with_xterm_kbs=$withval
9785 else
9786   with_xterm_kbs=auto
9787 fi;
9788 case x$with_xterm_kbs in
9789 (xyes|xno|xBS|xbs|x8)
9790         with_xterm_kbs=BS
9791         ;;
9792 (xDEL|xdel|x127)
9793         with_xterm_kbs=DEL
9794         ;;
9795 (xauto)
9796         with_xterm_kbs=$want_xterm_kbs
9797         ;;
9798 (*)
9799         with_xterm_kbs=$withval
9800         ;;
9801 esac
9802 echo "$as_me:9802: result: $with_xterm_kbs" >&5
9803 echo "${ECHO_T}$with_xterm_kbs" >&6
9804 XTERM_KBS=$with_xterm_kbs
9805
9806 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9807 then
9808         { echo "$as_me:9808: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9809 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9810 fi
9811
9812 MAKE_TERMINFO=
9813 if test "$use_database" = no ; then
9814         TERMINFO="${datadir}/terminfo"
9815         MAKE_TERMINFO="#"
9816 else
9817
9818 echo "$as_me:9818: checking for list of terminfo directories" >&5
9819 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9820
9821 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9822 if test "${with_terminfo_dirs+set}" = set; then
9823   withval="$with_terminfo_dirs"
9824
9825 else
9826   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9827 fi;
9828 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9829 cf_dst_path=
9830 for cf_src_path in $withval
9831 do
9832
9833 if test "x$prefix" != xNONE; then
9834         cf_path_syntax="$prefix"
9835 else
9836         cf_path_syntax="$ac_default_prefix"
9837 fi
9838
9839 case ".$cf_src_path" in
9840 (.\$\(*\)*|.\'*\'*)
9841         ;;
9842 (..|./*|.\\*)
9843         ;;
9844 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9845         ;;
9846 (.\$\{*prefix\}*|.\$\{*dir\}*)
9847         eval cf_src_path="$cf_src_path"
9848         case ".$cf_src_path" in
9849         (.NONE/*)
9850                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9851                 ;;
9852         esac
9853         ;;
9854 (.no|.NONE/*)
9855         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9856         ;;
9857 (*)
9858         { { echo "$as_me:9858: error: expected a pathname, not \"$cf_src_path\"" >&5
9859 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9860    { (exit 1); exit 1; }; }
9861         ;;
9862 esac
9863
9864   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9865   cf_dst_path="${cf_dst_path}${cf_src_path}"
9866 done
9867 IFS="$ac_save_ifs"
9868
9869 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9870 # so we have to check/work around.  We do prefer the result of "eval"...
9871 eval cf_dst_eval="$cf_dst_path"
9872 case "x$cf_dst_eval" in
9873 (xNONE*)
9874         TERMINFO_DIRS=$cf_dst_path
9875         ;;
9876 (*)
9877         TERMINFO_DIRS="$cf_dst_eval"
9878         ;;
9879 esac
9880
9881 echo "$as_me:9881: result: $TERMINFO_DIRS" >&5
9882 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9883 test -n "$TERMINFO_DIRS" &&
9884 cat >>confdefs.h <<EOF
9885 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9886 EOF
9887
9888 case "x$TERMINFO" in
9889 x???:*)
9890         { echo "$as_me:9890: WARNING: ignoring non-directory/file TERMINFO value" >&5
9891 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9892         unset TERMINFO
9893         ;;
9894 esac
9895
9896 echo "$as_me:9896: checking for default terminfo directory" >&5
9897 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9898
9899 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9900 if test "${with_default_terminfo_dir+set}" = set; then
9901   withval="$with_default_terminfo_dir"
9902
9903 else
9904   withval="${TERMINFO:-${datadir}/terminfo}"
9905 fi; if test -n "${datadir}/terminfo" ; then
9906
9907 if test "x$prefix" != xNONE; then
9908         cf_path_syntax="$prefix"
9909 else
9910         cf_path_syntax="$ac_default_prefix"
9911 fi
9912
9913 case ".$withval" in
9914 (.\$\(*\)*|.\'*\'*)
9915         ;;
9916 (..|./*|.\\*)
9917         ;;
9918 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9919         ;;
9920 (.\$\{*prefix\}*|.\$\{*dir\}*)
9921         eval withval="$withval"
9922         case ".$withval" in
9923         (.NONE/*)
9924                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9925                 ;;
9926         esac
9927         ;;
9928 (.no|.NONE/*)
9929         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9930         ;;
9931 (*)
9932         { { echo "$as_me:9932: error: expected a pathname, not \"$withval\"" >&5
9933 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9934    { (exit 1); exit 1; }; }
9935         ;;
9936 esac
9937
9938 fi
9939 eval TERMINFO="$withval"
9940
9941 echo "$as_me:9941: result: $TERMINFO" >&5
9942 echo "${ECHO_T}$TERMINFO" >&6
9943
9944 cat >>confdefs.h <<EOF
9945 #define TERMINFO "$TERMINFO"
9946 EOF
9947
9948 fi
9949
9950 ###     use option --disable-big-core to make tic run on small machines
9951 ###     We need 4Mb, check if we can allocate 50% more than that.
9952 echo "$as_me:9952: checking if big-core option selected" >&5
9953 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9954
9955 # Check whether --enable-big-core or --disable-big-core was given.
9956 if test "${enable_big_core+set}" = set; then
9957   enableval="$enable_big_core"
9958   with_big_core=$enableval
9959 else
9960   if test "$cross_compiling" = yes; then
9961   with_big_core=no
9962 else
9963   cat >"conftest.$ac_ext" <<_ACEOF
9964 #line 9964 "configure"
9965 #include "confdefs.h"
9966
9967 #include <stdlib.h>
9968 #include <string.h>
9969 int main(void) {
9970         unsigned long n = 6000000L;
9971         char *s = malloc(n);
9972         if (s != 0)
9973                 s[0] = s[n-1] = 0;
9974         ${cf_cv_main_return:-return}(s == 0);
9975 }
9976 _ACEOF
9977 rm -f "conftest$ac_exeext"
9978 if { (eval echo "$as_me:9978: \"$ac_link\"") >&5
9979   (eval $ac_link) 2>&5
9980   ac_status=$?
9981   echo "$as_me:9981: \$? = $ac_status" >&5
9982   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9983   { (eval echo "$as_me:9983: \"$ac_try\"") >&5
9984   (eval $ac_try) 2>&5
9985   ac_status=$?
9986   echo "$as_me:9986: \$? = $ac_status" >&5
9987   (exit "$ac_status"); }; }; then
9988   with_big_core=yes
9989 else
9990   echo "$as_me: program exited with status $ac_status" >&5
9991 echo "$as_me: failed program was:" >&5
9992 cat "conftest.$ac_ext" >&5
9993 with_big_core=no
9994 fi
9995 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9996 fi
9997 fi;
9998 echo "$as_me:9998: result: $with_big_core" >&5
9999 echo "${ECHO_T}$with_big_core" >&6
10000 test "x$with_big_core" = "xyes" &&
10001 cat >>confdefs.h <<\EOF
10002 #define HAVE_BIG_CORE 1
10003 EOF
10004
10005 ### ISO C only guarantees 512-char strings, we have tables which load faster
10006 ### when constructed using "big" strings.  More than the C compiler, the awk
10007 ### program is a limit on most vendor UNIX systems.  Check that we can build.
10008 echo "$as_me:10008: checking if big-strings option selected" >&5
10009 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
10010
10011 # Check whether --enable-big-strings or --disable-big-strings was given.
10012 if test "${enable_big_strings+set}" = set; then
10013   enableval="$enable_big_strings"
10014   with_big_strings=$enableval
10015 else
10016
10017         case x$AWK in
10018         (x)
10019                 eval with_big_strings=no
10020                 ;;
10021         (*)
10022                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
10023                         | $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
10024                         eval with_big_strings=yes
10025                 else
10026                         eval with_big_strings=no
10027                 fi
10028                 ;;
10029         esac
10030
10031 fi;
10032 echo "$as_me:10032: result: $with_big_strings" >&5
10033 echo "${ECHO_T}$with_big_strings" >&6
10034
10035 USE_BIG_STRINGS=0
10036 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
10037
10038 ###     use option --enable-termcap to compile in the termcap fallback support
10039 echo "$as_me:10039: checking if you want termcap-fallback support" >&5
10040 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
10041
10042 # Check whether --enable-termcap or --disable-termcap was given.
10043 if test "${enable_termcap+set}" = set; then
10044   enableval="$enable_termcap"
10045   with_termcap=$enableval
10046 else
10047   with_termcap=no
10048 fi;
10049 echo "$as_me:10049: result: $with_termcap" >&5
10050 echo "${ECHO_T}$with_termcap" >&6
10051
10052 NCURSES_USE_TERMCAP=0
10053 if test "x$with_termcap" != "xyes" ; then
10054         if test "$use_database" = no ; then
10055                 if test -z "$with_fallback" ; then
10056                         { { echo "$as_me:10056: error: You have disabled the database w/o specifying fallbacks" >&5
10057 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
10058    { (exit 1); exit 1; }; }
10059                 fi
10060         fi
10061
10062 cat >>confdefs.h <<\EOF
10063 #define PURE_TERMINFO 1
10064 EOF
10065
10066 else
10067
10068         if test "$with_ticlib" != no ; then
10069                 { { echo "$as_me:10069: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
10070 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
10071    { (exit 1); exit 1; }; }
10072         fi
10073
10074         NCURSES_USE_TERMCAP=1
10075         echo "$as_me:10075: checking for list of termcap files" >&5
10076 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
10077
10078 # Check whether --with-termpath or --without-termpath was given.
10079 if test "${with_termpath+set}" = set; then
10080   withval="$with_termpath"
10081
10082 else
10083   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
10084 fi;
10085 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
10086 cf_dst_path=
10087 for cf_src_path in $withval
10088 do
10089
10090 if test "x$prefix" != xNONE; then
10091         cf_path_syntax="$prefix"
10092 else
10093         cf_path_syntax="$ac_default_prefix"
10094 fi
10095
10096 case ".$cf_src_path" in
10097 (.\$\(*\)*|.\'*\'*)
10098         ;;
10099 (..|./*|.\\*)
10100         ;;
10101 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
10102         ;;
10103 (.\$\{*prefix\}*|.\$\{*dir\}*)
10104         eval cf_src_path="$cf_src_path"
10105         case ".$cf_src_path" in
10106         (.NONE/*)
10107                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
10108                 ;;
10109         esac
10110         ;;
10111 (.no|.NONE/*)
10112         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
10113         ;;
10114 (*)
10115         { { echo "$as_me:10115: error: expected a pathname, not \"$cf_src_path\"" >&5
10116 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
10117    { (exit 1); exit 1; }; }
10118         ;;
10119 esac
10120
10121   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
10122   cf_dst_path="${cf_dst_path}${cf_src_path}"
10123 done
10124 IFS="$ac_save_ifs"
10125
10126 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
10127 # so we have to check/work around.  We do prefer the result of "eval"...
10128 eval cf_dst_eval="$cf_dst_path"
10129 case "x$cf_dst_eval" in
10130 (xNONE*)
10131         TERMPATH=$cf_dst_path
10132         ;;
10133 (*)
10134         TERMPATH="$cf_dst_eval"
10135         ;;
10136 esac
10137
10138         echo "$as_me:10138: result: $TERMPATH" >&5
10139 echo "${ECHO_T}$TERMPATH" >&6
10140         test -n "$TERMPATH" &&
10141 cat >>confdefs.h <<EOF
10142 #define TERMPATH "$TERMPATH"
10143 EOF
10144
10145         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
10146         echo "$as_me:10146: checking if fast termcap-loader is needed" >&5
10147 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
10148
10149 # Check whether --enable-getcap or --disable-getcap was given.
10150 if test "${enable_getcap+set}" = set; then
10151   enableval="$enable_getcap"
10152   with_getcap=$enableval
10153 else
10154   with_getcap=no
10155 fi;
10156         echo "$as_me:10156: result: $with_getcap" >&5
10157 echo "${ECHO_T}$with_getcap" >&6
10158         test "x$with_getcap" = "xyes" &&
10159 cat >>confdefs.h <<\EOF
10160 #define USE_GETCAP 1
10161 EOF
10162
10163         echo "$as_me:10163: checking if translated termcaps will be cached in ~/.terminfo" >&5
10164 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
10165
10166 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
10167 if test "${enable_getcap_cache+set}" = set; then
10168   enableval="$enable_getcap_cache"
10169   with_getcap_cache=$enableval
10170 else
10171   with_getcap_cache=no
10172 fi;
10173         echo "$as_me:10173: result: $with_getcap_cache" >&5
10174 echo "${ECHO_T}$with_getcap_cache" >&6
10175         test "x$with_getcap_cache" = "xyes" &&
10176 cat >>confdefs.h <<\EOF
10177 #define USE_GETCAP_CACHE 1
10178 EOF
10179
10180 fi
10181
10182 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
10183 echo "$as_me:10183: checking if ~/.terminfo is wanted" >&5
10184 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
10185
10186 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
10187 if test "${enable_home_terminfo+set}" = set; then
10188   enableval="$enable_home_terminfo"
10189   with_home_terminfo=$enableval
10190 else
10191   with_home_terminfo=yes
10192 fi;
10193 echo "$as_me:10193: result: $with_home_terminfo" >&5
10194 echo "${ECHO_T}$with_home_terminfo" >&6
10195 test "x$with_home_terminfo" = "xyes" &&
10196 cat >>confdefs.h <<\EOF
10197 #define USE_HOME_TERMINFO 1
10198 EOF
10199
10200 echo "$as_me:10200: checking if you want to permit root to use ncurses environment variables" >&5
10201 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
10202
10203 # Check whether --enable-root-environ or --disable-root-environ was given.
10204 if test "${enable_root_environ+set}" = set; then
10205   enableval="$enable_root_environ"
10206   with_root_environ=$enableval
10207 else
10208   with_root_environ=yes
10209 fi;
10210 echo "$as_me:10210: result: $with_root_environ" >&5
10211 echo "${ECHO_T}$with_root_environ" >&6
10212 test "x$with_root_environ" = xyes &&
10213 cat >>confdefs.h <<\EOF
10214 #define USE_ROOT_ENVIRON 1
10215 EOF
10216
10217 echo "$as_me:10217: checking if you want to permit setuid programs to access all files" >&5
10218 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
10219
10220 # Check whether --enable-root-access or --disable-root-access was given.
10221 if test "${enable_root_access+set}" = set; then
10222   enableval="$enable_root_access"
10223   with_root_access=$enableval
10224 else
10225   with_root_access=yes
10226 fi;
10227 echo "$as_me:10227: result: $with_root_access" >&5
10228 echo "${ECHO_T}$with_root_access" >&6
10229 test "x$with_root_access" = xyes &&
10230 cat >>confdefs.h <<\EOF
10231 #define USE_ROOT_ACCESS 1
10232 EOF
10233
10234 echo "$as_me:10234: checking if you want to permit setuid use of ncurses environment variables" >&5
10235 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
10236
10237 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
10238 if test "${enable_setuid_environ+set}" = set; then
10239   enableval="$enable_setuid_environ"
10240   with_setuid_environ=$enableval
10241 else
10242   with_setuid_environ=$with_root_environ
10243 fi;
10244 echo "$as_me:10244: result: $with_setuid_environ" >&5
10245 echo "${ECHO_T}$with_setuid_environ" >&6
10246 test "x$with_setuid_environ" = xyes &&
10247 cat >>confdefs.h <<\EOF
10248 #define USE_SETUID_ENVIRON 1
10249 EOF
10250
10251 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
10252 ###   to reduce storage requirements for the terminfo database.
10253
10254 for ac_header in \
10255 unistd.h \
10256
10257 do
10258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10259 echo "$as_me:10259: checking for $ac_header" >&5
10260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
10262   echo $ECHO_N "(cached) $ECHO_C" >&6
10263 else
10264   cat >"conftest.$ac_ext" <<_ACEOF
10265 #line 10265 "configure"
10266 #include "confdefs.h"
10267 #include <$ac_header>
10268 _ACEOF
10269 if { (eval echo "$as_me:10269: \"$ac_cpp "conftest.$ac_ext"\"") >&5
10270   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
10271   ac_status=$?
10272   $EGREP -v '^ *\+' conftest.er1 >conftest.err
10273   rm -f conftest.er1
10274   cat conftest.err >&5
10275   echo "$as_me:10275: \$? = $ac_status" >&5
10276   (exit "$ac_status"); } >/dev/null; then
10277   if test -s conftest.err; then
10278     ac_cpp_err=$ac_c_preproc_warn_flag
10279   else
10280     ac_cpp_err=
10281   fi
10282 else
10283   ac_cpp_err=yes
10284 fi
10285 if test -z "$ac_cpp_err"; then
10286   eval "$as_ac_Header=yes"
10287 else
10288   echo "$as_me: failed program was:" >&5
10289   cat "conftest.$ac_ext" >&5
10290   eval "$as_ac_Header=no"
10291 fi
10292 rm -f conftest.err "conftest.$ac_ext"
10293 fi
10294 echo "$as_me:10294: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10295 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10296 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10297   cat >>confdefs.h <<EOF
10298 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10299 EOF
10300
10301 fi
10302 done
10303
10304 for ac_func in \
10305         remove \
10306         unlink
10307 do
10308 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10309 echo "$as_me:10309: checking for $ac_func" >&5
10310 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10311 if eval "test \"\${$as_ac_var+set}\" = set"; then
10312   echo $ECHO_N "(cached) $ECHO_C" >&6
10313 else
10314   cat >"conftest.$ac_ext" <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317 #define $ac_func autoconf_temporary
10318 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10319 #undef $ac_func
10320
10321 #ifdef __cplusplus
10322 extern "C"
10323 #endif
10324
10325 /* We use char because int might match the return type of a gcc2
10326    builtin and then its argument prototype would still apply.  */
10327 char $ac_func (void);
10328
10329 int
10330 main (void)
10331 {
10332
10333 /* The GNU C library defines stubs for functions which it implements
10334     to always fail with ENOSYS.  Some functions are actually named
10335     something starting with __ and the normal name is an alias.  */
10336 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10337 #error found stub for $ac_func
10338 #endif
10339
10340         return $ac_func ();
10341   ;
10342   return 0;
10343 }
10344 _ACEOF
10345 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10346 if { (eval echo "$as_me:10346: \"$ac_link\"") >&5
10347   (eval $ac_link) 2>&5
10348   ac_status=$?
10349   echo "$as_me:10349: \$? = $ac_status" >&5
10350   (exit "$ac_status"); } &&
10351          { ac_try='test -s "conftest$ac_exeext"'
10352   { (eval echo "$as_me:10352: \"$ac_try\"") >&5
10353   (eval $ac_try) 2>&5
10354   ac_status=$?
10355   echo "$as_me:10355: \$? = $ac_status" >&5
10356   (exit "$ac_status"); }; }; then
10357   eval "$as_ac_var=yes"
10358 else
10359   echo "$as_me: failed program was:" >&5
10360 cat "conftest.$ac_ext" >&5
10361 eval "$as_ac_var=no"
10362 fi
10363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10364 fi
10365 echo "$as_me:10365: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10366 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10367 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10368   cat >>confdefs.h <<EOF
10369 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10370 EOF
10371
10372 fi
10373 done
10374
10375 if test "$cross_compiling" = yes ; then
10376
10377 for ac_func in \
10378                 link \
10379                 symlink
10380 do
10381 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10382 echo "$as_me:10382: checking for $ac_func" >&5
10383 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10384 if eval "test \"\${$as_ac_var+set}\" = set"; then
10385   echo $ECHO_N "(cached) $ECHO_C" >&6
10386 else
10387   cat >"conftest.$ac_ext" <<_ACEOF
10388 #line 10388 "configure"
10389 #include "confdefs.h"
10390 #define $ac_func autoconf_temporary
10391 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10392 #undef $ac_func
10393
10394 #ifdef __cplusplus
10395 extern "C"
10396 #endif
10397
10398 /* We use char because int might match the return type of a gcc2
10399    builtin and then its argument prototype would still apply.  */
10400 char $ac_func (void);
10401
10402 int
10403 main (void)
10404 {
10405
10406 /* The GNU C library defines stubs for functions which it implements
10407     to always fail with ENOSYS.  Some functions are actually named
10408     something starting with __ and the normal name is an alias.  */
10409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10410 #error found stub for $ac_func
10411 #endif
10412
10413         return $ac_func ();
10414   ;
10415   return 0;
10416 }
10417 _ACEOF
10418 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10419 if { (eval echo "$as_me:10419: \"$ac_link\"") >&5
10420   (eval $ac_link) 2>&5
10421   ac_status=$?
10422   echo "$as_me:10422: \$? = $ac_status" >&5
10423   (exit "$ac_status"); } &&
10424          { ac_try='test -s "conftest$ac_exeext"'
10425   { (eval echo "$as_me:10425: \"$ac_try\"") >&5
10426   (eval $ac_try) 2>&5
10427   ac_status=$?
10428   echo "$as_me:10428: \$? = $ac_status" >&5
10429   (exit "$ac_status"); }; }; then
10430   eval "$as_ac_var=yes"
10431 else
10432   echo "$as_me: failed program was:" >&5
10433 cat "conftest.$ac_ext" >&5
10434 eval "$as_ac_var=no"
10435 fi
10436 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10437 fi
10438 echo "$as_me:10438: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10439 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10440 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10441   cat >>confdefs.h <<EOF
10442 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10443 EOF
10444
10445 fi
10446 done
10447
10448 else
10449         echo "$as_me:10449: checking if link/symlink functions work" >&5
10450 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10451 if test "${cf_cv_link_funcs+set}" = set; then
10452   echo $ECHO_N "(cached) $ECHO_C" >&6
10453 else
10454
10455                 cf_cv_link_funcs=
10456                 for cf_func in link symlink ; do
10457                         if test "$cross_compiling" = yes; then
10458
10459                         eval 'ac_cv_func_'$cf_func'=error'
10460 else
10461   cat >"conftest.$ac_ext" <<_ACEOF
10462 #line 10462 "configure"
10463 #include "confdefs.h"
10464
10465 $ac_includes_default
10466
10467 int main(void)
10468 {
10469         int fail = 0;
10470         char src[] = "conftest.tmp";
10471         char dst[] = "conftest.chk";
10472         struct stat src_sb, dst_sb;
10473         FILE *fp = fopen(src, "w");
10474         if (fp == 0) { fail = 3; } else {
10475                 fclose(fp); stat(src, &src_sb);
10476                 if ($cf_func(src, dst) < 0) {
10477                         fail = 1;
10478                 } else if (stat(dst, &dst_sb) < 0) {
10479                         fail = 2;
10480                 } else {
10481                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10482                         if (diff < 0) diff = -diff;
10483                         if (diff > 2) fail = 3;
10484                 }
10485         }
10486 #ifdef HAVE_UNLINK
10487         unlink(dst); unlink(src);
10488 #else
10489         remove(dst); remove(src);
10490 #endif
10491         ${cf_cv_main_return:-return} (fail);
10492 }
10493
10494 _ACEOF
10495 rm -f "conftest$ac_exeext"
10496 if { (eval echo "$as_me:10496: \"$ac_link\"") >&5
10497   (eval $ac_link) 2>&5
10498   ac_status=$?
10499   echo "$as_me:10499: \$? = $ac_status" >&5
10500   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10501   { (eval echo "$as_me:10501: \"$ac_try\"") >&5
10502   (eval $ac_try) 2>&5
10503   ac_status=$?
10504   echo "$as_me:10504: \$? = $ac_status" >&5
10505   (exit "$ac_status"); }; }; then
10506
10507                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10508                         eval 'ac_cv_func_'$cf_func'=yes'
10509 else
10510   echo "$as_me: program exited with status $ac_status" >&5
10511 echo "$as_me: failed program was:" >&5
10512 cat "conftest.$ac_ext" >&5
10513
10514                         eval 'ac_cv_func_'$cf_func'=no'
10515 fi
10516 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10517 fi
10518                 done
10519                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10520
10521 fi
10522 echo "$as_me:10522: result: $cf_cv_link_funcs" >&5
10523 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10524         test "$ac_cv_func_link"    = yes &&
10525 cat >>confdefs.h <<\EOF
10526 #define HAVE_LINK 1
10527 EOF
10528
10529         test "$ac_cv_func_symlink" = yes &&
10530 cat >>confdefs.h <<\EOF
10531 #define HAVE_SYMLINK 1
10532 EOF
10533
10534 fi
10535
10536 with_links=no
10537 with_symlinks=no
10538
10539 # soft links (symbolic links) are useful for some systems where hard links do
10540 # not work, or to make it simpler to copy terminfo trees around.
10541 if test "x$ac_cv_func_symlink" = xyes ; then
10542         echo "$as_me:10542: checking if tic should use symbolic links" >&5
10543 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10544
10545 # Check whether --enable-symlinks or --disable-symlinks was given.
10546 if test "${enable_symlinks+set}" = set; then
10547   enableval="$enable_symlinks"
10548   with_symlinks=$enableval
10549 else
10550   with_symlinks=no
10551 fi;
10552         echo "$as_me:10552: result: $with_symlinks" >&5
10553 echo "${ECHO_T}$with_symlinks" >&6
10554 fi
10555
10556 # If we have hard links and did not choose to use soft links instead, there is
10557 # no reason to make this choice optional - use the hard links.
10558 if test "$with_symlinks" = no ; then
10559         echo "$as_me:10559: checking if tic should use hard links" >&5
10560 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10561         if test "x$ac_cv_func_link" = xyes ; then
10562                 with_links=yes
10563         else
10564                 with_links=no
10565         fi
10566         echo "$as_me:10566: result: $with_links" >&5
10567 echo "${ECHO_T}$with_links" >&6
10568 fi
10569
10570 test "x$with_links" = xyes &&
10571 cat >>confdefs.h <<\EOF
10572 #define USE_LINKS 1
10573 EOF
10574
10575 test "x$with_symlinks" = xyes &&
10576 cat >>confdefs.h <<\EOF
10577 #define USE_SYMLINKS 1
10578 EOF
10579
10580 ###   use option --enable-broken-linker to force on use of broken-linker support
10581
10582 echo "$as_me:10582: checking if you want broken-linker support code" >&5
10583 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10584
10585 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10586 if test "${enable_broken_linker+set}" = set; then
10587   enableval="$enable_broken_linker"
10588   with_broken_linker=$enableval
10589 else
10590   with_broken_linker=no
10591 fi;
10592 echo "$as_me:10592: result: $with_broken_linker" >&5
10593 echo "${ECHO_T}$with_broken_linker" >&6
10594
10595 : "${BROKEN_LINKER:=0}"
10596 if test "x$with_broken_linker" = xyes ; then
10597
10598 cat >>confdefs.h <<\EOF
10599 #define BROKEN_LINKER 1
10600 EOF
10601
10602         BROKEN_LINKER=1
10603 fi
10604
10605 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10606 echo "$as_me:10606: checking if tputs should process BSD-style prefix padding" >&5
10607 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10608
10609 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10610 if test "${enable_bsdpad+set}" = set; then
10611   enableval="$enable_bsdpad"
10612   with_bsdpad=$enableval
10613 else
10614   with_bsdpad=no
10615 fi;
10616 echo "$as_me:10616: result: $with_bsdpad" >&5
10617 echo "${ECHO_T}$with_bsdpad" >&6
10618 test "x$with_bsdpad" = xyes &&
10619 cat >>confdefs.h <<\EOF
10620 #define BSD_TPUTS 1
10621 EOF
10622
10623 ###   use option --enable-widec to turn on use of wide-character support
10624 NCURSES_CH_T=chtype
10625 NCURSES_LIBUTF8=0
10626
10627 NEED_WCHAR_H=0
10628 NCURSES_MBSTATE_T=0
10629 NCURSES_WCHAR_T=0
10630 NCURSES_WINT_T=0
10631
10632 # Check to define _XOPEN_SOURCE "automatically"
10633 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10634
10635 echo "$as_me:10635: checking if the POSIX test-macros are already defined" >&5
10636 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10637 if test "${cf_cv_posix_visible+set}" = set; then
10638   echo $ECHO_N "(cached) $ECHO_C" >&6
10639 else
10640
10641 cat >"conftest.$ac_ext" <<_ACEOF
10642 #line 10642 "configure"
10643 #include "confdefs.h"
10644 #include <stdio.h>
10645 int
10646 main (void)
10647 {
10648
10649 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10650         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10651         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10652         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10653 #error conflicting symbols found
10654 #endif
10655
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f "conftest.$ac_objext"
10661 if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662   (eval $ac_compile) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit "$ac_status"); } &&
10666          { ac_try='test -s "conftest.$ac_objext"'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit "$ac_status"); }; }; then
10672   cf_cv_posix_visible=no
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat "conftest.$ac_ext" >&5
10676 cf_cv_posix_visible=yes
10677 fi
10678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10679
10680 fi
10681 echo "$as_me:10681: result: $cf_cv_posix_visible" >&5
10682 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10683
10684 if test "$cf_cv_posix_visible" = no; then
10685
10686 cf_XOPEN_SOURCE=600
10687 cf_POSIX_C_SOURCE=199506L
10688 cf_xopen_source=
10689
10690 case "$host_os" in
10691 (aix[4-7]*)
10692         cf_xopen_source="-D_ALL_SOURCE"
10693         ;;
10694 (darwin[0-8].*)
10695         cf_xopen_source="-D_APPLE_C_SOURCE"
10696         ;;
10697 (darwin*)
10698         cf_xopen_source="-D_DARWIN_C_SOURCE"
10699         cf_XOPEN_SOURCE=
10700         ;;
10701 (freebsd*|dragonfly*|midnightbsd*)
10702         # 5.x headers associate
10703         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10704         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10705         cf_POSIX_C_SOURCE=200112L
10706         cf_XOPEN_SOURCE=600
10707         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10708         ;;
10709 (hpux11*)
10710         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10711         ;;
10712 (hpux*)
10713         cf_xopen_source="-D_HPUX_SOURCE"
10714         ;;
10715 (irix[56].*)
10716         cf_xopen_source="-D_SGI_SOURCE"
10717         cf_XOPEN_SOURCE=
10718         ;;
10719 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10720
10721 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10722
10723 echo "$as_me:10723: checking if this is the GNU C library" >&5
10724 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10725 if test "${cf_cv_gnu_library+set}" = set; then
10726   echo $ECHO_N "(cached) $ECHO_C" >&6
10727 else
10728
10729 cat >"conftest.$ac_ext" <<_ACEOF
10730 #line 10730 "configure"
10731 #include "confdefs.h"
10732 #include <sys/types.h>
10733 int
10734 main (void)
10735 {
10736
10737         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10738                 return 0;
10739         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10740                 return 0;
10741         #else
10742         #       error not GNU C library
10743         #endif
10744   ;
10745   return 0;
10746 }
10747 _ACEOF
10748 rm -f "conftest.$ac_objext"
10749 if { (eval echo "$as_me:10749: \"$ac_compile\"") >&5
10750   (eval $ac_compile) 2>&5
10751   ac_status=$?
10752   echo "$as_me:10752: \$? = $ac_status" >&5
10753   (exit "$ac_status"); } &&
10754          { ac_try='test -s "conftest.$ac_objext"'
10755   { (eval echo "$as_me:10755: \"$ac_try\"") >&5
10756   (eval $ac_try) 2>&5
10757   ac_status=$?
10758   echo "$as_me:10758: \$? = $ac_status" >&5
10759   (exit "$ac_status"); }; }; then
10760   cf_cv_gnu_library=yes
10761 else
10762   echo "$as_me: failed program was:" >&5
10763 cat "conftest.$ac_ext" >&5
10764 cf_cv_gnu_library=no
10765 fi
10766 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10767
10768 fi
10769 echo "$as_me:10769: result: $cf_cv_gnu_library" >&5
10770 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10771
10772 if test x$cf_cv_gnu_library = xyes; then
10773
10774         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10775         # was changed to help a little.  newlib incorporated the change about 4
10776         # years later.
10777         echo "$as_me:10777: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10778 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10779 if test "${cf_cv_gnu_library_219+set}" = set; then
10780   echo $ECHO_N "(cached) $ECHO_C" >&6
10781 else
10782
10783                 cf_save="$CPPFLAGS"
10784
10785         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10786         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10787
10788                 cat >"conftest.$ac_ext" <<_ACEOF
10789 #line 10789 "configure"
10790 #include "confdefs.h"
10791 #include <sys/types.h>
10792 int
10793 main (void)
10794 {
10795
10796                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10797                                 return 0;
10798                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10799                                 return 0;
10800                         #else
10801                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10802                         #endif
10803   ;
10804   return 0;
10805 }
10806 _ACEOF
10807 rm -f "conftest.$ac_objext"
10808 if { (eval echo "$as_me:10808: \"$ac_compile\"") >&5
10809   (eval $ac_compile) 2>&5
10810   ac_status=$?
10811   echo "$as_me:10811: \$? = $ac_status" >&5
10812   (exit "$ac_status"); } &&
10813          { ac_try='test -s "conftest.$ac_objext"'
10814   { (eval echo "$as_me:10814: \"$ac_try\"") >&5
10815   (eval $ac_try) 2>&5
10816   ac_status=$?
10817   echo "$as_me:10817: \$? = $ac_status" >&5
10818   (exit "$ac_status"); }; }; then
10819   cf_cv_gnu_library_219=yes
10820 else
10821   echo "$as_me: failed program was:" >&5
10822 cat "conftest.$ac_ext" >&5
10823 cf_cv_gnu_library_219=no
10824 fi
10825 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10826                 CPPFLAGS="$cf_save"
10827
10828 fi
10829 echo "$as_me:10829: result: $cf_cv_gnu_library_219" >&5
10830 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10831
10832         if test "x$cf_cv_gnu_library_219" = xyes; then
10833                 cf_save="$CPPFLAGS"
10834                 echo "$as_me:10834: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10835 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10836 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10837   echo $ECHO_N "(cached) $ECHO_C" >&6
10838 else
10839
10840 cf_fix_cppflags=no
10841 cf_new_cflags=
10842 cf_new_cppflags=
10843 cf_new_extra_cppflags=
10844
10845 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10846 do
10847 case "$cf_fix_cppflags" in
10848 (no)
10849         case "$cf_add_cflags" in
10850         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10851                 case "$cf_add_cflags" in
10852                 (-D*)
10853                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10854
10855                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10856                                 && test -z "${cf_tst_cflags}" \
10857                                 && cf_fix_cppflags=yes
10858
10859                         if test "$cf_fix_cppflags" = yes ; then
10860
10861         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10862         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10863
10864                                 continue
10865                         elif test "${cf_tst_cflags}" = "\"'" ; then
10866
10867         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10868         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10869
10870                                 continue
10871                         fi
10872                         ;;
10873                 esac
10874                 case "$CPPFLAGS" in
10875                 (*$cf_add_cflags)
10876                         ;;
10877                 (*)
10878                         case "$cf_add_cflags" in
10879                         (-D*)
10880                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10881
10882 CPPFLAGS=`echo "$CPPFLAGS" | \
10883         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10884                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10885
10886                                 ;;
10887                         esac
10888
10889         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10890         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10891
10892                         ;;
10893                 esac
10894                 ;;
10895         (*)
10896
10897         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10898         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10899
10900                 ;;
10901         esac
10902         ;;
10903 (yes)
10904
10905         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10906         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10907
10908         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10909
10910         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10911                 && test -z "${cf_tst_cflags}" \
10912                 && cf_fix_cppflags=no
10913         ;;
10914 esac
10915 done
10916
10917 if test -n "$cf_new_cflags" ; then
10918
10919         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10920         CFLAGS="${CFLAGS}$cf_new_cflags"
10921
10922 fi
10923
10924 if test -n "$cf_new_cppflags" ; then
10925
10926         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10927         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10928
10929 fi
10930
10931 if test -n "$cf_new_extra_cppflags" ; then
10932
10933         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10934         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10935
10936 fi
10937
10938                         cat >"conftest.$ac_ext" <<_ACEOF
10939 #line 10939 "configure"
10940 #include "confdefs.h"
10941
10942                                 #include <limits.h>
10943                                 #include <sys/types.h>
10944
10945 int
10946 main (void)
10947 {
10948
10949                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10950                                         return 0;
10951                                 #else
10952                                 #       error GNU C library is too old
10953                                 #endif
10954   ;
10955   return 0;
10956 }
10957 _ACEOF
10958 rm -f "conftest.$ac_objext"
10959 if { (eval echo "$as_me:10959: \"$ac_compile\"") >&5
10960   (eval $ac_compile) 2>&5
10961   ac_status=$?
10962   echo "$as_me:10962: \$? = $ac_status" >&5
10963   (exit "$ac_status"); } &&
10964          { ac_try='test -s "conftest.$ac_objext"'
10965   { (eval echo "$as_me:10965: \"$ac_try\"") >&5
10966   (eval $ac_try) 2>&5
10967   ac_status=$?
10968   echo "$as_me:10968: \$? = $ac_status" >&5
10969   (exit "$ac_status"); }; }; then
10970   cf_cv_gnu_dftsrc_219=yes
10971 else
10972   echo "$as_me: failed program was:" >&5
10973 cat "conftest.$ac_ext" >&5
10974 cf_cv_gnu_dftsrc_219=no
10975 fi
10976 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10977
10978 fi
10979 echo "$as_me:10979: result: $cf_cv_gnu_dftsrc_219" >&5
10980 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10981                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10982         else
10983                 cf_cv_gnu_dftsrc_219=maybe
10984         fi
10985
10986         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10987
10988                 echo "$as_me:10988: checking if we must define _GNU_SOURCE" >&5
10989 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10990 if test "${cf_cv_gnu_source+set}" = set; then
10991   echo $ECHO_N "(cached) $ECHO_C" >&6
10992 else
10993
10994                 cat >"conftest.$ac_ext" <<_ACEOF
10995 #line 10995 "configure"
10996 #include "confdefs.h"
10997 #include <sys/types.h>
10998 int
10999 main (void)
11000 {
11001
11002                         #ifndef _XOPEN_SOURCE
11003                         #error  expected _XOPEN_SOURCE to be defined
11004                         #endif
11005   ;
11006   return 0;
11007 }
11008 _ACEOF
11009 rm -f "conftest.$ac_objext"
11010 if { (eval echo "$as_me:11010: \"$ac_compile\"") >&5
11011   (eval $ac_compile) 2>&5
11012   ac_status=$?
11013   echo "$as_me:11013: \$? = $ac_status" >&5
11014   (exit "$ac_status"); } &&
11015          { ac_try='test -s "conftest.$ac_objext"'
11016   { (eval echo "$as_me:11016: \"$ac_try\"") >&5
11017   (eval $ac_try) 2>&5
11018   ac_status=$?
11019   echo "$as_me:11019: \$? = $ac_status" >&5
11020   (exit "$ac_status"); }; }; then
11021   cf_cv_gnu_source=no
11022 else
11023   echo "$as_me: failed program was:" >&5
11024 cat "conftest.$ac_ext" >&5
11025 cf_save="$CPPFLAGS"
11026
11027 cf_fix_cppflags=no
11028 cf_new_cflags=
11029 cf_new_cppflags=
11030 cf_new_extra_cppflags=
11031
11032 for cf_add_cflags in -D_GNU_SOURCE
11033 do
11034 case "$cf_fix_cppflags" in
11035 (no)
11036         case "$cf_add_cflags" in
11037         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11038                 case "$cf_add_cflags" in
11039                 (-D*)
11040                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11041
11042                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11043                                 && test -z "${cf_tst_cflags}" \
11044                                 && cf_fix_cppflags=yes
11045
11046                         if test "$cf_fix_cppflags" = yes ; then
11047
11048         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11049         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11050
11051                                 continue
11052                         elif test "${cf_tst_cflags}" = "\"'" ; then
11053
11054         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11055         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11056
11057                                 continue
11058                         fi
11059                         ;;
11060                 esac
11061                 case "$CPPFLAGS" in
11062                 (*$cf_add_cflags)
11063                         ;;
11064                 (*)
11065                         case "$cf_add_cflags" in
11066                         (-D*)
11067                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11068
11069 CPPFLAGS=`echo "$CPPFLAGS" | \
11070         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11071                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11072
11073                                 ;;
11074                         esac
11075
11076         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11077         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11078
11079                         ;;
11080                 esac
11081                 ;;
11082         (*)
11083
11084         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11085         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11086
11087                 ;;
11088         esac
11089         ;;
11090 (yes)
11091
11092         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11093         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11094
11095         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11096
11097         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11098                 && test -z "${cf_tst_cflags}" \
11099                 && cf_fix_cppflags=no
11100         ;;
11101 esac
11102 done
11103
11104 if test -n "$cf_new_cflags" ; then
11105
11106         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11107         CFLAGS="${CFLAGS}$cf_new_cflags"
11108
11109 fi
11110
11111 if test -n "$cf_new_cppflags" ; then
11112
11113         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11114         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11115
11116 fi
11117
11118 if test -n "$cf_new_extra_cppflags" ; then
11119
11120         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11121         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11122
11123 fi
11124
11125                          cat >"conftest.$ac_ext" <<_ACEOF
11126 #line 11126 "configure"
11127 #include "confdefs.h"
11128 #include <sys/types.h>
11129 int
11130 main (void)
11131 {
11132
11133                                 #ifdef _XOPEN_SOURCE
11134                                 #error  expected _XOPEN_SOURCE to be undefined
11135                                 #endif
11136   ;
11137   return 0;
11138 }
11139 _ACEOF
11140 rm -f "conftest.$ac_objext"
11141 if { (eval echo "$as_me:11141: \"$ac_compile\"") >&5
11142   (eval $ac_compile) 2>&5
11143   ac_status=$?
11144   echo "$as_me:11144: \$? = $ac_status" >&5
11145   (exit "$ac_status"); } &&
11146          { ac_try='test -s "conftest.$ac_objext"'
11147   { (eval echo "$as_me:11147: \"$ac_try\"") >&5
11148   (eval $ac_try) 2>&5
11149   ac_status=$?
11150   echo "$as_me:11150: \$? = $ac_status" >&5
11151   (exit "$ac_status"); }; }; then
11152   cf_cv_gnu_source=no
11153 else
11154   echo "$as_me: failed program was:" >&5
11155 cat "conftest.$ac_ext" >&5
11156 cf_cv_gnu_source=yes
11157 fi
11158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11159                         CPPFLAGS="$cf_save"
11160
11161 fi
11162 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11163
11164 fi
11165 echo "$as_me:11165: result: $cf_cv_gnu_source" >&5
11166 echo "${ECHO_T}$cf_cv_gnu_source" >&6
11167
11168                 if test "$cf_cv_gnu_source" = yes
11169                 then
11170                 echo "$as_me:11170: checking if we should also define _DEFAULT_SOURCE" >&5
11171 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11172 if test "${cf_cv_default_source+set}" = set; then
11173   echo $ECHO_N "(cached) $ECHO_C" >&6
11174 else
11175
11176         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11177         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11178
11179                         cat >"conftest.$ac_ext" <<_ACEOF
11180 #line 11180 "configure"
11181 #include "confdefs.h"
11182 #include <sys/types.h>
11183 int
11184 main (void)
11185 {
11186
11187                                 #ifdef _DEFAULT_SOURCE
11188                                 #error  expected _DEFAULT_SOURCE to be undefined
11189                                 #endif
11190   ;
11191   return 0;
11192 }
11193 _ACEOF
11194 rm -f "conftest.$ac_objext"
11195 if { (eval echo "$as_me:11195: \"$ac_compile\"") >&5
11196   (eval $ac_compile) 2>&5
11197   ac_status=$?
11198   echo "$as_me:11198: \$? = $ac_status" >&5
11199   (exit "$ac_status"); } &&
11200          { ac_try='test -s "conftest.$ac_objext"'
11201   { (eval echo "$as_me:11201: \"$ac_try\"") >&5
11202   (eval $ac_try) 2>&5
11203   ac_status=$?
11204   echo "$as_me:11204: \$? = $ac_status" >&5
11205   (exit "$ac_status"); }; }; then
11206   cf_cv_default_source=no
11207 else
11208   echo "$as_me: failed program was:" >&5
11209 cat "conftest.$ac_ext" >&5
11210 cf_cv_default_source=yes
11211 fi
11212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11213
11214 fi
11215 echo "$as_me:11215: result: $cf_cv_default_source" >&5
11216 echo "${ECHO_T}$cf_cv_default_source" >&6
11217                         if test "$cf_cv_default_source" = yes
11218                         then
11219
11220         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11221         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11222
11223                         fi
11224                 fi
11225         fi
11226
11227 fi
11228
11229         ;;
11230 (minix*)
11231         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11232         ;;
11233 (mirbsd*)
11234         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11235         cf_XOPEN_SOURCE=
11236
11237 if test "$cf_cv_posix_visible" = no; then
11238
11239 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11240
11241 cf_save_CFLAGS="$CFLAGS"
11242 cf_save_CPPFLAGS="$CPPFLAGS"
11243
11244 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11245         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11246                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11247
11248 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11249         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11250                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11251
11252 echo "$as_me:11252: checking if we should define _POSIX_C_SOURCE" >&5
11253 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11254 if test "${cf_cv_posix_c_source+set}" = set; then
11255   echo $ECHO_N "(cached) $ECHO_C" >&6
11256 else
11257
11258 echo "${as_me:-configure}:11258: testing if the symbol is already defined go no further ..." 1>&5
11259
11260         cat >"conftest.$ac_ext" <<_ACEOF
11261 #line 11261 "configure"
11262 #include "confdefs.h"
11263 #include <sys/types.h>
11264 int
11265 main (void)
11266 {
11267
11268 #ifndef _POSIX_C_SOURCE
11269 #error _POSIX_C_SOURCE is not defined
11270 #endif
11271   ;
11272   return 0;
11273 }
11274 _ACEOF
11275 rm -f "conftest.$ac_objext"
11276 if { (eval echo "$as_me:11276: \"$ac_compile\"") >&5
11277   (eval $ac_compile) 2>&5
11278   ac_status=$?
11279   echo "$as_me:11279: \$? = $ac_status" >&5
11280   (exit "$ac_status"); } &&
11281          { ac_try='test -s "conftest.$ac_objext"'
11282   { (eval echo "$as_me:11282: \"$ac_try\"") >&5
11283   (eval $ac_try) 2>&5
11284   ac_status=$?
11285   echo "$as_me:11285: \$? = $ac_status" >&5
11286   (exit "$ac_status"); }; }; then
11287   cf_cv_posix_c_source=no
11288 else
11289   echo "$as_me: failed program was:" >&5
11290 cat "conftest.$ac_ext" >&5
11291 cf_want_posix_source=no
11292          case .$cf_POSIX_C_SOURCE in
11293          (.[12]??*)
11294                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11295                 ;;
11296          (.2)
11297                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11298                 cf_want_posix_source=yes
11299                 ;;
11300          (.*)
11301                 cf_want_posix_source=yes
11302                 ;;
11303          esac
11304          if test "$cf_want_posix_source" = yes ; then
11305                 cat >"conftest.$ac_ext" <<_ACEOF
11306 #line 11306 "configure"
11307 #include "confdefs.h"
11308 #include <sys/types.h>
11309 int
11310 main (void)
11311 {
11312
11313 #ifdef _POSIX_SOURCE
11314 #error _POSIX_SOURCE is defined
11315 #endif
11316   ;
11317   return 0;
11318 }
11319 _ACEOF
11320 rm -f "conftest.$ac_objext"
11321 if { (eval echo "$as_me:11321: \"$ac_compile\"") >&5
11322   (eval $ac_compile) 2>&5
11323   ac_status=$?
11324   echo "$as_me:11324: \$? = $ac_status" >&5
11325   (exit "$ac_status"); } &&
11326          { ac_try='test -s "conftest.$ac_objext"'
11327   { (eval echo "$as_me:11327: \"$ac_try\"") >&5
11328   (eval $ac_try) 2>&5
11329   ac_status=$?
11330   echo "$as_me:11330: \$? = $ac_status" >&5
11331   (exit "$ac_status"); }; }; then
11332   :
11333 else
11334   echo "$as_me: failed program was:" >&5
11335 cat "conftest.$ac_ext" >&5
11336 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11337 fi
11338 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11339          fi
11340
11341 echo "${as_me:-configure}:11341: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11342
11343          CFLAGS="$cf_trim_CFLAGS"
11344          CPPFLAGS="$cf_trim_CPPFLAGS"
11345
11346         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11347         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11348
11349 echo "${as_me:-configure}:11349: testing if the second compile does not leave our definition intact error ..." 1>&5
11350
11351          cat >"conftest.$ac_ext" <<_ACEOF
11352 #line 11352 "configure"
11353 #include "confdefs.h"
11354 #include <sys/types.h>
11355 int
11356 main (void)
11357 {
11358
11359 #ifndef _POSIX_C_SOURCE
11360 #error _POSIX_C_SOURCE is not defined
11361 #endif
11362   ;
11363   return 0;
11364 }
11365 _ACEOF
11366 rm -f "conftest.$ac_objext"
11367 if { (eval echo "$as_me:11367: \"$ac_compile\"") >&5
11368   (eval $ac_compile) 2>&5
11369   ac_status=$?
11370   echo "$as_me:11370: \$? = $ac_status" >&5
11371   (exit "$ac_status"); } &&
11372          { ac_try='test -s "conftest.$ac_objext"'
11373   { (eval echo "$as_me:11373: \"$ac_try\"") >&5
11374   (eval $ac_try) 2>&5
11375   ac_status=$?
11376   echo "$as_me:11376: \$? = $ac_status" >&5
11377   (exit "$ac_status"); }; }; then
11378   :
11379 else
11380   echo "$as_me: failed program was:" >&5
11381 cat "conftest.$ac_ext" >&5
11382 cf_cv_posix_c_source=no
11383 fi
11384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11385          CFLAGS="$cf_save_CFLAGS"
11386          CPPFLAGS="$cf_save_CPPFLAGS"
11387
11388 fi
11389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11390
11391 fi
11392 echo "$as_me:11392: result: $cf_cv_posix_c_source" >&5
11393 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11394
11395 if test "$cf_cv_posix_c_source" != no ; then
11396         CFLAGS="$cf_trim_CFLAGS"
11397         CPPFLAGS="$cf_trim_CPPFLAGS"
11398
11399 cf_fix_cppflags=no
11400 cf_new_cflags=
11401 cf_new_cppflags=
11402 cf_new_extra_cppflags=
11403
11404 for cf_add_cflags in $cf_cv_posix_c_source
11405 do
11406 case "$cf_fix_cppflags" in
11407 (no)
11408         case "$cf_add_cflags" in
11409         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11410                 case "$cf_add_cflags" in
11411                 (-D*)
11412                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11413
11414                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11415                                 && test -z "${cf_tst_cflags}" \
11416                                 && cf_fix_cppflags=yes
11417
11418                         if test "$cf_fix_cppflags" = yes ; then
11419
11420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11422
11423                                 continue
11424                         elif test "${cf_tst_cflags}" = "\"'" ; then
11425
11426         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11427         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11428
11429                                 continue
11430                         fi
11431                         ;;
11432                 esac
11433                 case "$CPPFLAGS" in
11434                 (*$cf_add_cflags)
11435                         ;;
11436                 (*)
11437                         case "$cf_add_cflags" in
11438                         (-D*)
11439                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11440
11441 CPPFLAGS=`echo "$CPPFLAGS" | \
11442         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11443                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11444
11445                                 ;;
11446                         esac
11447
11448         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11449         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11450
11451                         ;;
11452                 esac
11453                 ;;
11454         (*)
11455
11456         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11457         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11458
11459                 ;;
11460         esac
11461         ;;
11462 (yes)
11463
11464         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11465         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11466
11467         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11468
11469         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11470                 && test -z "${cf_tst_cflags}" \
11471                 && cf_fix_cppflags=no
11472         ;;
11473 esac
11474 done
11475
11476 if test -n "$cf_new_cflags" ; then
11477
11478         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11479         CFLAGS="${CFLAGS}$cf_new_cflags"
11480
11481 fi
11482
11483 if test -n "$cf_new_cppflags" ; then
11484
11485         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11486         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11487
11488 fi
11489
11490 if test -n "$cf_new_extra_cppflags" ; then
11491
11492         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11493         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11494
11495 fi
11496
11497 fi
11498
11499 fi # cf_cv_posix_visible
11500
11501         ;;
11502 (netbsd*)
11503         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11504         ;;
11505 (openbsd[6-9]*)
11506         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11507         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11508         # Abusing the conformance level is a workaround.
11509         { echo "$as_me:11509: WARNING: this system does not provide usable locale support" >&5
11510 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11511         cf_xopen_source="-D_BSD_SOURCE"
11512         cf_XOPEN_SOURCE=700
11513         ;;
11514 (openbsd[4-5]*)
11515         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11516         cf_xopen_source="-D_BSD_SOURCE"
11517         cf_XOPEN_SOURCE=600
11518         ;;
11519 (openbsd*)
11520         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11521         ;;
11522 (osf[45]*)
11523         cf_xopen_source="-D_OSF_SOURCE"
11524         ;;
11525 (nto-qnx*)
11526         cf_xopen_source="-D_QNX_SOURCE"
11527         ;;
11528 (sco*)
11529         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11530         ;;
11531 (solaris2.*)
11532         cf_xopen_source="-D__EXTENSIONS__"
11533         cf_cv_xopen_source=broken
11534         ;;
11535 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11536         cf_XOPEN_SOURCE=
11537         cf_POSIX_C_SOURCE=
11538         ;;
11539 (*)
11540
11541 echo "$as_me:11541: checking if we should define _XOPEN_SOURCE" >&5
11542 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11543 if test "${cf_cv_xopen_source+set}" = set; then
11544   echo $ECHO_N "(cached) $ECHO_C" >&6
11545 else
11546
11547         cat >"conftest.$ac_ext" <<_ACEOF
11548 #line 11548 "configure"
11549 #include "confdefs.h"
11550
11551 $ac_includes_default
11552
11553 int
11554 main (void)
11555 {
11556
11557 #ifndef _XOPEN_SOURCE
11558 #error _XOPEN_SOURCE is not defined
11559 #endif
11560
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 rm -f "conftest.$ac_objext"
11566 if { (eval echo "$as_me:11566: \"$ac_compile\"") >&5
11567   (eval $ac_compile) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit "$ac_status"); } &&
11571          { ac_try='test -s "conftest.$ac_objext"'
11572   { (eval echo "$as_me:11572: \"$ac_try\"") >&5
11573   (eval $ac_try) 2>&5
11574   ac_status=$?
11575   echo "$as_me:11575: \$? = $ac_status" >&5
11576   (exit "$ac_status"); }; }; then
11577   cf_cv_xopen_source=no
11578 else
11579   echo "$as_me: failed program was:" >&5
11580 cat "conftest.$ac_ext" >&5
11581 cf_save="$CPPFLAGS"
11582
11583         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11584         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11585
11586          cat >"conftest.$ac_ext" <<_ACEOF
11587 #line 11587 "configure"
11588 #include "confdefs.h"
11589
11590 $ac_includes_default
11591
11592 int
11593 main (void)
11594 {
11595
11596 #ifndef _XOPEN_SOURCE
11597 #error _XOPEN_SOURCE is not defined
11598 #endif
11599
11600   ;
11601   return 0;
11602 }
11603 _ACEOF
11604 rm -f "conftest.$ac_objext"
11605 if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
11606   (eval $ac_compile) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit "$ac_status"); } &&
11610          { ac_try='test -s "conftest.$ac_objext"'
11611   { (eval echo "$as_me:11611: \"$ac_try\"") >&5
11612   (eval $ac_try) 2>&5
11613   ac_status=$?
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit "$ac_status"); }; }; then
11616   cf_cv_xopen_source=no
11617 else
11618   echo "$as_me: failed program was:" >&5
11619 cat "conftest.$ac_ext" >&5
11620 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11621 fi
11622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11623                 CPPFLAGS="$cf_save"
11624
11625 fi
11626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11627
11628 fi
11629 echo "$as_me:11629: result: $cf_cv_xopen_source" >&5
11630 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11631
11632 if test "$cf_cv_xopen_source" != no ; then
11633
11634 CFLAGS=`echo "$CFLAGS" | \
11635         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11636                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11637
11638 CPPFLAGS=`echo "$CPPFLAGS" | \
11639         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11640                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11641
11642         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11643
11644 for cf_add_cflags in $cf_temp_xopen_source
11645 do
11646         case "x$cf_add_cflags" in
11647         (x-[DU]*)
11648
11649 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11650 while true
11651 do
11652         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'`
11653         test "$CFLAGS" != "$cf_old_cflag" || break
11654
11655         CFLAGS="$cf_old_cflag"
11656 done
11657
11658 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11659 while true
11660 do
11661         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'`
11662         test "$CPPFLAGS" != "$cf_old_cflag" || break
11663
11664         CPPFLAGS="$cf_old_cflag"
11665 done
11666
11667                 ;;
11668         esac
11669
11670 cf_fix_cppflags=no
11671 cf_new_cflags=
11672 cf_new_cppflags=
11673 cf_new_extra_cppflags=
11674
11675 for cf_add_cflags in $cf_add_cflags
11676 do
11677 case "$cf_fix_cppflags" in
11678 (no)
11679         case "$cf_add_cflags" in
11680         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11681                 case "$cf_add_cflags" in
11682                 (-D*)
11683                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11684
11685                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11686                                 && test -z "${cf_tst_cflags}" \
11687                                 && cf_fix_cppflags=yes
11688
11689                         if test "$cf_fix_cppflags" = yes ; then
11690
11691         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11692         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11693
11694                                 continue
11695                         elif test "${cf_tst_cflags}" = "\"'" ; then
11696
11697         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11698         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11699
11700                                 continue
11701                         fi
11702                         ;;
11703                 esac
11704                 case "$CPPFLAGS" in
11705                 (*$cf_add_cflags)
11706                         ;;
11707                 (*)
11708                         case "$cf_add_cflags" in
11709                         (-D*)
11710                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11711
11712 CPPFLAGS=`echo "$CPPFLAGS" | \
11713         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11714                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11715
11716                                 ;;
11717                         esac
11718
11719         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11720         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11721
11722                         ;;
11723                 esac
11724                 ;;
11725         (*)
11726
11727         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11728         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11729
11730                 ;;
11731         esac
11732         ;;
11733 (yes)
11734
11735         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11736         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11737
11738         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11739
11740         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11741                 && test -z "${cf_tst_cflags}" \
11742                 && cf_fix_cppflags=no
11743         ;;
11744 esac
11745 done
11746
11747 if test -n "$cf_new_cflags" ; then
11748
11749         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11750         CFLAGS="${CFLAGS}$cf_new_cflags"
11751
11752 fi
11753
11754 if test -n "$cf_new_cppflags" ; then
11755
11756         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11757         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11758
11759 fi
11760
11761 if test -n "$cf_new_extra_cppflags" ; then
11762
11763         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11764         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11765
11766 fi
11767
11768 done
11769
11770 fi
11771
11772         cf_save_xopen_cppflags="$CPPFLAGS"
11773
11774 if test "$cf_cv_posix_visible" = no; then
11775
11776 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11777
11778 cf_save_CFLAGS="$CFLAGS"
11779 cf_save_CPPFLAGS="$CPPFLAGS"
11780
11781 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11782         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11783                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11784
11785 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11786         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11787                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11788
11789 echo "$as_me:11789: checking if we should define _POSIX_C_SOURCE" >&5
11790 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11791 if test "${cf_cv_posix_c_source+set}" = set; then
11792   echo $ECHO_N "(cached) $ECHO_C" >&6
11793 else
11794
11795 echo "${as_me:-configure}:11795: testing if the symbol is already defined go no further ..." 1>&5
11796
11797         cat >"conftest.$ac_ext" <<_ACEOF
11798 #line 11798 "configure"
11799 #include "confdefs.h"
11800 #include <sys/types.h>
11801 int
11802 main (void)
11803 {
11804
11805 #ifndef _POSIX_C_SOURCE
11806 #error _POSIX_C_SOURCE is not defined
11807 #endif
11808   ;
11809   return 0;
11810 }
11811 _ACEOF
11812 rm -f "conftest.$ac_objext"
11813 if { (eval echo "$as_me:11813: \"$ac_compile\"") >&5
11814   (eval $ac_compile) 2>&5
11815   ac_status=$?
11816   echo "$as_me:11816: \$? = $ac_status" >&5
11817   (exit "$ac_status"); } &&
11818          { ac_try='test -s "conftest.$ac_objext"'
11819   { (eval echo "$as_me:11819: \"$ac_try\"") >&5
11820   (eval $ac_try) 2>&5
11821   ac_status=$?
11822   echo "$as_me:11822: \$? = $ac_status" >&5
11823   (exit "$ac_status"); }; }; then
11824   cf_cv_posix_c_source=no
11825 else
11826   echo "$as_me: failed program was:" >&5
11827 cat "conftest.$ac_ext" >&5
11828 cf_want_posix_source=no
11829          case .$cf_POSIX_C_SOURCE in
11830          (.[12]??*)
11831                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11832                 ;;
11833          (.2)
11834                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11835                 cf_want_posix_source=yes
11836                 ;;
11837          (.*)
11838                 cf_want_posix_source=yes
11839                 ;;
11840          esac
11841          if test "$cf_want_posix_source" = yes ; then
11842                 cat >"conftest.$ac_ext" <<_ACEOF
11843 #line 11843 "configure"
11844 #include "confdefs.h"
11845 #include <sys/types.h>
11846 int
11847 main (void)
11848 {
11849
11850 #ifdef _POSIX_SOURCE
11851 #error _POSIX_SOURCE is defined
11852 #endif
11853   ;
11854   return 0;
11855 }
11856 _ACEOF
11857 rm -f "conftest.$ac_objext"
11858 if { (eval echo "$as_me:11858: \"$ac_compile\"") >&5
11859   (eval $ac_compile) 2>&5
11860   ac_status=$?
11861   echo "$as_me:11861: \$? = $ac_status" >&5
11862   (exit "$ac_status"); } &&
11863          { ac_try='test -s "conftest.$ac_objext"'
11864   { (eval echo "$as_me:11864: \"$ac_try\"") >&5
11865   (eval $ac_try) 2>&5
11866   ac_status=$?
11867   echo "$as_me:11867: \$? = $ac_status" >&5
11868   (exit "$ac_status"); }; }; then
11869   :
11870 else
11871   echo "$as_me: failed program was:" >&5
11872 cat "conftest.$ac_ext" >&5
11873 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11874 fi
11875 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11876          fi
11877
11878 echo "${as_me:-configure}:11878: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11879
11880          CFLAGS="$cf_trim_CFLAGS"
11881          CPPFLAGS="$cf_trim_CPPFLAGS"
11882
11883         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11884         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11885
11886 echo "${as_me:-configure}:11886: testing if the second compile does not leave our definition intact error ..." 1>&5
11887
11888          cat >"conftest.$ac_ext" <<_ACEOF
11889 #line 11889 "configure"
11890 #include "confdefs.h"
11891 #include <sys/types.h>
11892 int
11893 main (void)
11894 {
11895
11896 #ifndef _POSIX_C_SOURCE
11897 #error _POSIX_C_SOURCE is not defined
11898 #endif
11899   ;
11900   return 0;
11901 }
11902 _ACEOF
11903 rm -f "conftest.$ac_objext"
11904 if { (eval echo "$as_me:11904: \"$ac_compile\"") >&5
11905   (eval $ac_compile) 2>&5
11906   ac_status=$?
11907   echo "$as_me:11907: \$? = $ac_status" >&5
11908   (exit "$ac_status"); } &&
11909          { ac_try='test -s "conftest.$ac_objext"'
11910   { (eval echo "$as_me:11910: \"$ac_try\"") >&5
11911   (eval $ac_try) 2>&5
11912   ac_status=$?
11913   echo "$as_me:11913: \$? = $ac_status" >&5
11914   (exit "$ac_status"); }; }; then
11915   :
11916 else
11917   echo "$as_me: failed program was:" >&5
11918 cat "conftest.$ac_ext" >&5
11919 cf_cv_posix_c_source=no
11920 fi
11921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11922          CFLAGS="$cf_save_CFLAGS"
11923          CPPFLAGS="$cf_save_CPPFLAGS"
11924
11925 fi
11926 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11927
11928 fi
11929 echo "$as_me:11929: result: $cf_cv_posix_c_source" >&5
11930 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11931
11932 if test "$cf_cv_posix_c_source" != no ; then
11933         CFLAGS="$cf_trim_CFLAGS"
11934         CPPFLAGS="$cf_trim_CPPFLAGS"
11935
11936 cf_fix_cppflags=no
11937 cf_new_cflags=
11938 cf_new_cppflags=
11939 cf_new_extra_cppflags=
11940
11941 for cf_add_cflags in $cf_cv_posix_c_source
11942 do
11943 case "$cf_fix_cppflags" in
11944 (no)
11945         case "$cf_add_cflags" in
11946         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11947                 case "$cf_add_cflags" in
11948                 (-D*)
11949                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11950
11951                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11952                                 && test -z "${cf_tst_cflags}" \
11953                                 && cf_fix_cppflags=yes
11954
11955                         if test "$cf_fix_cppflags" = yes ; then
11956
11957         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11958         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11959
11960                                 continue
11961                         elif test "${cf_tst_cflags}" = "\"'" ; then
11962
11963         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11964         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11965
11966                                 continue
11967                         fi
11968                         ;;
11969                 esac
11970                 case "$CPPFLAGS" in
11971                 (*$cf_add_cflags)
11972                         ;;
11973                 (*)
11974                         case "$cf_add_cflags" in
11975                         (-D*)
11976                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11977
11978 CPPFLAGS=`echo "$CPPFLAGS" | \
11979         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11980                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11981
11982                                 ;;
11983                         esac
11984
11985         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11986         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11987
11988                         ;;
11989                 esac
11990                 ;;
11991         (*)
11992
11993         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11994         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11995
11996                 ;;
11997         esac
11998         ;;
11999 (yes)
12000
12001         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12002         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12003
12004         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12005
12006         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12007                 && test -z "${cf_tst_cflags}" \
12008                 && cf_fix_cppflags=no
12009         ;;
12010 esac
12011 done
12012
12013 if test -n "$cf_new_cflags" ; then
12014
12015         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12016         CFLAGS="${CFLAGS}$cf_new_cflags"
12017
12018 fi
12019
12020 if test -n "$cf_new_cppflags" ; then
12021
12022         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12023         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12024
12025 fi
12026
12027 if test -n "$cf_new_extra_cppflags" ; then
12028
12029         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12030         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12031
12032 fi
12033
12034 fi
12035
12036 fi # cf_cv_posix_visible
12037
12038         # Some of these niche implementations use copy/paste, double-check...
12039         if test "$cf_cv_xopen_source" = no ; then
12040                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
12041
12042 echo "${as_me:-configure}:12042: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
12043
12044                 cat >"conftest.$ac_ext" <<_ACEOF
12045 #line 12045 "configure"
12046 #include "confdefs.h"
12047
12048 $ac_includes_default
12049
12050 int
12051 main (void)
12052 {
12053
12054 #ifndef _XOPEN_SOURCE
12055 #error _XOPEN_SOURCE is not defined
12056 #endif
12057
12058   ;
12059   return 0;
12060 }
12061 _ACEOF
12062 rm -f "conftest.$ac_objext"
12063 if { (eval echo "$as_me:12063: \"$ac_compile\"") >&5
12064   (eval $ac_compile) 2>&5
12065   ac_status=$?
12066   echo "$as_me:12066: \$? = $ac_status" >&5
12067   (exit "$ac_status"); } &&
12068          { ac_try='test -s "conftest.$ac_objext"'
12069   { (eval echo "$as_me:12069: \"$ac_try\"") >&5
12070   (eval $ac_try) 2>&5
12071   ac_status=$?
12072   echo "$as_me:12072: \$? = $ac_status" >&5
12073   (exit "$ac_status"); }; }; then
12074   :
12075 else
12076   echo "$as_me: failed program was:" >&5
12077 cat "conftest.$ac_ext" >&5
12078
12079                         { echo "$as_me:12079: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
12080 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
12081                         CPPFLAGS="$cf_save_xopen_cppflags"
12082 fi
12083 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12084         fi
12085         ;;
12086 esac
12087
12088 if test -n "$cf_xopen_source" ; then
12089
12090 for cf_add_cflags in $cf_xopen_source
12091 do
12092         case "x$cf_add_cflags" in
12093         (x-[DU]*)
12094
12095 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12096 while true
12097 do
12098         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'`
12099         test "$CFLAGS" != "$cf_old_cflag" || break
12100         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
12101
12102 echo "${as_me:-configure}:12102: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
12103
12104         CFLAGS="$cf_old_cflag"
12105 done
12106
12107 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12108 while true
12109 do
12110         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'`
12111         test "$CPPFLAGS" != "$cf_old_cflag" || break
12112         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
12113
12114 echo "${as_me:-configure}:12114: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
12115
12116         CPPFLAGS="$cf_old_cflag"
12117 done
12118
12119                 ;;
12120         esac
12121
12122 cf_fix_cppflags=no
12123 cf_new_cflags=
12124 cf_new_cppflags=
12125 cf_new_extra_cppflags=
12126
12127 for cf_add_cflags in $cf_add_cflags
12128 do
12129 case "$cf_fix_cppflags" in
12130 (no)
12131         case "$cf_add_cflags" in
12132         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12133                 case "$cf_add_cflags" in
12134                 (-D*)
12135                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12136
12137                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12138                                 && test -z "${cf_tst_cflags}" \
12139                                 && cf_fix_cppflags=yes
12140
12141                         if test "$cf_fix_cppflags" = yes ; then
12142
12143         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12144         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12145
12146                                 continue
12147                         elif test "${cf_tst_cflags}" = "\"'" ; then
12148
12149         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12150         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12151
12152                                 continue
12153                         fi
12154                         ;;
12155                 esac
12156                 case "$CPPFLAGS" in
12157                 (*$cf_add_cflags)
12158                         ;;
12159                 (*)
12160                         case "$cf_add_cflags" in
12161                         (-D*)
12162                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12163
12164 CPPFLAGS=`echo "$CPPFLAGS" | \
12165         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12166                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12167
12168                                 ;;
12169                         esac
12170
12171         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12172         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12173
12174                         ;;
12175                 esac
12176                 ;;
12177         (*)
12178
12179         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12180         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12181
12182                 ;;
12183         esac
12184         ;;
12185 (yes)
12186
12187         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12188         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12189
12190         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12191
12192         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12193                 && test -z "${cf_tst_cflags}" \
12194                 && cf_fix_cppflags=no
12195         ;;
12196 esac
12197 done
12198
12199 if test -n "$cf_new_cflags" ; then
12200         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
12201
12202 echo "${as_me:-configure}:12202: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12203
12204         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12205         CFLAGS="${CFLAGS}$cf_new_cflags"
12206
12207 fi
12208
12209 if test -n "$cf_new_cppflags" ; then
12210         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12211
12212 echo "${as_me:-configure}:12212: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12213
12214         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12215         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12216
12217 fi
12218
12219 if test -n "$cf_new_extra_cppflags" ; then
12220         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12221
12222 echo "${as_me:-configure}:12222: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12223
12224         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12225         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12226
12227 fi
12228
12229 done
12230
12231 fi
12232
12233 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12234         echo "$as_me:12234: checking if _XOPEN_SOURCE really is set" >&5
12235 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12236         cat >"conftest.$ac_ext" <<_ACEOF
12237 #line 12237 "configure"
12238 #include "confdefs.h"
12239 #include <stdlib.h>
12240 int
12241 main (void)
12242 {
12243
12244 #ifndef _XOPEN_SOURCE
12245 #error _XOPEN_SOURCE is not defined
12246 #endif
12247   ;
12248   return 0;
12249 }
12250 _ACEOF
12251 rm -f "conftest.$ac_objext"
12252 if { (eval echo "$as_me:12252: \"$ac_compile\"") >&5
12253   (eval $ac_compile) 2>&5
12254   ac_status=$?
12255   echo "$as_me:12255: \$? = $ac_status" >&5
12256   (exit "$ac_status"); } &&
12257          { ac_try='test -s "conftest.$ac_objext"'
12258   { (eval echo "$as_me:12258: \"$ac_try\"") >&5
12259   (eval $ac_try) 2>&5
12260   ac_status=$?
12261   echo "$as_me:12261: \$? = $ac_status" >&5
12262   (exit "$ac_status"); }; }; then
12263   cf_XOPEN_SOURCE_set=yes
12264 else
12265   echo "$as_me: failed program was:" >&5
12266 cat "conftest.$ac_ext" >&5
12267 cf_XOPEN_SOURCE_set=no
12268 fi
12269 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12270         echo "$as_me:12270: result: $cf_XOPEN_SOURCE_set" >&5
12271 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12272         if test "$cf_XOPEN_SOURCE_set" = yes
12273         then
12274                 cat >"conftest.$ac_ext" <<_ACEOF
12275 #line 12275 "configure"
12276 #include "confdefs.h"
12277 #include <stdlib.h>
12278 int
12279 main (void)
12280 {
12281
12282 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12283 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12284 #endif
12285   ;
12286   return 0;
12287 }
12288 _ACEOF
12289 rm -f "conftest.$ac_objext"
12290 if { (eval echo "$as_me:12290: \"$ac_compile\"") >&5
12291   (eval $ac_compile) 2>&5
12292   ac_status=$?
12293   echo "$as_me:12293: \$? = $ac_status" >&5
12294   (exit "$ac_status"); } &&
12295          { ac_try='test -s "conftest.$ac_objext"'
12296   { (eval echo "$as_me:12296: \"$ac_try\"") >&5
12297   (eval $ac_try) 2>&5
12298   ac_status=$?
12299   echo "$as_me:12299: \$? = $ac_status" >&5
12300   (exit "$ac_status"); }; }; then
12301   cf_XOPEN_SOURCE_set_ok=yes
12302 else
12303   echo "$as_me: failed program was:" >&5
12304 cat "conftest.$ac_ext" >&5
12305 cf_XOPEN_SOURCE_set_ok=no
12306 fi
12307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12308                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12309                 then
12310                         { echo "$as_me:12310: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12311 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12312                 fi
12313         else
12314
12315 echo "$as_me:12315: checking if we should define _XOPEN_SOURCE" >&5
12316 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12317 if test "${cf_cv_xopen_source+set}" = set; then
12318   echo $ECHO_N "(cached) $ECHO_C" >&6
12319 else
12320
12321         cat >"conftest.$ac_ext" <<_ACEOF
12322 #line 12322 "configure"
12323 #include "confdefs.h"
12324
12325 $ac_includes_default
12326
12327 int
12328 main (void)
12329 {
12330
12331 #ifndef _XOPEN_SOURCE
12332 #error _XOPEN_SOURCE is not defined
12333 #endif
12334
12335   ;
12336   return 0;
12337 }
12338 _ACEOF
12339 rm -f "conftest.$ac_objext"
12340 if { (eval echo "$as_me:12340: \"$ac_compile\"") >&5
12341   (eval $ac_compile) 2>&5
12342   ac_status=$?
12343   echo "$as_me:12343: \$? = $ac_status" >&5
12344   (exit "$ac_status"); } &&
12345          { ac_try='test -s "conftest.$ac_objext"'
12346   { (eval echo "$as_me:12346: \"$ac_try\"") >&5
12347   (eval $ac_try) 2>&5
12348   ac_status=$?
12349   echo "$as_me:12349: \$? = $ac_status" >&5
12350   (exit "$ac_status"); }; }; then
12351   cf_cv_xopen_source=no
12352 else
12353   echo "$as_me: failed program was:" >&5
12354 cat "conftest.$ac_ext" >&5
12355 cf_save="$CPPFLAGS"
12356
12357         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12358         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12359
12360          cat >"conftest.$ac_ext" <<_ACEOF
12361 #line 12361 "configure"
12362 #include "confdefs.h"
12363
12364 $ac_includes_default
12365
12366 int
12367 main (void)
12368 {
12369
12370 #ifndef _XOPEN_SOURCE
12371 #error _XOPEN_SOURCE is not defined
12372 #endif
12373
12374   ;
12375   return 0;
12376 }
12377 _ACEOF
12378 rm -f "conftest.$ac_objext"
12379 if { (eval echo "$as_me:12379: \"$ac_compile\"") >&5
12380   (eval $ac_compile) 2>&5
12381   ac_status=$?
12382   echo "$as_me:12382: \$? = $ac_status" >&5
12383   (exit "$ac_status"); } &&
12384          { ac_try='test -s "conftest.$ac_objext"'
12385   { (eval echo "$as_me:12385: \"$ac_try\"") >&5
12386   (eval $ac_try) 2>&5
12387   ac_status=$?
12388   echo "$as_me:12388: \$? = $ac_status" >&5
12389   (exit "$ac_status"); }; }; then
12390   cf_cv_xopen_source=no
12391 else
12392   echo "$as_me: failed program was:" >&5
12393 cat "conftest.$ac_ext" >&5
12394 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12395 fi
12396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12397                 CPPFLAGS="$cf_save"
12398
12399 fi
12400 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12401
12402 fi
12403 echo "$as_me:12403: result: $cf_cv_xopen_source" >&5
12404 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12405
12406 if test "$cf_cv_xopen_source" != no ; then
12407
12408 CFLAGS=`echo "$CFLAGS" | \
12409         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12410                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12411
12412 CPPFLAGS=`echo "$CPPFLAGS" | \
12413         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12414                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12415
12416         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12417
12418 for cf_add_cflags in $cf_temp_xopen_source
12419 do
12420         case "x$cf_add_cflags" in
12421         (x-[DU]*)
12422
12423 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12424 while true
12425 do
12426         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'`
12427         test "$CFLAGS" != "$cf_old_cflag" || break
12428
12429         CFLAGS="$cf_old_cflag"
12430 done
12431
12432 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12433 while true
12434 do
12435         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'`
12436         test "$CPPFLAGS" != "$cf_old_cflag" || break
12437
12438         CPPFLAGS="$cf_old_cflag"
12439 done
12440
12441                 ;;
12442         esac
12443
12444 cf_fix_cppflags=no
12445 cf_new_cflags=
12446 cf_new_cppflags=
12447 cf_new_extra_cppflags=
12448
12449 for cf_add_cflags in $cf_add_cflags
12450 do
12451 case "$cf_fix_cppflags" in
12452 (no)
12453         case "$cf_add_cflags" in
12454         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12455                 case "$cf_add_cflags" in
12456                 (-D*)
12457                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12458
12459                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12460                                 && test -z "${cf_tst_cflags}" \
12461                                 && cf_fix_cppflags=yes
12462
12463                         if test "$cf_fix_cppflags" = yes ; then
12464
12465         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12466         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12467
12468                                 continue
12469                         elif test "${cf_tst_cflags}" = "\"'" ; then
12470
12471         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12472         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12473
12474                                 continue
12475                         fi
12476                         ;;
12477                 esac
12478                 case "$CPPFLAGS" in
12479                 (*$cf_add_cflags)
12480                         ;;
12481                 (*)
12482                         case "$cf_add_cflags" in
12483                         (-D*)
12484                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12485
12486 CPPFLAGS=`echo "$CPPFLAGS" | \
12487         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12488                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12489
12490                                 ;;
12491                         esac
12492
12493         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12494         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12495
12496                         ;;
12497                 esac
12498                 ;;
12499         (*)
12500
12501         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12502         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12503
12504                 ;;
12505         esac
12506         ;;
12507 (yes)
12508
12509         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12510         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12511
12512         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12513
12514         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12515                 && test -z "${cf_tst_cflags}" \
12516                 && cf_fix_cppflags=no
12517         ;;
12518 esac
12519 done
12520
12521 if test -n "$cf_new_cflags" ; then
12522
12523         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12524         CFLAGS="${CFLAGS}$cf_new_cflags"
12525
12526 fi
12527
12528 if test -n "$cf_new_cppflags" ; then
12529
12530         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12531         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12532
12533 fi
12534
12535 if test -n "$cf_new_extra_cppflags" ; then
12536
12537         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12538         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12539
12540 fi
12541
12542 done
12543
12544 fi
12545
12546         fi
12547 fi
12548 fi # cf_cv_posix_visible
12549
12550 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12551
12552 # Work around breakage on OS X
12553
12554 echo "$as_me:12554: checking if SIGWINCH is defined" >&5
12555 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12556 if test "${cf_cv_define_sigwinch+set}" = set; then
12557   echo $ECHO_N "(cached) $ECHO_C" >&6
12558 else
12559
12560         cat >"conftest.$ac_ext" <<_ACEOF
12561 #line 12561 "configure"
12562 #include "confdefs.h"
12563
12564 #include <sys/types.h>
12565 #include <sys/signal.h>
12566
12567 int
12568 main (void)
12569 {
12570 int x = SIGWINCH; (void)x
12571   ;
12572   return 0;
12573 }
12574 _ACEOF
12575 rm -f "conftest.$ac_objext"
12576 if { (eval echo "$as_me:12576: \"$ac_compile\"") >&5
12577   (eval $ac_compile) 2>&5
12578   ac_status=$?
12579   echo "$as_me:12579: \$? = $ac_status" >&5
12580   (exit "$ac_status"); } &&
12581          { ac_try='test -s "conftest.$ac_objext"'
12582   { (eval echo "$as_me:12582: \"$ac_try\"") >&5
12583   (eval $ac_try) 2>&5
12584   ac_status=$?
12585   echo "$as_me:12585: \$? = $ac_status" >&5
12586   (exit "$ac_status"); }; }; then
12587   cf_cv_define_sigwinch=yes
12588 else
12589   echo "$as_me: failed program was:" >&5
12590 cat "conftest.$ac_ext" >&5
12591 cat >"conftest.$ac_ext" <<_ACEOF
12592 #line 12592 "configure"
12593 #include "confdefs.h"
12594
12595 #undef _XOPEN_SOURCE
12596 #undef _POSIX_SOURCE
12597 #undef _POSIX_C_SOURCE
12598 #include <sys/types.h>
12599 #include <sys/signal.h>
12600
12601 int
12602 main (void)
12603 {
12604 int x = SIGWINCH; (void)x
12605   ;
12606   return 0;
12607 }
12608 _ACEOF
12609 rm -f "conftest.$ac_objext"
12610 if { (eval echo "$as_me:12610: \"$ac_compile\"") >&5
12611   (eval $ac_compile) 2>&5
12612   ac_status=$?
12613   echo "$as_me:12613: \$? = $ac_status" >&5
12614   (exit "$ac_status"); } &&
12615          { ac_try='test -s "conftest.$ac_objext"'
12616   { (eval echo "$as_me:12616: \"$ac_try\"") >&5
12617   (eval $ac_try) 2>&5
12618   ac_status=$?
12619   echo "$as_me:12619: \$? = $ac_status" >&5
12620   (exit "$ac_status"); }; }; then
12621   cf_cv_define_sigwinch=maybe
12622 else
12623   echo "$as_me: failed program was:" >&5
12624 cat "conftest.$ac_ext" >&5
12625 cf_cv_define_sigwinch=no
12626 fi
12627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12628
12629 fi
12630 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12631
12632 fi
12633 echo "$as_me:12633: result: $cf_cv_define_sigwinch" >&5
12634 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12635
12636 if test "$cf_cv_define_sigwinch" = maybe ; then
12637 echo "$as_me:12637: checking for actual SIGWINCH definition" >&5
12638 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12639 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12640   echo $ECHO_N "(cached) $ECHO_C" >&6
12641 else
12642
12643 cf_cv_fixup_sigwinch=unknown
12644 cf_sigwinch=32
12645 while test "$cf_sigwinch" != 1
12646 do
12647         cat >"conftest.$ac_ext" <<_ACEOF
12648 #line 12648 "configure"
12649 #include "confdefs.h"
12650
12651 #undef _XOPEN_SOURCE
12652 #undef _POSIX_SOURCE
12653 #undef _POSIX_C_SOURCE
12654 #include <sys/types.h>
12655 #include <sys/signal.h>
12656
12657 int
12658 main (void)
12659 {
12660
12661 #if SIGWINCH != $cf_sigwinch
12662 #error SIGWINCH is not $cf_sigwinch
12663 #endif
12664 int x = SIGWINCH; (void)x
12665   ;
12666   return 0;
12667 }
12668 _ACEOF
12669 rm -f "conftest.$ac_objext"
12670 if { (eval echo "$as_me:12670: \"$ac_compile\"") >&5
12671   (eval $ac_compile) 2>&5
12672   ac_status=$?
12673   echo "$as_me:12673: \$? = $ac_status" >&5
12674   (exit "$ac_status"); } &&
12675          { ac_try='test -s "conftest.$ac_objext"'
12676   { (eval echo "$as_me:12676: \"$ac_try\"") >&5
12677   (eval $ac_try) 2>&5
12678   ac_status=$?
12679   echo "$as_me:12679: \$? = $ac_status" >&5
12680   (exit "$ac_status"); }; }; then
12681   cf_cv_fixup_sigwinch=$cf_sigwinch
12682          break
12683 else
12684   echo "$as_me: failed program was:" >&5
12685 cat "conftest.$ac_ext" >&5
12686 fi
12687 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12688
12689 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12690 done
12691
12692 fi
12693 echo "$as_me:12693: result: $cf_cv_fixup_sigwinch" >&5
12694 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12695
12696         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12697                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12698         fi
12699 fi
12700
12701 # Checks for CODESET support.
12702
12703 echo "$as_me:12703: checking for nl_langinfo and CODESET" >&5
12704 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12705 if test "${am_cv_langinfo_codeset+set}" = set; then
12706   echo $ECHO_N "(cached) $ECHO_C" >&6
12707 else
12708   cat >"conftest.$ac_ext" <<_ACEOF
12709 #line 12709 "configure"
12710 #include "confdefs.h"
12711
12712 $ac_includes_default
12713 #include <langinfo.h>
12714 int
12715 main (void)
12716 {
12717 char* cs = nl_langinfo(CODESET); (void)cs
12718   ;
12719   return 0;
12720 }
12721 _ACEOF
12722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12723 if { (eval echo "$as_me:12723: \"$ac_link\"") >&5
12724   (eval $ac_link) 2>&5
12725   ac_status=$?
12726   echo "$as_me:12726: \$? = $ac_status" >&5
12727   (exit "$ac_status"); } &&
12728          { ac_try='test -s "conftest$ac_exeext"'
12729   { (eval echo "$as_me:12729: \"$ac_try\"") >&5
12730   (eval $ac_try) 2>&5
12731   ac_status=$?
12732   echo "$as_me:12732: \$? = $ac_status" >&5
12733   (exit "$ac_status"); }; }; then
12734   am_cv_langinfo_codeset=yes
12735 else
12736   echo "$as_me: failed program was:" >&5
12737 cat "conftest.$ac_ext" >&5
12738 am_cv_langinfo_codeset=no
12739 fi
12740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12741
12742 fi
12743 echo "$as_me:12743: result: $am_cv_langinfo_codeset" >&5
12744 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12745         if test "$am_cv_langinfo_codeset" = yes; then
12746
12747 cat >>confdefs.h <<\EOF
12748 #define HAVE_LANGINFO_CODESET 1
12749 EOF
12750
12751         fi
12752
12753 # use these variables to work around a defect in gcc's fixincludes.
12754 NCURSES_OK_WCHAR_T=
12755 NCURSES_OK_WINT_T=
12756
12757 echo "$as_me:12757: checking if you want wide-character code" >&5
12758 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12759
12760 # Check whether --enable-widec or --disable-widec was given.
12761 if test "${enable_widec+set}" = set; then
12762   enableval="$enable_widec"
12763   with_widec=$enableval
12764 else
12765   with_widec=$cf_dft_widec
12766 fi;
12767 echo "$as_me:12767: result: $with_widec" >&5
12768 echo "${ECHO_T}$with_widec" >&6
12769
12770 NCURSES_WCWIDTH_GRAPHICS=1
12771
12772 if test "x$with_widec" = xyes ; then
12773         if test "x$disable_lib_suffixes" = xno ; then
12774                 LIB_SUFFIX="w${LIB_SUFFIX}"
12775         fi
12776
12777 cat >>confdefs.h <<\EOF
12778 #define USE_WIDEC_SUPPORT 1
12779 EOF
12780
12781 cat >>confdefs.h <<\EOF
12782 #define NCURSES_WIDECHAR 1
12783 EOF
12784
12785         case "$CPPFLAGS" in
12786         (*_XOPEN_SOURCE=*)
12787                 ;;
12788         (*)
12789                 { echo "$as_me:12789: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12790 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12791                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12792                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12793                 ;;
12794         esac
12795
12796 for ac_header in \
12797 wchar.h \
12798 wctype.h \
12799
12800 do
12801 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12802 echo "$as_me:12802: checking for $ac_header" >&5
12803 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12804 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12805   echo $ECHO_N "(cached) $ECHO_C" >&6
12806 else
12807   cat >"conftest.$ac_ext" <<_ACEOF
12808 #line 12808 "configure"
12809 #include "confdefs.h"
12810 #include <$ac_header>
12811 _ACEOF
12812 if { (eval echo "$as_me:12812: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12813   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12814   ac_status=$?
12815   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12816   rm -f conftest.er1
12817   cat conftest.err >&5
12818   echo "$as_me:12818: \$? = $ac_status" >&5
12819   (exit "$ac_status"); } >/dev/null; then
12820   if test -s conftest.err; then
12821     ac_cpp_err=$ac_c_preproc_warn_flag
12822   else
12823     ac_cpp_err=
12824   fi
12825 else
12826   ac_cpp_err=yes
12827 fi
12828 if test -z "$ac_cpp_err"; then
12829   eval "$as_ac_Header=yes"
12830 else
12831   echo "$as_me: failed program was:" >&5
12832   cat "conftest.$ac_ext" >&5
12833   eval "$as_ac_Header=no"
12834 fi
12835 rm -f conftest.err "conftest.$ac_ext"
12836 fi
12837 echo "$as_me:12837: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12838 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12839 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12840   cat >>confdefs.h <<EOF
12841 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12842 EOF
12843
12844 fi
12845 done
12846
12847 echo "$as_me:12847: checking if wchar.h can be used as is" >&5
12848 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12849 if test "${cf_cv_wchar_h_okay+set}" = set; then
12850   echo $ECHO_N "(cached) $ECHO_C" >&6
12851 else
12852
12853 cat >"conftest.$ac_ext" <<_ACEOF
12854 #line 12854 "configure"
12855 #include "confdefs.h"
12856
12857 $ac_includes_default
12858 #ifdef HAVE_WCHAR_H
12859 #include <wchar.h>
12860 #endif
12861 #ifdef HAVE_WCTYPE_H
12862 #include <wctype.h>
12863 #endif
12864
12865 int
12866 main (void)
12867 {
12868
12869         wint_t foo = 0;
12870         int bar = iswpunct(foo); (void) bar
12871   ;
12872   return 0;
12873 }
12874 _ACEOF
12875 rm -f "conftest.$ac_objext"
12876 if { (eval echo "$as_me:12876: \"$ac_compile\"") >&5
12877   (eval $ac_compile) 2>&5
12878   ac_status=$?
12879   echo "$as_me:12879: \$? = $ac_status" >&5
12880   (exit "$ac_status"); } &&
12881          { ac_try='test -s "conftest.$ac_objext"'
12882   { (eval echo "$as_me:12882: \"$ac_try\"") >&5
12883   (eval $ac_try) 2>&5
12884   ac_status=$?
12885   echo "$as_me:12885: \$? = $ac_status" >&5
12886   (exit "$ac_status"); }; }; then
12887   cf_cv_wchar_h_okay=yes
12888 else
12889   echo "$as_me: failed program was:" >&5
12890 cat "conftest.$ac_ext" >&5
12891 cf_cv_wchar_h_okay=no
12892 fi
12893 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12894 fi
12895 echo "$as_me:12895: result: $cf_cv_wchar_h_okay" >&5
12896 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12897
12898 if test "$cf_cv_wchar_h_okay" = no
12899 then
12900
12901 echo "$as_me:12901: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12902 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12903 cat >"conftest.$ac_ext" <<_ACEOF
12904 #line 12904 "configure"
12905 #include "confdefs.h"
12906 #include <sys/types.h>
12907
12908 int
12909 main (void)
12910 {
12911
12912 #ifndef _XOPEN_SOURCE_EXTENDED
12913 #error _XOPEN_SOURCE_EXTENDED is not defined
12914 #endif
12915   ;
12916   return 0;
12917 }
12918 _ACEOF
12919 rm -f "conftest.$ac_objext"
12920 if { (eval echo "$as_me:12920: \"$ac_compile\"") >&5
12921   (eval $ac_compile) 2>&5
12922   ac_status=$?
12923   echo "$as_me:12923: \$? = $ac_status" >&5
12924   (exit "$ac_status"); } &&
12925          { ac_try='test -s "conftest.$ac_objext"'
12926   { (eval echo "$as_me:12926: \"$ac_try\"") >&5
12927   (eval $ac_try) 2>&5
12928   ac_status=$?
12929   echo "$as_me:12929: \$? = $ac_status" >&5
12930   (exit "$ac_status"); }; }; then
12931   cf_result=no
12932 else
12933   echo "$as_me: failed program was:" >&5
12934 cat "conftest.$ac_ext" >&5
12935 cf_result=yes
12936 fi
12937 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12938 echo "$as_me:12938: result: $cf_result" >&5
12939 echo "${ECHO_T}$cf_result" >&6
12940
12941 if test "$cf_result" = yes ; then
12942         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12943 elif test "x" != "x" ; then
12944         echo "$as_me:12944: checking checking for compatible value versus " >&5
12945 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12946         cat >"conftest.$ac_ext" <<_ACEOF
12947 #line 12947 "configure"
12948 #include "confdefs.h"
12949 #include <sys/types.h>
12950
12951 int
12952 main (void)
12953 {
12954
12955 #if _XOPEN_SOURCE_EXTENDED- < 0
12956 #error _XOPEN_SOURCE_EXTENDED- is negative
12957 #endif
12958   ;
12959   return 0;
12960 }
12961 _ACEOF
12962 rm -f "conftest.$ac_objext"
12963 if { (eval echo "$as_me:12963: \"$ac_compile\"") >&5
12964   (eval $ac_compile) 2>&5
12965   ac_status=$?
12966   echo "$as_me:12966: \$? = $ac_status" >&5
12967   (exit "$ac_status"); } &&
12968          { ac_try='test -s "conftest.$ac_objext"'
12969   { (eval echo "$as_me:12969: \"$ac_try\"") >&5
12970   (eval $ac_try) 2>&5
12971   ac_status=$?
12972   echo "$as_me:12972: \$? = $ac_status" >&5
12973   (exit "$ac_status"); }; }; then
12974   cf_result=yes
12975 else
12976   echo "$as_me: failed program was:" >&5
12977 cat "conftest.$ac_ext" >&5
12978 cf_result=no
12979 fi
12980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12981         echo "$as_me:12981: result: $cf_result" >&5
12982 echo "${ECHO_T}$cf_result" >&6
12983         if test "$cf_result" = no ; then
12984                 # perhaps we can override it - try...
12985                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12986         fi
12987 fi
12988
12989 fi
12990
12991 echo "$as_me:12991: checking if wcwidth agrees graphics are single-width" >&5
12992 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12993 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12994   echo $ECHO_N "(cached) $ECHO_C" >&6
12995 else
12996
12997 cat >conftest.in <<CF_EOF
12998 -       VT100 symbols
12999 0x250c  upper left corner
13000 0x2514  lower left corner
13001 0x2510  upper right corner
13002 0x2518  lower right corner
13003 0x251c  tee pointing left
13004 0x2524  tee pointing right
13005 0x2534  tee pointing up
13006 0x252c  tee pointing down
13007 0x2500  horizontal line
13008 0x2502  vertical line
13009 0x253c  large plus or crossover
13010 0x23ba  scan line 1
13011 0x23bd  scan line 9
13012 0x25c6  diamond
13013 0x2592  checker board (stipple)
13014 0x00b0  degree symbol
13015 0x00b1  plus/minus
13016 0x00b7  bullet
13017 -       Teletype 5410v1 symbols
13018 0x2190  arrow pointing left
13019 0x2192  arrow pointing right
13020 0x2193  arrow pointing down
13021 0x2191  arrow pointing up
13022 0x2592  board of squares
13023 0x2603  lantern symbol
13024 0x25ae  solid square block
13025 -       these defaults were invented for ncurses
13026 0x23bb  scan line 3
13027 0x23bc  scan line 7
13028 0x2264  less-than-or-equal-to
13029 0x2265  greater-than-or-equal-to
13030 0x03c0  greek pi
13031 0x2260  not-equal
13032 0x00a3  pound-sterling symbol
13033 -       thick-line-drawing
13034 0x250f  upper left corner
13035 0x2517  lower left corner
13036 0x2513  upper right corner
13037 0x251b  lower right corner
13038 0x2523  tee pointing left
13039 0x252b  tee pointing right
13040 0x253b  tee pointing up
13041 0x2533  tee pointing down
13042 0x2501  horizontal line
13043 0x2503  vertical line
13044 0x254b  large plus or crossover
13045 -       double-line-drawing
13046 0x2554  upper left corner
13047 0x255a  lower left corner
13048 0x2557  upper right corner
13049 0x255d  lower right corner
13050 0x2563  tee pointing left
13051 0x2560  tee pointing right
13052 0x2569  tee pointing up
13053 0x2566  tee pointing down
13054 0x2550  horizontal line
13055 0x2551  vertical line
13056 0x256c  large plus or crossover
13057 CF_EOF
13058 if test "$cross_compiling" = yes; then
13059   cf_cv_wcwidth_graphics=unknown
13060 else
13061   cat >"conftest.$ac_ext" <<_ACEOF
13062 #line 13062 "configure"
13063 #include "confdefs.h"
13064
13065 $ac_includes_default
13066
13067 #include <locale.h>
13068 #include <wchar.h>
13069
13070 #define MY_LEN 80
13071
13072 int
13073 main(void)
13074 {
13075         FILE *fp;
13076         unsigned value;
13077         char buffer[MY_LEN + 1];
13078         char notes[MY_LEN + 1];
13079         int totals = 0;
13080         int passed = 0;
13081
13082         if (setlocale(LC_ALL, "en_US.UTF8") ||
13083                 setlocale(LC_ALL, "en_US.UTF-8") ||
13084                 setlocale(LC_ALL, "en_US.utf8") ||
13085                 setlocale(LC_ALL, "en_US.utf-8")) {
13086                 if ((fp = fopen("conftest.in", "r")) != 0) {
13087                         while (fgets(buffer, MY_LEN, fp) != 0) {
13088                                 if (*buffer == '-') {
13089                                         fprintf(stderr, "\\t%s", buffer);
13090                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
13091                                         ++totals;
13092                                         if (wcwidth((int)value) == 1)
13093                                                 ++passed;
13094                                         fprintf(stderr, "%d\\t%s", wcwidth((int)value), buffer);
13095                                 } else {
13096                                         fprintf(stderr, "?\\t%s", buffer);
13097                                 }
13098                         }
13099                 }
13100         }
13101         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
13102         return (totals == passed) ? 0 : 1;
13103 }
13104
13105 _ACEOF
13106 rm -f "conftest$ac_exeext"
13107 if { (eval echo "$as_me:13107: \"$ac_link\"") >&5
13108   (eval $ac_link) 2>&5
13109   ac_status=$?
13110   echo "$as_me:13110: \$? = $ac_status" >&5
13111   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
13112   { (eval echo "$as_me:13112: \"$ac_try\"") >&5
13113   (eval $ac_try) 2>&5
13114   ac_status=$?
13115   echo "$as_me:13115: \$? = $ac_status" >&5
13116   (exit "$ac_status"); }; }; then
13117   cf_cv_wcwidth_graphics=yes
13118 else
13119   echo "$as_me: program exited with status $ac_status" >&5
13120 echo "$as_me: failed program was:" >&5
13121 cat "conftest.$ac_ext" >&5
13122 cf_cv_wcwidth_graphics=no
13123 fi
13124 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
13125 fi
13126
13127 fi
13128 echo "$as_me:13128: result: $cf_cv_wcwidth_graphics" >&5
13129 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
13130
13131         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
13132
13133         # with_overwrite=no
13134         NCURSES_CH_T=cchar_t
13135
13136 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
13137 do
13138 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13139 echo "$as_me:13139: checking for $ac_func" >&5
13140 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13141 if eval "test \"\${$as_ac_var+set}\" = set"; then
13142   echo $ECHO_N "(cached) $ECHO_C" >&6
13143 else
13144   cat >"conftest.$ac_ext" <<_ACEOF
13145 #line 13145 "configure"
13146 #include "confdefs.h"
13147 #define $ac_func autoconf_temporary
13148 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
13149 #undef $ac_func
13150
13151 #ifdef __cplusplus
13152 extern "C"
13153 #endif
13154
13155 /* We use char because int might match the return type of a gcc2
13156    builtin and then its argument prototype would still apply.  */
13157 char $ac_func (void);
13158
13159 int
13160 main (void)
13161 {
13162
13163 /* The GNU C library defines stubs for functions which it implements
13164     to always fail with ENOSYS.  Some functions are actually named
13165     something starting with __ and the normal name is an alias.  */
13166 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13167 #error found stub for $ac_func
13168 #endif
13169
13170         return $ac_func ();
13171   ;
13172   return 0;
13173 }
13174 _ACEOF
13175 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13176 if { (eval echo "$as_me:13176: \"$ac_link\"") >&5
13177   (eval $ac_link) 2>&5
13178   ac_status=$?
13179   echo "$as_me:13179: \$? = $ac_status" >&5
13180   (exit "$ac_status"); } &&
13181          { ac_try='test -s "conftest$ac_exeext"'
13182   { (eval echo "$as_me:13182: \"$ac_try\"") >&5
13183   (eval $ac_try) 2>&5
13184   ac_status=$?
13185   echo "$as_me:13185: \$? = $ac_status" >&5
13186   (exit "$ac_status"); }; }; then
13187   eval "$as_ac_var=yes"
13188 else
13189   echo "$as_me: failed program was:" >&5
13190 cat "conftest.$ac_ext" >&5
13191 eval "$as_ac_var=no"
13192 fi
13193 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13194 fi
13195 echo "$as_me:13195: result: `eval echo '${'"$as_ac_var"'}'`" >&5
13196 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
13197 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
13198   cat >>confdefs.h <<EOF
13199 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13200 EOF
13201
13202 fi
13203 done
13204
13205         if test "x$ac_cv_func_putwc" != xyes ; then
13206
13207 for ac_header in wchar.h
13208 do
13209 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13210 echo "$as_me:13210: checking for $ac_header" >&5
13211 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13212 if eval "test \"\${$as_ac_Header+set}\" = set"; then
13213   echo $ECHO_N "(cached) $ECHO_C" >&6
13214 else
13215   cat >"conftest.$ac_ext" <<_ACEOF
13216 #line 13216 "configure"
13217 #include "confdefs.h"
13218 #include <$ac_header>
13219 _ACEOF
13220 if { (eval echo "$as_me:13220: \"$ac_cpp "conftest.$ac_ext"\"") >&5
13221   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
13222   ac_status=$?
13223   $EGREP -v '^ *\+' conftest.er1 >conftest.err
13224   rm -f conftest.er1
13225   cat conftest.err >&5
13226   echo "$as_me:13226: \$? = $ac_status" >&5
13227   (exit "$ac_status"); } >/dev/null; then
13228   if test -s conftest.err; then
13229     ac_cpp_err=$ac_c_preproc_warn_flag
13230   else
13231     ac_cpp_err=
13232   fi
13233 else
13234   ac_cpp_err=yes
13235 fi
13236 if test -z "$ac_cpp_err"; then
13237   eval "$as_ac_Header=yes"
13238 else
13239   echo "$as_me: failed program was:" >&5
13240   cat "conftest.$ac_ext" >&5
13241   eval "$as_ac_Header=no"
13242 fi
13243 rm -f conftest.err "conftest.$ac_ext"
13244 fi
13245 echo "$as_me:13245: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
13246 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
13247 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
13248   cat >>confdefs.h <<EOF
13249 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13250 EOF
13251
13252 fi
13253 done
13254
13255 echo "$as_me:13255: checking for multibyte character support" >&5
13256 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
13257 if test "${cf_cv_utf8_lib+set}" = set; then
13258   echo $ECHO_N "(cached) $ECHO_C" >&6
13259 else
13260
13261         cf_save_LIBS="$LIBS"
13262         cat >"conftest.$ac_ext" <<_ACEOF
13263 #line 13263 "configure"
13264 #include "confdefs.h"
13265
13266 $ac_includes_default
13267 #ifdef HAVE_WCHAR_H
13268 #include <wchar.h>
13269 #endif
13270
13271 int
13272 main (void)
13273 {
13274 putwc(0,0);
13275   ;
13276   return 0;
13277 }
13278 _ACEOF
13279 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13280 if { (eval echo "$as_me:13280: \"$ac_link\"") >&5
13281   (eval $ac_link) 2>&5
13282   ac_status=$?
13283   echo "$as_me:13283: \$? = $ac_status" >&5
13284   (exit "$ac_status"); } &&
13285          { ac_try='test -s "conftest$ac_exeext"'
13286   { (eval echo "$as_me:13286: \"$ac_try\"") >&5
13287   (eval $ac_try) 2>&5
13288   ac_status=$?
13289   echo "$as_me:13289: \$? = $ac_status" >&5
13290   (exit "$ac_status"); }; }; then
13291   cf_cv_utf8_lib=yes
13292 else
13293   echo "$as_me: failed program was:" >&5
13294 cat "conftest.$ac_ext" >&5
13295
13296 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13297 # will be set on completion of the AC_TRY_LINK below.
13298 cf_cv_header_path_utf8=
13299 cf_cv_library_path_utf8=
13300
13301 echo "${as_me:-configure}:13301: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13302
13303 cf_save_LIBS="$LIBS"
13304
13305 cat >"conftest.$ac_ext" <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308
13309 #include <libutf8.h>
13310 int
13311 main (void)
13312 {
13313 putwc(0,0);
13314   ;
13315   return 0;
13316 }
13317 _ACEOF
13318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13319 if { (eval echo "$as_me:13319: \"$ac_link\"") >&5
13320   (eval $ac_link) 2>&5
13321   ac_status=$?
13322   echo "$as_me:13322: \$? = $ac_status" >&5
13323   (exit "$ac_status"); } &&
13324          { ac_try='test -s "conftest$ac_exeext"'
13325   { (eval echo "$as_me:13325: \"$ac_try\"") >&5
13326   (eval $ac_try) 2>&5
13327   ac_status=$?
13328   echo "$as_me:13328: \$? = $ac_status" >&5
13329   (exit "$ac_status"); }; }; then
13330
13331         cf_cv_find_linkage_utf8=yes
13332         cf_cv_header_path_utf8=/usr/include
13333         cf_cv_library_path_utf8=/usr/lib
13334
13335 else
13336   echo "$as_me: failed program was:" >&5
13337 cat "conftest.$ac_ext" >&5
13338
13339 LIBS="-lutf8  $cf_save_LIBS"
13340
13341 cat >"conftest.$ac_ext" <<_ACEOF
13342 #line 13342 "configure"
13343 #include "confdefs.h"
13344
13345 #include <libutf8.h>
13346 int
13347 main (void)
13348 {
13349 putwc(0,0);
13350   ;
13351   return 0;
13352 }
13353 _ACEOF
13354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13355 if { (eval echo "$as_me:13355: \"$ac_link\"") >&5
13356   (eval $ac_link) 2>&5
13357   ac_status=$?
13358   echo "$as_me:13358: \$? = $ac_status" >&5
13359   (exit "$ac_status"); } &&
13360          { ac_try='test -s "conftest$ac_exeext"'
13361   { (eval echo "$as_me:13361: \"$ac_try\"") >&5
13362   (eval $ac_try) 2>&5
13363   ac_status=$?
13364   echo "$as_me:13364: \$? = $ac_status" >&5
13365   (exit "$ac_status"); }; }; then
13366
13367         cf_cv_find_linkage_utf8=yes
13368         cf_cv_header_path_utf8=/usr/include
13369         cf_cv_library_path_utf8=/usr/lib
13370         cf_cv_library_file_utf8="-lutf8"
13371
13372 else
13373   echo "$as_me: failed program was:" >&5
13374 cat "conftest.$ac_ext" >&5
13375
13376         cf_cv_find_linkage_utf8=no
13377         LIBS="$cf_save_LIBS"
13378
13379         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13380
13381 echo "${as_me:-configure}:13381: testing find linkage for utf8 library ..." 1>&5
13382
13383 echo "${as_me:-configure}:13383: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13384
13385         cf_save_CPPFLAGS="$CPPFLAGS"
13386         cf_test_CPPFLAGS="$CPPFLAGS"
13387
13388 cf_search=
13389
13390 # collect the current set of include-directories from compiler flags
13391 cf_header_path_list=""
13392 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13393         for cf_header_path in $CPPFLAGS $CFLAGS
13394         do
13395                 case "$cf_header_path" in
13396                 (-I*)
13397                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13398
13399 test "x$cf_header_path" != "xNONE" && \
13400 test -d "$cf_header_path" && \
13401  {
13402         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13403         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13404         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13405         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13406         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13407         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13408 }
13409
13410                         cf_header_path_list="$cf_header_path_list $cf_search"
13411                         ;;
13412                 esac
13413         done
13414 fi
13415
13416 # add the variations for the package we are looking for
13417
13418 cf_search=
13419
13420 test "x$prefix" != "xNONE" && \
13421 test -d "$prefix" && \
13422  {
13423         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13424         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13425         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13426         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13427         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13428         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13429 }
13430
13431 for cf_subdir_prefix in \
13432         /usr \
13433         /usr/local \
13434         /usr/pkg \
13435         /opt \
13436         /opt/local \
13437         $HOME
13438 do
13439
13440 test "x$cf_subdir_prefix" != "x$prefix" && \
13441 test -d "$cf_subdir_prefix" && \
13442 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13443         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13444         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13445         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13446         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13447         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13448         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13449 }
13450
13451 done
13452
13453 test "$includedir" != NONE && \
13454 test "$includedir" != "/usr/include" && \
13455 test -d "$includedir" && {
13456         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13457         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13458 }
13459
13460 test "$oldincludedir" != NONE && \
13461 test "$oldincludedir" != "/usr/include" && \
13462 test -d "$oldincludedir" && {
13463         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13464         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13465 }
13466
13467 cf_search="$cf_search $cf_header_path_list"
13468
13469         for cf_cv_header_path_utf8 in $cf_search
13470         do
13471                 if test -d "$cf_cv_header_path_utf8" ; then
13472                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13473
13474 echo "${as_me:-configure}:13474: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13475
13476                         CPPFLAGS="$cf_save_CPPFLAGS"
13477
13478         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13479         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13480
13481                         cat >"conftest.$ac_ext" <<_ACEOF
13482 #line 13482 "configure"
13483 #include "confdefs.h"
13484
13485 #include <libutf8.h>
13486 int
13487 main (void)
13488 {
13489 putwc(0,0);
13490   ;
13491   return 0;
13492 }
13493 _ACEOF
13494 rm -f "conftest.$ac_objext"
13495 if { (eval echo "$as_me:13495: \"$ac_compile\"") >&5
13496   (eval $ac_compile) 2>&5
13497   ac_status=$?
13498   echo "$as_me:13498: \$? = $ac_status" >&5
13499   (exit "$ac_status"); } &&
13500          { ac_try='test -s "conftest.$ac_objext"'
13501   { (eval echo "$as_me:13501: \"$ac_try\"") >&5
13502   (eval $ac_try) 2>&5
13503   ac_status=$?
13504   echo "$as_me:13504: \$? = $ac_status" >&5
13505   (exit "$ac_status"); }; }; then
13506
13507                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13508
13509 echo "${as_me:-configure}:13509: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13510
13511                                 cf_cv_find_linkage_utf8=maybe
13512                                 cf_test_CPPFLAGS="$CPPFLAGS"
13513                                 break
13514 else
13515   echo "$as_me: failed program was:" >&5
13516 cat "conftest.$ac_ext" >&5
13517
13518                                 CPPFLAGS="$cf_save_CPPFLAGS"
13519
13520 fi
13521 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13522                 fi
13523         done
13524
13525         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13526
13527 echo "${as_me:-configure}:13527: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13528
13529                 cf_save_LIBS="$LIBS"
13530                 cf_save_LDFLAGS="$LDFLAGS"
13531
13532                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13533
13534 cf_search=
13535 cf_library_path_list=""
13536 if test -n "${LDFLAGS}${LIBS}" ; then
13537         for cf_library_path in $LDFLAGS $LIBS
13538         do
13539                 case "$cf_library_path" in
13540                 (-L*)
13541                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13542
13543 test "x$cf_library_path" != "xNONE" && \
13544 test -d "$cf_library_path" && \
13545  {
13546         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13547         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13548         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13549         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13550         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13551         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13552 }
13553
13554                         cf_library_path_list="$cf_library_path_list $cf_search"
13555                         ;;
13556                 esac
13557         done
13558 fi
13559
13560 cf_search=
13561
13562 test "x$prefix" != "xNONE" && \
13563 test -d "$prefix" && \
13564  {
13565         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13566         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13567         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13568         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13569         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13570         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13571 }
13572
13573 for cf_subdir_prefix in \
13574         /usr \
13575         /usr/local \
13576         /usr/pkg \
13577         /opt \
13578         /opt/local \
13579         $HOME
13580 do
13581
13582 test "x$cf_subdir_prefix" != "x$prefix" && \
13583 test -d "$cf_subdir_prefix" && \
13584 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13585         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13586         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13587         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13588         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13589         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13590         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13591 }
13592
13593 done
13594
13595 cf_search="$cf_library_path_list $cf_search"
13596
13597                         for cf_cv_library_path_utf8 in $cf_search
13598                         do
13599                                 if test -d "$cf_cv_library_path_utf8" ; then
13600                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13601
13602 echo "${as_me:-configure}:13602: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13603
13604                                         CPPFLAGS="$cf_test_CPPFLAGS"
13605                                         LIBS="-lutf8  $cf_save_LIBS"
13606                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13607                                         cat >"conftest.$ac_ext" <<_ACEOF
13608 #line 13608 "configure"
13609 #include "confdefs.h"
13610
13611 #include <libutf8.h>
13612 int
13613 main (void)
13614 {
13615 putwc(0,0);
13616   ;
13617   return 0;
13618 }
13619 _ACEOF
13620 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13621 if { (eval echo "$as_me:13621: \"$ac_link\"") >&5
13622   (eval $ac_link) 2>&5
13623   ac_status=$?
13624   echo "$as_me:13624: \$? = $ac_status" >&5
13625   (exit "$ac_status"); } &&
13626          { ac_try='test -s "conftest$ac_exeext"'
13627   { (eval echo "$as_me:13627: \"$ac_try\"") >&5
13628   (eval $ac_try) 2>&5
13629   ac_status=$?
13630   echo "$as_me:13630: \$? = $ac_status" >&5
13631   (exit "$ac_status"); }; }; then
13632
13633                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13634
13635 echo "${as_me:-configure}:13635: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13636
13637                                         cf_cv_find_linkage_utf8=yes
13638                                         cf_cv_library_file_utf8="-lutf8"
13639                                         break
13640 else
13641   echo "$as_me: failed program was:" >&5
13642 cat "conftest.$ac_ext" >&5
13643
13644                                         CPPFLAGS="$cf_save_CPPFLAGS"
13645                                         LIBS="$cf_save_LIBS"
13646                                         LDFLAGS="$cf_save_LDFLAGS"
13647
13648 fi
13649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13650                                 fi
13651                         done
13652                         CPPFLAGS="$cf_save_CPPFLAGS"
13653                         LDFLAGS="$cf_save_LDFLAGS"
13654                 fi
13655
13656         else
13657                 cf_cv_find_linkage_utf8=no
13658         fi
13659
13660 fi
13661 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13662
13663 fi
13664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13665
13666 LIBS="$cf_save_LIBS"
13667
13668 if test "$cf_cv_find_linkage_utf8" = yes ; then
13669 cf_cv_utf8_lib=add-on
13670 else
13671 cf_cv_utf8_lib=no
13672 fi
13673
13674 fi
13675 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13676 fi
13677 echo "$as_me:13677: result: $cf_cv_utf8_lib" >&5
13678 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13679
13680 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13681 # ncurses/ncursesw:
13682 if test "$cf_cv_utf8_lib" = "add-on" ; then
13683
13684 cat >>confdefs.h <<\EOF
13685 #define HAVE_LIBUTF8_H 1
13686 EOF
13687
13688 if test -n "$cf_cv_header_path_utf8" ; then
13689   for cf_add_incdir in $cf_cv_header_path_utf8
13690   do
13691         while test "$cf_add_incdir" != /usr/include
13692         do
13693           if test -d "$cf_add_incdir"
13694           then
13695                 cf_have_incdir=no
13696                 if test -n "$CFLAGS$CPPFLAGS" ; then
13697                   # a loop is needed to ensure we can add subdirs of existing dirs
13698                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13699                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13700                           cf_have_incdir=yes; break
13701                         fi
13702                   done
13703                 fi
13704
13705                 if test "$cf_have_incdir" = no ; then
13706                   if test "$cf_add_incdir" = /usr/local/include ; then
13707                         if test "$GCC" = yes
13708                         then
13709                           cf_save_CPPFLAGS=$CPPFLAGS
13710
13711         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13712         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13713
13714                           cat >"conftest.$ac_ext" <<_ACEOF
13715 #line 13715 "configure"
13716 #include "confdefs.h"
13717 #include <stdio.h>
13718 int
13719 main (void)
13720 {
13721 printf("Hello")
13722   ;
13723   return 0;
13724 }
13725 _ACEOF
13726 rm -f "conftest.$ac_objext"
13727 if { (eval echo "$as_me:13727: \"$ac_compile\"") >&5
13728   (eval $ac_compile) 2>&5
13729   ac_status=$?
13730   echo "$as_me:13730: \$? = $ac_status" >&5
13731   (exit "$ac_status"); } &&
13732          { ac_try='test -s "conftest.$ac_objext"'
13733   { (eval echo "$as_me:13733: \"$ac_try\"") >&5
13734   (eval $ac_try) 2>&5
13735   ac_status=$?
13736   echo "$as_me:13736: \$? = $ac_status" >&5
13737   (exit "$ac_status"); }; }; then
13738   :
13739 else
13740   echo "$as_me: failed program was:" >&5
13741 cat "conftest.$ac_ext" >&5
13742 cf_have_incdir=yes
13743 fi
13744 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13745                           CPPFLAGS=$cf_save_CPPFLAGS
13746                         fi
13747                   fi
13748                 fi
13749
13750                 if test "$cf_have_incdir" = no ; then
13751                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13752
13753 echo "${as_me:-configure}:13753: testing adding $cf_add_incdir to include-path ..." 1>&5
13754
13755                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13756
13757                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13758                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13759                   cf_add_incdir="$cf_top_incdir"
13760                 else
13761                   break
13762                 fi
13763           else
13764                 break
13765           fi
13766         done
13767   done
13768 fi
13769
13770 if test -n "$cf_cv_library_path_utf8" ; then
13771         for cf_add_libdir in $cf_cv_library_path_utf8
13772         do
13773                 if test "$cf_add_libdir" = /usr/lib ; then
13774                         :
13775                 elif test -d "$cf_add_libdir"
13776                 then
13777                         cf_have_libdir=no
13778                         if test -n "$LDFLAGS$LIBS" ; then
13779                                 # a loop is needed to ensure we can add subdirs of existing dirs
13780                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13781                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13782                                                 cf_have_libdir=yes; break
13783                                         fi
13784                                 done
13785                         fi
13786                         if test "$cf_have_libdir" = no ; then
13787                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13788
13789 echo "${as_me:-configure}:13789: testing adding $cf_add_libdir to library-path ..." 1>&5
13790
13791                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13792                         fi
13793                 fi
13794         done
13795 fi
13796
13797 cf_add_libs="$LIBS"
13798 # reverse order
13799 cf_add_0lib=
13800 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13801 # filter duplicates
13802 for cf_add_1lib in $cf_add_0lib; do
13803         for cf_add_2lib in $cf_add_libs; do
13804                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13805                         cf_add_1lib=
13806                         break
13807                 fi
13808         done
13809         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13810 done
13811 LIBS="$cf_add_libs"
13812
13813 fi
13814
13815                 if test "$cf_cv_utf8_lib" != no ; then
13816                         NCURSES_LIBUTF8=1
13817                 fi
13818         fi
13819
13820 # This is needed on Tru64 5.0 to declare mbstate_t
13821 echo "$as_me:13821: checking if we must include wchar.h to declare mbstate_t" >&5
13822 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13823 if test "${cf_cv_mbstate_t+set}" = set; then
13824   echo $ECHO_N "(cached) $ECHO_C" >&6
13825 else
13826
13827 cat >"conftest.$ac_ext" <<_ACEOF
13828 #line 13828 "configure"
13829 #include "confdefs.h"
13830
13831 #include <stdlib.h>
13832 #include <stdarg.h>
13833 #include <stdio.h>
13834 #ifdef HAVE_LIBUTF8_H
13835 #include <libutf8.h>
13836 #endif
13837 int
13838 main (void)
13839 {
13840 mbstate_t state; (void)state
13841   ;
13842   return 0;
13843 }
13844 _ACEOF
13845 rm -f "conftest.$ac_objext"
13846 if { (eval echo "$as_me:13846: \"$ac_compile\"") >&5
13847   (eval $ac_compile) 2>&5
13848   ac_status=$?
13849   echo "$as_me:13849: \$? = $ac_status" >&5
13850   (exit "$ac_status"); } &&
13851          { ac_try='test -s "conftest.$ac_objext"'
13852   { (eval echo "$as_me:13852: \"$ac_try\"") >&5
13853   (eval $ac_try) 2>&5
13854   ac_status=$?
13855   echo "$as_me:13855: \$? = $ac_status" >&5
13856   (exit "$ac_status"); }; }; then
13857   cf_cv_mbstate_t=no
13858 else
13859   echo "$as_me: failed program was:" >&5
13860 cat "conftest.$ac_ext" >&5
13861 cat >"conftest.$ac_ext" <<_ACEOF
13862 #line 13862 "configure"
13863 #include "confdefs.h"
13864
13865 #include <stdlib.h>
13866 #include <stdarg.h>
13867 #include <stdio.h>
13868 #include <wchar.h>
13869 #ifdef HAVE_LIBUTF8_H
13870 #include <libutf8.h>
13871 #endif
13872 int
13873 main (void)
13874 {
13875 mbstate_t value; (void) value
13876   ;
13877   return 0;
13878 }
13879 _ACEOF
13880 rm -f "conftest.$ac_objext"
13881 if { (eval echo "$as_me:13881: \"$ac_compile\"") >&5
13882   (eval $ac_compile) 2>&5
13883   ac_status=$?
13884   echo "$as_me:13884: \$? = $ac_status" >&5
13885   (exit "$ac_status"); } &&
13886          { ac_try='test -s "conftest.$ac_objext"'
13887   { (eval echo "$as_me:13887: \"$ac_try\"") >&5
13888   (eval $ac_try) 2>&5
13889   ac_status=$?
13890   echo "$as_me:13890: \$? = $ac_status" >&5
13891   (exit "$ac_status"); }; }; then
13892   cf_cv_mbstate_t=yes
13893 else
13894   echo "$as_me: failed program was:" >&5
13895 cat "conftest.$ac_ext" >&5
13896 cf_cv_mbstate_t=unknown
13897 fi
13898 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13899 fi
13900 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13901 fi
13902 echo "$as_me:13902: result: $cf_cv_mbstate_t" >&5
13903 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13904
13905 if test "$cf_cv_mbstate_t" = yes ; then
13906
13907 cat >>confdefs.h <<\EOF
13908 #define NEED_WCHAR_H 1
13909 EOF
13910
13911         NEED_WCHAR_H=1
13912 fi
13913
13914 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13915 if test "$cf_cv_mbstate_t" = unknown ; then
13916         NCURSES_MBSTATE_T=1
13917 fi
13918
13919 # This is needed on Tru64 5.0 to declare wchar_t
13920 echo "$as_me:13920: checking if we must include wchar.h to declare wchar_t" >&5
13921 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13922 if test "${cf_cv_wchar_t+set}" = set; then
13923   echo $ECHO_N "(cached) $ECHO_C" >&6
13924 else
13925
13926 cat >"conftest.$ac_ext" <<_ACEOF
13927 #line 13927 "configure"
13928 #include "confdefs.h"
13929
13930 #include <stdlib.h>
13931 #include <stdarg.h>
13932 #include <stdio.h>
13933 #ifdef HAVE_LIBUTF8_H
13934 #include <libutf8.h>
13935 #endif
13936 int
13937 main (void)
13938 {
13939 wchar_t state; (void)state
13940   ;
13941   return 0;
13942 }
13943 _ACEOF
13944 rm -f "conftest.$ac_objext"
13945 if { (eval echo "$as_me:13945: \"$ac_compile\"") >&5
13946   (eval $ac_compile) 2>&5
13947   ac_status=$?
13948   echo "$as_me:13948: \$? = $ac_status" >&5
13949   (exit "$ac_status"); } &&
13950          { ac_try='test -s "conftest.$ac_objext"'
13951   { (eval echo "$as_me:13951: \"$ac_try\"") >&5
13952   (eval $ac_try) 2>&5
13953   ac_status=$?
13954   echo "$as_me:13954: \$? = $ac_status" >&5
13955   (exit "$ac_status"); }; }; then
13956   cf_cv_wchar_t=no
13957 else
13958   echo "$as_me: failed program was:" >&5
13959 cat "conftest.$ac_ext" >&5
13960 cat >"conftest.$ac_ext" <<_ACEOF
13961 #line 13961 "configure"
13962 #include "confdefs.h"
13963
13964 #include <stdlib.h>
13965 #include <stdarg.h>
13966 #include <stdio.h>
13967 #include <wchar.h>
13968 #ifdef HAVE_LIBUTF8_H
13969 #include <libutf8.h>
13970 #endif
13971 int
13972 main (void)
13973 {
13974 wchar_t value; (void) value
13975   ;
13976   return 0;
13977 }
13978 _ACEOF
13979 rm -f "conftest.$ac_objext"
13980 if { (eval echo "$as_me:13980: \"$ac_compile\"") >&5
13981   (eval $ac_compile) 2>&5
13982   ac_status=$?
13983   echo "$as_me:13983: \$? = $ac_status" >&5
13984   (exit "$ac_status"); } &&
13985          { ac_try='test -s "conftest.$ac_objext"'
13986   { (eval echo "$as_me:13986: \"$ac_try\"") >&5
13987   (eval $ac_try) 2>&5
13988   ac_status=$?
13989   echo "$as_me:13989: \$? = $ac_status" >&5
13990   (exit "$ac_status"); }; }; then
13991   cf_cv_wchar_t=yes
13992 else
13993   echo "$as_me: failed program was:" >&5
13994 cat "conftest.$ac_ext" >&5
13995 cf_cv_wchar_t=unknown
13996 fi
13997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13998 fi
13999 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14000 fi
14001 echo "$as_me:14001: result: $cf_cv_wchar_t" >&5
14002 echo "${ECHO_T}$cf_cv_wchar_t" >&6
14003
14004 if test "$cf_cv_wchar_t" = yes ; then
14005
14006 cat >>confdefs.h <<\EOF
14007 #define NEED_WCHAR_H 1
14008 EOF
14009
14010         NEED_WCHAR_H=1
14011 fi
14012
14013 # if we do not find wchar_t in either place, use substitution to provide a fallback.
14014 if test "$cf_cv_wchar_t" = unknown ; then
14015         NCURSES_WCHAR_T=1
14016 fi
14017
14018 # if we find wchar_t in either place, use substitution to provide a fallback.
14019 if test "$cf_cv_wchar_t" != unknown ; then
14020         NCURSES_OK_WCHAR_T=1
14021 fi
14022
14023 # This is needed on Tru64 5.0 to declare wint_t
14024 echo "$as_me:14024: checking if we must include wchar.h to declare wint_t" >&5
14025 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
14026 if test "${cf_cv_wint_t+set}" = set; then
14027   echo $ECHO_N "(cached) $ECHO_C" >&6
14028 else
14029
14030 cat >"conftest.$ac_ext" <<_ACEOF
14031 #line 14031 "configure"
14032 #include "confdefs.h"
14033
14034 #include <stdlib.h>
14035 #include <stdarg.h>
14036 #include <stdio.h>
14037 #ifdef HAVE_LIBUTF8_H
14038 #include <libutf8.h>
14039 #endif
14040 int
14041 main (void)
14042 {
14043 wint_t state; (void)state
14044   ;
14045   return 0;
14046 }
14047 _ACEOF
14048 rm -f "conftest.$ac_objext"
14049 if { (eval echo "$as_me:14049: \"$ac_compile\"") >&5
14050   (eval $ac_compile) 2>&5
14051   ac_status=$?
14052   echo "$as_me:14052: \$? = $ac_status" >&5
14053   (exit "$ac_status"); } &&
14054          { ac_try='test -s "conftest.$ac_objext"'
14055   { (eval echo "$as_me:14055: \"$ac_try\"") >&5
14056   (eval $ac_try) 2>&5
14057   ac_status=$?
14058   echo "$as_me:14058: \$? = $ac_status" >&5
14059   (exit "$ac_status"); }; }; then
14060   cf_cv_wint_t=no
14061 else
14062   echo "$as_me: failed program was:" >&5
14063 cat "conftest.$ac_ext" >&5
14064 cat >"conftest.$ac_ext" <<_ACEOF
14065 #line 14065 "configure"
14066 #include "confdefs.h"
14067
14068 #include <stdlib.h>
14069 #include <stdarg.h>
14070 #include <stdio.h>
14071 #include <wchar.h>
14072 #ifdef HAVE_LIBUTF8_H
14073 #include <libutf8.h>
14074 #endif
14075 int
14076 main (void)
14077 {
14078 wint_t value; (void) value
14079   ;
14080   return 0;
14081 }
14082 _ACEOF
14083 rm -f "conftest.$ac_objext"
14084 if { (eval echo "$as_me:14084: \"$ac_compile\"") >&5
14085   (eval $ac_compile) 2>&5
14086   ac_status=$?
14087   echo "$as_me:14087: \$? = $ac_status" >&5
14088   (exit "$ac_status"); } &&
14089          { ac_try='test -s "conftest.$ac_objext"'
14090   { (eval echo "$as_me:14090: \"$ac_try\"") >&5
14091   (eval $ac_try) 2>&5
14092   ac_status=$?
14093   echo "$as_me:14093: \$? = $ac_status" >&5
14094   (exit "$ac_status"); }; }; then
14095   cf_cv_wint_t=yes
14096 else
14097   echo "$as_me: failed program was:" >&5
14098 cat "conftest.$ac_ext" >&5
14099 cf_cv_wint_t=unknown
14100 fi
14101 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14102 fi
14103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14104 fi
14105 echo "$as_me:14105: result: $cf_cv_wint_t" >&5
14106 echo "${ECHO_T}$cf_cv_wint_t" >&6
14107
14108 if test "$cf_cv_wint_t" = yes ; then
14109
14110 cat >>confdefs.h <<\EOF
14111 #define NEED_WCHAR_H 1
14112 EOF
14113
14114         NEED_WCHAR_H=1
14115 fi
14116
14117 # if we do not find wint_t in either place, use substitution to provide a fallback.
14118 if test "$cf_cv_wint_t" = unknown ; then
14119         NCURSES_WINT_T=1
14120 fi
14121
14122 # if we find wint_t in either place, use substitution to provide a fallback.
14123 if test "$cf_cv_wint_t" != unknown ; then
14124         NCURSES_OK_WINT_T=1
14125 fi
14126
14127         if test "$NCURSES_MBSTATE_T" != 0; then
14128
14129 cat >>confdefs.h <<\EOF
14130 #define NEED_MBSTATE_T_DEF 1
14131 EOF
14132
14133         fi
14134 fi
14135
14136 ###   use option --disable-lp64 to allow long chtype
14137 echo "$as_me:14137: checking whether to enable _LP64 definition in curses.h" >&5
14138 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
14139
14140 # Check whether --enable-lp64 or --disable-lp64 was given.
14141 if test "${enable_lp64+set}" = set; then
14142   enableval="$enable_lp64"
14143   with_lp64=$enableval
14144 else
14145   with_lp64=$cf_dft_with_lp64
14146 fi;
14147 echo "$as_me:14147: result: $with_lp64" >&5
14148 echo "${ECHO_T}$with_lp64" >&6
14149
14150 if test "x$with_lp64" = xyes ; then
14151         cf_cv_enable_lp64=1
14152 else
14153         cf_cv_enable_lp64=0
14154 fi
14155
14156 # Check whether --enable-largefile or --disable-largefile was given.
14157 if test "${enable_largefile+set}" = set; then
14158   enableval="$enable_largefile"
14159
14160 fi;
14161 if test "$enable_largefile" != no; then
14162
14163   echo "$as_me:14163: checking for special C compiler options needed for large files" >&5
14164 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
14165 if test "${ac_cv_sys_largefile_CC+set}" = set; then
14166   echo $ECHO_N "(cached) $ECHO_C" >&6
14167 else
14168   ac_cv_sys_largefile_CC=no
14169      if test "$GCC" != yes; then
14170        ac_save_CC=$CC
14171        while :; do
14172          # IRIX 6.2 and later do not support large files by default,
14173          # so use the C compiler's -n32 option if that helps.
14174          cat >"conftest.$ac_ext" <<_ACEOF
14175 #line 14175 "configure"
14176 #include "confdefs.h"
14177 #include <sys/types.h>
14178  /* Check that off_t can represent 2**63 - 1 correctly.
14179     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14180     since some C++ compilers masquerading as C compilers
14181     incorrectly reject 9223372036854775807.  */
14182 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14183   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14184                        && LARGE_OFF_T % 2147483647 == 1)
14185                       ? 1 : -1];
14186 int
14187 main (void)
14188 {
14189
14190   ;
14191   return 0;
14192 }
14193 _ACEOF
14194          rm -f "conftest.$ac_objext"
14195 if { (eval echo "$as_me:14195: \"$ac_compile\"") >&5
14196   (eval $ac_compile) 2>&5
14197   ac_status=$?
14198   echo "$as_me:14198: \$? = $ac_status" >&5
14199   (exit "$ac_status"); } &&
14200          { ac_try='test -s "conftest.$ac_objext"'
14201   { (eval echo "$as_me:14201: \"$ac_try\"") >&5
14202   (eval $ac_try) 2>&5
14203   ac_status=$?
14204   echo "$as_me:14204: \$? = $ac_status" >&5
14205   (exit "$ac_status"); }; }; then
14206   break
14207 else
14208   echo "$as_me: failed program was:" >&5
14209 cat "conftest.$ac_ext" >&5
14210 fi
14211 rm -f "conftest.$ac_objext"
14212          CC="$CC -n32"
14213          rm -f "conftest.$ac_objext"
14214 if { (eval echo "$as_me:14214: \"$ac_compile\"") >&5
14215   (eval $ac_compile) 2>&5
14216   ac_status=$?
14217   echo "$as_me:14217: \$? = $ac_status" >&5
14218   (exit "$ac_status"); } &&
14219          { ac_try='test -s "conftest.$ac_objext"'
14220   { (eval echo "$as_me:14220: \"$ac_try\"") >&5
14221   (eval $ac_try) 2>&5
14222   ac_status=$?
14223   echo "$as_me:14223: \$? = $ac_status" >&5
14224   (exit "$ac_status"); }; }; then
14225   ac_cv_sys_largefile_CC=' -n32'; break
14226 else
14227   echo "$as_me: failed program was:" >&5
14228 cat "conftest.$ac_ext" >&5
14229 fi
14230 rm -f "conftest.$ac_objext"
14231          break
14232        done
14233        CC=$ac_save_CC
14234        rm -f "conftest.$ac_ext"
14235     fi
14236 fi
14237 echo "$as_me:14237: result: $ac_cv_sys_largefile_CC" >&5
14238 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
14239   if test "$ac_cv_sys_largefile_CC" != no; then
14240     CC=$CC$ac_cv_sys_largefile_CC
14241   fi
14242
14243   echo "$as_me:14243: checking for _FILE_OFFSET_BITS value needed for large files" >&5
14244 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
14245 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248   while :; do
14249   ac_cv_sys_file_offset_bits=no
14250   cat >"conftest.$ac_ext" <<_ACEOF
14251 #line 14251 "configure"
14252 #include "confdefs.h"
14253 #include <sys/types.h>
14254  /* Check that off_t can represent 2**63 - 1 correctly.
14255     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14256     since some C++ compilers masquerading as C compilers
14257     incorrectly reject 9223372036854775807.  */
14258 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14259   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14260                        && LARGE_OFF_T % 2147483647 == 1)
14261                       ? 1 : -1];
14262 int
14263 main (void)
14264 {
14265
14266   ;
14267   return 0;
14268 }
14269 _ACEOF
14270 rm -f "conftest.$ac_objext"
14271 if { (eval echo "$as_me:14271: \"$ac_compile\"") >&5
14272   (eval $ac_compile) 2>&5
14273   ac_status=$?
14274   echo "$as_me:14274: \$? = $ac_status" >&5
14275   (exit "$ac_status"); } &&
14276          { ac_try='test -s "conftest.$ac_objext"'
14277   { (eval echo "$as_me:14277: \"$ac_try\"") >&5
14278   (eval $ac_try) 2>&5
14279   ac_status=$?
14280   echo "$as_me:14280: \$? = $ac_status" >&5
14281   (exit "$ac_status"); }; }; then
14282   break
14283 else
14284   echo "$as_me: failed program was:" >&5
14285 cat "conftest.$ac_ext" >&5
14286 fi
14287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14288   cat >"conftest.$ac_ext" <<_ACEOF
14289 #line 14289 "configure"
14290 #include "confdefs.h"
14291 #define _FILE_OFFSET_BITS 64
14292 #include <sys/types.h>
14293  /* Check that off_t can represent 2**63 - 1 correctly.
14294     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14295     since some C++ compilers masquerading as C compilers
14296     incorrectly reject 9223372036854775807.  */
14297 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14298   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14299                        && LARGE_OFF_T % 2147483647 == 1)
14300                       ? 1 : -1];
14301 int
14302 main (void)
14303 {
14304
14305   ;
14306   return 0;
14307 }
14308 _ACEOF
14309 rm -f "conftest.$ac_objext"
14310 if { (eval echo "$as_me:14310: \"$ac_compile\"") >&5
14311   (eval $ac_compile) 2>&5
14312   ac_status=$?
14313   echo "$as_me:14313: \$? = $ac_status" >&5
14314   (exit "$ac_status"); } &&
14315          { ac_try='test -s "conftest.$ac_objext"'
14316   { (eval echo "$as_me:14316: \"$ac_try\"") >&5
14317   (eval $ac_try) 2>&5
14318   ac_status=$?
14319   echo "$as_me:14319: \$? = $ac_status" >&5
14320   (exit "$ac_status"); }; }; then
14321   ac_cv_sys_file_offset_bits=64; break
14322 else
14323   echo "$as_me: failed program was:" >&5
14324 cat "conftest.$ac_ext" >&5
14325 fi
14326 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14327   break
14328 done
14329 fi
14330 echo "$as_me:14330: result: $ac_cv_sys_file_offset_bits" >&5
14331 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14332 if test "$ac_cv_sys_file_offset_bits" != no; then
14333
14334 cat >>confdefs.h <<EOF
14335 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14336 EOF
14337
14338 fi
14339 rm -rf conftest*
14340   echo "$as_me:14340: checking for _LARGE_FILES value needed for large files" >&5
14341 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14342 if test "${ac_cv_sys_large_files+set}" = set; then
14343   echo $ECHO_N "(cached) $ECHO_C" >&6
14344 else
14345   while :; do
14346   ac_cv_sys_large_files=no
14347   cat >"conftest.$ac_ext" <<_ACEOF
14348 #line 14348 "configure"
14349 #include "confdefs.h"
14350 #include <sys/types.h>
14351  /* Check that off_t can represent 2**63 - 1 correctly.
14352     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14353     since some C++ compilers masquerading as C compilers
14354     incorrectly reject 9223372036854775807.  */
14355 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14356   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14357                        && LARGE_OFF_T % 2147483647 == 1)
14358                       ? 1 : -1];
14359 int
14360 main (void)
14361 {
14362
14363   ;
14364   return 0;
14365 }
14366 _ACEOF
14367 rm -f "conftest.$ac_objext"
14368 if { (eval echo "$as_me:14368: \"$ac_compile\"") >&5
14369   (eval $ac_compile) 2>&5
14370   ac_status=$?
14371   echo "$as_me:14371: \$? = $ac_status" >&5
14372   (exit "$ac_status"); } &&
14373          { ac_try='test -s "conftest.$ac_objext"'
14374   { (eval echo "$as_me:14374: \"$ac_try\"") >&5
14375   (eval $ac_try) 2>&5
14376   ac_status=$?
14377   echo "$as_me:14377: \$? = $ac_status" >&5
14378   (exit "$ac_status"); }; }; then
14379   break
14380 else
14381   echo "$as_me: failed program was:" >&5
14382 cat "conftest.$ac_ext" >&5
14383 fi
14384 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14385   cat >"conftest.$ac_ext" <<_ACEOF
14386 #line 14386 "configure"
14387 #include "confdefs.h"
14388 #define _LARGE_FILES 1
14389 #include <sys/types.h>
14390  /* Check that off_t can represent 2**63 - 1 correctly.
14391     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14392     since some C++ compilers masquerading as C compilers
14393     incorrectly reject 9223372036854775807.  */
14394 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14395   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14396                        && LARGE_OFF_T % 2147483647 == 1)
14397                       ? 1 : -1];
14398 int
14399 main (void)
14400 {
14401
14402   ;
14403   return 0;
14404 }
14405 _ACEOF
14406 rm -f "conftest.$ac_objext"
14407 if { (eval echo "$as_me:14407: \"$ac_compile\"") >&5
14408   (eval $ac_compile) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit "$ac_status"); } &&
14412          { ac_try='test -s "conftest.$ac_objext"'
14413   { (eval echo "$as_me:14413: \"$ac_try\"") >&5
14414   (eval $ac_try) 2>&5
14415   ac_status=$?
14416   echo "$as_me:14416: \$? = $ac_status" >&5
14417   (exit "$ac_status"); }; }; then
14418   ac_cv_sys_large_files=1; break
14419 else
14420   echo "$as_me: failed program was:" >&5
14421 cat "conftest.$ac_ext" >&5
14422 fi
14423 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14424   break
14425 done
14426 fi
14427 echo "$as_me:14427: result: $ac_cv_sys_large_files" >&5
14428 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14429 if test "$ac_cv_sys_large_files" != no; then
14430
14431 cat >>confdefs.h <<EOF
14432 #define _LARGE_FILES $ac_cv_sys_large_files
14433 EOF
14434
14435 fi
14436 rm -rf conftest*
14437 fi
14438
14439         if test "$enable_largefile" != no ; then
14440         echo "$as_me:14440: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14441 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14442 if test "${ac_cv_sys_largefile_source+set}" = set; then
14443   echo $ECHO_N "(cached) $ECHO_C" >&6
14444 else
14445   while :; do
14446   ac_cv_sys_largefile_source=no
14447   cat >"conftest.$ac_ext" <<_ACEOF
14448 #line 14448 "configure"
14449 #include "confdefs.h"
14450 #include <stdio.h>
14451     #include <sys/types.h>
14452 int
14453 main (void)
14454 {
14455
14456     int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14457     return my_fseeko(stdin, 0, 0);
14458   ;
14459   return 0;
14460 }
14461 _ACEOF
14462 rm -f "conftest.$ac_objext"
14463 if { (eval echo "$as_me:14463: \"$ac_compile\"") >&5
14464   (eval $ac_compile) 2>&5
14465   ac_status=$?
14466   echo "$as_me:14466: \$? = $ac_status" >&5
14467   (exit "$ac_status"); } &&
14468          { ac_try='test -s "conftest.$ac_objext"'
14469   { (eval echo "$as_me:14469: \"$ac_try\"") >&5
14470   (eval $ac_try) 2>&5
14471   ac_status=$?
14472   echo "$as_me:14472: \$? = $ac_status" >&5
14473   (exit "$ac_status"); }; }; then
14474   break
14475 else
14476   echo "$as_me: failed program was:" >&5
14477 cat "conftest.$ac_ext" >&5
14478 fi
14479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14480   cat >"conftest.$ac_ext" <<_ACEOF
14481 #line 14481 "configure"
14482 #include "confdefs.h"
14483 #define _LARGEFILE_SOURCE 1
14484 #include <stdio.h>
14485     #include <sys/types.h>
14486 int
14487 main (void)
14488 {
14489
14490     int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14491     return my_fseeko(stdin, 0, 0);
14492   ;
14493   return 0;
14494 }
14495 _ACEOF
14496 rm -f "conftest.$ac_objext"
14497 if { (eval echo "$as_me:14497: \"$ac_compile\"") >&5
14498   (eval $ac_compile) 2>&5
14499   ac_status=$?
14500   echo "$as_me:14500: \$? = $ac_status" >&5
14501   (exit "$ac_status"); } &&
14502          { ac_try='test -s "conftest.$ac_objext"'
14503   { (eval echo "$as_me:14503: \"$ac_try\"") >&5
14504   (eval $ac_try) 2>&5
14505   ac_status=$?
14506   echo "$as_me:14506: \$? = $ac_status" >&5
14507   (exit "$ac_status"); }; }; then
14508   ac_cv_sys_largefile_source=1; break
14509 else
14510   echo "$as_me: failed program was:" >&5
14511 cat "conftest.$ac_ext" >&5
14512 fi
14513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14514   break
14515 done
14516 fi
14517 echo "$as_me:14517: result: $ac_cv_sys_largefile_source" >&5
14518 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14519 if test "$ac_cv_sys_largefile_source" != no; then
14520
14521 cat >>confdefs.h <<EOF
14522 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14523 EOF
14524
14525 fi
14526 rm -rf conftest*
14527
14528 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14529 # in glibc 2.1.3, but that breaks too many other things.
14530 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14531 echo "$as_me:14531: checking for fseeko" >&5
14532 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14533 if test "${ac_cv_func_fseeko+set}" = set; then
14534   echo $ECHO_N "(cached) $ECHO_C" >&6
14535 else
14536   cat >"conftest.$ac_ext" <<_ACEOF
14537 #line 14537 "configure"
14538 #include "confdefs.h"
14539 #include <stdio.h>
14540                              #include <sys/types.h>
14541 int
14542 main (void)
14543 {
14544 int (*my_fseeko)(FILE *, off_t, int) = fseeko;
14545                             return my_fseeko && my_fseeko (stdin, 0, 0);
14546   ;
14547   return 0;
14548 }
14549 _ACEOF
14550 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14551 if { (eval echo "$as_me:14551: \"$ac_link\"") >&5
14552   (eval $ac_link) 2>&5
14553   ac_status=$?
14554   echo "$as_me:14554: \$? = $ac_status" >&5
14555   (exit "$ac_status"); } &&
14556          { ac_try='test -s "conftest$ac_exeext"'
14557   { (eval echo "$as_me:14557: \"$ac_try\"") >&5
14558   (eval $ac_try) 2>&5
14559   ac_status=$?
14560   echo "$as_me:14560: \$? = $ac_status" >&5
14561   (exit "$ac_status"); }; }; then
14562   ac_cv_func_fseeko=yes
14563 else
14564   echo "$as_me: failed program was:" >&5
14565 cat "conftest.$ac_ext" >&5
14566 ac_cv_func_fseeko=no
14567 fi
14568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14569 fi
14570 echo "$as_me:14570: result: $ac_cv_func_fseeko" >&5
14571 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14572 if test $ac_cv_func_fseeko = yes; then
14573
14574 cat >>confdefs.h <<\EOF
14575 #define HAVE_FSEEKO 1
14576 EOF
14577
14578 fi
14579
14580         # Normally we would collect these definitions in the config.h,
14581         # but (like _XOPEN_SOURCE), some environments rely on having these
14582         # defined before any of the system headers are included.  Another
14583         # case comes up with C++, e.g., on AIX the compiler compiles the
14584         # header files by themselves before looking at the body files it is
14585         # told to compile.  For ncurses, those header files do not include
14586         # the config.h
14587         if test "$ac_cv_sys_large_files" != no
14588         then
14589
14590         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14591         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14592
14593         fi
14594         if test "$ac_cv_sys_largefile_source" != no
14595         then
14596
14597         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14598         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14599
14600         fi
14601         if test "$ac_cv_sys_file_offset_bits" != no
14602         then
14603
14604         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14605         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14606
14607         fi
14608
14609         echo "$as_me:14609: checking whether to use struct dirent64" >&5
14610 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14611 if test "${cf_cv_struct_dirent64+set}" = set; then
14612   echo $ECHO_N "(cached) $ECHO_C" >&6
14613 else
14614
14615                 cat >"conftest.$ac_ext" <<_ACEOF
14616 #line 14616 "configure"
14617 #include "confdefs.h"
14618
14619 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14620 #include <sys/types.h>
14621 #include <dirent.h>
14622
14623 #ifndef __REDIRECT
14624 /* if transitional largefile support is setup, this is true */
14625 extern struct dirent64 * readdir(DIR *);
14626 #endif
14627
14628 int
14629 main (void)
14630 {
14631
14632                 DIR *dp = opendir(".");
14633                 struct dirent64 *x = readdir(dp);
14634                 struct dirent *y = readdir(dp);
14635                 int z = x - y;
14636                 (void)z;
14637
14638   ;
14639   return 0;
14640 }
14641 _ACEOF
14642 rm -f "conftest.$ac_objext"
14643 if { (eval echo "$as_me:14643: \"$ac_compile\"") >&5
14644   (eval $ac_compile) 2>&5
14645   ac_status=$?
14646   echo "$as_me:14646: \$? = $ac_status" >&5
14647   (exit "$ac_status"); } &&
14648          { ac_try='test -s "conftest.$ac_objext"'
14649   { (eval echo "$as_me:14649: \"$ac_try\"") >&5
14650   (eval $ac_try) 2>&5
14651   ac_status=$?
14652   echo "$as_me:14652: \$? = $ac_status" >&5
14653   (exit "$ac_status"); }; }; then
14654   cf_cv_struct_dirent64=yes
14655 else
14656   echo "$as_me: failed program was:" >&5
14657 cat "conftest.$ac_ext" >&5
14658 cf_cv_struct_dirent64=no
14659 fi
14660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14661
14662 fi
14663 echo "$as_me:14663: result: $cf_cv_struct_dirent64" >&5
14664 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14665         test "$cf_cv_struct_dirent64" = yes &&
14666 cat >>confdefs.h <<\EOF
14667 #define HAVE_STRUCT_DIRENT64 1
14668 EOF
14669
14670         fi
14671
14672 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14673 echo "$as_me:14673: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14674 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14675
14676 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14677 if test "${enable_tparm_varargs+set}" = set; then
14678   enableval="$enable_tparm_varargs"
14679   with_tparm_varargs=$enableval
14680 else
14681   with_tparm_varargs=yes
14682 fi;
14683 echo "$as_me:14683: result: $with_tparm_varargs" >&5
14684 echo "${ECHO_T}$with_tparm_varargs" >&6
14685 NCURSES_TPARM_VARARGS=0
14686 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14687
14688 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14689 if test "$with_ticlib" != no ; then
14690 echo "$as_me:14690: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14691 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14692
14693 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14694 if test "${enable_tic_depends+set}" = set; then
14695   enableval="$enable_tic_depends"
14696   with_tic_depends=$enableval
14697 else
14698   with_tic_depends=yes
14699 fi;
14700 echo "$as_me:14700: result: $with_tic_depends" >&5
14701 echo "${ECHO_T}$with_tic_depends" >&6
14702 else
14703         with_tic_depends=no
14704 fi
14705
14706 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14707 echo "$as_me:14707: checking if you want to enable wattr* macros" >&5
14708 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14709
14710 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14711 if test "${enable_wattr_macros+set}" = set; then
14712   enableval="$enable_wattr_macros"
14713   with_wattr_macros=$enableval
14714 else
14715   with_wattr_macros=no
14716 fi;
14717 if [ "x$with_wattr_macros" != xyes ]; then
14718         NCURSES_WATTR_MACROS=0
14719         echo "$as_me:14719: result: no" >&5
14720 echo "${ECHO_T}no" >&6
14721 else
14722         NCURSES_WATTR_MACROS=1
14723         echo "$as_me:14723: result: yes" >&5
14724 echo "${ECHO_T}yes" >&6
14725 fi
14726
14727 echo "$as_me:14727: checking for X11 rgb file" >&5
14728 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14729
14730 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14731 if test "${with_x11_rgb+set}" = set; then
14732   withval="$with_x11_rgb"
14733   RGB_PATH=$withval
14734 else
14735   RGB_PATH=auto
14736 fi;
14737
14738 if test "x$RGB_PATH" = xauto
14739 then
14740         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14741         for cf_path in \
14742                 /opt/local/share/X11/rgb.txt \
14743                 /opt/X11/share/X11/rgb.txt \
14744                 /usr/share/X11/rgb.txt \
14745                 /usr/X11/share/X11/rgb.txt \
14746                 /usr/X11/lib/X11/rgb.txt \
14747                 /usr/lib/X11/rgb.txt \
14748                 /etc/X11/rgb.txt \
14749                 /usr/pkg/lib/X11/rgb.txt \
14750                 /usr/X11R7/lib/X11/rgb.txt \
14751                 /usr/X11R6/lib/X11/rgb.txt \
14752                 /usr/X11R5/lib/X11/rgb.txt \
14753                 /usr/X11R4/lib/X11/rgb.txt \
14754                 /usr/local/lib/X11/rgb.txt \
14755                 /usr/local/share/X11/rgb.txt \
14756                 /usr/lib64/X11/rgb.txt
14757         do
14758                 if test -f "$cf_path" ; then
14759                         RGB_PATH="$cf_path"
14760                         break
14761                 fi
14762         done
14763 else
14764         cf_path=$RGB_PATH
14765
14766 if test "x$prefix" != xNONE; then
14767         cf_path_syntax="$prefix"
14768 else
14769         cf_path_syntax="$ac_default_prefix"
14770 fi
14771
14772 case ".$cf_path" in
14773 (.\$\(*\)*|.\'*\'*)
14774         ;;
14775 (..|./*|.\\*)
14776         ;;
14777 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14778         ;;
14779 (.\$\{*prefix\}*|.\$\{*dir\}*)
14780         eval cf_path="$cf_path"
14781         case ".$cf_path" in
14782         (.NONE/*)
14783                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14784                 ;;
14785         esac
14786         ;;
14787 (.no|.NONE/*)
14788         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14789         ;;
14790 (*)
14791         { { echo "$as_me:14791: error: expected a pathname, not \"$cf_path\"" >&5
14792 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14793    { (exit 1); exit 1; }; }
14794         ;;
14795 esac
14796
14797 fi
14798
14799 echo "$as_me:14799: result: $RGB_PATH" >&5
14800 echo "${ECHO_T}$RGB_PATH" >&6
14801
14802 cat >>confdefs.h <<EOF
14803 #define RGB_PATH "$cf_path"
14804 EOF
14805
14806 no_x11_rgb=
14807 if test "$RGB_PATH" = no
14808 then
14809         no_x11_rgb="#"
14810 fi
14811
14812 ###   use option --with-bool to override bool's type
14813
14814 echo "$as_me:14814: checking for type of bool" >&5
14815 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14816
14817 # Check whether --with-bool or --without-bool was given.
14818 if test "${with_bool+set}" = set; then
14819   withval="$with_bool"
14820   NCURSES_BOOL="$withval"
14821 else
14822   NCURSES_BOOL=auto
14823 fi;
14824 echo "$as_me:14824: result: $NCURSES_BOOL" >&5
14825 echo "${ECHO_T}$NCURSES_BOOL" >&6
14826 case x$NCURSES_BOOL in
14827 (x|xyes|xno)
14828         { { echo "$as_me:14828: error: expected a type name for bool" >&5
14829 echo "$as_me: error: expected a type name for bool" >&2;}
14830    { (exit 1); exit 1; }; }
14831         ;;
14832 esac
14833
14834 echo "$as_me:14834: checking for alternate terminal capabilities file" >&5
14835 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14836
14837 # Check whether --with-caps or --without-caps was given.
14838 if test "${with_caps+set}" = set; then
14839   withval="$with_caps"
14840   TERMINFO_CAPS=Caps.$withval
14841 else
14842   TERMINFO_CAPS=Caps
14843 fi;
14844 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14845 then
14846         { echo "$as_me:14846: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14847 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14848         TERMINFO_CAPS=Caps
14849 fi
14850 echo "$as_me:14850: result: $TERMINFO_CAPS" >&5
14851 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14852
14853 ###   use option --with-chtype to override chtype's type
14854
14855 echo "$as_me:14855: checking for type of chtype" >&5
14856 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14857
14858 # Check whether --with-chtype or --without-chtype was given.
14859 if test "${with_chtype+set}" = set; then
14860   withval="$with_chtype"
14861   NCURSES_CHTYPE="$withval"
14862 else
14863   NCURSES_CHTYPE=$cf_dft_chtype
14864 fi;
14865 echo "$as_me:14865: result: $NCURSES_CHTYPE" >&5
14866 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14867 case x$NCURSES_CHTYPE in
14868 (x|xyes|xno)
14869         { { echo "$as_me:14869: error: expected a type name for chtype" >&5
14870 echo "$as_me: error: expected a type name for chtype" >&2;}
14871    { (exit 1); exit 1; }; }
14872         ;;
14873 esac
14874
14875 ###   use option --with-ospeed to override ospeed's type
14876
14877 echo "$as_me:14877: checking for type of ospeed" >&5
14878 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14879
14880 # Check whether --with-ospeed or --without-ospeed was given.
14881 if test "${with_ospeed+set}" = set; then
14882   withval="$with_ospeed"
14883   NCURSES_OSPEED="$withval"
14884 else
14885   NCURSES_OSPEED=short
14886 fi;
14887 echo "$as_me:14887: result: $NCURSES_OSPEED" >&5
14888 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14889 case x$NCURSES_OSPEED in
14890 (x|xyes|xno)
14891         { { echo "$as_me:14891: error: expected a type name for ospeed" >&5
14892 echo "$as_me: error: expected a type name for ospeed" >&2;}
14893    { (exit 1); exit 1; }; }
14894         ;;
14895 esac
14896
14897 ###   use option --with-mmask-t to override mmask_t's type
14898
14899 echo "$as_me:14899: checking for type of mmask-t" >&5
14900 echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6
14901
14902 # Check whether --with-mmask-t or --without-mmask-t was given.
14903 if test "${with_mmask_t+set}" = set; then
14904   withval="$with_mmask_t"
14905   NCURSES_MMASK_T="$withval"
14906 else
14907   NCURSES_MMASK_T=$cf_dft_mmask_t
14908 fi;
14909 echo "$as_me:14909: result: $NCURSES_MMASK_T" >&5
14910 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14911 case x$NCURSES_MMASK_T in
14912 (x|xyes|xno)
14913         { { echo "$as_me:14913: error: expected a type name for mmask-t" >&5
14914 echo "$as_me: error: expected a type name for mmask-t" >&2;}
14915    { (exit 1); exit 1; }; }
14916         ;;
14917 esac
14918
14919 ###   use option --with-ccharw-max to override CCHARW_MAX size
14920 echo "$as_me:14920: checking for size CCHARW_MAX" >&5
14921 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14922
14923 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14924 if test "${with_ccharw_max+set}" = set; then
14925   withval="$with_ccharw_max"
14926   NCURSES_CCHARW_MAX="$withval"
14927 else
14928   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14929 fi;
14930 echo "$as_me:14930: result: $NCURSES_CCHARW_MAX" >&5
14931 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14932
14933 echo "$as_me:14933: checking for signed char" >&5
14934 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14935 if test "${ac_cv_type_signed_char+set}" = set; then
14936   echo $ECHO_N "(cached) $ECHO_C" >&6
14937 else
14938   cat >"conftest.$ac_ext" <<_ACEOF
14939 #line 14939 "configure"
14940 #include "confdefs.h"
14941 $ac_includes_default
14942 int
14943 main (void)
14944 {
14945 if ((signed char *) 0)
14946   return 0;
14947 if (sizeof (signed char))
14948   return 0;
14949   ;
14950   return 0;
14951 }
14952 _ACEOF
14953 rm -f "conftest.$ac_objext"
14954 if { (eval echo "$as_me:14954: \"$ac_compile\"") >&5
14955   (eval $ac_compile) 2>&5
14956   ac_status=$?
14957   echo "$as_me:14957: \$? = $ac_status" >&5
14958   (exit "$ac_status"); } &&
14959          { ac_try='test -s "conftest.$ac_objext"'
14960   { (eval echo "$as_me:14960: \"$ac_try\"") >&5
14961   (eval $ac_try) 2>&5
14962   ac_status=$?
14963   echo "$as_me:14963: \$? = $ac_status" >&5
14964   (exit "$ac_status"); }; }; then
14965   ac_cv_type_signed_char=yes
14966 else
14967   echo "$as_me: failed program was:" >&5
14968 cat "conftest.$ac_ext" >&5
14969 ac_cv_type_signed_char=no
14970 fi
14971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14972 fi
14973 echo "$as_me:14973: result: $ac_cv_type_signed_char" >&5
14974 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14975
14976 echo "$as_me:14976: checking size of signed char" >&5
14977 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14978 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14979   echo $ECHO_N "(cached) $ECHO_C" >&6
14980 else
14981   if test "$ac_cv_type_signed_char" = yes; then
14982   if test "$cross_compiling" = yes; then
14983   # Depending upon the size, compute the lo and hi bounds.
14984 cat >"conftest.$ac_ext" <<_ACEOF
14985 #line 14985 "configure"
14986 #include "confdefs.h"
14987 $ac_includes_default
14988 int
14989 main (void)
14990 {
14991 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14992   ;
14993   return 0;
14994 }
14995 _ACEOF
14996 rm -f "conftest.$ac_objext"
14997 if { (eval echo "$as_me:14997: \"$ac_compile\"") >&5
14998   (eval $ac_compile) 2>&5
14999   ac_status=$?
15000   echo "$as_me:15000: \$? = $ac_status" >&5
15001   (exit "$ac_status"); } &&
15002          { ac_try='test -s "conftest.$ac_objext"'
15003   { (eval echo "$as_me:15003: \"$ac_try\"") >&5
15004   (eval $ac_try) 2>&5
15005   ac_status=$?
15006   echo "$as_me:15006: \$? = $ac_status" >&5
15007   (exit "$ac_status"); }; }; then
15008   ac_lo=0 ac_mid=0
15009   while :; do
15010     cat >"conftest.$ac_ext" <<_ACEOF
15011 #line 15011 "configure"
15012 #include "confdefs.h"
15013 $ac_includes_default
15014 int
15015 main (void)
15016 {
15017 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15018   ;
15019   return 0;
15020 }
15021 _ACEOF
15022 rm -f "conftest.$ac_objext"
15023 if { (eval echo "$as_me:15023: \"$ac_compile\"") >&5
15024   (eval $ac_compile) 2>&5
15025   ac_status=$?
15026   echo "$as_me:15026: \$? = $ac_status" >&5
15027   (exit "$ac_status"); } &&
15028          { ac_try='test -s "conftest.$ac_objext"'
15029   { (eval echo "$as_me:15029: \"$ac_try\"") >&5
15030   (eval $ac_try) 2>&5
15031   ac_status=$?
15032   echo "$as_me:15032: \$? = $ac_status" >&5
15033   (exit "$ac_status"); }; }; then
15034   ac_hi=$ac_mid; break
15035 else
15036   echo "$as_me: failed program was:" >&5
15037 cat "conftest.$ac_ext" >&5
15038 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
15039 fi
15040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15041   done
15042 else
15043   echo "$as_me: failed program was:" >&5
15044 cat "conftest.$ac_ext" >&5
15045 ac_hi=-1 ac_mid=-1
15046   while :; do
15047     cat >"conftest.$ac_ext" <<_ACEOF
15048 #line 15048 "configure"
15049 #include "confdefs.h"
15050 $ac_includes_default
15051 int
15052 main (void)
15053 {
15054 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
15055   ;
15056   return 0;
15057 }
15058 _ACEOF
15059 rm -f "conftest.$ac_objext"
15060 if { (eval echo "$as_me:15060: \"$ac_compile\"") >&5
15061   (eval $ac_compile) 2>&5
15062   ac_status=$?
15063   echo "$as_me:15063: \$? = $ac_status" >&5
15064   (exit "$ac_status"); } &&
15065          { ac_try='test -s "conftest.$ac_objext"'
15066   { (eval echo "$as_me:15066: \"$ac_try\"") >&5
15067   (eval $ac_try) 2>&5
15068   ac_status=$?
15069   echo "$as_me:15069: \$? = $ac_status" >&5
15070   (exit "$ac_status"); }; }; then
15071   ac_lo=$ac_mid; break
15072 else
15073   echo "$as_me: failed program was:" >&5
15074 cat "conftest.$ac_ext" >&5
15075 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
15076 fi
15077 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15078   done
15079 fi
15080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15081 # Binary search between lo and hi bounds.
15082 while test "x$ac_lo" != "x$ac_hi"; do
15083   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
15084   cat >"conftest.$ac_ext" <<_ACEOF
15085 #line 15085 "configure"
15086 #include "confdefs.h"
15087 $ac_includes_default
15088 int
15089 main (void)
15090 {
15091 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
15092   ;
15093   return 0;
15094 }
15095 _ACEOF
15096 rm -f "conftest.$ac_objext"
15097 if { (eval echo "$as_me:15097: \"$ac_compile\"") >&5
15098   (eval $ac_compile) 2>&5
15099   ac_status=$?
15100   echo "$as_me:15100: \$? = $ac_status" >&5
15101   (exit "$ac_status"); } &&
15102          { ac_try='test -s "conftest.$ac_objext"'
15103   { (eval echo "$as_me:15103: \"$ac_try\"") >&5
15104   (eval $ac_try) 2>&5
15105   ac_status=$?
15106   echo "$as_me:15106: \$? = $ac_status" >&5
15107   (exit "$ac_status"); }; }; then
15108   ac_hi=$ac_mid
15109 else
15110   echo "$as_me: failed program was:" >&5
15111 cat "conftest.$ac_ext" >&5
15112 ac_lo=`expr "$ac_mid" + 1`
15113 fi
15114 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15115 done
15116 ac_cv_sizeof_signed_char=$ac_lo
15117 else
15118   if test "$cross_compiling" = yes; then
15119   { { echo "$as_me:15119: error: cannot run test program while cross compiling" >&5
15120 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
15121    { (exit 1); exit 1; }; }
15122 else
15123   cat >"conftest.$ac_ext" <<_ACEOF
15124 #line 15124 "configure"
15125 #include "confdefs.h"
15126 $ac_includes_default
15127 int
15128 main (void)
15129 {
15130 FILE *f = fopen ("conftest.val", "w");
15131 if (!f)
15132   $ac_main_return (1);
15133 fprintf (f, "%ld", (long)(sizeof (signed char)));
15134 fclose (f);
15135   ;
15136   return 0;
15137 }
15138 _ACEOF
15139 rm -f "conftest$ac_exeext"
15140 if { (eval echo "$as_me:15140: \"$ac_link\"") >&5
15141   (eval $ac_link) 2>&5
15142   ac_status=$?
15143   echo "$as_me:15143: \$? = $ac_status" >&5
15144   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15145   { (eval echo "$as_me:15145: \"$ac_try\"") >&5
15146   (eval $ac_try) 2>&5
15147   ac_status=$?
15148   echo "$as_me:15148: \$? = $ac_status" >&5
15149   (exit "$ac_status"); }; }; then
15150   ac_cv_sizeof_signed_char=`cat conftest.val`
15151 else
15152   echo "$as_me: program exited with status $ac_status" >&5
15153 echo "$as_me: failed program was:" >&5
15154 cat "conftest.$ac_ext" >&5
15155 fi
15156 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15157 fi
15158 fi
15159 rm -f conftest.val
15160 else
15161   ac_cv_sizeof_signed_char=0
15162 fi
15163 fi
15164 echo "$as_me:15164: result: $ac_cv_sizeof_signed_char" >&5
15165 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
15166 cat >>confdefs.h <<EOF
15167 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
15168 EOF
15169
15170 if test "$ac_cv_sizeof_signed_char" = 1 ; then
15171         NCURSES_SBOOL="signed char"
15172 else
15173         NCURSES_SBOOL="char"
15174 fi
15175 echo "$as_me:15175: checking whether to use signed chars for Boolean array in term.h" >&5
15176 echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
15177
15178 # Check whether --enable-signed-char or --disable-signed-char was given.
15179 if test "${enable_signed_char+set}" = set; then
15180   enableval="$enable_signed_char"
15181   with_signed_char=$enableval
15182 else
15183   with_signed_char=$cf_dft_signed_char
15184 fi;
15185 echo "$as_me:15185: result: $with_signed_char" >&5
15186 echo "${ECHO_T}$with_signed_char" >&6
15187 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
15188
15189 ###   use option --with-tparm-arg to override tparm's argument type
15190
15191 echo "$as_me:15191: checking for type of tparm-arg" >&5
15192 echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6
15193
15194 # Check whether --with-tparm-arg or --without-tparm-arg was given.
15195 if test "${with_tparm_arg+set}" = set; then
15196   withval="$with_tparm_arg"
15197   NCURSES_TPARM_ARG="$withval"
15198 else
15199   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
15200 fi;
15201 echo "$as_me:15201: result: $NCURSES_TPARM_ARG" >&5
15202 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
15203 case x$NCURSES_TPARM_ARG in
15204 (x|xyes|xno)
15205         { { echo "$as_me:15205: error: expected a type name for tparm-arg" >&5
15206 echo "$as_me: error: expected a type name for tparm-arg" >&2;}
15207    { (exit 1); exit 1; }; }
15208         ;;
15209 esac
15210
15211 ### Enable compiling-in rcs id's
15212 echo "$as_me:15212: checking if RCS identifiers should be compiled-in" >&5
15213 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
15214
15215 # Check whether --with-rcs-ids or --without-rcs-ids was given.
15216 if test "${with_rcs_ids+set}" = set; then
15217   withval="$with_rcs_ids"
15218   with_rcs_ids=$withval
15219 else
15220   with_rcs_ids=no
15221 fi;
15222 echo "$as_me:15222: result: $with_rcs_ids" >&5
15223 echo "${ECHO_T}$with_rcs_ids" >&6
15224 test "x$with_rcs_ids" = xyes &&
15225 cat >>confdefs.h <<\EOF
15226 #define USE_RCS_IDS 1
15227 EOF
15228
15229 ###############################################################################
15230
15231 echo "$as_me:15231: checking format of man-pages" >&5
15232 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
15233
15234 # Check whether --with-manpage-format or --without-manpage-format was given.
15235 if test "${with_manpage_format+set}" = set; then
15236   withval="$with_manpage_format"
15237   MANPAGE_FORMAT=$withval
15238 else
15239   MANPAGE_FORMAT=unknown
15240 fi;
15241
15242 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
15243 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
15244
15245 cf_unknown=
15246
15247 case "$MANPAGE_FORMAT" in
15248 (unknown)
15249         if test -z "$MANPATH" ; then
15250                 MANPATH="/usr/man:/usr/share/man"
15251         fi
15252
15253         # look for the 'date' man-page (it is most likely to be installed!)
15254         MANPAGE_FORMAT=
15255         cf_preform="no"
15256         cf_catonly="yes"
15257         cf_example="date"
15258
15259         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
15260         for cf_dir in $MANPATH; do
15261                 test -z "$cf_dir" && cf_dir=/usr/man
15262                 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
15263                 do
15264                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
15265                         if test "x$cf_test" = "x$cf_name" ; then
15266
15267                                 case "$cf_name" in
15268                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
15269                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
15270                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
15271                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
15272                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
15273                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
15274                                 esac
15275
15276                                 case "$cf_name" in
15277                                 ($cf_dir/man*)
15278                                         cf_catonly=no
15279                                         ;;
15280                                 ($cf_dir/cat*)
15281                                         cf_preform=yes
15282                                         ;;
15283                                 esac
15284                                 break
15285                         fi
15286
15287                         # if we found a match in either man* or cat*, stop looking
15288                         if test -n "$MANPAGE_FORMAT" ; then
15289                                 cf_found=no
15290                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
15291                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
15292                                 case "$cf_name" in
15293                                 ($cf_dir/cat*)
15294                                         cf_found=yes
15295                                         ;;
15296                                 esac
15297                                 test "$cf_found" = yes && break
15298                         fi
15299                 done
15300                 # only check the first directory in $MANPATH where we find manpages
15301                 if test -n "$MANPAGE_FORMAT" ; then
15302                         break
15303                 fi
15304         done
15305         # if we did not find the example, just assume it is normal
15306         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
15307         IFS="$ac_save_ifs"
15308         ;;
15309 (*)
15310         for cf_option in $MANPAGE_FORMAT; do
15311         case "$cf_option" in
15312         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
15313                 ;;
15314         (*)
15315                 cf_unknown="$cf_unknown $cf_option"
15316                 ;;
15317         esac
15318         done
15319         ;;
15320 esac
15321
15322 echo "$as_me:15322: result: $MANPAGE_FORMAT" >&5
15323 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
15324 if test -n "$cf_unknown" ; then
15325         { echo "$as_me:15325: WARNING: Unexpected manpage-format $cf_unknown" >&5
15326 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
15327 fi
15328
15329 cf_manpage_format=no
15330 cf_manpage_inboth=no
15331 cf_manpage_so_strip=
15332 cf_manpage_compress=
15333 cf_manpage_coptions=
15334
15335 for cf_item in $MANPAGE_FORMAT
15336 do
15337 case "$cf_item" in
15338 (catonly)
15339         cf_manpage_format=yes
15340         cf_manpage_inboth=no
15341         ;;
15342 (formatted)
15343         cf_manpage_format=yes
15344         cf_manpage_inboth=yes
15345         ;;
15346 (compress)
15347         cf_manpage_so_strip="Z"
15348         cf_manpage_compress=compress
15349         ;;
15350 (gzip)
15351         cf_manpage_so_strip="gz"
15352         cf_manpage_compress=gzip
15353         cf_manpage_coptions=-n
15354         ;;
15355 (bzip2)
15356         cf_manpage_so_strip="bz2"
15357         cf_manpage_compress=bzip2
15358         ;;
15359 (xz)
15360         cf_manpage_so_strip="xz"
15361         cf_manpage_compress=xz
15362         ;;
15363 esac
15364 done
15365
15366 echo "$as_me:15366: checking for manpage renaming" >&5
15367 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15368
15369 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15370 if test "${with_manpage_renames+set}" = set; then
15371   withval="$with_manpage_renames"
15372   MANPAGE_RENAMES=$withval
15373 else
15374   MANPAGE_RENAMES=yes
15375 fi;
15376
15377 case ".$MANPAGE_RENAMES" in
15378 (.no)
15379         ;;
15380 (.|.yes)
15381         # Debian 'man' program?
15382         if test -f /etc/debian_version ; then
15383                 MANPAGE_RENAMES=man/man_db.renames
15384         else
15385                 MANPAGE_RENAMES=no
15386         fi
15387         ;;
15388 esac
15389
15390 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15391         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15392 elif test "$MANPAGE_RENAMES" = no ; then
15393         :
15394 elif test ! -f "$MANPAGE_RENAMES" ; then
15395         { { echo "$as_me:15395: error: not a filename: $MANPAGE_RENAMES" >&5
15396 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15397    { (exit 1); exit 1; }; }
15398 fi
15399
15400 echo "$as_me:15400: result: $MANPAGE_RENAMES" >&5
15401 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15402
15403 echo "$as_me:15403: checking if manpage aliases will be installed" >&5
15404 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15405
15406 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15407 if test "${with_manpage_aliases+set}" = set; then
15408   withval="$with_manpage_aliases"
15409   MANPAGE_ALIASES=$withval
15410 else
15411   MANPAGE_ALIASES=yes
15412 fi;
15413
15414 echo "$as_me:15414: result: $MANPAGE_ALIASES" >&5
15415 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15416
15417 case "x$LN_S" in
15418 (xln*)
15419         cf_use_symlinks=yes
15420         ;;
15421 (*)
15422         cf_use_symlinks=no
15423         ;;
15424 esac
15425
15426 MANPAGE_SYMLINKS=no
15427 if test "$MANPAGE_ALIASES" = yes ; then
15428 echo "$as_me:15428: checking if manpage symlinks should be used" >&5
15429 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15430
15431 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15432 if test "${with_manpage_symlinks+set}" = set; then
15433   withval="$with_manpage_symlinks"
15434   MANPAGE_SYMLINKS=$withval
15435 else
15436   MANPAGE_SYMLINKS=$cf_use_symlinks
15437 fi;
15438
15439 if test "$cf_use_symlinks" = no; then
15440 if test "$MANPAGE_SYMLINKS" = yes ; then
15441         { echo "$as_me:15441: WARNING: cannot make symlinks" >&5
15442 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15443         MANPAGE_SYMLINKS=no
15444 fi
15445 fi
15446
15447 echo "$as_me:15447: result: $MANPAGE_SYMLINKS" >&5
15448 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15449 fi
15450
15451 echo "$as_me:15451: checking for manpage tbl" >&5
15452 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15453
15454 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15455 if test "${with_manpage_tbl+set}" = set; then
15456   withval="$with_manpage_tbl"
15457   MANPAGE_TBL=$withval
15458 else
15459   MANPAGE_TBL=no
15460 fi;
15461
15462 echo "$as_me:15462: result: $MANPAGE_TBL" >&5
15463 echo "${ECHO_T}$MANPAGE_TBL" >&6
15464
15465 if test "$prefix" = "NONE" ; then
15466         cf_prefix="$ac_default_prefix"
15467 else
15468         cf_prefix="$prefix"
15469 fi
15470
15471 test ! -d man && mkdir man
15472
15473 cf_edit_man=./edit_man.sh
15474 cf_man_alias=`pwd`/man_alias.sed
15475
15476 cat >$cf_edit_man <<CF_EOF
15477 #! $SHELL
15478 # this script is generated by the configure-script CF_MAN_PAGES macro.
15479
15480 prefix="$cf_prefix"
15481 datarootdir="$datarootdir"
15482 datadir="$datadir"
15483
15484 NCURSES_MAJOR="$NCURSES_MAJOR"
15485 NCURSES_MINOR="$NCURSES_MINOR"
15486 NCURSES_PATCH="$NCURSES_PATCH"
15487
15488 NCURSES_OSPEED="$NCURSES_OSPEED"
15489 TERMINFO="$TERMINFO"
15490 TERMINFO_DIRS="$TERMINFO_DIRS"
15491
15492 INSTALL="$INSTALL"
15493 INSTALL_DATA="$INSTALL_DATA"
15494
15495 transform="$program_transform_name"
15496
15497 TMP=\${TMPDIR:=/tmp}/man\$\$
15498 trap "rm -f \$TMP; exit 1" 1 2 3 15
15499 trap "rm -f \$TMP" 0
15500
15501 form=\$1
15502 shift || exit 1
15503
15504 verb=\$1
15505 shift || exit 1
15506
15507 mandir=\$1
15508 shift || exit 1
15509
15510 srcdir=\$1
15511 top_srcdir=\$srcdir/..
15512 shift || exit 1
15513
15514 if test "\$form" = normal ; then
15515         if test "$cf_manpage_format" = yes ; then
15516         if test "$cf_manpage_inboth" = no ; then
15517                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15518                 exit $?
15519         fi
15520         fi
15521         cf_subdir=\$mandir/man
15522         cf_tables=$MANPAGE_TBL
15523 else
15524         cf_subdir=\$mandir/cat
15525         cf_tables=yes
15526 fi
15527
15528 # process the list of source-files
15529 for i in "\$@" ; do
15530 case \$i in
15531 (*.orig|*.rej) ;;
15532 (*.[0-9]*)
15533         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15534         if test "\$verb" = installing ; then
15535         if test ! -d "\$cf_subdir\${section}" ; then
15536                 mkdir -p "\$cf_subdir\$section"
15537         fi
15538         fi
15539
15540         # replace variables in man page
15541         if test ! -f "$cf_man_alias" ; then
15542 cat >>$cf_man_alias <<-CF_EOF2
15543                 s,@DATADIR@,\$datadir,g
15544                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15545                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15546                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15547                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15548                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15549                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15550 CF_EOF
15551
15552         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15553         do
15554                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15555                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15556 cat >>$cf_edit_man <<-CF_EOF
15557                 s,@$cf_NAME@,$cf_name,g
15558 CF_EOF
15559         done
15560
15561 cat >>$cf_edit_man <<CF_EOF
15562 CF_EOF2
15563                 echo "...made $cf_man_alias"
15564         fi
15565
15566         aliases=
15567         cf_source=\`basename "\$i"\`
15568         cf_full_alias=\$cf_source
15569         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15570         if test ! -f "\$cf_full_alias" ; then
15571                 echo ".. skipped \$cf_source"
15572                 continue
15573         fi
15574 CF_EOF
15575
15576 if test "$MANPAGE_ALIASES" != no ; then
15577 cat >>$cf_edit_man <<CF_EOF
15578         nCurses=ignore.3x
15579         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15580         test "$with_curses_h" = yes && nCurses=ncurses.3x
15581         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\`
15582 CF_EOF
15583 fi
15584
15585 if test "$MANPAGE_RENAMES" = no ; then
15586 cat >>$cf_edit_man <<CF_EOF
15587         # perform program transformations for section 1 man pages
15588         if test \$section = 1 ; then
15589                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15590         else
15591                 cf_target=\$cf_subdir\${section}/\$cf_source
15592         fi
15593 CF_EOF
15594 else
15595 cat >>$cf_edit_man <<CF_EOF
15596         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15597         if test -z "\$cf_target" ; then
15598                 echo "? missing rename for \$cf_source"
15599                 cf_target="\$cf_source"
15600         fi
15601         cf_target="\$cf_subdir\${section}/\${cf_target}"
15602
15603 CF_EOF
15604 fi
15605
15606 cat >>$cf_edit_man <<CF_EOF
15607         sed     -f "$cf_man_alias" \\
15608 CF_EOF
15609
15610 if test "$MANPAGE_RENAMES" != no ; then
15611 cat >>$cf_edit_man <<CF_EOF
15612                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15613 CF_EOF
15614 else
15615 cat >>$cf_edit_man <<CF_EOF
15616                 < "\$i" >\$TMP
15617 CF_EOF
15618 fi
15619
15620 cat >>$cf_edit_man <<CF_EOF
15621 if test \$cf_tables = yes ; then
15622         tbl \$TMP >\$TMP.out
15623         mv \$TMP.out \$TMP
15624 fi
15625 CF_EOF
15626
15627 if test "$with_overwrite" != yes ; then
15628 cat >>$cf_edit_man <<CF_EOF
15629         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15630         mv \$TMP.out \$TMP
15631 CF_EOF
15632 fi
15633
15634 if test "$with_curses_h" != yes ; then
15635 cat >>$cf_edit_man <<CF_EOF
15636         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15637         mv \$TMP.out \$TMP
15638 CF_EOF
15639 fi
15640
15641 cat >>$cf_edit_man <<CF_EOF
15642         if test "\$form" = format ; then
15643                 nroff -man \$TMP >\$TMP.out
15644                 mv \$TMP.out \$TMP
15645         fi
15646 CF_EOF
15647
15648 if test -n "$cf_manpage_compress" ; then
15649 cat >>$cf_edit_man <<CF_EOF
15650         if test "\$verb" = installing ; then
15651         if ( "$cf_manpage_compress" -f \$TMP )
15652         then
15653                 mv \$TMP.$cf_manpage_so_strip \$TMP
15654         fi
15655         fi
15656         cf_target="\$cf_target.$cf_manpage_so_strip"
15657 CF_EOF
15658 fi
15659
15660 case "$MANPAGE_FORMAT" in
15661 (*BSDI*)
15662 cat >>$cf_edit_man <<CF_EOF
15663         if test "\$form" = format ; then
15664                 # BSDI installs only .0 suffixes in the cat directories
15665                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15666         fi
15667 CF_EOF
15668   ;;
15669 esac
15670
15671 cat >>$cf_edit_man <<CF_EOF
15672         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15673         extra_suffix=
15674         if test -n "$EXTRA_SUFFIX" ; then
15675                 case \$cf_target in
15676                 (*${EXTRA_SUFFIX}\$suffix)
15677                         extra_suffix="$EXTRA_SUFFIX"
15678                         ;;
15679                 esac
15680         fi
15681         if test "\$verb" = installing ; then
15682                 echo "\$verb \$cf_target"
15683                 \$INSTALL_DATA \$TMP "\$cf_target"
15684                 test -d "\$cf_subdir\${section}" &&
15685                 test -n "\$aliases" && (
15686                         cd "\$cf_subdir\${section}" && (
15687                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15688                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15689                                 cf_target=\`basename "\$cf_target"\`
15690                                 for cf_alias in \$aliases
15691                                 do
15692                                         if test "\$section" = 1 ; then
15693                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15694                                         fi
15695                                         cf_alias="\${cf_alias}\${extra_suffix}"
15696
15697                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15698                                                 if test -f "\$cf_alias\${suffix}" ; then
15699                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15700                                                         then
15701                                                                 continue
15702                                                         fi
15703                                                 fi
15704                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15705 CF_EOF
15706 case "x$LN_S" in
15707 (*-f)
15708 cat >>$cf_edit_man <<CF_EOF
15709                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15710 CF_EOF
15711         ;;
15712 (*)
15713 cat >>$cf_edit_man <<CF_EOF
15714                                                 rm -f "\$cf_alias\${suffix}"
15715                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15716 CF_EOF
15717         ;;
15718 esac
15719 cat >>$cf_edit_man <<CF_EOF
15720                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15721                                                 echo ".so \$cf_source" >\$TMP
15722 CF_EOF
15723 if test -n "$cf_manpage_compress" ; then
15724 cat >>$cf_edit_man <<CF_EOF
15725                                                 if test -n "$cf_manpage_so_strip" ; then
15726                                                         "$cf_manpage_compress" $cf_manpage_coptions -f \$TMP
15727                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15728                                                 fi
15729 CF_EOF
15730 fi
15731 cat >>$cf_edit_man <<CF_EOF
15732                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15733                                                 rm -f "\$cf_alias\${suffix}"
15734                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15735                                         fi
15736                                 done
15737                         )
15738                 )
15739         elif test "\$verb" = removing ; then
15740                 test -f "\$cf_target" && (
15741                         echo "\$verb \$cf_target"
15742                         rm -f "\$cf_target"
15743                 )
15744                 test -d "\$cf_subdir\${section}" &&
15745                 test -n "\$aliases" && (
15746                         cd "\$cf_subdir\${section}" && (
15747                                 for cf_alias in \$aliases
15748                                 do
15749                                         if test "\$section" = 1 ; then
15750                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15751                                         fi
15752                                         cf_alias="\${cf_alias}\${extra_suffix}"
15753
15754                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15755                                         rm -f "\$cf_alias\${suffix}"
15756                                 done
15757                         )
15758                 )
15759         else
15760 #               echo ".hy 0"
15761                 cat \$TMP
15762         fi
15763         ;;
15764 esac
15765 done
15766
15767 if test "$cf_manpage_inboth" = yes ; then
15768 if test "\$form" != format ; then
15769         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15770 fi
15771 fi
15772
15773 exit 0
15774 CF_EOF
15775 chmod 755 "$cf_edit_man"
15776
15777 ###############################################################################
15778
15779 ### Note that some functions (such as const) are normally disabled anyway.
15780 echo "$as_me:15780: checking if you want to build with function extensions" >&5
15781 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15782
15783 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15784 if test "${enable_ext_funcs+set}" = set; then
15785   enableval="$enable_ext_funcs"
15786   with_ext_funcs=$enableval
15787 else
15788   with_ext_funcs=yes
15789 fi;
15790 echo "$as_me:15790: result: $with_ext_funcs" >&5
15791 echo "${ECHO_T}$with_ext_funcs" >&6
15792 if test "x$with_ext_funcs" = xyes ; then
15793         NCURSES_EXT_FUNCS=1
15794
15795 cat >>confdefs.h <<\EOF
15796 #define NCURSES_EXT_FUNCS 1
15797 EOF
15798
15799 cat >>confdefs.h <<\EOF
15800 #define HAVE_ASSUME_DEFAULT_COLORS 1
15801 EOF
15802
15803 cat >>confdefs.h <<\EOF
15804 #define HAVE_CURSES_VERSION 1
15805 EOF
15806
15807 cat >>confdefs.h <<\EOF
15808 #define HAVE_HAS_KEY 1
15809 EOF
15810
15811 cat >>confdefs.h <<\EOF
15812 #define HAVE_RESIZETERM 1
15813 EOF
15814
15815 cat >>confdefs.h <<\EOF
15816 #define HAVE_RESIZE_TERM 1
15817 EOF
15818
15819 cat >>confdefs.h <<\EOF
15820 #define HAVE_TERM_ENTRY_H 1
15821 EOF
15822
15823 cat >>confdefs.h <<\EOF
15824 #define HAVE_USE_DEFAULT_COLORS 1
15825 EOF
15826
15827 cat >>confdefs.h <<\EOF
15828 #define HAVE_USE_SCREEN 1
15829 EOF
15830
15831 cat >>confdefs.h <<\EOF
15832 #define HAVE_USE_WINDOW 1
15833 EOF
15834
15835 cat >>confdefs.h <<\EOF
15836 #define HAVE_WRESIZE 1
15837 EOF
15838
15839         GENERATED_EXT_FUNCS=generated
15840 else
15841         cf_dft_ext_spfuncs=no
15842         cf_dft_ext_colors=no
15843         NCURSES_EXT_FUNCS=0
15844         GENERATED_EXT_FUNCS=
15845 fi
15846
15847 echo "$as_me:15847: checking if you want to build with SCREEN extensions" >&5
15848 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15849
15850 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15851 if test "${enable_sp_funcs+set}" = set; then
15852   enableval="$enable_sp_funcs"
15853   with_sp_funcs=$enableval
15854 else
15855   with_sp_funcs=$cf_dft_ext_spfuncs
15856 fi;
15857 echo "$as_me:15857: result: $with_sp_funcs" >&5
15858 echo "${ECHO_T}$with_sp_funcs" >&6
15859 if test "x$with_sp_funcs" = xyes ; then
15860         NCURSES_SP_FUNCS=1
15861
15862 cat >>confdefs.h <<\EOF
15863 #define NCURSES_SP_FUNCS 1
15864 EOF
15865
15866 cat >>confdefs.h <<\EOF
15867 #define HAVE_TPUTS_SP 1
15868 EOF
15869
15870         GENERATED_SP_FUNCS=generated
15871 else
15872         NCURSES_SP_FUNCS=0
15873         GENERATED_SP_FUNCS=
15874 fi
15875
15876 echo "$as_me:15876: checking if you want to build with terminal-driver" >&5
15877 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15878
15879 # Check whether --enable-term-driver or --disable-term-driver was given.
15880 if test "${enable_term_driver+set}" = set; then
15881   enableval="$enable_term_driver"
15882   with_term_driver=$enableval
15883 else
15884   with_term_driver=no
15885 fi;
15886 echo "$as_me:15886: result: $with_term_driver" >&5
15887 echo "${ECHO_T}$with_term_driver" >&6
15888 if test "x$with_term_driver" = xyes ; then
15889
15890 cat >>confdefs.h <<\EOF
15891 #define USE_TERM_DRIVER 1
15892 EOF
15893
15894         if test "x$with_termlib" != xno ; then
15895                 { { echo "$as_me:15895: error: The term-driver option conflicts with the termlib option" >&5
15896 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15897    { (exit 1); exit 1; }; }
15898         fi
15899         if test "x$with_sp_funcs" != xyes ; then
15900                 { { echo "$as_me:15900: error: The term-driver option relies upon sp-funcs" >&5
15901 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15902    { (exit 1); exit 1; }; }
15903         fi
15904 fi
15905
15906 ###   use option --enable-const to turn on use of const beyond that in XSI.
15907 echo "$as_me:15907: checking for extended use of const keyword" >&5
15908 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15909
15910 # Check whether --enable-const or --disable-const was given.
15911 if test "${enable_const+set}" = set; then
15912   enableval="$enable_const"
15913   with_ext_const=$enableval
15914 else
15915   with_ext_const=$cf_dft_ext_const
15916 fi;
15917 echo "$as_me:15917: result: $with_ext_const" >&5
15918 echo "${ECHO_T}$with_ext_const" >&6
15919 NCURSES_CONST='/*nothing*/'
15920 if test "x$with_ext_const" = xyes ; then
15921         NCURSES_CONST=const
15922 fi
15923
15924 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15925 echo "$as_me:15925: checking if you want to use extended colors" >&5
15926 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15927
15928 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15929 if test "${enable_ext_colors+set}" = set; then
15930   enableval="$enable_ext_colors"
15931   with_ext_colors=$enableval
15932 else
15933   with_ext_colors=$cf_dft_ext_colors
15934 fi;
15935 echo "$as_me:15935: result: $with_ext_colors" >&5
15936 echo "${ECHO_T}$with_ext_colors" >&6
15937 NCURSES_EXT_COLORS=0
15938 if test "x$with_ext_colors" = xyes ; then
15939         if test "x$with_widec" != xyes ; then
15940                 { echo "$as_me:15940: WARNING: This option applies only to wide-character library" >&5
15941 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15942         else
15943                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15944
15945 if test "${with_abi_version+set}" != set; then
15946         case "$cf_cv_rel_version" in
15947         (5.*)
15948                 cf_cv_rel_version=6.0
15949                 cf_cv_abi_version=6
15950                 cf_cv_abi_default=6
15951                 { echo "$as_me:15951: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15952 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15953                 ;;
15954         esac
15955 fi
15956
15957                 NCURSES_EXT_COLORS=1
15958
15959 cat >>confdefs.h <<\EOF
15960 #define NCURSES_EXT_COLORS 1
15961 EOF
15962
15963 cat >>confdefs.h <<\EOF
15964 #define HAVE_ALLOC_PAIR 1
15965 EOF
15966
15967 cat >>confdefs.h <<\EOF
15968 #define HAVE_INIT_EXTENDED_COLOR 1
15969 EOF
15970
15971 cat >>confdefs.h <<\EOF
15972 #define HAVE_RESET_COLOR_PAIRS 1
15973 EOF
15974
15975         fi
15976 fi
15977
15978 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15979 echo "$as_me:15979: checking if you want to use extended mouse encoding" >&5
15980 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15981
15982 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15983 if test "${enable_ext_mouse+set}" = set; then
15984   enableval="$enable_ext_mouse"
15985   with_ext_mouse=$enableval
15986 else
15987   with_ext_mouse=$cf_dft_ext_mouse
15988 fi;
15989 echo "$as_me:15989: result: $with_ext_mouse" >&5
15990 echo "${ECHO_T}$with_ext_mouse" >&6
15991 if test "x$with_ext_mouse" = xyes ; then
15992
15993 if test "${with_abi_version+set}" != set; then
15994         case "$cf_cv_rel_version" in
15995         (5.*)
15996                 cf_cv_rel_version=6.0
15997                 cf_cv_abi_version=6
15998                 cf_cv_abi_default=6
15999                 { echo "$as_me:15999: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16000 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16001                 ;;
16002         esac
16003 fi
16004
16005 fi
16006
16007 if test $cf_cv_abi_default -le 5 ; then
16008         NCURSES_MOUSE_VERSION=1
16009 elif test $cf_cv_abi_default -le 6 ; then
16010         NCURSES_MOUSE_VERSION=2
16011 else
16012         NCURSES_MOUSE_VERSION=3
16013 fi
16014
16015 ###   use option --enable-ext-putwin to turn on extended screendumps
16016 echo "$as_me:16016: checking if you want to use extended putwin/screendump" >&5
16017 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
16018
16019 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
16020 if test "${enable_ext_putwin+set}" = set; then
16021   enableval="$enable_ext_putwin"
16022   with_ext_putwin=$enableval
16023 else
16024   with_ext_putwin=$cf_dft_ext_putwin
16025 fi;
16026 echo "$as_me:16026: result: $with_ext_putwin" >&5
16027 echo "${ECHO_T}$with_ext_putwin" >&6
16028 if test "x$with_ext_putwin" = xyes ; then
16029
16030 cat >>confdefs.h <<\EOF
16031 #define NCURSES_EXT_PUTWIN 1
16032 EOF
16033
16034 fi
16035
16036 echo "$as_me:16036: checking if you want \$NCURSES_NO_PADDING code" >&5
16037 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
16038
16039 # Check whether --enable-no-padding or --disable-no-padding was given.
16040 if test "${enable_no_padding+set}" = set; then
16041   enableval="$enable_no_padding"
16042   with_no_padding=$enableval
16043 else
16044   with_no_padding=$with_ext_funcs
16045 fi;
16046 echo "$as_me:16046: result: $with_no_padding" >&5
16047 echo "${ECHO_T}$with_no_padding" >&6
16048 test "x$with_no_padding" = xyes &&
16049 cat >>confdefs.h <<\EOF
16050 #define NCURSES_NO_PADDING 1
16051 EOF
16052
16053 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
16054 echo "$as_me:16054: checking if you want SIGWINCH handler" >&5
16055 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
16056
16057 # Check whether --enable-sigwinch or --disable-sigwinch was given.
16058 if test "${enable_sigwinch+set}" = set; then
16059   enableval="$enable_sigwinch"
16060   with_sigwinch=$enableval
16061 else
16062   with_sigwinch=$with_ext_funcs
16063 fi;
16064 echo "$as_me:16064: result: $with_sigwinch" >&5
16065 echo "${ECHO_T}$with_sigwinch" >&6
16066 if test "x$with_sigwinch" = xyes
16067 then
16068
16069 cat >>confdefs.h <<\EOF
16070 #define USE_SIGWINCH 1
16071 EOF
16072
16073         cf_cv_enable_sigwinch=1
16074 else
16075         cf_cv_enable_sigwinch=0
16076 fi
16077
16078 ###   use option --enable-tcap-names to allow user to define new capabilities
16079 echo "$as_me:16079: checking if you want user-definable terminal capabilities like termcap" >&5
16080 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
16081
16082 # Check whether --enable-tcap-names or --disable-tcap-names was given.
16083 if test "${enable_tcap_names+set}" = set; then
16084   enableval="$enable_tcap_names"
16085   with_tcap_names=$enableval
16086 else
16087   with_tcap_names=$with_ext_funcs
16088 fi;
16089 echo "$as_me:16089: result: $with_tcap_names" >&5
16090 echo "${ECHO_T}$with_tcap_names" >&6
16091 NCURSES_XNAMES=0
16092 if test "x$with_tcap_names" = xyes; then
16093         NCURSES_XNAMES=1
16094
16095 cat >>confdefs.h <<\EOF
16096 #define NCURSES_XNAMES 1
16097 EOF
16098
16099 fi
16100
16101 ##############################################################################
16102
16103 echo "$as_me:16103: checking if you want to link with the pthread library" >&5
16104 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
16105
16106 # Check whether --with-pthread or --without-pthread was given.
16107 if test "${with_pthread+set}" = set; then
16108   withval="$with_pthread"
16109   with_pthread=$withval
16110 else
16111   with_pthread=no
16112 fi;
16113 echo "$as_me:16113: result: $with_pthread" >&5
16114 echo "${ECHO_T}$with_pthread" >&6
16115
16116 if test "$with_pthread" != no ; then
16117         echo "$as_me:16117: checking for pthread.h" >&5
16118 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16119 if test "${ac_cv_header_pthread_h+set}" = set; then
16120   echo $ECHO_N "(cached) $ECHO_C" >&6
16121 else
16122   cat >"conftest.$ac_ext" <<_ACEOF
16123 #line 16123 "configure"
16124 #include "confdefs.h"
16125 #include <pthread.h>
16126 _ACEOF
16127 if { (eval echo "$as_me:16127: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16128   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16129   ac_status=$?
16130   $EGREP -v '^ *\+' conftest.er1 >conftest.err
16131   rm -f conftest.er1
16132   cat conftest.err >&5
16133   echo "$as_me:16133: \$? = $ac_status" >&5
16134   (exit "$ac_status"); } >/dev/null; then
16135   if test -s conftest.err; then
16136     ac_cpp_err=$ac_c_preproc_warn_flag
16137   else
16138     ac_cpp_err=
16139   fi
16140 else
16141   ac_cpp_err=yes
16142 fi
16143 if test -z "$ac_cpp_err"; then
16144   ac_cv_header_pthread_h=yes
16145 else
16146   echo "$as_me: failed program was:" >&5
16147   cat "conftest.$ac_ext" >&5
16148   ac_cv_header_pthread_h=no
16149 fi
16150 rm -f conftest.err "conftest.$ac_ext"
16151 fi
16152 echo "$as_me:16152: result: $ac_cv_header_pthread_h" >&5
16153 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16154 if test "$ac_cv_header_pthread_h" = yes; then
16155
16156 cat >>confdefs.h <<\EOF
16157 #define HAVE_PTHREADS_H 1
16158 EOF
16159
16160         for cf_lib_pthread in pthread c_r
16161         do
16162             echo "$as_me:16162: checking if we can link with the $cf_lib_pthread library" >&5
16163 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
16164             cf_save_LIBS="$LIBS"
16165
16166 cf_add_libs="$LIBS"
16167 # reverse order
16168 cf_add_0lib=
16169 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16170 # filter duplicates
16171 for cf_add_1lib in $cf_add_0lib; do
16172         for cf_add_2lib in $cf_add_libs; do
16173                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16174                         cf_add_1lib=
16175                         break
16176                 fi
16177         done
16178         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16179 done
16180 LIBS="$cf_add_libs"
16181
16182             cat >"conftest.$ac_ext" <<_ACEOF
16183 #line 16183 "configure"
16184 #include "confdefs.h"
16185
16186 #include <pthread.h>
16187
16188 int
16189 main (void)
16190 {
16191
16192                 int rc = pthread_create(0,0,0,0);
16193                 int r2 = pthread_mutexattr_settype(0, 0);
16194
16195   ;
16196   return 0;
16197 }
16198 _ACEOF
16199 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16200 if { (eval echo "$as_me:16200: \"$ac_link\"") >&5
16201   (eval $ac_link) 2>&5
16202   ac_status=$?
16203   echo "$as_me:16203: \$? = $ac_status" >&5
16204   (exit "$ac_status"); } &&
16205          { ac_try='test -s "conftest$ac_exeext"'
16206   { (eval echo "$as_me:16206: \"$ac_try\"") >&5
16207   (eval $ac_try) 2>&5
16208   ac_status=$?
16209   echo "$as_me:16209: \$? = $ac_status" >&5
16210   (exit "$ac_status"); }; }; then
16211   with_pthread=yes
16212 else
16213   echo "$as_me: failed program was:" >&5
16214 cat "conftest.$ac_ext" >&5
16215 with_pthread=no
16216 fi
16217 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16218             LIBS="$cf_save_LIBS"
16219             echo "$as_me:16219: result: $with_pthread" >&5
16220 echo "${ECHO_T}$with_pthread" >&6
16221             test "$with_pthread" = yes && break
16222         done
16223
16224         if test "$with_pthread" = yes ; then
16225
16226 cf_add_libs="$LIBS"
16227 # reverse order
16228 cf_add_0lib=
16229 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16230 # filter duplicates
16231 for cf_add_1lib in $cf_add_0lib; do
16232         for cf_add_2lib in $cf_add_libs; do
16233                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16234                         cf_add_1lib=
16235                         break
16236                 fi
16237         done
16238         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16239 done
16240 LIBS="$cf_add_libs"
16241
16242 cat >>confdefs.h <<\EOF
16243 #define HAVE_LIBPTHREADS 1
16244 EOF
16245
16246         else
16247             { { echo "$as_me:16247: error: Cannot link with pthread library" >&5
16248 echo "$as_me: error: Cannot link with pthread library" >&2;}
16249    { (exit 1); exit 1; }; }
16250         fi
16251
16252 fi
16253
16254 fi
16255
16256 if test "x$with_pthread" != xno; then
16257         echo "$as_me:16257: checking for pthread_kill" >&5
16258 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
16259 if test "${ac_cv_func_pthread_kill+set}" = set; then
16260   echo $ECHO_N "(cached) $ECHO_C" >&6
16261 else
16262   cat >"conftest.$ac_ext" <<_ACEOF
16263 #line 16263 "configure"
16264 #include "confdefs.h"
16265 #define pthread_kill autoconf_temporary
16266 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16267 #undef pthread_kill
16268
16269 #ifdef __cplusplus
16270 extern "C"
16271 #endif
16272
16273 /* We use char because int might match the return type of a gcc2
16274    builtin and then its argument prototype would still apply.  */
16275 char pthread_kill (void);
16276
16277 int
16278 main (void)
16279 {
16280
16281 /* The GNU C library defines stubs for functions which it implements
16282     to always fail with ENOSYS.  Some functions are actually named
16283     something starting with __ and the normal name is an alias.  */
16284 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
16285 #error found stub for pthread_kill
16286 #endif
16287
16288         return pthread_kill ();
16289   ;
16290   return 0;
16291 }
16292 _ACEOF
16293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16294 if { (eval echo "$as_me:16294: \"$ac_link\"") >&5
16295   (eval $ac_link) 2>&5
16296   ac_status=$?
16297   echo "$as_me:16297: \$? = $ac_status" >&5
16298   (exit "$ac_status"); } &&
16299          { ac_try='test -s "conftest$ac_exeext"'
16300   { (eval echo "$as_me:16300: \"$ac_try\"") >&5
16301   (eval $ac_try) 2>&5
16302   ac_status=$?
16303   echo "$as_me:16303: \$? = $ac_status" >&5
16304   (exit "$ac_status"); }; }; then
16305   ac_cv_func_pthread_kill=yes
16306 else
16307   echo "$as_me: failed program was:" >&5
16308 cat "conftest.$ac_ext" >&5
16309 ac_cv_func_pthread_kill=no
16310 fi
16311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16312 fi
16313 echo "$as_me:16313: result: $ac_cv_func_pthread_kill" >&5
16314 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
16315 if test "$ac_cv_func_pthread_kill" = yes; then
16316
16317                 echo "$as_me:16317: checking if you want to allow EINTR in wgetch with pthreads" >&5
16318 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
16319
16320 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
16321 if test "${enable_pthreads_eintr+set}" = set; then
16322   enableval="$enable_pthreads_eintr"
16323   use_pthreads_eintr=$enableval
16324 else
16325   use_pthreads_eintr=no
16326 fi;
16327                 echo "$as_me:16327: result: $use_pthreads_eintr" >&5
16328 echo "${ECHO_T}$use_pthreads_eintr" >&6
16329                 if test "x$use_pthreads_eintr" = xyes ; then
16330
16331 cat >>confdefs.h <<\EOF
16332 #define USE_PTHREADS_EINTR 1
16333 EOF
16334
16335                 fi
16336 fi
16337
16338         echo "$as_me:16338: checking if you want to use weak-symbols for pthreads" >&5
16339 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16340
16341 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16342 if test "${enable_weak_symbols+set}" = set; then
16343   enableval="$enable_weak_symbols"
16344   use_weak_symbols=$enableval
16345 else
16346   use_weak_symbols=no
16347 fi;
16348         echo "$as_me:16348: result: $use_weak_symbols" >&5
16349 echo "${ECHO_T}$use_weak_symbols" >&6
16350         if test "x$use_weak_symbols" = xyes ; then
16351
16352 echo "$as_me:16352: checking if $CC supports weak symbols" >&5
16353 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16354 if test "${cf_cv_weak_symbols+set}" = set; then
16355   echo $ECHO_N "(cached) $ECHO_C" >&6
16356 else
16357
16358 cat >"conftest.$ac_ext" <<_ACEOF
16359 #line 16359 "configure"
16360 #include "confdefs.h"
16361
16362 #include <stdio.h>
16363 int
16364 main (void)
16365 {
16366
16367 #if defined(__GNUC__)
16368 #  if defined __USE_ISOC99
16369 #    define _cat_pragma(exp)    _Pragma(#exp)
16370 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16371 #  else
16372 #    define _weak_pragma(exp)
16373 #  endif
16374 #  define _declare(name)        __extension__ extern __typeof__(name) name
16375 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16376 #endif
16377
16378 weak_symbol(fopen);
16379
16380   ;
16381   return 0;
16382 }
16383 _ACEOF
16384 rm -f "conftest.$ac_objext"
16385 if { (eval echo "$as_me:16385: \"$ac_compile\"") >&5
16386   (eval $ac_compile) 2>&5
16387   ac_status=$?
16388   echo "$as_me:16388: \$? = $ac_status" >&5
16389   (exit "$ac_status"); } &&
16390          { ac_try='test -s "conftest.$ac_objext"'
16391   { (eval echo "$as_me:16391: \"$ac_try\"") >&5
16392   (eval $ac_try) 2>&5
16393   ac_status=$?
16394   echo "$as_me:16394: \$? = $ac_status" >&5
16395   (exit "$ac_status"); }; }; then
16396   cf_cv_weak_symbols=yes
16397 else
16398   echo "$as_me: failed program was:" >&5
16399 cat "conftest.$ac_ext" >&5
16400 cf_cv_weak_symbols=no
16401 fi
16402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16403
16404 fi
16405 echo "$as_me:16405: result: $cf_cv_weak_symbols" >&5
16406 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16407
16408         else
16409                 cf_cv_weak_symbols=no
16410         fi
16411
16412         if test "x$cf_cv_weak_symbols" = xyes ; then
16413
16414 cat >>confdefs.h <<\EOF
16415 #define USE_WEAK_SYMBOLS 1
16416 EOF
16417
16418         fi
16419 fi
16420
16421 PTHREAD=
16422 if test "x$with_pthread" = "xyes" ; then
16423
16424 cat >>confdefs.h <<\EOF
16425 #define USE_PTHREADS 1
16426 EOF
16427
16428         enable_reentrant=yes
16429         if test "x$cf_cv_weak_symbols" = xyes ; then
16430                 PTHREAD=-lpthread
16431
16432 cf_add_libs="$PRIVATE_LIBS"
16433 # reverse order
16434 cf_add_0lib=
16435 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16436 # filter duplicates
16437 for cf_add_1lib in $cf_add_0lib; do
16438         for cf_add_2lib in $cf_add_libs; do
16439                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16440                         cf_add_1lib=
16441                         break
16442                 fi
16443         done
16444         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16445 done
16446 PRIVATE_LIBS="$cf_add_libs"
16447
16448         fi
16449 fi
16450
16451 # Reentrant code has to be opaque; there's little advantage to making ncurses
16452 # opaque outside of that, so there is no --enable-opaque option.  We can use
16453 # this option without --with-pthreads, but this will be always set for
16454 # pthreads.
16455 echo "$as_me:16455: checking if you want reentrant code" >&5
16456 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16457
16458 # Check whether --enable-reentrant or --disable-reentrant was given.
16459 if test "${enable_reentrant+set}" = set; then
16460   enableval="$enable_reentrant"
16461   with_reentrant=$enableval
16462 else
16463   with_reentrant=no
16464 fi;
16465 echo "$as_me:16465: result: $with_reentrant" >&5
16466 echo "${ECHO_T}$with_reentrant" >&6
16467 if test "x$with_reentrant" = xyes ; then
16468         cf_cv_enable_reentrant=1
16469         cf_cv_enable_opaque="NCURSES_INTERNALS"
16470         NCURSES_SIZE_T=int
16471         if test "x$cf_cv_weak_symbols" = xyes ; then
16472
16473 # remove pthread library from $LIBS
16474 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16475
16476 cf_add_libs="$TEST_LIBS"
16477 # reverse order
16478 cf_add_0lib=
16479 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16480 # filter duplicates
16481 for cf_add_1lib in $cf_add_0lib; do
16482         for cf_add_2lib in $cf_add_libs; do
16483                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16484                         cf_add_1lib=
16485                         break
16486                 fi
16487         done
16488         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16489 done
16490 TEST_LIBS="$cf_add_libs"
16491
16492 cf_add_libs="$TEST_LIBS2"
16493 # reverse order
16494 cf_add_0lib=
16495 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16496 # filter duplicates
16497 for cf_add_1lib in $cf_add_0lib; do
16498         for cf_add_2lib in $cf_add_libs; do
16499                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16500                         cf_add_1lib=
16501                         break
16502                 fi
16503         done
16504         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16505 done
16506 TEST_LIBS2="$cf_add_libs"
16507
16508 cf_add_libs="$PRIVATE_LIBS"
16509 # reverse order
16510 cf_add_0lib=
16511 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16512 # filter duplicates
16513 for cf_add_1lib in $cf_add_0lib; do
16514         for cf_add_2lib in $cf_add_libs; do
16515                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16516                         cf_add_1lib=
16517                         break
16518                 fi
16519         done
16520         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16521 done
16522 PRIVATE_LIBS="$cf_add_libs"
16523
16524         else
16525                 # when not using weak symbols but with_reentrant,
16526                 # add 't' to the library suffix on all platforms
16527                 # except cygwin, where we only do that if ALSO
16528                 # compiling with full thread support.
16529                 case "$host" in
16530                 (*cygwin* | *msys*)
16531                         if test "$with_pthread" = "yes" ; then
16532                                 if test "x$disable_lib_suffixes" = "xno" ; then
16533                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16534                                 fi
16535                         fi ;;
16536                 (*)
16537                         if test "x$disable_lib_suffixes" = "xno" ; then
16538                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16539                         fi
16540                         ;;
16541                 esac
16542         fi
16543
16544 cat >>confdefs.h <<\EOF
16545 #define USE_REENTRANT 1
16546 EOF
16547
16548 if test "${with_abi_version+set}" != set; then
16549         case "$cf_cv_rel_version" in
16550         (5.*)
16551                 cf_cv_rel_version=6.0
16552                 cf_cv_abi_version=6
16553                 cf_cv_abi_default=6
16554                 { echo "$as_me:16554: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16555 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16556                 ;;
16557         esac
16558 fi
16559
16560 else
16561         cf_cv_enable_reentrant=0
16562         cf_cv_enable_opaque="NCURSES_OPAQUE"
16563         NCURSES_SIZE_T=$cf_dft_ordinate_type
16564 fi
16565
16566 echo "$as_me:16566: checking whether curses library structures should be opaque" >&5
16567 echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16568
16569 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16570 if test "${enable_opaque_curses+set}" = set; then
16571   enableval="$enable_opaque_curses"
16572   test "$enableval" != no && enableval=yes
16573         if test "$enableval" != "yes" ; then
16574     enable_opaque_curses=no
16575         else
16576
16577          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16578          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16579
16580         fi
16581 else
16582   enableval=yes
16583
16584          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16585          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16586
16587 fi;
16588 echo "$as_me:16588: result: $enable_opaque_curses" >&5
16589 echo "${ECHO_T}$enable_opaque_curses" >&6
16590
16591 test "$cf_cv_enable_reentrant" = 1 && \
16592 test "$enable_opaque_curses" = no && \
16593 { { echo "$as_me:16593: error: reentrant configuration requires opaque library" >&5
16594 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16595    { (exit 1); exit 1; }; }
16596
16597 echo "$as_me:16597: checking whether form library structures should be opaque" >&5
16598 echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16599
16600 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16601 if test "${enable_opaque_form+set}" = set; then
16602   enableval="$enable_opaque_form"
16603   test "$enableval" != no && enableval=yes
16604         if test "$enableval" != "yes" ; then
16605     enable_opaque_form=no
16606         else
16607                 enable_opaque_form=$cf_dft_opaque_curses
16608         fi
16609 else
16610   enableval=yes
16611         enable_opaque_form=$cf_dft_opaque_curses
16612
16613 fi;
16614 echo "$as_me:16614: result: $enable_opaque_form" >&5
16615 echo "${ECHO_T}$enable_opaque_form" >&6
16616
16617 echo "$as_me:16617: checking whether menu library structures should be opaque" >&5
16618 echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16619
16620 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16621 if test "${enable_opaque_menu+set}" = set; then
16622   enableval="$enable_opaque_menu"
16623   test "$enableval" != no && enableval=yes
16624         if test "$enableval" != "yes" ; then
16625     enable_opaque_menu=no
16626         else
16627                 enable_opaque_menu=$cf_dft_opaque_curses
16628         fi
16629 else
16630   enableval=yes
16631         enable_opaque_menu=$cf_dft_opaque_curses
16632
16633 fi;
16634 echo "$as_me:16634: result: $enable_opaque_menu" >&5
16635 echo "${ECHO_T}$enable_opaque_menu" >&6
16636
16637 echo "$as_me:16637: checking whether panel library structures should be opaque" >&5
16638 echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16639
16640 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16641 if test "${enable_opaque_panel+set}" = set; then
16642   enableval="$enable_opaque_panel"
16643   test "$enableval" != no && enableval=yes
16644         if test "$enableval" != "yes" ; then
16645     enable_opaque_panel=no
16646         else
16647                 enable_opaque_panel=$cf_dft_opaque_curses
16648         fi
16649 else
16650   enableval=yes
16651         enable_opaque_panel=$cf_dft_opaque_curses
16652
16653 fi;
16654 echo "$as_me:16654: result: $enable_opaque_panel" >&5
16655 echo "${ECHO_T}$enable_opaque_panel" >&6
16656
16657 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16658 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16659 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16660 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16661
16662 ### Allow using a different wrap-prefix
16663 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16664         echo "$as_me:16664: checking for prefix used to wrap public variables" >&5
16665 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16666
16667 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16668 if test "${with_wrap_prefix+set}" = set; then
16669   withval="$with_wrap_prefix"
16670   NCURSES_WRAP_PREFIX=$withval
16671 else
16672   NCURSES_WRAP_PREFIX=_nc_
16673 fi;
16674         echo "$as_me:16674: result: $NCURSES_WRAP_PREFIX" >&5
16675 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16676 else
16677         NCURSES_WRAP_PREFIX=_nc_
16678 fi
16679
16680 cat >>confdefs.h <<EOF
16681 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16682 EOF
16683
16684 ###############################################################################
16685 # These options are relatively safe to experiment with.
16686
16687 echo "$as_me:16687: checking if you want all development code" >&5
16688 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16689
16690 # Check whether --with-develop or --without-develop was given.
16691 if test "${with_develop+set}" = set; then
16692   withval="$with_develop"
16693   with_develop=$withval
16694 else
16695   with_develop=no
16696 fi;
16697 echo "$as_me:16697: result: $with_develop" >&5
16698 echo "${ECHO_T}$with_develop" >&6
16699
16700 ###   use option --enable-check-size to detect screensize with CPR
16701 echo "$as_me:16701: checking if you want to check screensize of serial terminals" >&5
16702 echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6
16703
16704 # Check whether --enable-check-size or --disable-check-size was given.
16705 if test "${enable_check_size+set}" = set; then
16706   enableval="$enable_check_size"
16707
16708 else
16709   enable_check_size=$with_develop
16710 fi;
16711 echo "$as_me:16711: result: $enable_check_size" >&5
16712 echo "${ECHO_T}$enable_check_size" >&6
16713 test "x$enable_check_size" = xyes &&
16714 cat >>confdefs.h <<\EOF
16715 #define USE_CHECK_SIZE 1
16716 EOF
16717
16718 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16719 echo "$as_me:16719: checking if you want hard-tabs code" >&5
16720 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16721
16722 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16723 if test "${enable_hard_tabs+set}" = set; then
16724   enableval="$enable_hard_tabs"
16725
16726 else
16727   enable_hard_tabs=$with_develop
16728 fi;
16729 echo "$as_me:16729: result: $enable_hard_tabs" >&5
16730 echo "${ECHO_T}$enable_hard_tabs" >&6
16731 test "x$enable_hard_tabs" = xyes &&
16732 cat >>confdefs.h <<\EOF
16733 #define USE_HARD_TABS 1
16734 EOF
16735
16736 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16737 echo "$as_me:16737: checking if you want limited support for xmc" >&5
16738 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16739
16740 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16741 if test "${enable_xmc_glitch+set}" = set; then
16742   enableval="$enable_xmc_glitch"
16743
16744 else
16745   enable_xmc_glitch=$with_develop
16746 fi;
16747 echo "$as_me:16747: result: $enable_xmc_glitch" >&5
16748 echo "${ECHO_T}$enable_xmc_glitch" >&6
16749 test "x$enable_xmc_glitch" = xyes &&
16750 cat >>confdefs.h <<\EOF
16751 #define USE_XMC_SUPPORT 1
16752 EOF
16753
16754 ###############################################################################
16755 # These are just experimental, probably should not be in a package:
16756
16757 echo "$as_me:16757: checking if you do not want to assume colors are white-on-black" >&5
16758 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16759
16760 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16761 if test "${enable_assumed_color+set}" = set; then
16762   enableval="$enable_assumed_color"
16763   with_assumed_color=$enableval
16764 else
16765   with_assumed_color=yes
16766 fi;
16767 echo "$as_me:16767: result: $with_assumed_color" >&5
16768 echo "${ECHO_T}$with_assumed_color" >&6
16769 test "x$with_assumed_color" = xyes &&
16770 cat >>confdefs.h <<\EOF
16771 #define USE_ASSUMED_COLOR 1
16772 EOF
16773
16774 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16775 echo "$as_me:16775: checking if you want hashmap scrolling-optimization code" >&5
16776 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16777
16778 # Check whether --enable-hashmap or --disable-hashmap was given.
16779 if test "${enable_hashmap+set}" = set; then
16780   enableval="$enable_hashmap"
16781   with_hashmap=$enableval
16782 else
16783   with_hashmap=yes
16784 fi;
16785 echo "$as_me:16785: result: $with_hashmap" >&5
16786 echo "${ECHO_T}$with_hashmap" >&6
16787 test "x$with_hashmap" = xyes &&
16788 cat >>confdefs.h <<\EOF
16789 #define USE_HASHMAP 1
16790 EOF
16791
16792 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16793 echo "$as_me:16793: checking if you want colorfgbg code" >&5
16794 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16795
16796 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16797 if test "${enable_colorfgbg+set}" = set; then
16798   enableval="$enable_colorfgbg"
16799   with_colorfgbg=$enableval
16800 else
16801   with_colorfgbg=no
16802 fi;
16803 echo "$as_me:16803: result: $with_colorfgbg" >&5
16804 echo "${ECHO_T}$with_colorfgbg" >&6
16805 test "x$with_colorfgbg" = xyes &&
16806 cat >>confdefs.h <<\EOF
16807 #define USE_COLORFGBG 1
16808 EOF
16809
16810 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16811 echo "$as_me:16811: checking if you want to use gcc -fvisibility option" >&5
16812 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16813
16814 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16815 if test "${enable_fvisibility+set}" = set; then
16816   enableval="$enable_fvisibility"
16817   cf_with_fvisibility=$enableval
16818 else
16819   cf_with_fvisibility=no
16820 fi;
16821 echo "$as_me:16821: result: $cf_with_fvisibility" >&5
16822 echo "${ECHO_T}$cf_with_fvisibility" >&6
16823
16824 NCURSES_IMPEXP=
16825 NCURSES_CXX_IMPEXP=
16826 if test "x$cf_with_fvisibility" = xyes; then
16827
16828 echo "$as_me:16828: checking if $CC -fvisibility=hidden option works" >&5
16829 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16830 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16831   echo $ECHO_N "(cached) $ECHO_C" >&6
16832 else
16833
16834     cf_save_cflags="$CFLAGS"
16835     CFLAGS="$CFLAGS -fvisibility=hidden"
16836     cat >"conftest.$ac_ext" <<_ACEOF
16837 #line 16837 "configure"
16838 #include "confdefs.h"
16839
16840 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16841
16842 int
16843 main (void)
16844 {
16845
16846         if (somefunc()) return 1;
16847
16848   ;
16849   return 0;
16850 }
16851 _ACEOF
16852 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16853 if { (eval echo "$as_me:16853: \"$ac_link\"") >&5
16854   (eval $ac_link) 2>&5
16855   ac_status=$?
16856   echo "$as_me:16856: \$? = $ac_status" >&5
16857   (exit "$ac_status"); } &&
16858          { ac_try='test -s "conftest$ac_exeext"'
16859   { (eval echo "$as_me:16859: \"$ac_try\"") >&5
16860   (eval $ac_try) 2>&5
16861   ac_status=$?
16862   echo "$as_me:16862: \$? = $ac_status" >&5
16863   (exit "$ac_status"); }; }; then
16864   cf_cv_fvisibility_hidden=yes
16865 else
16866   echo "$as_me: failed program was:" >&5
16867 cat "conftest.$ac_ext" >&5
16868 cf_cv_fvisibility_hidden=no
16869 fi
16870 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16871     CFLAGS=$cf_save_cflags
16872
16873 fi
16874 echo "$as_me:16874: result: $cf_cv_fvisibility_hidden" >&5
16875 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16876
16877         if test "x$cf_cv_fvisibility_hidden" = xyes
16878         then
16879
16880 cf_fix_cppflags=no
16881 cf_new_cflags=
16882 cf_new_cppflags=
16883 cf_new_extra_cppflags=
16884
16885 for cf_add_cflags in -fvisibility=hidden
16886 do
16887 case "$cf_fix_cppflags" in
16888 (no)
16889         case "$cf_add_cflags" in
16890         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16891                 case "$cf_add_cflags" in
16892                 (-D*)
16893                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16894
16895                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16896                                 && test -z "${cf_tst_cflags}" \
16897                                 && cf_fix_cppflags=yes
16898
16899                         if test "$cf_fix_cppflags" = yes ; then
16900
16901         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16902         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16903
16904                                 continue
16905                         elif test "${cf_tst_cflags}" = "\"'" ; then
16906
16907         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16908         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16909
16910                                 continue
16911                         fi
16912                         ;;
16913                 esac
16914                 case "$CPPFLAGS" in
16915                 (*$cf_add_cflags)
16916                         ;;
16917                 (*)
16918                         case "$cf_add_cflags" in
16919                         (-D*)
16920                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16921
16922 CPPFLAGS=`echo "$CPPFLAGS" | \
16923         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16924                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16925
16926                                 ;;
16927                         esac
16928
16929         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16930         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16931
16932                         ;;
16933                 esac
16934                 ;;
16935         (*)
16936
16937         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16938         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16939
16940                 ;;
16941         esac
16942         ;;
16943 (yes)
16944
16945         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16946         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16947
16948         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16949
16950         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16951                 && test -z "${cf_tst_cflags}" \
16952                 && cf_fix_cppflags=no
16953         ;;
16954 esac
16955 done
16956
16957 if test -n "$cf_new_cflags" ; then
16958
16959         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16960         CFLAGS="${CFLAGS}$cf_new_cflags"
16961
16962 fi
16963
16964 if test -n "$cf_new_cppflags" ; then
16965
16966         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16967         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16968
16969 fi
16970
16971 if test -n "$cf_new_extra_cppflags" ; then
16972
16973         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16974         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16975
16976 fi
16977
16978                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16979         fi
16980         if test -n "$CXX"
16981         then
16982                 ac_ext=cc
16983 ac_cpp='$CXXCPP $CPPFLAGS'
16984 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16985 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16986 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16987 ac_main_return="return"
16988
16989 echo "$as_me:16989: checking if $CXX -fvisibility=hidden option works" >&5
16990 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16991 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16992   echo $ECHO_N "(cached) $ECHO_C" >&6
16993 else
16994
16995     cf_save_cflags="$CXXFLAGS"
16996     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16997     cat >"conftest.$ac_ext" <<_ACEOF
16998 #line 16998 "configure"
16999 #include "confdefs.h"
17000
17001 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
17002
17003 int
17004 main (void)
17005 {
17006
17007         if (somefunc()) return 1;
17008
17009   ;
17010   return 0;
17011 }
17012 _ACEOF
17013 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17014 if { (eval echo "$as_me:17014: \"$ac_link\"") >&5
17015   (eval $ac_link) 2>&5
17016   ac_status=$?
17017   echo "$as_me:17017: \$? = $ac_status" >&5
17018   (exit "$ac_status"); } &&
17019          { ac_try='test -s "conftest$ac_exeext"'
17020   { (eval echo "$as_me:17020: \"$ac_try\"") >&5
17021   (eval $ac_try) 2>&5
17022   ac_status=$?
17023   echo "$as_me:17023: \$? = $ac_status" >&5
17024   (exit "$ac_status"); }; }; then
17025   cf_cv_fvisibility_hidden2=yes
17026 else
17027   echo "$as_me: failed program was:" >&5
17028 cat "conftest.$ac_ext" >&5
17029 cf_cv_fvisibility_hidden2=no
17030 fi
17031 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17032     CXXFLAGS=$cf_save_cflags
17033
17034 fi
17035 echo "$as_me:17035: result: $cf_cv_fvisibility_hidden2" >&5
17036 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
17037
17038                 if test "x$cf_cv_fvisibility_hidden2" = xyes
17039                 then
17040
17041 cf_save_CXXFLAGS="$CFLAGS"
17042 CFLAGS="$CXXFLAGS"
17043
17044 cf_fix_cppflags=no
17045 cf_new_cflags=
17046 cf_new_cppflags=
17047 cf_new_extra_cppflags=
17048
17049 for cf_add_cflags in -fvisibility=hidden
17050 do
17051 case "$cf_fix_cppflags" in
17052 (no)
17053         case "$cf_add_cflags" in
17054         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17055                 case "$cf_add_cflags" in
17056                 (-D*)
17057                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17058
17059                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17060                                 && test -z "${cf_tst_cflags}" \
17061                                 && cf_fix_cppflags=yes
17062
17063                         if test "$cf_fix_cppflags" = yes ; then
17064
17065         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17066         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17067
17068                                 continue
17069                         elif test "${cf_tst_cflags}" = "\"'" ; then
17070
17071         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17072         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17073
17074                                 continue
17075                         fi
17076                         ;;
17077                 esac
17078                 case "$CPPFLAGS" in
17079                 (*$cf_add_cflags)
17080                         ;;
17081                 (*)
17082                         case "$cf_add_cflags" in
17083                         (-D*)
17084                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17085
17086 CPPFLAGS=`echo "$CPPFLAGS" | \
17087         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17088                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17089
17090                                 ;;
17091                         esac
17092
17093         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17094         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17095
17096                         ;;
17097                 esac
17098                 ;;
17099         (*)
17100
17101         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17102         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17103
17104                 ;;
17105         esac
17106         ;;
17107 (yes)
17108
17109         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17110         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17111
17112         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17113
17114         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17115                 && test -z "${cf_tst_cflags}" \
17116                 && cf_fix_cppflags=no
17117         ;;
17118 esac
17119 done
17120
17121 if test -n "$cf_new_cflags" ; then
17122
17123         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17124         CFLAGS="${CFLAGS}$cf_new_cflags"
17125
17126 fi
17127
17128 if test -n "$cf_new_cppflags" ; then
17129
17130         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17131         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17132
17133 fi
17134
17135 if test -n "$cf_new_extra_cppflags" ; then
17136
17137         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17138         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17139
17140 fi
17141
17142 CXXFLAGS="$CFLAGS"
17143 CFLAGS="$cf_save_CXXFLAGS"
17144
17145                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
17146                 fi
17147                 ac_ext=c
17148 ac_cpp='$CPP $CPPFLAGS'
17149 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17150 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17151 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17152 ac_main_return="return"
17153
17154         fi
17155 fi
17156
17157 ###   use option --enable-interop to turn on use of bindings used for interop
17158 echo "$as_me:17158: checking if you want interop bindings" >&5
17159 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
17160
17161 # Check whether --enable-interop or --disable-interop was given.
17162 if test "${enable_interop+set}" = set; then
17163   enableval="$enable_interop"
17164   with_exp_interop=$enableval
17165 else
17166   with_exp_interop=$cf_dft_interop
17167 fi;
17168 echo "$as_me:17168: result: $with_exp_interop" >&5
17169 echo "${ECHO_T}$with_exp_interop" >&6
17170
17171 NCURSES_INTEROP_FUNCS=0
17172 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
17173
17174 echo "$as_me:17174: checking if you want experimental safe-sprintf code" >&5
17175 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
17176
17177 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
17178 if test "${enable_safe_sprintf+set}" = set; then
17179   enableval="$enable_safe_sprintf"
17180   with_safe_sprintf=$enableval
17181 else
17182   with_safe_sprintf=no
17183 fi;
17184 echo "$as_me:17184: result: $with_safe_sprintf" >&5
17185 echo "${ECHO_T}$with_safe_sprintf" >&6
17186
17187 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
17188 # when hashmap is used scroll hints are useless
17189 if test "$with_hashmap" = no ; then
17190 echo "$as_me:17190: checking if you want to experiment without scrolling-hints code" >&5
17191 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
17192
17193 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
17194 if test "${enable_scroll_hints+set}" = set; then
17195   enableval="$enable_scroll_hints"
17196   with_scroll_hints=$enableval
17197 else
17198   with_scroll_hints=yes
17199 fi;
17200 echo "$as_me:17200: result: $with_scroll_hints" >&5
17201 echo "${ECHO_T}$with_scroll_hints" >&6
17202 test "x$with_scroll_hints" = xyes &&
17203 cat >>confdefs.h <<\EOF
17204 #define USE_SCROLL_HINTS 1
17205 EOF
17206
17207 fi
17208
17209 echo "$as_me:17209: checking if you want wgetch-events code" >&5
17210 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
17211
17212 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
17213 if test "${enable_wgetch_events+set}" = set; then
17214   enableval="$enable_wgetch_events"
17215   with_wgetch_events=$enableval
17216 else
17217   with_wgetch_events=no
17218 fi;
17219 echo "$as_me:17219: result: $with_wgetch_events" >&5
17220 echo "${ECHO_T}$with_wgetch_events" >&6
17221 if test "x$with_wgetch_events" = xyes ; then
17222
17223 cat >>confdefs.h <<\EOF
17224 #define NCURSES_WGETCH_EVENTS 1
17225 EOF
17226
17227         NCURSES_WGETCH_EVENTS=1
17228 else
17229         NCURSES_WGETCH_EVENTS=0
17230 fi
17231
17232 case "$cf_cv_system_name" in
17233 (*mingw32*|*mingw64*|*-msvc*)
17234         echo "$as_me:17234: checking if you want experimental-Windows driver" >&5
17235 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
17236
17237 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
17238 if test "${enable_exp_win32+set}" = set; then
17239   enableval="$enable_exp_win32"
17240   with_exp_win32=$enableval
17241 else
17242   with_exp_win32=no
17243 fi;
17244         echo "$as_me:17244: result: $with_exp_win32" >&5
17245 echo "${ECHO_T}$with_exp_win32" >&6
17246         if test "x$with_exp_win32" = xyes
17247         then
17248
17249 cat >>confdefs.h <<\EOF
17250 #define EXP_WIN32_DRIVER 1
17251 EOF
17252
17253                 EXP_WIN32_DRIVER=1
17254                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
17255         else
17256                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
17257                 EXP_WIN32_DRIVER=0
17258         fi
17259         ;;
17260 (*)
17261         EXP_WIN32_DRIVER=0
17262         INTERNALS_HDR=
17263         ;;
17264 esac
17265
17266 ###############################################################################
17267
17268 ###     use option --disable-echo to suppress full display compiling commands
17269
17270 echo "$as_me:17270: checking if you want to see long compiling messages" >&5
17271 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
17272
17273 # Check whether --enable-echo or --disable-echo was given.
17274 if test "${enable_echo+set}" = set; then
17275   enableval="$enable_echo"
17276   test "$enableval" != no && enableval=yes
17277         if test "$enableval" != "yes" ; then
17278
17279         ECHO_LT='--silent'
17280         ECHO_LD='@echo linking $@;'
17281         RULE_CC='@echo compiling $<'
17282         SHOW_CC='@echo compiling $@'
17283         ECHO_CC='@'
17284
17285         else
17286
17287         ECHO_LT=''
17288         ECHO_LD=''
17289         RULE_CC=''
17290         SHOW_CC=''
17291         ECHO_CC=''
17292
17293         fi
17294 else
17295   enableval=yes
17296
17297         ECHO_LT=''
17298         ECHO_LD=''
17299         RULE_CC=''
17300         SHOW_CC=''
17301         ECHO_CC=''
17302
17303 fi;
17304 echo "$as_me:17304: result: $enableval" >&5
17305 echo "${ECHO_T}$enableval" >&6
17306
17307 if test "x$enable_echo" = xyes; then
17308         ECHO_LINK=
17309 else
17310         ECHO_LINK='@ echo linking $@ ... ;'
17311         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
17312         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
17313 fi
17314
17315 # --disable-stripping is used for debugging
17316
17317 echo "$as_me:17317: checking if you want to install stripped executables" >&5
17318 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
17319
17320 # Check whether --enable-stripping or --disable-stripping was given.
17321 if test "${enable_stripping+set}" = set; then
17322   enableval="$enable_stripping"
17323   test "$enableval" != no && enableval=yes
17324         if test "$enableval" != "yes" ; then
17325     enable_stripping=no
17326         else
17327                 enable_stripping=yes
17328         fi
17329 else
17330   enableval=yes
17331         enable_stripping=yes
17332
17333 fi;
17334 echo "$as_me:17334: result: $enable_stripping" >&5
17335 echo "${ECHO_T}$enable_stripping" >&6
17336
17337 if test "$enable_stripping" = yes
17338 then
17339         INSTALL_OPT_S="-s"
17340 else
17341         INSTALL_OPT_S=
17342 fi
17343
17344 : "${INSTALL:=install}"
17345 echo "$as_me:17345: checking if install accepts -p option" >&5
17346 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
17347 if test "${cf_cv_install_p+set}" = set; then
17348   echo $ECHO_N "(cached) $ECHO_C" >&6
17349 else
17350
17351         rm -rf ./conftest*
17352         date >conftest.in
17353         mkdir conftest.out
17354         sleep 3
17355         if $INSTALL -p conftest.in conftest.out 2>/dev/null
17356         then
17357                 if test -f conftest.out/conftest.in
17358                 then
17359                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17360                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17361                         if test -s conftest.err
17362                         then
17363                                 cf_cv_install_p=no
17364                         else
17365                                 cf_cv_install_p=yes
17366                         fi
17367                 else
17368                         cf_cv_install_p=no
17369                 fi
17370         else
17371                 cf_cv_install_p=no
17372         fi
17373         rm -rf ./conftest*
17374
17375 fi
17376 echo "$as_me:17376: result: $cf_cv_install_p" >&5
17377 echo "${ECHO_T}$cf_cv_install_p" >&6
17378
17379 echo "$as_me:17379: checking if install needs to be told about ownership" >&5
17380 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17381 case `$ac_config_guess` in
17382 (*minix)
17383         with_install_o=yes
17384         ;;
17385 (*)
17386         with_install_o=no
17387         ;;
17388 esac
17389
17390 echo "$as_me:17390: result: $with_install_o" >&5
17391 echo "${ECHO_T}$with_install_o" >&6
17392 if test "x$with_install_o" = xyes
17393 then
17394         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'`"
17395 else
17396         INSTALL_OPT_O=
17397 fi
17398
17399 if test -n "$INSTALL_OPT_S"
17400 then
17401         echo "$as_me:17401: checking if you want to specify strip-program" >&5
17402 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17403
17404 # Check whether --with-strip-program or --without-strip-program was given.
17405 if test "${with_strip_program+set}" = set; then
17406   withval="$with_strip_program"
17407   with_strip_program=$withval
17408 else
17409   with_strip_program=no
17410 fi;
17411         echo "$as_me:17411: result: $with_strip_program" >&5
17412 echo "${ECHO_T}$with_strip_program" >&6
17413         if test "$with_strip_program" != no
17414         then
17415                 echo "$as_me:17415: checking if strip-program is supported with this installer" >&5
17416 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17417                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17418                 check_install_strip=no
17419                 if test -f "$cf_install_program"
17420                 then
17421                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17422                         if test -n "$check_install_version"
17423                         then
17424                                 check_install_strip="option"
17425                         else
17426                                 for check_strip_variable in STRIPBIN STRIP
17427                                 do
17428                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17429                                         then
17430                                                 check_install_strip="environ"
17431                                                 break
17432                                         fi
17433                                 done
17434                         fi
17435                 fi
17436                 echo "$as_me:17436: result: $check_install_strip" >&5
17437 echo "${ECHO_T}$check_install_strip" >&6
17438                 case "$check_install_strip" in
17439                 (no)
17440                         { echo "$as_me:17440: WARNING: $cf_install_program does not support strip program option" >&5
17441 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17442                         with_strip_program=no
17443                         ;;
17444                 (environ)
17445                         cat >install.tmp <<-CF_EOF
17446                         #! $SHELL
17447                         STRIPBIN="$with_strip_program" \\
17448                         STRIP="$with_strip_program" \\
17449                         $INSTALL "$@"
17450                         CF_EOF
17451                         INSTALL="`pwd`/install.tmp"
17452                         chmod +x "$INSTALL"
17453                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17454
17455 echo "${as_me:-configure}:17455: testing created $INSTALL ..." 1>&5
17456
17457                         ;;
17458                 (option)
17459                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17460                         ;;
17461                 esac
17462         fi
17463 fi
17464
17465 # If we're avoiding relinking of shared libraries during install, that is to
17466 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17467 # the install program has "-p" (for preserving timestamps).
17468 cf_cv_do_reranlib=yes
17469 if test "x$cf_cv_install_p" = xyes
17470 then
17471         if test "x$cf_cv_do_relink" != xyes
17472         then
17473                 cf_cv_do_reranlib=no
17474                 INSTALL_OPT_P="-p"
17475                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17476         fi
17477 fi
17478
17479 ###     use option --enable-warnings to turn on all gcc warnings
17480
17481 echo "$as_me:17481: checking if you want to use C11 _Noreturn feature" >&5
17482 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17483
17484 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17485 if test "${enable_stdnoreturn+set}" = set; then
17486   enableval="$enable_stdnoreturn"
17487   test "$enableval" != yes && enableval=no
17488         if test "$enableval" != "no" ; then
17489     enable_stdnoreturn=yes
17490         else
17491                 enable_stdnoreturn=no
17492         fi
17493 else
17494   enableval=no
17495         enable_stdnoreturn=no
17496
17497 fi;
17498 echo "$as_me:17498: result: $enable_stdnoreturn" >&5
17499 echo "${ECHO_T}$enable_stdnoreturn" >&6
17500
17501 if test $enable_stdnoreturn = yes; then
17502 echo "$as_me:17502: checking for C11 _Noreturn feature" >&5
17503 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17504 if test "${cf_cv_c11_noreturn+set}" = set; then
17505   echo $ECHO_N "(cached) $ECHO_C" >&6
17506 else
17507   cat >"conftest.$ac_ext" <<_ACEOF
17508 #line 17508 "configure"
17509 #include "confdefs.h"
17510
17511 $ac_includes_default
17512 #include <stdnoreturn.h>
17513 static _Noreturn void giveup(void) { exit(0); }
17514
17515 int
17516 main (void)
17517 {
17518 if (feof(stdin)) giveup()
17519   ;
17520   return 0;
17521 }
17522 _ACEOF
17523 rm -f "conftest.$ac_objext"
17524 if { (eval echo "$as_me:17524: \"$ac_compile\"") >&5
17525   (eval $ac_compile) 2>&5
17526   ac_status=$?
17527   echo "$as_me:17527: \$? = $ac_status" >&5
17528   (exit "$ac_status"); } &&
17529          { ac_try='test -s "conftest.$ac_objext"'
17530   { (eval echo "$as_me:17530: \"$ac_try\"") >&5
17531   (eval $ac_try) 2>&5
17532   ac_status=$?
17533   echo "$as_me:17533: \$? = $ac_status" >&5
17534   (exit "$ac_status"); }; }; then
17535   cf_cv_c11_noreturn=yes
17536 else
17537   echo "$as_me: failed program was:" >&5
17538 cat "conftest.$ac_ext" >&5
17539 cf_cv_c11_noreturn=no
17540 fi
17541 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17542
17543 fi
17544 echo "$as_me:17544: result: $cf_cv_c11_noreturn" >&5
17545 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17546 else
17547         cf_cv_c11_noreturn=no,
17548 fi
17549
17550 if test "$cf_cv_c11_noreturn" = yes; then
17551
17552 cat >>confdefs.h <<\EOF
17553 #define HAVE_STDNORETURN_H 1
17554 EOF
17555
17556 cat >>confdefs.h <<EOF
17557 #define STDC_NORETURN _Noreturn
17558 EOF
17559
17560         HAVE_STDNORETURN_H=1
17561 else
17562         HAVE_STDNORETURN_H=0
17563 fi
17564
17565 if test "$GCC" = yes || test "$GXX" = yes
17566 then
17567
17568 if test "$GCC" = yes || test "$GXX" = yes
17569 then
17570         case $CFLAGS in
17571         (*-Werror=*)
17572                 cf_temp_flags=
17573                 for cf_temp_scan in $CFLAGS
17574                 do
17575                         case "x$cf_temp_scan" in
17576                         (x-Werror=format*)
17577
17578         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17579         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17580
17581                                 ;;
17582                         (x-Werror=*)
17583
17584         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17585         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17586
17587                                 ;;
17588                         (*)
17589
17590         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17591         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17592
17593                                 ;;
17594                         esac
17595                 done
17596                 if test "x$CFLAGS" != "x$cf_temp_flags"
17597                 then
17598                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17599
17600 echo "${as_me:-configure}:17600: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17601
17602                         CFLAGS="$cf_temp_flags"
17603                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17604
17605 echo "${as_me:-configure}:17605: testing ... fixed $CFLAGS ..." 1>&5
17606
17607                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17608
17609 echo "${as_me:-configure}:17609: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17610
17611                 fi
17612                 ;;
17613         esac
17614 fi
17615
17616 if test "$GCC" = yes || test "$GXX" = yes
17617 then
17618         case $CPPFLAGS in
17619         (*-Werror=*)
17620                 cf_temp_flags=
17621                 for cf_temp_scan in $CPPFLAGS
17622                 do
17623                         case "x$cf_temp_scan" in
17624                         (x-Werror=format*)
17625
17626         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17627         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17628
17629                                 ;;
17630                         (x-Werror=*)
17631
17632         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17633         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17634
17635                                 ;;
17636                         (*)
17637
17638         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17639         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17640
17641                                 ;;
17642                         esac
17643                 done
17644                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17645                 then
17646                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17647
17648 echo "${as_me:-configure}:17648: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17649
17650                         CPPFLAGS="$cf_temp_flags"
17651                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17652
17653 echo "${as_me:-configure}:17653: testing ... fixed $CPPFLAGS ..." 1>&5
17654
17655                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17656
17657 echo "${as_me:-configure}:17657: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17658
17659                 fi
17660                 ;;
17661         esac
17662 fi
17663
17664 if test "$GCC" = yes || test "$GXX" = yes
17665 then
17666         case $LDFLAGS in
17667         (*-Werror=*)
17668                 cf_temp_flags=
17669                 for cf_temp_scan in $LDFLAGS
17670                 do
17671                         case "x$cf_temp_scan" in
17672                         (x-Werror=format*)
17673
17674         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17675         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17676
17677                                 ;;
17678                         (x-Werror=*)
17679
17680         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17681         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17682
17683                                 ;;
17684                         (*)
17685
17686         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17687         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17688
17689                                 ;;
17690                         esac
17691                 done
17692                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17693                 then
17694                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17695
17696 echo "${as_me:-configure}:17696: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17697
17698                         LDFLAGS="$cf_temp_flags"
17699                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17700
17701 echo "${as_me:-configure}:17701: testing ... fixed $LDFLAGS ..." 1>&5
17702
17703                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17704
17705 echo "${as_me:-configure}:17705: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17706
17707                 fi
17708                 ;;
17709         esac
17710 fi
17711
17712 echo "$as_me:17712: checking if you want to turn on gcc warnings" >&5
17713 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17714
17715 # Check whether --enable-warnings or --disable-warnings was given.
17716 if test "${enable_warnings+set}" = set; then
17717   enableval="$enable_warnings"
17718   test "$enableval" != yes && enableval=no
17719         if test "$enableval" != "no" ; then
17720     enable_warnings=yes
17721         else
17722                 enable_warnings=no
17723         fi
17724 else
17725   enableval=no
17726         enable_warnings=no
17727
17728 fi;
17729 echo "$as_me:17729: result: $enable_warnings" >&5
17730 echo "${ECHO_T}$enable_warnings" >&6
17731 if test "$enable_warnings" = "yes"
17732 then
17733
17734 if test "x$have_x" = xyes; then
17735
17736 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17737 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17738 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17739 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17740 for cf_X_CFLAGS in $X_CFLAGS
17741 do
17742         case "x$cf_X_CFLAGS" in
17743         x-[IUD]*)
17744                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17745                 ;;
17746         *)
17747                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17748                 ;;
17749         esac
17750 done
17751
17752 cat >"conftest.$ac_ext" <<_ACEOF
17753 #line 17753 "configure"
17754 #include "confdefs.h"
17755
17756 #include <stdlib.h>
17757 #include <X11/Intrinsic.h>
17758
17759 int
17760 main (void)
17761 {
17762 String foo = malloc(1); free((void*)foo)
17763   ;
17764   return 0;
17765 }
17766 _ACEOF
17767 rm -f "conftest.$ac_objext"
17768 if { (eval echo "$as_me:17768: \"$ac_compile\"") >&5
17769   (eval $ac_compile) 2>&5
17770   ac_status=$?
17771   echo "$as_me:17771: \$? = $ac_status" >&5
17772   (exit "$ac_status"); } &&
17773          { ac_try='test -s "conftest.$ac_objext"'
17774   { (eval echo "$as_me:17774: \"$ac_try\"") >&5
17775   (eval $ac_try) 2>&5
17776   ac_status=$?
17777   echo "$as_me:17777: \$? = $ac_status" >&5
17778   (exit "$ac_status"); }; }; then
17779
17780 echo "$as_me:17780: checking for X11/Xt const-feature" >&5
17781 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17782 if test "${cf_cv_const_x_string+set}" = set; then
17783   echo $ECHO_N "(cached) $ECHO_C" >&6
17784 else
17785
17786         cat >"conftest.$ac_ext" <<_ACEOF
17787 #line 17787 "configure"
17788 #include "confdefs.h"
17789
17790 #undef  _CONST_X_STRING
17791 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17792 #undef  XTSTRINGDEFINES /* X11R5 and later */
17793 #include <stdlib.h>
17794 #include <X11/Intrinsic.h>
17795
17796 int
17797 main (void)
17798 {
17799 String foo = malloc(1); *foo = 0
17800   ;
17801   return 0;
17802 }
17803 _ACEOF
17804 rm -f "conftest.$ac_objext"
17805 if { (eval echo "$as_me:17805: \"$ac_compile\"") >&5
17806   (eval $ac_compile) 2>&5
17807   ac_status=$?
17808   echo "$as_me:17808: \$? = $ac_status" >&5
17809   (exit "$ac_status"); } &&
17810          { ac_try='test -s "conftest.$ac_objext"'
17811   { (eval echo "$as_me:17811: \"$ac_try\"") >&5
17812   (eval $ac_try) 2>&5
17813   ac_status=$?
17814   echo "$as_me:17814: \$? = $ac_status" >&5
17815   (exit "$ac_status"); }; }; then
17816
17817                         cf_cv_const_x_string=no
17818
17819 else
17820   echo "$as_me: failed program was:" >&5
17821 cat "conftest.$ac_ext" >&5
17822
17823                         cf_cv_const_x_string=yes
17824
17825 fi
17826 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17827
17828 fi
17829 echo "$as_me:17829: result: $cf_cv_const_x_string" >&5
17830 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17831
17832 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17833 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17834 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17835
17836 case "$cf_cv_const_x_string" in
17837 (no)
17838
17839         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17840         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17841
17842         ;;
17843 (*)
17844
17845         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17846         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17847
17848         ;;
17849 esac
17850
17851 else
17852   echo "$as_me: failed program was:" >&5
17853 cat "conftest.$ac_ext" >&5
17854 fi
17855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17856  fi
17857 cat > "conftest.$ac_ext" <<EOF
17858 #line 17858 "${as_me:-configure}"
17859 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17860 EOF
17861 if test "$INTEL_COMPILER" = yes
17862 then
17863 # The "-wdXXX" options suppress warnings:
17864 # remark #1419: external declaration in primary source file
17865 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17866 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17867 # remark #193: zero used for undefined preprocessing identifier
17868 # remark #593: variable "curs_sb_left_arrow" was set but never used
17869 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17870 # remark #869: parameter "tw" was never referenced
17871 # remark #981: operands are evaluated in unspecified order
17872 # warning #279: controlling expression is constant
17873
17874         { echo "$as_me:17874: checking for $CC warning options..." >&5
17875 echo "$as_me: checking for $CC warning options..." >&6;}
17876         cf_save_CFLAGS="$CFLAGS"
17877         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17878         for cf_opt in \
17879                 wd1419 \
17880                 wd1683 \
17881                 wd1684 \
17882                 wd193 \
17883                 wd593 \
17884                 wd279 \
17885                 wd810 \
17886                 wd869 \
17887                 wd981
17888         do
17889                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17890                 if { (eval echo "$as_me:17890: \"$ac_compile\"") >&5
17891   (eval $ac_compile) 2>&5
17892   ac_status=$?
17893   echo "$as_me:17893: \$? = $ac_status" >&5
17894   (exit "$ac_status"); }; then
17895                         test -n "$verbose" && echo "$as_me:17895: result: ... -$cf_opt" >&5
17896 echo "${ECHO_T}... -$cf_opt" >&6
17897                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17898                 fi
17899         done
17900         CFLAGS="$cf_save_CFLAGS"
17901 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17902 then
17903         { echo "$as_me:17903: checking for $CC warning options..." >&5
17904 echo "$as_me: checking for $CC warning options..." >&6;}
17905         cf_save_CFLAGS="$CFLAGS"
17906         cf_warn_CONST=""
17907         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17908         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17909         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17910         for cf_opt in W Wall \
17911                 Wbad-function-cast \
17912                 Wcast-align \
17913                 Wcast-qual \
17914                 Wdeclaration-after-statement \
17915                 Wextra \
17916                 Winline \
17917                 Wmissing-declarations \
17918                 Wmissing-prototypes \
17919                 Wnested-externs \
17920                 Wpointer-arith \
17921                 Wshadow \
17922                 Wstrict-prototypes \
17923                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17924         do
17925                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17926                 if { (eval echo "$as_me:17926: \"$ac_compile\"") >&5
17927   (eval $ac_compile) 2>&5
17928   ac_status=$?
17929   echo "$as_me:17929: \$? = $ac_status" >&5
17930   (exit "$ac_status"); }; then
17931                         test -n "$verbose" && echo "$as_me:17931: result: ... -$cf_opt" >&5
17932 echo "${ECHO_T}... -$cf_opt" >&6
17933                         case "$cf_opt" in
17934                         (Winline)
17935                                 case "$GCC_VERSION" in
17936                                 ([34].*)
17937                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17938
17939 echo "${as_me:-configure}:17939: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17940
17941                                         continue;;
17942                                 esac
17943                                 ;;
17944                         (Wpointer-arith)
17945                                 case "$GCC_VERSION" in
17946                                 ([12].*)
17947                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17948
17949 echo "${as_me:-configure}:17949: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17950
17951                                         continue;;
17952                                 esac
17953                                 ;;
17954                         esac
17955                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17956                 fi
17957         done
17958         CFLAGS="$cf_save_CFLAGS"
17959 fi
17960 rm -rf ./conftest*
17961
17962 fi
17963
17964 if test "$GCC" = yes || test "$GXX" = yes
17965 then
17966 cat > conftest.i <<EOF
17967 #ifndef GCC_PRINTF
17968 #define GCC_PRINTF 0
17969 #endif
17970 #ifndef GCC_SCANF
17971 #define GCC_SCANF 0
17972 #endif
17973 #ifndef GCC_NORETURN
17974 #define GCC_NORETURN /* nothing */
17975 #endif
17976 #ifndef GCC_UNUSED
17977 #define GCC_UNUSED /* nothing */
17978 #endif
17979 EOF
17980 if test "$GCC" = yes
17981 then
17982         { echo "$as_me:17982: checking for $CC __attribute__ directives..." >&5
17983 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17984 cat > "conftest.$ac_ext" <<EOF
17985 #line 17985 "${as_me:-configure}"
17986 #include <stdio.h>
17987 #include "confdefs.h"
17988 #include "conftest.h"
17989 #include "conftest.i"
17990 #if     GCC_PRINTF
17991 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17992 #else
17993 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17994 #endif
17995 #if     GCC_SCANF
17996 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17997 #else
17998 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17999 #endif
18000 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
18001 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
18002 extern GCC_NORETURN void foo(void);
18003 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
18004 EOF
18005         cf_printf_attribute=no
18006         cf_scanf_attribute=no
18007         for cf_attribute in scanf printf unused noreturn
18008         do
18009
18010 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18011
18012                 cf_directive="__attribute__(($cf_attribute))"
18013                 echo "checking for $CC $cf_directive" 1>&5
18014
18015                 case "$cf_attribute" in
18016                 (printf)
18017                         cf_printf_attribute=yes
18018                         cat >conftest.h <<EOF
18019 #define GCC_$cf_ATTRIBUTE 1
18020 EOF
18021                         ;;
18022                 (scanf)
18023                         cf_scanf_attribute=yes
18024                         cat >conftest.h <<EOF
18025 #define GCC_$cf_ATTRIBUTE 1
18026 EOF
18027                         ;;
18028                 (*)
18029                         cat >conftest.h <<EOF
18030 #define GCC_$cf_ATTRIBUTE $cf_directive
18031 EOF
18032                         ;;
18033                 esac
18034
18035                 if { (eval echo "$as_me:18035: \"$ac_compile\"") >&5
18036   (eval $ac_compile) 2>&5
18037   ac_status=$?
18038   echo "$as_me:18038: \$? = $ac_status" >&5
18039   (exit "$ac_status"); }; then
18040                         test -n "$verbose" && echo "$as_me:18040: result: ... $cf_attribute" >&5
18041 echo "${ECHO_T}... $cf_attribute" >&6
18042                         cat conftest.h >>confdefs.h
18043                         case "$cf_attribute" in
18044                         (noreturn)
18045
18046 cat >>confdefs.h <<EOF
18047 #define GCC_NORETURN $cf_directive
18048 EOF
18049
18050                                 ;;
18051                         (printf)
18052                                 cf_value='/* nothing */'
18053                                 if test "$cf_printf_attribute" != no ; then
18054                                         cf_value='__attribute__((format(printf,fmt,var)))'
18055
18056 cat >>confdefs.h <<\EOF
18057 #define GCC_PRINTF 1
18058 EOF
18059
18060                                 fi
18061
18062 cat >>confdefs.h <<EOF
18063 #define GCC_PRINTFLIKE(fmt,var) $cf_value
18064 EOF
18065
18066                                 ;;
18067                         (scanf)
18068                                 cf_value='/* nothing */'
18069                                 if test "$cf_scanf_attribute" != no ; then
18070                                         cf_value='__attribute__((format(scanf,fmt,var)))'
18071
18072 cat >>confdefs.h <<\EOF
18073 #define GCC_SCANF 1
18074 EOF
18075
18076                                 fi
18077
18078 cat >>confdefs.h <<EOF
18079 #define GCC_SCANFLIKE(fmt,var) $cf_value
18080 EOF
18081
18082                                 ;;
18083                         (unused)
18084
18085 cat >>confdefs.h <<EOF
18086 #define GCC_UNUSED $cf_directive
18087 EOF
18088
18089                                 ;;
18090                         esac
18091                 fi
18092         done
18093 else
18094         ${FGREP-fgrep} define conftest.i >>confdefs.h
18095 fi
18096 rm -rf ./conftest*
18097 fi
18098
18099 fi
18100
18101 if test "x$enable_warnings" = "xyes"; then
18102
18103         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
18104
18105         if test "x$cf_with_cxx" = xyes ; then
18106
18107 INTEL_CPLUSPLUS=no
18108
18109 if test "$GCC" = yes ; then
18110         case "$host_os" in
18111         (linux*|gnu*)
18112                 echo "$as_me:18112: checking if this is really Intel C++ compiler" >&5
18113 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
18114                 cf_save_CFLAGS="$CXXFLAGS"
18115                 CXXFLAGS="$CXXFLAGS -no-gcc"
18116                 cat >"conftest.$ac_ext" <<_ACEOF
18117 #line 18117 "configure"
18118 #include "confdefs.h"
18119
18120 int
18121 main (void)
18122 {
18123
18124 #ifdef __INTEL_COMPILER
18125 #else
18126 #error __INTEL_COMPILER is not defined
18127 #endif
18128
18129   ;
18130   return 0;
18131 }
18132 _ACEOF
18133 rm -f "conftest.$ac_objext"
18134 if { (eval echo "$as_me:18134: \"$ac_compile\"") >&5
18135   (eval $ac_compile) 2>&5
18136   ac_status=$?
18137   echo "$as_me:18137: \$? = $ac_status" >&5
18138   (exit "$ac_status"); } &&
18139          { ac_try='test -s "conftest.$ac_objext"'
18140   { (eval echo "$as_me:18140: \"$ac_try\"") >&5
18141   (eval $ac_try) 2>&5
18142   ac_status=$?
18143   echo "$as_me:18143: \$? = $ac_status" >&5
18144   (exit "$ac_status"); }; }; then
18145   INTEL_CPLUSPLUS=yes
18146 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
18147
18148 else
18149   echo "$as_me: failed program was:" >&5
18150 cat "conftest.$ac_ext" >&5
18151 fi
18152 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18153                 CXXFLAGS="$cf_save_CFLAGS"
18154                 echo "$as_me:18154: result: $INTEL_CPLUSPLUS" >&5
18155 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
18156                 ;;
18157         esac
18158 fi
18159
18160 CLANG_CPLUSPLUS=no
18161
18162 if test "$GCC" = yes ; then
18163         echo "$as_me:18163: checking if this is really Clang C++ compiler" >&5
18164 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
18165         cf_save_CFLAGS="$CXXFLAGS"
18166         cat >"conftest.$ac_ext" <<_ACEOF
18167 #line 18167 "configure"
18168 #include "confdefs.h"
18169
18170 int
18171 main (void)
18172 {
18173
18174 #ifdef __clang__
18175 #else
18176 #error __clang__ is not defined
18177 #endif
18178
18179   ;
18180   return 0;
18181 }
18182 _ACEOF
18183 rm -f "conftest.$ac_objext"
18184 if { (eval echo "$as_me:18184: \"$ac_compile\"") >&5
18185   (eval $ac_compile) 2>&5
18186   ac_status=$?
18187   echo "$as_me:18187: \$? = $ac_status" >&5
18188   (exit "$ac_status"); } &&
18189          { ac_try='test -s "conftest.$ac_objext"'
18190   { (eval echo "$as_me:18190: \"$ac_try\"") >&5
18191   (eval $ac_try) 2>&5
18192   ac_status=$?
18193   echo "$as_me:18193: \$? = $ac_status" >&5
18194   (exit "$ac_status"); }; }; then
18195   CLANG_CPLUSPLUS=yes
18196
18197 else
18198   echo "$as_me: failed program was:" >&5
18199 cat "conftest.$ac_ext" >&5
18200 fi
18201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18202         CXXFLAGS="$cf_save_CFLAGS"
18203         echo "$as_me:18203: result: $CLANG_CPLUSPLUS" >&5
18204 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
18205 fi
18206
18207 CLANG_VERSION=none
18208
18209 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
18210         case "$CC" in
18211         (c[1-9][0-9]|*/c[1-9][0-9])
18212                 { echo "$as_me:18212: WARNING: replacing broken compiler alias $CC" >&5
18213 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
18214                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
18215                 CC=clang
18216                 ;;
18217         esac
18218
18219         echo "$as_me:18219: checking version of $CC" >&5
18220 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
18221         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.].*//'`"
18222         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
18223         echo "$as_me:18223: result: $CLANG_VERSION" >&5
18224 echo "${ECHO_T}$CLANG_VERSION" >&6
18225
18226         for cf_clang_opt in \
18227                 -Qunused-arguments \
18228                 -Wno-error=implicit-function-declaration
18229         do
18230                 echo "$as_me:18230: checking if option $cf_clang_opt works" >&5
18231 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
18232                 cf_save_CFLAGS="$CFLAGS"
18233                 CFLAGS="$CFLAGS $cf_clang_opt"
18234                 cat >"conftest.$ac_ext" <<_ACEOF
18235 #line 18235 "configure"
18236 #include "confdefs.h"
18237
18238                         #include <stdio.h>
18239 int
18240 main (void)
18241 {
18242
18243                         printf("hello!\\n");
18244   ;
18245   return 0;
18246 }
18247 _ACEOF
18248 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18249 if { (eval echo "$as_me:18249: \"$ac_link\"") >&5
18250   (eval $ac_link) 2>&5
18251   ac_status=$?
18252   echo "$as_me:18252: \$? = $ac_status" >&5
18253   (exit "$ac_status"); } &&
18254          { ac_try='test -s "conftest$ac_exeext"'
18255   { (eval echo "$as_me:18255: \"$ac_try\"") >&5
18256   (eval $ac_try) 2>&5
18257   ac_status=$?
18258   echo "$as_me:18258: \$? = $ac_status" >&5
18259   (exit "$ac_status"); }; }; then
18260
18261                         cf_clang_optok=yes
18262 else
18263   echo "$as_me: failed program was:" >&5
18264 cat "conftest.$ac_ext" >&5
18265
18266                         cf_clang_optok=no
18267 fi
18268 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18269                 echo "$as_me:18269: result: $cf_clang_optok" >&5
18270 echo "${ECHO_T}$cf_clang_optok" >&6
18271                 CFLAGS="$cf_save_CFLAGS"
18272                 if test "$cf_clang_optok" = yes; then
18273                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
18274
18275 echo "${as_me:-configure}:18275: testing adding option $cf_clang_opt ..." 1>&5
18276
18277         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18278         CFLAGS="${CFLAGS}$cf_clang_opt"
18279
18280                 fi
18281         done
18282 fi
18283
18284 ac_ext=cc
18285 ac_cpp='$CXXCPP $CPPFLAGS'
18286 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18287 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18288 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18289 ac_main_return="return"
18290
18291 cat > conftest.$ac_ext <<EOF
18292 #line 18292 "configure"
18293 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
18294 EOF
18295
18296 if test "$INTEL_CPLUSPLUS" = yes
18297 then
18298 # The "-wdXXX" options suppress warnings:
18299 # remark #1419: external declaration in primary source file
18300 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18301 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18302 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18303 # remark #193: zero used for undefined preprocessing identifier
18304 # remark #593: variable "curs_sb_left_arrow" was set but never used
18305 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18306 # remark #869: parameter "tw" was never referenced
18307 # remark #981: operands are evaluated in unspecified order
18308 # warning #269: invalid format string conversion
18309
18310         { echo "$as_me:18310: checking for $CC warning options..." >&5
18311 echo "$as_me: checking for $CC warning options..." >&6;}
18312         cf_save_CXXFLAGS="$CXXFLAGS"
18313         EXTRA_CXXFLAGS="-Wall"
18314         for cf_opt in \
18315                 wd1419 \
18316                 wd1682 \
18317                 wd1683 \
18318                 wd1684 \
18319                 wd193 \
18320                 wd279 \
18321                 wd593 \
18322                 wd810 \
18323                 wd869 \
18324                 wd981
18325         do
18326                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
18327                 if { (eval echo "$as_me:18327: \"$ac_compile\"") >&5
18328   (eval $ac_compile) 2>&5
18329   ac_status=$?
18330   echo "$as_me:18330: \$? = $ac_status" >&5
18331   (exit "$ac_status"); }; then
18332                         test -n "$verbose" && echo "$as_me:18332: result: ... -$cf_opt" >&5
18333 echo "${ECHO_T}... -$cf_opt" >&6
18334                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18335                 fi
18336         done
18337         CXXFLAGS="$cf_save_CXXFLAGS"
18338
18339 elif test "$GXX" = yes
18340 then
18341         { echo "$as_me:18341: checking for $CXX warning options..." >&5
18342 echo "$as_me: checking for $CXX warning options..." >&6;}
18343         cf_save_CXXFLAGS="$CXXFLAGS"
18344         EXTRA_CXXFLAGS="-W -Wall"
18345         cf_gxx_extra_warnings=""
18346         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18347         case "$GXX_VERSION" in
18348         ([1-2].*)
18349                 ;;
18350         (*)
18351                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18352                 ;;
18353         esac
18354         for cf_opt in \
18355                 Wabi \
18356                 fabi-version=0 \
18357                 Wextra \
18358                 Wignored-qualifiers \
18359                 Wlogical-op \
18360                 Woverloaded-virtual \
18361                 Wsign-promo \
18362                 Wsynth \
18363                 Wold-style-cast \
18364                 Wcast-align \
18365                 Wcast-qual \
18366                 Wpointer-arith \
18367                 Wshadow \
18368                 Wundef $cf_gxx_extra_warnings Wno-unused
18369         do
18370                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18371                 if { (eval echo "$as_me:18371: \"$ac_compile\"") >&5
18372   (eval $ac_compile) 2>&5
18373   ac_status=$?
18374   echo "$as_me:18374: \$? = $ac_status" >&5
18375   (exit "$ac_status"); }; then
18376                         test -n "$verbose" && echo "$as_me:18376: result: ... -$cf_opt" >&5
18377 echo "${ECHO_T}... -$cf_opt" >&6
18378                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18379                 else
18380                         test -n "$verbose" && echo "$as_me:18380: result: ... no -$cf_opt" >&5
18381 echo "${ECHO_T}... no -$cf_opt" >&6
18382                 fi
18383         done
18384         CXXFLAGS="$cf_save_CXXFLAGS"
18385 fi
18386
18387 rm -rf ./conftest*
18388 ac_ext=c
18389 ac_cpp='$CPP $CPPFLAGS'
18390 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18391 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18392 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18393 ac_main_return="return"
18394
18395         fi
18396 fi
18397
18398 echo "$as_me:18398: checking if you want to work around bogus compiler/loader warnings" >&5
18399 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18400
18401 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18402 if test "${enable_string_hacks+set}" = set; then
18403   enableval="$enable_string_hacks"
18404   enable_string_hacks=$enableval
18405 else
18406   enable_string_hacks=no
18407 fi;
18408 echo "$as_me:18408: result: $enable_string_hacks" >&5
18409 echo "${ECHO_T}$enable_string_hacks" >&6
18410
18411 if test "x$enable_string_hacks" = "xyes"; then
18412
18413 cat >>confdefs.h <<\EOF
18414 #define USE_STRING_HACKS 1
18415 EOF
18416
18417         { echo "$as_me:18417: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18418 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18419         echo "$as_me:18419: checking for strlcat" >&5
18420 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18421 if test "${ac_cv_func_strlcat+set}" = set; then
18422   echo $ECHO_N "(cached) $ECHO_C" >&6
18423 else
18424   cat >"conftest.$ac_ext" <<_ACEOF
18425 #line 18425 "configure"
18426 #include "confdefs.h"
18427 #define strlcat autoconf_temporary
18428 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18429 #undef strlcat
18430
18431 #ifdef __cplusplus
18432 extern "C"
18433 #endif
18434
18435 /* We use char because int might match the return type of a gcc2
18436    builtin and then its argument prototype would still apply.  */
18437 char strlcat (void);
18438
18439 int
18440 main (void)
18441 {
18442
18443 /* The GNU C library defines stubs for functions which it implements
18444     to always fail with ENOSYS.  Some functions are actually named
18445     something starting with __ and the normal name is an alias.  */
18446 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18447 #error found stub for strlcat
18448 #endif
18449
18450         return strlcat ();
18451   ;
18452   return 0;
18453 }
18454 _ACEOF
18455 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18456 if { (eval echo "$as_me:18456: \"$ac_link\"") >&5
18457   (eval $ac_link) 2>&5
18458   ac_status=$?
18459   echo "$as_me:18459: \$? = $ac_status" >&5
18460   (exit "$ac_status"); } &&
18461          { ac_try='test -s "conftest$ac_exeext"'
18462   { (eval echo "$as_me:18462: \"$ac_try\"") >&5
18463   (eval $ac_try) 2>&5
18464   ac_status=$?
18465   echo "$as_me:18465: \$? = $ac_status" >&5
18466   (exit "$ac_status"); }; }; then
18467   ac_cv_func_strlcat=yes
18468 else
18469   echo "$as_me: failed program was:" >&5
18470 cat "conftest.$ac_ext" >&5
18471 ac_cv_func_strlcat=no
18472 fi
18473 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18474 fi
18475 echo "$as_me:18475: result: $ac_cv_func_strlcat" >&5
18476 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18477 if test "$ac_cv_func_strlcat" = yes; then
18478
18479 cat >>confdefs.h <<\EOF
18480 #define HAVE_STRLCAT 1
18481 EOF
18482
18483 else
18484
18485                 echo "$as_me:18485: checking for strlcat in -lbsd" >&5
18486 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18487 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18488   echo $ECHO_N "(cached) $ECHO_C" >&6
18489 else
18490   ac_check_lib_save_LIBS=$LIBS
18491 LIBS="-lbsd  $LIBS"
18492 cat >"conftest.$ac_ext" <<_ACEOF
18493 #line 18493 "configure"
18494 #include "confdefs.h"
18495
18496 /* Override any gcc2 internal prototype to avoid an error.  */
18497 #ifdef __cplusplus
18498 extern "C"
18499 #endif
18500 /* We use char because int might match the return type of a gcc2
18501    builtin and then its argument prototype would still apply.  */
18502 char strlcat (void);
18503 int
18504 main (void)
18505 {
18506 strlcat ();
18507   ;
18508   return 0;
18509 }
18510 _ACEOF
18511 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18512 if { (eval echo "$as_me:18512: \"$ac_link\"") >&5
18513   (eval $ac_link) 2>&5
18514   ac_status=$?
18515   echo "$as_me:18515: \$? = $ac_status" >&5
18516   (exit "$ac_status"); } &&
18517          { ac_try='test -s "conftest$ac_exeext"'
18518   { (eval echo "$as_me:18518: \"$ac_try\"") >&5
18519   (eval $ac_try) 2>&5
18520   ac_status=$?
18521   echo "$as_me:18521: \$? = $ac_status" >&5
18522   (exit "$ac_status"); }; }; then
18523   ac_cv_lib_bsd_strlcat=yes
18524 else
18525   echo "$as_me: failed program was:" >&5
18526 cat "conftest.$ac_ext" >&5
18527 ac_cv_lib_bsd_strlcat=no
18528 fi
18529 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18530 LIBS=$ac_check_lib_save_LIBS
18531 fi
18532 echo "$as_me:18532: result: $ac_cv_lib_bsd_strlcat" >&5
18533 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18534 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18535
18536 cf_add_libs="$LIBS"
18537 # reverse order
18538 cf_add_0lib=
18539 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18540 # filter duplicates
18541 for cf_add_1lib in $cf_add_0lib; do
18542         for cf_add_2lib in $cf_add_libs; do
18543                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18544                         cf_add_1lib=
18545                         break
18546                 fi
18547         done
18548         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18549 done
18550 LIBS="$cf_add_libs"
18551
18552 for ac_header in bsd/string.h
18553 do
18554 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18555 echo "$as_me:18555: checking for $ac_header" >&5
18556 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18557 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18558   echo $ECHO_N "(cached) $ECHO_C" >&6
18559 else
18560   cat >"conftest.$ac_ext" <<_ACEOF
18561 #line 18561 "configure"
18562 #include "confdefs.h"
18563 #include <$ac_header>
18564 _ACEOF
18565 if { (eval echo "$as_me:18565: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18566   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18567   ac_status=$?
18568   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18569   rm -f conftest.er1
18570   cat conftest.err >&5
18571   echo "$as_me:18571: \$? = $ac_status" >&5
18572   (exit "$ac_status"); } >/dev/null; then
18573   if test -s conftest.err; then
18574     ac_cpp_err=$ac_c_preproc_warn_flag
18575   else
18576     ac_cpp_err=
18577   fi
18578 else
18579   ac_cpp_err=yes
18580 fi
18581 if test -z "$ac_cpp_err"; then
18582   eval "$as_ac_Header=yes"
18583 else
18584   echo "$as_me: failed program was:" >&5
18585   cat "conftest.$ac_ext" >&5
18586   eval "$as_ac_Header=no"
18587 fi
18588 rm -f conftest.err "conftest.$ac_ext"
18589 fi
18590 echo "$as_me:18590: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18591 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18592 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18593   cat >>confdefs.h <<EOF
18594 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18595 EOF
18596
18597 fi
18598 done
18599
18600 cat >>confdefs.h <<\EOF
18601 #define HAVE_STRLCAT 1
18602 EOF
18603
18604 fi
18605
18606 fi
18607
18608 for ac_func in strlcpy snprintf
18609 do
18610 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18611 echo "$as_me:18611: checking for $ac_func" >&5
18612 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18613 if eval "test \"\${$as_ac_var+set}\" = set"; then
18614   echo $ECHO_N "(cached) $ECHO_C" >&6
18615 else
18616   cat >"conftest.$ac_ext" <<_ACEOF
18617 #line 18617 "configure"
18618 #include "confdefs.h"
18619 #define $ac_func autoconf_temporary
18620 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18621 #undef $ac_func
18622
18623 #ifdef __cplusplus
18624 extern "C"
18625 #endif
18626
18627 /* We use char because int might match the return type of a gcc2
18628    builtin and then its argument prototype would still apply.  */
18629 char $ac_func (void);
18630
18631 int
18632 main (void)
18633 {
18634
18635 /* The GNU C library defines stubs for functions which it implements
18636     to always fail with ENOSYS.  Some functions are actually named
18637     something starting with __ and the normal name is an alias.  */
18638 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18639 #error found stub for $ac_func
18640 #endif
18641
18642         return $ac_func ();
18643   ;
18644   return 0;
18645 }
18646 _ACEOF
18647 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18648 if { (eval echo "$as_me:18648: \"$ac_link\"") >&5
18649   (eval $ac_link) 2>&5
18650   ac_status=$?
18651   echo "$as_me:18651: \$? = $ac_status" >&5
18652   (exit "$ac_status"); } &&
18653          { ac_try='test -s "conftest$ac_exeext"'
18654   { (eval echo "$as_me:18654: \"$ac_try\"") >&5
18655   (eval $ac_try) 2>&5
18656   ac_status=$?
18657   echo "$as_me:18657: \$? = $ac_status" >&5
18658   (exit "$ac_status"); }; }; then
18659   eval "$as_ac_var=yes"
18660 else
18661   echo "$as_me: failed program was:" >&5
18662 cat "conftest.$ac_ext" >&5
18663 eval "$as_ac_var=no"
18664 fi
18665 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18666 fi
18667 echo "$as_me:18667: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18668 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18669 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18670   cat >>confdefs.h <<EOF
18671 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18672 EOF
18673
18674 fi
18675 done
18676
18677 fi
18678
18679 ###     use option --enable-assertions to turn on generation of assertion code
18680 echo "$as_me:18680: checking if you want to enable runtime assertions" >&5
18681 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18682
18683 # Check whether --enable-assertions or --disable-assertions was given.
18684 if test "${enable_assertions+set}" = set; then
18685   enableval="$enable_assertions"
18686   with_assertions=$enableval
18687 else
18688   with_assertions=no
18689 fi;
18690 echo "$as_me:18690: result: $with_assertions" >&5
18691 echo "${ECHO_T}$with_assertions" >&6
18692 if test -n "$GCC"
18693 then
18694         if test "$with_assertions" = no
18695         then
18696                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18697         else
18698
18699         ADAFLAGS="$ADAFLAGS -gnata"
18700
18701         fi
18702 fi
18703
18704 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18705
18706 echo "$as_me:18706: checking if you want to use dmalloc for testing" >&5
18707 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18708
18709 # Check whether --with-dmalloc or --without-dmalloc was given.
18710 if test "${with_dmalloc+set}" = set; then
18711   withval="$with_dmalloc"
18712   case "x$withval" in
18713         (x|xno) ;;
18714         (*)
18715                 : "${with_cflags:=-g}"
18716                 : "${enable_leaks:=no}"
18717                 with_dmalloc=yes
18718
18719 cat >>confdefs.h <<EOF
18720 #define USE_DMALLOC 1
18721 EOF
18722
18723                 ;;
18724         esac
18725 else
18726   with_dmalloc=
18727 fi;
18728 echo "$as_me:18728: result: ${with_dmalloc:-no}" >&5
18729 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18730
18731 case ".$with_cflags" in
18732 (.*-g*)
18733         case .$CFLAGS in
18734         (.*-g*)
18735                 ;;
18736         (*)
18737
18738 cf_fix_cppflags=no
18739 cf_new_cflags=
18740 cf_new_cppflags=
18741 cf_new_extra_cppflags=
18742
18743 for cf_add_cflags in -g
18744 do
18745 case "$cf_fix_cppflags" in
18746 (no)
18747         case "$cf_add_cflags" in
18748         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18749                 case "$cf_add_cflags" in
18750                 (-D*)
18751                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18752
18753                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18754                                 && test -z "${cf_tst_cflags}" \
18755                                 && cf_fix_cppflags=yes
18756
18757                         if test "$cf_fix_cppflags" = yes ; then
18758
18759         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18760         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18761
18762                                 continue
18763                         elif test "${cf_tst_cflags}" = "\"'" ; then
18764
18765         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18766         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18767
18768                                 continue
18769                         fi
18770                         ;;
18771                 esac
18772                 case "$CPPFLAGS" in
18773                 (*$cf_add_cflags)
18774                         ;;
18775                 (*)
18776                         case "$cf_add_cflags" in
18777                         (-D*)
18778                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18779
18780 CPPFLAGS=`echo "$CPPFLAGS" | \
18781         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18782                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18783
18784                                 ;;
18785                         esac
18786
18787         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18788         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18789
18790                         ;;
18791                 esac
18792                 ;;
18793         (*)
18794
18795         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18796         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18797
18798                 ;;
18799         esac
18800         ;;
18801 (yes)
18802
18803         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18804         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18805
18806         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18807
18808         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18809                 && test -z "${cf_tst_cflags}" \
18810                 && cf_fix_cppflags=no
18811         ;;
18812 esac
18813 done
18814
18815 if test -n "$cf_new_cflags" ; then
18816
18817         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18818         CFLAGS="${CFLAGS}$cf_new_cflags"
18819
18820 fi
18821
18822 if test -n "$cf_new_cppflags" ; then
18823
18824         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18825         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18826
18827 fi
18828
18829 if test -n "$cf_new_extra_cppflags" ; then
18830
18831         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18832         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18833
18834 fi
18835
18836                 ;;
18837         esac
18838         ;;
18839 esac
18840
18841 if test "$with_dmalloc" = yes ; then
18842         echo "$as_me:18842: checking for dmalloc.h" >&5
18843 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18844 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18845   echo $ECHO_N "(cached) $ECHO_C" >&6
18846 else
18847   cat >"conftest.$ac_ext" <<_ACEOF
18848 #line 18848 "configure"
18849 #include "confdefs.h"
18850 #include <dmalloc.h>
18851 _ACEOF
18852 if { (eval echo "$as_me:18852: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18853   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18854   ac_status=$?
18855   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18856   rm -f conftest.er1
18857   cat conftest.err >&5
18858   echo "$as_me:18858: \$? = $ac_status" >&5
18859   (exit "$ac_status"); } >/dev/null; then
18860   if test -s conftest.err; then
18861     ac_cpp_err=$ac_c_preproc_warn_flag
18862   else
18863     ac_cpp_err=
18864   fi
18865 else
18866   ac_cpp_err=yes
18867 fi
18868 if test -z "$ac_cpp_err"; then
18869   ac_cv_header_dmalloc_h=yes
18870 else
18871   echo "$as_me: failed program was:" >&5
18872   cat "conftest.$ac_ext" >&5
18873   ac_cv_header_dmalloc_h=no
18874 fi
18875 rm -f conftest.err "conftest.$ac_ext"
18876 fi
18877 echo "$as_me:18877: result: $ac_cv_header_dmalloc_h" >&5
18878 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18879 if test "$ac_cv_header_dmalloc_h" = yes; then
18880
18881 echo "$as_me:18881: checking for dmalloc_debug in -ldmalloc" >&5
18882 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18883 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18884   echo $ECHO_N "(cached) $ECHO_C" >&6
18885 else
18886   ac_check_lib_save_LIBS=$LIBS
18887 LIBS="-ldmalloc  $LIBS"
18888 cat >"conftest.$ac_ext" <<_ACEOF
18889 #line 18889 "configure"
18890 #include "confdefs.h"
18891
18892 /* Override any gcc2 internal prototype to avoid an error.  */
18893 #ifdef __cplusplus
18894 extern "C"
18895 #endif
18896 /* We use char because int might match the return type of a gcc2
18897    builtin and then its argument prototype would still apply.  */
18898 char dmalloc_debug (void);
18899 int
18900 main (void)
18901 {
18902 dmalloc_debug ();
18903   ;
18904   return 0;
18905 }
18906 _ACEOF
18907 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18908 if { (eval echo "$as_me:18908: \"$ac_link\"") >&5
18909   (eval $ac_link) 2>&5
18910   ac_status=$?
18911   echo "$as_me:18911: \$? = $ac_status" >&5
18912   (exit "$ac_status"); } &&
18913          { ac_try='test -s "conftest$ac_exeext"'
18914   { (eval echo "$as_me:18914: \"$ac_try\"") >&5
18915   (eval $ac_try) 2>&5
18916   ac_status=$?
18917   echo "$as_me:18917: \$? = $ac_status" >&5
18918   (exit "$ac_status"); }; }; then
18919   ac_cv_lib_dmalloc_dmalloc_debug=yes
18920 else
18921   echo "$as_me: failed program was:" >&5
18922 cat "conftest.$ac_ext" >&5
18923 ac_cv_lib_dmalloc_dmalloc_debug=no
18924 fi
18925 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18926 LIBS=$ac_check_lib_save_LIBS
18927 fi
18928 echo "$as_me:18928: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18929 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18930 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18931   cat >>confdefs.h <<EOF
18932 #define HAVE_LIBDMALLOC 1
18933 EOF
18934
18935   LIBS="-ldmalloc $LIBS"
18936
18937 fi
18938
18939 fi
18940
18941 fi
18942
18943 echo "$as_me:18943: checking if you want to use dbmalloc for testing" >&5
18944 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18945
18946 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18947 if test "${with_dbmalloc+set}" = set; then
18948   withval="$with_dbmalloc"
18949   case "x$withval" in
18950         (x|xno) ;;
18951         (*)
18952                 : "${with_cflags:=-g}"
18953                 : "${enable_leaks:=no}"
18954                 with_dbmalloc=yes
18955
18956 cat >>confdefs.h <<EOF
18957 #define USE_DBMALLOC 1
18958 EOF
18959
18960                 ;;
18961         esac
18962 else
18963   with_dbmalloc=
18964 fi;
18965 echo "$as_me:18965: result: ${with_dbmalloc:-no}" >&5
18966 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18967
18968 case ".$with_cflags" in
18969 (.*-g*)
18970         case .$CFLAGS in
18971         (.*-g*)
18972                 ;;
18973         (*)
18974
18975 cf_fix_cppflags=no
18976 cf_new_cflags=
18977 cf_new_cppflags=
18978 cf_new_extra_cppflags=
18979
18980 for cf_add_cflags in -g
18981 do
18982 case "$cf_fix_cppflags" in
18983 (no)
18984         case "$cf_add_cflags" in
18985         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18986                 case "$cf_add_cflags" in
18987                 (-D*)
18988                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18989
18990                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18991                                 && test -z "${cf_tst_cflags}" \
18992                                 && cf_fix_cppflags=yes
18993
18994                         if test "$cf_fix_cppflags" = yes ; then
18995
18996         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18997         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18998
18999                                 continue
19000                         elif test "${cf_tst_cflags}" = "\"'" ; then
19001
19002         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19003         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19004
19005                                 continue
19006                         fi
19007                         ;;
19008                 esac
19009                 case "$CPPFLAGS" in
19010                 (*$cf_add_cflags)
19011                         ;;
19012                 (*)
19013                         case "$cf_add_cflags" in
19014                         (-D*)
19015                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19016
19017 CPPFLAGS=`echo "$CPPFLAGS" | \
19018         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19019                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19020
19021                                 ;;
19022                         esac
19023
19024         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19025         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19026
19027                         ;;
19028                 esac
19029                 ;;
19030         (*)
19031
19032         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19033         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19034
19035                 ;;
19036         esac
19037         ;;
19038 (yes)
19039
19040         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19041         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19042
19043         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19044
19045         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19046                 && test -z "${cf_tst_cflags}" \
19047                 && cf_fix_cppflags=no
19048         ;;
19049 esac
19050 done
19051
19052 if test -n "$cf_new_cflags" ; then
19053
19054         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19055         CFLAGS="${CFLAGS}$cf_new_cflags"
19056
19057 fi
19058
19059 if test -n "$cf_new_cppflags" ; then
19060
19061         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19062         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19063
19064 fi
19065
19066 if test -n "$cf_new_extra_cppflags" ; then
19067
19068         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19069         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19070
19071 fi
19072
19073                 ;;
19074         esac
19075         ;;
19076 esac
19077
19078 if test "$with_dbmalloc" = yes ; then
19079         echo "$as_me:19079: checking for dbmalloc.h" >&5
19080 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19081 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19082   echo $ECHO_N "(cached) $ECHO_C" >&6
19083 else
19084   cat >"conftest.$ac_ext" <<_ACEOF
19085 #line 19085 "configure"
19086 #include "confdefs.h"
19087 #include <dbmalloc.h>
19088 _ACEOF
19089 if { (eval echo "$as_me:19089: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19090   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19091   ac_status=$?
19092   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19093   rm -f conftest.er1
19094   cat conftest.err >&5
19095   echo "$as_me:19095: \$? = $ac_status" >&5
19096   (exit "$ac_status"); } >/dev/null; then
19097   if test -s conftest.err; then
19098     ac_cpp_err=$ac_c_preproc_warn_flag
19099   else
19100     ac_cpp_err=
19101   fi
19102 else
19103   ac_cpp_err=yes
19104 fi
19105 if test -z "$ac_cpp_err"; then
19106   ac_cv_header_dbmalloc_h=yes
19107 else
19108   echo "$as_me: failed program was:" >&5
19109   cat "conftest.$ac_ext" >&5
19110   ac_cv_header_dbmalloc_h=no
19111 fi
19112 rm -f conftest.err "conftest.$ac_ext"
19113 fi
19114 echo "$as_me:19114: result: $ac_cv_header_dbmalloc_h" >&5
19115 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
19116 if test "$ac_cv_header_dbmalloc_h" = yes; then
19117
19118 echo "$as_me:19118: checking for debug_malloc in -ldbmalloc" >&5
19119 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
19120 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
19121   echo $ECHO_N "(cached) $ECHO_C" >&6
19122 else
19123   ac_check_lib_save_LIBS=$LIBS
19124 LIBS="-ldbmalloc  $LIBS"
19125 cat >"conftest.$ac_ext" <<_ACEOF
19126 #line 19126 "configure"
19127 #include "confdefs.h"
19128
19129 /* Override any gcc2 internal prototype to avoid an error.  */
19130 #ifdef __cplusplus
19131 extern "C"
19132 #endif
19133 /* We use char because int might match the return type of a gcc2
19134    builtin and then its argument prototype would still apply.  */
19135 char debug_malloc (void);
19136 int
19137 main (void)
19138 {
19139 debug_malloc ();
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19145 if { (eval echo "$as_me:19145: \"$ac_link\"") >&5
19146   (eval $ac_link) 2>&5
19147   ac_status=$?
19148   echo "$as_me:19148: \$? = $ac_status" >&5
19149   (exit "$ac_status"); } &&
19150          { ac_try='test -s "conftest$ac_exeext"'
19151   { (eval echo "$as_me:19151: \"$ac_try\"") >&5
19152   (eval $ac_try) 2>&5
19153   ac_status=$?
19154   echo "$as_me:19154: \$? = $ac_status" >&5
19155   (exit "$ac_status"); }; }; then
19156   ac_cv_lib_dbmalloc_debug_malloc=yes
19157 else
19158   echo "$as_me: failed program was:" >&5
19159 cat "conftest.$ac_ext" >&5
19160 ac_cv_lib_dbmalloc_debug_malloc=no
19161 fi
19162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19163 LIBS=$ac_check_lib_save_LIBS
19164 fi
19165 echo "$as_me:19165: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
19166 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
19167 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
19168   cat >>confdefs.h <<EOF
19169 #define HAVE_LIBDBMALLOC 1
19170 EOF
19171
19172   LIBS="-ldbmalloc $LIBS"
19173
19174 fi
19175
19176 fi
19177
19178 fi
19179
19180 echo "$as_me:19180: checking if you want to use valgrind for testing" >&5
19181 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
19182
19183 # Check whether --with-valgrind or --without-valgrind was given.
19184 if test "${with_valgrind+set}" = set; then
19185   withval="$with_valgrind"
19186   case "x$withval" in
19187         (x|xno) ;;
19188         (*)
19189                 : "${with_cflags:=-g}"
19190                 : "${enable_leaks:=no}"
19191                 with_valgrind=yes
19192
19193 cat >>confdefs.h <<EOF
19194 #define USE_VALGRIND 1
19195 EOF
19196
19197                 ;;
19198         esac
19199 else
19200   with_valgrind=
19201 fi;
19202 echo "$as_me:19202: result: ${with_valgrind:-no}" >&5
19203 echo "${ECHO_T}${with_valgrind:-no}" >&6
19204
19205 case ".$with_cflags" in
19206 (.*-g*)
19207         case .$CFLAGS in
19208         (.*-g*)
19209                 ;;
19210         (*)
19211
19212 cf_fix_cppflags=no
19213 cf_new_cflags=
19214 cf_new_cppflags=
19215 cf_new_extra_cppflags=
19216
19217 for cf_add_cflags in -g
19218 do
19219 case "$cf_fix_cppflags" in
19220 (no)
19221         case "$cf_add_cflags" in
19222         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19223                 case "$cf_add_cflags" in
19224                 (-D*)
19225                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19226
19227                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19228                                 && test -z "${cf_tst_cflags}" \
19229                                 && cf_fix_cppflags=yes
19230
19231                         if test "$cf_fix_cppflags" = yes ; then
19232
19233         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19234         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19235
19236                                 continue
19237                         elif test "${cf_tst_cflags}" = "\"'" ; then
19238
19239         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19240         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19241
19242                                 continue
19243                         fi
19244                         ;;
19245                 esac
19246                 case "$CPPFLAGS" in
19247                 (*$cf_add_cflags)
19248                         ;;
19249                 (*)
19250                         case "$cf_add_cflags" in
19251                         (-D*)
19252                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19253
19254 CPPFLAGS=`echo "$CPPFLAGS" | \
19255         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19256                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19257
19258                                 ;;
19259                         esac
19260
19261         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19262         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19263
19264                         ;;
19265                 esac
19266                 ;;
19267         (*)
19268
19269         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19270         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19271
19272                 ;;
19273         esac
19274         ;;
19275 (yes)
19276
19277         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19278         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19279
19280         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19281
19282         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19283                 && test -z "${cf_tst_cflags}" \
19284                 && cf_fix_cppflags=no
19285         ;;
19286 esac
19287 done
19288
19289 if test -n "$cf_new_cflags" ; then
19290
19291         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19292         CFLAGS="${CFLAGS}$cf_new_cflags"
19293
19294 fi
19295
19296 if test -n "$cf_new_cppflags" ; then
19297
19298         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19299         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19300
19301 fi
19302
19303 if test -n "$cf_new_extra_cppflags" ; then
19304
19305         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19306         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19307
19308 fi
19309
19310                 ;;
19311         esac
19312         ;;
19313 esac
19314
19315 echo "$as_me:19315: checking if you want to perform memory-leak testing" >&5
19316 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
19317
19318 # Check whether --enable-leaks or --disable-leaks was given.
19319 if test "${enable_leaks+set}" = set; then
19320   enableval="$enable_leaks"
19321   enable_leaks=$enableval
19322 else
19323   enable_leaks=yes
19324 fi;
19325 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19326 echo "$as_me:19326: result: $with_no_leaks" >&5
19327 echo "${ECHO_T}$with_no_leaks" >&6
19328
19329 if test "$enable_leaks" = no ; then
19330
19331 cat >>confdefs.h <<\EOF
19332 #define NO_LEAKS 1
19333 EOF
19334
19335 cat >>confdefs.h <<\EOF
19336 #define YY_NO_LEAKS 1
19337 EOF
19338
19339 fi
19340
19341 cat >>confdefs.h <<\EOF
19342 #define HAVE_NC_ALLOC_H 1
19343 EOF
19344
19345 ###     use option --enable-expanded to generate certain macros as functions
19346
19347 # Check whether --enable-expanded or --disable-expanded was given.
19348 if test "${enable_expanded+set}" = set; then
19349   enableval="$enable_expanded"
19350   test "x$enableval" = xyes &&
19351 cat >>confdefs.h <<\EOF
19352 #define NCURSES_EXPANDED 1
19353 EOF
19354
19355 fi;
19356
19357 ###     use option --disable-macros to suppress macros in favor of functions
19358
19359 # Check whether --enable-macros or --disable-macros was given.
19360 if test "${enable_macros+set}" = set; then
19361   enableval="$enable_macros"
19362   test "$enableval" = no &&
19363 cat >>confdefs.h <<\EOF
19364 #define NCURSES_NOMACROS 1
19365 EOF
19366
19367 fi;
19368
19369 # Normally we only add trace() to the debug-library.  Allow this to be
19370 # extended to all models of the ncurses library:
19371 cf_all_traces=no
19372 case "$CFLAGS $CPPFLAGS" in
19373 (*-DTRACE*)
19374         cf_all_traces=yes
19375         ;;
19376 esac
19377
19378 echo "$as_me:19378: checking whether to add trace feature to all models" >&5
19379 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19380
19381 # Check whether --with-trace or --without-trace was given.
19382 if test "${with_trace+set}" = set; then
19383   withval="$with_trace"
19384   cf_with_trace=$withval
19385 else
19386   cf_with_trace=$cf_all_traces
19387 fi;
19388 echo "$as_me:19388: result: $cf_with_trace" >&5
19389 echo "${ECHO_T}$cf_with_trace" >&6
19390
19391 if test "x$cf_with_trace" = xyes ; then
19392         LIB_TRACING=all
19393         ADA_TRACE=TRUE
19394
19395 cat >>confdefs.h <<\EOF
19396 #define TRACE 1
19397 EOF
19398
19399 cat >>confdefs.h <<\EOF
19400 #define HAVE__TRACEF 1
19401 EOF
19402
19403 else
19404         LIB_TRACING=DEBUG
19405         ADA_TRACE=FALSE
19406 fi
19407
19408 echo "$as_me:19408: checking if we want to use GNAT projects" >&5
19409 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19410
19411 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19412 if test "${enable_gnat_projects+set}" = set; then
19413   enableval="$enable_gnat_projects"
19414   test "$enableval" != no && enableval=yes
19415         if test "$enableval" != "yes" ; then
19416     enable_gnat_projects=no
19417         else
19418                 enable_gnat_projects=yes
19419         fi
19420 else
19421   enableval=yes
19422         enable_gnat_projects=yes
19423
19424 fi;
19425 echo "$as_me:19425: result: $enable_gnat_projects" >&5
19426 echo "${ECHO_T}$enable_gnat_projects" >&6
19427
19428 ###     Checks for libraries.
19429 case "$cf_cv_system_name" in
19430 (*mingw32*|*mingw64*)
19431         # Note: WINVER may be a problem with Windows 10
19432         if test "x$with_exp_win32" = xyes ; then
19433                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19434         else
19435                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19436         fi
19437
19438 echo "$as_me:19438: checking if ssp library is needed" >&5
19439 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19440 if test "${cf_cv_need_libssp+set}" = set; then
19441   echo $ECHO_N "(cached) $ECHO_C" >&6
19442 else
19443
19444 cat >"conftest.$ac_ext" <<_ACEOF
19445 #line 19445 "configure"
19446 #include "confdefs.h"
19447
19448 #include <sys/types.h>
19449 #include <dirent.h>
19450
19451 int
19452 main (void)
19453 {
19454
19455        DIR *dp = opendir(".");
19456
19457   ;
19458   return 0;
19459 }
19460 _ACEOF
19461 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19462 if { (eval echo "$as_me:19462: \"$ac_link\"") >&5
19463   (eval $ac_link) 2>&5
19464   ac_status=$?
19465   echo "$as_me:19465: \$? = $ac_status" >&5
19466   (exit "$ac_status"); } &&
19467          { ac_try='test -s "conftest$ac_exeext"'
19468   { (eval echo "$as_me:19468: \"$ac_try\"") >&5
19469   (eval $ac_try) 2>&5
19470   ac_status=$?
19471   echo "$as_me:19471: \$? = $ac_status" >&5
19472   (exit "$ac_status"); }; }; then
19473   cf_cv_need_libssp=no
19474 else
19475   echo "$as_me: failed program was:" >&5
19476 cat "conftest.$ac_ext" >&5
19477
19478         cf_save_LIBS="$LIBS"
19479         LIBS="$LIBS -lssp"
19480         cat >"conftest.$ac_ext" <<_ACEOF
19481 #line 19481 "configure"
19482 #include "confdefs.h"
19483
19484 #include <sys/types.h>
19485 #include <dirent.h>
19486
19487 int
19488 main (void)
19489 {
19490
19491                    DIR *dp = opendir(".");
19492
19493   ;
19494   return 0;
19495 }
19496 _ACEOF
19497 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19498 if { (eval echo "$as_me:19498: \"$ac_link\"") >&5
19499   (eval $ac_link) 2>&5
19500   ac_status=$?
19501   echo "$as_me:19501: \$? = $ac_status" >&5
19502   (exit "$ac_status"); } &&
19503          { ac_try='test -s "conftest$ac_exeext"'
19504   { (eval echo "$as_me:19504: \"$ac_try\"") >&5
19505   (eval $ac_try) 2>&5
19506   ac_status=$?
19507   echo "$as_me:19507: \$? = $ac_status" >&5
19508   (exit "$ac_status"); }; }; then
19509   cf_cv_need_libssp=yes
19510 else
19511   echo "$as_me: failed program was:" >&5
19512 cat "conftest.$ac_ext" >&5
19513 cf_cv_need_libssp=maybe
19514 fi
19515 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19516         LIBS="$cf_save_LIBS"
19517
19518 fi
19519 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19520 fi
19521 echo "$as_me:19521: result: $cf_cv_need_libssp" >&5
19522 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19523
19524 if test "x$cf_cv_need_libssp" = xyes
19525 then
19526
19527 cf_add_libs="$LIBS"
19528 # reverse order
19529 cf_add_0lib=
19530 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19531 # filter duplicates
19532 for cf_add_1lib in $cf_add_0lib; do
19533         for cf_add_2lib in $cf_add_libs; do
19534                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19535                         cf_add_1lib=
19536                         break
19537                 fi
19538         done
19539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19540 done
19541 LIBS="$cf_add_libs"
19542
19543 fi
19544
19545         ;;
19546 (*)
19547         ;;
19548 esac
19549
19550 echo "$as_me:19550: checking if -lm needed for math functions" >&5
19551 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19552 if test "${cf_cv_need_libm+set}" = set; then
19553   echo $ECHO_N "(cached) $ECHO_C" >&6
19554 else
19555
19556         cat >"conftest.$ac_ext" <<_ACEOF
19557 #line 19557 "configure"
19558 #include "confdefs.h"
19559
19560                 #include <stdio.h>
19561                 #include <stdlib.h>
19562                 #include <math.h>
19563
19564 int
19565 main (void)
19566 {
19567 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19568   ;
19569   return 0;
19570 }
19571 _ACEOF
19572 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19573 if { (eval echo "$as_me:19573: \"$ac_link\"") >&5
19574   (eval $ac_link) 2>&5
19575   ac_status=$?
19576   echo "$as_me:19576: \$? = $ac_status" >&5
19577   (exit "$ac_status"); } &&
19578          { ac_try='test -s "conftest$ac_exeext"'
19579   { (eval echo "$as_me:19579: \"$ac_try\"") >&5
19580   (eval $ac_try) 2>&5
19581   ac_status=$?
19582   echo "$as_me:19582: \$? = $ac_status" >&5
19583   (exit "$ac_status"); }; }; then
19584   cf_cv_need_libm=no
19585 else
19586   echo "$as_me: failed program was:" >&5
19587 cat "conftest.$ac_ext" >&5
19588 cf_cv_need_libm=yes
19589 fi
19590 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19591 fi
19592 echo "$as_me:19592: result: $cf_cv_need_libm" >&5
19593 echo "${ECHO_T}$cf_cv_need_libm" >&6
19594
19595 if test "$cf_cv_need_libm" = yes
19596 then
19597
19598         cf_save_LIBS="$LIBS"
19599         LIBS="$LIBS -lm"
19600         echo "$as_me:19600: checking if -lm is available for math functions" >&5
19601 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19602 if test "${cf_cv_have_libm+set}" = set; then
19603   echo $ECHO_N "(cached) $ECHO_C" >&6
19604 else
19605
19606         cat >"conftest.$ac_ext" <<_ACEOF
19607 #line 19607 "configure"
19608 #include "confdefs.h"
19609
19610                 #include <stdio.h>
19611                 #include <stdlib.h>
19612                 #include <math.h>
19613
19614 int
19615 main (void)
19616 {
19617 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19618   ;
19619   return 0;
19620 }
19621 _ACEOF
19622 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19623 if { (eval echo "$as_me:19623: \"$ac_link\"") >&5
19624   (eval $ac_link) 2>&5
19625   ac_status=$?
19626   echo "$as_me:19626: \$? = $ac_status" >&5
19627   (exit "$ac_status"); } &&
19628          { ac_try='test -s "conftest$ac_exeext"'
19629   { (eval echo "$as_me:19629: \"$ac_try\"") >&5
19630   (eval $ac_try) 2>&5
19631   ac_status=$?
19632   echo "$as_me:19632: \$? = $ac_status" >&5
19633   (exit "$ac_status"); }; }; then
19634   cf_cv_have_libm=yes
19635 else
19636   echo "$as_me: failed program was:" >&5
19637 cat "conftest.$ac_ext" >&5
19638 cf_cv_have_libm=no
19639 fi
19640 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19641 fi
19642 echo "$as_me:19642: result: $cf_cv_have_libm" >&5
19643 echo "${ECHO_T}$cf_cv_have_libm" >&6
19644         LIBS="$cf_save_LIBS"
19645
19646         if test "$cf_cv_have_libm" = yes
19647         then
19648                 MATH_LIB=-lm
19649         fi
19650 else
19651         cf_cv_have_libm=yes
19652 fi
19653
19654 if test "$cf_cv_have_libm" = yes
19655 then
19656
19657 cat >>confdefs.h <<\EOF
19658 #define HAVE_MATH_FUNCS 1
19659 EOF
19660
19661 fi
19662
19663 ###     Checks for header files.
19664 echo "$as_me:19664: checking whether time.h and sys/time.h may both be included" >&5
19665 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19666 if test "${ac_cv_header_time+set}" = set; then
19667   echo $ECHO_N "(cached) $ECHO_C" >&6
19668 else
19669   cat >"conftest.$ac_ext" <<_ACEOF
19670 #line 19670 "configure"
19671 #include "confdefs.h"
19672 #include <sys/types.h>
19673 #include <sys/time.h>
19674 #include <time.h>
19675
19676 int
19677 main (void)
19678 {
19679 if ((struct tm *) 0)
19680 return 0;
19681   ;
19682   return 0;
19683 }
19684 _ACEOF
19685 rm -f "conftest.$ac_objext"
19686 if { (eval echo "$as_me:19686: \"$ac_compile\"") >&5
19687   (eval $ac_compile) 2>&5
19688   ac_status=$?
19689   echo "$as_me:19689: \$? = $ac_status" >&5
19690   (exit "$ac_status"); } &&
19691          { ac_try='test -s "conftest.$ac_objext"'
19692   { (eval echo "$as_me:19692: \"$ac_try\"") >&5
19693   (eval $ac_try) 2>&5
19694   ac_status=$?
19695   echo "$as_me:19695: \$? = $ac_status" >&5
19696   (exit "$ac_status"); }; }; then
19697   ac_cv_header_time=yes
19698 else
19699   echo "$as_me: failed program was:" >&5
19700 cat "conftest.$ac_ext" >&5
19701 ac_cv_header_time=no
19702 fi
19703 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19704 fi
19705 echo "$as_me:19705: result: $ac_cv_header_time" >&5
19706 echo "${ECHO_T}$ac_cv_header_time" >&6
19707 if test $ac_cv_header_time = yes; then
19708
19709 cat >>confdefs.h <<\EOF
19710 #define TIME_WITH_SYS_TIME 1
19711 EOF
19712
19713 fi
19714
19715 cf_regex_func=no
19716 cf_regex_libs=
19717 case "$host_os" in
19718 (mingw*)
19719         # -lsystre -ltre -lintl -liconv
19720         echo "$as_me:19720: checking for regcomp in -lsystre" >&5
19721 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19722 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19723   echo $ECHO_N "(cached) $ECHO_C" >&6
19724 else
19725   ac_check_lib_save_LIBS=$LIBS
19726 LIBS="-lsystre  $LIBS"
19727 cat >"conftest.$ac_ext" <<_ACEOF
19728 #line 19728 "configure"
19729 #include "confdefs.h"
19730
19731 /* Override any gcc2 internal prototype to avoid an error.  */
19732 #ifdef __cplusplus
19733 extern "C"
19734 #endif
19735 /* We use char because int might match the return type of a gcc2
19736    builtin and then its argument prototype would still apply.  */
19737 char regcomp (void);
19738 int
19739 main (void)
19740 {
19741 regcomp ();
19742   ;
19743   return 0;
19744 }
19745 _ACEOF
19746 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19747 if { (eval echo "$as_me:19747: \"$ac_link\"") >&5
19748   (eval $ac_link) 2>&5
19749   ac_status=$?
19750   echo "$as_me:19750: \$? = $ac_status" >&5
19751   (exit "$ac_status"); } &&
19752          { ac_try='test -s "conftest$ac_exeext"'
19753   { (eval echo "$as_me:19753: \"$ac_try\"") >&5
19754   (eval $ac_try) 2>&5
19755   ac_status=$?
19756   echo "$as_me:19756: \$? = $ac_status" >&5
19757   (exit "$ac_status"); }; }; then
19758   ac_cv_lib_systre_regcomp=yes
19759 else
19760   echo "$as_me: failed program was:" >&5
19761 cat "conftest.$ac_ext" >&5
19762 ac_cv_lib_systre_regcomp=no
19763 fi
19764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19765 LIBS=$ac_check_lib_save_LIBS
19766 fi
19767 echo "$as_me:19767: result: $ac_cv_lib_systre_regcomp" >&5
19768 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19769 if test "$ac_cv_lib_systre_regcomp" = yes; then
19770
19771                 echo "$as_me:19771: checking for libiconv_open in -liconv" >&5
19772 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19773 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19774   echo $ECHO_N "(cached) $ECHO_C" >&6
19775 else
19776   ac_check_lib_save_LIBS=$LIBS
19777 LIBS="-liconv  $LIBS"
19778 cat >"conftest.$ac_ext" <<_ACEOF
19779 #line 19779 "configure"
19780 #include "confdefs.h"
19781
19782 /* Override any gcc2 internal prototype to avoid an error.  */
19783 #ifdef __cplusplus
19784 extern "C"
19785 #endif
19786 /* We use char because int might match the return type of a gcc2
19787    builtin and then its argument prototype would still apply.  */
19788 char libiconv_open (void);
19789 int
19790 main (void)
19791 {
19792 libiconv_open ();
19793   ;
19794   return 0;
19795 }
19796 _ACEOF
19797 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19798 if { (eval echo "$as_me:19798: \"$ac_link\"") >&5
19799   (eval $ac_link) 2>&5
19800   ac_status=$?
19801   echo "$as_me:19801: \$? = $ac_status" >&5
19802   (exit "$ac_status"); } &&
19803          { ac_try='test -s "conftest$ac_exeext"'
19804   { (eval echo "$as_me:19804: \"$ac_try\"") >&5
19805   (eval $ac_try) 2>&5
19806   ac_status=$?
19807   echo "$as_me:19807: \$? = $ac_status" >&5
19808   (exit "$ac_status"); }; }; then
19809   ac_cv_lib_iconv_libiconv_open=yes
19810 else
19811   echo "$as_me: failed program was:" >&5
19812 cat "conftest.$ac_ext" >&5
19813 ac_cv_lib_iconv_libiconv_open=no
19814 fi
19815 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19816 LIBS=$ac_check_lib_save_LIBS
19817 fi
19818 echo "$as_me:19818: result: $ac_cv_lib_iconv_libiconv_open" >&5
19819 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19820 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19821
19822 cf_add_libs="$LIBS"
19823 # reverse order
19824 cf_add_0lib=
19825 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19826 # filter duplicates
19827 for cf_add_1lib in $cf_add_0lib; do
19828         for cf_add_2lib in $cf_add_libs; do
19829                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19830                         cf_add_1lib=
19831                         break
19832                 fi
19833         done
19834         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19835 done
19836 LIBS="$cf_add_libs"
19837
19838 fi
19839
19840                 echo "$as_me:19840: checking for libintl_gettext in -lintl" >&5
19841 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19842 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19843   echo $ECHO_N "(cached) $ECHO_C" >&6
19844 else
19845   ac_check_lib_save_LIBS=$LIBS
19846 LIBS="-lintl  $LIBS"
19847 cat >"conftest.$ac_ext" <<_ACEOF
19848 #line 19848 "configure"
19849 #include "confdefs.h"
19850
19851 /* Override any gcc2 internal prototype to avoid an error.  */
19852 #ifdef __cplusplus
19853 extern "C"
19854 #endif
19855 /* We use char because int might match the return type of a gcc2
19856    builtin and then its argument prototype would still apply.  */
19857 char libintl_gettext (void);
19858 int
19859 main (void)
19860 {
19861 libintl_gettext ();
19862   ;
19863   return 0;
19864 }
19865 _ACEOF
19866 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19867 if { (eval echo "$as_me:19867: \"$ac_link\"") >&5
19868   (eval $ac_link) 2>&5
19869   ac_status=$?
19870   echo "$as_me:19870: \$? = $ac_status" >&5
19871   (exit "$ac_status"); } &&
19872          { ac_try='test -s "conftest$ac_exeext"'
19873   { (eval echo "$as_me:19873: \"$ac_try\"") >&5
19874   (eval $ac_try) 2>&5
19875   ac_status=$?
19876   echo "$as_me:19876: \$? = $ac_status" >&5
19877   (exit "$ac_status"); }; }; then
19878   ac_cv_lib_intl_libintl_gettext=yes
19879 else
19880   echo "$as_me: failed program was:" >&5
19881 cat "conftest.$ac_ext" >&5
19882 ac_cv_lib_intl_libintl_gettext=no
19883 fi
19884 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19885 LIBS=$ac_check_lib_save_LIBS
19886 fi
19887 echo "$as_me:19887: result: $ac_cv_lib_intl_libintl_gettext" >&5
19888 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19889 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19890
19891 cf_add_libs="$LIBS"
19892 # reverse order
19893 cf_add_0lib=
19894 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19895 # filter duplicates
19896 for cf_add_1lib in $cf_add_0lib; do
19897         for cf_add_2lib in $cf_add_libs; do
19898                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19899                         cf_add_1lib=
19900                         break
19901                 fi
19902         done
19903         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19904 done
19905 LIBS="$cf_add_libs"
19906
19907 fi
19908
19909                 echo "$as_me:19909: checking for tre_regcomp in -ltre" >&5
19910 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19911 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19912   echo $ECHO_N "(cached) $ECHO_C" >&6
19913 else
19914   ac_check_lib_save_LIBS=$LIBS
19915 LIBS="-ltre  $LIBS"
19916 cat >"conftest.$ac_ext" <<_ACEOF
19917 #line 19917 "configure"
19918 #include "confdefs.h"
19919
19920 /* Override any gcc2 internal prototype to avoid an error.  */
19921 #ifdef __cplusplus
19922 extern "C"
19923 #endif
19924 /* We use char because int might match the return type of a gcc2
19925    builtin and then its argument prototype would still apply.  */
19926 char tre_regcomp (void);
19927 int
19928 main (void)
19929 {
19930 tre_regcomp ();
19931   ;
19932   return 0;
19933 }
19934 _ACEOF
19935 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19936 if { (eval echo "$as_me:19936: \"$ac_link\"") >&5
19937   (eval $ac_link) 2>&5
19938   ac_status=$?
19939   echo "$as_me:19939: \$? = $ac_status" >&5
19940   (exit "$ac_status"); } &&
19941          { ac_try='test -s "conftest$ac_exeext"'
19942   { (eval echo "$as_me:19942: \"$ac_try\"") >&5
19943   (eval $ac_try) 2>&5
19944   ac_status=$?
19945   echo "$as_me:19945: \$? = $ac_status" >&5
19946   (exit "$ac_status"); }; }; then
19947   ac_cv_lib_tre_tre_regcomp=yes
19948 else
19949   echo "$as_me: failed program was:" >&5
19950 cat "conftest.$ac_ext" >&5
19951 ac_cv_lib_tre_tre_regcomp=no
19952 fi
19953 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19954 LIBS=$ac_check_lib_save_LIBS
19955 fi
19956 echo "$as_me:19956: result: $ac_cv_lib_tre_tre_regcomp" >&5
19957 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19958 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19959
19960 cf_add_libs="$LIBS"
19961 # reverse order
19962 cf_add_0lib=
19963 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19964 # filter duplicates
19965 for cf_add_1lib in $cf_add_0lib; do
19966         for cf_add_2lib in $cf_add_libs; do
19967                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19968                         cf_add_1lib=
19969                         break
19970                 fi
19971         done
19972         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19973 done
19974 LIBS="$cf_add_libs"
19975
19976 fi
19977
19978 cf_add_libs="$LIBS"
19979 # reverse order
19980 cf_add_0lib=
19981 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19982 # filter duplicates
19983 for cf_add_1lib in $cf_add_0lib; do
19984         for cf_add_2lib in $cf_add_libs; do
19985                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19986                         cf_add_1lib=
19987                         break
19988                 fi
19989         done
19990         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19991 done
19992 LIBS="$cf_add_libs"
19993
19994                 cf_regex_func=regcomp
19995
19996 else
19997
19998                 echo "$as_me:19998: checking for regcomp in -lgnurx" >&5
19999 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
20000 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
20001   echo $ECHO_N "(cached) $ECHO_C" >&6
20002 else
20003   ac_check_lib_save_LIBS=$LIBS
20004 LIBS="-lgnurx  $LIBS"
20005 cat >"conftest.$ac_ext" <<_ACEOF
20006 #line 20006 "configure"
20007 #include "confdefs.h"
20008
20009 /* Override any gcc2 internal prototype to avoid an error.  */
20010 #ifdef __cplusplus
20011 extern "C"
20012 #endif
20013 /* We use char because int might match the return type of a gcc2
20014    builtin and then its argument prototype would still apply.  */
20015 char regcomp (void);
20016 int
20017 main (void)
20018 {
20019 regcomp ();
20020   ;
20021   return 0;
20022 }
20023 _ACEOF
20024 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20025 if { (eval echo "$as_me:20025: \"$ac_link\"") >&5
20026   (eval $ac_link) 2>&5
20027   ac_status=$?
20028   echo "$as_me:20028: \$? = $ac_status" >&5
20029   (exit "$ac_status"); } &&
20030          { ac_try='test -s "conftest$ac_exeext"'
20031   { (eval echo "$as_me:20031: \"$ac_try\"") >&5
20032   (eval $ac_try) 2>&5
20033   ac_status=$?
20034   echo "$as_me:20034: \$? = $ac_status" >&5
20035   (exit "$ac_status"); }; }; then
20036   ac_cv_lib_gnurx_regcomp=yes
20037 else
20038   echo "$as_me: failed program was:" >&5
20039 cat "conftest.$ac_ext" >&5
20040 ac_cv_lib_gnurx_regcomp=no
20041 fi
20042 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20043 LIBS=$ac_check_lib_save_LIBS
20044 fi
20045 echo "$as_me:20045: result: $ac_cv_lib_gnurx_regcomp" >&5
20046 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
20047 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
20048
20049 cf_add_libs="$LIBS"
20050 # reverse order
20051 cf_add_0lib=
20052 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20053 # filter duplicates
20054 for cf_add_1lib in $cf_add_0lib; do
20055         for cf_add_2lib in $cf_add_libs; do
20056                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20057                         cf_add_1lib=
20058                         break
20059                 fi
20060         done
20061         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20062 done
20063 LIBS="$cf_add_libs"
20064
20065                         cf_regex_func=regcomp
20066 fi
20067
20068 fi
20069
20070         ;;
20071 (*)
20072         cf_regex_libs="regex re"
20073         echo "$as_me:20073: checking for regcomp" >&5
20074 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
20075 if test "${ac_cv_func_regcomp+set}" = set; then
20076   echo $ECHO_N "(cached) $ECHO_C" >&6
20077 else
20078   cat >"conftest.$ac_ext" <<_ACEOF
20079 #line 20079 "configure"
20080 #include "confdefs.h"
20081 #define regcomp autoconf_temporary
20082 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20083 #undef regcomp
20084
20085 #ifdef __cplusplus
20086 extern "C"
20087 #endif
20088
20089 /* We use char because int might match the return type of a gcc2
20090    builtin and then its argument prototype would still apply.  */
20091 char regcomp (void);
20092
20093 int
20094 main (void)
20095 {
20096
20097 /* The GNU C library defines stubs for functions which it implements
20098     to always fail with ENOSYS.  Some functions are actually named
20099     something starting with __ and the normal name is an alias.  */
20100 #if defined (__stub_regcomp) || defined (__stub___regcomp)
20101 #error found stub for regcomp
20102 #endif
20103
20104         return regcomp ();
20105   ;
20106   return 0;
20107 }
20108 _ACEOF
20109 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20110 if { (eval echo "$as_me:20110: \"$ac_link\"") >&5
20111   (eval $ac_link) 2>&5
20112   ac_status=$?
20113   echo "$as_me:20113: \$? = $ac_status" >&5
20114   (exit "$ac_status"); } &&
20115          { ac_try='test -s "conftest$ac_exeext"'
20116   { (eval echo "$as_me:20116: \"$ac_try\"") >&5
20117   (eval $ac_try) 2>&5
20118   ac_status=$?
20119   echo "$as_me:20119: \$? = $ac_status" >&5
20120   (exit "$ac_status"); }; }; then
20121   ac_cv_func_regcomp=yes
20122 else
20123   echo "$as_me: failed program was:" >&5
20124 cat "conftest.$ac_ext" >&5
20125 ac_cv_func_regcomp=no
20126 fi
20127 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20128 fi
20129 echo "$as_me:20129: result: $ac_cv_func_regcomp" >&5
20130 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
20131 if test "$ac_cv_func_regcomp" = yes; then
20132   cf_regex_func=regcomp
20133 else
20134
20135                 for cf_regex_lib in $cf_regex_libs
20136                 do
20137                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
20138 echo "$as_me:20138: checking for regcomp in -l$cf_regex_lib" >&5
20139 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
20140 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
20141   echo $ECHO_N "(cached) $ECHO_C" >&6
20142 else
20143   ac_check_lib_save_LIBS=$LIBS
20144 LIBS="-l$cf_regex_lib  $LIBS"
20145 cat >"conftest.$ac_ext" <<_ACEOF
20146 #line 20146 "configure"
20147 #include "confdefs.h"
20148
20149 /* Override any gcc2 internal prototype to avoid an error.  */
20150 #ifdef __cplusplus
20151 extern "C"
20152 #endif
20153 /* We use char because int might match the return type of a gcc2
20154    builtin and then its argument prototype would still apply.  */
20155 char regcomp (void);
20156 int
20157 main (void)
20158 {
20159 regcomp ();
20160   ;
20161   return 0;
20162 }
20163 _ACEOF
20164 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20165 if { (eval echo "$as_me:20165: \"$ac_link\"") >&5
20166   (eval $ac_link) 2>&5
20167   ac_status=$?
20168   echo "$as_me:20168: \$? = $ac_status" >&5
20169   (exit "$ac_status"); } &&
20170          { ac_try='test -s "conftest$ac_exeext"'
20171   { (eval echo "$as_me:20171: \"$ac_try\"") >&5
20172   (eval $ac_try) 2>&5
20173   ac_status=$?
20174   echo "$as_me:20174: \$? = $ac_status" >&5
20175   (exit "$ac_status"); }; }; then
20176   eval "$as_ac_Lib=yes"
20177 else
20178   echo "$as_me: failed program was:" >&5
20179 cat "conftest.$ac_ext" >&5
20180 eval "$as_ac_Lib=no"
20181 fi
20182 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20183 LIBS=$ac_check_lib_save_LIBS
20184 fi
20185 echo "$as_me:20185: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
20186 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
20187 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
20188
20189 cf_add_libs="$LIBS"
20190 # reverse order
20191 cf_add_0lib=
20192 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20193 # filter duplicates
20194 for cf_add_1lib in $cf_add_0lib; do
20195         for cf_add_2lib in $cf_add_libs; do
20196                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20197                         cf_add_1lib=
20198                         break
20199                 fi
20200         done
20201         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20202 done
20203 LIBS="$cf_add_libs"
20204
20205                                         cf_regex_func=regcomp
20206                                         break
20207 fi
20208
20209                 done
20210
20211 fi
20212
20213         ;;
20214 esac
20215
20216 if test "$cf_regex_func" = no ; then
20217         echo "$as_me:20217: checking for compile" >&5
20218 echo $ECHO_N "checking for compile... $ECHO_C" >&6
20219 if test "${ac_cv_func_compile+set}" = set; then
20220   echo $ECHO_N "(cached) $ECHO_C" >&6
20221 else
20222   cat >"conftest.$ac_ext" <<_ACEOF
20223 #line 20223 "configure"
20224 #include "confdefs.h"
20225 #define compile autoconf_temporary
20226 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20227 #undef compile
20228
20229 #ifdef __cplusplus
20230 extern "C"
20231 #endif
20232
20233 /* We use char because int might match the return type of a gcc2
20234    builtin and then its argument prototype would still apply.  */
20235 char compile (void);
20236
20237 int
20238 main (void)
20239 {
20240
20241 /* The GNU C library defines stubs for functions which it implements
20242     to always fail with ENOSYS.  Some functions are actually named
20243     something starting with __ and the normal name is an alias.  */
20244 #if defined (__stub_compile) || defined (__stub___compile)
20245 #error found stub for compile
20246 #endif
20247
20248         return compile ();
20249   ;
20250   return 0;
20251 }
20252 _ACEOF
20253 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20254 if { (eval echo "$as_me:20254: \"$ac_link\"") >&5
20255   (eval $ac_link) 2>&5
20256   ac_status=$?
20257   echo "$as_me:20257: \$? = $ac_status" >&5
20258   (exit "$ac_status"); } &&
20259          { ac_try='test -s "conftest$ac_exeext"'
20260   { (eval echo "$as_me:20260: \"$ac_try\"") >&5
20261   (eval $ac_try) 2>&5
20262   ac_status=$?
20263   echo "$as_me:20263: \$? = $ac_status" >&5
20264   (exit "$ac_status"); }; }; then
20265   ac_cv_func_compile=yes
20266 else
20267   echo "$as_me: failed program was:" >&5
20268 cat "conftest.$ac_ext" >&5
20269 ac_cv_func_compile=no
20270 fi
20271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20272 fi
20273 echo "$as_me:20273: result: $ac_cv_func_compile" >&5
20274 echo "${ECHO_T}$ac_cv_func_compile" >&6
20275 if test "$ac_cv_func_compile" = yes; then
20276   cf_regex_func=compile
20277 else
20278
20279                 echo "$as_me:20279: checking for compile in -lgen" >&5
20280 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20281 if test "${ac_cv_lib_gen_compile+set}" = set; then
20282   echo $ECHO_N "(cached) $ECHO_C" >&6
20283 else
20284   ac_check_lib_save_LIBS=$LIBS
20285 LIBS="-lgen  $LIBS"
20286 cat >"conftest.$ac_ext" <<_ACEOF
20287 #line 20287 "configure"
20288 #include "confdefs.h"
20289
20290 /* Override any gcc2 internal prototype to avoid an error.  */
20291 #ifdef __cplusplus
20292 extern "C"
20293 #endif
20294 /* We use char because int might match the return type of a gcc2
20295    builtin and then its argument prototype would still apply.  */
20296 char compile (void);
20297 int
20298 main (void)
20299 {
20300 compile ();
20301   ;
20302   return 0;
20303 }
20304 _ACEOF
20305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20306 if { (eval echo "$as_me:20306: \"$ac_link\"") >&5
20307   (eval $ac_link) 2>&5
20308   ac_status=$?
20309   echo "$as_me:20309: \$? = $ac_status" >&5
20310   (exit "$ac_status"); } &&
20311          { ac_try='test -s "conftest$ac_exeext"'
20312   { (eval echo "$as_me:20312: \"$ac_try\"") >&5
20313   (eval $ac_try) 2>&5
20314   ac_status=$?
20315   echo "$as_me:20315: \$? = $ac_status" >&5
20316   (exit "$ac_status"); }; }; then
20317   ac_cv_lib_gen_compile=yes
20318 else
20319   echo "$as_me: failed program was:" >&5
20320 cat "conftest.$ac_ext" >&5
20321 ac_cv_lib_gen_compile=no
20322 fi
20323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20324 LIBS=$ac_check_lib_save_LIBS
20325 fi
20326 echo "$as_me:20326: result: $ac_cv_lib_gen_compile" >&5
20327 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20328 if test "$ac_cv_lib_gen_compile" = yes; then
20329
20330 cf_add_libs="$LIBS"
20331 # reverse order
20332 cf_add_0lib=
20333 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20334 # filter duplicates
20335 for cf_add_1lib in $cf_add_0lib; do
20336         for cf_add_2lib in $cf_add_libs; do
20337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20338                         cf_add_1lib=
20339                         break
20340                 fi
20341         done
20342         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20343 done
20344 LIBS="$cf_add_libs"
20345
20346                                 cf_regex_func=compile
20347 fi
20348
20349 fi
20350
20351 fi
20352
20353 if test "$cf_regex_func" = no ; then
20354         { echo "$as_me:20354: WARNING: cannot find regular expression library" >&5
20355 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20356 fi
20357
20358 echo "$as_me:20358: checking for regular-expression headers" >&5
20359 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20360 if test "${cf_cv_regex_hdrs+set}" = set; then
20361   echo $ECHO_N "(cached) $ECHO_C" >&6
20362 else
20363
20364 cf_cv_regex_hdrs=no
20365 case "$cf_regex_func" in
20366 (compile)
20367         for cf_regex_hdr in regexp.h regexpr.h
20368         do
20369                 cat >"conftest.$ac_ext" <<_ACEOF
20370 #line 20370 "configure"
20371 #include "confdefs.h"
20372 #include <$cf_regex_hdr>
20373 int
20374 main (void)
20375 {
20376
20377                         char *p = compile("", "", "", 0);
20378                         int x = step("", "");
20379                         (void)p;
20380                         (void)x;
20381
20382   ;
20383   return 0;
20384 }
20385 _ACEOF
20386 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20387 if { (eval echo "$as_me:20387: \"$ac_link\"") >&5
20388   (eval $ac_link) 2>&5
20389   ac_status=$?
20390   echo "$as_me:20390: \$? = $ac_status" >&5
20391   (exit "$ac_status"); } &&
20392          { ac_try='test -s "conftest$ac_exeext"'
20393   { (eval echo "$as_me:20393: \"$ac_try\"") >&5
20394   (eval $ac_try) 2>&5
20395   ac_status=$?
20396   echo "$as_me:20396: \$? = $ac_status" >&5
20397   (exit "$ac_status"); }; }; then
20398
20399                         cf_cv_regex_hdrs=$cf_regex_hdr
20400                         break
20401
20402 else
20403   echo "$as_me: failed program was:" >&5
20404 cat "conftest.$ac_ext" >&5
20405 fi
20406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20407         done
20408         ;;
20409 (*)
20410         for cf_regex_hdr in regex.h
20411         do
20412                 cat >"conftest.$ac_ext" <<_ACEOF
20413 #line 20413 "configure"
20414 #include "confdefs.h"
20415 #include <sys/types.h>
20416 #include <$cf_regex_hdr>
20417 int
20418 main (void)
20419 {
20420
20421                         regex_t *p = 0;
20422                         int x = regcomp(p, "", 0);
20423                         int y = regexec(p, "", 0, 0, 0);
20424                         (void)x;
20425                         (void)y;
20426                         regfree(p);
20427
20428   ;
20429   return 0;
20430 }
20431 _ACEOF
20432 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20433 if { (eval echo "$as_me:20433: \"$ac_link\"") >&5
20434   (eval $ac_link) 2>&5
20435   ac_status=$?
20436   echo "$as_me:20436: \$? = $ac_status" >&5
20437   (exit "$ac_status"); } &&
20438          { ac_try='test -s "conftest$ac_exeext"'
20439   { (eval echo "$as_me:20439: \"$ac_try\"") >&5
20440   (eval $ac_try) 2>&5
20441   ac_status=$?
20442   echo "$as_me:20442: \$? = $ac_status" >&5
20443   (exit "$ac_status"); }; }; then
20444
20445                         cf_cv_regex_hdrs=$cf_regex_hdr
20446                         break
20447
20448 else
20449   echo "$as_me: failed program was:" >&5
20450 cat "conftest.$ac_ext" >&5
20451 fi
20452 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20453         done
20454         ;;
20455 esac
20456
20457 fi
20458 echo "$as_me:20458: result: $cf_cv_regex_hdrs" >&5
20459 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20460
20461 case "$cf_cv_regex_hdrs" in
20462         (no)            { echo "$as_me:20462: WARNING: no regular expression header found" >&5
20463 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20464         (regex.h)
20465 cat >>confdefs.h <<\EOF
20466 #define HAVE_REGEX_H_FUNCS 1
20467 EOF
20468  ;;
20469         (regexp.h)
20470 cat >>confdefs.h <<\EOF
20471 #define HAVE_REGEXP_H_FUNCS 1
20472 EOF
20473  ;;
20474         (regexpr.h)
20475 cat >>confdefs.h <<\EOF
20476 #define HAVE_REGEXPR_H_FUNCS 1
20477 EOF
20478  ;;
20479 esac
20480
20481 for ac_header in \
20482 fcntl.h \
20483 getopt.h \
20484 limits.h \
20485 locale.h \
20486 math.h \
20487 poll.h \
20488 sys/auxv.h \
20489 sys/ioctl.h \
20490 sys/param.h \
20491 sys/poll.h \
20492 sys/select.h \
20493 sys/time.h \
20494 sys/times.h \
20495 unistd.h \
20496 wctype.h \
20497
20498 do
20499 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20500 echo "$as_me:20500: checking for $ac_header" >&5
20501 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20503   echo $ECHO_N "(cached) $ECHO_C" >&6
20504 else
20505   cat >"conftest.$ac_ext" <<_ACEOF
20506 #line 20506 "configure"
20507 #include "confdefs.h"
20508 #include <$ac_header>
20509 _ACEOF
20510 if { (eval echo "$as_me:20510: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20511   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20512   ac_status=$?
20513   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20514   rm -f conftest.er1
20515   cat conftest.err >&5
20516   echo "$as_me:20516: \$? = $ac_status" >&5
20517   (exit "$ac_status"); } >/dev/null; then
20518   if test -s conftest.err; then
20519     ac_cpp_err=$ac_c_preproc_warn_flag
20520   else
20521     ac_cpp_err=
20522   fi
20523 else
20524   ac_cpp_err=yes
20525 fi
20526 if test -z "$ac_cpp_err"; then
20527   eval "$as_ac_Header=yes"
20528 else
20529   echo "$as_me: failed program was:" >&5
20530   cat "conftest.$ac_ext" >&5
20531   eval "$as_ac_Header=no"
20532 fi
20533 rm -f conftest.err "conftest.$ac_ext"
20534 fi
20535 echo "$as_me:20535: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20536 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20537 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20538   cat >>confdefs.h <<EOF
20539 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20540 EOF
20541
20542 fi
20543 done
20544
20545 for ac_header in unistd.h getopt.h
20546 do
20547 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20548 echo "$as_me:20548: checking for $ac_header" >&5
20549 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20550 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20551   echo $ECHO_N "(cached) $ECHO_C" >&6
20552 else
20553   cat >"conftest.$ac_ext" <<_ACEOF
20554 #line 20554 "configure"
20555 #include "confdefs.h"
20556 #include <$ac_header>
20557 _ACEOF
20558 if { (eval echo "$as_me:20558: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20559   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20560   ac_status=$?
20561   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20562   rm -f conftest.er1
20563   cat conftest.err >&5
20564   echo "$as_me:20564: \$? = $ac_status" >&5
20565   (exit "$ac_status"); } >/dev/null; then
20566   if test -s conftest.err; then
20567     ac_cpp_err=$ac_c_preproc_warn_flag
20568   else
20569     ac_cpp_err=
20570   fi
20571 else
20572   ac_cpp_err=yes
20573 fi
20574 if test -z "$ac_cpp_err"; then
20575   eval "$as_ac_Header=yes"
20576 else
20577   echo "$as_me: failed program was:" >&5
20578   cat "conftest.$ac_ext" >&5
20579   eval "$as_ac_Header=no"
20580 fi
20581 rm -f conftest.err "conftest.$ac_ext"
20582 fi
20583 echo "$as_me:20583: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20584 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20585 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20586   cat >>confdefs.h <<EOF
20587 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20588 EOF
20589
20590 fi
20591 done
20592
20593 echo "$as_me:20593: checking for header declaring getopt variables" >&5
20594 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20595 if test "${cf_cv_getopt_header+set}" = set; then
20596   echo $ECHO_N "(cached) $ECHO_C" >&6
20597 else
20598
20599 cf_cv_getopt_header=none
20600 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20601 do
20602 cat >"conftest.$ac_ext" <<_ACEOF
20603 #line 20603 "configure"
20604 #include "confdefs.h"
20605
20606 #include <$cf_header>
20607 int
20608 main (void)
20609 {
20610 int x = optind; char *y = optarg; (void)x; (void)y
20611   ;
20612   return 0;
20613 }
20614 _ACEOF
20615 rm -f "conftest.$ac_objext"
20616 if { (eval echo "$as_me:20616: \"$ac_compile\"") >&5
20617   (eval $ac_compile) 2>&5
20618   ac_status=$?
20619   echo "$as_me:20619: \$? = $ac_status" >&5
20620   (exit "$ac_status"); } &&
20621          { ac_try='test -s "conftest.$ac_objext"'
20622   { (eval echo "$as_me:20622: \"$ac_try\"") >&5
20623   (eval $ac_try) 2>&5
20624   ac_status=$?
20625   echo "$as_me:20625: \$? = $ac_status" >&5
20626   (exit "$ac_status"); }; }; then
20627   cf_cv_getopt_header=$cf_header
20628  break
20629 else
20630   echo "$as_me: failed program was:" >&5
20631 cat "conftest.$ac_ext" >&5
20632 fi
20633 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20634 done
20635
20636 fi
20637 echo "$as_me:20637: result: $cf_cv_getopt_header" >&5
20638 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20639 if test "$cf_cv_getopt_header" != none ; then
20640
20641 cat >>confdefs.h <<\EOF
20642 #define HAVE_GETOPT_HEADER 1
20643 EOF
20644
20645 fi
20646 if test "$cf_cv_getopt_header" = getopt.h ; then
20647
20648 cat >>confdefs.h <<\EOF
20649 #define NEED_GETOPT_H 1
20650 EOF
20651
20652 fi
20653
20654 echo "$as_me:20654: checking if external environ is declared" >&5
20655 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20656 if test "${cf_cv_dcl_environ+set}" = set; then
20657   echo $ECHO_N "(cached) $ECHO_C" >&6
20658 else
20659
20660     cat >"conftest.$ac_ext" <<_ACEOF
20661 #line 20661 "configure"
20662 #include "confdefs.h"
20663
20664 $ac_includes_default
20665 int
20666 main (void)
20667 {
20668 void* x = (void*) environ; (void)x
20669   ;
20670   return 0;
20671 }
20672 _ACEOF
20673 rm -f "conftest.$ac_objext"
20674 if { (eval echo "$as_me:20674: \"$ac_compile\"") >&5
20675   (eval $ac_compile) 2>&5
20676   ac_status=$?
20677   echo "$as_me:20677: \$? = $ac_status" >&5
20678   (exit "$ac_status"); } &&
20679          { ac_try='test -s "conftest.$ac_objext"'
20680   { (eval echo "$as_me:20680: \"$ac_try\"") >&5
20681   (eval $ac_try) 2>&5
20682   ac_status=$?
20683   echo "$as_me:20683: \$? = $ac_status" >&5
20684   (exit "$ac_status"); }; }; then
20685   cf_cv_dcl_environ=yes
20686 else
20687   echo "$as_me: failed program was:" >&5
20688 cat "conftest.$ac_ext" >&5
20689 cf_cv_dcl_environ=no
20690 fi
20691 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20692
20693 fi
20694 echo "$as_me:20694: result: $cf_cv_dcl_environ" >&5
20695 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20696
20697 if test "$cf_cv_dcl_environ" = no ; then
20698
20699 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20700
20701     cat >>confdefs.h <<EOF
20702 #define $cf_result 1
20703 EOF
20704
20705 fi
20706
20707 # It's possible (for near-UNIX clones) that the data doesn't exist
20708
20709 echo "$as_me:20709: checking if external environ exists" >&5
20710 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20711 if test "${cf_cv_have_environ+set}" = set; then
20712   echo $ECHO_N "(cached) $ECHO_C" >&6
20713 else
20714
20715         cat >"conftest.$ac_ext" <<_ACEOF
20716 #line 20716 "configure"
20717 #include "confdefs.h"
20718
20719 #undef environ
20720 extern int environ;
20721
20722 int
20723 main (void)
20724 {
20725 environ = 2
20726   ;
20727   return 0;
20728 }
20729 _ACEOF
20730 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20731 if { (eval echo "$as_me:20731: \"$ac_link\"") >&5
20732   (eval $ac_link) 2>&5
20733   ac_status=$?
20734   echo "$as_me:20734: \$? = $ac_status" >&5
20735   (exit "$ac_status"); } &&
20736          { ac_try='test -s "conftest$ac_exeext"'
20737   { (eval echo "$as_me:20737: \"$ac_try\"") >&5
20738   (eval $ac_try) 2>&5
20739   ac_status=$?
20740   echo "$as_me:20740: \$? = $ac_status" >&5
20741   (exit "$ac_status"); }; }; then
20742   cf_cv_have_environ=yes
20743 else
20744   echo "$as_me: failed program was:" >&5
20745 cat "conftest.$ac_ext" >&5
20746 cf_cv_have_environ=no
20747 fi
20748 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20749
20750 fi
20751 echo "$as_me:20751: result: $cf_cv_have_environ" >&5
20752 echo "${ECHO_T}$cf_cv_have_environ" >&6
20753
20754 if test "$cf_cv_have_environ" = yes ; then
20755
20756 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20757
20758         cat >>confdefs.h <<EOF
20759 #define $cf_result 1
20760 EOF
20761
20762 fi
20763
20764 echo "$as_me:20764: checking for getenv" >&5
20765 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20766 if test "${ac_cv_func_getenv+set}" = set; then
20767   echo $ECHO_N "(cached) $ECHO_C" >&6
20768 else
20769   cat >"conftest.$ac_ext" <<_ACEOF
20770 #line 20770 "configure"
20771 #include "confdefs.h"
20772 #define getenv autoconf_temporary
20773 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20774 #undef getenv
20775
20776 #ifdef __cplusplus
20777 extern "C"
20778 #endif
20779
20780 /* We use char because int might match the return type of a gcc2
20781    builtin and then its argument prototype would still apply.  */
20782 char getenv (void);
20783
20784 int
20785 main (void)
20786 {
20787
20788 /* The GNU C library defines stubs for functions which it implements
20789     to always fail with ENOSYS.  Some functions are actually named
20790     something starting with __ and the normal name is an alias.  */
20791 #if defined (__stub_getenv) || defined (__stub___getenv)
20792 #error found stub for getenv
20793 #endif
20794
20795         return getenv ();
20796   ;
20797   return 0;
20798 }
20799 _ACEOF
20800 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20801 if { (eval echo "$as_me:20801: \"$ac_link\"") >&5
20802   (eval $ac_link) 2>&5
20803   ac_status=$?
20804   echo "$as_me:20804: \$? = $ac_status" >&5
20805   (exit "$ac_status"); } &&
20806          { ac_try='test -s "conftest$ac_exeext"'
20807   { (eval echo "$as_me:20807: \"$ac_try\"") >&5
20808   (eval $ac_try) 2>&5
20809   ac_status=$?
20810   echo "$as_me:20810: \$? = $ac_status" >&5
20811   (exit "$ac_status"); }; }; then
20812   ac_cv_func_getenv=yes
20813 else
20814   echo "$as_me: failed program was:" >&5
20815 cat "conftest.$ac_ext" >&5
20816 ac_cv_func_getenv=no
20817 fi
20818 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20819 fi
20820 echo "$as_me:20820: result: $ac_cv_func_getenv" >&5
20821 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20822
20823 for ac_func in putenv setenv strdup
20824 do
20825 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20826 echo "$as_me:20826: checking for $ac_func" >&5
20827 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20828 if eval "test \"\${$as_ac_var+set}\" = set"; then
20829   echo $ECHO_N "(cached) $ECHO_C" >&6
20830 else
20831   cat >"conftest.$ac_ext" <<_ACEOF
20832 #line 20832 "configure"
20833 #include "confdefs.h"
20834 #define $ac_func autoconf_temporary
20835 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20836 #undef $ac_func
20837
20838 #ifdef __cplusplus
20839 extern "C"
20840 #endif
20841
20842 /* We use char because int might match the return type of a gcc2
20843    builtin and then its argument prototype would still apply.  */
20844 char $ac_func (void);
20845
20846 int
20847 main (void)
20848 {
20849
20850 /* The GNU C library defines stubs for functions which it implements
20851     to always fail with ENOSYS.  Some functions are actually named
20852     something starting with __ and the normal name is an alias.  */
20853 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20854 #error found stub for $ac_func
20855 #endif
20856
20857         return $ac_func ();
20858   ;
20859   return 0;
20860 }
20861 _ACEOF
20862 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20863 if { (eval echo "$as_me:20863: \"$ac_link\"") >&5
20864   (eval $ac_link) 2>&5
20865   ac_status=$?
20866   echo "$as_me:20866: \$? = $ac_status" >&5
20867   (exit "$ac_status"); } &&
20868          { ac_try='test -s "conftest$ac_exeext"'
20869   { (eval echo "$as_me:20869: \"$ac_try\"") >&5
20870   (eval $ac_try) 2>&5
20871   ac_status=$?
20872   echo "$as_me:20872: \$? = $ac_status" >&5
20873   (exit "$ac_status"); }; }; then
20874   eval "$as_ac_var=yes"
20875 else
20876   echo "$as_me: failed program was:" >&5
20877 cat "conftest.$ac_ext" >&5
20878 eval "$as_ac_var=no"
20879 fi
20880 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20881 fi
20882 echo "$as_me:20882: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20883 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20884 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20885   cat >>confdefs.h <<EOF
20886 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20887 EOF
20888
20889 fi
20890 done
20891
20892 echo "$as_me:20892: checking if getenv returns consistent values" >&5
20893 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20894 if test "${cf_cv_consistent_getenv+set}" = set; then
20895   echo $ECHO_N "(cached) $ECHO_C" >&6
20896 else
20897
20898 if test "$cross_compiling" = yes; then
20899   cf_cv_consistent_getenv=unknown
20900 else
20901   cat >"conftest.$ac_ext" <<_ACEOF
20902 #line 20902 "configure"
20903 #include "confdefs.h"
20904
20905 $ac_includes_default
20906
20907 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20908 extern char **environ;  /* POSIX, but some systems are not... */
20909 #endif
20910
20911 #if defined(HAVE_STRDUP)
20912 #define str_alloc(s) strdup(s)
20913 #else
20914 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20915 #endif
20916
20917 static void set_value(const char *name, const char *value)
20918 {
20919 #if defined(HAVE_SETENV)
20920         setenv(name, value, 1);
20921 #elif defined(HAVE_PUTENV)
20922         char buffer[1024];
20923         sprintf(buffer, "%s=%s", name, value);
20924         putenv(str_alloc(buffer));
20925 #else
20926 #error neither putenv/setenv found
20927 #endif
20928 }
20929 int main(void)
20930 {
20931         int pass;
20932         size_t numenv, limit, j;
20933         char **mynames;
20934         char **myvalues;
20935         char **mypointer;
20936         char *equals;
20937         for (numenv = 0; environ[numenv]; ++numenv) ;
20938         limit = numenv + 10;
20939         mynames = (char **) calloc(limit + 1, sizeof(char *));
20940         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20941         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20942 #if defined(HAVE_ENVIRON)
20943         for (j = 0; environ[j]; ++j) {
20944                 mynames[j] = str_alloc(environ[j]);
20945                 equals = strchr(mynames[j], '=');
20946                 if (equals != 0) {
20947                         *equals++ = '\\0';
20948                         myvalues[j] = str_alloc(equals);
20949                 } else {
20950                         myvalues[j] = str_alloc("");
20951                 }
20952         }
20953 #endif
20954         for (j = numenv; j < limit; ++j) {
20955                 char name[80];
20956                 char value[80];
20957                 size_t found;
20958                 size_t k = 0;
20959                 do {
20960                         size_t jk;
20961                         found = 0;
20962                         sprintf(name, "TERM%lu", (unsigned long) k);
20963                         for (jk = 0; jk < j; ++jk) {
20964                                 if (!strcmp(name, mynames[jk])) {
20965                                         found = 1;
20966                                         ++k;
20967                                         break;
20968                                 }
20969                         }
20970                 } while (found);
20971                 sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]);
20972                 set_value(name, value);
20973                 mynames[j] = str_alloc(name);
20974                 myvalues[j] = str_alloc(value);
20975         }
20976         for (pass = 0; pass < 3; ++pass) {
20977                 for (j = 0; j < limit; ++j) {
20978                         char *value = getenv(mynames[j]);
20979                         if (pass) {
20980                                 if (value == 0) {
20981                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20982                                         ${cf_cv_main_return:-return}(1);
20983                                 } else if (value != mypointer[j]) {
20984                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20985                                         ${cf_cv_main_return:-return}(1);
20986                                 } else if (strcmp(value, myvalues[j])) {
20987                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20988                                         ${cf_cv_main_return:-return}(1);
20989                                 }
20990                         } else {
20991                                 size_t k;
20992                                 mypointer[j] = value;
20993                                 for (k = 0; k < j; ++k) {
20994                                         if (mypointer[j] == mypointer[k]) {
20995                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20996                                                 ${cf_cv_main_return:-return}(1);
20997                                         }
20998                                 }
20999                         }
21000                 }
21001         }
21002         ${cf_cv_main_return:-return}(0);
21003 }
21004
21005 _ACEOF
21006 rm -f "conftest$ac_exeext"
21007 if { (eval echo "$as_me:21007: \"$ac_link\"") >&5
21008   (eval $ac_link) 2>&5
21009   ac_status=$?
21010   echo "$as_me:21010: \$? = $ac_status" >&5
21011   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21012   { (eval echo "$as_me:21012: \"$ac_try\"") >&5
21013   (eval $ac_try) 2>&5
21014   ac_status=$?
21015   echo "$as_me:21015: \$? = $ac_status" >&5
21016   (exit "$ac_status"); }; }; then
21017   cf_cv_consistent_getenv=yes
21018 else
21019   echo "$as_me: program exited with status $ac_status" >&5
21020 echo "$as_me: failed program was:" >&5
21021 cat "conftest.$ac_ext" >&5
21022 cf_cv_consistent_getenv=no
21023 fi
21024 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21025 fi
21026
21027 fi
21028 echo "$as_me:21028: result: $cf_cv_consistent_getenv" >&5
21029 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
21030
21031 if test "x$cf_cv_consistent_getenv" = xno
21032 then
21033
21034 cat >>confdefs.h <<\EOF
21035 #define HAVE_CONSISTENT_GETENV 1
21036 EOF
21037
21038 fi
21039
21040 if test "x$cf_cv_consistent_getenv" = xno && \
21041         test "x$cf_with_trace" = xyes
21042 then
21043         { echo "$as_me:21043: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
21044 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
21045 fi
21046
21047 echo "$as_me:21047: checking if sys/time.h works with sys/select.h" >&5
21048 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
21049 if test "${cf_cv_sys_time_select+set}" = set; then
21050   echo $ECHO_N "(cached) $ECHO_C" >&6
21051 else
21052
21053 cat >"conftest.$ac_ext" <<_ACEOF
21054 #line 21054 "configure"
21055 #include "confdefs.h"
21056
21057 #include <sys/types.h>
21058 #ifdef HAVE_SYS_TIME_H
21059 #include <sys/time.h>
21060 #endif
21061 #ifdef HAVE_SYS_SELECT_H
21062 #include <sys/select.h>
21063 #endif
21064
21065 int
21066 main (void)
21067 {
21068
21069   ;
21070   return 0;
21071 }
21072 _ACEOF
21073 rm -f "conftest.$ac_objext"
21074 if { (eval echo "$as_me:21074: \"$ac_compile\"") >&5
21075   (eval $ac_compile) 2>&5
21076   ac_status=$?
21077   echo "$as_me:21077: \$? = $ac_status" >&5
21078   (exit "$ac_status"); } &&
21079          { ac_try='test -s "conftest.$ac_objext"'
21080   { (eval echo "$as_me:21080: \"$ac_try\"") >&5
21081   (eval $ac_try) 2>&5
21082   ac_status=$?
21083   echo "$as_me:21083: \$? = $ac_status" >&5
21084   (exit "$ac_status"); }; }; then
21085   cf_cv_sys_time_select=yes
21086 else
21087   echo "$as_me: failed program was:" >&5
21088 cat "conftest.$ac_ext" >&5
21089 cf_cv_sys_time_select=no
21090 fi
21091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21092
21093 fi
21094
21095 echo "$as_me:21095: result: $cf_cv_sys_time_select" >&5
21096 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
21097 test "$cf_cv_sys_time_select" = yes &&
21098 cat >>confdefs.h <<\EOF
21099 #define HAVE_SYS_TIME_SELECT 1
21100 EOF
21101
21102 ###     checks for compiler characteristics
21103 ac_ext=c
21104 ac_cpp='$CPP $CPPFLAGS'
21105 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
21106 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
21107 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21108 ac_main_return="return"
21109
21110 echo "$as_me:21110: checking for an ANSI C-conforming const" >&5
21111 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
21112 if test "${ac_cv_c_const+set}" = set; then
21113   echo $ECHO_N "(cached) $ECHO_C" >&6
21114 else
21115   cat >"conftest.$ac_ext" <<_ACEOF
21116 #line 21116 "configure"
21117 #include "confdefs.h"
21118
21119 int
21120 main (void)
21121 {
21122 /* FIXME: Include the comments suggested by Paul. */
21123 #ifndef __cplusplus
21124   /* Ultrix mips cc rejects this.  */
21125   typedef int charset[2];
21126   const charset x; (void)x;
21127   /* SunOS 4.1.1 cc rejects this.  */
21128   char const *const *ccp;
21129   char **p;
21130   /* NEC SVR4.0.2 mips cc rejects this.  */
21131   struct point {int x, y;};
21132   static struct point const zero = {0,0}; (void)zero;
21133   /* AIX XL C 1.02.0.0 rejects this.
21134      It does not let you subtract one const X* pointer from another in
21135      an arm of an if-expression whose if-part is not a constant
21136      expression */
21137   const char *g = "string";
21138   ccp = &g + (g ? g-g : 0);
21139   /* HPUX 7.0 cc rejects these. */
21140   ++ccp;
21141   p = (char**) ccp;
21142   ccp = (char const *const *) p;
21143   { /* SCO 3.2v4 cc rejects this.  */
21144     char *t;
21145     char const *s = 0 ? (char *) 0 : (char const *) 0;
21146
21147     *t++ = 0;
21148         (void)s;
21149   }
21150   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21151     int x[] = {25, 17};
21152     const int *foo = &x[0];
21153     ++foo;
21154         (void)foo;
21155   }
21156   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21157     typedef const int *iptr;
21158     iptr p = 0;
21159     ++p;
21160         (void)p;
21161   }
21162   { /* AIX XL C 1.02.0.0 rejects this saying
21163        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21164     struct s { int j; const int *ap[3]; };
21165     struct s *b; b->j = 5;
21166   }
21167   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21168     const int foo = 10;
21169         (void)foo;
21170   }
21171 #endif
21172
21173   ;
21174   return 0;
21175 }
21176 _ACEOF
21177 rm -f "conftest.$ac_objext"
21178 if { (eval echo "$as_me:21178: \"$ac_compile\"") >&5
21179   (eval $ac_compile) 2>&5
21180   ac_status=$?
21181   echo "$as_me:21181: \$? = $ac_status" >&5
21182   (exit "$ac_status"); } &&
21183          { ac_try='test -s "conftest.$ac_objext"'
21184   { (eval echo "$as_me:21184: \"$ac_try\"") >&5
21185   (eval $ac_try) 2>&5
21186   ac_status=$?
21187   echo "$as_me:21187: \$? = $ac_status" >&5
21188   (exit "$ac_status"); }; }; then
21189   ac_cv_c_const=yes
21190 else
21191   echo "$as_me: failed program was:" >&5
21192 cat "conftest.$ac_ext" >&5
21193 ac_cv_c_const=no
21194 fi
21195 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21196 fi
21197 echo "$as_me:21197: result: $ac_cv_c_const" >&5
21198 echo "${ECHO_T}$ac_cv_c_const" >&6
21199 if test $ac_cv_c_const = no; then
21200
21201 cat >>confdefs.h <<\EOF
21202 #define const
21203 EOF
21204
21205 fi
21206
21207 echo "$as_me:21207: checking for inline" >&5
21208 echo $ECHO_N "checking for inline... $ECHO_C" >&6
21209 if test "${ac_cv_c_inline+set}" = set; then
21210   echo $ECHO_N "(cached) $ECHO_C" >&6
21211 else
21212   ac_cv_c_inline=no
21213 for ac_kw in inline __inline__ __inline; do
21214   cat >"conftest.$ac_ext" <<_ACEOF
21215 #line 21215 "configure"
21216 #include "confdefs.h"
21217 #ifndef __cplusplus
21218 static $ac_kw int static_foo (void) {return 0; }
21219 $ac_kw int foo (void) {return 0; }
21220 #endif
21221
21222 _ACEOF
21223 rm -f "conftest.$ac_objext"
21224 if { (eval echo "$as_me:21224: \"$ac_compile\"") >&5
21225   (eval $ac_compile) 2>&5
21226   ac_status=$?
21227   echo "$as_me:21227: \$? = $ac_status" >&5
21228   (exit "$ac_status"); } &&
21229          { ac_try='test -s "conftest.$ac_objext"'
21230   { (eval echo "$as_me:21230: \"$ac_try\"") >&5
21231   (eval $ac_try) 2>&5
21232   ac_status=$?
21233   echo "$as_me:21233: \$? = $ac_status" >&5
21234   (exit "$ac_status"); }; }; then
21235   ac_cv_c_inline=$ac_kw; break
21236 else
21237   echo "$as_me: failed program was:" >&5
21238 cat "conftest.$ac_ext" >&5
21239 fi
21240 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21241 done
21242
21243 fi
21244 echo "$as_me:21244: result: $ac_cv_c_inline" >&5
21245 echo "${ECHO_T}$ac_cv_c_inline" >&6
21246 case $ac_cv_c_inline in
21247   inline | yes) ;;
21248   no)
21249 cat >>confdefs.h <<\EOF
21250 #define inline
21251 EOF
21252  ;;
21253   *)  cat >>confdefs.h <<EOF
21254 #define inline $ac_cv_c_inline
21255 EOF
21256  ;;
21257 esac
21258
21259 NCURSES_INLINE=
21260 if test "$ac_cv_c_inline" != no ; then
21261         NCURSES_INLINE=inline
21262         if test "$INTEL_COMPILER" = yes
21263         then
21264                 :
21265         elif test "$CLANG_COMPILER" = yes
21266         then
21267                 :
21268         elif test "$GCC" = yes
21269         then
21270                 echo "$as_me:21270: checking if $CC supports options to tune inlining" >&5
21271 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21272 if test "${cf_cv_gcc_inline+set}" = set; then
21273   echo $ECHO_N "(cached) $ECHO_C" >&6
21274 else
21275
21276                 cf_save_CFLAGS=$CFLAGS
21277                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21278                 cat >"conftest.$ac_ext" <<_ACEOF
21279 #line 21279 "configure"
21280 #include "confdefs.h"
21281 inline int foo(void) { return 1; }
21282 int
21283 main (void)
21284 {
21285 ${cf_cv_main_return:-return} foo()
21286   ;
21287   return 0;
21288 }
21289 _ACEOF
21290 rm -f "conftest.$ac_objext"
21291 if { (eval echo "$as_me:21291: \"$ac_compile\"") >&5
21292   (eval $ac_compile) 2>&5
21293   ac_status=$?
21294   echo "$as_me:21294: \$? = $ac_status" >&5
21295   (exit "$ac_status"); } &&
21296          { ac_try='test -s "conftest.$ac_objext"'
21297   { (eval echo "$as_me:21297: \"$ac_try\"") >&5
21298   (eval $ac_try) 2>&5
21299   ac_status=$?
21300   echo "$as_me:21300: \$? = $ac_status" >&5
21301   (exit "$ac_status"); }; }; then
21302   cf_cv_gcc_inline=yes
21303 else
21304   echo "$as_me: failed program was:" >&5
21305 cat "conftest.$ac_ext" >&5
21306 cf_cv_gcc_inline=no
21307 fi
21308 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21309                 CFLAGS=$cf_save_CFLAGS
21310
21311 fi
21312 echo "$as_me:21312: result: $cf_cv_gcc_inline" >&5
21313 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21314                 if test "$cf_cv_gcc_inline" = yes ; then
21315
21316 cf_fix_cppflags=no
21317 cf_new_cflags=
21318 cf_new_cppflags=
21319 cf_new_extra_cppflags=
21320
21321 for cf_add_cflags in --param max-inline-insns-single=1200
21322 do
21323 case "$cf_fix_cppflags" in
21324 (no)
21325         case "$cf_add_cflags" in
21326         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21327                 case "$cf_add_cflags" in
21328                 (-D*)
21329                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21330
21331                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21332                                 && test -z "${cf_tst_cflags}" \
21333                                 && cf_fix_cppflags=yes
21334
21335                         if test "$cf_fix_cppflags" = yes ; then
21336
21337         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21338         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21339
21340                                 continue
21341                         elif test "${cf_tst_cflags}" = "\"'" ; then
21342
21343         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21344         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21345
21346                                 continue
21347                         fi
21348                         ;;
21349                 esac
21350                 case "$CPPFLAGS" in
21351                 (*$cf_add_cflags)
21352                         ;;
21353                 (*)
21354                         case "$cf_add_cflags" in
21355                         (-D*)
21356                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21357
21358 CPPFLAGS=`echo "$CPPFLAGS" | \
21359         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21360                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21361
21362                                 ;;
21363                         esac
21364
21365         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21366         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21367
21368                         ;;
21369                 esac
21370                 ;;
21371         (*)
21372
21373         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21374         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21375
21376                 ;;
21377         esac
21378         ;;
21379 (yes)
21380
21381         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21382         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21383
21384         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21385
21386         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21387                 && test -z "${cf_tst_cflags}" \
21388                 && cf_fix_cppflags=no
21389         ;;
21390 esac
21391 done
21392
21393 if test -n "$cf_new_cflags" ; then
21394
21395         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21396         CFLAGS="${CFLAGS}$cf_new_cflags"
21397
21398 fi
21399
21400 if test -n "$cf_new_cppflags" ; then
21401
21402         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21403         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21404
21405 fi
21406
21407 if test -n "$cf_new_extra_cppflags" ; then
21408
21409         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21410         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21411
21412 fi
21413
21414                 fi
21415         fi
21416 fi
21417
21418 echo "$as_me:21418: checking for signal global datatype" >&5
21419 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21420 if test "${cf_cv_sig_atomic_t+set}" = set; then
21421   echo $ECHO_N "(cached) $ECHO_C" >&6
21422 else
21423
21424         for cf_type in \
21425                 "volatile sig_atomic_t" \
21426                 "sig_atomic_t" \
21427                 "int"
21428         do
21429         cat >"conftest.$ac_ext" <<_ACEOF
21430 #line 21430 "configure"
21431 #include "confdefs.h"
21432
21433 #include <sys/types.h>
21434 #include <signal.h>
21435 #include <stdio.h>
21436
21437 extern $cf_type x;
21438 $cf_type x;
21439 static void handler(int sig)
21440 {
21441         (void)sig;
21442         x = 5;
21443 }
21444 int
21445 main (void)
21446 {
21447 signal(SIGINT, handler);
21448                  x = 1
21449   ;
21450   return 0;
21451 }
21452 _ACEOF
21453 rm -f "conftest.$ac_objext"
21454 if { (eval echo "$as_me:21454: \"$ac_compile\"") >&5
21455   (eval $ac_compile) 2>&5
21456   ac_status=$?
21457   echo "$as_me:21457: \$? = $ac_status" >&5
21458   (exit "$ac_status"); } &&
21459          { ac_try='test -s "conftest.$ac_objext"'
21460   { (eval echo "$as_me:21460: \"$ac_try\"") >&5
21461   (eval $ac_try) 2>&5
21462   ac_status=$?
21463   echo "$as_me:21463: \$? = $ac_status" >&5
21464   (exit "$ac_status"); }; }; then
21465   cf_cv_sig_atomic_t=$cf_type
21466 else
21467   echo "$as_me: failed program was:" >&5
21468 cat "conftest.$ac_ext" >&5
21469 cf_cv_sig_atomic_t=no
21470 fi
21471 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21472                 test "$cf_cv_sig_atomic_t" != no && break
21473         done
21474
21475 fi
21476
21477 echo "$as_me:21477: result: $cf_cv_sig_atomic_t" >&5
21478 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21479 test "$cf_cv_sig_atomic_t" != no &&
21480 cat >>confdefs.h <<EOF
21481 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21482 EOF
21483
21484 if test "$NCURSES_CHTYPE" = auto ; then
21485
21486 echo "$as_me:21486: checking for type of chtype" >&5
21487 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21488 if test "${cf_cv_typeof_chtype+set}" = set; then
21489   echo $ECHO_N "(cached) $ECHO_C" >&6
21490 else
21491
21492                 if test "$cross_compiling" = yes; then
21493   cf_cv_typeof_chtype=long
21494 else
21495   cat >"conftest.$ac_ext" <<_ACEOF
21496 #line 21496 "configure"
21497 #include "confdefs.h"
21498
21499 $ac_includes_default
21500 #define WANT_BITS 31
21501 int main(void)
21502 {
21503         FILE *fp = fopen("cf_test.out", "w");
21504         if (fp != 0) {
21505                 char *result = "long";
21506                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21507                         int n;
21508                         unsigned int x, y;
21509                         for (n = 0; n < WANT_BITS; n++) {
21510                                 x = (1 << n);
21511                                 y = (x >> n);
21512                                 if (y != 1 || x == 0) {
21513                                         x = 0;
21514                                         break;
21515                                 }
21516                         }
21517                         /*
21518                          * If x is nonzero, an int is big enough for the bits
21519                          * that we want.
21520                          */
21521                         result = (x != 0) ? "int" : "long";
21522                 }
21523                 fputs(result, fp);
21524                 fclose(fp);
21525         }
21526         ${cf_cv_main_return:-return}(0);
21527 }
21528
21529 _ACEOF
21530 rm -f "conftest$ac_exeext"
21531 if { (eval echo "$as_me:21531: \"$ac_link\"") >&5
21532   (eval $ac_link) 2>&5
21533   ac_status=$?
21534   echo "$as_me:21534: \$? = $ac_status" >&5
21535   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21536   { (eval echo "$as_me:21536: \"$ac_try\"") >&5
21537   (eval $ac_try) 2>&5
21538   ac_status=$?
21539   echo "$as_me:21539: \$? = $ac_status" >&5
21540   (exit "$ac_status"); }; }; then
21541   cf_cv_typeof_chtype=`cat cf_test.out`
21542 else
21543   echo "$as_me: program exited with status $ac_status" >&5
21544 echo "$as_me: failed program was:" >&5
21545 cat "conftest.$ac_ext" >&5
21546 cf_cv_typeof_chtype=long
21547 fi
21548 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21549 fi
21550                 rm -f cf_test.out
21551
21552 fi
21553
21554 echo "$as_me:21554: result: $cf_cv_typeof_chtype" >&5
21555 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21556
21557 cat >>confdefs.h <<EOF
21558 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21559 EOF
21560
21561 else
21562         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21563 fi
21564 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21565
21566 echo "$as_me:21566: checking if unsigned literals are legal" >&5
21567 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21568 if test "${cf_cv_unsigned_literals+set}" = set; then
21569   echo $ECHO_N "(cached) $ECHO_C" >&6
21570 else
21571
21572         cat >"conftest.$ac_ext" <<_ACEOF
21573 #line 21573 "configure"
21574 #include "confdefs.h"
21575
21576 int
21577 main (void)
21578 {
21579 long x = 1L + 1UL + 1U + 1; (void)x
21580   ;
21581   return 0;
21582 }
21583 _ACEOF
21584 rm -f "conftest.$ac_objext"
21585 if { (eval echo "$as_me:21585: \"$ac_compile\"") >&5
21586   (eval $ac_compile) 2>&5
21587   ac_status=$?
21588   echo "$as_me:21588: \$? = $ac_status" >&5
21589   (exit "$ac_status"); } &&
21590          { ac_try='test -s "conftest.$ac_objext"'
21591   { (eval echo "$as_me:21591: \"$ac_try\"") >&5
21592   (eval $ac_try) 2>&5
21593   ac_status=$?
21594   echo "$as_me:21594: \$? = $ac_status" >&5
21595   (exit "$ac_status"); }; }; then
21596   cf_cv_unsigned_literals=yes
21597 else
21598   echo "$as_me: failed program was:" >&5
21599 cat "conftest.$ac_ext" >&5
21600 cf_cv_unsigned_literals=no
21601 fi
21602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21603
21604 fi
21605
21606 echo "$as_me:21606: result: $cf_cv_unsigned_literals" >&5
21607 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21608
21609 cf_cv_1UL="1"
21610 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21611 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21612
21613 if test "$NCURSES_MMASK_T" = auto ; then
21614         cf_cv_typeof_mmask_t=long
21615 else
21616         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21617 fi
21618 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21619
21620 ###     Checks for external-data
21621
21622 echo "$as_me:21622: checking if external errno is declared" >&5
21623 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21624 if test "${cf_cv_dcl_errno+set}" = set; then
21625   echo $ECHO_N "(cached) $ECHO_C" >&6
21626 else
21627
21628         cat >"conftest.$ac_ext" <<_ACEOF
21629 #line 21629 "configure"
21630 #include "confdefs.h"
21631
21632 $ac_includes_default
21633 #include <errno.h>
21634 int
21635 main (void)
21636 {
21637 int x = (int) errno; (void)x
21638   ;
21639   return 0;
21640 }
21641 _ACEOF
21642 rm -f "conftest.$ac_objext"
21643 if { (eval echo "$as_me:21643: \"$ac_compile\"") >&5
21644   (eval $ac_compile) 2>&5
21645   ac_status=$?
21646   echo "$as_me:21646: \$? = $ac_status" >&5
21647   (exit "$ac_status"); } &&
21648          { ac_try='test -s "conftest.$ac_objext"'
21649   { (eval echo "$as_me:21649: \"$ac_try\"") >&5
21650   (eval $ac_try) 2>&5
21651   ac_status=$?
21652   echo "$as_me:21652: \$? = $ac_status" >&5
21653   (exit "$ac_status"); }; }; then
21654   cf_cv_dcl_errno=yes
21655 else
21656   echo "$as_me: failed program was:" >&5
21657 cat "conftest.$ac_ext" >&5
21658 cf_cv_dcl_errno=no
21659 fi
21660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21661
21662 fi
21663 echo "$as_me:21663: result: $cf_cv_dcl_errno" >&5
21664 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21665
21666 if test "$cf_cv_dcl_errno" = no ; then
21667
21668 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21669
21670         cat >>confdefs.h <<EOF
21671 #define $cf_result 1
21672 EOF
21673
21674 fi
21675
21676 # It's possible (for near-UNIX clones) that the data doesn't exist
21677
21678 echo "$as_me:21678: checking if external errno exists" >&5
21679 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21680 if test "${cf_cv_have_errno+set}" = set; then
21681   echo $ECHO_N "(cached) $ECHO_C" >&6
21682 else
21683
21684         cat >"conftest.$ac_ext" <<_ACEOF
21685 #line 21685 "configure"
21686 #include "confdefs.h"
21687
21688 #undef errno
21689 extern int errno;
21690
21691 int
21692 main (void)
21693 {
21694 errno = 2
21695   ;
21696   return 0;
21697 }
21698 _ACEOF
21699 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21700 if { (eval echo "$as_me:21700: \"$ac_link\"") >&5
21701   (eval $ac_link) 2>&5
21702   ac_status=$?
21703   echo "$as_me:21703: \$? = $ac_status" >&5
21704   (exit "$ac_status"); } &&
21705          { ac_try='test -s "conftest$ac_exeext"'
21706   { (eval echo "$as_me:21706: \"$ac_try\"") >&5
21707   (eval $ac_try) 2>&5
21708   ac_status=$?
21709   echo "$as_me:21709: \$? = $ac_status" >&5
21710   (exit "$ac_status"); }; }; then
21711   cf_cv_have_errno=yes
21712 else
21713   echo "$as_me: failed program was:" >&5
21714 cat "conftest.$ac_ext" >&5
21715 cf_cv_have_errno=no
21716 fi
21717 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21718
21719 fi
21720 echo "$as_me:21720: result: $cf_cv_have_errno" >&5
21721 echo "${ECHO_T}$cf_cv_have_errno" >&6
21722
21723 if test "$cf_cv_have_errno" = yes ; then
21724
21725 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21726
21727         cat >>confdefs.h <<EOF
21728 #define $cf_result 1
21729 EOF
21730
21731 fi
21732
21733 echo "$as_me:21733: checking if data-only library module links" >&5
21734 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21735 if test "${cf_cv_link_dataonly+set}" = set; then
21736   echo $ECHO_N "(cached) $ECHO_C" >&6
21737 else
21738
21739         rm -f conftest.a
21740         cat >conftest.$ac_ext <<EOF
21741 #line 21741 "configure"
21742 int     testdata[3] = { 123, 456, 789 };
21743 EOF
21744         if { (eval echo "$as_me:21744: \"$ac_compile\"") >&5
21745   (eval $ac_compile) 2>&5
21746   ac_status=$?
21747   echo "$as_me:21747: \$? = $ac_status" >&5
21748   (exit "$ac_status"); } ; then
21749                 mv conftest.o data.o && \
21750                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21751         fi
21752         rm -f conftest.$ac_ext data.o
21753         cat >conftest.$ac_ext <<EOF
21754 #line 21754 "configure"
21755 extern int testfunc(void);
21756 #if defined(NeXT)
21757 int     testfunc(void)
21758 {
21759         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21760 }
21761 #else
21762 extern int testdata[3];
21763 int     testfunc(void)
21764 {
21765         return testdata[0] == 123
21766            &&  testdata[1] == 456
21767            &&  testdata[2] == 789;
21768 }
21769 #endif
21770 EOF
21771         if { (eval echo "$as_me:21771: \"$ac_compile\"") >&5
21772   (eval $ac_compile) 2>&5
21773   ac_status=$?
21774   echo "$as_me:21774: \$? = $ac_status" >&5
21775   (exit "$ac_status"); }; then
21776                 mv conftest.o func.o && \
21777                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21778         fi
21779         rm -f conftest.$ac_ext func.o
21780         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21781         cf_saveLIBS="$LIBS"
21782         LIBS="conftest.a $LIBS"
21783         if test "$cross_compiling" = yes; then
21784   cf_cv_link_dataonly=unknown
21785 else
21786   cat >"conftest.$ac_ext" <<_ACEOF
21787 #line 21787 "configure"
21788 #include "confdefs.h"
21789
21790         extern int testfunc(void);
21791         int main(void)
21792         {
21793                 ${cf_cv_main_return:-return} (!testfunc());
21794         }
21795
21796 _ACEOF
21797 rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
21803   { (eval echo "$as_me:21803: \"$ac_try\"") >&5
21804   (eval $ac_try) 2>&5
21805   ac_status=$?
21806   echo "$as_me:21806: \$? = $ac_status" >&5
21807   (exit "$ac_status"); }; }; then
21808   cf_cv_link_dataonly=yes
21809 else
21810   echo "$as_me: program exited with status $ac_status" >&5
21811 echo "$as_me: failed program was:" >&5
21812 cat "conftest.$ac_ext" >&5
21813 cf_cv_link_dataonly=no
21814 fi
21815 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21816 fi
21817         LIBS="$cf_saveLIBS"
21818
21819 fi
21820
21821 echo "$as_me:21821: result: $cf_cv_link_dataonly" >&5
21822 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21823
21824 if test "$cf_cv_link_dataonly" = no ; then
21825
21826 cat >>confdefs.h <<\EOF
21827 #define BROKEN_LINKER 1
21828 EOF
21829
21830         BROKEN_LINKER=1
21831 fi
21832
21833 ###     Checks for library functions.
21834
21835 cf_save_libs="$LIBS"
21836 echo "$as_me:21836: checking for clock_gettime" >&5
21837 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21838 if test "${ac_cv_func_clock_gettime+set}" = set; then
21839   echo $ECHO_N "(cached) $ECHO_C" >&6
21840 else
21841   cat >"conftest.$ac_ext" <<_ACEOF
21842 #line 21842 "configure"
21843 #include "confdefs.h"
21844 #define clock_gettime autoconf_temporary
21845 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21846 #undef clock_gettime
21847
21848 #ifdef __cplusplus
21849 extern "C"
21850 #endif
21851
21852 /* We use char because int might match the return type of a gcc2
21853    builtin and then its argument prototype would still apply.  */
21854 char clock_gettime (void);
21855
21856 int
21857 main (void)
21858 {
21859
21860 /* The GNU C library defines stubs for functions which it implements
21861     to always fail with ENOSYS.  Some functions are actually named
21862     something starting with __ and the normal name is an alias.  */
21863 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
21864 #error found stub for clock_gettime
21865 #endif
21866
21867         return clock_gettime ();
21868   ;
21869   return 0;
21870 }
21871 _ACEOF
21872 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21873 if { (eval echo "$as_me:21873: \"$ac_link\"") >&5
21874   (eval $ac_link) 2>&5
21875   ac_status=$?
21876   echo "$as_me:21876: \$? = $ac_status" >&5
21877   (exit "$ac_status"); } &&
21878          { ac_try='test -s "conftest$ac_exeext"'
21879   { (eval echo "$as_me:21879: \"$ac_try\"") >&5
21880   (eval $ac_try) 2>&5
21881   ac_status=$?
21882   echo "$as_me:21882: \$? = $ac_status" >&5
21883   (exit "$ac_status"); }; }; then
21884   ac_cv_func_clock_gettime=yes
21885 else
21886   echo "$as_me: failed program was:" >&5
21887 cat "conftest.$ac_ext" >&5
21888 ac_cv_func_clock_gettime=no
21889 fi
21890 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21891 fi
21892 echo "$as_me:21892: result: $ac_cv_func_clock_gettime" >&5
21893 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
21894 if test "$ac_cv_func_clock_gettime" = yes; then
21895   cf_cv_test_clock_gettime=yes
21896 else
21897   echo "$as_me:21897: checking for clock_gettime in -lrt" >&5
21898 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
21899 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
21900   echo $ECHO_N "(cached) $ECHO_C" >&6
21901 else
21902   ac_check_lib_save_LIBS=$LIBS
21903 LIBS="-lrt  $LIBS"
21904 cat >"conftest.$ac_ext" <<_ACEOF
21905 #line 21905 "configure"
21906 #include "confdefs.h"
21907
21908 /* Override any gcc2 internal prototype to avoid an error.  */
21909 #ifdef __cplusplus
21910 extern "C"
21911 #endif
21912 /* We use char because int might match the return type of a gcc2
21913    builtin and then its argument prototype would still apply.  */
21914 char clock_gettime (void);
21915 int
21916 main (void)
21917 {
21918 clock_gettime ();
21919   ;
21920   return 0;
21921 }
21922 _ACEOF
21923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21924 if { (eval echo "$as_me:21924: \"$ac_link\"") >&5
21925   (eval $ac_link) 2>&5
21926   ac_status=$?
21927   echo "$as_me:21927: \$? = $ac_status" >&5
21928   (exit "$ac_status"); } &&
21929          { ac_try='test -s "conftest$ac_exeext"'
21930   { (eval echo "$as_me:21930: \"$ac_try\"") >&5
21931   (eval $ac_try) 2>&5
21932   ac_status=$?
21933   echo "$as_me:21933: \$? = $ac_status" >&5
21934   (exit "$ac_status"); }; }; then
21935   ac_cv_lib_rt_clock_gettime=yes
21936 else
21937   echo "$as_me: failed program was:" >&5
21938 cat "conftest.$ac_ext" >&5
21939 ac_cv_lib_rt_clock_gettime=no
21940 fi
21941 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21942 LIBS=$ac_check_lib_save_LIBS
21943 fi
21944 echo "$as_me:21944: result: $ac_cv_lib_rt_clock_gettime" >&5
21945 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
21946 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
21947   LIBS="-lrt $LIBS"
21948                  cf_cv_test_clock_gettime=yes
21949 else
21950   cf_cv_test_clock_gettime=no
21951 fi
21952
21953 fi
21954
21955 if test "$cf_cv_test_clock_gettime" = yes ; then
21956 echo "$as_me:21956: checking if clock_gettime links" >&5
21957 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
21958 if test "${cf_cv_func_clock_gettime+set}" = set; then
21959   echo $ECHO_N "(cached) $ECHO_C" >&6
21960 else
21961
21962                 cat >"conftest.$ac_ext" <<_ACEOF
21963 #line 21963 "configure"
21964 #include "confdefs.h"
21965
21966 $ac_includes_default
21967 #include <time.h>
21968
21969 int
21970 main (void)
21971 {
21972 struct timespec ts;
21973                 int rc = clock_gettime(CLOCK_REALTIME, &ts)
21974                            + clock_gettime(CLOCK_MONOTONIC, &ts);
21975                  (void) rc; (void)ts
21976   ;
21977   return 0;
21978 }
21979 _ACEOF
21980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21981 if { (eval echo "$as_me:21981: \"$ac_link\"") >&5
21982   (eval $ac_link) 2>&5
21983   ac_status=$?
21984   echo "$as_me:21984: \$? = $ac_status" >&5
21985   (exit "$ac_status"); } &&
21986          { ac_try='test -s "conftest$ac_exeext"'
21987   { (eval echo "$as_me:21987: \"$ac_try\"") >&5
21988   (eval $ac_try) 2>&5
21989   ac_status=$?
21990   echo "$as_me:21990: \$? = $ac_status" >&5
21991   (exit "$ac_status"); }; }; then
21992   cf_cv_func_clock_gettime=yes
21993 else
21994   echo "$as_me: failed program was:" >&5
21995 cat "conftest.$ac_ext" >&5
21996 cf_cv_func_clock_gettime=no
21997 fi
21998 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21999
22000 fi
22001 echo "$as_me:22001: result: $cf_cv_func_clock_gettime" >&5
22002 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
22003 else
22004         cf_cv_func_clock_gettime=no
22005 fi
22006
22007 if test "$cf_cv_func_clock_gettime" = yes
22008 then
22009
22010 cat >>confdefs.h <<\EOF
22011 #define HAVE_CLOCK_GETTIME 1
22012 EOF
22013
22014 else
22015 echo "$as_me:22015: checking for gettimeofday" >&5
22016 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
22017 if test "${ac_cv_func_gettimeofday+set}" = set; then
22018   echo $ECHO_N "(cached) $ECHO_C" >&6
22019 else
22020   cat >"conftest.$ac_ext" <<_ACEOF
22021 #line 22021 "configure"
22022 #include "confdefs.h"
22023 #define gettimeofday autoconf_temporary
22024 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22025 #undef gettimeofday
22026
22027 #ifdef __cplusplus
22028 extern "C"
22029 #endif
22030
22031 /* We use char because int might match the return type of a gcc2
22032    builtin and then its argument prototype would still apply.  */
22033 char gettimeofday (void);
22034
22035 int
22036 main (void)
22037 {
22038
22039 /* The GNU C library defines stubs for functions which it implements
22040     to always fail with ENOSYS.  Some functions are actually named
22041     something starting with __ and the normal name is an alias.  */
22042 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
22043 #error found stub for gettimeofday
22044 #endif
22045
22046         return gettimeofday ();
22047   ;
22048   return 0;
22049 }
22050 _ACEOF
22051 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22052 if { (eval echo "$as_me:22052: \"$ac_link\"") >&5
22053   (eval $ac_link) 2>&5
22054   ac_status=$?
22055   echo "$as_me:22055: \$? = $ac_status" >&5
22056   (exit "$ac_status"); } &&
22057          { ac_try='test -s "conftest$ac_exeext"'
22058   { (eval echo "$as_me:22058: \"$ac_try\"") >&5
22059   (eval $ac_try) 2>&5
22060   ac_status=$?
22061   echo "$as_me:22061: \$? = $ac_status" >&5
22062   (exit "$ac_status"); }; }; then
22063   ac_cv_func_gettimeofday=yes
22064 else
22065   echo "$as_me: failed program was:" >&5
22066 cat "conftest.$ac_ext" >&5
22067 ac_cv_func_gettimeofday=no
22068 fi
22069 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22070 fi
22071 echo "$as_me:22071: result: $ac_cv_func_gettimeofday" >&5
22072 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
22073 if test "$ac_cv_func_gettimeofday" = yes; then
22074
22075 cat >>confdefs.h <<\EOF
22076 #define HAVE_GETTIMEOFDAY 1
22077 EOF
22078
22079 else
22080
22081 echo "$as_me:22081: checking for gettimeofday in -lbsd" >&5
22082 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
22083 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
22084   echo $ECHO_N "(cached) $ECHO_C" >&6
22085 else
22086   ac_check_lib_save_LIBS=$LIBS
22087 LIBS="-lbsd  $LIBS"
22088 cat >"conftest.$ac_ext" <<_ACEOF
22089 #line 22089 "configure"
22090 #include "confdefs.h"
22091
22092 /* Override any gcc2 internal prototype to avoid an error.  */
22093 #ifdef __cplusplus
22094 extern "C"
22095 #endif
22096 /* We use char because int might match the return type of a gcc2
22097    builtin and then its argument prototype would still apply.  */
22098 char gettimeofday (void);
22099 int
22100 main (void)
22101 {
22102 gettimeofday ();
22103   ;
22104   return 0;
22105 }
22106 _ACEOF
22107 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22108 if { (eval echo "$as_me:22108: \"$ac_link\"") >&5
22109   (eval $ac_link) 2>&5
22110   ac_status=$?
22111   echo "$as_me:22111: \$? = $ac_status" >&5
22112   (exit "$ac_status"); } &&
22113          { ac_try='test -s "conftest$ac_exeext"'
22114   { (eval echo "$as_me:22114: \"$ac_try\"") >&5
22115   (eval $ac_try) 2>&5
22116   ac_status=$?
22117   echo "$as_me:22117: \$? = $ac_status" >&5
22118   (exit "$ac_status"); }; }; then
22119   ac_cv_lib_bsd_gettimeofday=yes
22120 else
22121   echo "$as_me: failed program was:" >&5
22122 cat "conftest.$ac_ext" >&5
22123 ac_cv_lib_bsd_gettimeofday=no
22124 fi
22125 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22126 LIBS=$ac_check_lib_save_LIBS
22127 fi
22128 echo "$as_me:22128: result: $ac_cv_lib_bsd_gettimeofday" >&5
22129 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
22130 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
22131
22132 cat >>confdefs.h <<\EOF
22133 #define HAVE_GETTIMEOFDAY 1
22134 EOF
22135
22136 cf_add_libs="$LIBS"
22137 # reverse order
22138 cf_add_0lib=
22139 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22140 # filter duplicates
22141 for cf_add_1lib in $cf_add_0lib; do
22142         for cf_add_2lib in $cf_add_libs; do
22143                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22144                         cf_add_1lib=
22145                         break
22146                 fi
22147         done
22148         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22149 done
22150 LIBS="$cf_add_libs"
22151
22152 fi
22153
22154 fi
22155 fi
22156
22157 for ac_func in \
22158 fpathconf \
22159 getcwd \
22160 getauxval \
22161 getegid \
22162 geteuid \
22163 getopt \
22164 getuid \
22165 issetugid \
22166 localeconv \
22167 poll \
22168 remove \
22169 select \
22170 setbuf \
22171 setbuffer \
22172 setfsuid \
22173 setvbuf \
22174 sigaction \
22175 sigvec \
22176 snprintf \
22177 strdup \
22178 strstr \
22179 sysconf \
22180 tcgetpgrp \
22181 times \
22182 tsearch \
22183 vsnprintf \
22184
22185 do
22186 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22187 echo "$as_me:22187: checking for $ac_func" >&5
22188 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22189 if eval "test \"\${$as_ac_var+set}\" = set"; then
22190   echo $ECHO_N "(cached) $ECHO_C" >&6
22191 else
22192   cat >"conftest.$ac_ext" <<_ACEOF
22193 #line 22193 "configure"
22194 #include "confdefs.h"
22195 #define $ac_func autoconf_temporary
22196 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22197 #undef $ac_func
22198
22199 #ifdef __cplusplus
22200 extern "C"
22201 #endif
22202
22203 /* We use char because int might match the return type of a gcc2
22204    builtin and then its argument prototype would still apply.  */
22205 char $ac_func (void);
22206
22207 int
22208 main (void)
22209 {
22210
22211 /* The GNU C library defines stubs for functions which it implements
22212     to always fail with ENOSYS.  Some functions are actually named
22213     something starting with __ and the normal name is an alias.  */
22214 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22215 #error found stub for $ac_func
22216 #endif
22217
22218         return $ac_func ();
22219   ;
22220   return 0;
22221 }
22222 _ACEOF
22223 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22224 if { (eval echo "$as_me:22224: \"$ac_link\"") >&5
22225   (eval $ac_link) 2>&5
22226   ac_status=$?
22227   echo "$as_me:22227: \$? = $ac_status" >&5
22228   (exit "$ac_status"); } &&
22229          { ac_try='test -s "conftest$ac_exeext"'
22230   { (eval echo "$as_me:22230: \"$ac_try\"") >&5
22231   (eval $ac_try) 2>&5
22232   ac_status=$?
22233   echo "$as_me:22233: \$? = $ac_status" >&5
22234   (exit "$ac_status"); }; }; then
22235   eval "$as_ac_var=yes"
22236 else
22237   echo "$as_me: failed program was:" >&5
22238 cat "conftest.$ac_ext" >&5
22239 eval "$as_ac_var=no"
22240 fi
22241 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22242 fi
22243 echo "$as_me:22243: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22244 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22245 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22246   cat >>confdefs.h <<EOF
22247 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22248 EOF
22249
22250 fi
22251 done
22252
22253 echo "$as_me:22253: checking if _PATH_TTYS is defined in ttyent.h" >&5
22254 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
22255 if test "${cf_cv_PATH_TTYS+set}" = set; then
22256   echo $ECHO_N "(cached) $ECHO_C" >&6
22257 else
22258
22259 cat >"conftest.$ac_ext" <<_ACEOF
22260 #line 22260 "configure"
22261 #include "confdefs.h"
22262
22263 #include <stdio.h>
22264 #include <ttyent.h>
22265 int
22266 main (void)
22267 {
22268
22269 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
22270   ;
22271   return 0;
22272 }
22273 _ACEOF
22274 rm -f "conftest.$ac_objext"
22275 if { (eval echo "$as_me:22275: \"$ac_compile\"") >&5
22276   (eval $ac_compile) 2>&5
22277   ac_status=$?
22278   echo "$as_me:22278: \$? = $ac_status" >&5
22279   (exit "$ac_status"); } &&
22280          { ac_try='test -s "conftest.$ac_objext"'
22281   { (eval echo "$as_me:22281: \"$ac_try\"") >&5
22282   (eval $ac_try) 2>&5
22283   ac_status=$?
22284   echo "$as_me:22284: \$? = $ac_status" >&5
22285   (exit "$ac_status"); }; }; then
22286   cf_cv_PATH_TTYS=yes
22287 else
22288   echo "$as_me: failed program was:" >&5
22289 cat "conftest.$ac_ext" >&5
22290 cf_cv_PATH_TTYS=no
22291 fi
22292 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22293 fi
22294 echo "$as_me:22294: result: $cf_cv_PATH_TTYS" >&5
22295 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
22296
22297 if test $cf_cv_PATH_TTYS = no
22298 then
22299         for cf_ttys in /etc/ttytype /etc/ttys
22300         do
22301                 if test -f $cf_ttys
22302                 then
22303                         cf_cv_PATH_TTYS=maybe
22304
22305 cat >>confdefs.h <<\EOF
22306 #define _PATH_TTYS $cf_ttys
22307 EOF
22308
22309                         break
22310                 fi
22311         done
22312 fi
22313
22314 if test $cf_cv_PATH_TTYS != no
22315 then
22316         echo "$as_me:22316: checking if _PATH_TTYS file exists" >&5
22317 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
22318 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
22319   echo $ECHO_N "(cached) $ECHO_C" >&6
22320 else
22321
22322                 if test "$cross_compiling" = yes; then
22323   cf_cv_have_PATH_TTYS=unknown
22324 else
22325   cat >"conftest.$ac_ext" <<_ACEOF
22326 #line 22326 "configure"
22327 #include "confdefs.h"
22328
22329 $ac_includes_default
22330
22331 #include <ttyent.h>
22332
22333 int main(void) {
22334         FILE *fp = fopen(_PATH_TTYS, "r");
22335         ${cf_cv_main_return:-return} (fp == 0);
22336 }
22337 _ACEOF
22338 rm -f "conftest$ac_exeext"
22339 if { (eval echo "$as_me:22339: \"$ac_link\"") >&5
22340   (eval $ac_link) 2>&5
22341   ac_status=$?
22342   echo "$as_me:22342: \$? = $ac_status" >&5
22343   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22344   { (eval echo "$as_me:22344: \"$ac_try\"") >&5
22345   (eval $ac_try) 2>&5
22346   ac_status=$?
22347   echo "$as_me:22347: \$? = $ac_status" >&5
22348   (exit "$ac_status"); }; }; then
22349   cf_cv_have_PATH_TTYS=yes
22350 else
22351   echo "$as_me: program exited with status $ac_status" >&5
22352 echo "$as_me: failed program was:" >&5
22353 cat "conftest.$ac_ext" >&5
22354 cf_cv_have_PATH_TTYS=no
22355 fi
22356 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22357 fi
22358 fi
22359 echo "$as_me:22359: result: $cf_cv_have_PATH_TTYS" >&5
22360 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
22361         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
22362 fi
22363
22364 if test $cf_cv_PATH_TTYS != no
22365 then
22366
22367 cat >>confdefs.h <<\EOF
22368 #define HAVE_PATH_TTYS 1
22369 EOF
22370
22371         echo "$as_me:22371: checking for getttynam" >&5
22372 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
22373 if test "${cf_cv_func_getttynam+set}" = set; then
22374   echo $ECHO_N "(cached) $ECHO_C" >&6
22375 else
22376
22377                 cat >"conftest.$ac_ext" <<_ACEOF
22378 #line 22378 "configure"
22379 #include "confdefs.h"
22380 #include <ttyent.h>
22381 int
22382 main (void)
22383 {
22384 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22385   ;
22386   return 0;
22387 }
22388 _ACEOF
22389 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22390 if { (eval echo "$as_me:22390: \"$ac_link\"") >&5
22391   (eval $ac_link) 2>&5
22392   ac_status=$?
22393   echo "$as_me:22393: \$? = $ac_status" >&5
22394   (exit "$ac_status"); } &&
22395          { ac_try='test -s "conftest$ac_exeext"'
22396   { (eval echo "$as_me:22396: \"$ac_try\"") >&5
22397   (eval $ac_try) 2>&5
22398   ac_status=$?
22399   echo "$as_me:22399: \$? = $ac_status" >&5
22400   (exit "$ac_status"); }; }; then
22401   cf_cv_func_getttynam=yes
22402 else
22403   echo "$as_me: failed program was:" >&5
22404 cat "conftest.$ac_ext" >&5
22405 cf_cv_func_getttynam=no
22406 fi
22407 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22408 fi
22409 echo "$as_me:22409: result: $cf_cv_func_getttynam" >&5
22410 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22411         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
22412 #define HAVE_GETTTYNAM 1
22413 EOF
22414
22415 fi
22416
22417 if test "x$ac_cv_func_getopt" = xno && \
22418    test "x$cf_with_progs$cf_with_tests" != xnono; then
22419         { { echo "$as_me:22419: error: getopt is required for building programs" >&5
22420 echo "$as_me: error: getopt is required for building programs" >&2;}
22421    { (exit 1); exit 1; }; }
22422 fi
22423
22424 if test "x$with_safe_sprintf" = xyes
22425 then
22426         if test "x$ac_cv_func_vsnprintf" = xyes
22427         then
22428                 { echo "$as_me:22428: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22429 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22430         else
22431
22432 cat >>confdefs.h <<\EOF
22433 #define USE_SAFE_SPRINTF 1
22434 EOF
22435
22436         fi
22437 fi
22438
22439 if test "x$with_getcap" = "xyes" ; then
22440
22441 echo "$as_me:22441: checking for terminal-capability database functions" >&5
22442 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22443 if test "${cf_cv_cgetent+set}" = set; then
22444   echo $ECHO_N "(cached) $ECHO_C" >&6
22445 else
22446
22447 cat >"conftest.$ac_ext" <<_ACEOF
22448 #line 22448 "configure"
22449 #include "confdefs.h"
22450
22451 $ac_includes_default
22452 int
22453 main (void)
22454 {
22455
22456         char temp[128];
22457         char *buf = temp;
22458         char *db_array = temp;
22459         cgetent(&buf, &db_array, "vt100");
22460         cgetcap(buf, "tc", '=');
22461         cgetmatch(buf, "tc");
22462
22463   ;
22464   return 0;
22465 }
22466 _ACEOF
22467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22468 if { (eval echo "$as_me:22468: \"$ac_link\"") >&5
22469   (eval $ac_link) 2>&5
22470   ac_status=$?
22471   echo "$as_me:22471: \$? = $ac_status" >&5
22472   (exit "$ac_status"); } &&
22473          { ac_try='test -s "conftest$ac_exeext"'
22474   { (eval echo "$as_me:22474: \"$ac_try\"") >&5
22475   (eval $ac_try) 2>&5
22476   ac_status=$?
22477   echo "$as_me:22477: \$? = $ac_status" >&5
22478   (exit "$ac_status"); }; }; then
22479   cf_cv_cgetent=yes
22480 else
22481   echo "$as_me: failed program was:" >&5
22482 cat "conftest.$ac_ext" >&5
22483 cf_cv_cgetent=no
22484 fi
22485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22486
22487 fi
22488 echo "$as_me:22488: result: $cf_cv_cgetent" >&5
22489 echo "${ECHO_T}$cf_cv_cgetent" >&6
22490
22491 if test "$cf_cv_cgetent" = yes
22492 then
22493
22494 cat >>confdefs.h <<\EOF
22495 #define HAVE_BSD_CGETENT 1
22496 EOF
22497
22498 echo "$as_me:22498: checking if cgetent uses const parameter" >&5
22499 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22500 if test "${cf_cv_cgetent_const+set}" = set; then
22501   echo $ECHO_N "(cached) $ECHO_C" >&6
22502 else
22503
22504 cat >"conftest.$ac_ext" <<_ACEOF
22505 #line 22505 "configure"
22506 #include "confdefs.h"
22507
22508 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22509 $ac_includes_default
22510 int
22511 main (void)
22512 {
22513
22514         char temp[128];
22515         char *buf = temp;
22516 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22517         const char *db_array = temp;
22518         cgetent(&buf, &db_array, "vt100");
22519 #endif
22520         cgetcap(buf, "tc", '=');
22521         cgetmatch(buf, "tc");
22522
22523   ;
22524   return 0;
22525 }
22526 _ACEOF
22527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22528 if { (eval echo "$as_me:22528: \"$ac_link\"") >&5
22529   (eval $ac_link) 2>&5
22530   ac_status=$?
22531   echo "$as_me:22531: \$? = $ac_status" >&5
22532   (exit "$ac_status"); } &&
22533          { ac_try='test -s "conftest$ac_exeext"'
22534   { (eval echo "$as_me:22534: \"$ac_try\"") >&5
22535   (eval $ac_try) 2>&5
22536   ac_status=$?
22537   echo "$as_me:22537: \$? = $ac_status" >&5
22538   (exit "$ac_status"); }; }; then
22539   cf_cv_cgetent_const=yes
22540 else
22541   echo "$as_me: failed program was:" >&5
22542 cat "conftest.$ac_ext" >&5
22543 cf_cv_cgetent_const=no
22544 fi
22545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22546
22547 fi
22548 echo "$as_me:22548: result: $cf_cv_cgetent_const" >&5
22549 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22550         if test "$cf_cv_cgetent_const" = yes
22551         then
22552
22553 cat >>confdefs.h <<EOF
22554 #define CGETENT_CONST const
22555 EOF
22556
22557         fi
22558 fi
22559
22560 fi
22561
22562 echo "$as_me:22562: checking for isascii" >&5
22563 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22564 if test "${cf_cv_have_isascii+set}" = set; then
22565   echo $ECHO_N "(cached) $ECHO_C" >&6
22566 else
22567
22568         cat >"conftest.$ac_ext" <<_ACEOF
22569 #line 22569 "configure"
22570 #include "confdefs.h"
22571 #include <ctype.h>
22572 int
22573 main (void)
22574 {
22575 int x = isascii(' '); (void)x
22576   ;
22577   return 0;
22578 }
22579 _ACEOF
22580 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22581 if { (eval echo "$as_me:22581: \"$ac_link\"") >&5
22582   (eval $ac_link) 2>&5
22583   ac_status=$?
22584   echo "$as_me:22584: \$? = $ac_status" >&5
22585   (exit "$ac_status"); } &&
22586          { ac_try='test -s "conftest$ac_exeext"'
22587   { (eval echo "$as_me:22587: \"$ac_try\"") >&5
22588   (eval $ac_try) 2>&5
22589   ac_status=$?
22590   echo "$as_me:22590: \$? = $ac_status" >&5
22591   (exit "$ac_status"); }; }; then
22592   cf_cv_have_isascii=yes
22593 else
22594   echo "$as_me: failed program was:" >&5
22595 cat "conftest.$ac_ext" >&5
22596 cf_cv_have_isascii=no
22597 fi
22598 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22599
22600 fi
22601 echo "$as_me:22601: result: $cf_cv_have_isascii" >&5
22602 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22603 test "$cf_cv_have_isascii" = yes &&
22604 cat >>confdefs.h <<\EOF
22605 #define HAVE_ISASCII 1
22606 EOF
22607
22608 if test "$ac_cv_func_sigaction" = yes; then
22609 echo "$as_me:22609: checking whether sigaction needs _POSIX_SOURCE" >&5
22610 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22611 cat >"conftest.$ac_ext" <<_ACEOF
22612 #line 22612 "configure"
22613 #include "confdefs.h"
22614
22615 #include <sys/types.h>
22616 #include <signal.h>
22617 int
22618 main (void)
22619 {
22620 struct sigaction act; (void)act
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f "conftest.$ac_objext"
22626 if { (eval echo "$as_me:22626: \"$ac_compile\"") >&5
22627   (eval $ac_compile) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit "$ac_status"); } &&
22631          { ac_try='test -s "conftest.$ac_objext"'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit "$ac_status"); }; }; then
22637   sigact_bad=no
22638 else
22639   echo "$as_me: failed program was:" >&5
22640 cat "conftest.$ac_ext" >&5
22641
22642 cat >"conftest.$ac_ext" <<_ACEOF
22643 #line 22643 "configure"
22644 #include "confdefs.h"
22645
22646 #define _POSIX_SOURCE
22647 #include <sys/types.h>
22648 #include <signal.h>
22649 int
22650 main (void)
22651 {
22652 struct sigaction act; (void)act
22653   ;
22654   return 0;
22655 }
22656 _ACEOF
22657 rm -f "conftest.$ac_objext"
22658 if { (eval echo "$as_me:22658: \"$ac_compile\"") >&5
22659   (eval $ac_compile) 2>&5
22660   ac_status=$?
22661   echo "$as_me:22661: \$? = $ac_status" >&5
22662   (exit "$ac_status"); } &&
22663          { ac_try='test -s "conftest.$ac_objext"'
22664   { (eval echo "$as_me:22664: \"$ac_try\"") >&5
22665   (eval $ac_try) 2>&5
22666   ac_status=$?
22667   echo "$as_me:22667: \$? = $ac_status" >&5
22668   (exit "$ac_status"); }; }; then
22669   sigact_bad=yes
22670
22671 cat >>confdefs.h <<\EOF
22672 #define _POSIX_SOURCE 1
22673 EOF
22674
22675 else
22676   echo "$as_me: failed program was:" >&5
22677 cat "conftest.$ac_ext" >&5
22678 sigact_bad=unknown
22679 fi
22680 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22681 fi
22682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22683 echo "$as_me:22683: result: $sigact_bad" >&5
22684 echo "${ECHO_T}$sigact_bad" >&6
22685 fi
22686
22687 echo "$as_me:22687: checking if nanosleep really works" >&5
22688 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22689 if test "${cf_cv_func_nanosleep+set}" = set; then
22690   echo $ECHO_N "(cached) $ECHO_C" >&6
22691 else
22692
22693 if test "$cross_compiling" = yes; then
22694   cf_cv_func_nanosleep=unknown
22695 else
22696   cat >"conftest.$ac_ext" <<_ACEOF
22697 #line 22697 "configure"
22698 #include "confdefs.h"
22699
22700 $ac_includes_default
22701
22702 #include <errno.h>
22703 #include <time.h>
22704
22705 #ifdef HAVE_SYS_TIME_H
22706 #include <sys/time.h>
22707 #endif
22708
22709 int main(void) {
22710         struct timespec ts1, ts2;
22711         int code;
22712         ts1.tv_sec  = 0;
22713         ts1.tv_nsec = 750000000;
22714         ts2.tv_sec  = 0;
22715         ts2.tv_nsec = 0;
22716         errno = 0;
22717         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22718         ${cf_cv_main_return:-return}(code != 0);
22719 }
22720
22721 _ACEOF
22722 rm -f "conftest$ac_exeext"
22723 if { (eval echo "$as_me:22723: \"$ac_link\"") >&5
22724   (eval $ac_link) 2>&5
22725   ac_status=$?
22726   echo "$as_me:22726: \$? = $ac_status" >&5
22727   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22728   { (eval echo "$as_me:22728: \"$ac_try\"") >&5
22729   (eval $ac_try) 2>&5
22730   ac_status=$?
22731   echo "$as_me:22731: \$? = $ac_status" >&5
22732   (exit "$ac_status"); }; }; then
22733   cf_cv_func_nanosleep=yes
22734 else
22735   echo "$as_me: program exited with status $ac_status" >&5
22736 echo "$as_me: failed program was:" >&5
22737 cat "conftest.$ac_ext" >&5
22738 cf_cv_func_nanosleep=no
22739 fi
22740 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22741 fi
22742 fi
22743 echo "$as_me:22743: result: $cf_cv_func_nanosleep" >&5
22744 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22745
22746 test "$cf_cv_func_nanosleep" = "yes" &&
22747 cat >>confdefs.h <<\EOF
22748 #define HAVE_NANOSLEEP 1
22749 EOF
22750
22751 for ac_header in \
22752 termio.h \
22753 termios.h \
22754 unistd.h \
22755 sys/ioctl.h \
22756 sys/termio.h \
22757
22758 do
22759 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22760 echo "$as_me:22760: checking for $ac_header" >&5
22761 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22762 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22763   echo $ECHO_N "(cached) $ECHO_C" >&6
22764 else
22765   cat >"conftest.$ac_ext" <<_ACEOF
22766 #line 22766 "configure"
22767 #include "confdefs.h"
22768 #include <$ac_header>
22769 _ACEOF
22770 if { (eval echo "$as_me:22770: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22771   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22772   ac_status=$?
22773   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22774   rm -f conftest.er1
22775   cat conftest.err >&5
22776   echo "$as_me:22776: \$? = $ac_status" >&5
22777   (exit "$ac_status"); } >/dev/null; then
22778   if test -s conftest.err; then
22779     ac_cpp_err=$ac_c_preproc_warn_flag
22780   else
22781     ac_cpp_err=
22782   fi
22783 else
22784   ac_cpp_err=yes
22785 fi
22786 if test -z "$ac_cpp_err"; then
22787   eval "$as_ac_Header=yes"
22788 else
22789   echo "$as_me: failed program was:" >&5
22790   cat "conftest.$ac_ext" >&5
22791   eval "$as_ac_Header=no"
22792 fi
22793 rm -f conftest.err "conftest.$ac_ext"
22794 fi
22795 echo "$as_me:22795: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22796 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22797 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22798   cat >>confdefs.h <<EOF
22799 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22800 EOF
22801
22802 fi
22803 done
22804
22805 if test "$ac_cv_header_termios_h" = yes ; then
22806         case "$CFLAGS $CPPFLAGS" in
22807         (*-D_POSIX_SOURCE*)
22808                 termios_bad=dunno ;;
22809         (*)     termios_bad=maybe ;;
22810         esac
22811         if test "$termios_bad" = maybe ; then
22812         echo "$as_me:22812: checking whether termios.h needs _POSIX_SOURCE" >&5
22813 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22814         cat >"conftest.$ac_ext" <<_ACEOF
22815 #line 22815 "configure"
22816 #include "confdefs.h"
22817 #include <termios.h>
22818 int
22819 main (void)
22820 {
22821 struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
22822   ;
22823   return 0;
22824 }
22825 _ACEOF
22826 rm -f "conftest.$ac_objext"
22827 if { (eval echo "$as_me:22827: \"$ac_compile\"") >&5
22828   (eval $ac_compile) 2>&5
22829   ac_status=$?
22830   echo "$as_me:22830: \$? = $ac_status" >&5
22831   (exit "$ac_status"); } &&
22832          { ac_try='test -s "conftest.$ac_objext"'
22833   { (eval echo "$as_me:22833: \"$ac_try\"") >&5
22834   (eval $ac_try) 2>&5
22835   ac_status=$?
22836   echo "$as_me:22836: \$? = $ac_status" >&5
22837   (exit "$ac_status"); }; }; then
22838   termios_bad=no
22839 else
22840   echo "$as_me: failed program was:" >&5
22841 cat "conftest.$ac_ext" >&5
22842
22843                 cat >"conftest.$ac_ext" <<_ACEOF
22844 #line 22844 "configure"
22845 #include "confdefs.h"
22846
22847 #define _POSIX_SOURCE
22848 #include <termios.h>
22849 int
22850 main (void)
22851 {
22852 struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
22853   ;
22854   return 0;
22855 }
22856 _ACEOF
22857 rm -f "conftest.$ac_objext"
22858 if { (eval echo "$as_me:22858: \"$ac_compile\"") >&5
22859   (eval $ac_compile) 2>&5
22860   ac_status=$?
22861   echo "$as_me:22861: \$? = $ac_status" >&5
22862   (exit "$ac_status"); } &&
22863          { ac_try='test -s "conftest.$ac_objext"'
22864   { (eval echo "$as_me:22864: \"$ac_try\"") >&5
22865   (eval $ac_try) 2>&5
22866   ac_status=$?
22867   echo "$as_me:22867: \$? = $ac_status" >&5
22868   (exit "$ac_status"); }; }; then
22869   termios_bad=unknown
22870 else
22871   echo "$as_me: failed program was:" >&5
22872 cat "conftest.$ac_ext" >&5
22873 termios_bad=yes
22874 cat >>confdefs.h <<\EOF
22875 #define _POSIX_SOURCE 1
22876 EOF
22877
22878 fi
22879 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22880
22881 fi
22882 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22883         echo "$as_me:22883: result: $termios_bad" >&5
22884 echo "${ECHO_T}$termios_bad" >&6
22885         fi
22886 fi
22887
22888 echo "$as_me:22888: checking for tcgetattr" >&5
22889 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22890 if test "${cf_cv_have_tcgetattr+set}" = set; then
22891   echo $ECHO_N "(cached) $ECHO_C" >&6
22892 else
22893
22894 cat >"conftest.$ac_ext" <<_ACEOF
22895 #line 22895 "configure"
22896 #include "confdefs.h"
22897
22898 #include <sys/types.h>
22899 #ifdef HAVE_UNISTD_H
22900 #include <unistd.h>
22901 #endif
22902 #ifdef HAVE_TERMIOS_H
22903 #include <termios.h>
22904 #define TTY struct termios
22905 #else
22906 #ifdef HAVE_TERMIO_H
22907 #include <termio.h>
22908 #define TTY struct termio
22909 #endif
22910 #endif
22911
22912 int
22913 main (void)
22914 {
22915
22916 TTY foo;
22917 tcgetattr(1, &foo);
22918   ;
22919   return 0;
22920 }
22921 _ACEOF
22922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22923 if { (eval echo "$as_me:22923: \"$ac_link\"") >&5
22924   (eval $ac_link) 2>&5
22925   ac_status=$?
22926   echo "$as_me:22926: \$? = $ac_status" >&5
22927   (exit "$ac_status"); } &&
22928          { ac_try='test -s "conftest$ac_exeext"'
22929   { (eval echo "$as_me:22929: \"$ac_try\"") >&5
22930   (eval $ac_try) 2>&5
22931   ac_status=$?
22932   echo "$as_me:22932: \$? = $ac_status" >&5
22933   (exit "$ac_status"); }; }; then
22934   cf_cv_have_tcgetattr=yes
22935 else
22936   echo "$as_me: failed program was:" >&5
22937 cat "conftest.$ac_ext" >&5
22938 cf_cv_have_tcgetattr=no
22939 fi
22940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22941 fi
22942 echo "$as_me:22942: result: $cf_cv_have_tcgetattr" >&5
22943 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22944 test "$cf_cv_have_tcgetattr" = yes &&
22945 cat >>confdefs.h <<\EOF
22946 #define HAVE_TCGETATTR 1
22947 EOF
22948
22949 echo "$as_me:22949: checking for vsscanf function or workaround" >&5
22950 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22951 if test "${cf_cv_func_vsscanf+set}" = set; then
22952   echo $ECHO_N "(cached) $ECHO_C" >&6
22953 else
22954
22955 cat >"conftest.$ac_ext" <<_ACEOF
22956 #line 22956 "configure"
22957 #include "confdefs.h"
22958
22959 #include <stdarg.h>
22960 #include <stdio.h>
22961
22962 static void
22963 myfunc(const char *str, const char *fmt, ...)
22964 {
22965         va_list ap;
22966         va_start(ap, fmt);
22967         vsscanf(str, fmt, ap);
22968         va_end(ap);
22969 }
22970
22971 int
22972 main (void)
22973 {
22974
22975         myfunc("55", "%d");
22976
22977   ;
22978   return 0;
22979 }
22980 _ACEOF
22981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22982 if { (eval echo "$as_me:22982: \"$ac_link\"") >&5
22983   (eval $ac_link) 2>&5
22984   ac_status=$?
22985   echo "$as_me:22985: \$? = $ac_status" >&5
22986   (exit "$ac_status"); } &&
22987          { ac_try='test -s "conftest$ac_exeext"'
22988   { (eval echo "$as_me:22988: \"$ac_try\"") >&5
22989   (eval $ac_try) 2>&5
22990   ac_status=$?
22991   echo "$as_me:22991: \$? = $ac_status" >&5
22992   (exit "$ac_status"); }; }; then
22993   cf_cv_func_vsscanf=vsscanf
22994 else
22995   echo "$as_me: failed program was:" >&5
22996 cat "conftest.$ac_ext" >&5
22997
22998 cat >"conftest.$ac_ext" <<_ACEOF
22999 #line 22999 "configure"
23000 #include "confdefs.h"
23001
23002 #include <stdarg.h>
23003 #include <stdio.h>
23004 int
23005 main (void)
23006 {
23007
23008         FILE strbuf;
23009         char *str = "from";
23010
23011         strbuf._flag = _IOREAD;
23012         strbuf._ptr = strbuf._base = (unsigned char *) str;
23013         strbuf._cnt = strlen(str);
23014         strbuf._file = _NFILE;
23015         return (vfscanf(&strbuf, "%d", ap))
23016   ;
23017   return 0;
23018 }
23019 _ACEOF
23020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23021 if { (eval echo "$as_me:23021: \"$ac_link\"") >&5
23022   (eval $ac_link) 2>&5
23023   ac_status=$?
23024   echo "$as_me:23024: \$? = $ac_status" >&5
23025   (exit "$ac_status"); } &&
23026          { ac_try='test -s "conftest$ac_exeext"'
23027   { (eval echo "$as_me:23027: \"$ac_try\"") >&5
23028   (eval $ac_try) 2>&5
23029   ac_status=$?
23030   echo "$as_me:23030: \$? = $ac_status" >&5
23031   (exit "$ac_status"); }; }; then
23032   cf_cv_func_vsscanf=vfscanf
23033 else
23034   echo "$as_me: failed program was:" >&5
23035 cat "conftest.$ac_ext" >&5
23036
23037 cat >"conftest.$ac_ext" <<_ACEOF
23038 #line 23038 "configure"
23039 #include "confdefs.h"
23040
23041 #include <stdarg.h>
23042 #include <stdio.h>
23043 int
23044 main (void)
23045 {
23046
23047         FILE strbuf;
23048         char *str = "from";
23049
23050         strbuf._flag = _IOREAD;
23051         strbuf._ptr = strbuf._base = (unsigned char *) str;
23052         strbuf._cnt = strlen(str);
23053         strbuf._file = _NFILE;
23054         return (_doscan(&strbuf, "%d", ap))
23055   ;
23056   return 0;
23057 }
23058 _ACEOF
23059 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23060 if { (eval echo "$as_me:23060: \"$ac_link\"") >&5
23061   (eval $ac_link) 2>&5
23062   ac_status=$?
23063   echo "$as_me:23063: \$? = $ac_status" >&5
23064   (exit "$ac_status"); } &&
23065          { ac_try='test -s "conftest$ac_exeext"'
23066   { (eval echo "$as_me:23066: \"$ac_try\"") >&5
23067   (eval $ac_try) 2>&5
23068   ac_status=$?
23069   echo "$as_me:23069: \$? = $ac_status" >&5
23070   (exit "$ac_status"); }; }; then
23071   cf_cv_func_vsscanf=_doscan
23072 else
23073   echo "$as_me: failed program was:" >&5
23074 cat "conftest.$ac_ext" >&5
23075
23076 cf_cv_func_vsscanf=no
23077 fi
23078 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23079 fi
23080 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23081 fi
23082 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23083 fi
23084 echo "$as_me:23084: result: $cf_cv_func_vsscanf" >&5
23085 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
23086
23087 case "$cf_cv_func_vsscanf" in
23088 (vsscanf)
23089 cat >>confdefs.h <<\EOF
23090 #define HAVE_VSSCANF 1
23091 EOF
23092 ;;
23093 (vfscanf)
23094 cat >>confdefs.h <<\EOF
23095 #define HAVE_VFSCANF 1
23096 EOF
23097 ;;
23098 (_doscan)
23099 cat >>confdefs.h <<\EOF
23100 #define HAVE__DOSCAN 1
23101 EOF
23102 ;;
23103 esac
23104
23105 for ac_header in \
23106 unistd.h \
23107
23108 do
23109 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23110 echo "$as_me:23110: checking for $ac_header" >&5
23111 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23112 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23113   echo $ECHO_N "(cached) $ECHO_C" >&6
23114 else
23115   cat >"conftest.$ac_ext" <<_ACEOF
23116 #line 23116 "configure"
23117 #include "confdefs.h"
23118 #include <$ac_header>
23119 _ACEOF
23120 if { (eval echo "$as_me:23120: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23121   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23122   ac_status=$?
23123   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23124   rm -f conftest.er1
23125   cat conftest.err >&5
23126   echo "$as_me:23126: \$? = $ac_status" >&5
23127   (exit "$ac_status"); } >/dev/null; then
23128   if test -s conftest.err; then
23129     ac_cpp_err=$ac_c_preproc_warn_flag
23130   else
23131     ac_cpp_err=
23132   fi
23133 else
23134   ac_cpp_err=yes
23135 fi
23136 if test -z "$ac_cpp_err"; then
23137   eval "$as_ac_Header=yes"
23138 else
23139   echo "$as_me: failed program was:" >&5
23140   cat "conftest.$ac_ext" >&5
23141   eval "$as_ac_Header=no"
23142 fi
23143 rm -f conftest.err "conftest.$ac_ext"
23144 fi
23145 echo "$as_me:23145: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23146 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23147 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23148   cat >>confdefs.h <<EOF
23149 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23150 EOF
23151
23152 fi
23153 done
23154
23155 echo "$as_me:23155: checking for working mkstemp" >&5
23156 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
23157 if test "${cf_cv_func_mkstemp+set}" = set; then
23158   echo $ECHO_N "(cached) $ECHO_C" >&6
23159 else
23160
23161 rm -rf ./conftest*
23162 if test "$cross_compiling" = yes; then
23163   cf_cv_func_mkstemp=maybe
23164 else
23165   cat >"conftest.$ac_ext" <<_ACEOF
23166 #line 23166 "configure"
23167 #include "confdefs.h"
23168
23169 $ac_includes_default
23170
23171 int main(void)
23172 {
23173         static char tmpl[] = "conftestXXXXXX";
23174         char name[2][80];
23175         int n;
23176         int result = 0;
23177         int fd;
23178         struct stat sb;
23179
23180         umask(077);
23181         for (n = 0; n < 2; ++n) {
23182                 strcpy(name[n], tmpl);
23183                 if ((fd = mkstemp(name[n])) >= 0) {
23184                         if (!strcmp(name[n], tmpl)
23185                          || stat(name[n], &sb) != 0
23186                          || (sb.st_mode & S_IFMT) != S_IFREG
23187                          || (sb.st_mode & 077) != 0) {
23188                                 result = 1;
23189                         }
23190                         close(fd);
23191                 }
23192         }
23193         if (result == 0
23194          && !strcmp(name[0], name[1]))
23195                 result = 1;
23196         ${cf_cv_main_return:-return}(result);
23197 }
23198
23199 _ACEOF
23200 rm -f "conftest$ac_exeext"
23201 if { (eval echo "$as_me:23201: \"$ac_link\"") >&5
23202   (eval $ac_link) 2>&5
23203   ac_status=$?
23204   echo "$as_me:23204: \$? = $ac_status" >&5
23205   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23206   { (eval echo "$as_me:23206: \"$ac_try\"") >&5
23207   (eval $ac_try) 2>&5
23208   ac_status=$?
23209   echo "$as_me:23209: \$? = $ac_status" >&5
23210   (exit "$ac_status"); }; }; then
23211   cf_cv_func_mkstemp=yes
23212
23213 else
23214   echo "$as_me: program exited with status $ac_status" >&5
23215 echo "$as_me: failed program was:" >&5
23216 cat "conftest.$ac_ext" >&5
23217 cf_cv_func_mkstemp=no
23218
23219 fi
23220 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23221 fi
23222
23223 fi
23224 echo "$as_me:23224: result: $cf_cv_func_mkstemp" >&5
23225 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
23226 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
23227         echo "$as_me:23227: checking for mkstemp" >&5
23228 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
23229 if test "${ac_cv_func_mkstemp+set}" = set; then
23230   echo $ECHO_N "(cached) $ECHO_C" >&6
23231 else
23232   cat >"conftest.$ac_ext" <<_ACEOF
23233 #line 23233 "configure"
23234 #include "confdefs.h"
23235 #define mkstemp autoconf_temporary
23236 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23237 #undef mkstemp
23238
23239 #ifdef __cplusplus
23240 extern "C"
23241 #endif
23242
23243 /* We use char because int might match the return type of a gcc2
23244    builtin and then its argument prototype would still apply.  */
23245 char mkstemp (void);
23246
23247 int
23248 main (void)
23249 {
23250
23251 /* The GNU C library defines stubs for functions which it implements
23252     to always fail with ENOSYS.  Some functions are actually named
23253     something starting with __ and the normal name is an alias.  */
23254 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
23255 #error found stub for mkstemp
23256 #endif
23257
23258         return mkstemp ();
23259   ;
23260   return 0;
23261 }
23262 _ACEOF
23263 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23264 if { (eval echo "$as_me:23264: \"$ac_link\"") >&5
23265   (eval $ac_link) 2>&5
23266   ac_status=$?
23267   echo "$as_me:23267: \$? = $ac_status" >&5
23268   (exit "$ac_status"); } &&
23269          { ac_try='test -s "conftest$ac_exeext"'
23270   { (eval echo "$as_me:23270: \"$ac_try\"") >&5
23271   (eval $ac_try) 2>&5
23272   ac_status=$?
23273   echo "$as_me:23273: \$? = $ac_status" >&5
23274   (exit "$ac_status"); }; }; then
23275   ac_cv_func_mkstemp=yes
23276 else
23277   echo "$as_me: failed program was:" >&5
23278 cat "conftest.$ac_ext" >&5
23279 ac_cv_func_mkstemp=no
23280 fi
23281 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23282 fi
23283 echo "$as_me:23283: result: $ac_cv_func_mkstemp" >&5
23284 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
23285
23286 fi
23287 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
23288
23289 cat >>confdefs.h <<\EOF
23290 #define HAVE_MKSTEMP 1
23291 EOF
23292
23293 fi
23294
23295 # setup for prototype of fallback for vsscanf()
23296
23297 if test "$cf_cv_func_vsscanf" = vsscanf ; then
23298         HAVE_VSSCANF=1
23299 else
23300         HAVE_VSSCANF=0
23301 fi
23302
23303 if test "x$cross_compiling" = xyes ; then
23304         { echo "$as_me:23304: WARNING: cross compiling: assume setvbuf params not reversed" >&5
23305 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
23306 else
23307         echo "$as_me:23307: checking whether setvbuf arguments are reversed" >&5
23308 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
23309 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
23310   echo $ECHO_N "(cached) $ECHO_C" >&6
23311 else
23312   if test "$cross_compiling" = yes; then
23313   { { echo "$as_me:23313: error: cannot run test program while cross compiling" >&5
23314 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23315    { (exit 1); exit 1; }; }
23316 else
23317   cat >"conftest.$ac_ext" <<_ACEOF
23318 #line 23318 "configure"
23319 #include "confdefs.h"
23320 #include <stdio.h>
23321 /* If setvbuf has the reversed format, exit 0. */
23322 int
23323 main (void)
23324 {
23325   /* This call has the arguments reversed.
23326      A reversed system may check and see that the address of main
23327      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
23328   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
23329     $ac_main_return(1);
23330   putc('\r', stdout);
23331   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
23332 }
23333 _ACEOF
23334 rm -f "conftest$ac_exeext"
23335 if { (eval echo "$as_me:23335: \"$ac_link\"") >&5
23336   (eval $ac_link) 2>&5
23337   ac_status=$?
23338   echo "$as_me:23338: \$? = $ac_status" >&5
23339   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23340   { (eval echo "$as_me:23340: \"$ac_try\"") >&5
23341   (eval $ac_try) 2>&5
23342   ac_status=$?
23343   echo "$as_me:23343: \$? = $ac_status" >&5
23344   (exit "$ac_status"); }; }; then
23345   ac_cv_func_setvbuf_reversed=yes
23346 else
23347   echo "$as_me: program exited with status $ac_status" >&5
23348 echo "$as_me: failed program was:" >&5
23349 cat "conftest.$ac_ext" >&5
23350 ac_cv_func_setvbuf_reversed=no
23351 fi
23352 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23353 fi
23354 rm -f core ./core.* ./*.core
23355 fi
23356 echo "$as_me:23356: result: $ac_cv_func_setvbuf_reversed" >&5
23357 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
23358 if test $ac_cv_func_setvbuf_reversed = yes; then
23359
23360 cat >>confdefs.h <<\EOF
23361 #define SETVBUF_REVERSED 1
23362 EOF
23363
23364 fi
23365
23366 fi
23367 echo "$as_me:23367: checking for intptr_t" >&5
23368 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
23369 if test "${ac_cv_type_intptr_t+set}" = set; then
23370   echo $ECHO_N "(cached) $ECHO_C" >&6
23371 else
23372   cat >"conftest.$ac_ext" <<_ACEOF
23373 #line 23373 "configure"
23374 #include "confdefs.h"
23375 $ac_includes_default
23376 int
23377 main (void)
23378 {
23379 if ((intptr_t *) 0)
23380   return 0;
23381 if (sizeof (intptr_t))
23382   return 0;
23383   ;
23384   return 0;
23385 }
23386 _ACEOF
23387 rm -f "conftest.$ac_objext"
23388 if { (eval echo "$as_me:23388: \"$ac_compile\"") >&5
23389   (eval $ac_compile) 2>&5
23390   ac_status=$?
23391   echo "$as_me:23391: \$? = $ac_status" >&5
23392   (exit "$ac_status"); } &&
23393          { ac_try='test -s "conftest.$ac_objext"'
23394   { (eval echo "$as_me:23394: \"$ac_try\"") >&5
23395   (eval $ac_try) 2>&5
23396   ac_status=$?
23397   echo "$as_me:23397: \$? = $ac_status" >&5
23398   (exit "$ac_status"); }; }; then
23399   ac_cv_type_intptr_t=yes
23400 else
23401   echo "$as_me: failed program was:" >&5
23402 cat "conftest.$ac_ext" >&5
23403 ac_cv_type_intptr_t=no
23404 fi
23405 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23406 fi
23407 echo "$as_me:23407: result: $ac_cv_type_intptr_t" >&5
23408 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
23409 if test "$ac_cv_type_intptr_t" = yes; then
23410   :
23411 else
23412
23413 cat >>confdefs.h <<EOF
23414 #define intptr_t long
23415 EOF
23416
23417 fi
23418
23419 echo "$as_me:23419: checking for ssize_t" >&5
23420 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23421 if test "${ac_cv_type_ssize_t+set}" = set; then
23422   echo $ECHO_N "(cached) $ECHO_C" >&6
23423 else
23424   cat >"conftest.$ac_ext" <<_ACEOF
23425 #line 23425 "configure"
23426 #include "confdefs.h"
23427 $ac_includes_default
23428 int
23429 main (void)
23430 {
23431 if ((ssize_t *) 0)
23432   return 0;
23433 if (sizeof (ssize_t))
23434   return 0;
23435   ;
23436   return 0;
23437 }
23438 _ACEOF
23439 rm -f "conftest.$ac_objext"
23440 if { (eval echo "$as_me:23440: \"$ac_compile\"") >&5
23441   (eval $ac_compile) 2>&5
23442   ac_status=$?
23443   echo "$as_me:23443: \$? = $ac_status" >&5
23444   (exit "$ac_status"); } &&
23445          { ac_try='test -s "conftest.$ac_objext"'
23446   { (eval echo "$as_me:23446: \"$ac_try\"") >&5
23447   (eval $ac_try) 2>&5
23448   ac_status=$?
23449   echo "$as_me:23449: \$? = $ac_status" >&5
23450   (exit "$ac_status"); }; }; then
23451   ac_cv_type_ssize_t=yes
23452 else
23453   echo "$as_me: failed program was:" >&5
23454 cat "conftest.$ac_ext" >&5
23455 ac_cv_type_ssize_t=no
23456 fi
23457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23458 fi
23459 echo "$as_me:23459: result: $ac_cv_type_ssize_t" >&5
23460 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23461 if test "$ac_cv_type_ssize_t" = yes; then
23462   :
23463 else
23464
23465 cat >>confdefs.h <<EOF
23466 #define ssize_t int
23467 EOF
23468
23469 fi
23470
23471 echo "$as_me:23471: checking for type sigaction_t" >&5
23472 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23473 if test "${cf_cv_type_sigaction+set}" = set; then
23474   echo $ECHO_N "(cached) $ECHO_C" >&6
23475 else
23476
23477         cat >"conftest.$ac_ext" <<_ACEOF
23478 #line 23478 "configure"
23479 #include "confdefs.h"
23480
23481 #include <signal.h>
23482 int
23483 main (void)
23484 {
23485 sigaction_t x; (void)x
23486   ;
23487   return 0;
23488 }
23489 _ACEOF
23490 rm -f "conftest.$ac_objext"
23491 if { (eval echo "$as_me:23491: \"$ac_compile\"") >&5
23492   (eval $ac_compile) 2>&5
23493   ac_status=$?
23494   echo "$as_me:23494: \$? = $ac_status" >&5
23495   (exit "$ac_status"); } &&
23496          { ac_try='test -s "conftest.$ac_objext"'
23497   { (eval echo "$as_me:23497: \"$ac_try\"") >&5
23498   (eval $ac_try) 2>&5
23499   ac_status=$?
23500   echo "$as_me:23500: \$? = $ac_status" >&5
23501   (exit "$ac_status"); }; }; then
23502   cf_cv_type_sigaction=yes
23503 else
23504   echo "$as_me: failed program was:" >&5
23505 cat "conftest.$ac_ext" >&5
23506 cf_cv_type_sigaction=no
23507 fi
23508 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23509 fi
23510
23511 echo "$as_me:23511: result: $cf_cv_type_sigaction" >&5
23512 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23513 test "$cf_cv_type_sigaction" = yes &&
23514 cat >>confdefs.h <<\EOF
23515 #define HAVE_TYPE_SIGACTION 1
23516 EOF
23517
23518 echo "$as_me:23518: checking declaration of size-change" >&5
23519 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23520 if test "${cf_cv_sizechange+set}" = set; then
23521   echo $ECHO_N "(cached) $ECHO_C" >&6
23522 else
23523
23524         cf_cv_sizechange=unknown
23525         cf_save_CPPFLAGS="$CPPFLAGS"
23526
23527 for cf_opts in "" "NEED_PTEM_H"
23528 do
23529
23530         CPPFLAGS="$cf_save_CPPFLAGS"
23531         if test -n "$cf_opts"
23532         then
23533
23534         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23535         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23536
23537         fi
23538         cat >"conftest.$ac_ext" <<_ACEOF
23539 #line 23539 "configure"
23540 #include "confdefs.h"
23541 #include <sys/types.h>
23542 #ifdef HAVE_TERMIOS_H
23543 #include <termios.h>
23544 #else
23545 #ifdef HAVE_TERMIO_H
23546 #include <termio.h>
23547 #endif
23548 #endif
23549
23550 #ifdef NEED_PTEM_H
23551 /* This is a workaround for SCO:  they neglected to define struct winsize in
23552  * termios.h -- it is only in termio.h and ptem.h
23553  */
23554 #include <sys/stream.h>
23555 #include <sys/ptem.h>
23556 #endif
23557
23558 #ifdef HAVE_SYS_IOCTL_H
23559 #include <sys/ioctl.h>
23560 #endif
23561
23562 int
23563 main (void)
23564 {
23565
23566 #ifdef TIOCGSIZE
23567         struct ttysize win;     /* SunOS 3.0... */
23568         int y = win.ts_lines = 2;
23569         int x = win.ts_cols = 1;
23570         (void)y;
23571         (void)x;
23572 #else
23573 #ifdef TIOCGWINSZ
23574         struct winsize win;     /* everything else */
23575         int y = win.ws_row = 2;
23576         int x = win.ws_col = 1;
23577         (void)y;
23578         (void)x;
23579 #else
23580         no TIOCGSIZE or TIOCGWINSZ
23581 #endif /* TIOCGWINSZ */
23582 #endif /* TIOCGSIZE */
23583
23584   ;
23585   return 0;
23586 }
23587 _ACEOF
23588 rm -f "conftest.$ac_objext"
23589 if { (eval echo "$as_me:23589: \"$ac_compile\"") >&5
23590   (eval $ac_compile) 2>&5
23591   ac_status=$?
23592   echo "$as_me:23592: \$? = $ac_status" >&5
23593   (exit "$ac_status"); } &&
23594          { ac_try='test -s "conftest.$ac_objext"'
23595   { (eval echo "$as_me:23595: \"$ac_try\"") >&5
23596   (eval $ac_try) 2>&5
23597   ac_status=$?
23598   echo "$as_me:23598: \$? = $ac_status" >&5
23599   (exit "$ac_status"); }; }; then
23600   cf_cv_sizechange=yes
23601 else
23602   echo "$as_me: failed program was:" >&5
23603 cat "conftest.$ac_ext" >&5
23604 cf_cv_sizechange=no
23605 fi
23606 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23607
23608         CPPFLAGS="$cf_save_CPPFLAGS"
23609         if test "$cf_cv_sizechange" = yes ; then
23610                 echo "size-change succeeded ($cf_opts)" >&5
23611                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23612                 break
23613         fi
23614 done
23615
23616 fi
23617 echo "$as_me:23617: result: $cf_cv_sizechange" >&5
23618 echo "${ECHO_T}$cf_cv_sizechange" >&6
23619 if test "$cf_cv_sizechange" != no ; then
23620
23621 cat >>confdefs.h <<\EOF
23622 #define HAVE_SIZECHANGE 1
23623 EOF
23624
23625         case "$cf_cv_sizechange" in
23626         (NEED*)
23627                 cat >>confdefs.h <<EOF
23628 #define $cf_cv_sizechange  1
23629 EOF
23630
23631                 ;;
23632         esac
23633 fi
23634
23635 echo "$as_me:23635: checking for memmove" >&5
23636 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23637 if test "${ac_cv_func_memmove+set}" = set; then
23638   echo $ECHO_N "(cached) $ECHO_C" >&6
23639 else
23640   cat >"conftest.$ac_ext" <<_ACEOF
23641 #line 23641 "configure"
23642 #include "confdefs.h"
23643 #define memmove autoconf_temporary
23644 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23645 #undef memmove
23646
23647 #ifdef __cplusplus
23648 extern "C"
23649 #endif
23650
23651 /* We use char because int might match the return type of a gcc2
23652    builtin and then its argument prototype would still apply.  */
23653 char memmove (void);
23654
23655 int
23656 main (void)
23657 {
23658
23659 /* The GNU C library defines stubs for functions which it implements
23660     to always fail with ENOSYS.  Some functions are actually named
23661     something starting with __ and the normal name is an alias.  */
23662 #if defined (__stub_memmove) || defined (__stub___memmove)
23663 #error found stub for memmove
23664 #endif
23665
23666         return memmove ();
23667   ;
23668   return 0;
23669 }
23670 _ACEOF
23671 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23672 if { (eval echo "$as_me:23672: \"$ac_link\"") >&5
23673   (eval $ac_link) 2>&5
23674   ac_status=$?
23675   echo "$as_me:23675: \$? = $ac_status" >&5
23676   (exit "$ac_status"); } &&
23677          { ac_try='test -s "conftest$ac_exeext"'
23678   { (eval echo "$as_me:23678: \"$ac_try\"") >&5
23679   (eval $ac_try) 2>&5
23680   ac_status=$?
23681   echo "$as_me:23681: \$? = $ac_status" >&5
23682   (exit "$ac_status"); }; }; then
23683   ac_cv_func_memmove=yes
23684 else
23685   echo "$as_me: failed program was:" >&5
23686 cat "conftest.$ac_ext" >&5
23687 ac_cv_func_memmove=no
23688 fi
23689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23690 fi
23691 echo "$as_me:23691: result: $ac_cv_func_memmove" >&5
23692 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23693 if test "$ac_cv_func_memmove" = yes; then
23694   :
23695 else
23696
23697 echo "$as_me:23697: checking for bcopy" >&5
23698 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23699 if test "${ac_cv_func_bcopy+set}" = set; then
23700   echo $ECHO_N "(cached) $ECHO_C" >&6
23701 else
23702   cat >"conftest.$ac_ext" <<_ACEOF
23703 #line 23703 "configure"
23704 #include "confdefs.h"
23705 #define bcopy autoconf_temporary
23706 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23707 #undef bcopy
23708
23709 #ifdef __cplusplus
23710 extern "C"
23711 #endif
23712
23713 /* We use char because int might match the return type of a gcc2
23714    builtin and then its argument prototype would still apply.  */
23715 char bcopy (void);
23716
23717 int
23718 main (void)
23719 {
23720
23721 /* The GNU C library defines stubs for functions which it implements
23722     to always fail with ENOSYS.  Some functions are actually named
23723     something starting with __ and the normal name is an alias.  */
23724 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23725 #error found stub for bcopy
23726 #endif
23727
23728         return bcopy ();
23729   ;
23730   return 0;
23731 }
23732 _ACEOF
23733 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23734 if { (eval echo "$as_me:23734: \"$ac_link\"") >&5
23735   (eval $ac_link) 2>&5
23736   ac_status=$?
23737   echo "$as_me:23737: \$? = $ac_status" >&5
23738   (exit "$ac_status"); } &&
23739          { ac_try='test -s "conftest$ac_exeext"'
23740   { (eval echo "$as_me:23740: \"$ac_try\"") >&5
23741   (eval $ac_try) 2>&5
23742   ac_status=$?
23743   echo "$as_me:23743: \$? = $ac_status" >&5
23744   (exit "$ac_status"); }; }; then
23745   ac_cv_func_bcopy=yes
23746 else
23747   echo "$as_me: failed program was:" >&5
23748 cat "conftest.$ac_ext" >&5
23749 ac_cv_func_bcopy=no
23750 fi
23751 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23752 fi
23753 echo "$as_me:23753: result: $ac_cv_func_bcopy" >&5
23754 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23755 if test "$ac_cv_func_bcopy" = yes; then
23756
23757         echo "$as_me:23757: checking if bcopy does overlapping moves" >&5
23758 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23759 if test "${cf_cv_good_bcopy+set}" = set; then
23760   echo $ECHO_N "(cached) $ECHO_C" >&6
23761 else
23762
23763                 if test "$cross_compiling" = yes; then
23764   cf_cv_good_bcopy=unknown
23765 else
23766   cat >"conftest.$ac_ext" <<_ACEOF
23767 #line 23767 "configure"
23768 #include "confdefs.h"
23769
23770 $ac_includes_default
23771
23772 int main(void) {
23773         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23774         char temp[40];
23775         bcopy(data, temp, sizeof(data));
23776         bcopy(temp+10, temp, 15);
23777         bcopy(temp+5, temp+15, 10);
23778         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23779 }
23780
23781 _ACEOF
23782 rm -f "conftest$ac_exeext"
23783 if { (eval echo "$as_me:23783: \"$ac_link\"") >&5
23784   (eval $ac_link) 2>&5
23785   ac_status=$?
23786   echo "$as_me:23786: \$? = $ac_status" >&5
23787   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23788   { (eval echo "$as_me:23788: \"$ac_try\"") >&5
23789   (eval $ac_try) 2>&5
23790   ac_status=$?
23791   echo "$as_me:23791: \$? = $ac_status" >&5
23792   (exit "$ac_status"); }; }; then
23793   cf_cv_good_bcopy=yes
23794 else
23795   echo "$as_me: program exited with status $ac_status" >&5
23796 echo "$as_me: failed program was:" >&5
23797 cat "conftest.$ac_ext" >&5
23798 cf_cv_good_bcopy=no
23799 fi
23800 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23801 fi
23802
23803 fi
23804 echo "$as_me:23804: result: $cf_cv_good_bcopy" >&5
23805 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23806
23807 else
23808   cf_cv_good_bcopy=no
23809 fi
23810
23811         if test "$cf_cv_good_bcopy" = yes ; then
23812
23813 cat >>confdefs.h <<\EOF
23814 #define USE_OK_BCOPY 1
23815 EOF
23816
23817         else
23818
23819 cat >>confdefs.h <<\EOF
23820 #define USE_MY_MEMMOVE 1
23821 EOF
23822
23823         fi
23824
23825 fi
23826
23827 tty >/dev/null 2>&1 || {
23828 for ac_func in posix_openpt
23829 do
23830 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23831 echo "$as_me:23831: checking for $ac_func" >&5
23832 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23833 if eval "test \"\${$as_ac_var+set}\" = set"; then
23834   echo $ECHO_N "(cached) $ECHO_C" >&6
23835 else
23836   cat >"conftest.$ac_ext" <<_ACEOF
23837 #line 23837 "configure"
23838 #include "confdefs.h"
23839 #define $ac_func autoconf_temporary
23840 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23841 #undef $ac_func
23842
23843 #ifdef __cplusplus
23844 extern "C"
23845 #endif
23846
23847 /* We use char because int might match the return type of a gcc2
23848    builtin and then its argument prototype would still apply.  */
23849 char $ac_func (void);
23850
23851 int
23852 main (void)
23853 {
23854
23855 /* The GNU C library defines stubs for functions which it implements
23856     to always fail with ENOSYS.  Some functions are actually named
23857     something starting with __ and the normal name is an alias.  */
23858 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23859 #error found stub for $ac_func
23860 #endif
23861
23862         return $ac_func ();
23863   ;
23864   return 0;
23865 }
23866 _ACEOF
23867 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23868 if { (eval echo "$as_me:23868: \"$ac_link\"") >&5
23869   (eval $ac_link) 2>&5
23870   ac_status=$?
23871   echo "$as_me:23871: \$? = $ac_status" >&5
23872   (exit "$ac_status"); } &&
23873          { ac_try='test -s "conftest$ac_exeext"'
23874   { (eval echo "$as_me:23874: \"$ac_try\"") >&5
23875   (eval $ac_try) 2>&5
23876   ac_status=$?
23877   echo "$as_me:23877: \$? = $ac_status" >&5
23878   (exit "$ac_status"); }; }; then
23879   eval "$as_ac_var=yes"
23880 else
23881   echo "$as_me: failed program was:" >&5
23882 cat "conftest.$ac_ext" >&5
23883 eval "$as_ac_var=no"
23884 fi
23885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23886 fi
23887 echo "$as_me:23887: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23888 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23889 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23890   cat >>confdefs.h <<EOF
23891 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23892 EOF
23893
23894 fi
23895 done
23896  }
23897 echo "$as_me:23897: checking if poll really works" >&5
23898 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23899 if test "${cf_cv_working_poll+set}" = set; then
23900   echo $ECHO_N "(cached) $ECHO_C" >&6
23901 else
23902
23903 if test "$cross_compiling" = yes; then
23904   cf_cv_working_poll=unknown
23905 else
23906   cat >"conftest.$ac_ext" <<_ACEOF
23907 #line 23907 "configure"
23908 #include "confdefs.h"
23909
23910 $ac_includes_default
23911
23912 #include <fcntl.h>
23913
23914 #ifdef HAVE_POLL_H
23915 #include <poll.h>
23916 #else
23917 #include <sys/poll.h>
23918 #endif
23919
23920 int main(void) {
23921         struct pollfd myfds;
23922         int ret;
23923
23924         /* check for Darwin bug with respect to "devices" */
23925         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23926         if (myfds.fd < 0)
23927                 myfds.fd = 0;
23928         myfds.events = POLLIN;
23929         myfds.revents = 0;
23930
23931         ret = poll(&myfds, 1, 100);
23932
23933         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23934                 ret = -1;
23935         } else {
23936                 int fd = 0;
23937                 if (!isatty(fd)) {
23938                         fd = open("/dev/tty", 2);       /* O_RDWR */
23939                 }
23940 #ifdef HAVE_POSIX_OPENPT
23941                 if (fd < 0) {
23942                         fd = posix_openpt(O_RDWR);
23943                 }
23944 #endif
23945
23946                 if (fd >= 0) {
23947                         /* also check with standard input */
23948                         myfds.fd = fd;
23949                         myfds.events = POLLIN;
23950                         myfds.revents = 0;
23951                         ret = poll(&myfds, 1, 100);
23952                 } else {
23953                         ret = -1;
23954                 }
23955         }
23956         ${cf_cv_main_return:-return}(ret < 0);
23957 }
23958 _ACEOF
23959 rm -f "conftest$ac_exeext"
23960 if { (eval echo "$as_me:23960: \"$ac_link\"") >&5
23961   (eval $ac_link) 2>&5
23962   ac_status=$?
23963   echo "$as_me:23963: \$? = $ac_status" >&5
23964   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23965   { (eval echo "$as_me:23965: \"$ac_try\"") >&5
23966   (eval $ac_try) 2>&5
23967   ac_status=$?
23968   echo "$as_me:23968: \$? = $ac_status" >&5
23969   (exit "$ac_status"); }; }; then
23970   cf_cv_working_poll=yes
23971 else
23972   echo "$as_me: program exited with status $ac_status" >&5
23973 echo "$as_me: failed program was:" >&5
23974 cat "conftest.$ac_ext" >&5
23975 cf_cv_working_poll=no
23976 fi
23977 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23978 fi
23979 fi
23980 echo "$as_me:23980: result: $cf_cv_working_poll" >&5
23981 echo "${ECHO_T}$cf_cv_working_poll" >&6
23982 test "$cf_cv_working_poll" = "yes" &&
23983 cat >>confdefs.h <<\EOF
23984 #define HAVE_WORKING_POLL 1
23985 EOF
23986
23987 echo "$as_me:23987: checking if MB_LEN_MAX is usable" >&5
23988 echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6
23989 if test "${cf_cv_mb_len_max+set}" = set; then
23990   echo $ECHO_N "(cached) $ECHO_C" >&6
23991 else
23992
23993 cat >"conftest.$ac_ext" <<_ACEOF
23994 #line 23994 "configure"
23995 #include "confdefs.h"
23996
23997 $ac_includes_default
23998 #include <limits.h>
23999 int
24000 main (void)
24001 {
24002
24003 #if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6
24004         ${cf_cv_main_return:-return}(0);
24005 #else
24006 #error MB_LEN_MAX is not usable
24007 #endif
24008
24009   ;
24010   return 0;
24011 }
24012 _ACEOF
24013 rm -f "conftest.$ac_objext"
24014 if { (eval echo "$as_me:24014: \"$ac_compile\"") >&5
24015   (eval $ac_compile) 2>&5
24016   ac_status=$?
24017   echo "$as_me:24017: \$? = $ac_status" >&5
24018   (exit "$ac_status"); } &&
24019          { ac_try='test -s "conftest.$ac_objext"'
24020   { (eval echo "$as_me:24020: \"$ac_try\"") >&5
24021   (eval $ac_try) 2>&5
24022   ac_status=$?
24023   echo "$as_me:24023: \$? = $ac_status" >&5
24024   (exit "$ac_status"); }; }; then
24025   cf_cv_mb_len_max=yes
24026 else
24027   echo "$as_me: failed program was:" >&5
24028 cat "conftest.$ac_ext" >&5
24029 cf_cv_mb_len_max=no
24030 fi
24031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24032 fi
24033 echo "$as_me:24033: result: $cf_cv_mb_len_max" >&5
24034 echo "${ECHO_T}$cf_cv_mb_len_max" >&6
24035 if test "$cf_cv_mb_len_max" = yes
24036 then
24037
24038 cat >>confdefs.h <<\EOF
24039 #define HAVE_CONSISTENT_MB_LEN_MAX 1
24040 EOF
24041
24042 else
24043         { echo "$as_me:24043: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5
24044 echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;}
24045 fi
24046
24047 echo "$as_me:24047: checking for va_copy" >&5
24048 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
24049 if test "${cf_cv_have_va_copy+set}" = set; then
24050   echo $ECHO_N "(cached) $ECHO_C" >&6
24051 else
24052
24053 cat >"conftest.$ac_ext" <<_ACEOF
24054 #line 24054 "configure"
24055 #include "confdefs.h"
24056
24057 #include <stdarg.h>
24058
24059 int
24060 main (void)
24061 {
24062
24063         static va_list dst;
24064         static va_list src;
24065         va_copy(dst, src)
24066   ;
24067   return 0;
24068 }
24069 _ACEOF
24070 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24071 if { (eval echo "$as_me:24071: \"$ac_link\"") >&5
24072   (eval $ac_link) 2>&5
24073   ac_status=$?
24074   echo "$as_me:24074: \$? = $ac_status" >&5
24075   (exit "$ac_status"); } &&
24076          { ac_try='test -s "conftest$ac_exeext"'
24077   { (eval echo "$as_me:24077: \"$ac_try\"") >&5
24078   (eval $ac_try) 2>&5
24079   ac_status=$?
24080   echo "$as_me:24080: \$? = $ac_status" >&5
24081   (exit "$ac_status"); }; }; then
24082   cf_cv_have_va_copy=yes
24083 else
24084   echo "$as_me: failed program was:" >&5
24085 cat "conftest.$ac_ext" >&5
24086 cf_cv_have_va_copy=no
24087 fi
24088 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24089 fi
24090 echo "$as_me:24090: result: $cf_cv_have_va_copy" >&5
24091 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
24092
24093 if test "$cf_cv_have_va_copy" = yes;
24094 then
24095
24096 cat >>confdefs.h <<\EOF
24097 #define HAVE_VA_COPY 1
24098 EOF
24099
24100 else # !cf_cv_have_va_copy
24101
24102 echo "$as_me:24102: checking for __va_copy" >&5
24103 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
24104 if test "${cf_cv_have___va_copy+set}" = set; then
24105   echo $ECHO_N "(cached) $ECHO_C" >&6
24106 else
24107
24108 cat >"conftest.$ac_ext" <<_ACEOF
24109 #line 24109 "configure"
24110 #include "confdefs.h"
24111
24112 #include <stdarg.h>
24113
24114 int
24115 main (void)
24116 {
24117
24118         static va_list dst;
24119         static va_list src;
24120         __va_copy(dst, src)
24121   ;
24122   return 0;
24123 }
24124 _ACEOF
24125 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24126 if { (eval echo "$as_me:24126: \"$ac_link\"") >&5
24127   (eval $ac_link) 2>&5
24128   ac_status=$?
24129   echo "$as_me:24129: \$? = $ac_status" >&5
24130   (exit "$ac_status"); } &&
24131          { ac_try='test -s "conftest$ac_exeext"'
24132   { (eval echo "$as_me:24132: \"$ac_try\"") >&5
24133   (eval $ac_try) 2>&5
24134   ac_status=$?
24135   echo "$as_me:24135: \$? = $ac_status" >&5
24136   (exit "$ac_status"); }; }; then
24137   cf_cv_have___va_copy=yes
24138 else
24139   echo "$as_me: failed program was:" >&5
24140 cat "conftest.$ac_ext" >&5
24141 cf_cv_have___va_copy=no
24142 fi
24143 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24144 fi
24145 echo "$as_me:24145: result: $cf_cv_have___va_copy" >&5
24146 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
24147
24148 if test "$cf_cv_have___va_copy" = yes
24149 then
24150
24151 cat >>confdefs.h <<\EOF
24152 #define HAVE___VA_COPY 1
24153 EOF
24154
24155 else # !cf_cv_have___va_copy
24156
24157 echo "$as_me:24157: checking for __builtin_va_copy" >&5
24158 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
24159 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
24160   echo $ECHO_N "(cached) $ECHO_C" >&6
24161 else
24162
24163 cat >"conftest.$ac_ext" <<_ACEOF
24164 #line 24164 "configure"
24165 #include "confdefs.h"
24166
24167 #include <stdarg.h>
24168
24169 int
24170 main (void)
24171 {
24172
24173         static va_list dst;
24174         static va_list src;
24175         __builtin_va_copy(dst, src)
24176   ;
24177   return 0;
24178 }
24179 _ACEOF
24180 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24181 if { (eval echo "$as_me:24181: \"$ac_link\"") >&5
24182   (eval $ac_link) 2>&5
24183   ac_status=$?
24184   echo "$as_me:24184: \$? = $ac_status" >&5
24185   (exit "$ac_status"); } &&
24186          { ac_try='test -s "conftest$ac_exeext"'
24187   { (eval echo "$as_me:24187: \"$ac_try\"") >&5
24188   (eval $ac_try) 2>&5
24189   ac_status=$?
24190   echo "$as_me:24190: \$? = $ac_status" >&5
24191   (exit "$ac_status"); }; }; then
24192   cf_cv_have___builtin_va_copy=yes
24193 else
24194   echo "$as_me: failed program was:" >&5
24195 cat "conftest.$ac_ext" >&5
24196 cf_cv_have___builtin_va_copy=no
24197 fi
24198 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24199 fi
24200 echo "$as_me:24200: result: $cf_cv_have___builtin_va_copy" >&5
24201 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
24202
24203 test "$cf_cv_have___builtin_va_copy" = yes &&
24204
24205 cat >>confdefs.h <<\EOF
24206 #define HAVE___BUILTIN_VA_COPY 1
24207 EOF
24208
24209 fi # cf_cv_have___va_copy
24210
24211 fi # cf_cv_have_va_copy
24212
24213 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
24214 (*yes*)
24215         ;;
24216
24217 (*)
24218         echo "$as_me:24218: checking if we can simply copy va_list" >&5
24219 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
24220 if test "${cf_cv_pointer_va_list+set}" = set; then
24221   echo $ECHO_N "(cached) $ECHO_C" >&6
24222 else
24223
24224 cat >"conftest.$ac_ext" <<_ACEOF
24225 #line 24225 "configure"
24226 #include "confdefs.h"
24227
24228 #include <stdarg.h>
24229
24230 int
24231 main (void)
24232 {
24233
24234         va_list dst;
24235         va_list src;
24236         dst = src
24237   ;
24238   return 0;
24239 }
24240 _ACEOF
24241 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24242 if { (eval echo "$as_me:24242: \"$ac_link\"") >&5
24243   (eval $ac_link) 2>&5
24244   ac_status=$?
24245   echo "$as_me:24245: \$? = $ac_status" >&5
24246   (exit "$ac_status"); } &&
24247          { ac_try='test -s "conftest$ac_exeext"'
24248   { (eval echo "$as_me:24248: \"$ac_try\"") >&5
24249   (eval $ac_try) 2>&5
24250   ac_status=$?
24251   echo "$as_me:24251: \$? = $ac_status" >&5
24252   (exit "$ac_status"); }; }; then
24253   cf_cv_pointer_va_list=yes
24254 else
24255   echo "$as_me: failed program was:" >&5
24256 cat "conftest.$ac_ext" >&5
24257 cf_cv_pointer_va_list=no
24258 fi
24259 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24260 fi
24261 echo "$as_me:24261: result: $cf_cv_pointer_va_list" >&5
24262 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
24263
24264         if test "$cf_cv_pointer_va_list" = no
24265         then
24266                 echo "$as_me:24266: checking if we can copy va_list indirectly" >&5
24267 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
24268 if test "${cf_cv_array_va_list+set}" = set; then
24269   echo $ECHO_N "(cached) $ECHO_C" >&6
24270 else
24271
24272 cat >"conftest.$ac_ext" <<_ACEOF
24273 #line 24273 "configure"
24274 #include "confdefs.h"
24275
24276 #include <stdarg.h>
24277
24278 int
24279 main (void)
24280 {
24281
24282         va_list dst;
24283         va_list src;
24284         *dst = *src
24285   ;
24286   return 0;
24287 }
24288 _ACEOF
24289 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24290 if { (eval echo "$as_me:24290: \"$ac_link\"") >&5
24291   (eval $ac_link) 2>&5
24292   ac_status=$?
24293   echo "$as_me:24293: \$? = $ac_status" >&5
24294   (exit "$ac_status"); } &&
24295          { ac_try='test -s "conftest$ac_exeext"'
24296   { (eval echo "$as_me:24296: \"$ac_try\"") >&5
24297   (eval $ac_try) 2>&5
24298   ac_status=$?
24299   echo "$as_me:24299: \$? = $ac_status" >&5
24300   (exit "$ac_status"); }; }; then
24301   cf_cv_array_va_list=yes
24302 else
24303   echo "$as_me: failed program was:" >&5
24304 cat "conftest.$ac_ext" >&5
24305 cf_cv_array_va_list=no
24306 fi
24307 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24308 fi
24309 echo "$as_me:24309: result: $cf_cv_array_va_list" >&5
24310 echo "${ECHO_T}$cf_cv_array_va_list" >&6
24311                 test "$cf_cv_array_va_list" = yes &&
24312 cat >>confdefs.h <<\EOF
24313 #define ARRAY_VA_LIST 1
24314 EOF
24315
24316         fi
24317         ;;
24318 esac
24319
24320 echo "$as_me:24320: checking for pid_t" >&5
24321 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
24322 if test "${ac_cv_type_pid_t+set}" = set; then
24323   echo $ECHO_N "(cached) $ECHO_C" >&6
24324 else
24325   cat >"conftest.$ac_ext" <<_ACEOF
24326 #line 24326 "configure"
24327 #include "confdefs.h"
24328 $ac_includes_default
24329 int
24330 main (void)
24331 {
24332 if ((pid_t *) 0)
24333   return 0;
24334 if (sizeof (pid_t))
24335   return 0;
24336   ;
24337   return 0;
24338 }
24339 _ACEOF
24340 rm -f "conftest.$ac_objext"
24341 if { (eval echo "$as_me:24341: \"$ac_compile\"") >&5
24342   (eval $ac_compile) 2>&5
24343   ac_status=$?
24344   echo "$as_me:24344: \$? = $ac_status" >&5
24345   (exit "$ac_status"); } &&
24346          { ac_try='test -s "conftest.$ac_objext"'
24347   { (eval echo "$as_me:24347: \"$ac_try\"") >&5
24348   (eval $ac_try) 2>&5
24349   ac_status=$?
24350   echo "$as_me:24350: \$? = $ac_status" >&5
24351   (exit "$ac_status"); }; }; then
24352   ac_cv_type_pid_t=yes
24353 else
24354   echo "$as_me: failed program was:" >&5
24355 cat "conftest.$ac_ext" >&5
24356 ac_cv_type_pid_t=no
24357 fi
24358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24359 fi
24360 echo "$as_me:24360: result: $ac_cv_type_pid_t" >&5
24361 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
24362 if test "$ac_cv_type_pid_t" = yes; then
24363   :
24364 else
24365
24366 cat >>confdefs.h <<EOF
24367 #define pid_t int
24368 EOF
24369
24370 fi
24371
24372 for ac_header in unistd.h vfork.h
24373 do
24374 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24375 echo "$as_me:24375: checking for $ac_header" >&5
24376 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24377 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24378   echo $ECHO_N "(cached) $ECHO_C" >&6
24379 else
24380   cat >"conftest.$ac_ext" <<_ACEOF
24381 #line 24381 "configure"
24382 #include "confdefs.h"
24383 #include <$ac_header>
24384 _ACEOF
24385 if { (eval echo "$as_me:24385: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24386   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24387   ac_status=$?
24388   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24389   rm -f conftest.er1
24390   cat conftest.err >&5
24391   echo "$as_me:24391: \$? = $ac_status" >&5
24392   (exit "$ac_status"); } >/dev/null; then
24393   if test -s conftest.err; then
24394     ac_cpp_err=$ac_c_preproc_warn_flag
24395   else
24396     ac_cpp_err=
24397   fi
24398 else
24399   ac_cpp_err=yes
24400 fi
24401 if test -z "$ac_cpp_err"; then
24402   eval "$as_ac_Header=yes"
24403 else
24404   echo "$as_me: failed program was:" >&5
24405   cat "conftest.$ac_ext" >&5
24406   eval "$as_ac_Header=no"
24407 fi
24408 rm -f conftest.err "conftest.$ac_ext"
24409 fi
24410 echo "$as_me:24410: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24411 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24412 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24413   cat >>confdefs.h <<EOF
24414 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24415 EOF
24416
24417 fi
24418 done
24419
24420 for ac_func in fork vfork
24421 do
24422 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24423 echo "$as_me:24423: checking for $ac_func" >&5
24424 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24425 if eval "test \"\${$as_ac_var+set}\" = set"; then
24426   echo $ECHO_N "(cached) $ECHO_C" >&6
24427 else
24428   cat >"conftest.$ac_ext" <<_ACEOF
24429 #line 24429 "configure"
24430 #include "confdefs.h"
24431 #define $ac_func autoconf_temporary
24432 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
24433 #undef $ac_func
24434
24435 #ifdef __cplusplus
24436 extern "C"
24437 #endif
24438
24439 /* We use char because int might match the return type of a gcc2
24440    builtin and then its argument prototype would still apply.  */
24441 char $ac_func (void);
24442
24443 int
24444 main (void)
24445 {
24446
24447 /* The GNU C library defines stubs for functions which it implements
24448     to always fail with ENOSYS.  Some functions are actually named
24449     something starting with __ and the normal name is an alias.  */
24450 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24451 #error found stub for $ac_func
24452 #endif
24453
24454         return $ac_func ();
24455   ;
24456   return 0;
24457 }
24458 _ACEOF
24459 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24460 if { (eval echo "$as_me:24460: \"$ac_link\"") >&5
24461   (eval $ac_link) 2>&5
24462   ac_status=$?
24463   echo "$as_me:24463: \$? = $ac_status" >&5
24464   (exit "$ac_status"); } &&
24465          { ac_try='test -s "conftest$ac_exeext"'
24466   { (eval echo "$as_me:24466: \"$ac_try\"") >&5
24467   (eval $ac_try) 2>&5
24468   ac_status=$?
24469   echo "$as_me:24469: \$? = $ac_status" >&5
24470   (exit "$ac_status"); }; }; then
24471   eval "$as_ac_var=yes"
24472 else
24473   echo "$as_me: failed program was:" >&5
24474 cat "conftest.$ac_ext" >&5
24475 eval "$as_ac_var=no"
24476 fi
24477 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24478 fi
24479 echo "$as_me:24479: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24480 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24481 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24482   cat >>confdefs.h <<EOF
24483 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24484 EOF
24485
24486 fi
24487 done
24488
24489 ac_cv_func_fork_works=$ac_cv_func_fork
24490 if test "x$ac_cv_func_fork" = xyes; then
24491   echo "$as_me:24491: checking for working fork" >&5
24492 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24493 if test "${ac_cv_func_fork_works+set}" = set; then
24494   echo $ECHO_N "(cached) $ECHO_C" >&6
24495 else
24496   if test "$cross_compiling" = yes; then
24497   ac_cv_func_fork_works=cross
24498 else
24499   cat >"conftest.$ac_ext" <<_ACEOF
24500 /* By Rüdiger Kuhlmann. */
24501       #include <sys/types.h>
24502       #if HAVE_UNISTD_H
24503       # include <unistd.h>
24504       #endif
24505       /* Some systems only have a dummy stub for fork() */
24506       int main (void)
24507       {
24508         if (fork() < 0)
24509           $ac_main_return (1);
24510         $ac_main_return (0);
24511       }
24512 _ACEOF
24513 rm -f "conftest$ac_exeext"
24514 if { (eval echo "$as_me:24514: \"$ac_link\"") >&5
24515   (eval $ac_link) 2>&5
24516   ac_status=$?
24517   echo "$as_me:24517: \$? = $ac_status" >&5
24518   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24519   { (eval echo "$as_me:24519: \"$ac_try\"") >&5
24520   (eval $ac_try) 2>&5
24521   ac_status=$?
24522   echo "$as_me:24522: \$? = $ac_status" >&5
24523   (exit "$ac_status"); }; }; then
24524   ac_cv_func_fork_works=yes
24525 else
24526   echo "$as_me: program exited with status $ac_status" >&5
24527 echo "$as_me: failed program was:" >&5
24528 cat "conftest.$ac_ext" >&5
24529 ac_cv_func_fork_works=no
24530 fi
24531 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24532 fi
24533 fi
24534 echo "$as_me:24534: result: $ac_cv_func_fork_works" >&5
24535 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24536
24537 fi
24538 if test "x$ac_cv_func_fork_works" = xcross; then
24539   case $host in
24540     *-*-amigaos* | *-*-msdosdjgpp*)
24541       # Override, as these systems have only a dummy fork() stub
24542       ac_cv_func_fork_works=no
24543       ;;
24544     *)
24545       ac_cv_func_fork_works=yes
24546       ;;
24547   esac
24548   { echo "$as_me:24548: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24549 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24550 fi
24551 ac_cv_func_vfork_works=$ac_cv_func_vfork
24552 if test "x$ac_cv_func_vfork" = xyes; then
24553   echo "$as_me:24553: checking for working vfork" >&5
24554 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24555 if test "${ac_cv_func_vfork_works+set}" = set; then
24556   echo $ECHO_N "(cached) $ECHO_C" >&6
24557 else
24558   if test "$cross_compiling" = yes; then
24559   ac_cv_func_vfork_works=cross
24560 else
24561   cat >"conftest.$ac_ext" <<_ACEOF
24562 #line 24562 "configure"
24563 #include "confdefs.h"
24564 /* Thanks to Paul Eggert for this test.  */
24565 #include <stdio.h>
24566 #include <sys/types.h>
24567 #include <sys/stat.h>
24568 #if HAVE_UNISTD_H
24569 # include <unistd.h>
24570 #endif
24571 #if HAVE_VFORK_H
24572 # include <vfork.h>
24573 #endif
24574 /* On some sparc systems, changes by the child to local and incoming
24575    argument registers are propagated back to the parent.  The compiler
24576    is told about this with #include <vfork.h>, but some compilers
24577    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24578    static variable whose address is put into a register that is
24579    clobbered by the vfork.  */
24580 static
24581 sparc_address_test (int arg)
24582 {
24583   static pid_t child;
24584   if (!child) {
24585     child = vfork ();
24586     if (child < 0) {
24587       perror ("vfork");
24588       _exit(2);
24589     }
24590     if (!child) {
24591       arg = getpid();
24592       write(-1, "", 0);
24593       _exit (arg);
24594     }
24595   }
24596 }
24597
24598 int
24599 main (void)
24600 {
24601   pid_t parent = getpid ();
24602   pid_t child;
24603
24604   sparc_address_test ();
24605
24606   child = vfork ();
24607
24608   if (child == 0) {
24609     /* Here is another test for sparc vfork register problems.  This
24610        test uses lots of local variables, at least as many local
24611        variables as main has allocated so far including compiler
24612        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24613        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24614        reuse the register of parent for one of the local variables,
24615        since it will think that parent can't possibly be used any more
24616        in this routine.  Assigning to the local variable will thus
24617        munge parent in the parent process.  */
24618     pid_t
24619       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24620       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24621     /* Convince the compiler that p..p7 are live; otherwise, it might
24622        use the same hardware register for all 8 local variables.  */
24623     if (p != p1 || p != p2 || p != p3 || p != p4
24624         || p != p5 || p != p6 || p != p7)
24625       _exit(1);
24626
24627     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24628        from child file descriptors.  If the child closes a descriptor
24629        before it execs or exits, this munges the parent's descriptor
24630        as well.  Test for this by closing stdout in the child.  */
24631     _exit(close(fileno(stdout)) != 0);
24632   } else {
24633     int status;
24634     struct stat st;
24635
24636     while (wait(&status) != child)
24637       ;
24638     $ac_main_return(
24639          /* Was there some problem with vforking?  */
24640          child < 0
24641
24642          /* Did the child fail?  (This shouldn't happen.)  */
24643          || status
24644
24645          /* Did the vfork/compiler bug occur?  */
24646          || parent != getpid()
24647
24648          /* Did the file descriptor bug occur?  */
24649          || fstat(fileno(stdout), &st) != 0
24650          );
24651   }
24652 }
24653 _ACEOF
24654 rm -f "conftest$ac_exeext"
24655 if { (eval echo "$as_me:24655: \"$ac_link\"") >&5
24656   (eval $ac_link) 2>&5
24657   ac_status=$?
24658   echo "$as_me:24658: \$? = $ac_status" >&5
24659   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24660   { (eval echo "$as_me:24660: \"$ac_try\"") >&5
24661   (eval $ac_try) 2>&5
24662   ac_status=$?
24663   echo "$as_me:24663: \$? = $ac_status" >&5
24664   (exit "$ac_status"); }; }; then
24665   ac_cv_func_vfork_works=yes
24666 else
24667   echo "$as_me: program exited with status $ac_status" >&5
24668 echo "$as_me: failed program was:" >&5
24669 cat "conftest.$ac_ext" >&5
24670 ac_cv_func_vfork_works=no
24671 fi
24672 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24673 fi
24674 fi
24675 echo "$as_me:24675: result: $ac_cv_func_vfork_works" >&5
24676 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24677
24678 fi;
24679 if test "x$ac_cv_func_fork_works" = xcross; then
24680   ac_cv_func_vfork_works=ac_cv_func_vfork
24681   { echo "$as_me:24681: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24682 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24683 fi
24684
24685 if test "x$ac_cv_func_vfork_works" = xyes; then
24686
24687 cat >>confdefs.h <<\EOF
24688 #define HAVE_WORKING_VFORK 1
24689 EOF
24690
24691 else
24692
24693 cat >>confdefs.h <<\EOF
24694 #define vfork fork
24695 EOF
24696
24697 fi
24698 if test "x$ac_cv_func_fork_works" = xyes; then
24699
24700 cat >>confdefs.h <<\EOF
24701 #define HAVE_WORKING_FORK 1
24702 EOF
24703
24704 fi
24705
24706 echo "$as_me:24706: checking if fopen accepts explicit binary mode" >&5
24707 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24708 if test "${cf_cv_fopen_bin_r+set}" = set; then
24709   echo $ECHO_N "(cached) $ECHO_C" >&6
24710 else
24711
24712         if test "$cross_compiling" = yes; then
24713   cf_cv_fopen_bin_r=unknown
24714 else
24715   cat >"conftest.$ac_ext" <<_ACEOF
24716 #line 24716 "configure"
24717 #include "confdefs.h"
24718
24719 $ac_includes_default
24720
24721 int main(void)
24722 {
24723         FILE *fp = fopen("conftest.tmp", "wb");
24724         int rc = 0;
24725         if (fp != 0) {
24726                 int p, q;
24727                 for (p = 0; p < 256; ++p) {
24728                         fputc(p, fp);
24729                 }
24730                 fclose(fp);
24731                 fp = fopen("conftest.tmp", "rb");
24732                 if (fp != 0) {
24733                         for (p = 0; p < 256; ++p) {
24734                                 q = fgetc(fp);
24735                                 if (q != p) {
24736                                         rc = 1;
24737                                         break;
24738                                 }
24739                         }
24740                 } else {
24741                         rc = 1;
24742                 }
24743         } else {
24744                 rc = 1;
24745         }
24746         ${cf_cv_main_return:-return} (rc);
24747 }
24748
24749 _ACEOF
24750 rm -f "conftest$ac_exeext"
24751 if { (eval echo "$as_me:24751: \"$ac_link\"") >&5
24752   (eval $ac_link) 2>&5
24753   ac_status=$?
24754   echo "$as_me:24754: \$? = $ac_status" >&5
24755   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24756   { (eval echo "$as_me:24756: \"$ac_try\"") >&5
24757   (eval $ac_try) 2>&5
24758   ac_status=$?
24759   echo "$as_me:24759: \$? = $ac_status" >&5
24760   (exit "$ac_status"); }; }; then
24761   cf_cv_fopen_bin_r=yes
24762 else
24763   echo "$as_me: program exited with status $ac_status" >&5
24764 echo "$as_me: failed program was:" >&5
24765 cat "conftest.$ac_ext" >&5
24766 cf_cv_fopen_bin_r=no
24767 fi
24768 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24769 fi
24770
24771 fi
24772 echo "$as_me:24772: result: $cf_cv_fopen_bin_r" >&5
24773 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24774 test "x$cf_cv_fopen_bin_r" != xno &&
24775 cat >>confdefs.h <<\EOF
24776 #define USE_FOPEN_BIN_R 1
24777 EOF
24778
24779 # special check for test/ditto.c
24780
24781 echo "$as_me:24781: checking for openpty in -lutil" >&5
24782 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24783 if test "${ac_cv_lib_util_openpty+set}" = set; then
24784   echo $ECHO_N "(cached) $ECHO_C" >&6
24785 else
24786   ac_check_lib_save_LIBS=$LIBS
24787 LIBS="-lutil  $LIBS"
24788 cat >"conftest.$ac_ext" <<_ACEOF
24789 #line 24789 "configure"
24790 #include "confdefs.h"
24791
24792 /* Override any gcc2 internal prototype to avoid an error.  */
24793 #ifdef __cplusplus
24794 extern "C"
24795 #endif
24796 /* We use char because int might match the return type of a gcc2
24797    builtin and then its argument prototype would still apply.  */
24798 char openpty (void);
24799 int
24800 main (void)
24801 {
24802 openpty ();
24803   ;
24804   return 0;
24805 }
24806 _ACEOF
24807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24808 if { (eval echo "$as_me:24808: \"$ac_link\"") >&5
24809   (eval $ac_link) 2>&5
24810   ac_status=$?
24811   echo "$as_me:24811: \$? = $ac_status" >&5
24812   (exit "$ac_status"); } &&
24813          { ac_try='test -s "conftest$ac_exeext"'
24814   { (eval echo "$as_me:24814: \"$ac_try\"") >&5
24815   (eval $ac_try) 2>&5
24816   ac_status=$?
24817   echo "$as_me:24817: \$? = $ac_status" >&5
24818   (exit "$ac_status"); }; }; then
24819   ac_cv_lib_util_openpty=yes
24820 else
24821   echo "$as_me: failed program was:" >&5
24822 cat "conftest.$ac_ext" >&5
24823 ac_cv_lib_util_openpty=no
24824 fi
24825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24826 LIBS=$ac_check_lib_save_LIBS
24827 fi
24828 echo "$as_me:24828: result: $ac_cv_lib_util_openpty" >&5
24829 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24830 if test "$ac_cv_lib_util_openpty" = yes; then
24831   cf_cv_lib_util=yes
24832 else
24833   cf_cv_lib_util=no
24834 fi
24835
24836 echo "$as_me:24836: checking for openpty header" >&5
24837 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24838 if test "${cf_cv_func_openpty+set}" = set; then
24839   echo $ECHO_N "(cached) $ECHO_C" >&6
24840 else
24841
24842         cf_save_LIBS="$LIBS"
24843         test "$cf_cv_lib_util" = yes && {
24844 cf_add_libs="$LIBS"
24845 # reverse order
24846 cf_add_0lib=
24847 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24848 # filter duplicates
24849 for cf_add_1lib in $cf_add_0lib; do
24850         for cf_add_2lib in $cf_add_libs; do
24851                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24852                         cf_add_1lib=
24853                         break
24854                 fi
24855         done
24856         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24857 done
24858 LIBS="$cf_add_libs"
24859  }
24860         for cf_header in pty.h libutil.h util.h
24861         do
24862         cat >"conftest.$ac_ext" <<_ACEOF
24863 #line 24863 "configure"
24864 #include "confdefs.h"
24865
24866 #include <$cf_header>
24867
24868 int
24869 main (void)
24870 {
24871
24872         int x = openpty((int *)0, (int *)0, (char *)0,
24873                                    (struct termios *)0, (struct winsize *)0);
24874         (void)x;
24875
24876   ;
24877   return 0;
24878 }
24879 _ACEOF
24880 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24881 if { (eval echo "$as_me:24881: \"$ac_link\"") >&5
24882   (eval $ac_link) 2>&5
24883   ac_status=$?
24884   echo "$as_me:24884: \$? = $ac_status" >&5
24885   (exit "$ac_status"); } &&
24886          { ac_try='test -s "conftest$ac_exeext"'
24887   { (eval echo "$as_me:24887: \"$ac_try\"") >&5
24888   (eval $ac_try) 2>&5
24889   ac_status=$?
24890   echo "$as_me:24890: \$? = $ac_status" >&5
24891   (exit "$ac_status"); }; }; then
24892
24893                 cf_cv_func_openpty=$cf_header
24894                 break
24895
24896 else
24897   echo "$as_me: failed program was:" >&5
24898 cat "conftest.$ac_ext" >&5
24899
24900                 cf_cv_func_openpty=no
24901
24902 fi
24903 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24904         done
24905         LIBS="$cf_save_LIBS"
24906
24907 fi
24908 echo "$as_me:24908: result: $cf_cv_func_openpty" >&5
24909 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24910
24911 if test "$cf_cv_func_openpty" != no ; then
24912
24913 cat >>confdefs.h <<EOF
24914 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24915 EOF
24916
24917 cat >>confdefs.h <<\EOF
24918 #define USE_XTERM_PTY 1
24919 EOF
24920
24921         if test "x$cf_cv_lib_util" = xyes ; then
24922
24923 cf_add_libs="$TEST_LIBS"
24924 # reverse order
24925 cf_add_0lib=
24926 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24927 # filter duplicates
24928 for cf_add_1lib in $cf_add_0lib; do
24929         for cf_add_2lib in $cf_add_libs; do
24930                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24931                         cf_add_1lib=
24932                         break
24933                 fi
24934         done
24935         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24936 done
24937 TEST_LIBS="$cf_add_libs"
24938
24939         fi
24940 fi
24941
24942 if test "$with_hashed_db" != no ; then
24943
24944 cat >>confdefs.h <<\EOF
24945 #define USE_HASHED_DB 1
24946 EOF
24947
24948 case $with_hashed_db in
24949 (yes|*able*)
24950         ;;
24951 (*)
24952         if test -d "$with_hashed_db" ; then
24953
24954 if test -n "$with_hashed_db/include" ; then
24955   for cf_add_incdir in $with_hashed_db/include
24956   do
24957         while test "$cf_add_incdir" != /usr/include
24958         do
24959           if test -d "$cf_add_incdir"
24960           then
24961                 cf_have_incdir=no
24962                 if test -n "$CFLAGS$CPPFLAGS" ; then
24963                   # a loop is needed to ensure we can add subdirs of existing dirs
24964                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24965                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24966                           cf_have_incdir=yes; break
24967                         fi
24968                   done
24969                 fi
24970
24971                 if test "$cf_have_incdir" = no ; then
24972                   if test "$cf_add_incdir" = /usr/local/include ; then
24973                         if test "$GCC" = yes
24974                         then
24975                           cf_save_CPPFLAGS=$CPPFLAGS
24976
24977         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24978         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24979
24980                           cat >"conftest.$ac_ext" <<_ACEOF
24981 #line 24981 "configure"
24982 #include "confdefs.h"
24983 #include <stdio.h>
24984 int
24985 main (void)
24986 {
24987 printf("Hello")
24988   ;
24989   return 0;
24990 }
24991 _ACEOF
24992 rm -f "conftest.$ac_objext"
24993 if { (eval echo "$as_me:24993: \"$ac_compile\"") >&5
24994   (eval $ac_compile) 2>&5
24995   ac_status=$?
24996   echo "$as_me:24996: \$? = $ac_status" >&5
24997   (exit "$ac_status"); } &&
24998          { ac_try='test -s "conftest.$ac_objext"'
24999   { (eval echo "$as_me:24999: \"$ac_try\"") >&5
25000   (eval $ac_try) 2>&5
25001   ac_status=$?
25002   echo "$as_me:25002: \$? = $ac_status" >&5
25003   (exit "$ac_status"); }; }; then
25004   :
25005 else
25006   echo "$as_me: failed program was:" >&5
25007 cat "conftest.$ac_ext" >&5
25008 cf_have_incdir=yes
25009 fi
25010 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25011                           CPPFLAGS=$cf_save_CPPFLAGS
25012                         fi
25013                   fi
25014                 fi
25015
25016                 if test "$cf_have_incdir" = no ; then
25017                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
25018
25019 echo "${as_me:-configure}:25019: testing adding $cf_add_incdir to include-path ..." 1>&5
25020
25021                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25022
25023                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25024                   test "$cf_top_incdir" = "$cf_add_incdir" && break
25025                   cf_add_incdir="$cf_top_incdir"
25026                 else
25027                   break
25028                 fi
25029           else
25030                 break
25031           fi
25032         done
25033   done
25034 fi
25035
25036 if test -n "$with_hashed_db/lib" ; then
25037         for cf_add_libdir in $with_hashed_db/lib
25038         do
25039                 if test "$cf_add_libdir" = /usr/lib ; then
25040                         :
25041                 elif test -d "$cf_add_libdir"
25042                 then
25043                         cf_have_libdir=no
25044                         if test -n "$LDFLAGS$LIBS" ; then
25045                                 # a loop is needed to ensure we can add subdirs of existing dirs
25046                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
25047                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
25048                                                 cf_have_libdir=yes; break
25049                                         fi
25050                                 done
25051                         fi
25052                         if test "$cf_have_libdir" = no ; then
25053                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
25054
25055 echo "${as_me:-configure}:25055: testing adding $cf_add_libdir to library-path ..." 1>&5
25056
25057                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
25058                         fi
25059                 fi
25060         done
25061 fi
25062
25063         else
25064                 case "$with_hashed_db" in
25065                 (./*|../*|/*)
25066                         { echo "$as_me:25066: WARNING: no such directory $with_hashed_db" >&5
25067 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
25068                         ;;
25069                 (*)
25070
25071 cf_search=
25072
25073 test "x$prefix" != "xNONE" && \
25074 test -d "$prefix" && \
25075  {
25076         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
25077         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
25078         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
25079         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
25080         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
25081         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
25082 }
25083
25084 for cf_subdir_prefix in \
25085         /usr \
25086         /usr/local \
25087         /usr/pkg \
25088         /opt \
25089         /opt/local \
25090         $HOME
25091 do
25092
25093 test "x$cf_subdir_prefix" != "x$prefix" && \
25094 test -d "$cf_subdir_prefix" && \
25095 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25096         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
25097         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
25098         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
25099         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
25100         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
25101         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"
25102 }
25103
25104 done
25105
25106         for cf_item in $cf_search
25107         do
25108                 case "$cf_item" in
25109                 (*/$with_hashed_db)
25110
25111 if test -n "$cf_item" ; then
25112   for cf_add_incdir in $cf_item
25113   do
25114         while test "$cf_add_incdir" != /usr/include
25115         do
25116           if test -d "$cf_add_incdir"
25117           then
25118                 cf_have_incdir=no
25119                 if test -n "$CFLAGS$CPPFLAGS" ; then
25120                   # a loop is needed to ensure we can add subdirs of existing dirs
25121                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
25122                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
25123                           cf_have_incdir=yes; break
25124                         fi
25125                   done
25126                 fi
25127
25128                 if test "$cf_have_incdir" = no ; then
25129                   if test "$cf_add_incdir" = /usr/local/include ; then
25130                         if test "$GCC" = yes
25131                         then
25132                           cf_save_CPPFLAGS=$CPPFLAGS
25133
25134         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25135         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
25136
25137                           cat >"conftest.$ac_ext" <<_ACEOF
25138 #line 25138 "configure"
25139 #include "confdefs.h"
25140 #include <stdio.h>
25141 int
25142 main (void)
25143 {
25144 printf("Hello")
25145   ;
25146   return 0;
25147 }
25148 _ACEOF
25149 rm -f "conftest.$ac_objext"
25150 if { (eval echo "$as_me:25150: \"$ac_compile\"") >&5
25151   (eval $ac_compile) 2>&5
25152   ac_status=$?
25153   echo "$as_me:25153: \$? = $ac_status" >&5
25154   (exit "$ac_status"); } &&
25155          { ac_try='test -s "conftest.$ac_objext"'
25156   { (eval echo "$as_me:25156: \"$ac_try\"") >&5
25157   (eval $ac_try) 2>&5
25158   ac_status=$?
25159   echo "$as_me:25159: \$? = $ac_status" >&5
25160   (exit "$ac_status"); }; }; then
25161   :
25162 else
25163   echo "$as_me: failed program was:" >&5
25164 cat "conftest.$ac_ext" >&5
25165 cf_have_incdir=yes
25166 fi
25167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25168                           CPPFLAGS=$cf_save_CPPFLAGS
25169                         fi
25170                   fi
25171                 fi
25172
25173                 if test "$cf_have_incdir" = no ; then
25174                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
25175
25176 echo "${as_me:-configure}:25176: testing adding $cf_add_incdir to include-path ..." 1>&5
25177
25178                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25179
25180                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25181                   test "$cf_top_incdir" = "$cf_add_incdir" && break
25182                   cf_add_incdir="$cf_top_incdir"
25183                 else
25184                   break
25185                 fi
25186           else
25187                 break
25188           fi
25189         done
25190   done
25191 fi
25192
25193                         ;;
25194                 esac
25195         done
25196
25197 cf_search=
25198
25199 test "x$prefix" != "xNONE" && \
25200 test -d "$prefix" && \
25201  {
25202         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
25203         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
25204         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
25205         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
25206         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
25207         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
25208 }
25209
25210 for cf_subdir_prefix in \
25211         /usr \
25212         /usr/local \
25213         /usr/pkg \
25214         /opt \
25215         /opt/local \
25216         $HOME
25217 do
25218
25219 test "x$cf_subdir_prefix" != "x$prefix" && \
25220 test -d "$cf_subdir_prefix" && \
25221 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25222         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
25223         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
25224         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
25225         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
25226         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
25227         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"
25228 }
25229
25230 done
25231
25232         for cf_item in $cf_search
25233         do
25234                 case "$cf_item" in
25235                 (*/$with_hashed_db)
25236
25237 if test -n "$cf_item" ; then
25238         for cf_add_libdir in $cf_item
25239         do
25240                 if test "$cf_add_libdir" = /usr/lib ; then
25241                         :
25242                 elif test -d "$cf_add_libdir"
25243                 then
25244                         cf_have_libdir=no
25245                         if test -n "$LDFLAGS$LIBS" ; then
25246                                 # a loop is needed to ensure we can add subdirs of existing dirs
25247                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
25248                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
25249                                                 cf_have_libdir=yes; break
25250                                         fi
25251                                 done
25252                         fi
25253                         if test "$cf_have_libdir" = no ; then
25254                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
25255
25256 echo "${as_me:-configure}:25256: testing adding $cf_add_libdir to library-path ..." 1>&5
25257
25258                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
25259                         fi
25260                 fi
25261         done
25262 fi
25263
25264                         ;;
25265                 esac
25266         done
25267
25268                         ;;
25269                 esac
25270         fi
25271 esac
25272
25273 echo "$as_me:25273: checking for db.h" >&5
25274 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
25275 if test "${ac_cv_header_db_h+set}" = set; then
25276   echo $ECHO_N "(cached) $ECHO_C" >&6
25277 else
25278   cat >"conftest.$ac_ext" <<_ACEOF
25279 #line 25279 "configure"
25280 #include "confdefs.h"
25281 #include <db.h>
25282 _ACEOF
25283 if { (eval echo "$as_me:25283: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25284   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25285   ac_status=$?
25286   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25287   rm -f conftest.er1
25288   cat conftest.err >&5
25289   echo "$as_me:25289: \$? = $ac_status" >&5
25290   (exit "$ac_status"); } >/dev/null; then
25291   if test -s conftest.err; then
25292     ac_cpp_err=$ac_c_preproc_warn_flag
25293   else
25294     ac_cpp_err=
25295   fi
25296 else
25297   ac_cpp_err=yes
25298 fi
25299 if test -z "$ac_cpp_err"; then
25300   ac_cv_header_db_h=yes
25301 else
25302   echo "$as_me: failed program was:" >&5
25303   cat "conftest.$ac_ext" >&5
25304   ac_cv_header_db_h=no
25305 fi
25306 rm -f conftest.err "conftest.$ac_ext"
25307 fi
25308 echo "$as_me:25308: result: $ac_cv_header_db_h" >&5
25309 echo "${ECHO_T}$ac_cv_header_db_h" >&6
25310 if test "$ac_cv_header_db_h" = yes; then
25311
25312 echo "$as_me:25312: checking for version of db" >&5
25313 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
25314 if test "${cf_cv_hashed_db_version+set}" = set; then
25315   echo $ECHO_N "(cached) $ECHO_C" >&6
25316 else
25317
25318 cf_cv_hashed_db_version=unknown
25319
25320 for cf_db_version in 1 2 3 4 5 6
25321 do
25322
25323 echo "${as_me:-configure}:25323: testing checking for db version $cf_db_version ..." 1>&5
25324
25325         cat >"conftest.$ac_ext" <<_ACEOF
25326 #line 25326 "configure"
25327 #include "confdefs.h"
25328
25329 $ac_includes_default
25330 #include <db.h>
25331
25332 #ifdef DB_VERSION_MAJOR
25333         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
25334 #if $cf_db_version == DB_VERSION_MAJOR
25335         /* ok */
25336 #else
25337         #error $cf_db_version is not DB_VERSION_MAJOR
25338 #endif
25339 #else
25340 #if $cf_db_version == 1
25341         /* ok: assuming this is DB 1.8.5 */
25342 #else
25343         #error $cf_db_version is not 1
25344 #endif
25345 #endif
25346
25347 int
25348 main (void)
25349 {
25350 DBT *foo = 0
25351   ;
25352   return 0;
25353 }
25354 _ACEOF
25355 rm -f "conftest.$ac_objext"
25356 if { (eval echo "$as_me:25356: \"$ac_compile\"") >&5
25357   (eval $ac_compile) 2>&5
25358   ac_status=$?
25359   echo "$as_me:25359: \$? = $ac_status" >&5
25360   (exit "$ac_status"); } &&
25361          { ac_try='test -s "conftest.$ac_objext"'
25362   { (eval echo "$as_me:25362: \"$ac_try\"") >&5
25363   (eval $ac_try) 2>&5
25364   ac_status=$?
25365   echo "$as_me:25365: \$? = $ac_status" >&5
25366   (exit "$ac_status"); }; }; then
25367
25368         cf_cv_hashed_db_version=$cf_db_version
25369         break
25370
25371 else
25372   echo "$as_me: failed program was:" >&5
25373 cat "conftest.$ac_ext" >&5
25374 fi
25375 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25376 done
25377
25378 fi
25379 echo "$as_me:25379: result: $cf_cv_hashed_db_version" >&5
25380 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
25381
25382 if test "$cf_cv_hashed_db_version" = unknown ; then
25383         { { echo "$as_me:25383: error: Cannot determine version of db" >&5
25384 echo "$as_me: error: Cannot determine version of db" >&2;}
25385    { (exit 1); exit 1; }; }
25386 else
25387
25388 echo "$as_me:25388: checking for db libraries" >&5
25389 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
25390 if test "${cf_cv_hashed_db_libs+set}" = set; then
25391   echo $ECHO_N "(cached) $ECHO_C" >&6
25392 else
25393
25394 cf_cv_hashed_db_libs=unknown
25395 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
25396 do
25397         cf_save_libs="$LIBS"
25398         if test -n "$cf_db_libs"; then
25399
25400 cf_add_libs="$LIBS"
25401 # reverse order
25402 cf_add_0lib=
25403 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25404 # filter duplicates
25405 for cf_add_1lib in $cf_add_0lib; do
25406         for cf_add_2lib in $cf_add_libs; do
25407                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25408                         cf_add_1lib=
25409                         break
25410                 fi
25411         done
25412         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25413 done
25414 LIBS="$cf_add_libs"
25415
25416         fi
25417
25418 echo "${as_me:-configure}:25418: testing checking for library $cf_db_libs ..." 1>&5
25419
25420         cat >"conftest.$ac_ext" <<_ACEOF
25421 #line 25421 "configure"
25422 #include "confdefs.h"
25423
25424 $ac_includes_default
25425 #include <db.h>
25426
25427 int
25428 main (void)
25429 {
25430
25431         char *path = "/tmp/foo";
25432 #ifdef DB_VERSION_MAJOR
25433 #if DB_VERSION_MAJOR >= 4
25434         DB *result = 0;
25435         db_create(&result, NULL, 0);
25436         result->open(result,
25437                 NULL,
25438                 path,
25439                 path,
25440                 DB_HASH,
25441                 DB_CREATE,
25442                 0644);
25443 #elif DB_VERSION_MAJOR >= 3
25444         DB *result = 0;
25445         db_create(&result, NULL, 0);
25446         result->open(result,
25447                 path,
25448                 path,
25449                 DB_HASH,
25450                 DB_CREATE,
25451                 0644);
25452 #elif DB_VERSION_MAJOR >= 2
25453         DB *result = 0;
25454         db_open(path,
25455                 DB_HASH,
25456                 DB_CREATE,
25457                 0644,
25458                 (DB_ENV *) 0,
25459                 (DB_INFO *) 0,
25460                 &result);
25461 #endif /* DB_VERSION_MAJOR */
25462 #else
25463         DB *result = dbopen(path,
25464                      2,
25465                      0644,
25466                      DB_HASH,
25467                      0);
25468 #endif
25469         ${cf_cv_main_return:-return}(result != 0)
25470
25471   ;
25472   return 0;
25473 }
25474 _ACEOF
25475 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25476 if { (eval echo "$as_me:25476: \"$ac_link\"") >&5
25477   (eval $ac_link) 2>&5
25478   ac_status=$?
25479   echo "$as_me:25479: \$? = $ac_status" >&5
25480   (exit "$ac_status"); } &&
25481          { ac_try='test -s "conftest$ac_exeext"'
25482   { (eval echo "$as_me:25482: \"$ac_try\"") >&5
25483   (eval $ac_try) 2>&5
25484   ac_status=$?
25485   echo "$as_me:25485: \$? = $ac_status" >&5
25486   (exit "$ac_status"); }; }; then
25487
25488         if test -n "$cf_db_libs" ; then
25489                 cf_cv_hashed_db_libs=$cf_db_libs
25490         else
25491                 cf_cv_hashed_db_libs=default
25492         fi
25493         LIBS="$cf_save_libs"
25494         break
25495
25496 else
25497   echo "$as_me: failed program was:" >&5
25498 cat "conftest.$ac_ext" >&5
25499 fi
25500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25501         LIBS="$cf_save_libs"
25502 done
25503
25504 fi
25505 echo "$as_me:25505: result: $cf_cv_hashed_db_libs" >&5
25506 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25507
25508         if test "$cf_cv_hashed_db_libs" = unknown ; then
25509                 { { echo "$as_me:25509: error: Cannot determine library for db" >&5
25510 echo "$as_me: error: Cannot determine library for db" >&2;}
25511    { (exit 1); exit 1; }; }
25512         elif test "$cf_cv_hashed_db_libs" != default ; then
25513
25514 cf_add_libs="$LIBS"
25515 # reverse order
25516 cf_add_0lib=
25517 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25518 # filter duplicates
25519 for cf_add_1lib in $cf_add_0lib; do
25520         for cf_add_2lib in $cf_add_libs; do
25521                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25522                         cf_add_1lib=
25523                         break
25524                 fi
25525         done
25526         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25527 done
25528 LIBS="$cf_add_libs"
25529
25530         fi
25531 fi
25532
25533 else
25534
25535         { { echo "$as_me:25535: error: Cannot find db.h" >&5
25536 echo "$as_me: error: Cannot find db.h" >&2;}
25537    { (exit 1); exit 1; }; }
25538
25539 fi
25540
25541 fi
25542
25543 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25544         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25545         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25546 fi
25547
25548 # Just in case, check if the C compiler has a bool type.
25549
25550 echo "$as_me:25550: checking if we should include stdbool.h" >&5
25551 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25552
25553 if test "${cf_cv_header_stdbool_h+set}" = set; then
25554   echo $ECHO_N "(cached) $ECHO_C" >&6
25555 else
25556
25557         cat >"conftest.$ac_ext" <<_ACEOF
25558 #line 25558 "configure"
25559 #include "confdefs.h"
25560
25561 int
25562 main (void)
25563 {
25564 bool foo = false; (void)foo
25565   ;
25566   return 0;
25567 }
25568 _ACEOF
25569 rm -f "conftest.$ac_objext"
25570 if { (eval echo "$as_me:25570: \"$ac_compile\"") >&5
25571   (eval $ac_compile) 2>&5
25572   ac_status=$?
25573   echo "$as_me:25573: \$? = $ac_status" >&5
25574   (exit "$ac_status"); } &&
25575          { ac_try='test -s "conftest.$ac_objext"'
25576   { (eval echo "$as_me:25576: \"$ac_try\"") >&5
25577   (eval $ac_try) 2>&5
25578   ac_status=$?
25579   echo "$as_me:25579: \$? = $ac_status" >&5
25580   (exit "$ac_status"); }; }; then
25581   cf_cv_header_stdbool_h=0
25582 else
25583   echo "$as_me: failed program was:" >&5
25584 cat "conftest.$ac_ext" >&5
25585 cat >"conftest.$ac_ext" <<_ACEOF
25586 #line 25586 "configure"
25587 #include "confdefs.h"
25588
25589 #ifndef __BEOS__
25590 #include <stdbool.h>
25591 #endif
25592
25593 int
25594 main (void)
25595 {
25596 bool foo = false; (void)foo
25597   ;
25598   return 0;
25599 }
25600 _ACEOF
25601 rm -f "conftest.$ac_objext"
25602 if { (eval echo "$as_me:25602: \"$ac_compile\"") >&5
25603   (eval $ac_compile) 2>&5
25604   ac_status=$?
25605   echo "$as_me:25605: \$? = $ac_status" >&5
25606   (exit "$ac_status"); } &&
25607          { ac_try='test -s "conftest.$ac_objext"'
25608   { (eval echo "$as_me:25608: \"$ac_try\"") >&5
25609   (eval $ac_try) 2>&5
25610   ac_status=$?
25611   echo "$as_me:25611: \$? = $ac_status" >&5
25612   (exit "$ac_status"); }; }; then
25613   cf_cv_header_stdbool_h=1
25614 else
25615   echo "$as_me: failed program was:" >&5
25616 cat "conftest.$ac_ext" >&5
25617 cf_cv_header_stdbool_h=0
25618 fi
25619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25620 fi
25621 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25622 fi
25623
25624 if test "$cf_cv_header_stdbool_h" = 1
25625 then    echo "$as_me:25625: result: yes" >&5
25626 echo "${ECHO_T}yes" >&6
25627 else    echo "$as_me:25627: result: no" >&5
25628 echo "${ECHO_T}no" >&6
25629 fi
25630
25631 echo "$as_me:25631: checking for builtin bool type" >&5
25632 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25633
25634 if test "${cf_cv_cc_bool_type+set}" = set; then
25635   echo $ECHO_N "(cached) $ECHO_C" >&6
25636 else
25637
25638         cat >"conftest.$ac_ext" <<_ACEOF
25639 #line 25639 "configure"
25640 #include "confdefs.h"
25641
25642 #include <stdio.h>
25643 #include <sys/types.h>
25644
25645 int
25646 main (void)
25647 {
25648 bool x = false; (void)x
25649   ;
25650   return 0;
25651 }
25652 _ACEOF
25653 rm -f "conftest.$ac_objext"
25654 if { (eval echo "$as_me:25654: \"$ac_compile\"") >&5
25655   (eval $ac_compile) 2>&5
25656   ac_status=$?
25657   echo "$as_me:25657: \$? = $ac_status" >&5
25658   (exit "$ac_status"); } &&
25659          { ac_try='test -s "conftest.$ac_objext"'
25660   { (eval echo "$as_me:25660: \"$ac_try\"") >&5
25661   (eval $ac_try) 2>&5
25662   ac_status=$?
25663   echo "$as_me:25663: \$? = $ac_status" >&5
25664   (exit "$ac_status"); }; }; then
25665   cf_cv_cc_bool_type=1
25666 else
25667   echo "$as_me: failed program was:" >&5
25668 cat "conftest.$ac_ext" >&5
25669 cf_cv_cc_bool_type=0
25670 fi
25671 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25672
25673 fi
25674
25675 if test "$cf_cv_cc_bool_type" = 1
25676 then    echo "$as_me:25676: result: yes" >&5
25677 echo "${ECHO_T}yes" >&6
25678 else    echo "$as_me:25678: result: no" >&5
25679 echo "${ECHO_T}no" >&6
25680 fi
25681
25682 # Check for C++ compiler characteristics (and ensure that it's there!)
25683 if test -n "$CXX" ; then
25684         ac_ext=cc
25685 ac_cpp='$CXXCPP $CPPFLAGS'
25686 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25687 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25688 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25689 ac_main_return="return"
25690
25691 if test -n "$GXX" ; then
25692
25693         cf_save="$LIBS"
25694         LIBS="$LIBS $CXXLIBS"
25695         echo "$as_me:25695: checking if we already have C++ library" >&5
25696 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25697         cat >"conftest.$ac_ext" <<_ACEOF
25698 #line 25698 "configure"
25699 #include "confdefs.h"
25700
25701                         #include <iostream>
25702 int
25703 main (void)
25704 {
25705
25706                         std::cout << "Hello World!" << std::endl;
25707   ;
25708   return 0;
25709 }
25710 _ACEOF
25711 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25712 if { (eval echo "$as_me:25712: \"$ac_link\"") >&5
25713   (eval $ac_link) 2>&5
25714   ac_status=$?
25715   echo "$as_me:25715: \$? = $ac_status" >&5
25716   (exit "$ac_status"); } &&
25717          { ac_try='test -s "conftest$ac_exeext"'
25718   { (eval echo "$as_me:25718: \"$ac_try\"") >&5
25719   (eval $ac_try) 2>&5
25720   ac_status=$?
25721   echo "$as_me:25721: \$? = $ac_status" >&5
25722   (exit "$ac_status"); }; }; then
25723   cf_have_libstdcpp=yes
25724 else
25725   echo "$as_me: failed program was:" >&5
25726 cat "conftest.$ac_ext" >&5
25727 cf_have_libstdcpp=no
25728 fi
25729 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25730         echo "$as_me:25730: result: $cf_have_libstdcpp" >&5
25731 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25732         LIBS="$cf_save"
25733
25734         if test "$cf_have_libstdcpp" != yes
25735         then
25736                 case "$cf_cv_system_name" in
25737                 (os2*)
25738                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25739                                 cf_stdcpp_libname=stdcpp
25740                         else
25741                                 cf_stdcpp_libname=stdc++
25742                         fi
25743                         ;;
25744                 (*)
25745                         cf_stdcpp_libname=stdc++
25746                         ;;
25747                 esac
25748
25749                 echo "$as_me:25749: checking for library $cf_stdcpp_libname" >&5
25750 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25751 if test "${cf_cv_libstdcpp+set}" = set; then
25752   echo $ECHO_N "(cached) $ECHO_C" >&6
25753 else
25754
25755                         cf_save="$LIBS"
25756                         LIBS="$LIBS $CXXLIBS"
25757
25758 cf_add_libs="$LIBS"
25759 # reverse order
25760 cf_add_0lib=
25761 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25762 # filter duplicates
25763 for cf_add_1lib in $cf_add_0lib; do
25764         for cf_add_2lib in $cf_add_libs; do
25765                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25766                         cf_add_1lib=
25767                         break
25768                 fi
25769         done
25770         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25771 done
25772 LIBS="$cf_add_libs"
25773
25774                 cat >"conftest.$ac_ext" <<_ACEOF
25775 #line 25775 "configure"
25776 #include "confdefs.h"
25777
25778                                 #include <iostream>
25779 int
25780 main (void)
25781 {
25782
25783                                 std::cout << "Hello World!" << std::endl;
25784   ;
25785   return 0;
25786 }
25787 _ACEOF
25788 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25789 if { (eval echo "$as_me:25789: \"$ac_link\"") >&5
25790   (eval $ac_link) 2>&5
25791   ac_status=$?
25792   echo "$as_me:25792: \$? = $ac_status" >&5
25793   (exit "$ac_status"); } &&
25794          { ac_try='test -s "conftest$ac_exeext"'
25795   { (eval echo "$as_me:25795: \"$ac_try\"") >&5
25796   (eval $ac_try) 2>&5
25797   ac_status=$?
25798   echo "$as_me:25798: \$? = $ac_status" >&5
25799   (exit "$ac_status"); }; }; then
25800   cf_cv_libstdcpp=yes
25801 else
25802   echo "$as_me: failed program was:" >&5
25803 cat "conftest.$ac_ext" >&5
25804 cf_cv_libstdcpp=no
25805 fi
25806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25807                         LIBS="$cf_save"
25808
25809 fi
25810 echo "$as_me:25810: result: $cf_cv_libstdcpp" >&5
25811 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25812                 test "$cf_cv_libstdcpp" = yes && {
25813 cf_add_libs="$CXXLIBS"
25814 # reverse order
25815 cf_add_0lib=
25816 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25817 # filter duplicates
25818 for cf_add_1lib in $cf_add_0lib; do
25819         for cf_add_2lib in $cf_add_libs; do
25820                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25821                         cf_add_1lib=
25822                         break
25823                 fi
25824         done
25825         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25826 done
25827 CXXLIBS="$cf_add_libs"
25828  }
25829         fi
25830 fi
25831
25832         echo "$as_me:25832: checking whether $CXX understands -c and -o together" >&5
25833 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25834 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25835   echo $ECHO_N "(cached) $ECHO_C" >&6
25836 else
25837
25838 cat > conftest.$ac_ext <<CF_EOF
25839 int main(void)
25840 {
25841         ${cf_cv_main_return:-return}(0);
25842 }
25843 CF_EOF
25844 # We do the test twice because some compilers refuse to overwrite an
25845 # existing .o file with -o, though they will create one.
25846 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25847 if { (eval echo "$as_me:25847: \"$ac_try\"") >&5
25848   (eval $ac_try) 2>&5
25849   ac_status=$?
25850   echo "$as_me:25850: \$? = $ac_status" >&5
25851   (exit "$ac_status"); } &&
25852   test -f conftest2.$ac_objext && { (eval echo "$as_me:25852: \"$ac_try\"") >&5
25853   (eval $ac_try) 2>&5
25854   ac_status=$?
25855   echo "$as_me:25855: \$? = $ac_status" >&5
25856   (exit "$ac_status"); };
25857 then
25858   eval cf_cv_prog_CXX_c_o=yes
25859 else
25860   eval cf_cv_prog_CXX_c_o=no
25861 fi
25862 rm -rf ./conftest*
25863
25864 fi
25865 if test "$cf_cv_prog_CXX_c_o" = yes; then
25866   echo "$as_me:25866: result: yes" >&5
25867 echo "${ECHO_T}yes" >&6
25868 else
25869   echo "$as_me:25869: result: no" >&5
25870 echo "${ECHO_T}no" >&6
25871 fi
25872
25873         case "$GXX_VERSION" in
25874         (1.*|2.[0-6]*|[1-9][0-9].*)
25875                 cf_cxx_library=yes
25876                 ;;
25877         (*-2.7*|2.7*)
25878
25879 cf_cxx_library=unknown
25880 case "$cf_cv_system_name" in
25881 (os2*)
25882         cf_gpp_libname=gpp
25883         ;;
25884 (*)
25885         cf_gpp_libname=g++
25886         ;;
25887 esac
25888 if test "$GXX" = yes; then
25889         echo "$as_me:25889: checking for lib$cf_gpp_libname" >&5
25890 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25891         cf_save="$LIBS"
25892
25893 cf_add_libs="$LIBS"
25894 # reverse order
25895 cf_add_0lib=
25896 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25897 # filter duplicates
25898 for cf_add_1lib in $cf_add_0lib; do
25899         for cf_add_2lib in $cf_add_libs; do
25900                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25901                         cf_add_1lib=
25902                         break
25903                 fi
25904         done
25905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25906 done
25907 LIBS="$cf_add_libs"
25908
25909         cat >"conftest.$ac_ext" <<_ACEOF
25910 #line 25910 "configure"
25911 #include "confdefs.h"
25912
25913 #include <$cf_gpp_libname/builtin.h>
25914
25915 int
25916 main (void)
25917 {
25918 two_arg_error_handler_t foo2 = lib_error_handler
25919   ;
25920   return 0;
25921 }
25922 _ACEOF
25923 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25924 if { (eval echo "$as_me:25924: \"$ac_link\"") >&5
25925   (eval $ac_link) 2>&5
25926   ac_status=$?
25927   echo "$as_me:25927: \$? = $ac_status" >&5
25928   (exit "$ac_status"); } &&
25929          { ac_try='test -s "conftest$ac_exeext"'
25930   { (eval echo "$as_me:25930: \"$ac_try\"") >&5
25931   (eval $ac_try) 2>&5
25932   ac_status=$?
25933   echo "$as_me:25933: \$? = $ac_status" >&5
25934   (exit "$ac_status"); }; }; then
25935   cf_cxx_library=yes
25936
25937 cf_add_libs="$CXXLIBS"
25938 # reverse order
25939 cf_add_0lib=
25940 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25941 # filter duplicates
25942 for cf_add_1lib in $cf_add_0lib; do
25943         for cf_add_2lib in $cf_add_libs; do
25944                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25945                         cf_add_1lib=
25946                         break
25947                 fi
25948         done
25949         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25950 done
25951 CXXLIBS="$cf_add_libs"
25952
25953          if test "$cf_gpp_libname" = cpp ; then
25954
25955 cat >>confdefs.h <<\EOF
25956 #define HAVE_GPP_BUILTIN_H 1
25957 EOF
25958
25959          else
25960
25961 cat >>confdefs.h <<\EOF
25962 #define HAVE_GXX_BUILTIN_H 1
25963 EOF
25964
25965          fi
25966 else
25967   echo "$as_me: failed program was:" >&5
25968 cat "conftest.$ac_ext" >&5
25969 cat >"conftest.$ac_ext" <<_ACEOF
25970 #line 25970 "configure"
25971 #include "confdefs.h"
25972
25973 #include <builtin.h>
25974
25975 int
25976 main (void)
25977 {
25978 two_arg_error_handler_t foo2 = lib_error_handler
25979   ;
25980   return 0;
25981 }
25982 _ACEOF
25983 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25984 if { (eval echo "$as_me:25984: \"$ac_link\"") >&5
25985   (eval $ac_link) 2>&5
25986   ac_status=$?
25987   echo "$as_me:25987: \$? = $ac_status" >&5
25988   (exit "$ac_status"); } &&
25989          { ac_try='test -s "conftest$ac_exeext"'
25990   { (eval echo "$as_me:25990: \"$ac_try\"") >&5
25991   (eval $ac_try) 2>&5
25992   ac_status=$?
25993   echo "$as_me:25993: \$? = $ac_status" >&5
25994   (exit "$ac_status"); }; }; then
25995   cf_cxx_library=yes
25996
25997 cf_add_libs="$CXXLIBS"
25998 # reverse order
25999 cf_add_0lib=
26000 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
26001 # filter duplicates
26002 for cf_add_1lib in $cf_add_0lib; do
26003         for cf_add_2lib in $cf_add_libs; do
26004                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
26005                         cf_add_1lib=
26006                         break
26007                 fi
26008         done
26009         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
26010 done
26011 CXXLIBS="$cf_add_libs"
26012
26013 cat >>confdefs.h <<\EOF
26014 #define HAVE_BUILTIN_H 1
26015 EOF
26016
26017 else
26018   echo "$as_me: failed program was:" >&5
26019 cat "conftest.$ac_ext" >&5
26020 cf_cxx_library=no
26021 fi
26022 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26023 fi
26024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26025         LIBS="$cf_save"
26026         echo "$as_me:26026: result: $cf_cxx_library" >&5
26027 echo "${ECHO_T}$cf_cxx_library" >&6
26028 fi
26029
26030                 ;;
26031         (*)
26032                 cf_cxx_library=no
26033                 ;;
26034         esac
26035
26036         ac_ext=cc
26037 ac_cpp='$CXXCPP $CPPFLAGS'
26038 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26039 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26040 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26041 ac_main_return="return"
26042 echo "$as_me:26042: checking how to run the C++ preprocessor" >&5
26043 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
26044 if test -z "$CXXCPP"; then
26045   if test "${ac_cv_prog_CXXCPP+set}" = set; then
26046   echo $ECHO_N "(cached) $ECHO_C" >&6
26047 else
26048       # Double quotes because CXXCPP needs to be expanded
26049     for CXXCPP in "$CXX -E" "/lib/cpp"
26050     do
26051       ac_preproc_ok=false
26052 for ac_cxx_preproc_warn_flag in '' yes
26053 do
26054   # Use a header file that comes with gcc, so configuring glibc
26055   # with a fresh cross-compiler works.
26056   # On the NeXT, cc -E runs the code through the compiler's parser,
26057   # not just through cpp. "Syntax error" is here to catch this case.
26058   cat >"conftest.$ac_ext" <<_ACEOF
26059 #line 26059 "configure"
26060 #include "confdefs.h"
26061 #include <assert.h>
26062                      Syntax error
26063 _ACEOF
26064 if { (eval echo "$as_me:26064: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26065   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26066   ac_status=$?
26067   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26068   rm -f conftest.er1
26069   cat conftest.err >&5
26070   echo "$as_me:26070: \$? = $ac_status" >&5
26071   (exit "$ac_status"); } >/dev/null; then
26072   if test -s conftest.err; then
26073     ac_cpp_err=$ac_cxx_preproc_warn_flag
26074   else
26075     ac_cpp_err=
26076   fi
26077 else
26078   ac_cpp_err=yes
26079 fi
26080 if test -z "$ac_cpp_err"; then
26081   :
26082 else
26083   echo "$as_me: failed program was:" >&5
26084   cat "conftest.$ac_ext" >&5
26085   # Broken: fails on valid input.
26086 continue
26087 fi
26088 rm -f conftest.err "conftest.$ac_ext"
26089
26090   # OK, works on sane cases.  Now check whether non-existent headers
26091   # can be detected and how.
26092   cat >"conftest.$ac_ext" <<_ACEOF
26093 #line 26093 "configure"
26094 #include "confdefs.h"
26095 #include <ac_nonexistent.h>
26096 _ACEOF
26097 if { (eval echo "$as_me:26097: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26098   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26099   ac_status=$?
26100   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26101   rm -f conftest.er1
26102   cat conftest.err >&5
26103   echo "$as_me:26103: \$? = $ac_status" >&5
26104   (exit "$ac_status"); } >/dev/null; then
26105   if test -s conftest.err; then
26106     ac_cpp_err=$ac_cxx_preproc_warn_flag
26107   else
26108     ac_cpp_err=
26109   fi
26110 else
26111   ac_cpp_err=yes
26112 fi
26113 if test -z "$ac_cpp_err"; then
26114   # Broken: success on invalid input.
26115 continue
26116 else
26117   echo "$as_me: failed program was:" >&5
26118   cat "conftest.$ac_ext" >&5
26119   # Passes both tests.
26120 ac_preproc_ok=:
26121 break
26122 fi
26123 rm -f conftest.err "conftest.$ac_ext"
26124
26125 done
26126 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
26127 rm -f conftest.err "conftest.$ac_ext"
26128 if $ac_preproc_ok; then
26129   break
26130 fi
26131
26132     done
26133     ac_cv_prog_CXXCPP=$CXXCPP
26134
26135 fi
26136   CXXCPP=$ac_cv_prog_CXXCPP
26137 else
26138   ac_cv_prog_CXXCPP=$CXXCPP
26139 fi
26140 echo "$as_me:26140: result: $CXXCPP" >&5
26141 echo "${ECHO_T}$CXXCPP" >&6
26142 ac_preproc_ok=false
26143 for ac_cxx_preproc_warn_flag in '' yes
26144 do
26145   # Use a header file that comes with gcc, so configuring glibc
26146   # with a fresh cross-compiler works.
26147   # On the NeXT, cc -E runs the code through the compiler's parser,
26148   # not just through cpp. "Syntax error" is here to catch this case.
26149   cat >"conftest.$ac_ext" <<_ACEOF
26150 #line 26150 "configure"
26151 #include "confdefs.h"
26152 #include <assert.h>
26153                      Syntax error
26154 _ACEOF
26155 if { (eval echo "$as_me:26155: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26156   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26157   ac_status=$?
26158   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26159   rm -f conftest.er1
26160   cat conftest.err >&5
26161   echo "$as_me:26161: \$? = $ac_status" >&5
26162   (exit "$ac_status"); } >/dev/null; then
26163   if test -s conftest.err; then
26164     ac_cpp_err=$ac_cxx_preproc_warn_flag
26165   else
26166     ac_cpp_err=
26167   fi
26168 else
26169   ac_cpp_err=yes
26170 fi
26171 if test -z "$ac_cpp_err"; then
26172   :
26173 else
26174   echo "$as_me: failed program was:" >&5
26175   cat "conftest.$ac_ext" >&5
26176   # Broken: fails on valid input.
26177 continue
26178 fi
26179 rm -f conftest.err "conftest.$ac_ext"
26180
26181   # OK, works on sane cases.  Now check whether non-existent headers
26182   # can be detected and how.
26183   cat >"conftest.$ac_ext" <<_ACEOF
26184 #line 26184 "configure"
26185 #include "confdefs.h"
26186 #include <ac_nonexistent.h>
26187 _ACEOF
26188 if { (eval echo "$as_me:26188: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26189   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26190   ac_status=$?
26191   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26192   rm -f conftest.er1
26193   cat conftest.err >&5
26194   echo "$as_me:26194: \$? = $ac_status" >&5
26195   (exit "$ac_status"); } >/dev/null; then
26196   if test -s conftest.err; then
26197     ac_cpp_err=$ac_cxx_preproc_warn_flag
26198   else
26199     ac_cpp_err=
26200   fi
26201 else
26202   ac_cpp_err=yes
26203 fi
26204 if test -z "$ac_cpp_err"; then
26205   # Broken: success on invalid input.
26206 continue
26207 else
26208   echo "$as_me: failed program was:" >&5
26209   cat "conftest.$ac_ext" >&5
26210   # Passes both tests.
26211 ac_preproc_ok=:
26212 break
26213 fi
26214 rm -f conftest.err "conftest.$ac_ext"
26215
26216 done
26217 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
26218 rm -f conftest.err "conftest.$ac_ext"
26219 if $ac_preproc_ok; then
26220   :
26221 else
26222   { { echo "$as_me:26222: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
26223 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
26224    { (exit 1); exit 1; }; }
26225 fi
26226
26227 ac_ext=cc
26228 ac_cpp='$CXXCPP $CPPFLAGS'
26229 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26230 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26231 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26232 ac_main_return="return"
26233
26234 for ac_header in typeinfo
26235 do
26236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26237 echo "$as_me:26237: checking for $ac_header" >&5
26238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26240   echo $ECHO_N "(cached) $ECHO_C" >&6
26241 else
26242   cat >"conftest.$ac_ext" <<_ACEOF
26243 #line 26243 "configure"
26244 #include "confdefs.h"
26245 #include <$ac_header>
26246 _ACEOF
26247 if { (eval echo "$as_me:26247: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26248   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26249   ac_status=$?
26250   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26251   rm -f conftest.er1
26252   cat conftest.err >&5
26253   echo "$as_me:26253: \$? = $ac_status" >&5
26254   (exit "$ac_status"); } >/dev/null; then
26255   if test -s conftest.err; then
26256     ac_cpp_err=$ac_cxx_preproc_warn_flag
26257   else
26258     ac_cpp_err=
26259   fi
26260 else
26261   ac_cpp_err=yes
26262 fi
26263 if test -z "$ac_cpp_err"; then
26264   eval "$as_ac_Header=yes"
26265 else
26266   echo "$as_me: failed program was:" >&5
26267   cat "conftest.$ac_ext" >&5
26268   eval "$as_ac_Header=no"
26269 fi
26270 rm -f conftest.err "conftest.$ac_ext"
26271 fi
26272 echo "$as_me:26272: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26273 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26274 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26275   cat >>confdefs.h <<EOF
26276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26277 EOF
26278
26279 fi
26280 done
26281
26282 for ac_header in iostream
26283 do
26284 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26285 echo "$as_me:26285: checking for $ac_header" >&5
26286 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26287 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26288   echo $ECHO_N "(cached) $ECHO_C" >&6
26289 else
26290   cat >"conftest.$ac_ext" <<_ACEOF
26291 #line 26291 "configure"
26292 #include "confdefs.h"
26293 #include <$ac_header>
26294 _ACEOF
26295 if { (eval echo "$as_me:26295: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26296   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26297   ac_status=$?
26298   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26299   rm -f conftest.er1
26300   cat conftest.err >&5
26301   echo "$as_me:26301: \$? = $ac_status" >&5
26302   (exit "$ac_status"); } >/dev/null; then
26303   if test -s conftest.err; then
26304     ac_cpp_err=$ac_cxx_preproc_warn_flag
26305   else
26306     ac_cpp_err=
26307   fi
26308 else
26309   ac_cpp_err=yes
26310 fi
26311 if test -z "$ac_cpp_err"; then
26312   eval "$as_ac_Header=yes"
26313 else
26314   echo "$as_me: failed program was:" >&5
26315   cat "conftest.$ac_ext" >&5
26316   eval "$as_ac_Header=no"
26317 fi
26318 rm -f conftest.err "conftest.$ac_ext"
26319 fi
26320 echo "$as_me:26320: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26321 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26322 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26323   cat >>confdefs.h <<EOF
26324 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26325 EOF
26326
26327 fi
26328 done
26329
26330 if test x"$ac_cv_header_iostream" = xyes ; then
26331         echo "$as_me:26331: checking if iostream uses std-namespace" >&5
26332 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
26333         cat >"conftest.$ac_ext" <<_ACEOF
26334 #line 26334 "configure"
26335 #include "confdefs.h"
26336
26337 #include <iostream>
26338 using std::endl;
26339 using std::cerr;
26340 int
26341 main (void)
26342 {
26343
26344 cerr << "testing" << endl;
26345
26346   ;
26347   return 0;
26348 }
26349 _ACEOF
26350 rm -f "conftest.$ac_objext"
26351 if { (eval echo "$as_me:26351: \"$ac_compile\"") >&5
26352   (eval $ac_compile) 2>&5
26353   ac_status=$?
26354   echo "$as_me:26354: \$? = $ac_status" >&5
26355   (exit "$ac_status"); } &&
26356          { ac_try='test -s "conftest.$ac_objext"'
26357   { (eval echo "$as_me:26357: \"$ac_try\"") >&5
26358   (eval $ac_try) 2>&5
26359   ac_status=$?
26360   echo "$as_me:26360: \$? = $ac_status" >&5
26361   (exit "$ac_status"); }; }; then
26362   cf_iostream_namespace=yes
26363 else
26364   echo "$as_me: failed program was:" >&5
26365 cat "conftest.$ac_ext" >&5
26366 cf_iostream_namespace=no
26367 fi
26368 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26369         echo "$as_me:26369: result: $cf_iostream_namespace" >&5
26370 echo "${ECHO_T}$cf_iostream_namespace" >&6
26371         if test "$cf_iostream_namespace" = yes ; then
26372
26373 cat >>confdefs.h <<\EOF
26374 #define IOSTREAM_NAMESPACE 1
26375 EOF
26376
26377         fi
26378 fi
26379
26380 echo "$as_me:26380: checking if we should include stdbool.h" >&5
26381 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
26382
26383 if test "${cf_cv_header_stdbool_h+set}" = set; then
26384   echo $ECHO_N "(cached) $ECHO_C" >&6
26385 else
26386
26387         cat >"conftest.$ac_ext" <<_ACEOF
26388 #line 26388 "configure"
26389 #include "confdefs.h"
26390
26391 int
26392 main (void)
26393 {
26394 bool foo = false; (void)foo
26395   ;
26396   return 0;
26397 }
26398 _ACEOF
26399 rm -f "conftest.$ac_objext"
26400 if { (eval echo "$as_me:26400: \"$ac_compile\"") >&5
26401   (eval $ac_compile) 2>&5
26402   ac_status=$?
26403   echo "$as_me:26403: \$? = $ac_status" >&5
26404   (exit "$ac_status"); } &&
26405          { ac_try='test -s "conftest.$ac_objext"'
26406   { (eval echo "$as_me:26406: \"$ac_try\"") >&5
26407   (eval $ac_try) 2>&5
26408   ac_status=$?
26409   echo "$as_me:26409: \$? = $ac_status" >&5
26410   (exit "$ac_status"); }; }; then
26411   cf_cv_header_stdbool_h=0
26412 else
26413   echo "$as_me: failed program was:" >&5
26414 cat "conftest.$ac_ext" >&5
26415 cat >"conftest.$ac_ext" <<_ACEOF
26416 #line 26416 "configure"
26417 #include "confdefs.h"
26418
26419 #ifndef __BEOS__
26420 #include <stdbool.h>
26421 #endif
26422
26423 int
26424 main (void)
26425 {
26426 bool foo = false; (void)foo
26427   ;
26428   return 0;
26429 }
26430 _ACEOF
26431 rm -f "conftest.$ac_objext"
26432 if { (eval echo "$as_me:26432: \"$ac_compile\"") >&5
26433   (eval $ac_compile) 2>&5
26434   ac_status=$?
26435   echo "$as_me:26435: \$? = $ac_status" >&5
26436   (exit "$ac_status"); } &&
26437          { ac_try='test -s "conftest.$ac_objext"'
26438   { (eval echo "$as_me:26438: \"$ac_try\"") >&5
26439   (eval $ac_try) 2>&5
26440   ac_status=$?
26441   echo "$as_me:26441: \$? = $ac_status" >&5
26442   (exit "$ac_status"); }; }; then
26443   cf_cv_header_stdbool_h=1
26444 else
26445   echo "$as_me: failed program was:" >&5
26446 cat "conftest.$ac_ext" >&5
26447 cf_cv_header_stdbool_h=0
26448 fi
26449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26450 fi
26451 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26452 fi
26453
26454 if test "$cf_cv_header_stdbool_h" = 1
26455 then    echo "$as_me:26455: result: yes" >&5
26456 echo "${ECHO_T}yes" >&6
26457 else    echo "$as_me:26457: result: no" >&5
26458 echo "${ECHO_T}no" >&6
26459 fi
26460
26461 echo "$as_me:26461: checking for builtin bool type" >&5
26462 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26463
26464 if test "${cf_cv_builtin_bool+set}" = set; then
26465   echo $ECHO_N "(cached) $ECHO_C" >&6
26466 else
26467
26468         cat >"conftest.$ac_ext" <<_ACEOF
26469 #line 26469 "configure"
26470 #include "confdefs.h"
26471
26472 #include <stdio.h>
26473 #include <sys/types.h>
26474
26475 int
26476 main (void)
26477 {
26478 bool x = false; (void)x
26479   ;
26480   return 0;
26481 }
26482 _ACEOF
26483 rm -f "conftest.$ac_objext"
26484 if { (eval echo "$as_me:26484: \"$ac_compile\"") >&5
26485   (eval $ac_compile) 2>&5
26486   ac_status=$?
26487   echo "$as_me:26487: \$? = $ac_status" >&5
26488   (exit "$ac_status"); } &&
26489          { ac_try='test -s "conftest.$ac_objext"'
26490   { (eval echo "$as_me:26490: \"$ac_try\"") >&5
26491   (eval $ac_try) 2>&5
26492   ac_status=$?
26493   echo "$as_me:26493: \$? = $ac_status" >&5
26494   (exit "$ac_status"); }; }; then
26495   cf_cv_builtin_bool=1
26496 else
26497   echo "$as_me: failed program was:" >&5
26498 cat "conftest.$ac_ext" >&5
26499 cf_cv_builtin_bool=0
26500 fi
26501 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26502
26503 fi
26504
26505 if test "$cf_cv_builtin_bool" = 1
26506 then    echo "$as_me:26506: result: yes" >&5
26507 echo "${ECHO_T}yes" >&6
26508 else    echo "$as_me:26508: result: no" >&5
26509 echo "${ECHO_T}no" >&6
26510 fi
26511
26512 echo "$as_me:26512: checking for bool" >&5
26513 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26514 if test "${ac_cv_type_bool+set}" = set; then
26515   echo $ECHO_N "(cached) $ECHO_C" >&6
26516 else
26517   cat >"conftest.$ac_ext" <<_ACEOF
26518 #line 26518 "configure"
26519 #include "confdefs.h"
26520
26521 $ac_includes_default
26522
26523 #if defined(__cplusplus)
26524
26525 #ifdef HAVE_GXX_BUILTIN_H
26526 #include <g++/builtin.h>
26527 #elif HAVE_GPP_BUILTIN_H
26528 #include <gpp/builtin.h>
26529 #elif HAVE_BUILTIN_H
26530 #include <builtin.h>
26531 #endif
26532
26533 #else
26534
26535 #if $cf_cv_header_stdbool_h
26536 #include <stdbool.h>
26537 #endif
26538
26539 #endif
26540
26541 int
26542 main (void)
26543 {
26544 if ((bool *) 0)
26545   return 0;
26546 if (sizeof (bool))
26547   return 0;
26548   ;
26549   return 0;
26550 }
26551 _ACEOF
26552 rm -f "conftest.$ac_objext"
26553 if { (eval echo "$as_me:26553: \"$ac_compile\"") >&5
26554   (eval $ac_compile) 2>&5
26555   ac_status=$?
26556   echo "$as_me:26556: \$? = $ac_status" >&5
26557   (exit "$ac_status"); } &&
26558          { ac_try='test -s "conftest.$ac_objext"'
26559   { (eval echo "$as_me:26559: \"$ac_try\"") >&5
26560   (eval $ac_try) 2>&5
26561   ac_status=$?
26562   echo "$as_me:26562: \$? = $ac_status" >&5
26563   (exit "$ac_status"); }; }; then
26564   ac_cv_type_bool=yes
26565 else
26566   echo "$as_me: failed program was:" >&5
26567 cat "conftest.$ac_ext" >&5
26568 ac_cv_type_bool=no
26569 fi
26570 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26571 fi
26572 echo "$as_me:26572: result: $ac_cv_type_bool" >&5
26573 echo "${ECHO_T}$ac_cv_type_bool" >&6
26574
26575 echo "$as_me:26575: checking size of bool" >&5
26576 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26577 if test "${ac_cv_sizeof_bool+set}" = set; then
26578   echo $ECHO_N "(cached) $ECHO_C" >&6
26579 else
26580   if test "$ac_cv_type_bool" = yes; then
26581   if test "$cross_compiling" = yes; then
26582   # Depending upon the size, compute the lo and hi bounds.
26583 cat >"conftest.$ac_ext" <<_ACEOF
26584 #line 26584 "configure"
26585 #include "confdefs.h"
26586
26587 $ac_includes_default
26588
26589 #if defined(__cplusplus)
26590
26591 #ifdef HAVE_GXX_BUILTIN_H
26592 #include <g++/builtin.h>
26593 #elif HAVE_GPP_BUILTIN_H
26594 #include <gpp/builtin.h>
26595 #elif HAVE_BUILTIN_H
26596 #include <builtin.h>
26597 #endif
26598
26599 #else
26600
26601 #if $cf_cv_header_stdbool_h
26602 #include <stdbool.h>
26603 #endif
26604
26605 #endif
26606
26607 int
26608 main (void)
26609 {
26610 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26611   ;
26612   return 0;
26613 }
26614 _ACEOF
26615 rm -f "conftest.$ac_objext"
26616 if { (eval echo "$as_me:26616: \"$ac_compile\"") >&5
26617   (eval $ac_compile) 2>&5
26618   ac_status=$?
26619   echo "$as_me:26619: \$? = $ac_status" >&5
26620   (exit "$ac_status"); } &&
26621          { ac_try='test -s "conftest.$ac_objext"'
26622   { (eval echo "$as_me:26622: \"$ac_try\"") >&5
26623   (eval $ac_try) 2>&5
26624   ac_status=$?
26625   echo "$as_me:26625: \$? = $ac_status" >&5
26626   (exit "$ac_status"); }; }; then
26627   ac_lo=0 ac_mid=0
26628   while :; do
26629     cat >"conftest.$ac_ext" <<_ACEOF
26630 #line 26630 "configure"
26631 #include "confdefs.h"
26632
26633 $ac_includes_default
26634
26635 #if defined(__cplusplus)
26636
26637 #ifdef HAVE_GXX_BUILTIN_H
26638 #include <g++/builtin.h>
26639 #elif HAVE_GPP_BUILTIN_H
26640 #include <gpp/builtin.h>
26641 #elif HAVE_BUILTIN_H
26642 #include <builtin.h>
26643 #endif
26644
26645 #else
26646
26647 #if $cf_cv_header_stdbool_h
26648 #include <stdbool.h>
26649 #endif
26650
26651 #endif
26652
26653 int
26654 main (void)
26655 {
26656 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26657   ;
26658   return 0;
26659 }
26660 _ACEOF
26661 rm -f "conftest.$ac_objext"
26662 if { (eval echo "$as_me:26662: \"$ac_compile\"") >&5
26663   (eval $ac_compile) 2>&5
26664   ac_status=$?
26665   echo "$as_me:26665: \$? = $ac_status" >&5
26666   (exit "$ac_status"); } &&
26667          { ac_try='test -s "conftest.$ac_objext"'
26668   { (eval echo "$as_me:26668: \"$ac_try\"") >&5
26669   (eval $ac_try) 2>&5
26670   ac_status=$?
26671   echo "$as_me:26671: \$? = $ac_status" >&5
26672   (exit "$ac_status"); }; }; then
26673   ac_hi=$ac_mid; break
26674 else
26675   echo "$as_me: failed program was:" >&5
26676 cat "conftest.$ac_ext" >&5
26677 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26678 fi
26679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26680   done
26681 else
26682   echo "$as_me: failed program was:" >&5
26683 cat "conftest.$ac_ext" >&5
26684 ac_hi=-1 ac_mid=-1
26685   while :; do
26686     cat >"conftest.$ac_ext" <<_ACEOF
26687 #line 26687 "configure"
26688 #include "confdefs.h"
26689
26690 $ac_includes_default
26691
26692 #if defined(__cplusplus)
26693
26694 #ifdef HAVE_GXX_BUILTIN_H
26695 #include <g++/builtin.h>
26696 #elif HAVE_GPP_BUILTIN_H
26697 #include <gpp/builtin.h>
26698 #elif HAVE_BUILTIN_H
26699 #include <builtin.h>
26700 #endif
26701
26702 #else
26703
26704 #if $cf_cv_header_stdbool_h
26705 #include <stdbool.h>
26706 #endif
26707
26708 #endif
26709
26710 int
26711 main (void)
26712 {
26713 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26714   ;
26715   return 0;
26716 }
26717 _ACEOF
26718 rm -f "conftest.$ac_objext"
26719 if { (eval echo "$as_me:26719: \"$ac_compile\"") >&5
26720   (eval $ac_compile) 2>&5
26721   ac_status=$?
26722   echo "$as_me:26722: \$? = $ac_status" >&5
26723   (exit "$ac_status"); } &&
26724          { ac_try='test -s "conftest.$ac_objext"'
26725   { (eval echo "$as_me:26725: \"$ac_try\"") >&5
26726   (eval $ac_try) 2>&5
26727   ac_status=$?
26728   echo "$as_me:26728: \$? = $ac_status" >&5
26729   (exit "$ac_status"); }; }; then
26730   ac_lo=$ac_mid; break
26731 else
26732   echo "$as_me: failed program was:" >&5
26733 cat "conftest.$ac_ext" >&5
26734 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26735 fi
26736 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26737   done
26738 fi
26739 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26740 # Binary search between lo and hi bounds.
26741 while test "x$ac_lo" != "x$ac_hi"; do
26742   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26743   cat >"conftest.$ac_ext" <<_ACEOF
26744 #line 26744 "configure"
26745 #include "confdefs.h"
26746
26747 $ac_includes_default
26748
26749 #if defined(__cplusplus)
26750
26751 #ifdef HAVE_GXX_BUILTIN_H
26752 #include <g++/builtin.h>
26753 #elif HAVE_GPP_BUILTIN_H
26754 #include <gpp/builtin.h>
26755 #elif HAVE_BUILTIN_H
26756 #include <builtin.h>
26757 #endif
26758
26759 #else
26760
26761 #if $cf_cv_header_stdbool_h
26762 #include <stdbool.h>
26763 #endif
26764
26765 #endif
26766
26767 int
26768 main (void)
26769 {
26770 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26771   ;
26772   return 0;
26773 }
26774 _ACEOF
26775 rm -f "conftest.$ac_objext"
26776 if { (eval echo "$as_me:26776: \"$ac_compile\"") >&5
26777   (eval $ac_compile) 2>&5
26778   ac_status=$?
26779   echo "$as_me:26779: \$? = $ac_status" >&5
26780   (exit "$ac_status"); } &&
26781          { ac_try='test -s "conftest.$ac_objext"'
26782   { (eval echo "$as_me:26782: \"$ac_try\"") >&5
26783   (eval $ac_try) 2>&5
26784   ac_status=$?
26785   echo "$as_me:26785: \$? = $ac_status" >&5
26786   (exit "$ac_status"); }; }; then
26787   ac_hi=$ac_mid
26788 else
26789   echo "$as_me: failed program was:" >&5
26790 cat "conftest.$ac_ext" >&5
26791 ac_lo=`expr "$ac_mid" + 1`
26792 fi
26793 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26794 done
26795 ac_cv_sizeof_bool=$ac_lo
26796 else
26797   if test "$cross_compiling" = yes; then
26798   { { echo "$as_me:26798: error: cannot run test program while cross compiling" >&5
26799 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26800    { (exit 1); exit 1; }; }
26801 else
26802   cat >"conftest.$ac_ext" <<_ACEOF
26803 #line 26803 "configure"
26804 #include "confdefs.h"
26805
26806 $ac_includes_default
26807
26808 #if defined(__cplusplus)
26809
26810 #ifdef HAVE_GXX_BUILTIN_H
26811 #include <g++/builtin.h>
26812 #elif HAVE_GPP_BUILTIN_H
26813 #include <gpp/builtin.h>
26814 #elif HAVE_BUILTIN_H
26815 #include <builtin.h>
26816 #endif
26817
26818 #else
26819
26820 #if $cf_cv_header_stdbool_h
26821 #include <stdbool.h>
26822 #endif
26823
26824 #endif
26825
26826 int
26827 main (void)
26828 {
26829 FILE *f = fopen ("conftest.val", "w");
26830 if (!f)
26831   $ac_main_return (1);
26832 fprintf (f, "%ld", (long)(sizeof (bool)));
26833 fclose (f);
26834   ;
26835   return 0;
26836 }
26837 _ACEOF
26838 rm -f "conftest$ac_exeext"
26839 if { (eval echo "$as_me:26839: \"$ac_link\"") >&5
26840   (eval $ac_link) 2>&5
26841   ac_status=$?
26842   echo "$as_me:26842: \$? = $ac_status" >&5
26843   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26844   { (eval echo "$as_me:26844: \"$ac_try\"") >&5
26845   (eval $ac_try) 2>&5
26846   ac_status=$?
26847   echo "$as_me:26847: \$? = $ac_status" >&5
26848   (exit "$ac_status"); }; }; then
26849   ac_cv_sizeof_bool=`cat conftest.val`
26850 else
26851   echo "$as_me: program exited with status $ac_status" >&5
26852 echo "$as_me: failed program was:" >&5
26853 cat "conftest.$ac_ext" >&5
26854 fi
26855 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26856 fi
26857 fi
26858 rm -f conftest.val
26859 else
26860   ac_cv_sizeof_bool=0
26861 fi
26862 fi
26863 echo "$as_me:26863: result: $ac_cv_sizeof_bool" >&5
26864 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26865 cat >>confdefs.h <<EOF
26866 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26867 EOF
26868
26869 echo "$as_me:26869: checking for type of bool" >&5
26870 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26871 if test "${cf_cv_type_of_bool+set}" = set; then
26872   echo $ECHO_N "(cached) $ECHO_C" >&6
26873 else
26874
26875         rm -f cf_test.out
26876         if test "$cross_compiling" = yes; then
26877
26878                 case x$ac_cv_sizeof_bool in
26879                 (x1) cf_cv_type_of_bool="unsigned char";;
26880                 (x2) cf_cv_type_of_bool="unsigned short";;
26881                 (x4) cf_cv_type_of_bool="unsigned int";;
26882                 (x8) cf_cv_type_of_bool="unsigned long";;
26883                 (*)  cf_cv_type_of_bool=unknown;;
26884                 esac
26885
26886 else
26887   cat >"conftest.$ac_ext" <<_ACEOF
26888 #line 26888 "configure"
26889 #include "confdefs.h"
26890
26891 $ac_includes_default
26892
26893 #if defined(__cplusplus)
26894
26895 #ifdef HAVE_GXX_BUILTIN_H
26896 #include <g++/builtin.h>
26897 #elif HAVE_GPP_BUILTIN_H
26898 #include <gpp/builtin.h>
26899 #elif HAVE_BUILTIN_H
26900 #include <builtin.h>
26901 #endif
26902
26903 #else
26904
26905 #if $cf_cv_header_stdbool_h
26906 #include <stdbool.h>
26907 #endif
26908
26909 #endif
26910
26911 int main(void)
26912 {
26913         FILE *fp = fopen("cf_test.out", "w");
26914         if (fp != 0) {
26915                 bool x = true;
26916                 if ((bool)(-x) >= 0)
26917                         fputs("unsigned ", fp);
26918                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26919                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26920                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26921                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26922                 fclose(fp);
26923         }
26924         ${cf_cv_main_return:-return}(0);
26925 }
26926
26927 _ACEOF
26928 rm -f "conftest$ac_exeext"
26929 if { (eval echo "$as_me:26929: \"$ac_link\"") >&5
26930   (eval $ac_link) 2>&5
26931   ac_status=$?
26932   echo "$as_me:26932: \$? = $ac_status" >&5
26933   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26934   { (eval echo "$as_me:26934: \"$ac_try\"") >&5
26935   (eval $ac_try) 2>&5
26936   ac_status=$?
26937   echo "$as_me:26937: \$? = $ac_status" >&5
26938   (exit "$ac_status"); }; }; then
26939   cf_cv_type_of_bool=`cat cf_test.out`
26940                  if test -z "$cf_cv_type_of_bool"; then
26941                    cf_cv_type_of_bool=unknown
26942                  fi
26943 else
26944   echo "$as_me: program exited with status $ac_status" >&5
26945 echo "$as_me: failed program was:" >&5
26946 cat "conftest.$ac_ext" >&5
26947 cf_cv_type_of_bool=unknown
26948 fi
26949 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26950 fi
26951         rm -f cf_test.out
26952
26953 fi
26954 echo "$as_me:26954: result: $cf_cv_type_of_bool" >&5
26955 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26956
26957 if test "$cf_cv_type_of_bool" = unknown ; then
26958         case .$NCURSES_BOOL in
26959         (.auto|.) NCURSES_BOOL=unsigned;;
26960         esac
26961         { echo "$as_me:26961: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26962 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26963         cf_cv_type_of_bool=$NCURSES_BOOL
26964 fi
26965
26966 echo "$as_me:26966: checking for special defines needed for etip.h" >&5
26967 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26968 cf_save_CXXFLAGS="$CXXFLAGS"
26969 cf_result="none"
26970
26971 # etip.h includes ncurses.h which includes ncurses_dll.h
26972 # But ncurses_dll.h is generated - fix here.
26973 test -d include || mkdir include
26974 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
26975
26976 for cf_math in "" MATH_H
26977 do
26978 for cf_excp in "" MATH_EXCEPTION
26979 do
26980         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26981         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26982         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26983 cat >"conftest.$ac_ext" <<_ACEOF
26984 #line 26984 "configure"
26985 #include "confdefs.h"
26986
26987 #include <etip.h.in>
26988
26989 int
26990 main (void)
26991 {
26992
26993   ;
26994   return 0;
26995 }
26996 _ACEOF
26997 rm -f "conftest.$ac_objext"
26998 if { (eval echo "$as_me:26998: \"$ac_compile\"") >&5
26999   (eval $ac_compile) 2>&5
27000   ac_status=$?
27001   echo "$as_me:27001: \$? = $ac_status" >&5
27002   (exit "$ac_status"); } &&
27003          { ac_try='test -s "conftest.$ac_objext"'
27004   { (eval echo "$as_me:27004: \"$ac_try\"") >&5
27005   (eval $ac_try) 2>&5
27006   ac_status=$?
27007   echo "$as_me:27007: \$? = $ac_status" >&5
27008   (exit "$ac_status"); }; }; then
27009
27010         test -n "$cf_math" && cat >>confdefs.h <<EOF
27011 #define ETIP_NEEDS_${cf_math} 1
27012 EOF
27013
27014         test -n "$cf_excp" && cat >>confdefs.h <<EOF
27015 #define ETIP_NEEDS_${cf_excp} 1
27016 EOF
27017
27018         cf_result="$cf_math $cf_excp"
27019         break 2
27020
27021 else
27022   echo "$as_me: failed program was:" >&5
27023 cat "conftest.$ac_ext" >&5
27024 fi
27025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27026 done
27027 done
27028 echo "$as_me:27028: result: ${cf_result:-(none)}" >&5
27029 echo "${ECHO_T}${cf_result:-(none)}" >&6
27030 CXXFLAGS="$cf_save_CXXFLAGS"
27031
27032 if test -n "$CXX"; then
27033 echo "$as_me:27033: checking if $CXX accepts override keyword" >&5
27034 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
27035 if test "${cf_cv_cpp_override+set}" = set; then
27036   echo $ECHO_N "(cached) $ECHO_C" >&6
27037 else
27038
27039         ac_ext=cc
27040 ac_cpp='$CXXCPP $CPPFLAGS'
27041 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27042 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27043 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27044 ac_main_return="return"
27045
27046         if test "$cross_compiling" = yes; then
27047   cf_cv_cpp_override=unknown
27048 else
27049   cat >"conftest.$ac_ext" <<_ACEOF
27050 #line 27050 "configure"
27051 #include "confdefs.h"
27052
27053 class base
27054 {
27055 public:
27056         virtual int foo(float x) = 0;
27057 };
27058
27059 class derived: public base
27060 {
27061 public:
27062         int foo(float x) override { return x != 0.0 ? 1 : 0; }
27063 };
27064
27065 int main(void) { }
27066
27067 _ACEOF
27068 rm -f "conftest$ac_exeext"
27069 if { (eval echo "$as_me:27069: \"$ac_link\"") >&5
27070   (eval $ac_link) 2>&5
27071   ac_status=$?
27072   echo "$as_me:27072: \$? = $ac_status" >&5
27073   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27074   { (eval echo "$as_me:27074: \"$ac_try\"") >&5
27075   (eval $ac_try) 2>&5
27076   ac_status=$?
27077   echo "$as_me:27077: \$? = $ac_status" >&5
27078   (exit "$ac_status"); }; }; then
27079   cf_cv_cpp_override=yes
27080 else
27081   echo "$as_me: program exited with status $ac_status" >&5
27082 echo "$as_me: failed program was:" >&5
27083 cat "conftest.$ac_ext" >&5
27084 cf_cv_cpp_override=no
27085 fi
27086 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27087 fi
27088         ac_ext=cc
27089 ac_cpp='$CXXCPP $CPPFLAGS'
27090 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27091 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27092 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27093 ac_main_return="return"
27094
27095 fi
27096 echo "$as_me:27096: result: $cf_cv_cpp_override" >&5
27097 echo "${ECHO_T}$cf_cv_cpp_override" >&6
27098 fi
27099 test "$cf_cv_cpp_override" = yes &&
27100 cat >>confdefs.h <<\EOF
27101 #define CPP_HAS_OVERRIDE 1
27102 EOF
27103
27104 if test -n "$CXX"; then
27105 echo "$as_me:27105: checking if $CXX accepts parameter initialization" >&5
27106 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
27107 if test "${cf_cv_cpp_param_init+set}" = set; then
27108   echo $ECHO_N "(cached) $ECHO_C" >&6
27109 else
27110
27111         ac_ext=cc
27112 ac_cpp='$CXXCPP $CPPFLAGS'
27113 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27114 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27115 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27116 ac_main_return="return"
27117
27118         if test "$cross_compiling" = yes; then
27119   cf_cv_cpp_param_init=unknown
27120 else
27121   cat >"conftest.$ac_ext" <<_ACEOF
27122 #line 27122 "configure"
27123 #include "confdefs.h"
27124
27125 class TEST {
27126 private:
27127         int value;
27128 public:
27129         TEST(int x = 1);
27130         ~TEST();
27131 };
27132
27133 TEST::TEST(int x = 1)   // some compilers do not like second initializer
27134 {
27135         value = x;
27136 }
27137 int main(void) { }
27138
27139 _ACEOF
27140 rm -f "conftest$ac_exeext"
27141 if { (eval echo "$as_me:27141: \"$ac_link\"") >&5
27142   (eval $ac_link) 2>&5
27143   ac_status=$?
27144   echo "$as_me:27144: \$? = $ac_status" >&5
27145   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27146   { (eval echo "$as_me:27146: \"$ac_try\"") >&5
27147   (eval $ac_try) 2>&5
27148   ac_status=$?
27149   echo "$as_me:27149: \$? = $ac_status" >&5
27150   (exit "$ac_status"); }; }; then
27151   cf_cv_cpp_param_init=yes
27152 else
27153   echo "$as_me: program exited with status $ac_status" >&5
27154 echo "$as_me: failed program was:" >&5
27155 cat "conftest.$ac_ext" >&5
27156 cf_cv_cpp_param_init=no
27157 fi
27158 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27159 fi
27160         ac_ext=cc
27161 ac_cpp='$CXXCPP $CPPFLAGS'
27162 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27163 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27164 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27165 ac_main_return="return"
27166
27167 fi
27168 echo "$as_me:27168: result: $cf_cv_cpp_param_init" >&5
27169 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
27170 fi
27171 test "$cf_cv_cpp_param_init" = yes &&
27172 cat >>confdefs.h <<\EOF
27173 #define CPP_HAS_PARAM_INIT 1
27174 EOF
27175
27176 if test -n "$CXX"; then
27177
27178 echo "$as_me:27178: checking if $CXX accepts static_cast" >&5
27179 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
27180 if test "${cf_cv_cpp_static_cast+set}" = set; then
27181   echo $ECHO_N "(cached) $ECHO_C" >&6
27182 else
27183
27184         ac_ext=cc
27185 ac_cpp='$CXXCPP $CPPFLAGS'
27186 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27187 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27188 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27189 ac_main_return="return"
27190
27191         cat >"conftest.$ac_ext" <<_ACEOF
27192 #line 27192 "configure"
27193 #include "confdefs.h"
27194
27195 class NCursesPanel
27196 {
27197 public:
27198   NCursesPanel(int nlines,
27199                int ncols,
27200                int begin_y = 0,
27201                int begin_x = 0)
27202   {
27203   }
27204   NCursesPanel();
27205   ~NCursesPanel();
27206 };
27207
27208 template<class T> class NCursesUserPanel : public NCursesPanel
27209 {
27210 public:
27211   NCursesUserPanel (int nlines,
27212                     int ncols,
27213                     int begin_y = 0,
27214                     int begin_x = 0,
27215                     const T* p_UserData = static_cast<T*>(0))
27216     : NCursesPanel (nlines, ncols, begin_y, begin_x)
27217   {
27218   };
27219   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
27220   {
27221   };
27222
27223   virtual ~NCursesUserPanel() {};
27224 };
27225
27226 int
27227 main (void)
27228 {
27229
27230         const char* p_UserData = static_cast<char*>(0)
27231   ;
27232   return 0;
27233 }
27234 _ACEOF
27235 rm -f "conftest.$ac_objext"
27236 if { (eval echo "$as_me:27236: \"$ac_compile\"") >&5
27237   (eval $ac_compile) 2>&5
27238   ac_status=$?
27239   echo "$as_me:27239: \$? = $ac_status" >&5
27240   (exit "$ac_status"); } &&
27241          { ac_try='test -s "conftest.$ac_objext"'
27242   { (eval echo "$as_me:27242: \"$ac_try\"") >&5
27243   (eval $ac_try) 2>&5
27244   ac_status=$?
27245   echo "$as_me:27245: \$? = $ac_status" >&5
27246   (exit "$ac_status"); }; }; then
27247   cf_cv_cpp_static_cast=yes
27248 else
27249   echo "$as_me: failed program was:" >&5
27250 cat "conftest.$ac_ext" >&5
27251 cf_cv_cpp_static_cast=no
27252 fi
27253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27254
27255         ac_ext=cc
27256 ac_cpp='$CXXCPP $CPPFLAGS'
27257 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27258 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27259 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27260 ac_main_return="return"
27261
27262 fi
27263 echo "$as_me:27263: result: $cf_cv_cpp_static_cast" >&5
27264 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
27265
27266 fi
27267
27268 test "$cf_cv_cpp_static_cast" = yes &&
27269 cat >>confdefs.h <<\EOF
27270 #define CPP_HAS_STATIC_CAST 1
27271 EOF
27272
27273         CXX_AR='$(AR)'
27274         CXX_ARFLAGS='$(ARFLAGS)'
27275         case "$cf_cv_system_name" in
27276         (irix*)
27277             if test "$GXX" != yes ; then
27278                 CXX_AR='$(CXX)'
27279                 CXX_ARFLAGS='-ar -o'
27280             fi
27281             ;;
27282         (sco3.2v5*)
27283             CXXLDFLAGS="-u main"
27284             ;;
27285         (solaris2*)
27286             if test "$GXX" != yes ; then
27287                 CXX_AR='$(CXX)'
27288                 CXX_ARFLAGS='-xar -o'
27289             fi
27290             ;;
27291         esac
27292
27293 else
27294         cf_cxx_library=no
27295         cf_cv_builtin_bool=1
27296
27297         # Just because we are not configuring against C++ right now does not
27298         # mean that a user will not want to use C++.  Some distributors disable
27299         # the C++ portion of this configuration as a shortcut (or just to avoid
27300         # compiling the demo in the c++ directory).  So we need a reasonable
27301         # default for the 'bool' type.
27302         #
27303         # Caveat: since the storage of the bool type is not standardized, it
27304         # may change.
27305
27306         if test "$NCURSES_BOOL" != auto ; then
27307                 cf_cv_type_of_bool=$NCURSES_BOOL
27308                 cf_cv_header_stdbool_h=0
27309         else
27310                 if test "$cf_cv_header_stdbool_h" = 1 ; then
27311
27312 echo "$as_me:27312: checking for bool" >&5
27313 echo $ECHO_N "checking for bool... $ECHO_C" >&6
27314 if test "${ac_cv_type_bool+set}" = set; then
27315   echo $ECHO_N "(cached) $ECHO_C" >&6
27316 else
27317   cat >"conftest.$ac_ext" <<_ACEOF
27318 #line 27318 "configure"
27319 #include "confdefs.h"
27320
27321 $ac_includes_default
27322
27323 #if defined(__cplusplus)
27324
27325 #ifdef HAVE_GXX_BUILTIN_H
27326 #include <g++/builtin.h>
27327 #elif HAVE_GPP_BUILTIN_H
27328 #include <gpp/builtin.h>
27329 #elif HAVE_BUILTIN_H
27330 #include <builtin.h>
27331 #endif
27332
27333 #else
27334
27335 #if $cf_cv_header_stdbool_h
27336 #include <stdbool.h>
27337 #endif
27338
27339 #endif
27340
27341 int
27342 main (void)
27343 {
27344 if ((bool *) 0)
27345   return 0;
27346 if (sizeof (bool))
27347   return 0;
27348   ;
27349   return 0;
27350 }
27351 _ACEOF
27352 rm -f "conftest.$ac_objext"
27353 if { (eval echo "$as_me:27353: \"$ac_compile\"") >&5
27354   (eval $ac_compile) 2>&5
27355   ac_status=$?
27356   echo "$as_me:27356: \$? = $ac_status" >&5
27357   (exit "$ac_status"); } &&
27358          { ac_try='test -s "conftest.$ac_objext"'
27359   { (eval echo "$as_me:27359: \"$ac_try\"") >&5
27360   (eval $ac_try) 2>&5
27361   ac_status=$?
27362   echo "$as_me:27362: \$? = $ac_status" >&5
27363   (exit "$ac_status"); }; }; then
27364   ac_cv_type_bool=yes
27365 else
27366   echo "$as_me: failed program was:" >&5
27367 cat "conftest.$ac_ext" >&5
27368 ac_cv_type_bool=no
27369 fi
27370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27371 fi
27372 echo "$as_me:27372: result: $ac_cv_type_bool" >&5
27373 echo "${ECHO_T}$ac_cv_type_bool" >&6
27374
27375 echo "$as_me:27375: checking size of bool" >&5
27376 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
27377 if test "${ac_cv_sizeof_bool+set}" = set; then
27378   echo $ECHO_N "(cached) $ECHO_C" >&6
27379 else
27380   if test "$ac_cv_type_bool" = yes; then
27381   if test "$cross_compiling" = yes; then
27382   # Depending upon the size, compute the lo and hi bounds.
27383 cat >"conftest.$ac_ext" <<_ACEOF
27384 #line 27384 "configure"
27385 #include "confdefs.h"
27386
27387 $ac_includes_default
27388
27389 #if defined(__cplusplus)
27390
27391 #ifdef HAVE_GXX_BUILTIN_H
27392 #include <g++/builtin.h>
27393 #elif HAVE_GPP_BUILTIN_H
27394 #include <gpp/builtin.h>
27395 #elif HAVE_BUILTIN_H
27396 #include <builtin.h>
27397 #endif
27398
27399 #else
27400
27401 #if $cf_cv_header_stdbool_h
27402 #include <stdbool.h>
27403 #endif
27404
27405 #endif
27406
27407 int
27408 main (void)
27409 {
27410 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
27411   ;
27412   return 0;
27413 }
27414 _ACEOF
27415 rm -f "conftest.$ac_objext"
27416 if { (eval echo "$as_me:27416: \"$ac_compile\"") >&5
27417   (eval $ac_compile) 2>&5
27418   ac_status=$?
27419   echo "$as_me:27419: \$? = $ac_status" >&5
27420   (exit "$ac_status"); } &&
27421          { ac_try='test -s "conftest.$ac_objext"'
27422   { (eval echo "$as_me:27422: \"$ac_try\"") >&5
27423   (eval $ac_try) 2>&5
27424   ac_status=$?
27425   echo "$as_me:27425: \$? = $ac_status" >&5
27426   (exit "$ac_status"); }; }; then
27427   ac_lo=0 ac_mid=0
27428   while :; do
27429     cat >"conftest.$ac_ext" <<_ACEOF
27430 #line 27430 "configure"
27431 #include "confdefs.h"
27432
27433 $ac_includes_default
27434
27435 #if defined(__cplusplus)
27436
27437 #ifdef HAVE_GXX_BUILTIN_H
27438 #include <g++/builtin.h>
27439 #elif HAVE_GPP_BUILTIN_H
27440 #include <gpp/builtin.h>
27441 #elif HAVE_BUILTIN_H
27442 #include <builtin.h>
27443 #endif
27444
27445 #else
27446
27447 #if $cf_cv_header_stdbool_h
27448 #include <stdbool.h>
27449 #endif
27450
27451 #endif
27452
27453 int
27454 main (void)
27455 {
27456 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27457   ;
27458   return 0;
27459 }
27460 _ACEOF
27461 rm -f "conftest.$ac_objext"
27462 if { (eval echo "$as_me:27462: \"$ac_compile\"") >&5
27463   (eval $ac_compile) 2>&5
27464   ac_status=$?
27465   echo "$as_me:27465: \$? = $ac_status" >&5
27466   (exit "$ac_status"); } &&
27467          { ac_try='test -s "conftest.$ac_objext"'
27468   { (eval echo "$as_me:27468: \"$ac_try\"") >&5
27469   (eval $ac_try) 2>&5
27470   ac_status=$?
27471   echo "$as_me:27471: \$? = $ac_status" >&5
27472   (exit "$ac_status"); }; }; then
27473   ac_hi=$ac_mid; break
27474 else
27475   echo "$as_me: failed program was:" >&5
27476 cat "conftest.$ac_ext" >&5
27477 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27478 fi
27479 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27480   done
27481 else
27482   echo "$as_me: failed program was:" >&5
27483 cat "conftest.$ac_ext" >&5
27484 ac_hi=-1 ac_mid=-1
27485   while :; do
27486     cat >"conftest.$ac_ext" <<_ACEOF
27487 #line 27487 "configure"
27488 #include "confdefs.h"
27489
27490 $ac_includes_default
27491
27492 #if defined(__cplusplus)
27493
27494 #ifdef HAVE_GXX_BUILTIN_H
27495 #include <g++/builtin.h>
27496 #elif HAVE_GPP_BUILTIN_H
27497 #include <gpp/builtin.h>
27498 #elif HAVE_BUILTIN_H
27499 #include <builtin.h>
27500 #endif
27501
27502 #else
27503
27504 #if $cf_cv_header_stdbool_h
27505 #include <stdbool.h>
27506 #endif
27507
27508 #endif
27509
27510 int
27511 main (void)
27512 {
27513 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27514   ;
27515   return 0;
27516 }
27517 _ACEOF
27518 rm -f "conftest.$ac_objext"
27519 if { (eval echo "$as_me:27519: \"$ac_compile\"") >&5
27520   (eval $ac_compile) 2>&5
27521   ac_status=$?
27522   echo "$as_me:27522: \$? = $ac_status" >&5
27523   (exit "$ac_status"); } &&
27524          { ac_try='test -s "conftest.$ac_objext"'
27525   { (eval echo "$as_me:27525: \"$ac_try\"") >&5
27526   (eval $ac_try) 2>&5
27527   ac_status=$?
27528   echo "$as_me:27528: \$? = $ac_status" >&5
27529   (exit "$ac_status"); }; }; then
27530   ac_lo=$ac_mid; break
27531 else
27532   echo "$as_me: failed program was:" >&5
27533 cat "conftest.$ac_ext" >&5
27534 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27535 fi
27536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27537   done
27538 fi
27539 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27540 # Binary search between lo and hi bounds.
27541 while test "x$ac_lo" != "x$ac_hi"; do
27542   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27543   cat >"conftest.$ac_ext" <<_ACEOF
27544 #line 27544 "configure"
27545 #include "confdefs.h"
27546
27547 $ac_includes_default
27548
27549 #if defined(__cplusplus)
27550
27551 #ifdef HAVE_GXX_BUILTIN_H
27552 #include <g++/builtin.h>
27553 #elif HAVE_GPP_BUILTIN_H
27554 #include <gpp/builtin.h>
27555 #elif HAVE_BUILTIN_H
27556 #include <builtin.h>
27557 #endif
27558
27559 #else
27560
27561 #if $cf_cv_header_stdbool_h
27562 #include <stdbool.h>
27563 #endif
27564
27565 #endif
27566
27567 int
27568 main (void)
27569 {
27570 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27571   ;
27572   return 0;
27573 }
27574 _ACEOF
27575 rm -f "conftest.$ac_objext"
27576 if { (eval echo "$as_me:27576: \"$ac_compile\"") >&5
27577   (eval $ac_compile) 2>&5
27578   ac_status=$?
27579   echo "$as_me:27579: \$? = $ac_status" >&5
27580   (exit "$ac_status"); } &&
27581          { ac_try='test -s "conftest.$ac_objext"'
27582   { (eval echo "$as_me:27582: \"$ac_try\"") >&5
27583   (eval $ac_try) 2>&5
27584   ac_status=$?
27585   echo "$as_me:27585: \$? = $ac_status" >&5
27586   (exit "$ac_status"); }; }; then
27587   ac_hi=$ac_mid
27588 else
27589   echo "$as_me: failed program was:" >&5
27590 cat "conftest.$ac_ext" >&5
27591 ac_lo=`expr "$ac_mid" + 1`
27592 fi
27593 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27594 done
27595 ac_cv_sizeof_bool=$ac_lo
27596 else
27597   if test "$cross_compiling" = yes; then
27598   { { echo "$as_me:27598: error: cannot run test program while cross compiling" >&5
27599 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27600    { (exit 1); exit 1; }; }
27601 else
27602   cat >"conftest.$ac_ext" <<_ACEOF
27603 #line 27603 "configure"
27604 #include "confdefs.h"
27605
27606 $ac_includes_default
27607
27608 #if defined(__cplusplus)
27609
27610 #ifdef HAVE_GXX_BUILTIN_H
27611 #include <g++/builtin.h>
27612 #elif HAVE_GPP_BUILTIN_H
27613 #include <gpp/builtin.h>
27614 #elif HAVE_BUILTIN_H
27615 #include <builtin.h>
27616 #endif
27617
27618 #else
27619
27620 #if $cf_cv_header_stdbool_h
27621 #include <stdbool.h>
27622 #endif
27623
27624 #endif
27625
27626 int
27627 main (void)
27628 {
27629 FILE *f = fopen ("conftest.val", "w");
27630 if (!f)
27631   $ac_main_return (1);
27632 fprintf (f, "%ld", (long)(sizeof (bool)));
27633 fclose (f);
27634   ;
27635   return 0;
27636 }
27637 _ACEOF
27638 rm -f "conftest$ac_exeext"
27639 if { (eval echo "$as_me:27639: \"$ac_link\"") >&5
27640   (eval $ac_link) 2>&5
27641   ac_status=$?
27642   echo "$as_me:27642: \$? = $ac_status" >&5
27643   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27644   { (eval echo "$as_me:27644: \"$ac_try\"") >&5
27645   (eval $ac_try) 2>&5
27646   ac_status=$?
27647   echo "$as_me:27647: \$? = $ac_status" >&5
27648   (exit "$ac_status"); }; }; then
27649   ac_cv_sizeof_bool=`cat conftest.val`
27650 else
27651   echo "$as_me: program exited with status $ac_status" >&5
27652 echo "$as_me: failed program was:" >&5
27653 cat "conftest.$ac_ext" >&5
27654 fi
27655 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27656 fi
27657 fi
27658 rm -f conftest.val
27659 else
27660   ac_cv_sizeof_bool=0
27661 fi
27662 fi
27663 echo "$as_me:27663: result: $ac_cv_sizeof_bool" >&5
27664 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27665 cat >>confdefs.h <<EOF
27666 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27667 EOF
27668
27669 echo "$as_me:27669: checking for type of bool" >&5
27670 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27671 if test "${cf_cv_type_of_bool+set}" = set; then
27672   echo $ECHO_N "(cached) $ECHO_C" >&6
27673 else
27674
27675         rm -f cf_test.out
27676         if test "$cross_compiling" = yes; then
27677
27678                 case x$ac_cv_sizeof_bool in
27679                 (x1) cf_cv_type_of_bool="unsigned char";;
27680                 (x2) cf_cv_type_of_bool="unsigned short";;
27681                 (x4) cf_cv_type_of_bool="unsigned int";;
27682                 (x8) cf_cv_type_of_bool="unsigned long";;
27683                 (*)  cf_cv_type_of_bool=unknown;;
27684                 esac
27685
27686 else
27687   cat >"conftest.$ac_ext" <<_ACEOF
27688 #line 27688 "configure"
27689 #include "confdefs.h"
27690
27691 $ac_includes_default
27692
27693 #if defined(__cplusplus)
27694
27695 #ifdef HAVE_GXX_BUILTIN_H
27696 #include <g++/builtin.h>
27697 #elif HAVE_GPP_BUILTIN_H
27698 #include <gpp/builtin.h>
27699 #elif HAVE_BUILTIN_H
27700 #include <builtin.h>
27701 #endif
27702
27703 #else
27704
27705 #if $cf_cv_header_stdbool_h
27706 #include <stdbool.h>
27707 #endif
27708
27709 #endif
27710
27711 int main(void)
27712 {
27713         FILE *fp = fopen("cf_test.out", "w");
27714         if (fp != 0) {
27715                 bool x = true;
27716                 if ((bool)(-x) >= 0)
27717                         fputs("unsigned ", fp);
27718                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27719                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27720                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27721                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27722                 fclose(fp);
27723         }
27724         ${cf_cv_main_return:-return}(0);
27725 }
27726
27727 _ACEOF
27728 rm -f "conftest$ac_exeext"
27729 if { (eval echo "$as_me:27729: \"$ac_link\"") >&5
27730   (eval $ac_link) 2>&5
27731   ac_status=$?
27732   echo "$as_me:27732: \$? = $ac_status" >&5
27733   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27734   { (eval echo "$as_me:27734: \"$ac_try\"") >&5
27735   (eval $ac_try) 2>&5
27736   ac_status=$?
27737   echo "$as_me:27737: \$? = $ac_status" >&5
27738   (exit "$ac_status"); }; }; then
27739   cf_cv_type_of_bool=`cat cf_test.out`
27740                  if test -z "$cf_cv_type_of_bool"; then
27741                    cf_cv_type_of_bool=unknown
27742                  fi
27743 else
27744   echo "$as_me: program exited with status $ac_status" >&5
27745 echo "$as_me: failed program was:" >&5
27746 cat "conftest.$ac_ext" >&5
27747 cf_cv_type_of_bool=unknown
27748 fi
27749 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27750 fi
27751         rm -f cf_test.out
27752
27753 fi
27754 echo "$as_me:27754: result: $cf_cv_type_of_bool" >&5
27755 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27756
27757 if test "$cf_cv_type_of_bool" = unknown ; then
27758         case .$NCURSES_BOOL in
27759         (.auto|.) NCURSES_BOOL=unsigned;;
27760         esac
27761         { echo "$as_me:27761: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27762 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27763         cf_cv_type_of_bool=$NCURSES_BOOL
27764 fi
27765
27766                 else
27767                         echo "$as_me:27767: checking for fallback type of bool" >&5
27768 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27769                         case "$host_cpu" in
27770                         (i?86)  cf_cv_type_of_bool=char ;;
27771                         (*)     cf_cv_type_of_bool=int  ;;
27772                         esac
27773                         echo "$as_me:27773: result: $cf_cv_type_of_bool" >&5
27774 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27775                 fi
27776         fi
27777 fi
27778
27779 # If the C compiler did not declare bool, and we did not determine that the C++
27780 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27781 # ncurses library use the same type as C++ bool.  Note that this allows one to
27782 # specify the type of bool in a configure-script option and postpone
27783 # integration with the C++ compiler provided that the types are compatible.
27784 USE_CXX_BOOL=1
27785 if test "$cf_cv_cc_bool_type" = 1
27786 then
27787         # oops: C has a bool.  Unlikely, but C++ could differ.
27788         USE_CXX_BOOL=0
27789 elif test "$cf_cv_builtin_bool" = 0
27790 then
27791         # C++ has no bool
27792         USE_CXX_BOOL=0
27793 else
27794         # this is the normal case
27795         USE_CXX_BOOL='defined(__cplusplus)'
27796 fi
27797
27798 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27799
27800         if test "$cf_with_ada" != "no" ; then
27801                 if test "$with_libtool" != "no"; then
27802                         { echo "$as_me:27802: WARNING: libtool does not support Ada - disabling feature" >&5
27803 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27804                         cf_with_ada=no
27805                 fi
27806         fi
27807
27808         if test "$cf_with_ada" != "no" ; then
27809                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27810
27811         ADAFLAGS="$ADAFLAGS -gnatpn"
27812
27813         echo "$as_me:27813: checking optimization options for ADAFLAGS" >&5
27814 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27815         case "$CFLAGS" in
27816         (*-g*)
27817
27818         ADAFLAGS="$ADAFLAGS -g"
27819
27820                 ;;
27821         esac
27822         case "$CFLAGS" in
27823         (*-O*)
27824                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27825
27826         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27827
27828                 ;;
27829         esac
27830         echo "$as_me:27830: result: $ADAFLAGS" >&5
27831 echo "${ECHO_T}$ADAFLAGS" >&6
27832
27833 echo "$as_me:27833: checking if GNATPREP supports -T option" >&5
27834 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27835 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27836   echo $ECHO_N "(cached) $ECHO_C" >&6
27837 else
27838
27839 cf_cv_gnatprep_opt_t=no
27840 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27841
27842 fi
27843 echo "$as_me:27843: result: $cf_cv_gnatprep_opt_t" >&5
27844 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27845 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27846
27847 echo "$as_me:27847: checking if GNAT supports generics" >&5
27848 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27849 case "$cf_cv_gnat_version" in
27850 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27851         cf_gnat_generics=yes
27852         ;;
27853 (*)
27854         cf_gnat_generics=no
27855         ;;
27856 esac
27857 echo "$as_me:27857: result: $cf_gnat_generics" >&5
27858 echo "${ECHO_T}$cf_gnat_generics" >&6
27859
27860 if test "$cf_gnat_generics" = yes
27861 then
27862         cf_compile_generics=generics
27863         cf_generic_objects="\${GENOBJS}"
27864 else
27865         cf_compile_generics=
27866         cf_generic_objects=
27867 fi
27868
27869 echo "$as_me:27869: checking if GNAT supports SIGINT" >&5
27870 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27871 if test "${cf_cv_gnat_sigint+set}" = set; then
27872   echo $ECHO_N "(cached) $ECHO_C" >&6
27873 else
27874
27875 rm -rf ./conftest* ./*~conftest*
27876 cat >>conftest.ads <<CF_EOF
27877 with Ada.Interrupts.Names;
27878
27879 package ConfTest is
27880
27881    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27882    pragma Unreserve_All_Interrupts;
27883    pragma Warnings (On);
27884
27885    protected Process is
27886       procedure Stop;
27887       function Continue return Boolean;
27888       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27889    private
27890       Done : Boolean := False;
27891    end Process;
27892
27893 end ConfTest;
27894 CF_EOF
27895 cat >>conftest.adb <<CF_EOF
27896 package body ConfTest is
27897    protected body Process is
27898       procedure Stop is
27899       begin
27900          Done := True;
27901       end Stop;
27902       function Continue return Boolean is
27903       begin
27904          return not Done;
27905       end Continue;
27906    end Process;
27907 end ConfTest;
27908 CF_EOF
27909 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27910       cf_cv_gnat_sigint=yes
27911 else
27912    cf_cv_gnat_sigint=no
27913 fi
27914 rm -rf ./conftest* ./*~conftest*
27915
27916 fi
27917 echo "$as_me:27917: result: $cf_cv_gnat_sigint" >&5
27918 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27919
27920 if test "$cf_cv_gnat_sigint" = yes ; then
27921         USE_GNAT_SIGINT=""
27922 else
27923         USE_GNAT_SIGINT="#"
27924 fi
27925
27926 cf_gnat_libraries=no
27927 cf_gnat_projects=no
27928
27929 if test "$enable_gnat_projects" != no ; then
27930 echo "$as_me:27930: checking if GNAT supports project files" >&5
27931 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27932 case "$cf_cv_gnat_version" in
27933 (3.[0-9]*)
27934         ;;
27935 (*)
27936         case "$cf_cv_system_name" in
27937         (cygwin*|msys*)
27938                 ;;
27939         (*)
27940                 rm -rf ./conftest* ./*~conftest*
27941                 if mkdir conftest.src conftest.bin conftest.lib
27942                 then
27943                         cd conftest.src
27944                         rm -rf ./conftest* ./*~conftest*
27945                         cat >>library.gpr <<CF_EOF
27946 project Library is
27947   Kind := External ("LIB_KIND");
27948   for Library_Name use "ConfTest";
27949   for Object_Dir use ".";
27950   for Library_ALI_Dir use External("LIBRARY_DIR");
27951   for Library_Version use External ("SONAME");
27952   for Library_Kind use Kind;
27953   for Library_Dir use External("BUILD_DIR");
27954   Source_Dir := External ("SOURCE_DIR");
27955   for Source_Dirs use (Source_Dir);
27956 end Library;
27957 CF_EOF
27958                         cat >>confpackage.ads <<CF_EOF
27959 package ConfPackage is
27960    procedure conftest;
27961 end ConfPackage;
27962 CF_EOF
27963                         cat >>confpackage.adb <<CF_EOF
27964 with Text_IO;
27965 package body ConfPackage is
27966    procedure conftest is
27967    begin
27968       Text_IO.Put ("Hello World");
27969       Text_IO.New_Line;
27970    end conftest;
27971 end ConfPackage;
27972 CF_EOF
27973                         if ( "$cf_ada_make" $ADAFLAGS \
27974                                         -Plibrary.gpr \
27975                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27976                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27977                                         -XSOURCE_DIR="`pwd`" \
27978                                         -XSONAME=libConfTest.so.1 \
27979                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27980                                 cf_gnat_projects=yes
27981                         fi
27982                         cd ..
27983                 fi
27984                 if test -f conftest.lib/confpackage.ali
27985                 then
27986                         cf_gnat_libraries=yes
27987                 fi
27988                 rm -rf ./conftest* ./*~conftest*
27989                 ;;
27990         esac
27991         ;;
27992 esac
27993 echo "$as_me:27993: result: $cf_gnat_projects" >&5
27994 echo "${ECHO_T}$cf_gnat_projects" >&6
27995 fi # enable_gnat_projects
27996
27997 if test "$cf_gnat_projects" = yes
27998 then
27999         echo "$as_me:27999: checking if GNAT supports libraries" >&5
28000 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
28001         echo "$as_me:28001: result: $cf_gnat_libraries" >&5
28002 echo "${ECHO_T}$cf_gnat_libraries" >&6
28003 fi
28004
28005 USE_OLD_MAKERULES=""
28006 USE_GNAT_PROJECTS="#"
28007 USE_GNAT_MAKE_GPR="#"
28008 USE_GNAT_GPRBUILD="#"
28009
28010 if test "$cf_gnat_projects" = yes
28011 then
28012         USE_OLD_MAKERULES="#"
28013         USE_GNAT_PROJECTS=""
28014         if test "$cf_cv_VERSION_GPRBUILD" != no
28015         then
28016                 USE_GNAT_GPRBUILD=""
28017         elif test "$cf_cv_VERSION_GNATMAKE" != no
28018         then
28019                 USE_GNAT_MAKE_GPR=""
28020         else
28021                 { echo "$as_me:28021: WARNING: use old makefile rules since tools are missing" >&5
28022 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
28023         fi
28024 fi
28025
28026 if test "$cf_gnat_libraries" = yes
28027 then
28028         USE_GNAT_LIBRARIES=""
28029 else
28030         USE_GNAT_LIBRARIES="#"
28031 fi
28032
28033 echo "$as_me:28033: checking for Ada95 compiler" >&5
28034 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
28035
28036 # Check whether --with-ada-compiler or --without-ada-compiler was given.
28037 if test "${with_ada_compiler+set}" = set; then
28038   withval="$with_ada_compiler"
28039   cf_ada_compiler=$withval
28040 else
28041   cf_ada_compiler=gnatmake
28042 fi;
28043
28044 echo "$as_me:28044: result: $cf_ada_compiler" >&5
28045 echo "${ECHO_T}$cf_ada_compiler" >&6
28046
28047                         cf_ada_package=terminal_interface
28048
28049 echo "$as_me:28049: checking for Ada95 include directory" >&5
28050 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
28051
28052 # Check whether --with-ada-include or --without-ada-include was given.
28053 if test "${with_ada_include+set}" = set; then
28054   withval="$with_ada_include"
28055
28056 else
28057   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
28058 fi; if test -n "$prefix/share/ada/adainclude" ; then
28059
28060 if test "x$prefix" != xNONE; then
28061         cf_path_syntax="$prefix"
28062 else
28063         cf_path_syntax="$ac_default_prefix"
28064 fi
28065
28066 case ".$withval" in
28067 (.\$\(*\)*|.\'*\'*)
28068         ;;
28069 (..|./*|.\\*)
28070         ;;
28071 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
28072         ;;
28073 (.\$\{*prefix\}*|.\$\{*dir\}*)
28074         eval withval="$withval"
28075         case ".$withval" in
28076         (.NONE/*)
28077                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28078                 ;;
28079         esac
28080         ;;
28081 (.no|.NONE/*)
28082         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28083         ;;
28084 (*)
28085         { { echo "$as_me:28085: error: expected a pathname, not \"$withval\"" >&5
28086 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28087    { (exit 1); exit 1; }; }
28088         ;;
28089 esac
28090
28091 fi
28092 eval ADA_INCLUDE="$withval"
28093
28094 echo "$as_me:28094: result: $ADA_INCLUDE" >&5
28095 echo "${ECHO_T}$ADA_INCLUDE" >&6
28096
28097 echo "$as_me:28097: checking for Ada95 object directory" >&5
28098 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
28099
28100 # Check whether --with-ada-objects or --without-ada-objects was given.
28101 if test "${with_ada_objects+set}" = set; then
28102   withval="$with_ada_objects"
28103
28104 else
28105   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
28106 fi; if test -n "$prefix/lib/ada/adalib" ; then
28107
28108 if test "x$prefix" != xNONE; then
28109         cf_path_syntax="$prefix"
28110 else
28111         cf_path_syntax="$ac_default_prefix"
28112 fi
28113
28114 case ".$withval" in
28115 (.\$\(*\)*|.\'*\'*)
28116         ;;
28117 (..|./*|.\\*)
28118         ;;
28119 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
28120         ;;
28121 (.\$\{*prefix\}*|.\$\{*dir\}*)
28122         eval withval="$withval"
28123         case ".$withval" in
28124         (.NONE/*)
28125                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28126                 ;;
28127         esac
28128         ;;
28129 (.no|.NONE/*)
28130         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28131         ;;
28132 (*)
28133         { { echo "$as_me:28133: error: expected a pathname, not \"$withval\"" >&5
28134 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28135    { (exit 1); exit 1; }; }
28136         ;;
28137 esac
28138
28139 fi
28140 eval ADA_OBJECTS="$withval"
28141
28142 echo "$as_me:28142: result: $ADA_OBJECTS" >&5
28143 echo "${ECHO_T}$ADA_OBJECTS" >&6
28144
28145 echo "$as_me:28145: checking whether to build an Ada95 shared library" >&5
28146 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
28147
28148 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
28149 if test "${with_ada_sharedlib+set}" = set; then
28150   withval="$with_ada_sharedlib"
28151   with_ada_sharedlib=$withval
28152 else
28153   with_ada_sharedlib=no
28154 fi;
28155 cf_ada_sharedlib_warn=no
28156
28157 if test "x$with_ada_sharedlib" != xno
28158 then
28159         if test "x$cf_gnat_projects" != xyes
28160         then
28161                 with_ada_sharedlib=no
28162                 cf_ada_sharedlib_warn=yes
28163         fi
28164 fi
28165
28166 echo "$as_me:28166: result: $with_ada_sharedlib" >&5
28167 echo "${ECHO_T}$with_ada_sharedlib" >&6
28168 if test "x$cf_ada_sharedlib_warn" != xno
28169 then
28170         { echo "$as_me:28170: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
28171 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
28172 fi
28173
28174 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
28175 MAKE_ADA_SHAREDLIB="#"
28176
28177 if test "x$with_ada_sharedlib" != xno
28178 then
28179         MAKE_ADA_SHAREDLIB=
28180         if test "x$with_ada_sharedlib" != xyes
28181         then
28182                 ADA_SHAREDLIB="$with_ada_sharedlib"
28183         fi
28184 fi
28185
28186                         # allow the Ada binding to be renamed
28187
28188 echo "$as_me:28188: checking for Ada95 curses library name" >&5
28189 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
28190
28191 # Check whether --with-ada-libname or --without-ada-libname was given.
28192 if test "${with_ada_libname+set}" = set; then
28193   withval="$with_ada_libname"
28194   ADA_LIBNAME=$withval
28195 else
28196   ADA_LIBNAME=AdaCurses
28197 fi;
28198 case "x$ADA_LIBNAME" in
28199 (x|xyes|xno)
28200         ADA_LIBNAME=AdaCurses
28201         ;;
28202 esac
28203
28204 echo "$as_me:28204: result: $ADA_LIBNAME" >&5
28205 echo "${ECHO_T}$ADA_LIBNAME" >&6
28206
28207                 fi
28208         fi
28209 else
28210         cf_with_ada=no
28211 fi
28212
28213 # do this "late" to avoid conflict with header-checks
28214 if test "x$with_widec" = xyes ; then
28215         echo "$as_me:28215: checking for wchar_t" >&5
28216 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
28217 if test "${ac_cv_type_wchar_t+set}" = set; then
28218   echo $ECHO_N "(cached) $ECHO_C" >&6
28219 else
28220   cat >"conftest.$ac_ext" <<_ACEOF
28221 #line 28221 "configure"
28222 #include "confdefs.h"
28223 $ac_includes_default
28224 int
28225 main (void)
28226 {
28227 if ((wchar_t *) 0)
28228   return 0;
28229 if (sizeof (wchar_t))
28230   return 0;
28231   ;
28232   return 0;
28233 }
28234 _ACEOF
28235 rm -f "conftest.$ac_objext"
28236 if { (eval echo "$as_me:28236: \"$ac_compile\"") >&5
28237   (eval $ac_compile) 2>&5
28238   ac_status=$?
28239   echo "$as_me:28239: \$? = $ac_status" >&5
28240   (exit "$ac_status"); } &&
28241          { ac_try='test -s "conftest.$ac_objext"'
28242   { (eval echo "$as_me:28242: \"$ac_try\"") >&5
28243   (eval $ac_try) 2>&5
28244   ac_status=$?
28245   echo "$as_me:28245: \$? = $ac_status" >&5
28246   (exit "$ac_status"); }; }; then
28247   ac_cv_type_wchar_t=yes
28248 else
28249   echo "$as_me: failed program was:" >&5
28250 cat "conftest.$ac_ext" >&5
28251 ac_cv_type_wchar_t=no
28252 fi
28253 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28254 fi
28255 echo "$as_me:28255: result: $ac_cv_type_wchar_t" >&5
28256 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28257
28258 echo "$as_me:28258: checking size of wchar_t" >&5
28259 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28260 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28261   echo $ECHO_N "(cached) $ECHO_C" >&6
28262 else
28263   if test "$ac_cv_type_wchar_t" = yes; then
28264   if test "$cross_compiling" = yes; then
28265   # Depending upon the size, compute the lo and hi bounds.
28266 cat >"conftest.$ac_ext" <<_ACEOF
28267 #line 28267 "configure"
28268 #include "confdefs.h"
28269 $ac_includes_default
28270 int
28271 main (void)
28272 {
28273 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28274   ;
28275   return 0;
28276 }
28277 _ACEOF
28278 rm -f "conftest.$ac_objext"
28279 if { (eval echo "$as_me:28279: \"$ac_compile\"") >&5
28280   (eval $ac_compile) 2>&5
28281   ac_status=$?
28282   echo "$as_me:28282: \$? = $ac_status" >&5
28283   (exit "$ac_status"); } &&
28284          { ac_try='test -s "conftest.$ac_objext"'
28285   { (eval echo "$as_me:28285: \"$ac_try\"") >&5
28286   (eval $ac_try) 2>&5
28287   ac_status=$?
28288   echo "$as_me:28288: \$? = $ac_status" >&5
28289   (exit "$ac_status"); }; }; then
28290   ac_lo=0 ac_mid=0
28291   while :; do
28292     cat >"conftest.$ac_ext" <<_ACEOF
28293 #line 28293 "configure"
28294 #include "confdefs.h"
28295 $ac_includes_default
28296 int
28297 main (void)
28298 {
28299 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28300   ;
28301   return 0;
28302 }
28303 _ACEOF
28304 rm -f "conftest.$ac_objext"
28305 if { (eval echo "$as_me:28305: \"$ac_compile\"") >&5
28306   (eval $ac_compile) 2>&5
28307   ac_status=$?
28308   echo "$as_me:28308: \$? = $ac_status" >&5
28309   (exit "$ac_status"); } &&
28310          { ac_try='test -s "conftest.$ac_objext"'
28311   { (eval echo "$as_me:28311: \"$ac_try\"") >&5
28312   (eval $ac_try) 2>&5
28313   ac_status=$?
28314   echo "$as_me:28314: \$? = $ac_status" >&5
28315   (exit "$ac_status"); }; }; then
28316   ac_hi=$ac_mid; break
28317 else
28318   echo "$as_me: failed program was:" >&5
28319 cat "conftest.$ac_ext" >&5
28320 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28321 fi
28322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28323   done
28324 else
28325   echo "$as_me: failed program was:" >&5
28326 cat "conftest.$ac_ext" >&5
28327 ac_hi=-1 ac_mid=-1
28328   while :; do
28329     cat >"conftest.$ac_ext" <<_ACEOF
28330 #line 28330 "configure"
28331 #include "confdefs.h"
28332 $ac_includes_default
28333 int
28334 main (void)
28335 {
28336 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28337   ;
28338   return 0;
28339 }
28340 _ACEOF
28341 rm -f "conftest.$ac_objext"
28342 if { (eval echo "$as_me:28342: \"$ac_compile\"") >&5
28343   (eval $ac_compile) 2>&5
28344   ac_status=$?
28345   echo "$as_me:28345: \$? = $ac_status" >&5
28346   (exit "$ac_status"); } &&
28347          { ac_try='test -s "conftest.$ac_objext"'
28348   { (eval echo "$as_me:28348: \"$ac_try\"") >&5
28349   (eval $ac_try) 2>&5
28350   ac_status=$?
28351   echo "$as_me:28351: \$? = $ac_status" >&5
28352   (exit "$ac_status"); }; }; then
28353   ac_lo=$ac_mid; break
28354 else
28355   echo "$as_me: failed program was:" >&5
28356 cat "conftest.$ac_ext" >&5
28357 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28358 fi
28359 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28360   done
28361 fi
28362 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28363 # Binary search between lo and hi bounds.
28364 while test "x$ac_lo" != "x$ac_hi"; do
28365   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28366   cat >"conftest.$ac_ext" <<_ACEOF
28367 #line 28367 "configure"
28368 #include "confdefs.h"
28369 $ac_includes_default
28370 int
28371 main (void)
28372 {
28373 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28374   ;
28375   return 0;
28376 }
28377 _ACEOF
28378 rm -f "conftest.$ac_objext"
28379 if { (eval echo "$as_me:28379: \"$ac_compile\"") >&5
28380   (eval $ac_compile) 2>&5
28381   ac_status=$?
28382   echo "$as_me:28382: \$? = $ac_status" >&5
28383   (exit "$ac_status"); } &&
28384          { ac_try='test -s "conftest.$ac_objext"'
28385   { (eval echo "$as_me:28385: \"$ac_try\"") >&5
28386   (eval $ac_try) 2>&5
28387   ac_status=$?
28388   echo "$as_me:28388: \$? = $ac_status" >&5
28389   (exit "$ac_status"); }; }; then
28390   ac_hi=$ac_mid
28391 else
28392   echo "$as_me: failed program was:" >&5
28393 cat "conftest.$ac_ext" >&5
28394 ac_lo=`expr "$ac_mid" + 1`
28395 fi
28396 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28397 done
28398 ac_cv_sizeof_wchar_t=$ac_lo
28399 else
28400   if test "$cross_compiling" = yes; then
28401   { { echo "$as_me:28401: error: cannot run test program while cross compiling" >&5
28402 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28403    { (exit 1); exit 1; }; }
28404 else
28405   cat >"conftest.$ac_ext" <<_ACEOF
28406 #line 28406 "configure"
28407 #include "confdefs.h"
28408 $ac_includes_default
28409 int
28410 main (void)
28411 {
28412 FILE *f = fopen ("conftest.val", "w");
28413 if (!f)
28414   $ac_main_return (1);
28415 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28416 fclose (f);
28417   ;
28418   return 0;
28419 }
28420 _ACEOF
28421 rm -f "conftest$ac_exeext"
28422 if { (eval echo "$as_me:28422: \"$ac_link\"") >&5
28423   (eval $ac_link) 2>&5
28424   ac_status=$?
28425   echo "$as_me:28425: \$? = $ac_status" >&5
28426   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28427   { (eval echo "$as_me:28427: \"$ac_try\"") >&5
28428   (eval $ac_try) 2>&5
28429   ac_status=$?
28430   echo "$as_me:28430: \$? = $ac_status" >&5
28431   (exit "$ac_status"); }; }; then
28432   ac_cv_sizeof_wchar_t=`cat conftest.val`
28433 else
28434   echo "$as_me: program exited with status $ac_status" >&5
28435 echo "$as_me: failed program was:" >&5
28436 cat "conftest.$ac_ext" >&5
28437 fi
28438 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28439 fi
28440 fi
28441 rm -f conftest.val
28442 else
28443   ac_cv_sizeof_wchar_t=0
28444 fi
28445 fi
28446 echo "$as_me:28446: result: $ac_cv_sizeof_wchar_t" >&5
28447 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28448 cat >>confdefs.h <<EOF
28449 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28450 EOF
28451
28452         # cross-compiling to mingw can run into the problem that attempting to
28453         # link with the regex library fails, causing the test to not set this to
28454         # a number.  "recent" autoconf does not address this problem either -TD
28455         if test -z "$ac_cv_sizeof_wchar_t"
28456         then
28457                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28458
28459 echo "${as_me:-configure}:28459: testing test failed (assume 2) ..." 1>&5
28460
28461                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28462                 mv confdefs.tmp confdefs.h
28463                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28464         fi
28465 fi
28466
28467 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28468 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28469 ###
28470 ### ticlib modules may be a separate library, otherwise contained in termlib.
28471 ### termlib modules may be a separate library, otherwise contained in ncurses.
28472 ###
28473 ### The of "+" or " " between the tokens controls the way the script
28474 ### chooses to split module lists into libraries.
28475 ###
28476 ### (see CF_LIB_RULES).
28477 echo "$as_me:28477: checking for library subsets" >&5
28478 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28479 LIB_SUBSETS=
28480
28481 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28482         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28483         if test "$with_ticlib" != no ; then
28484                 LIB_SUBSETS="${LIB_SUBSETS} "
28485         else
28486                 LIB_SUBSETS="${LIB_SUBSETS}+"
28487         fi
28488 fi
28489
28490 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28491 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28492
28493 if test "$with_termlib" != no ; then
28494         LIB_SUBSETS="${LIB_SUBSETS} "
28495 else
28496         LIB_SUBSETS="${LIB_SUBSETS}+"
28497 fi
28498
28499 LIB_SUBSETS="${LIB_SUBSETS}base"
28500
28501 # Most term-driver calls are to tinfo, but some like init_pair are to the
28502 # base library (so it resides in base).
28503 if test "$with_term_driver" != no ; then
28504         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28505         case "$cf_cv_system_name" in
28506         (*mingw32*|*mingw64*)
28507                 if test "x$with_exp_win32" = xyes ; then
28508                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28509                 else
28510                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28511                 fi
28512                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28513                 ;;
28514         (*)
28515                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28516                 ;;
28517         esac
28518 elif test "x$with_exp_win32" = xyes ; then
28519         case "$cf_cv_system_name" in
28520         (*mingw32*|*mingw64*)
28521                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28522                 ;;
28523         (*)
28524                 ;;
28525         esac
28526 fi
28527
28528 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28529 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28530
28531 echo "$as_me:28531: result: $LIB_SUBSETS" >&5
28532 echo "${ECHO_T}$LIB_SUBSETS" >&6
28533
28534 ### Construct the list of include-directories to be generated
28535
28536 if test "$srcdir" != "."; then
28537         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28538 fi
28539 CPPFLAGS="-I../include $CPPFLAGS"
28540 if test "$srcdir" != "."; then
28541         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28542 fi
28543 CPPFLAGS="-I. $CPPFLAGS"
28544
28545 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28546 if test "$srcdir" != "."; then
28547         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28548 fi
28549 if test "$GCC" != yes; then
28550         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28551 elif test "$includedir" != "/usr/include"; then
28552         if test "$includedir" = '${prefix}/include' ; then
28553                 if test x$prefix != x/usr ; then
28554                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28555                 fi
28556         else
28557                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28558         fi
28559 fi
28560
28561 ### Build up pieces for makefile rules
28562 echo "$as_me:28562: checking default library suffix" >&5
28563 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28564
28565         case $DFT_LWR_MODEL in
28566         (libtool) DFT_ARG_SUFFIX=''   ;;
28567         (normal)  DFT_ARG_SUFFIX=''   ;;
28568         (debug)   DFT_ARG_SUFFIX='_g' ;;
28569         (profile) DFT_ARG_SUFFIX='_p' ;;
28570         (shared)  DFT_ARG_SUFFIX=''   ;;
28571         esac
28572         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28573 echo "$as_me:28573: result: $DFT_ARG_SUFFIX" >&5
28574 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28575
28576 echo "$as_me:28576: checking default library-dependency suffix" >&5
28577 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28578
28579         case X$DFT_LWR_MODEL in
28580         (Xlibtool)
28581                 DFT_LIB_SUFFIX='.la'
28582                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28583                 ;;
28584         (Xdebug)
28585                 case "$cf_cv_system_name" in
28586                 (*-msvc*)
28587                         DFT_LIB_SUFFIX='_g.lib'
28588                         ;;
28589                 (*)
28590                         DFT_LIB_SUFFIX='_g.a'
28591                         ;;
28592                 esac
28593                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28594                 ;;
28595         (Xprofile)
28596                 case "$cf_cv_system_name" in
28597                 (*-msvc*)
28598                         DFT_LIB_SUFFIX='_p.lib'
28599                         ;;
28600                 (*)
28601                         DFT_LIB_SUFFIX='_p.a'
28602                         ;;
28603                 esac
28604                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28605                 ;;
28606         (Xshared)
28607                 case "$cf_cv_system_name" in
28608                 (aix[5-7]*)
28609                         DFT_LIB_SUFFIX='.so'
28610                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28611                         ;;
28612                 (*-msvc*)
28613                         DFT_LIB_SUFFIX='.dll'
28614                         DFT_DEP_SUFFIX='.dll.lib'
28615                         ;;
28616                 (cygwin*|msys*|mingw*)
28617                         DFT_LIB_SUFFIX='.dll'
28618                         DFT_DEP_SUFFIX='.dll.a'
28619                         ;;
28620                 (darwin*)
28621                         DFT_LIB_SUFFIX='.dylib'
28622                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28623                         ;;
28624                 (hpux*)
28625                         case "$target" in
28626                         (ia64*)
28627                                 DFT_LIB_SUFFIX='.so'
28628                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28629                                 ;;
28630                         (*)
28631                                 DFT_LIB_SUFFIX='.sl'
28632                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28633                                 ;;
28634                         esac
28635                         ;;
28636                 (*)
28637                         DFT_LIB_SUFFIX='.so'
28638                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28639                         ;;
28640                 esac
28641                 ;;
28642         (*)
28643                 case "$target" in
28644                 (*-msvc*)
28645                         DFT_LIB_SUFFIX='.lib'
28646                         ;;
28647                 (*)
28648                         DFT_LIB_SUFFIX='.a'
28649                         ;;
28650                 esac
28651                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28652                 ;;
28653         esac
28654         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28655         then
28656                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28657                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28658         fi
28659 echo "$as_me:28659: result: $DFT_DEP_SUFFIX" >&5
28660 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28661
28662 echo "$as_me:28662: checking default object directory" >&5
28663 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28664
28665         case $DFT_LWR_MODEL in
28666         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28667         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28668         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28669         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28670         (shared)
28671                 case "$cf_cv_system_name" in
28672                 (cygwin|msys)
28673                         DFT_OBJ_SUBDIR='objects' ;;
28674                 (*)
28675                         DFT_OBJ_SUBDIR='obj_s' ;;
28676                 esac
28677         esac
28678 echo "$as_me:28678: result: $DFT_OBJ_SUBDIR" >&5
28679 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28680
28681 if test "x$cf_with_cxx" = xyes ; then
28682 echo "$as_me:28682: checking c++ library-dependency suffix" >&5
28683 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28684 if test "$with_libtool" != "no"; then
28685         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28686         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28687 elif test "$with_shared_cxx" != "no"; then
28688         # also for g++ users...
28689         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28690 else
28691         # we normally make a static library because C/C++ library rules differ
28692
28693         case Xnormal in
28694         (Xlibtool)
28695                 CXX_LIB_SUFFIX='.la'
28696                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28697                 ;;
28698         (Xdebug)
28699                 case "$cf_cv_system_name" in
28700                 (*-msvc*)
28701                         CXX_LIB_SUFFIX='_g.lib'
28702                         ;;
28703                 (*)
28704                         CXX_LIB_SUFFIX='_g.a'
28705                         ;;
28706                 esac
28707                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28708                 ;;
28709         (Xprofile)
28710                 case "$cf_cv_system_name" in
28711                 (*-msvc*)
28712                         CXX_LIB_SUFFIX='_p.lib'
28713                         ;;
28714                 (*)
28715                         CXX_LIB_SUFFIX='_p.a'
28716                         ;;
28717                 esac
28718                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28719                 ;;
28720         (Xshared)
28721                 case "$cf_cv_system_name" in
28722                 (aix[5-7]*)
28723                         CXX_LIB_SUFFIX='.so'
28724                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28725                         ;;
28726                 (*-msvc*)
28727                         CXX_LIB_SUFFIX='.dll'
28728                         CXX_DEP_SUFFIX='.dll.lib'
28729                         ;;
28730                 (cygwin*|msys*|mingw*)
28731                         CXX_LIB_SUFFIX='.dll'
28732                         CXX_DEP_SUFFIX='.dll.a'
28733                         ;;
28734                 (darwin*)
28735                         CXX_LIB_SUFFIX='.dylib'
28736                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28737                         ;;
28738                 (hpux*)
28739                         case "$target" in
28740                         (ia64*)
28741                                 CXX_LIB_SUFFIX='.so'
28742                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28743                                 ;;
28744                         (*)
28745                                 CXX_LIB_SUFFIX='.sl'
28746                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28747                                 ;;
28748                         esac
28749                         ;;
28750                 (*)
28751                         CXX_LIB_SUFFIX='.so'
28752                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28753                         ;;
28754                 esac
28755                 ;;
28756         (*)
28757                 case "$target" in
28758                 (*-msvc*)
28759                         CXX_LIB_SUFFIX='.lib'
28760                         ;;
28761                 (*)
28762                         CXX_LIB_SUFFIX='.a'
28763                         ;;
28764                 esac
28765                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28766                 ;;
28767         esac
28768         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28769         then
28770                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28771                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28772         fi
28773
28774 fi
28775 echo "$as_me:28775: result: $CXX_LIB_SUFFIX" >&5
28776 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28777
28778 fi
28779
28780 # do not want -ldl in build except as needed for -lncurses dependency
28781 if test "x$with_dlsym" = xyes ; then
28782 if test "$DFT_LWR_MODEL" = shared || \
28783    test "$DFT_LWR_MODEL" = libtool ; then
28784
28785 # remove dl library from $LIBS
28786 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28787
28788 fi
28789 fi
28790 ### Set up low-level terminfo dependencies for makefiles.
28791
28792 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28793 # do not need libdl
28794 TICS_LIST=
28795 if test "x$with_dlsym" = xyes ; then
28796
28797 # remove dl library from $SHLIB_LIST
28798 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28799
28800 fi
28801
28802 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28803 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28804 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28805 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28806 then
28807         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28808 fi
28809
28810 if test "$with_ticlib" != no ; then
28811
28812         if test "x$with_ticlib" != xyes ; then
28813                 TICS_NAME=$with_ticlib
28814                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28815                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28816                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28817                 TICS_LIB_SUFFIX="${with_ticlib}"
28818         else
28819                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28820                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28821                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28822                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28823         fi
28824         TICS_LDFLAGS="-L${LIB_DIR}"
28825         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28826 else
28827         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28828         TICS_LDFLAGS="-L${LIB_DIR}"
28829         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28830 fi
28831
28832 if test "$with_termlib" != no ; then
28833
28834         if test "x$with_termlib" != xyes ; then
28835                 TINFO_NAME=$with_termlib
28836                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28837                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28838                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28839                 TINFO_LIB_SUFFIX="${with_termlib}"
28840         else
28841                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28842                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28843                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28844                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28845         fi
28846
28847         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28848         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28849         if test "$DFT_LWR_MODEL" = "libtool"; then
28850                 TEST_ARGS="${TEST_DEPS}"
28851                 TEST_ARG2="${TEST_DEP2}"
28852                 TINFO_LDFLAGS="-L${LIB_DIR}"
28853                 TINFO_LIBS="$TEST_ARGS"
28854                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28855                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28856         else
28857                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28858                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28859                 if test "x$with_term_driver" != xno ; then
28860                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28861                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28862                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28863                 else
28864                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28865                         TINFO_LIBS="$TEST_ARGS"
28866                 fi
28867                 TINFO_LDFLAGS="-L${LIB_DIR}"
28868                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28869         fi
28870 else
28871         # the next lines are needed for linking libtic over libncurses
28872         TINFO_NAME=${LIB_NAME}
28873         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28874         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28875         if test "x$with_tic_depends" = xyes ; then
28876                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28877         else
28878                 TICS_LIST="$SHLIB_LIST"
28879         fi
28880
28881         TINFO_LDFLAGS="-L${LIB_DIR}"
28882         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28883 fi
28884
28885 if test "$DFT_LWR_MODEL" = shared ; then
28886         case "$cf_cv_system_name" in
28887         (cygwin*|msys*)
28888                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28889                 TINFO_SUFFIX=.dll
28890                 ;;
28891         esac
28892 fi
28893
28894 if test "x$with_dlsym" = xyes ; then
28895
28896 # remove dl library from $TICS_LIST
28897 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28898
28899 fi
28900
28901 if test "$DFT_LWR_MODEL" = "libtool"; then
28902         OBJEXT=lo
28903 fi
28904
28905 # needed for Ada95
28906 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28907
28908 case "$DFT_LWR_MODEL" in
28909 (normal|debug|profile)
28910
28911 if test "$GCC" = yes ; then
28912         case "$cf_cv_system_name" in
28913         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28914                 LDFLAGS_STATIC=
28915                 LDFLAGS_SHARED=
28916                 ;;
28917         (*)     # normally, except when broken
28918                 LDFLAGS_STATIC=-static
28919                 LDFLAGS_SHARED=-dynamic
28920                 ;;
28921         esac
28922 else
28923         case "$cf_cv_system_name" in
28924         (aix[4-7]*)     # from ld manpage
28925                 LDFLAGS_STATIC=-bstatic
28926                 LDFLAGS_SHARED=-bdynamic
28927                 ;;
28928         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28929                 # We could also use just "archive" and "shared".
28930                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28931                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28932                 ;;
28933         (irix*)         # from ld manpage IRIX64
28934                 LDFLAGS_STATIC=-Bstatic
28935                 LDFLAGS_SHARED=-Bdynamic
28936                 ;;
28937         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28938                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28939                 LDFLAGS_STATIC=-noso
28940                 LDFLAGS_SHARED=-so_archive
28941                 ;;
28942         (solaris2*)
28943                 LDFLAGS_STATIC=-Bstatic
28944                 LDFLAGS_SHARED=-Bdynamic
28945                 ;;
28946         esac
28947 fi
28948
28949 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28950 then
28951         echo "$as_me:28951: checking if linker supports switching between static/dynamic" >&5
28952 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28953
28954         rm -f libconftest.a
28955         cat >conftest.$ac_ext <<EOF
28956 #line 28956 "configure"
28957 #include <stdio.h>
28958 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28959 EOF
28960         if { (eval echo "$as_me:28960: \"$ac_compile\"") >&5
28961   (eval $ac_compile) 2>&5
28962   ac_status=$?
28963   echo "$as_me:28963: \$? = $ac_status" >&5
28964   (exit "$ac_status"); } ; then
28965                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28966                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28967         fi
28968         rm -f conftest.*
28969
28970         cf_save_LIBS="$LIBS"
28971
28972         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28973         cat >"conftest.$ac_ext" <<_ACEOF
28974 #line 28974 "configure"
28975 #include "confdefs.h"
28976
28977 #line 28977 "configure"
28978 #include <stdio.h>
28979 int cf_ldflags_static(FILE *fp);
28980
28981 int
28982 main (void)
28983 {
28984
28985         return cf_ldflags_static(stdin);
28986
28987   ;
28988   return 0;
28989 }
28990 _ACEOF
28991 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28992 if { (eval echo "$as_me:28992: \"$ac_link\"") >&5
28993   (eval $ac_link) 2>&5
28994   ac_status=$?
28995   echo "$as_me:28995: \$? = $ac_status" >&5
28996   (exit "$ac_status"); } &&
28997          { ac_try='test -s "conftest$ac_exeext"'
28998   { (eval echo "$as_me:28998: \"$ac_try\"") >&5
28999   (eval $ac_try) 2>&5
29000   ac_status=$?
29001   echo "$as_me:29001: \$? = $ac_status" >&5
29002   (exit "$ac_status"); }; }; then
29003
29004         # some linkers simply ignore the -dynamic
29005         case x`file "conftest$ac_exeext" 2>/dev/null` in
29006         (*static*)
29007                 cf_ldflags_static=no
29008                 ;;
29009         (*)
29010                 cf_ldflags_static=yes
29011                 ;;
29012         esac
29013
29014 else
29015   echo "$as_me: failed program was:" >&5
29016 cat "conftest.$ac_ext" >&5
29017 cf_ldflags_static=no
29018 fi
29019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29020
29021         rm -f libconftest.*
29022         LIBS="$cf_save_LIBS"
29023
29024         echo "$as_me:29024: result: $cf_ldflags_static" >&5
29025 echo "${ECHO_T}$cf_ldflags_static" >&6
29026
29027         if test "$cf_ldflags_static" != yes
29028         then
29029                 LDFLAGS_STATIC=
29030                 LDFLAGS_SHARED=
29031         fi
29032 else
29033         LDFLAGS_STATIC=
29034         LDFLAGS_SHARED=
29035 fi
29036
29037         ;;
29038 esac
29039
29040 echo "$as_me:29040: checking where we will install curses.h" >&5
29041 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
29042
29043 includesubdir=
29044 if test "$with_overwrite" = no && \
29045  { test "x$includedir" = 'x${prefix}/include' || \
29046    test "x$includedir" = "x${prefix}/include"; }
29047 then
29048         includesubdir="/ncurses${USE_LIB_SUFFIX}"
29049 fi
29050 echo "$as_me:29050: result: ${includedir}${includesubdir}" >&5
29051 echo "${ECHO_T}${includedir}${includesubdir}" >&6
29052
29053 ### Resolve a conflict between normal and wide-curses by forcing applications
29054 ### that will need libutf8 to add it to their configure script.
29055 if test "$with_overwrite" != no ; then
29056 if test "$NCURSES_LIBUTF8" = 1 ; then
29057         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
29058         { echo "$as_me:29058: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
29059 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
29060 fi
29061 fi
29062 WITH_OVERWRITE=$with_overwrite
29063
29064 ### At least on MinGW a shared library build without libtool
29065 ### requires adding the additional libs to the link list.
29066 case "$cf_cv_system_name" in
29067 (*mingw32*|*mingw64*)
29068         if test "$DFT_LWR_MODEL" != "libtool"; then
29069            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
29070         fi
29071         ;;
29072 *)      ;;
29073 esac
29074
29075 ### predefined stuff for the test programs
29076
29077 cat >>confdefs.h <<\EOF
29078 #define HAVE_SLK_COLOR 1
29079 EOF
29080
29081 # pkgsrc uses these
29082
29083 echo "$as_me:29083: checking for desired basename for form library" >&5
29084 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
29085
29086 # Check whether --with-form-libname or --without-form-libname was given.
29087 if test "${with_form_libname+set}" = set; then
29088   withval="$with_form_libname"
29089   with_lib_basename=$withval
29090 else
29091   with_lib_basename=form
29092 fi;
29093 FORM_NAME="$with_lib_basename"
29094
29095 case "x$FORM_NAME" in
29096 (x|xno|xnone|xyes)
29097         FORM_NAME=form
29098         ;;
29099 (*)
29100         ;;
29101 esac
29102
29103 echo "$as_me:29103: result: $FORM_NAME" >&5
29104 echo "${ECHO_T}$FORM_NAME" >&6
29105
29106 echo "$as_me:29106: checking for desired basename for menu library" >&5
29107 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
29108
29109 # Check whether --with-menu-libname or --without-menu-libname was given.
29110 if test "${with_menu_libname+set}" = set; then
29111   withval="$with_menu_libname"
29112   with_lib_basename=$withval
29113 else
29114   with_lib_basename=menu
29115 fi;
29116 MENU_NAME="$with_lib_basename"
29117
29118 case "x$MENU_NAME" in
29119 (x|xno|xnone|xyes)
29120         MENU_NAME=menu
29121         ;;
29122 (*)
29123         ;;
29124 esac
29125
29126 echo "$as_me:29126: result: $MENU_NAME" >&5
29127 echo "${ECHO_T}$MENU_NAME" >&6
29128
29129 echo "$as_me:29129: checking for desired basename for panel library" >&5
29130 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
29131
29132 # Check whether --with-panel-libname or --without-panel-libname was given.
29133 if test "${with_panel_libname+set}" = set; then
29134   withval="$with_panel_libname"
29135   with_lib_basename=$withval
29136 else
29137   with_lib_basename=panel
29138 fi;
29139 PANEL_NAME="$with_lib_basename"
29140
29141 case "x$PANEL_NAME" in
29142 (x|xno|xnone|xyes)
29143         PANEL_NAME=panel
29144         ;;
29145 (*)
29146         ;;
29147 esac
29148
29149 echo "$as_me:29149: result: $PANEL_NAME" >&5
29150 echo "${ECHO_T}$PANEL_NAME" >&6
29151
29152 echo "$as_me:29152: checking for desired basename for cxx library" >&5
29153 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
29154
29155 # Check whether --with-cxx-libname or --without-cxx-libname was given.
29156 if test "${with_cxx_libname+set}" = set; then
29157   withval="$with_cxx_libname"
29158   with_lib_basename=$withval
29159 else
29160   with_lib_basename=ncurses++
29161 fi;
29162 CXX_NAME="$with_lib_basename"
29163
29164 case "x$CXX_NAME" in
29165 (x|xno|xnone|xyes)
29166         CXX_NAME=ncurses++
29167         ;;
29168 (*)
29169         ;;
29170 esac
29171
29172 echo "$as_me:29172: result: $CXX_NAME" >&5
29173 echo "${ECHO_T}$CXX_NAME" >&6
29174
29175 ### Construct the list of subdirectories for which we'll customize makefiles
29176 ### with the appropriate compile-rules.
29177
29178 echo "$as_me:29178: checking for src modules" >&5
29179 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
29180
29181 # dependencies and linker-arguments for test-programs
29182 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
29183 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
29184 if test "$DFT_LWR_MODEL" = "libtool"; then
29185         TEST_ARGS="${TEST_DEPS}"
29186         TEST_ARG2="${TEST_DEP2}"
29187 else
29188         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
29189         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
29190 fi
29191
29192 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
29193 cf_cv_src_modules=
29194 for cf_dir in $modules_to_build
29195 do
29196         if test -f "$srcdir/$cf_dir/modules" ; then
29197
29198                 if test -z "$cf_cv_src_modules"; then
29199                         cf_cv_src_modules=$cf_dir
29200                 else
29201                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
29202                 fi
29203
29204                 # Make the ncurses_cfg.h file record the library interface files as
29205                 # well.  These are header files that are the same name as their
29206                 # directory.  Ncurses is the only library that does not follow
29207                 # that pattern.
29208                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
29209
29210 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29211
29212                         cat >>confdefs.h <<EOF
29213 #define HAVE_${cf_have_include}_H 1
29214 EOF
29215
29216                         cat >>confdefs.h <<EOF
29217 #define HAVE_LIB${cf_have_include} 1
29218 EOF
29219
29220 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29221
29222 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
29223
29224                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
29225                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
29226                         if test "$DFT_LWR_MODEL" = "libtool"; then
29227                                 TEST_ARGS="${TEST_DEPS}"
29228                                 TEST_ARG2="${TEST_DEP2}"
29229                         else
29230                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29231                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
29232                         fi
29233                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
29234                 fi
29235         fi
29236 done
29237 echo "$as_me:29237: result: $cf_cv_src_modules" >&5
29238 echo "${ECHO_T}$cf_cv_src_modules" >&6
29239
29240 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29241 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29242
29243 SRC_SUBDIRS=
29244 if test "x$cf_with_manpages" != xno ; then
29245         SRC_SUBDIRS="$SRC_SUBDIRS man"
29246 fi
29247 SRC_SUBDIRS="$SRC_SUBDIRS include"
29248 for cf_dir in $cf_cv_src_modules
29249 do
29250         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29251 done
29252 if test "x$cf_with_tests" != "xno" ; then
29253         SRC_SUBDIRS="$SRC_SUBDIRS test"
29254 fi
29255 # always make this, to install the ncurses-config script
29256 SRC_SUBDIRS="$SRC_SUBDIRS misc"
29257 if test "$cf_with_cxx_binding" != no; then
29258         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29259         SRC_SUBDIRS="$SRC_SUBDIRS c++"
29260 fi
29261
29262 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29263 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
29264
29265 ADA_SUBDIRS=
29266 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
29267         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29268         ADA_SUBDIRS="gen src"
29269         if test "x$cf_with_tests" != "xno" ; then
29270                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29271         fi
29272 fi
29273
29274 SUB_MAKEFILES=
29275 for cf_dir in $SRC_SUBDIRS
29276 do
29277         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29278 done
29279
29280 if test -n "$ADA_SUBDIRS"; then
29281         for cf_dir in $ADA_SUBDIRS
29282         do
29283                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29284         done
29285
29286 fi
29287
29288 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29289    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29290    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29291    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29292 fi
29293
29294 DIRS_TO_MAKE="lib"
29295 for cf_item in $cf_list_models
29296 do
29297
29298         case $cf_item in
29299         (libtool) cf_subdir='obj_lo'  ;;
29300         (normal)  cf_subdir='objects' ;;
29301         (debug)   cf_subdir='obj_g' ;;
29302         (profile) cf_subdir='obj_p' ;;
29303         (shared)
29304                 case "$cf_cv_system_name" in
29305                 (cygwin|msys)
29306                         cf_subdir='objects' ;;
29307                 (*)
29308                         cf_subdir='obj_s' ;;
29309                 esac
29310         esac
29311
29312         for cf_item2 in $DIRS_TO_MAKE
29313         do
29314                 test "$cf_item2" = "$cf_subdir" && break
29315         done
29316         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29317 done
29318 for cf_dir in $DIRS_TO_MAKE
29319 do
29320         test ! -d "$cf_dir" && mkdir "$cf_dir"
29321 done
29322
29323 # symbols that differ when compiling Ada95 by itself.
29324 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29325
29326 # values to use as strings
29327
29328 cat >>confdefs.h <<EOF
29329 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29330 EOF
29331
29332 cat >>confdefs.h <<EOF
29333 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29334 EOF
29335
29336 ### Define substitutions for header files to avoid name-pollution
29337
29338 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29339         HAVE_TCGETATTR=1
29340 else
29341         HAVE_TCGETATTR=0
29342 fi
29343
29344 if test "x$ac_cv_header_stdint_h" = xyes ; then
29345         HAVE_STDINT_H=1
29346 else
29347         HAVE_STDINT_H=0
29348 fi
29349
29350 if test "x$ac_cv_header_termio_h" = xyes ; then
29351         HAVE_TERMIO_H=1
29352 else
29353         HAVE_TERMIO_H=0
29354 fi
29355
29356 if test "x$ac_cv_header_termios_h" = xyes ; then
29357         HAVE_TERMIOS_H=1
29358 else
29359         HAVE_TERMIOS_H=0
29360 fi
29361
29362 ################################################################################
29363 test "x$use_database" = xyes && \
29364 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29365
29366 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29367 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29368
29369 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29370 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29371 fi
29372
29373 if test "x$cf_with_tests" != xno ; then
29374         MAKE_TESTS=
29375 else
29376         MAKE_TESTS="#"
29377 fi
29378
29379 ADAHTML_DIR=../../doc/html/ada
29380
29381 # workaround for OS/2 (20151017)
29382 case "$cf_cv_system_name" in
29383 (os2*)
29384         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29385         ;;
29386 (*)
29387         LIBTOOL_OPTS_CXX=
29388         ;;
29389 esac
29390
29391 # workaround for g++ versus Solaris (20131116)
29392 case "$cf_cv_system_name" in
29393 (solaris2*)
29394         case "x$CPPFLAGS" in
29395         (*-D_XOPEN_SOURCE_EXTENDED*)
29396                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29397
29398 echo "${as_me:-configure}:29398: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29399
29400                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29401                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29402                 ;;
29403         esac
29404         ;;
29405 esac
29406
29407 # Help to automatically enable the extended curses features when using either
29408 # the *-config or the ".pc" files by adding defines.
29409 echo "$as_me:29409: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29410 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29411 PKG_CFLAGS=
29412 for cf_loop1 in $CPPFLAGS_after_XOPEN
29413 do
29414         cf_found=no
29415         for cf_loop2 in $CPPFLAGS_before_XOPEN
29416         do
29417                 if test "x$cf_loop1" = "x$cf_loop2"
29418                 then
29419                         cf_found=yes
29420                         break
29421                 fi
29422         done
29423         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29424 done
29425 echo "$as_me:29425: result: $PKG_CFLAGS" >&5
29426 echo "${ECHO_T}$PKG_CFLAGS" >&6
29427
29428 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29429 case "x$NCURSES_OSPEED" in
29430 (*short*)
29431         cf_compatible=1
29432         ;;
29433 (*)
29434         cf_compatible=0
29435         ;;
29436 esac
29437
29438 cat >>confdefs.h <<EOF
29439 #define NCURSES_OSPEED_COMPAT $cf_compatible
29440 EOF
29441
29442 case "x$cf_cv_typeof_chtype" in
29443 (xshort|xint|xlong)
29444         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29445         ;;
29446 esac
29447
29448 case "x$cf_cv_typeof_mmask_t" in
29449 (xshort|xint|xlong)
29450         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29451         ;;
29452 esac
29453
29454 # substitute into misc/Makefile to suppress
29455 # (un)install.data from the
29456 # (un)install rules.
29457 if test "x$cf_with_db_install" = "xno"; then
29458         MISC_INSTALL_DATA=
29459         MISC_UNINSTALL_DATA=
29460 else
29461         MISC_INSTALL_DATA=install.data
29462         MISC_UNINSTALL_DATA=uninstall.data
29463 fi
29464
29465 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29466         MAKE_DATABASE="#"
29467 else
29468         MAKE_DATABASE="$MAKE_TERMINFO"
29469 fi
29470
29471 if test -n "$PACKAGE"
29472 then
29473         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29474         export PACKAGE
29475         echo "package: $PACKAGE"
29476 fi
29477
29478 UNALTERED_SYMS=
29479 cf_filter_syms=no
29480
29481 if test -n "$RESULTING_SYMS"
29482 then
29483         cf_filter_syms=$cf_dft_filter_syms
29484         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29485
29486 echo "${as_me:-configure}:29486: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29487
29488 fi
29489
29490 if test "x$WILDCARD_SYMS" = xno
29491 then
29492         cf_filter_syms=yes
29493 fi
29494
29495 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29496
29497 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29498 if test "$cf_filter_syms" = yes
29499 then
29500         RESULTING_SYMS=resulting.map
29501 fi
29502
29503 if test "x$cross_compiling" = xyes ; then
29504         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29505         CHECK_BUILD="#"
29506 else
29507         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29508         CHECK_BUILD=
29509 fi
29510
29511 # This is used for the *-config script and *.pc data files.
29512
29513 echo "$as_me:29513: checking for linker search path" >&5
29514 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29515 if test "${cf_cv_ld_searchpath+set}" = set; then
29516   echo $ECHO_N "(cached) $ECHO_C" >&6
29517 else
29518
29519 if test "$cross_compiling" != yes ; then
29520
29521 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29522 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29523
29524 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29525 # update the cache, which makes it run faster.
29526 test -z "$cf_pathlist" && \
29527         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29528
29529 test -z "$cf_pathlist" &&
29530         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29531
29532 # This works with OpenBSD 6.5, which lists only filenames
29533 test -z "$cf_pathlist" &&
29534         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29535
29536 if test -z "$cf_pathlist"
29537 then
29538         # dyld default path with MacOS
29539         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29540         then
29541                 # do this to bypass check
29542                 cf_cv_ld_searchpath='$HOME/lib'
29543                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29544         fi
29545 fi
29546
29547 if test -z "$cf_pathlist"
29548 then
29549         # Solaris is "SunOS"
29550         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29551         then
29552                 case x`(isainfo -b)` in
29553                 (x64)
29554                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29555                         ;;
29556                 (x32)
29557                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29558                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29559                         ;;
29560                 (*)
29561                         { echo "$as_me:29561: WARNING: problem with Solaris architecture" >&5
29562 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29563                         ;;
29564                 esac
29565         fi
29566 fi
29567
29568 if test -z "$cf_pathlist"
29569 then
29570         # HP-UX
29571         if test x"`uname -s`" = xHP-UX
29572         then
29573                 case x`getconf LONG_BIT` in
29574                 (x64)
29575                         cf_pathlist="/usr/lib/hpux64"
29576                         ;;
29577                 (x*)
29578                         cf_pathlist="/usr/lib/hpux32"
29579                         ;;
29580                 esac
29581         fi
29582 fi
29583
29584 fi
29585
29586 # If nothing else, assume it is conventional
29587 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29588
29589 # Finally, check that this is only directories
29590 for cf_path in $0 $cf_pathlist
29591 do
29592         if test -d "$cf_path"; then
29593                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29594                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29595         fi
29596 done
29597
29598 # Ensure that it is nonempty
29599 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29600
29601 fi
29602 echo "$as_me:29602: result: $cf_cv_ld_searchpath" >&5
29603 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29604
29605 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29606
29607 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"
29608 ac_config_commands="$ac_config_commands default"
29609 cat >confcache <<\_ACEOF
29610 # This file is a shell script that caches the results of configure
29611 # tests run on this system so they can be shared between configure
29612 # scripts and configure runs, see configure's option --config-cache.
29613 # It is not useful on other systems.  If it contains results you don't
29614 # want to keep, you may remove or edit it.
29615 #
29616 # config.status only pays attention to the cache file if you give it
29617 # the --recheck option to rerun configure.
29618 #
29619 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29620 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29621 # following values.
29622
29623 _ACEOF
29624
29625 # The following way of writing the cache mishandles newlines in values,
29626 # but we know of no workaround that is simple, portable, and efficient.
29627 # So, don't put newlines in cache variables' values.
29628 # Ultrix sh set writes to stderr and can't be redirected directly,
29629 # and sets the high bit in the cache file unless we assign to the vars.
29630 {
29631   (set) 2>&1 |
29632     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29633     *ac_space=\ *)
29634       # `set' does not quote correctly, so add quotes (double-quote
29635       # substitution turns \\\\ into \\, and sed turns \\ into \).
29636       sed -n \
29637         "s/'/'\\\\''/g;
29638           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29639       ;;
29640     *)
29641       # `set' quotes correctly as required by POSIX, so do not add quotes.
29642       sed -n \
29643         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29644       ;;
29645     esac;
29646 } |
29647   sed '
29648      t clear
29649      : clear
29650      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29651      t end
29652      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29653      : end' >>confcache
29654 if cmp -s $cache_file confcache; then :; else
29655   if test -w $cache_file; then
29656     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29657     cat confcache >$cache_file
29658   else
29659     echo "not updating unwritable cache $cache_file"
29660   fi
29661 fi
29662 rm -f confcache
29663
29664 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29665 # Let make expand exec_prefix.
29666 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29667
29668 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29669 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29670 # trailing colons and then remove the whole line if VPATH becomes empty
29671 # (actually we leave an empty line to preserve line numbers).
29672 if test "x$srcdir" = x.; then
29673   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29674 s/:*\$(srcdir):*/:/;
29675 s/:*\${srcdir}:*/:/;
29676 s/:*@srcdir@:*/:/;
29677 s/^\([^=]*=[    ]*\):*/\1/;
29678 s/:*$//;
29679 s/^[^=]*=[      ]*$//;
29680 }'
29681 fi
29682
29683 DEFS=-DHAVE_CONFIG_H
29684
29685 : "${CONFIG_STATUS=./config.status}"
29686 ac_clean_files_save=$ac_clean_files
29687 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29688 { echo "$as_me:29688: creating $CONFIG_STATUS" >&5
29689 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29690 cat >"$CONFIG_STATUS" <<_ACEOF
29691 #! $SHELL
29692 # Generated automatically by configure.
29693 # Run this file to recreate the current configuration.
29694 # Compiler output produced by configure, useful for debugging
29695 # configure, is in config.log if it exists.
29696
29697 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29698
29699 debug=false
29700 SHELL=\${CONFIG_SHELL-$SHELL}
29701 ac_cs_invocation="\$0 \$@"
29702
29703 CLICOLOR_FORCE= GREP_OPTIONS=
29704 unset CLICOLOR_FORCE GREP_OPTIONS
29705 _ACEOF
29706
29707 cat >>"$CONFIG_STATUS" <<\_ACEOF
29708 # Be Bourne compatible
29709 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29710   emulate sh
29711   NULLCMD=:
29712 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29713   set -o posix
29714 fi
29715
29716 # Name of the executable.
29717 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29718
29719 if expr a : '\(a\)' >/dev/null 2>&1; then
29720   as_expr="expr"
29721 else
29722   as_expr="false"
29723 fi
29724
29725 rm -f conf$$ conf$$.exe conf$$.file
29726 echo >conf$$.file
29727 if ln -s conf$$.file conf$$ 2>/dev/null; then
29728   # We could just check for DJGPP; but this test a) works b) is more generic
29729   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29730   if test -f conf$$.exe; then
29731     # Don't use ln at all; we don't have any links
29732     as_ln_s='cp -p'
29733   else
29734     as_ln_s='ln -s'
29735   fi
29736 elif ln conf$$.file conf$$ 2>/dev/null; then
29737   as_ln_s='ln'
29738 else
29739   as_ln_s='cp -p'
29740 fi
29741 rm -f conf$$ conf$$.exe conf$$.file
29742
29743 as_executable_p="test -f"
29744
29745 # Support unset when possible.
29746 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29747   as_unset="unset"
29748 else
29749   as_unset="false"
29750 fi
29751
29752 # NLS nuisances.
29753 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29754 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29755 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29756 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29757 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29758 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29759 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29760 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29761
29762 # IFS
29763 # We need space, tab and new line, in precisely that order.
29764 as_nl='
29765 '
29766 IFS="   $as_nl"
29767
29768 # CDPATH.
29769 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29770
29771 exec 6>&1
29772
29773 _ACEOF
29774
29775 # Files that config.status was made for.
29776 if test -n "$ac_config_files"; then
29777   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29778 fi
29779
29780 if test -n "$ac_config_headers"; then
29781   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29782 fi
29783
29784 if test -n "$ac_config_links"; then
29785   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29786 fi
29787
29788 if test -n "$ac_config_commands"; then
29789   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29790 fi
29791
29792 cat >>"$CONFIG_STATUS" <<\EOF
29793
29794 ac_cs_usage="\
29795 \`$as_me' instantiates files from templates according to the
29796 current configuration.
29797
29798 Usage: $0 [OPTIONS] [FILE]...
29799
29800   -h, --help       print this help, then exit
29801   -V, --version    print version number, then exit
29802   -d, --debug      don't remove temporary files
29803       --recheck    update $as_me by reconfiguring in the same conditions
29804   --file=FILE[:TEMPLATE]
29805                    instantiate the configuration file FILE
29806   --header=FILE[:TEMPLATE]
29807                    instantiate the configuration header FILE
29808
29809 Configuration files:
29810 $config_files
29811
29812 Configuration headers:
29813 $config_headers
29814
29815 Configuration commands:
29816 $config_commands
29817
29818 Report bugs to <dickey@invisible-island.net>."
29819 EOF
29820
29821 cat >>"$CONFIG_STATUS" <<EOF
29822 ac_cs_version="\\
29823 config.status
29824 configured by $0, generated by GNU Autoconf 2.52.20231210,
29825   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29826
29827 Copyright 2003-2022,2023        Thomas E. Dickey
29828 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29829 Free Software Foundation, Inc.
29830 This config.status script is free software; the Free Software Foundation
29831 gives unlimited permission to copy, distribute and modify it."
29832 srcdir="$srcdir"
29833 INSTALL="$INSTALL"
29834 EOF
29835
29836 cat >>"$CONFIG_STATUS" <<\EOF
29837 # If no file are specified by the user, then we need to provide default
29838 # value.  By we need to know if files were specified by the user.
29839 ac_need_defaults=:
29840 while test $# != 0
29841 do
29842   case $1 in
29843   --*=*)
29844     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29845     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29846     shift
29847     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29848     shift
29849     ;;
29850   -*);;
29851   *) # This is not an option, so the user has probably given explicit
29852      # arguments.
29853      ac_need_defaults=false;;
29854   esac
29855
29856   case $1 in
29857   # Handling of the options.
29858 EOF
29859 cat >>"$CONFIG_STATUS" <<EOF
29860   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29861     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29862     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29863 EOF
29864 cat >>"$CONFIG_STATUS" <<\EOF
29865   --version | --vers* | -V )
29866     echo "$ac_cs_version"; exit 0 ;;
29867   --he | --h)
29868     # Conflict between --help and --header
29869     { { echo "$as_me:29869: error: ambiguous option: $1
29870 Try \`$0 --help' for more information." >&5
29871 echo "$as_me: error: ambiguous option: $1
29872 Try \`$0 --help' for more information." >&2;}
29873    { (exit 1); exit 1; }; };;
29874   --help | --hel | -h )
29875     echo "$ac_cs_usage"; exit 0 ;;
29876   --debug | --d* | -d )
29877     debug=: ;;
29878   --file | --fil | --fi | --f )
29879     shift
29880     CONFIG_FILES="$CONFIG_FILES $1"
29881     ac_need_defaults=false;;
29882   --header | --heade | --head | --hea )
29883     shift
29884     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29885     ac_need_defaults=false;;
29886
29887   # This is an error.
29888   -*) { { echo "$as_me:29888: error: unrecognized option: $1
29889 Try \`$0 --help' for more information." >&5
29890 echo "$as_me: error: unrecognized option: $1
29891 Try \`$0 --help' for more information." >&2;}
29892    { (exit 1); exit 1; }; } ;;
29893
29894   *) ac_config_targets="$ac_config_targets $1" ;;
29895
29896   esac
29897   shift
29898 done
29899
29900 exec 5>>config.log
29901 cat >&5 << _ACEOF
29902
29903 ## ----------------------- ##
29904 ## Running config.status.  ##
29905 ## ----------------------- ##
29906
29907 This file was extended by $as_me 2.52.20231210, executed with
29908   CONFIG_FILES    = $CONFIG_FILES
29909   CONFIG_HEADERS  = $CONFIG_HEADERS
29910   CONFIG_LINKS    = $CONFIG_LINKS
29911   CONFIG_COMMANDS = $CONFIG_COMMANDS
29912   > "$ac_cs_invocation"
29913 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29914
29915 _ACEOF
29916 EOF
29917
29918 cat >>"$CONFIG_STATUS" <<EOF
29919 #
29920 # INIT-COMMANDS section.
29921 #
29922
29923 ### Special initialization commands, used to pass information from the
29924 ### configuration-run into config.status
29925
29926 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29927 AWK="$AWK"
29928 CXX_NAME="$CXX_NAME"
29929 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29930 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29931 ECHO_LD="$ECHO_LD"
29932 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29933 FORM_NAME="$FORM_NAME"
29934 LDCONFIG="$LDCONFIG"
29935 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29936 LIB_NAME="$LIB_NAME"
29937 LIB_PREFIX="$LIB_PREFIX"
29938 LIB_SUBSETS="$LIB_SUBSETS"
29939 LIB_SUFFIX="$LIB_SUFFIX"
29940 LIB_TRACING="$LIB_TRACING"
29941 LN_S="$LN_S"
29942 MAKE_TERMINFO="$MAKE_TERMINFO"
29943 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29944 MENU_NAME="$MENU_NAME"
29945 NCURSES_MAJOR="$NCURSES_MAJOR"
29946 NCURSES_MINOR="$NCURSES_MINOR"
29947 NCURSES_OSPEED="$NCURSES_OSPEED"
29948 NCURSES_PATCH="$NCURSES_PATCH"
29949 PANEL_NAME="$PANEL_NAME"
29950 SRC_SUBDIRS="$SRC_SUBDIRS"
29951 TERMINFO="$TERMINFO"
29952 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29953 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29954 TICS_NAME="$TICS_NAME"
29955 TICS_SUFFIX="$TICS_SUFFIX"
29956 TIC_PATH="$TIC_PATH"
29957 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29958 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29959 TINFO_NAME="$TINFO_NAME"
29960 TINFO_SUFFIX="$TINFO_SUFFIX"
29961 UNALTERED_SYMS="$UNALTERED_SYMS"
29962 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29963 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29964 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29965 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29966 WILDCARD_SYMS="$WILDCARD_SYMS"
29967 WITH_CURSES_H="$with_curses_h"
29968 WITH_ECHO="${enable_echo:=yes}"
29969 WITH_OVERWRITE="$with_overwrite"
29970 cf_LIST_MODELS="$cf_list_models"
29971 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29972 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29973 cf_cv_abi_default="$cf_cv_abi_default"
29974 cf_cv_abi_version="$cf_cv_abi_version"
29975 cf_cv_do_relink="$cf_cv_do_relink"
29976 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29977 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29978 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29979 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29980 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29981 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29982 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29983 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29984 cf_cv_rel_version="$cf_cv_rel_version"
29985 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29986 cf_cv_shared_soname='$cf_cv_shared_soname'
29987 cf_cv_shlib_version="$cf_cv_shlib_version"
29988 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29989 cf_cv_system_name="$cf_cv_system_name"
29990 cf_cv_term_driver="$with_term_driver"
29991 cf_with_ada="$cf_with_ada"
29992 cf_with_cxx_binding="$cf_with_cxx_binding"
29993 cf_with_db_install="$cf_with_db_install"
29994 cf_with_manpages="$cf_with_manpages"
29995 cf_with_tests="$cf_with_tests"
29996 host="$host"
29997 target="$target"
29998 verbose="$verbose"
29999 with_shared_cxx="$with_shared_cxx"
30000
30001 EOF
30002
30003 cat >>"$CONFIG_STATUS" <<\EOF
30004 for ac_config_target in $ac_config_targets
30005 do
30006   case "$ac_config_target" in
30007   # Handling of arguments.
30008   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
30009   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
30010   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
30011   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
30012   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
30013   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
30014   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
30015   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
30016   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
30017   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
30018   *) { { echo "$as_me:30018: error: invalid argument: $ac_config_target" >&5
30019 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
30020    { (exit 1); exit 1; }; };;
30021   esac
30022 done
30023
30024 # If the user did not use the arguments to specify the items to instantiate,
30025 # then the envvar interface is used.  Set only those that are not.
30026 # We use the long form for the default assignment because of an extremely
30027 # bizarre bug on SunOS 4.1.3.
30028 if "$ac_need_defaults"; then
30029   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30030   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30031   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30032 fi
30033
30034 # Create a temporary directory, and hook for its removal unless debugging.
30035 $debug ||
30036 {
30037   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
30038   trap '{ (exit 1); exit 1; }' 1 2 13 15
30039 }
30040
30041 # Create a (secure) tmp directory for tmp files.
30042 : "${TMPDIR=/tmp}"
30043 {
30044   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
30045   test -n "$tmp" && test -d "$tmp"
30046 }  ||
30047 {
30048   tmp=$TMPDIR/cs$$-$RANDOM
30049   (umask 077 && mkdir "$tmp")
30050 } ||
30051 {
30052    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
30053    { (exit 1); exit 1; }
30054 }
30055
30056 EOF
30057
30058 cat >>"$CONFIG_STATUS" <<EOF
30059
30060 #
30061 # CONFIG_FILES section.
30062 #
30063
30064 # No need to generate the scripts if there are no CONFIG_FILES.
30065 # This happens for instance when ./config.status config.h
30066 if test -n "\$CONFIG_FILES"; then
30067   # Protect against being on the right side of a sed subst in config.status.
30068   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
30069    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
30070 s,@SHELL@,$SHELL,;t t
30071 s,@exec_prefix@,$exec_prefix,;t t
30072 s,@prefix@,$prefix,;t t
30073 s,@program_transform_name@,$program_transform_name,;t t
30074 s,@bindir@,$bindir,;t t
30075 s,@sbindir@,$sbindir,;t t
30076 s,@libexecdir@,$libexecdir,;t t
30077 s,@datarootdir@,$datarootdir,;t t
30078 s,@datadir@,$datadir,;t t
30079 s,@sysconfdir@,$sysconfdir,;t t
30080 s,@sharedstatedir@,$sharedstatedir,;t t
30081 s,@localstatedir@,$localstatedir,;t t
30082 s,@runstatedir@,$runstatedir,;t t
30083 s,@libdir@,$libdir,;t t
30084 s,@includedir@,$includedir,;t t
30085 s,@oldincludedir@,$oldincludedir,;t t
30086 s,@infodir@,$infodir,;t t
30087 s,@mandir@,$mandir,;t t
30088 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
30089 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
30090 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
30091 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
30092 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
30093 s,@build_alias@,$build_alias,;t t
30094 s,@host_alias@,$host_alias,;t t
30095 s,@target_alias@,$target_alias,;t t
30096 s,@ECHO_C@,$ECHO_C,;t t
30097 s,@ECHO_N@,$ECHO_N,;t t
30098 s,@ECHO_T@,$ECHO_T,;t t
30099 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
30100 s,@DEFS@,$DEFS,;t t
30101 s,@LIBS@,$LIBS,;t t
30102 s,@top_builddir@,$top_builddir,;t t
30103 s,@GREP@,$GREP,;t t
30104 s,@EGREP@,$EGREP,;t t
30105 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
30106 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
30107 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
30108 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
30109 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
30110 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
30111 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
30112 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
30113 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
30114 s,@VERSION@,$VERSION,;t t
30115 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
30116 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
30117 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
30118 s,@PACKAGE@,$PACKAGE,;t t
30119 s,@build@,$build,;t t
30120 s,@build_cpu@,$build_cpu,;t t
30121 s,@build_vendor@,$build_vendor,;t t
30122 s,@build_os@,$build_os,;t t
30123 s,@host@,$host,;t t
30124 s,@host_cpu@,$host_cpu,;t t
30125 s,@host_vendor@,$host_vendor,;t t
30126 s,@host_os@,$host_os,;t t
30127 s,@target@,$target,;t t
30128 s,@target_cpu@,$target_cpu,;t t
30129 s,@target_vendor@,$target_vendor,;t t
30130 s,@target_os@,$target_os,;t t
30131 s,@FGREP@,$FGREP,;t t
30132 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30133 s,@M4_exists@,$M4_exists,;t t
30134 s,@cf_ada_make@,$cf_ada_make,;t t
30135 s,@cf_ada_config@,$cf_ada_config,;t t
30136 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30137 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30138 s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
30139 s,@CC@,$CC,;t t
30140 s,@CFLAGS@,$CFLAGS,;t t
30141 s,@LDFLAGS@,$LDFLAGS,;t t
30142 s,@CPPFLAGS@,$CPPFLAGS,;t t
30143 s,@ac_ct_CC@,$ac_ct_CC,;t t
30144 s,@EXEEXT@,$EXEEXT,;t t
30145 s,@OBJEXT@,$OBJEXT,;t t
30146 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
30147 s,@CPP@,$CPP,;t t
30148 s,@LDCONFIG@,$LDCONFIG,;t t
30149 s,@CXX@,$CXX,;t t
30150 s,@CXXFLAGS@,$CXXFLAGS,;t t
30151 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
30152 s,@AWK@,$AWK,;t t
30153 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
30154 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
30155 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
30156 s,@LINT@,$LINT,;t t
30157 s,@LINT_OPTS@,$LINT_OPTS,;t t
30158 s,@LINT_LIBS@,$LINT_LIBS,;t t
30159 s,@LN_S@,$LN_S,;t t
30160 s,@cf_config_suffix@,$cf_config_suffix,;t t
30161 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
30162 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
30163 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
30164 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
30165 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
30166 s,@SET_MAKE@,$SET_MAKE,;t t
30167 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
30168 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
30169 s,@CTAGS@,$CTAGS,;t t
30170 s,@ETAGS@,$ETAGS,;t t
30171 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
30172 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
30173 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
30174 s,@RANLIB@,$RANLIB,;t t
30175 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
30176 s,@LD@,$LD,;t t
30177 s,@ac_ct_LD@,$ac_ct_LD,;t t
30178 s,@AR@,$AR,;t t
30179 s,@ac_ct_AR@,$ac_ct_AR,;t t
30180 s,@NM@,$NM,;t t
30181 s,@ac_ct_NM@,$ac_ct_NM,;t t
30182 s,@ARFLAGS@,$ARFLAGS,;t t
30183 s,@DESTDIR@,$DESTDIR,;t t
30184 s,@BUILD_CC@,$BUILD_CC,;t t
30185 s,@BUILD_CPP@,$BUILD_CPP,;t t
30186 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
30187 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
30188 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
30189 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
30190 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
30191 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
30192 s,@cf_list_models@,$cf_list_models,;t t
30193 s,@ABI_VERSION@,$ABI_VERSION,;t t
30194 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
30195 s,@LIBTOOL@,$LIBTOOL,;t t
30196 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
30197 s,@LT_UNDEF@,$LT_UNDEF,;t t
30198 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
30199 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
30200 s,@LIB_CREATE@,$LIB_CREATE,;t t
30201 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
30202 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
30203 s,@LIB_PREP@,$LIB_PREP,;t t
30204 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
30205 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
30206 s,@LIB_LINK@,$LIB_LINK,;t t
30207 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
30208 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
30209 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
30210 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
30211 s,@TICS_NAME@,$TICS_NAME,;t t
30212 s,@TINFO_NAME@,$TINFO_NAME,;t t
30213 s,@LIB_NAME@,$LIB_NAME,;t t
30214 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
30215 s,@CC_G_OPT@,$CC_G_OPT,;t t
30216 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
30217 s,@LD_MODEL@,$LD_MODEL,;t t
30218 s,@shlibdir@,$shlibdir,;t t
30219 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
30220 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
30221 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
30222 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
30223 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
30224 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
30225 s,@LINK_PROGS@,$LINK_PROGS,;t t
30226 s,@LINK_TESTS@,$LINK_TESTS,;t t
30227 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
30228 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
30229 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
30230 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
30231 s,@RPATH_LIST@,$RPATH_LIST,;t t
30232 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30233 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30234 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30235 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30236 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
30237 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
30238 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
30239 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
30240 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
30241 s,@TIC@,$TIC,;t t
30242 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30243 s,@INFOCMP@,$INFOCMP,;t t
30244 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
30245 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
30246 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
30247 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
30248 s,@XTERM_KBS@,$XTERM_KBS,;t t
30249 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30250 s,@TERMINFO@,$TERMINFO,;t t
30251 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30252 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30253 s,@TERMPATH@,$TERMPATH,;t t
30254 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
30255 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
30256 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
30257 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30258 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30259 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30260 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30261 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30262 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30263 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30264 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30265 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30266 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
30267 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30268 s,@RGB_PATH@,$RGB_PATH,;t t
30269 s,@no_x11_rgb@,$no_x11_rgb,;t t
30270 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30271 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
30272 s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
30273 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
30274 s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
30275 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
30276 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30277 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30278 s,@cf_manpage_format@,$cf_manpage_format,;t t
30279 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30280 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30281 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30282 s,@cf_manpage_coptions@,$cf_manpage_coptions,;t t
30283 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30284 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30285 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30286 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30287 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30288 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30289 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30290 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30291 s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
30292 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30293 s,@PTHREAD@,$PTHREAD,;t t
30294 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30295 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30296 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30297 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30298 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30299 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30300 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30301 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30302 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30303 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30304 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30305 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30306 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30307 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30308 s,@ECHO_LT@,$ECHO_LT,;t t
30309 s,@ECHO_LD@,$ECHO_LD,;t t
30310 s,@RULE_CC@,$RULE_CC,;t t
30311 s,@SHOW_CC@,$SHOW_CC,;t t
30312 s,@ECHO_CC@,$ECHO_CC,;t t
30313 s,@ECHO_LINK@,$ECHO_LINK,;t t
30314 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30315 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30316 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30317 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30318 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30319 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30320 s,@ADAFLAGS@,$ADAFLAGS,;t t
30321 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30322 s,@ADA_TRACE@,$ADA_TRACE,;t t
30323 s,@MATH_LIB@,$MATH_LIB,;t t
30324 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30325 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30326 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30327 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30328 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30329 s,@TEST_LIBS@,$TEST_LIBS,;t t
30330 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30331 s,@CXXCPP@,$CXXCPP,;t t
30332 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30333 s,@CXX_AR@,$CXX_AR,;t t
30334 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30335 s,@CXXLIBS@,$CXXLIBS,;t t
30336 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30337 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30338 s,@cf_compile_generics@,$cf_compile_generics,;t t
30339 s,@cf_generic_objects@,$cf_generic_objects,;t t
30340 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30341 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30342 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30343 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30344 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30345 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30346 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30347 s,@cf_ada_package@,$cf_ada_package,;t t
30348 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30349 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30350 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30351 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30352 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30353 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30354 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30355 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30356 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30357 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30358 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30359 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30360 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30361 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30362 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30363 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30364 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30365 s,@TICS_LIBS@,$TICS_LIBS,;t t
30366 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30367 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30368 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30369 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30370 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30371 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30372 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30373 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30374 s,@includesubdir@,$includesubdir,;t t
30375 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30376 s,@TICS_LIST@,$TICS_LIST,;t t
30377 s,@TINFO_LIST@,$TINFO_LIST,;t t
30378 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30379 s,@FORM_NAME@,$FORM_NAME,;t t
30380 s,@MENU_NAME@,$MENU_NAME,;t t
30381 s,@PANEL_NAME@,$PANEL_NAME,;t t
30382 s,@CXX_NAME@,$CXX_NAME,;t t
30383 s,@TEST_ARGS@,$TEST_ARGS,;t t
30384 s,@TEST_DEPS@,$TEST_DEPS,;t t
30385 s,@TEST_ARG2@,$TEST_ARG2,;t t
30386 s,@TEST_DEP2@,$TEST_DEP2,;t t
30387 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30388 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30389 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30390 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30391 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30392 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30393 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30394 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30395 s,@cross_compiling@,$cross_compiling,;t t
30396 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30397 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30398 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30399 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30400 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30401 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30402 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30403 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30404 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30405 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30406 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30407 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30408 CEOF
30409
30410 EOF
30411
30412   cat >>"$CONFIG_STATUS" <<\EOF
30413   # Split the substitutions into bite-sized pieces for seds with
30414   # small command number limits, like on Digital OSF/1 and HP-UX.
30415   ac_max_sed_lines=48
30416   ac_sed_frag=1 # Number of current file.
30417   ac_beg=1 # First line for current file.
30418   ac_end=$ac_max_sed_lines # Line after last line for current file.
30419   ac_more_lines=:
30420   ac_sed_cmds=
30421   while "$ac_more_lines"; do
30422     if test "$ac_beg" -gt 1; then
30423       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30424     else
30425       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30426     fi
30427     if test ! -s "$tmp"/subs.frag; then
30428       ac_more_lines=false
30429     else
30430       # The purpose of the label and of the branching condition is to
30431       # speed up the sed processing (if there are no `@' at all, there
30432       # is no need to browse any of the substitutions).
30433       # These are the two extra sed commands mentioned above.
30434       (echo ':t
30435   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30436       # It is possible to make a multiline substitution using escaped newlines.
30437       # Ensure that we do not split the substitution between script fragments.
30438       ac_BEG=$ac_end
30439       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30440       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30441       if test -s "$tmp"/subs.next; then
30442         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30443         if test ! -s "$tmp"/subs.edit; then
30444           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30445           if test ! -s "$tmp"/subs.edit; then
30446             if test "$ac_beg" -gt 1; then
30447               ac_end=`expr "$ac_end" - 1`
30448               continue
30449             fi
30450           fi
30451         fi
30452       fi
30453
30454       if test -z "$ac_sed_cmds"; then
30455         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30456       else
30457         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30458       fi
30459       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30460       ac_beg=$ac_end
30461       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30462     fi
30463   done
30464   if test -z "$ac_sed_cmds"; then
30465     ac_sed_cmds="cat"
30466   fi
30467 fi # test -n "$CONFIG_FILES"
30468
30469 EOF
30470 cat >>"$CONFIG_STATUS" <<\EOF
30471 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30472   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30473   case "$ac_file" in
30474   - | *:- | *:-:* ) # input from stdin
30475         cat >"$tmp"/stdin
30476         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30477         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30478   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30479         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30480   * )   ac_file_in=$ac_file.in ;;
30481   esac
30482
30483   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30484   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30485          X"$ac_file" : 'X\(//\)[^/]' \| \
30486          X"$ac_file" : 'X\(//\)$' \| \
30487          X"$ac_file" : 'X\(/\)' \| \
30488          .     : '\(.\)' 2>/dev/null ||
30489 echo X"$ac_file" |
30490     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30491           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30492           /^X\(\/\/\)$/{ s//\1/; q; }
30493           /^X\(\/\).*/{ s//\1/; q; }
30494           s/.*/./; q'`
30495   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30496     { case "$ac_dir" in
30497   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30498   *)                      as_incr_dir=.;;
30499 esac
30500 as_dummy="$ac_dir"
30501 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30502   case $as_mkdir_dir in
30503     # Skip DOS drivespec
30504     ?:) as_incr_dir=$as_mkdir_dir ;;
30505     *)
30506       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30507       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30508     ;;
30509   esac
30510 done; }
30511
30512     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30513     # A "../" for each directory in $ac_dir_suffix.
30514     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30515   else
30516     ac_dir_suffix= ac_dots=
30517   fi
30518
30519   case "$srcdir" in
30520   .)  ac_srcdir=.
30521       if test -z "$ac_dots"; then
30522          ac_top_srcdir=.
30523       else
30524          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30525       fi ;;
30526   [\\/]* | ?:[\\/]* )
30527       ac_srcdir="$srcdir$ac_dir_suffix";
30528       ac_top_srcdir="$srcdir" ;;
30529   *) # Relative path.
30530     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30531     ac_top_srcdir="$ac_dots$srcdir" ;;
30532   esac
30533
30534   case $INSTALL in
30535   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30536   *) ac_INSTALL=$ac_dots$INSTALL ;;
30537   esac
30538
30539   if test x"$ac_file" != x-; then
30540     { echo "$as_me:30540: creating $ac_file" >&5
30541 echo "$as_me: creating $ac_file" >&6;}
30542     rm -f "$ac_file"
30543   fi
30544   # Let's still pretend it is `configure' which instantiates (i.e., don't
30545   # use $as_me), people would be surprised to read:
30546   #    /* config.h.  Generated automatically by config.status.  */
30547   configure_input="Generated automatically from `echo $ac_file_in |
30548                                                  sed 's,.*/,,'` by configure."
30549
30550   # First look for the input files in the build tree, otherwise in the
30551   # src tree.
30552   ac_file_inputs=`IFS=:
30553     for f in $ac_file_in; do
30554       case $f in
30555       -) echo "$tmp"/stdin ;;
30556       [\\/$]*)
30557          # Absolute (can't be DOS-style, as IFS=:)
30558          test -f "$f" || { { echo "$as_me:30558: error: cannot find input file: $f" >&5
30559 echo "$as_me: error: cannot find input file: $f" >&2;}
30560    { (exit 1); exit 1; }; }
30561          echo "$f";;
30562       *) # Relative
30563          if test -f "$f"; then
30564            # Build tree
30565            echo "$f"
30566          elif test -f "$srcdir/$f"; then
30567            # Source tree
30568            echo "$srcdir/$f"
30569          else
30570            # /dev/null tree
30571            { { echo "$as_me:30571: error: cannot find input file: $f" >&5
30572 echo "$as_me: error: cannot find input file: $f" >&2;}
30573    { (exit 1); exit 1; }; }
30574          fi;;
30575       esac
30576     done` || { (exit 1); exit 1; }
30577 EOF
30578 cat >>"$CONFIG_STATUS" <<\EOF
30579   ac_warn_datarootdir=no
30580   if test x"$ac_file" != x-; then
30581     for ac_item in $ac_file_inputs
30582     do
30583       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30584       if test -n "$ac_seen"; then
30585         ac_used=`grep '@datarootdir@' "$ac_item"`
30586         if test -z "$ac_used"; then
30587           { echo "$as_me:30587: WARNING: datarootdir was used implicitly but not set:
30588 $ac_seen" >&5
30589 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30590 $ac_seen" >&2;}
30591           ac_warn_datarootdir=yes
30592         fi
30593       fi
30594       ac_seen=`grep '${datarootdir}' "$ac_item"`
30595       if test -n "$ac_seen"; then
30596         { echo "$as_me:30596: WARNING: datarootdir was used explicitly but not set:
30597 $ac_seen" >&5
30598 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30599 $ac_seen" >&2;}
30600         ac_warn_datarootdir=yes
30601       fi
30602     done
30603   fi
30604
30605 if test "x$ac_warn_datarootdir" = xyes; then
30606   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30607 fi
30608
30609 EOF
30610 cat >>"$CONFIG_STATUS" <<EOF
30611   sed "$ac_vpsub
30612 $extrasub
30613 EOF
30614 cat >>"$CONFIG_STATUS" <<\EOF
30615 :t
30616 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30617 s,@configure_input@,$configure_input,;t t
30618 s,@srcdir@,$ac_srcdir,;t t
30619 s,@top_srcdir@,$ac_top_srcdir,;t t
30620 s,@INSTALL@,$ac_INSTALL,;t t
30621 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30622   rm -f "$tmp"/stdin
30623 EOF
30624 test -n "${FGREP}" || FGREP="grep -F"
30625 test -n "${EGREP}" || EGREP="grep -E"
30626 cat >>"$CONFIG_STATUS" <<EOF
30627   test -n "\${FGREP}" || FGREP="$FGREP"
30628   test -n "\${EGREP}" || EGREP="$EGREP"
30629 EOF
30630 cat >>"$CONFIG_STATUS" <<\EOF
30631   if test x"$ac_file" != x-; then
30632     cp "$tmp/out" "$ac_file"
30633
30634     for ac_name in prefix exec_prefix datarootdir
30635     do
30636         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30637         if test -n "$ac_seen"; then
30638             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30639             if test -z "$ac_init"; then
30640               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30641               { echo "$as_me:30641: WARNING: Variable $ac_name is used but was not set:
30642 $ac_seen" >&5
30643 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30644 $ac_seen" >&2;}
30645             fi
30646         fi
30647     done
30648     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30649     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30650     if test -s "$tmp"/out; then
30651       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30652       { echo "$as_me:30652: WARNING: Some variables may not be substituted:
30653 $ac_seen" >&5
30654 echo "$as_me: WARNING: Some variables may not be substituted:
30655 $ac_seen" >&2;}
30656     fi
30657   else
30658     cat "$tmp"/out
30659   fi
30660   rm -f "$tmp"/out
30661
30662 done
30663 EOF
30664 cat >>"$CONFIG_STATUS" <<\EOF
30665
30666 #
30667 # CONFIG_HEADER section.
30668 #
30669
30670 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30671 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30672 #
30673 # ac_d sets the value in "#define NAME VALUE" lines.
30674 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30675 ac_dB='[        ].*$,\1#\2'
30676 ac_dC=' '
30677 ac_dD=',;t'
30678 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30679 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30680 ac_iB='\([      ]\),\1#\2define\3'
30681 ac_iC=' '
30682 ac_iD='\4,;t'
30683 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30684 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30685 ac_uB='$,\1#\2define\3'
30686 ac_uC=' '
30687 ac_uD=',;t'
30688
30689 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30690   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30691   case "$ac_file" in
30692   - | *:- | *:-:* ) # input from stdin
30693         cat >"$tmp"/stdin
30694         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30695         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30696   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30697         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30698   * )   ac_file_in=$ac_file.in ;;
30699   esac
30700
30701   test x"$ac_file" != x- && { echo "$as_me:30701: creating $ac_file" >&5
30702 echo "$as_me: creating $ac_file" >&6;}
30703
30704   # First look for the input files in the build tree, otherwise in the
30705   # src tree.
30706   ac_file_inputs=`IFS=:
30707     for f in $ac_file_in; do
30708       case $f in
30709       -) echo "$tmp"/stdin ;;
30710       [\\/$]*)
30711          # Absolute (can't be DOS-style, as IFS=:)
30712          test -f "$f" || { { echo "$as_me:30712: error: cannot find input file: $f" >&5
30713 echo "$as_me: error: cannot find input file: $f" >&2;}
30714    { (exit 1); exit 1; }; }
30715          echo $f;;
30716       *) # Relative
30717          if test -f "$f"; then
30718            # Build tree
30719            echo $f
30720          elif test -f "$srcdir/$f"; then
30721            # Source tree
30722            echo "$srcdir/$f"
30723          else
30724            # /dev/null tree
30725            { { echo "$as_me:30725: error: cannot find input file: $f" >&5
30726 echo "$as_me: error: cannot find input file: $f" >&2;}
30727    { (exit 1); exit 1; }; }
30728          fi;;
30729       esac
30730     done` || { (exit 1); exit 1; }
30731   # Remove the trailing spaces.
30732   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30733
30734 EOF
30735
30736 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30737 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30738 # be either 'cat' or 'sort'.
30739 cat confdefs.h | uniq >conftest.vals
30740
30741 # Break up conftest.vals because some shells have a limit on
30742 # the size of here documents, and old seds have small limits too.
30743
30744 rm -f conftest.tail
30745 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30746 while grep . conftest.vals >/dev/null
30747 do
30748   # Write chunks of a limited-size here document to conftest.frag.
30749   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30750   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30751   echo 'CEOF' >> "$CONFIG_STATUS"
30752   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30753   rm -f conftest.vals
30754   mv conftest.tail conftest.vals
30755 done
30756 rm -f conftest.vals
30757
30758 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30759 # marker @DEFS@.
30760 echo '  cat >> conftest.edit <<CEOF
30761 /@DEFS@/r conftest.frag
30762 /@DEFS@/d
30763 CEOF
30764 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30765 rm -f "$tmp"/in
30766 mv "$tmp"/out "$tmp"/in
30767 rm -f conftest.edit conftest.frag
30768 ' >> "$CONFIG_STATUS"
30769
30770 cat >>"$CONFIG_STATUS" <<\EOF
30771   # Let's still pretend it is `configure' which instantiates (i.e., don't
30772   # use $as_me), people would be surprised to read:
30773   #    /* config.h.  Generated automatically by config.status.  */
30774   if test x"$ac_file" = x-; then
30775     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30776   else
30777     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30778   fi
30779   cat "$tmp"/in >>"$tmp"/config.h
30780   rm -f "$tmp"/in
30781   if test x"$ac_file" != x-; then
30782     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30783       { echo "$as_me:30783: $ac_file is unchanged" >&5
30784 echo "$as_me: $ac_file is unchanged" >&6;}
30785     else
30786       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30787          X"$ac_file" : 'X\(//\)[^/]' \| \
30788          X"$ac_file" : 'X\(//\)$' \| \
30789          X"$ac_file" : 'X\(/\)' \| \
30790          .     : '\(.\)' 2>/dev/null ||
30791 echo X"$ac_file" |
30792     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30793           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30794           /^X\(\/\/\)$/{ s//\1/; q; }
30795           /^X\(\/\).*/{ s//\1/; q; }
30796           s/.*/./; q'`
30797       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30798         { case "$ac_dir" in
30799   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30800   *)                      as_incr_dir=.;;
30801 esac
30802 as_dummy="$ac_dir"
30803 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30804   case $as_mkdir_dir in
30805     # Skip DOS drivespec
30806     ?:) as_incr_dir=$as_mkdir_dir ;;
30807     *)
30808       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30809       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30810     ;;
30811   esac
30812 done; }
30813
30814       fi
30815       rm -f "$ac_file"
30816       mv "$tmp/config.h" "$ac_file"
30817     fi
30818   else
30819     cat "$tmp"/config.h
30820     rm -f "$tmp"/config.h
30821   fi
30822 done
30823 EOF
30824 cat >>"$CONFIG_STATUS" <<\EOF
30825 #
30826 # CONFIG_COMMANDS section.
30827 #
30828 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30829   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30830   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30831
30832   case "$ac_dest" in
30833     default )
30834 if test "x$cf_with_tests" != xno ; then
30835
30836 for cf_dir in test
30837 do
30838         if test ! -d "$srcdir/$cf_dir" ; then
30839                 continue
30840         elif test -f "$srcdir/$cf_dir/programs" ; then
30841                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30842         fi
30843 done
30844
30845 fi
30846
30847 cf_prefix=$LIB_PREFIX
30848
30849 case "$cf_cv_shlib_version" in
30850 (cygdll|msysdll|mingw|msvcdll)
30851         TINFO_NAME=$TINFO_ARG_SUFFIX
30852         TINFO_SUFFIX=.dll
30853         ;;
30854 esac
30855
30856 if test -n "$TINFO_SUFFIX" ; then
30857         case "$TINFO_SUFFIX" in
30858         (tw*)
30859                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30860                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30861                 ;;
30862         (t*)
30863                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30864                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30865                 ;;
30866         (w*)
30867                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30868                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30869                 ;;
30870         esac
30871 fi
30872
30873 for cf_dir in $SRC_SUBDIRS
30874 do
30875         if test ! -d "$srcdir/$cf_dir" ; then
30876                 continue
30877         elif test -f "$srcdir/$cf_dir/modules" ; then
30878
30879                 SHARED_LIB=
30880                 Libs_To_Make=
30881                 cf_awk_program=
30882                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30883                 then
30884                         cf_awk_program="$cf_awk_program\
30885 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30886 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30887 "
30888                 fi
30889
30890                 if test "x$WILDCARD_SYMS" = xno
30891                 then
30892                         cf_awk_program="$cf_awk_program\
30893 /[      ]_\\*;/ { skip=1; next; }\
30894 "
30895                 fi
30896
30897                 if test "x$cf_awk_program" != "x"
30898                 then
30899                         cat >>$cf_dir/Makefile <<CF_EOF
30900
30901 # Generated by CF_LIB_RULES
30902 resulting.map: $UNALTERED_SYMS
30903         $AWK 'BEGIN { skip = 1; last=""; } \
30904 $cf_awk_program \
30905 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30906  skip = 0; last = \$\$0; } \
30907 END { print last; }' < "$UNALTERED_SYMS" >\$@
30908
30909 distclean::
30910         rm -f resulting.map
30911 CF_EOF
30912                 fi
30913
30914                 for cf_item in $cf_LIST_MODELS
30915                 do
30916
30917         case X$cf_item in
30918         (Xlibtool)
30919                 cf_suffix='.la'
30920                 cf_depsuf=$cf_suffix
30921                 ;;
30922         (Xdebug)
30923                 case "$cf_cv_system_name" in
30924                 (*-msvc*)
30925                         cf_suffix='_g.lib'
30926                         ;;
30927                 (*)
30928                         cf_suffix='_g.a'
30929                         ;;
30930                 esac
30931                 cf_depsuf=$cf_suffix
30932                 ;;
30933         (Xprofile)
30934                 case "$cf_cv_system_name" in
30935                 (*-msvc*)
30936                         cf_suffix='_p.lib'
30937                         ;;
30938                 (*)
30939                         cf_suffix='_p.a'
30940                         ;;
30941                 esac
30942                 cf_depsuf=$cf_suffix
30943                 ;;
30944         (Xshared)
30945                 case "$cf_cv_system_name" in
30946                 (aix[5-7]*)
30947                         cf_suffix='.so'
30948                         cf_depsuf=$cf_suffix
30949                         ;;
30950                 (*-msvc*)
30951                         cf_suffix='.dll'
30952                         cf_depsuf='.dll.lib'
30953                         ;;
30954                 (cygwin*|msys*|mingw*)
30955                         cf_suffix='.dll'
30956                         cf_depsuf='.dll.a'
30957                         ;;
30958                 (darwin*)
30959                         cf_suffix='.dylib'
30960                         cf_depsuf=$cf_suffix
30961                         ;;
30962                 (hpux*)
30963                         case "$target" in
30964                         (ia64*)
30965                                 cf_suffix='.so'
30966                                 cf_depsuf=$cf_suffix
30967                                 ;;
30968                         (*)
30969                                 cf_suffix='.sl'
30970                                 cf_depsuf=$cf_suffix
30971                                 ;;
30972                         esac
30973                         ;;
30974                 (*)
30975                         cf_suffix='.so'
30976                         cf_depsuf=$cf_suffix
30977                         ;;
30978                 esac
30979                 ;;
30980         (*)
30981                 case "$target" in
30982                 (*-msvc*)
30983                         cf_suffix='.lib'
30984                         ;;
30985                 (*)
30986                         cf_suffix='.a'
30987                         ;;
30988                 esac
30989                 cf_depsuf=$cf_suffix
30990                 ;;
30991         esac
30992         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30993         then
30994                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30995                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30996         fi
30997
30998                         if test "$cf_dir" = "c++"
30999                         then
31000
31001 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31002
31003 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31004
31005                         else
31006
31007 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31008
31009 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31010
31011                         fi
31012                         test -z "$cf_libname" && cf_libname="$cf_dir"
31013                         if test "$cf_item" = shared ; then
31014                                 if test -n "${LIB_SUFFIX}"
31015                                 then
31016                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
31017                                 else
31018                                         cf_shared_suffix="$cf_suffix"
31019                                 fi
31020                                 if test "$cf_cv_do_symlinks" = yes ; then
31021                                         cf_version_name=
31022
31023                                         case "$cf_cv_shlib_version" in
31024                                         (rel)
31025                                                 cf_version_name=REL_VERSION
31026                                                 ;;
31027                                         (abi)
31028                                                 cf_version_name=ABI_VERSION
31029                                                 ;;
31030                                         esac
31031
31032                                         if test -n "$cf_version_name"
31033                                         then
31034                                                 case "$cf_cv_system_name" in
31035                                                 (darwin*)
31036                                                         # "w", etc?
31037                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
31038                                                         ;;
31039                                                 (*)
31040                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
31041                                                         ;;
31042                                                 esac
31043                                         fi
31044                                         if test -n "${USE_LIB_SUFFIX}"
31045                                         then
31046                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
31047                                         else
31048                                                 cf_shared_suffix="$cf_suffix"
31049                                         fi
31050                                 fi
31051                                 # cygwin needs import library, and has unique naming convention
31052                                 # use autodetected ${cf_prefix} for import lib and static lib, but
31053                                 # use 'cyg' prefix for shared lib.
31054                                 case "$cf_cv_shlib_version" in
31055                                 (cygdll)
31056                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31057                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
31058                                         ;;
31059                                 (msysdll)
31060                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31061                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
31062                                         ;;
31063                                 (mingw)
31064                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31065                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
31066                                         ;;
31067                                 (msvcdll)
31068                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31069                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
31070                                         ;;
31071                                 (*)
31072                                         cf_add_lib=
31073                                         ;;
31074                                 esac
31075                                 if test -n "$cf_add_lib"
31076                                 then
31077                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
31078                                         continue
31079                                 fi
31080                         fi
31081                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
31082                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
31083                 done
31084
31085                 if test "$cf_dir" = ncurses ; then
31086                         cf_subsets="$LIB_SUBSETS"
31087                         cf_r_parts="$cf_subsets"
31088                         cf_liblist="$Libs_To_Make"
31089
31090                         while test -n "$cf_r_parts"
31091                         do
31092                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
31093                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
31094                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
31095                                         cf_add_lib=
31096                                         case "$cf_l_parts" in
31097                                         (*termlib*)
31098                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
31099                                                 ;;
31100                                         (*ticlib*)
31101                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
31102                                                 ;;
31103                                         (*)
31104                                                 break
31105                                                 ;;
31106                                         esac
31107                                         if test -n "$cf_add_lib"; then
31108                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
31109                                         fi
31110                                 else
31111                                         break
31112                                 fi
31113                         done
31114                 else
31115                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
31116                 fi
31117
31118                 if test "$cf_dir" = c++; then
31119                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
31120                                 cf_list=
31121                                 for cf_item in $Libs_To_Make
31122                                 do
31123                                         case "$cf_item" in
31124                                         (*.a)
31125                                                 ;;
31126                                         (*)
31127                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
31128                                                 ;;
31129                                         esac
31130                                         for cf_test in $cf_list
31131                                         do
31132                                                 if test "$cf_test" = "$cf_item"
31133                                                 then
31134                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
31135                                                         cf_item=
31136                                                         break
31137                                                 fi
31138                                         done
31139                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
31140                                 done
31141                                 Libs_To_Make="$cf_list"
31142                         fi
31143                 fi
31144
31145                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
31146                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
31147                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
31148                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
31149
31150                 $AWK -f "$srcdir/mk-0th.awk" \
31151                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
31152                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31153
31154                 for cf_subset in $cf_subsets
31155                 do
31156                         cf_subdirs=
31157                         for cf_item in $cf_LIST_MODELS
31158                         do
31159
31160                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
31161
31162 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31163
31164                         CXX_MODEL=$cf_ITEM
31165                         if test "$CXX_MODEL" = SHARED; then
31166                                 case "$cf_cv_shlib_version" in
31167                                 (cygdll|msysdll|mingw|msvcdll)
31168                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
31169
31170 echo "${as_me:-configure}:31170: testing overriding CXX_MODEL to SHARED ..." 1>&5
31171
31172                                         with_shared_cxx=yes
31173                                         ;;
31174                                 (*)
31175                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
31176                                         ;;
31177                                 esac
31178                         fi
31179
31180         case X$cf_item in
31181         (Xlibtool)
31182                 cf_suffix='.la'
31183                 cf_depsuf=$cf_suffix
31184                 ;;
31185         (Xdebug)
31186                 case "$cf_cv_system_name" in
31187                 (*-msvc*)
31188                         cf_suffix='_g.lib'
31189                         ;;
31190                 (*)
31191                         cf_suffix='_g.a'
31192                         ;;
31193                 esac
31194                 cf_depsuf=$cf_suffix
31195                 ;;
31196         (Xprofile)
31197                 case "$cf_cv_system_name" in
31198                 (*-msvc*)
31199                         cf_suffix='_p.lib'
31200                         ;;
31201                 (*)
31202                         cf_suffix='_p.a'
31203                         ;;
31204                 esac
31205                 cf_depsuf=$cf_suffix
31206                 ;;
31207         (Xshared)
31208                 case "$cf_cv_system_name" in
31209                 (aix[5-7]*)
31210                         cf_suffix='.so'
31211                         cf_depsuf=$cf_suffix
31212                         ;;
31213                 (*-msvc*)
31214                         cf_suffix='.dll'
31215                         cf_depsuf='.dll.lib'
31216                         ;;
31217                 (cygwin*|msys*|mingw*)
31218                         cf_suffix='.dll'
31219                         cf_depsuf='.dll.a'
31220                         ;;
31221                 (darwin*)
31222                         cf_suffix='.dylib'
31223                         cf_depsuf=$cf_suffix
31224                         ;;
31225                 (hpux*)
31226                         case "$target" in
31227                         (ia64*)
31228                                 cf_suffix='.so'
31229                                 cf_depsuf=$cf_suffix
31230                                 ;;
31231                         (*)
31232                                 cf_suffix='.sl'
31233                                 cf_depsuf=$cf_suffix
31234                                 ;;
31235                         esac
31236                         ;;
31237                 (*)
31238                         cf_suffix='.so'
31239                         cf_depsuf=$cf_suffix
31240                         ;;
31241                 esac
31242                 ;;
31243         (*)
31244                 case "$target" in
31245                 (*-msvc*)
31246                         cf_suffix='.lib'
31247                         ;;
31248                 (*)
31249                         cf_suffix='.a'
31250                         ;;
31251                 esac
31252                 cf_depsuf=$cf_suffix
31253                 ;;
31254         esac
31255         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31256         then
31257                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31258                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31259         fi
31260
31261         case $cf_item in
31262         (libtool) cf_subdir='obj_lo'  ;;
31263         (normal)  cf_subdir='objects' ;;
31264         (debug)   cf_subdir='obj_g' ;;
31265         (profile) cf_subdir='obj_p' ;;
31266         (shared)
31267                 case "$cf_cv_system_name" in
31268                 (cygwin|msys)
31269                         cf_subdir='objects' ;;
31270                 (*)
31271                         cf_subdir='obj_s' ;;
31272                 esac
31273         esac
31274
31275                         # Test for case where we build libtinfo with a different name.
31276                         cf_libname=$cf_dir
31277                         if test "$cf_dir" = ncurses ; then
31278                                 case "$cf_subset" in
31279                                 (*base*)
31280                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31281                                         ;;
31282                                 (*termlib*)
31283                                         cf_libname=$TINFO_LIB_SUFFIX
31284                                         ;;
31285                                 (ticlib*)
31286                                         cf_libname=$TICS_LIB_SUFFIX
31287                                         ;;
31288                                 esac
31289                         elif test "$cf_dir" = c++ ; then
31290
31291 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31292
31293 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31294
31295                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31296                         else
31297
31298 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31299
31300 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31301
31302                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31303                         fi
31304                         if test -n "${USE_ARG_SUFFIX}" ; then
31305                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31306                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31307                         fi
31308
31309                         # These dependencies really are for development, not
31310                         # builds, but they are useful in porting, too.
31311                         cf_depend="../include/ncurses_cfg.h"
31312                         if test "$srcdir" = "."; then
31313                                 cf_reldir="."
31314                         else
31315                                 cf_reldir="\${srcdir}"
31316                         fi
31317
31318                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31319                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31320                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31321                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31322                         fi
31323
31324                         cf_dir_suffix=
31325                         old_cf_suffix="$cf_suffix"
31326                         if test "$cf_cv_shlib_version_infix" = yes ; then
31327                         if test -n "$USE_LIB_SUFFIX" ; then
31328                                 case "$USE_LIB_SUFFIX" in
31329                                 (tw*)
31330                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31331                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31332                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31333                                         ;;
31334                                 (t*)
31335                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31336                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31337                                         cf_dir_suffix=t$EXTRA_SUFFIX
31338                                         ;;
31339                                 (w*)
31340                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31341                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31342                                         cf_dir_suffix=w$EXTRA_SUFFIX
31343                                         ;;
31344                                 (*)
31345                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31346                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31347                                         cf_dir_suffix=$EXTRA_SUFFIX
31348                                         ;;
31349                                 esac
31350                         fi
31351                         fi
31352
31353                         $AWK -f "$srcdir/mk-1st.awk" \
31354                                 name=${cf_libname}${cf_dir_suffix} \
31355                                 traces=$LIB_TRACING \
31356                                 MODEL=$cf_ITEM \
31357                                 CXX_MODEL=$CXX_MODEL \
31358                                 LIB_SUFFIX=$LIB_SUFFIX \
31359                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31360                                 make_phony="${cf_cv_make_PHONY:-no}" \
31361                                 model=$cf_subdir \
31362                                 prefix=$cf_prefix \
31363                                 suffix=$cf_suffix \
31364                                 subset=$cf_subset \
31365                                 driver=$cf_cv_term_driver \
31366                                 SymLink="$LN_S" \
31367                                 TermlibRoot=$TINFO_NAME \
31368                                 TermlibSuffix=$TINFO_SUFFIX \
31369                                 ShlibVer=$cf_cv_shlib_version \
31370                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31371                                 ReLink=${cf_cv_do_relink:-no} \
31372                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31373                                 DoLinks=$cf_cv_do_symlinks \
31374                                 rmSoLocs=$cf_cv_rm_so_locs \
31375                                 ldconfig="$LDCONFIG" \
31376                                 overwrite=$WITH_OVERWRITE \
31377                                 depend="$cf_depend" \
31378                                 host="$host" \
31379                                 libtool_version="$LIBTOOL_VERSION" \
31380                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31381
31382                         cf_suffix="$old_cf_suffix"
31383
31384                         for cf_subdir2 in $cf_subdirs lib
31385                         do
31386                                 test "$cf_subdir" = "$cf_subdir2" && break
31387                         done
31388                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31389                         $AWK -f "$srcdir/mk-2nd.awk" \
31390                                 name=$cf_dir \
31391                                 traces=$LIB_TRACING \
31392                                 MODEL=$cf_ITEM \
31393                                 model=$cf_subdir \
31394                                 subset=$cf_subset \
31395                                 srcdir=$srcdir \
31396                                 echo=$WITH_ECHO \
31397                                 crenames=$cf_cv_prog_CC_c_o \
31398                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31399                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31400                         cf_subdirs="$cf_subdirs $cf_subdir"
31401                         done
31402                 done
31403         fi
31404
31405         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31406 done
31407
31408 echo >> Makefile
31409 echo '# generated by CF_LIB_RULES' >> Makefile
31410
31411 if test "x$cf_cv_make_PHONY" = xyes ; then
31412         cat >> Makefile <<-CF_EOF
31413
31414         .PHONY :        libs
31415         .PHONY :        lintlib
31416         .PHONY :        install.includes
31417         .PHONY :        uninstall.includes
31418         .PHONY :        install.libs
31419         .PHONY :        uninstall.libs
31420 CF_EOF
31421 fi
31422
31423 for cf_dir in $SRC_SUBDIRS
31424 do
31425         if test ! -d "$srcdir/$cf_dir" ; then
31426                 continue
31427         fi
31428
31429         if test -f "$cf_dir/Makefile" ; then
31430                 case "$cf_dir" in
31431                 (Ada95)
31432                         echo 'libs \' >> Makefile
31433                         echo 'install.libs \' >> Makefile
31434                         echo 'uninstall.libs ::' >> Makefile
31435                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31436                         ;;
31437                 esac
31438         fi
31439
31440         if test -f "$srcdir/$cf_dir/modules" ; then
31441
31442                 if test "x$cf_cv_make_PHONY" = xyes ; then
31443                         cat >> Makefile <<-CF_EOF
31444
31445                         .PHONY :        install.$cf_dir
31446                         .PHONY :        uninstall.$cf_dir
31447 CF_EOF
31448                 fi
31449
31450                 echo >> Makefile
31451                 if test -f "$srcdir/$cf_dir/headers" ; then
31452 cat >> Makefile <<CF_EOF
31453 install.includes \\
31454 uninstall.includes \\
31455 CF_EOF
31456                 fi
31457
31458 cat >> Makefile <<CF_EOF
31459 lint \\
31460 libs \\
31461 lintlib \\
31462 install.libs \\
31463 uninstall.libs \\
31464 install.$cf_dir \\
31465 uninstall.$cf_dir ::
31466         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31467 CF_EOF
31468         elif test -f "$srcdir/$cf_dir/headers" ; then
31469 cat >> Makefile <<CF_EOF
31470
31471 libs \\
31472 install.libs \\
31473 uninstall.libs \\
31474 install.includes \\
31475 uninstall.includes ::
31476         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31477 CF_EOF
31478 fi
31479 done
31480
31481 if test "x$cf_cv_make_PHONY" = xyes ; then
31482         cat >> Makefile <<-CF_EOF
31483
31484         .PHONY :        install.data
31485         .PHONY :        uninstall.data
31486 CF_EOF
31487 fi
31488
31489 if test "x$cf_with_db_install" = xyes; then
31490 cat >> Makefile <<CF_EOF
31491
31492 install.libs uninstall.libs \\
31493 install.data uninstall.data ::
31494 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31495 CF_EOF
31496 else
31497 cat >> Makefile <<CF_EOF
31498
31499 install.libs uninstall.libs ::
31500         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31501 CF_EOF
31502 fi
31503
31504 if test "x$cf_with_manpages" = xyes; then
31505
31506 if test "x$cf_cv_make_PHONY" = xyes ; then
31507         cat >> Makefile <<-CF_EOF
31508
31509         .PHONY :        install.man
31510         .PHONY :        uninstall.man
31511 CF_EOF
31512 fi
31513
31514 cat >> Makefile <<CF_EOF
31515
31516 install.man \\
31517 uninstall.man ::
31518         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31519 CF_EOF
31520 fi
31521
31522 cat >> Makefile <<CF_EOF
31523
31524 distclean ::
31525         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31526         rm -f headers.sh headers.sed mk_shared_lib.sh
31527         rm -f edit_man.* man_alias.* *.tmp
31528         rm -rf \${DIRS_TO_MAKE}
31529 CF_EOF
31530
31531 rm -f headers.sed headers.sh
31532
31533 echo creating headers.sh
31534 cat >headers.sh <<CF_EOF
31535 #! $SHELL
31536 # This shell script is generated by the 'configure' script.  It is invoked in a
31537 # subdirectory of the build tree.  It generates a sed-script in the parent
31538 # directory that is used to adjust includes for header files that reside in a
31539 # subdirectory of /usr/include, etc.
31540 PRG=""
31541 while test \$# != 3
31542 do
31543 PRG="\$PRG \$1"; shift
31544 done
31545 DST=\$1
31546 REF=\$2
31547 SRC=\$3
31548 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31549 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31550 echo installing \$SRC in \$DST
31551 CF_EOF
31552
31553 if test "$WITH_CURSES_H" = yes; then
31554         cat >>headers.sh <<CF_EOF
31555 case \$DST in
31556 (/*/include/*)
31557         END=\`basename \$DST\`
31558         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31559         do
31560                 NAME=\`basename \$i\`
31561                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31562         done
31563         ;;
31564 (*)
31565         echo "" >> \$TMPSED
31566         ;;
31567 esac
31568 CF_EOF
31569
31570 else
31571         cat >>headers.sh <<CF_EOF
31572 case \$DST in
31573 (/*/include/*)
31574         END=\`basename \$DST\`
31575         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31576         do
31577                 NAME=\`basename \$i\`
31578                 if test "\$NAME" = "curses.h"
31579                 then
31580                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31581                         NAME=ncurses.h
31582                 fi
31583                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31584         done
31585         ;;
31586 (*)
31587         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31588         ;;
31589 esac
31590 CF_EOF
31591 fi
31592 cat >>headers.sh <<CF_EOF
31593 rm -f \$TMPSRC
31594 sed -f \$TMPSED \$SRC > \$TMPSRC
31595 NAME=\`basename \$SRC\`
31596 CF_EOF
31597 if test "$WITH_CURSES_H" != yes; then
31598         cat >>headers.sh <<CF_EOF
31599 test "\$NAME" = "curses.h" && NAME=ncurses.h
31600 CF_EOF
31601 fi
31602 cat >>headers.sh <<CF_EOF
31603 # Just in case someone gzip'd manpages, remove the conflicting copy.
31604 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31605
31606 eval \$PRG \$TMPSRC \$DST/\$NAME
31607 rm -f \$TMPSRC \$TMPSED
31608 CF_EOF
31609
31610 chmod 0755 headers.sh
31611
31612 for cf_dir in $SRC_SUBDIRS
31613 do
31614         if test ! -d "$srcdir/$cf_dir" ; then
31615                 continue
31616         fi
31617
31618         if test -f "$srcdir/$cf_dir/headers" ; then
31619                 $AWK -f "$srcdir/mk-hdr.awk" \
31620                         subset="$LIB_SUBSETS" \
31621                         compat="$WITH_CURSES_H" \
31622                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31623         fi
31624
31625         if test -f "$srcdir/$cf_dir/modules" ; then
31626                 if test "$cf_dir" != "c++" ; then
31627                         if test "x$cf_cv_make_PHONY" = xyes ; then
31628                                 cat >> $cf_dir/Makefile <<-CF_EOF
31629
31630                                 .PHONY :        depend
31631 CF_EOF
31632                         fi
31633
31634                         cat >>$cf_dir/Makefile <<"CF_EOF"
31635 depend : ${AUTO_SRC}
31636         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31637
31638 # DO NOT DELETE THIS LINE -- make depend depends on it.
31639 CF_EOF
31640                 fi
31641         fi
31642 done
31643
31644 if test "$MANPAGE_RENAMES" != no ; then
31645         # Construct a sed-script to perform renaming within man-pages
31646         test -n "$verbose" && echo "creating edit_man.sed"
31647         test ! -d man && mkdir man
31648         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31649 fi
31650
31651 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31652 if test -z "$USE_OLD_MAKERULES" ; then
31653         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31654 fi
31655 fi
31656  ;;
31657   esac
31658 done
31659 EOF
31660
31661 cat >>"$CONFIG_STATUS" <<\EOF
31662
31663 { (exit 0); exit 0; }
31664 EOF
31665 chmod +x "$CONFIG_STATUS"
31666 ac_clean_files=$ac_clean_files_save
31667
31668 # configure is writing to config.log, and then calls config.status.
31669 # config.status does its own redirection, appending to config.log.
31670 # Unfortunately, on DOS this fails, as config.log is still kept open
31671 # by configure, so config.status won't be able to write to it; its
31672 # output is simply discarded.  So we exec the FD to /dev/null,
31673 # effectively closing config.log, so it can be properly (re)opened and
31674 # appended to by config.status.  When coming back to configure, we
31675 # need to make the FD available again.
31676 if test "$no_create" != yes; then
31677   ac_cs_success=:
31678   exec 5>/dev/null
31679   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31680   exec 5>>config.log
31681   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31682   # would make configure fail if this is the last instruction.
31683   "$ac_cs_success" || { (exit 1); exit 1; }
31684 fi
31685 ${MAKE:-make} preinstall