]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
d0884171f51c4df00007e184c3265c3b3f6c0759
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.781 .
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         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15841 else
15842         NCURSES_EXT_FUNCS=0
15843         GENERATED_EXT_FUNCS=
15844 fi
15845
15846 echo "$as_me:15846: checking if you want to build with SCREEN extensions" >&5
15847 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15848
15849 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15850 if test "${enable_sp_funcs+set}" = set; then
15851   enableval="$enable_sp_funcs"
15852   with_sp_funcs=$enableval
15853 else
15854   with_sp_funcs=$cf_dft_ext_spfuncs
15855 fi;
15856 echo "$as_me:15856: result: $with_sp_funcs" >&5
15857 echo "${ECHO_T}$with_sp_funcs" >&6
15858 if test "x$with_sp_funcs" = xyes ; then
15859         NCURSES_SP_FUNCS=1
15860
15861 cat >>confdefs.h <<\EOF
15862 #define NCURSES_SP_FUNCS 1
15863 EOF
15864
15865 cat >>confdefs.h <<\EOF
15866 #define HAVE_TPUTS_SP 1
15867 EOF
15868
15869         GENERATED_SP_FUNCS=generated
15870 else
15871         NCURSES_SP_FUNCS=0
15872         GENERATED_SP_FUNCS=
15873 fi
15874
15875 echo "$as_me:15875: checking if you want to build with terminal-driver" >&5
15876 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15877
15878 # Check whether --enable-term-driver or --disable-term-driver was given.
15879 if test "${enable_term_driver+set}" = set; then
15880   enableval="$enable_term_driver"
15881   with_term_driver=$enableval
15882 else
15883   with_term_driver=no
15884 fi;
15885 echo "$as_me:15885: result: $with_term_driver" >&5
15886 echo "${ECHO_T}$with_term_driver" >&6
15887 if test "x$with_term_driver" = xyes ; then
15888
15889 cat >>confdefs.h <<\EOF
15890 #define USE_TERM_DRIVER 1
15891 EOF
15892
15893         if test "x$with_termlib" != xno ; then
15894                 { { echo "$as_me:15894: error: The term-driver option conflicts with the termlib option" >&5
15895 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15896    { (exit 1); exit 1; }; }
15897         fi
15898         if test "x$with_sp_funcs" != xyes ; then
15899                 { { echo "$as_me:15899: error: The term-driver option relies upon sp-funcs" >&5
15900 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15901    { (exit 1); exit 1; }; }
15902         fi
15903 fi
15904
15905 ###   use option --enable-const to turn on use of const beyond that in XSI.
15906 echo "$as_me:15906: checking for extended use of const keyword" >&5
15907 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15908
15909 # Check whether --enable-const or --disable-const was given.
15910 if test "${enable_const+set}" = set; then
15911   enableval="$enable_const"
15912   with_ext_const=$enableval
15913 else
15914   with_ext_const=$cf_dft_ext_const
15915 fi;
15916 echo "$as_me:15916: result: $with_ext_const" >&5
15917 echo "${ECHO_T}$with_ext_const" >&6
15918 NCURSES_CONST='/*nothing*/'
15919 if test "x$with_ext_const" = xyes ; then
15920         NCURSES_CONST=const
15921 fi
15922
15923 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15924 echo "$as_me:15924: checking if you want to use extended colors" >&5
15925 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15926
15927 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15928 if test "${enable_ext_colors+set}" = set; then
15929   enableval="$enable_ext_colors"
15930   with_ext_colors=$enableval
15931 else
15932   with_ext_colors=$cf_dft_ext_colors
15933 fi;
15934 echo "$as_me:15934: result: $with_ext_colors" >&5
15935 echo "${ECHO_T}$with_ext_colors" >&6
15936 NCURSES_EXT_COLORS=0
15937 if test "x$with_ext_colors" = xyes ; then
15938         if test "x$with_widec" != xyes ; then
15939                 { echo "$as_me:15939: WARNING: This option applies only to wide-character library" >&5
15940 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15941         else
15942                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15943
15944 if test "${with_abi_version+set}" != set; then
15945         case "$cf_cv_rel_version" in
15946         (5.*)
15947                 cf_cv_rel_version=6.0
15948                 cf_cv_abi_version=6
15949                 cf_cv_abi_default=6
15950                 { echo "$as_me:15950: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15951 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15952                 ;;
15953         esac
15954 fi
15955
15956                 NCURSES_EXT_COLORS=1
15957
15958 cat >>confdefs.h <<\EOF
15959 #define NCURSES_EXT_COLORS 1
15960 EOF
15961
15962 cat >>confdefs.h <<\EOF
15963 #define HAVE_ALLOC_PAIR 1
15964 EOF
15965
15966 cat >>confdefs.h <<\EOF
15967 #define HAVE_INIT_EXTENDED_COLOR 1
15968 EOF
15969
15970 cat >>confdefs.h <<\EOF
15971 #define HAVE_RESET_COLOR_PAIRS 1
15972 EOF
15973
15974         fi
15975 fi
15976
15977 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15978 echo "$as_me:15978: checking if you want to use extended mouse encoding" >&5
15979 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15980
15981 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15982 if test "${enable_ext_mouse+set}" = set; then
15983   enableval="$enable_ext_mouse"
15984   with_ext_mouse=$enableval
15985 else
15986   with_ext_mouse=$cf_dft_ext_mouse
15987 fi;
15988 echo "$as_me:15988: result: $with_ext_mouse" >&5
15989 echo "${ECHO_T}$with_ext_mouse" >&6
15990 if test "x$with_ext_mouse" = xyes ; then
15991
15992 if test "${with_abi_version+set}" != set; then
15993         case "$cf_cv_rel_version" in
15994         (5.*)
15995                 cf_cv_rel_version=6.0
15996                 cf_cv_abi_version=6
15997                 cf_cv_abi_default=6
15998                 { echo "$as_me:15998: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15999 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16000                 ;;
16001         esac
16002 fi
16003
16004 fi
16005
16006 if test $cf_cv_abi_default -le 5 ; then
16007         NCURSES_MOUSE_VERSION=1
16008 elif test $cf_cv_abi_default -le 6 ; then
16009         NCURSES_MOUSE_VERSION=2
16010 else
16011         NCURSES_MOUSE_VERSION=3
16012 fi
16013
16014 ###   use option --enable-ext-putwin to turn on extended screendumps
16015 echo "$as_me:16015: checking if you want to use extended putwin/screendump" >&5
16016 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
16017
16018 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
16019 if test "${enable_ext_putwin+set}" = set; then
16020   enableval="$enable_ext_putwin"
16021   with_ext_putwin=$enableval
16022 else
16023   with_ext_putwin=$cf_dft_ext_putwin
16024 fi;
16025 echo "$as_me:16025: result: $with_ext_putwin" >&5
16026 echo "${ECHO_T}$with_ext_putwin" >&6
16027 if test "x$with_ext_putwin" = xyes ; then
16028
16029 cat >>confdefs.h <<\EOF
16030 #define NCURSES_EXT_PUTWIN 1
16031 EOF
16032
16033 fi
16034
16035 echo "$as_me:16035: checking if you want \$NCURSES_NO_PADDING code" >&5
16036 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
16037
16038 # Check whether --enable-no-padding or --disable-no-padding was given.
16039 if test "${enable_no_padding+set}" = set; then
16040   enableval="$enable_no_padding"
16041   with_no_padding=$enableval
16042 else
16043   with_no_padding=$with_ext_funcs
16044 fi;
16045 echo "$as_me:16045: result: $with_no_padding" >&5
16046 echo "${ECHO_T}$with_no_padding" >&6
16047 test "x$with_no_padding" = xyes &&
16048 cat >>confdefs.h <<\EOF
16049 #define NCURSES_NO_PADDING 1
16050 EOF
16051
16052 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
16053 echo "$as_me:16053: checking if you want SIGWINCH handler" >&5
16054 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
16055
16056 # Check whether --enable-sigwinch or --disable-sigwinch was given.
16057 if test "${enable_sigwinch+set}" = set; then
16058   enableval="$enable_sigwinch"
16059   with_sigwinch=$enableval
16060 else
16061   with_sigwinch=$with_ext_funcs
16062 fi;
16063 echo "$as_me:16063: result: $with_sigwinch" >&5
16064 echo "${ECHO_T}$with_sigwinch" >&6
16065 if test "x$with_sigwinch" = xyes
16066 then
16067
16068 cat >>confdefs.h <<\EOF
16069 #define USE_SIGWINCH 1
16070 EOF
16071
16072         cf_cv_enable_sigwinch=1
16073 else
16074         cf_cv_enable_sigwinch=0
16075 fi
16076
16077 ###   use option --enable-tcap-names to allow user to define new capabilities
16078 echo "$as_me:16078: checking if you want user-definable terminal capabilities like termcap" >&5
16079 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
16080
16081 # Check whether --enable-tcap-names or --disable-tcap-names was given.
16082 if test "${enable_tcap_names+set}" = set; then
16083   enableval="$enable_tcap_names"
16084   with_tcap_names=$enableval
16085 else
16086   with_tcap_names=$with_ext_funcs
16087 fi;
16088 echo "$as_me:16088: result: $with_tcap_names" >&5
16089 echo "${ECHO_T}$with_tcap_names" >&6
16090 NCURSES_XNAMES=0
16091 if test "x$with_tcap_names" = xyes; then
16092         NCURSES_XNAMES=1
16093
16094 cat >>confdefs.h <<\EOF
16095 #define NCURSES_XNAMES 1
16096 EOF
16097
16098 fi
16099
16100 ##############################################################################
16101
16102 echo "$as_me:16102: checking if you want to link with the pthread library" >&5
16103 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
16104
16105 # Check whether --with-pthread or --without-pthread was given.
16106 if test "${with_pthread+set}" = set; then
16107   withval="$with_pthread"
16108   with_pthread=$withval
16109 else
16110   with_pthread=no
16111 fi;
16112 echo "$as_me:16112: result: $with_pthread" >&5
16113 echo "${ECHO_T}$with_pthread" >&6
16114
16115 if test "$with_pthread" != no ; then
16116         echo "$as_me:16116: checking for pthread.h" >&5
16117 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
16118 if test "${ac_cv_header_pthread_h+set}" = set; then
16119   echo $ECHO_N "(cached) $ECHO_C" >&6
16120 else
16121   cat >"conftest.$ac_ext" <<_ACEOF
16122 #line 16122 "configure"
16123 #include "confdefs.h"
16124 #include <pthread.h>
16125 _ACEOF
16126 if { (eval echo "$as_me:16126: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16127   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16128   ac_status=$?
16129   $EGREP -v '^ *\+' conftest.er1 >conftest.err
16130   rm -f conftest.er1
16131   cat conftest.err >&5
16132   echo "$as_me:16132: \$? = $ac_status" >&5
16133   (exit "$ac_status"); } >/dev/null; then
16134   if test -s conftest.err; then
16135     ac_cpp_err=$ac_c_preproc_warn_flag
16136   else
16137     ac_cpp_err=
16138   fi
16139 else
16140   ac_cpp_err=yes
16141 fi
16142 if test -z "$ac_cpp_err"; then
16143   ac_cv_header_pthread_h=yes
16144 else
16145   echo "$as_me: failed program was:" >&5
16146   cat "conftest.$ac_ext" >&5
16147   ac_cv_header_pthread_h=no
16148 fi
16149 rm -f conftest.err "conftest.$ac_ext"
16150 fi
16151 echo "$as_me:16151: result: $ac_cv_header_pthread_h" >&5
16152 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
16153 if test "$ac_cv_header_pthread_h" = yes; then
16154
16155 cat >>confdefs.h <<\EOF
16156 #define HAVE_PTHREADS_H 1
16157 EOF
16158
16159         for cf_lib_pthread in pthread c_r
16160         do
16161             echo "$as_me:16161: checking if we can link with the $cf_lib_pthread library" >&5
16162 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
16163             cf_save_LIBS="$LIBS"
16164
16165 cf_add_libs="$LIBS"
16166 # reverse order
16167 cf_add_0lib=
16168 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16169 # filter duplicates
16170 for cf_add_1lib in $cf_add_0lib; do
16171         for cf_add_2lib in $cf_add_libs; do
16172                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16173                         cf_add_1lib=
16174                         break
16175                 fi
16176         done
16177         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16178 done
16179 LIBS="$cf_add_libs"
16180
16181             cat >"conftest.$ac_ext" <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16184
16185 #include <pthread.h>
16186
16187 int
16188 main (void)
16189 {
16190
16191                 int rc = pthread_create(0,0,0,0);
16192                 int r2 = pthread_mutexattr_settype(0, 0);
16193
16194   ;
16195   return 0;
16196 }
16197 _ACEOF
16198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16199 if { (eval echo "$as_me:16199: \"$ac_link\"") >&5
16200   (eval $ac_link) 2>&5
16201   ac_status=$?
16202   echo "$as_me:16202: \$? = $ac_status" >&5
16203   (exit "$ac_status"); } &&
16204          { ac_try='test -s "conftest$ac_exeext"'
16205   { (eval echo "$as_me:16205: \"$ac_try\"") >&5
16206   (eval $ac_try) 2>&5
16207   ac_status=$?
16208   echo "$as_me:16208: \$? = $ac_status" >&5
16209   (exit "$ac_status"); }; }; then
16210   with_pthread=yes
16211 else
16212   echo "$as_me: failed program was:" >&5
16213 cat "conftest.$ac_ext" >&5
16214 with_pthread=no
16215 fi
16216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16217             LIBS="$cf_save_LIBS"
16218             echo "$as_me:16218: result: $with_pthread" >&5
16219 echo "${ECHO_T}$with_pthread" >&6
16220             test "$with_pthread" = yes && break
16221         done
16222
16223         if test "$with_pthread" = yes ; then
16224
16225 cf_add_libs="$LIBS"
16226 # reverse order
16227 cf_add_0lib=
16228 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16229 # filter duplicates
16230 for cf_add_1lib in $cf_add_0lib; do
16231         for cf_add_2lib in $cf_add_libs; do
16232                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16233                         cf_add_1lib=
16234                         break
16235                 fi
16236         done
16237         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16238 done
16239 LIBS="$cf_add_libs"
16240
16241 cat >>confdefs.h <<\EOF
16242 #define HAVE_LIBPTHREADS 1
16243 EOF
16244
16245         else
16246             { { echo "$as_me:16246: error: Cannot link with pthread library" >&5
16247 echo "$as_me: error: Cannot link with pthread library" >&2;}
16248    { (exit 1); exit 1; }; }
16249         fi
16250
16251 fi
16252
16253 fi
16254
16255 if test "x$with_pthread" != xno; then
16256         echo "$as_me:16256: checking for pthread_kill" >&5
16257 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
16258 if test "${ac_cv_func_pthread_kill+set}" = set; then
16259   echo $ECHO_N "(cached) $ECHO_C" >&6
16260 else
16261   cat >"conftest.$ac_ext" <<_ACEOF
16262 #line 16262 "configure"
16263 #include "confdefs.h"
16264 #define pthread_kill autoconf_temporary
16265 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
16266 #undef pthread_kill
16267
16268 #ifdef __cplusplus
16269 extern "C"
16270 #endif
16271
16272 /* We use char because int might match the return type of a gcc2
16273    builtin and then its argument prototype would still apply.  */
16274 char pthread_kill (void);
16275
16276 int
16277 main (void)
16278 {
16279
16280 /* The GNU C library defines stubs for functions which it implements
16281     to always fail with ENOSYS.  Some functions are actually named
16282     something starting with __ and the normal name is an alias.  */
16283 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
16284 #error found stub for pthread_kill
16285 #endif
16286
16287         return pthread_kill ();
16288   ;
16289   return 0;
16290 }
16291 _ACEOF
16292 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16293 if { (eval echo "$as_me:16293: \"$ac_link\"") >&5
16294   (eval $ac_link) 2>&5
16295   ac_status=$?
16296   echo "$as_me:16296: \$? = $ac_status" >&5
16297   (exit "$ac_status"); } &&
16298          { ac_try='test -s "conftest$ac_exeext"'
16299   { (eval echo "$as_me:16299: \"$ac_try\"") >&5
16300   (eval $ac_try) 2>&5
16301   ac_status=$?
16302   echo "$as_me:16302: \$? = $ac_status" >&5
16303   (exit "$ac_status"); }; }; then
16304   ac_cv_func_pthread_kill=yes
16305 else
16306   echo "$as_me: failed program was:" >&5
16307 cat "conftest.$ac_ext" >&5
16308 ac_cv_func_pthread_kill=no
16309 fi
16310 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16311 fi
16312 echo "$as_me:16312: result: $ac_cv_func_pthread_kill" >&5
16313 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
16314 if test "$ac_cv_func_pthread_kill" = yes; then
16315
16316                 echo "$as_me:16316: checking if you want to allow EINTR in wgetch with pthreads" >&5
16317 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
16318
16319 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
16320 if test "${enable_pthreads_eintr+set}" = set; then
16321   enableval="$enable_pthreads_eintr"
16322   use_pthreads_eintr=$enableval
16323 else
16324   use_pthreads_eintr=no
16325 fi;
16326                 echo "$as_me:16326: result: $use_pthreads_eintr" >&5
16327 echo "${ECHO_T}$use_pthreads_eintr" >&6
16328                 if test "x$use_pthreads_eintr" = xyes ; then
16329
16330 cat >>confdefs.h <<\EOF
16331 #define USE_PTHREADS_EINTR 1
16332 EOF
16333
16334                 fi
16335 fi
16336
16337         echo "$as_me:16337: checking if you want to use weak-symbols for pthreads" >&5
16338 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16339
16340 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16341 if test "${enable_weak_symbols+set}" = set; then
16342   enableval="$enable_weak_symbols"
16343   use_weak_symbols=$enableval
16344 else
16345   use_weak_symbols=no
16346 fi;
16347         echo "$as_me:16347: result: $use_weak_symbols" >&5
16348 echo "${ECHO_T}$use_weak_symbols" >&6
16349         if test "x$use_weak_symbols" = xyes ; then
16350
16351 echo "$as_me:16351: checking if $CC supports weak symbols" >&5
16352 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16353 if test "${cf_cv_weak_symbols+set}" = set; then
16354   echo $ECHO_N "(cached) $ECHO_C" >&6
16355 else
16356
16357 cat >"conftest.$ac_ext" <<_ACEOF
16358 #line 16358 "configure"
16359 #include "confdefs.h"
16360
16361 #include <stdio.h>
16362 int
16363 main (void)
16364 {
16365
16366 #if defined(__GNUC__)
16367 #  if defined __USE_ISOC99
16368 #    define _cat_pragma(exp)    _Pragma(#exp)
16369 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16370 #  else
16371 #    define _weak_pragma(exp)
16372 #  endif
16373 #  define _declare(name)        __extension__ extern __typeof__(name) name
16374 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16375 #endif
16376
16377 weak_symbol(fopen);
16378
16379   ;
16380   return 0;
16381 }
16382 _ACEOF
16383 rm -f "conftest.$ac_objext"
16384 if { (eval echo "$as_me:16384: \"$ac_compile\"") >&5
16385   (eval $ac_compile) 2>&5
16386   ac_status=$?
16387   echo "$as_me:16387: \$? = $ac_status" >&5
16388   (exit "$ac_status"); } &&
16389          { ac_try='test -s "conftest.$ac_objext"'
16390   { (eval echo "$as_me:16390: \"$ac_try\"") >&5
16391   (eval $ac_try) 2>&5
16392   ac_status=$?
16393   echo "$as_me:16393: \$? = $ac_status" >&5
16394   (exit "$ac_status"); }; }; then
16395   cf_cv_weak_symbols=yes
16396 else
16397   echo "$as_me: failed program was:" >&5
16398 cat "conftest.$ac_ext" >&5
16399 cf_cv_weak_symbols=no
16400 fi
16401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16402
16403 fi
16404 echo "$as_me:16404: result: $cf_cv_weak_symbols" >&5
16405 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16406
16407         else
16408                 cf_cv_weak_symbols=no
16409         fi
16410
16411         if test "x$cf_cv_weak_symbols" = xyes ; then
16412
16413 cat >>confdefs.h <<\EOF
16414 #define USE_WEAK_SYMBOLS 1
16415 EOF
16416
16417         fi
16418 fi
16419
16420 PTHREAD=
16421 if test "x$with_pthread" = "xyes" ; then
16422
16423 cat >>confdefs.h <<\EOF
16424 #define USE_PTHREADS 1
16425 EOF
16426
16427         enable_reentrant=yes
16428         if test "x$cf_cv_weak_symbols" = xyes ; then
16429                 PTHREAD=-lpthread
16430
16431 cf_add_libs="$PRIVATE_LIBS"
16432 # reverse order
16433 cf_add_0lib=
16434 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16435 # filter duplicates
16436 for cf_add_1lib in $cf_add_0lib; do
16437         for cf_add_2lib in $cf_add_libs; do
16438                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16439                         cf_add_1lib=
16440                         break
16441                 fi
16442         done
16443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16444 done
16445 PRIVATE_LIBS="$cf_add_libs"
16446
16447         fi
16448 fi
16449
16450 # Reentrant code has to be opaque; there's little advantage to making ncurses
16451 # opaque outside of that, so there is no --enable-opaque option.  We can use
16452 # this option without --with-pthreads, but this will be always set for
16453 # pthreads.
16454 echo "$as_me:16454: checking if you want reentrant code" >&5
16455 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16456
16457 # Check whether --enable-reentrant or --disable-reentrant was given.
16458 if test "${enable_reentrant+set}" = set; then
16459   enableval="$enable_reentrant"
16460   with_reentrant=$enableval
16461 else
16462   with_reentrant=no
16463 fi;
16464 echo "$as_me:16464: result: $with_reentrant" >&5
16465 echo "${ECHO_T}$with_reentrant" >&6
16466 if test "x$with_reentrant" = xyes ; then
16467         cf_cv_enable_reentrant=1
16468         cf_cv_enable_opaque="NCURSES_INTERNALS"
16469         NCURSES_SIZE_T=int
16470         if test "x$cf_cv_weak_symbols" = xyes ; then
16471
16472 # remove pthread library from $LIBS
16473 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16474
16475 cf_add_libs="$TEST_LIBS"
16476 # reverse order
16477 cf_add_0lib=
16478 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16479 # filter duplicates
16480 for cf_add_1lib in $cf_add_0lib; do
16481         for cf_add_2lib in $cf_add_libs; do
16482                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16483                         cf_add_1lib=
16484                         break
16485                 fi
16486         done
16487         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16488 done
16489 TEST_LIBS="$cf_add_libs"
16490
16491 cf_add_libs="$TEST_LIBS2"
16492 # reverse order
16493 cf_add_0lib=
16494 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16495 # filter duplicates
16496 for cf_add_1lib in $cf_add_0lib; do
16497         for cf_add_2lib in $cf_add_libs; do
16498                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16499                         cf_add_1lib=
16500                         break
16501                 fi
16502         done
16503         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16504 done
16505 TEST_LIBS2="$cf_add_libs"
16506
16507 cf_add_libs="$PRIVATE_LIBS"
16508 # reverse order
16509 cf_add_0lib=
16510 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16511 # filter duplicates
16512 for cf_add_1lib in $cf_add_0lib; do
16513         for cf_add_2lib in $cf_add_libs; do
16514                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16515                         cf_add_1lib=
16516                         break
16517                 fi
16518         done
16519         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16520 done
16521 PRIVATE_LIBS="$cf_add_libs"
16522
16523         else
16524                 # when not using weak symbols but with_reentrant,
16525                 # add 't' to the library suffix on all platforms
16526                 # except cygwin, where we only do that if ALSO
16527                 # compiling with full thread support.
16528                 case "$host" in
16529                 (*cygwin* | *msys*)
16530                         if test "$with_pthread" = "yes" ; then
16531                                 if test "x$disable_lib_suffixes" = "xno" ; then
16532                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16533                                 fi
16534                         fi ;;
16535                 (*)
16536                         if test "x$disable_lib_suffixes" = "xno" ; then
16537                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16538                         fi
16539                         ;;
16540                 esac
16541         fi
16542
16543 cat >>confdefs.h <<\EOF
16544 #define USE_REENTRANT 1
16545 EOF
16546
16547 if test "${with_abi_version+set}" != set; then
16548         case "$cf_cv_rel_version" in
16549         (5.*)
16550                 cf_cv_rel_version=6.0
16551                 cf_cv_abi_version=6
16552                 cf_cv_abi_default=6
16553                 { echo "$as_me:16553: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16554 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16555                 ;;
16556         esac
16557 fi
16558
16559 else
16560         cf_cv_enable_reentrant=0
16561         cf_cv_enable_opaque="NCURSES_OPAQUE"
16562         NCURSES_SIZE_T=$cf_dft_ordinate_type
16563 fi
16564
16565 echo "$as_me:16565: checking whether curses library structures should be opaque" >&5
16566 echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16567
16568 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16569 if test "${enable_opaque_curses+set}" = set; then
16570   enableval="$enable_opaque_curses"
16571   test "$enableval" != no && enableval=yes
16572         if test "$enableval" != "yes" ; then
16573     enable_opaque_curses=no
16574         else
16575
16576          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16577          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16578
16579         fi
16580 else
16581   enableval=yes
16582
16583          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16584          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16585
16586 fi;
16587 echo "$as_me:16587: result: $enable_opaque_curses" >&5
16588 echo "${ECHO_T}$enable_opaque_curses" >&6
16589
16590 test "$cf_cv_enable_reentrant" = 1 && \
16591 test "$enable_opaque_curses" = no && \
16592 { { echo "$as_me:16592: error: reentrant configuration requires opaque library" >&5
16593 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16594    { (exit 1); exit 1; }; }
16595
16596 echo "$as_me:16596: checking whether form library structures should be opaque" >&5
16597 echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16598
16599 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16600 if test "${enable_opaque_form+set}" = set; then
16601   enableval="$enable_opaque_form"
16602   test "$enableval" != no && enableval=yes
16603         if test "$enableval" != "yes" ; then
16604     enable_opaque_form=no
16605         else
16606                 enable_opaque_form=$cf_dft_opaque_curses
16607         fi
16608 else
16609   enableval=yes
16610         enable_opaque_form=$cf_dft_opaque_curses
16611
16612 fi;
16613 echo "$as_me:16613: result: $enable_opaque_form" >&5
16614 echo "${ECHO_T}$enable_opaque_form" >&6
16615
16616 echo "$as_me:16616: checking whether menu library structures should be opaque" >&5
16617 echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16618
16619 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16620 if test "${enable_opaque_menu+set}" = set; then
16621   enableval="$enable_opaque_menu"
16622   test "$enableval" != no && enableval=yes
16623         if test "$enableval" != "yes" ; then
16624     enable_opaque_menu=no
16625         else
16626                 enable_opaque_menu=$cf_dft_opaque_curses
16627         fi
16628 else
16629   enableval=yes
16630         enable_opaque_menu=$cf_dft_opaque_curses
16631
16632 fi;
16633 echo "$as_me:16633: result: $enable_opaque_menu" >&5
16634 echo "${ECHO_T}$enable_opaque_menu" >&6
16635
16636 echo "$as_me:16636: checking whether panel library structures should be opaque" >&5
16637 echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16638
16639 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16640 if test "${enable_opaque_panel+set}" = set; then
16641   enableval="$enable_opaque_panel"
16642   test "$enableval" != no && enableval=yes
16643         if test "$enableval" != "yes" ; then
16644     enable_opaque_panel=no
16645         else
16646                 enable_opaque_panel=$cf_dft_opaque_curses
16647         fi
16648 else
16649   enableval=yes
16650         enable_opaque_panel=$cf_dft_opaque_curses
16651
16652 fi;
16653 echo "$as_me:16653: result: $enable_opaque_panel" >&5
16654 echo "${ECHO_T}$enable_opaque_panel" >&6
16655
16656 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16657 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16658 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16659 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16660
16661 ### Allow using a different wrap-prefix
16662 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16663         echo "$as_me:16663: checking for prefix used to wrap public variables" >&5
16664 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16665
16666 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16667 if test "${with_wrap_prefix+set}" = set; then
16668   withval="$with_wrap_prefix"
16669   NCURSES_WRAP_PREFIX=$withval
16670 else
16671   NCURSES_WRAP_PREFIX=_nc_
16672 fi;
16673         echo "$as_me:16673: result: $NCURSES_WRAP_PREFIX" >&5
16674 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16675 else
16676         NCURSES_WRAP_PREFIX=_nc_
16677 fi
16678
16679 cat >>confdefs.h <<EOF
16680 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16681 EOF
16682
16683 ###############################################################################
16684 # These options are relatively safe to experiment with.
16685
16686 echo "$as_me:16686: checking if you want all development code" >&5
16687 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16688
16689 # Check whether --with-develop or --without-develop was given.
16690 if test "${with_develop+set}" = set; then
16691   withval="$with_develop"
16692   with_develop=$withval
16693 else
16694   with_develop=no
16695 fi;
16696 echo "$as_me:16696: result: $with_develop" >&5
16697 echo "${ECHO_T}$with_develop" >&6
16698
16699 ###   use option --enable-check-size to detect screensize with CPR
16700 echo "$as_me:16700: checking if you want to check screensize of serial terminals" >&5
16701 echo $ECHO_N "checking if you want to check screensize of serial terminals... $ECHO_C" >&6
16702
16703 # Check whether --enable-check-size or --disable-check-size was given.
16704 if test "${enable_check_size+set}" = set; then
16705   enableval="$enable_check_size"
16706
16707 else
16708   enable_check_size=$with_develop
16709 fi;
16710 echo "$as_me:16710: result: $enable_check_size" >&5
16711 echo "${ECHO_T}$enable_check_size" >&6
16712 test "x$enable_check_size" = xyes &&
16713 cat >>confdefs.h <<\EOF
16714 #define USE_CHECK_SIZE 1
16715 EOF
16716
16717 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16718 echo "$as_me:16718: checking if you want hard-tabs code" >&5
16719 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16720
16721 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16722 if test "${enable_hard_tabs+set}" = set; then
16723   enableval="$enable_hard_tabs"
16724
16725 else
16726   enable_hard_tabs=$with_develop
16727 fi;
16728 echo "$as_me:16728: result: $enable_hard_tabs" >&5
16729 echo "${ECHO_T}$enable_hard_tabs" >&6
16730 test "x$enable_hard_tabs" = xyes &&
16731 cat >>confdefs.h <<\EOF
16732 #define USE_HARD_TABS 1
16733 EOF
16734
16735 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16736 echo "$as_me:16736: checking if you want limited support for xmc" >&5
16737 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16738
16739 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16740 if test "${enable_xmc_glitch+set}" = set; then
16741   enableval="$enable_xmc_glitch"
16742
16743 else
16744   enable_xmc_glitch=$with_develop
16745 fi;
16746 echo "$as_me:16746: result: $enable_xmc_glitch" >&5
16747 echo "${ECHO_T}$enable_xmc_glitch" >&6
16748 test "x$enable_xmc_glitch" = xyes &&
16749 cat >>confdefs.h <<\EOF
16750 #define USE_XMC_SUPPORT 1
16751 EOF
16752
16753 ###############################################################################
16754 # These are just experimental, probably should not be in a package:
16755
16756 echo "$as_me:16756: checking if you do not want to assume colors are white-on-black" >&5
16757 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16758
16759 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16760 if test "${enable_assumed_color+set}" = set; then
16761   enableval="$enable_assumed_color"
16762   with_assumed_color=$enableval
16763 else
16764   with_assumed_color=yes
16765 fi;
16766 echo "$as_me:16766: result: $with_assumed_color" >&5
16767 echo "${ECHO_T}$with_assumed_color" >&6
16768 test "x$with_assumed_color" = xyes &&
16769 cat >>confdefs.h <<\EOF
16770 #define USE_ASSUMED_COLOR 1
16771 EOF
16772
16773 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16774 echo "$as_me:16774: checking if you want hashmap scrolling-optimization code" >&5
16775 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16776
16777 # Check whether --enable-hashmap or --disable-hashmap was given.
16778 if test "${enable_hashmap+set}" = set; then
16779   enableval="$enable_hashmap"
16780   with_hashmap=$enableval
16781 else
16782   with_hashmap=yes
16783 fi;
16784 echo "$as_me:16784: result: $with_hashmap" >&5
16785 echo "${ECHO_T}$with_hashmap" >&6
16786 test "x$with_hashmap" = xyes &&
16787 cat >>confdefs.h <<\EOF
16788 #define USE_HASHMAP 1
16789 EOF
16790
16791 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16792 echo "$as_me:16792: checking if you want colorfgbg code" >&5
16793 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16794
16795 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16796 if test "${enable_colorfgbg+set}" = set; then
16797   enableval="$enable_colorfgbg"
16798   with_colorfgbg=$enableval
16799 else
16800   with_colorfgbg=no
16801 fi;
16802 echo "$as_me:16802: result: $with_colorfgbg" >&5
16803 echo "${ECHO_T}$with_colorfgbg" >&6
16804 test "x$with_colorfgbg" = xyes &&
16805 cat >>confdefs.h <<\EOF
16806 #define USE_COLORFGBG 1
16807 EOF
16808
16809 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16810 echo "$as_me:16810: checking if you want to use gcc -fvisibility option" >&5
16811 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16812
16813 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16814 if test "${enable_fvisibility+set}" = set; then
16815   enableval="$enable_fvisibility"
16816   cf_with_fvisibility=$enableval
16817 else
16818   cf_with_fvisibility=no
16819 fi;
16820 echo "$as_me:16820: result: $cf_with_fvisibility" >&5
16821 echo "${ECHO_T}$cf_with_fvisibility" >&6
16822
16823 NCURSES_IMPEXP=
16824 NCURSES_CXX_IMPEXP=
16825 if test "x$cf_with_fvisibility" = xyes; then
16826
16827 echo "$as_me:16827: checking if $CC -fvisibility=hidden option works" >&5
16828 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16829 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16830   echo $ECHO_N "(cached) $ECHO_C" >&6
16831 else
16832
16833     cf_save_cflags="$CFLAGS"
16834     CFLAGS="$CFLAGS -fvisibility=hidden"
16835     cat >"conftest.$ac_ext" <<_ACEOF
16836 #line 16836 "configure"
16837 #include "confdefs.h"
16838
16839 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16840
16841 int
16842 main (void)
16843 {
16844
16845         if (somefunc()) return 1;
16846
16847   ;
16848   return 0;
16849 }
16850 _ACEOF
16851 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16852 if { (eval echo "$as_me:16852: \"$ac_link\"") >&5
16853   (eval $ac_link) 2>&5
16854   ac_status=$?
16855   echo "$as_me:16855: \$? = $ac_status" >&5
16856   (exit "$ac_status"); } &&
16857          { ac_try='test -s "conftest$ac_exeext"'
16858   { (eval echo "$as_me:16858: \"$ac_try\"") >&5
16859   (eval $ac_try) 2>&5
16860   ac_status=$?
16861   echo "$as_me:16861: \$? = $ac_status" >&5
16862   (exit "$ac_status"); }; }; then
16863   cf_cv_fvisibility_hidden=yes
16864 else
16865   echo "$as_me: failed program was:" >&5
16866 cat "conftest.$ac_ext" >&5
16867 cf_cv_fvisibility_hidden=no
16868 fi
16869 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16870     CFLAGS=$cf_save_cflags
16871
16872 fi
16873 echo "$as_me:16873: result: $cf_cv_fvisibility_hidden" >&5
16874 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16875
16876         if test "x$cf_cv_fvisibility_hidden" = xyes
16877         then
16878
16879 cf_fix_cppflags=no
16880 cf_new_cflags=
16881 cf_new_cppflags=
16882 cf_new_extra_cppflags=
16883
16884 for cf_add_cflags in -fvisibility=hidden
16885 do
16886 case "$cf_fix_cppflags" in
16887 (no)
16888         case "$cf_add_cflags" in
16889         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16890                 case "$cf_add_cflags" in
16891                 (-D*)
16892                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16893
16894                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16895                                 && test -z "${cf_tst_cflags}" \
16896                                 && cf_fix_cppflags=yes
16897
16898                         if test "$cf_fix_cppflags" = yes ; then
16899
16900         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16901         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16902
16903                                 continue
16904                         elif test "${cf_tst_cflags}" = "\"'" ; then
16905
16906         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16907         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16908
16909                                 continue
16910                         fi
16911                         ;;
16912                 esac
16913                 case "$CPPFLAGS" in
16914                 (*$cf_add_cflags)
16915                         ;;
16916                 (*)
16917                         case "$cf_add_cflags" in
16918                         (-D*)
16919                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16920
16921 CPPFLAGS=`echo "$CPPFLAGS" | \
16922         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16923                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16924
16925                                 ;;
16926                         esac
16927
16928         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16929         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16930
16931                         ;;
16932                 esac
16933                 ;;
16934         (*)
16935
16936         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16937         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16938
16939                 ;;
16940         esac
16941         ;;
16942 (yes)
16943
16944         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16945         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16946
16947         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16948
16949         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16950                 && test -z "${cf_tst_cflags}" \
16951                 && cf_fix_cppflags=no
16952         ;;
16953 esac
16954 done
16955
16956 if test -n "$cf_new_cflags" ; then
16957
16958         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16959         CFLAGS="${CFLAGS}$cf_new_cflags"
16960
16961 fi
16962
16963 if test -n "$cf_new_cppflags" ; then
16964
16965         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16966         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16967
16968 fi
16969
16970 if test -n "$cf_new_extra_cppflags" ; then
16971
16972         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16973         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16974
16975 fi
16976
16977                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16978         fi
16979         if test -n "$CXX"
16980         then
16981                 ac_ext=cc
16982 ac_cpp='$CXXCPP $CPPFLAGS'
16983 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16984 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16985 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16986 ac_main_return="return"
16987
16988 echo "$as_me:16988: checking if $CXX -fvisibility=hidden option works" >&5
16989 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16990 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16991   echo $ECHO_N "(cached) $ECHO_C" >&6
16992 else
16993
16994     cf_save_cflags="$CXXFLAGS"
16995     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16996     cat >"conftest.$ac_ext" <<_ACEOF
16997 #line 16997 "configure"
16998 #include "confdefs.h"
16999
17000 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
17001
17002 int
17003 main (void)
17004 {
17005
17006         if (somefunc()) return 1;
17007
17008   ;
17009   return 0;
17010 }
17011 _ACEOF
17012 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17013 if { (eval echo "$as_me:17013: \"$ac_link\"") >&5
17014   (eval $ac_link) 2>&5
17015   ac_status=$?
17016   echo "$as_me:17016: \$? = $ac_status" >&5
17017   (exit "$ac_status"); } &&
17018          { ac_try='test -s "conftest$ac_exeext"'
17019   { (eval echo "$as_me:17019: \"$ac_try\"") >&5
17020   (eval $ac_try) 2>&5
17021   ac_status=$?
17022   echo "$as_me:17022: \$? = $ac_status" >&5
17023   (exit "$ac_status"); }; }; then
17024   cf_cv_fvisibility_hidden2=yes
17025 else
17026   echo "$as_me: failed program was:" >&5
17027 cat "conftest.$ac_ext" >&5
17028 cf_cv_fvisibility_hidden2=no
17029 fi
17030 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17031     CXXFLAGS=$cf_save_cflags
17032
17033 fi
17034 echo "$as_me:17034: result: $cf_cv_fvisibility_hidden2" >&5
17035 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
17036
17037                 if test "x$cf_cv_fvisibility_hidden2" = xyes
17038                 then
17039
17040 cf_save_CXXFLAGS="$CFLAGS"
17041 CFLAGS="$CXXFLAGS"
17042
17043 cf_fix_cppflags=no
17044 cf_new_cflags=
17045 cf_new_cppflags=
17046 cf_new_extra_cppflags=
17047
17048 for cf_add_cflags in -fvisibility=hidden
17049 do
17050 case "$cf_fix_cppflags" in
17051 (no)
17052         case "$cf_add_cflags" in
17053         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17054                 case "$cf_add_cflags" in
17055                 (-D*)
17056                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17057
17058                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17059                                 && test -z "${cf_tst_cflags}" \
17060                                 && cf_fix_cppflags=yes
17061
17062                         if test "$cf_fix_cppflags" = yes ; then
17063
17064         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17065         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17066
17067                                 continue
17068                         elif test "${cf_tst_cflags}" = "\"'" ; then
17069
17070         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17071         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17072
17073                                 continue
17074                         fi
17075                         ;;
17076                 esac
17077                 case "$CPPFLAGS" in
17078                 (*$cf_add_cflags)
17079                         ;;
17080                 (*)
17081                         case "$cf_add_cflags" in
17082                         (-D*)
17083                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17084
17085 CPPFLAGS=`echo "$CPPFLAGS" | \
17086         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17087                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17088
17089                                 ;;
17090                         esac
17091
17092         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17093         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17094
17095                         ;;
17096                 esac
17097                 ;;
17098         (*)
17099
17100         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17101         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17102
17103                 ;;
17104         esac
17105         ;;
17106 (yes)
17107
17108         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17109         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17110
17111         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17112
17113         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17114                 && test -z "${cf_tst_cflags}" \
17115                 && cf_fix_cppflags=no
17116         ;;
17117 esac
17118 done
17119
17120 if test -n "$cf_new_cflags" ; then
17121
17122         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17123         CFLAGS="${CFLAGS}$cf_new_cflags"
17124
17125 fi
17126
17127 if test -n "$cf_new_cppflags" ; then
17128
17129         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17130         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17131
17132 fi
17133
17134 if test -n "$cf_new_extra_cppflags" ; then
17135
17136         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17137         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17138
17139 fi
17140
17141 CXXFLAGS="$CFLAGS"
17142 CFLAGS="$cf_save_CXXFLAGS"
17143
17144                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
17145                 fi
17146                 ac_ext=c
17147 ac_cpp='$CPP $CPPFLAGS'
17148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17151 ac_main_return="return"
17152
17153         fi
17154 fi
17155
17156 ###   use option --enable-interop to turn on use of bindings used for interop
17157 echo "$as_me:17157: checking if you want interop bindings" >&5
17158 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
17159
17160 # Check whether --enable-interop or --disable-interop was given.
17161 if test "${enable_interop+set}" = set; then
17162   enableval="$enable_interop"
17163   with_exp_interop=$enableval
17164 else
17165   with_exp_interop=$cf_dft_interop
17166 fi;
17167 echo "$as_me:17167: result: $with_exp_interop" >&5
17168 echo "${ECHO_T}$with_exp_interop" >&6
17169
17170 NCURSES_INTEROP_FUNCS=0
17171 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
17172
17173 echo "$as_me:17173: checking if you want experimental safe-sprintf code" >&5
17174 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
17175
17176 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
17177 if test "${enable_safe_sprintf+set}" = set; then
17178   enableval="$enable_safe_sprintf"
17179   with_safe_sprintf=$enableval
17180 else
17181   with_safe_sprintf=no
17182 fi;
17183 echo "$as_me:17183: result: $with_safe_sprintf" >&5
17184 echo "${ECHO_T}$with_safe_sprintf" >&6
17185
17186 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
17187 # when hashmap is used scroll hints are useless
17188 if test "$with_hashmap" = no ; then
17189 echo "$as_me:17189: checking if you want to experiment without scrolling-hints code" >&5
17190 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
17191
17192 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
17193 if test "${enable_scroll_hints+set}" = set; then
17194   enableval="$enable_scroll_hints"
17195   with_scroll_hints=$enableval
17196 else
17197   with_scroll_hints=yes
17198 fi;
17199 echo "$as_me:17199: result: $with_scroll_hints" >&5
17200 echo "${ECHO_T}$with_scroll_hints" >&6
17201 test "x$with_scroll_hints" = xyes &&
17202 cat >>confdefs.h <<\EOF
17203 #define USE_SCROLL_HINTS 1
17204 EOF
17205
17206 fi
17207
17208 echo "$as_me:17208: checking if you want wgetch-events code" >&5
17209 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
17210
17211 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
17212 if test "${enable_wgetch_events+set}" = set; then
17213   enableval="$enable_wgetch_events"
17214   with_wgetch_events=$enableval
17215 else
17216   with_wgetch_events=no
17217 fi;
17218 echo "$as_me:17218: result: $with_wgetch_events" >&5
17219 echo "${ECHO_T}$with_wgetch_events" >&6
17220 if test "x$with_wgetch_events" = xyes ; then
17221
17222 cat >>confdefs.h <<\EOF
17223 #define NCURSES_WGETCH_EVENTS 1
17224 EOF
17225
17226         NCURSES_WGETCH_EVENTS=1
17227 else
17228         NCURSES_WGETCH_EVENTS=0
17229 fi
17230
17231 case "$cf_cv_system_name" in
17232 (*mingw32*|*mingw64*|*-msvc*)
17233         echo "$as_me:17233: checking if you want experimental-Windows driver" >&5
17234 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
17235
17236 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
17237 if test "${enable_exp_win32+set}" = set; then
17238   enableval="$enable_exp_win32"
17239   with_exp_win32=$enableval
17240 else
17241   with_exp_win32=no
17242 fi;
17243         echo "$as_me:17243: result: $with_exp_win32" >&5
17244 echo "${ECHO_T}$with_exp_win32" >&6
17245         if test "x$with_exp_win32" = xyes
17246         then
17247
17248 cat >>confdefs.h <<\EOF
17249 #define EXP_WIN32_DRIVER 1
17250 EOF
17251
17252                 EXP_WIN32_DRIVER=1
17253                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
17254         else
17255                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
17256                 EXP_WIN32_DRIVER=0
17257         fi
17258         ;;
17259 (*)
17260         EXP_WIN32_DRIVER=0
17261         INTERNALS_HDR=
17262         ;;
17263 esac
17264
17265 ###############################################################################
17266
17267 ###     use option --disable-echo to suppress full display compiling commands
17268
17269 echo "$as_me:17269: checking if you want to see long compiling messages" >&5
17270 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
17271
17272 # Check whether --enable-echo or --disable-echo was given.
17273 if test "${enable_echo+set}" = set; then
17274   enableval="$enable_echo"
17275   test "$enableval" != no && enableval=yes
17276         if test "$enableval" != "yes" ; then
17277
17278         ECHO_LT='--silent'
17279         ECHO_LD='@echo linking $@;'
17280         RULE_CC='@echo compiling $<'
17281         SHOW_CC='@echo compiling $@'
17282         ECHO_CC='@'
17283
17284         else
17285
17286         ECHO_LT=''
17287         ECHO_LD=''
17288         RULE_CC=''
17289         SHOW_CC=''
17290         ECHO_CC=''
17291
17292         fi
17293 else
17294   enableval=yes
17295
17296         ECHO_LT=''
17297         ECHO_LD=''
17298         RULE_CC=''
17299         SHOW_CC=''
17300         ECHO_CC=''
17301
17302 fi;
17303 echo "$as_me:17303: result: $enableval" >&5
17304 echo "${ECHO_T}$enableval" >&6
17305
17306 if test "x$enable_echo" = xyes; then
17307         ECHO_LINK=
17308 else
17309         ECHO_LINK='@ echo linking $@ ... ;'
17310         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
17311         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
17312 fi
17313
17314 # --disable-stripping is used for debugging
17315
17316 echo "$as_me:17316: checking if you want to install stripped executables" >&5
17317 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
17318
17319 # Check whether --enable-stripping or --disable-stripping was given.
17320 if test "${enable_stripping+set}" = set; then
17321   enableval="$enable_stripping"
17322   test "$enableval" != no && enableval=yes
17323         if test "$enableval" != "yes" ; then
17324     enable_stripping=no
17325         else
17326                 enable_stripping=yes
17327         fi
17328 else
17329   enableval=yes
17330         enable_stripping=yes
17331
17332 fi;
17333 echo "$as_me:17333: result: $enable_stripping" >&5
17334 echo "${ECHO_T}$enable_stripping" >&6
17335
17336 if test "$enable_stripping" = yes
17337 then
17338         INSTALL_OPT_S="-s"
17339 else
17340         INSTALL_OPT_S=
17341 fi
17342
17343 : "${INSTALL:=install}"
17344 echo "$as_me:17344: checking if install accepts -p option" >&5
17345 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
17346 if test "${cf_cv_install_p+set}" = set; then
17347   echo $ECHO_N "(cached) $ECHO_C" >&6
17348 else
17349
17350         rm -rf ./conftest*
17351         date >conftest.in
17352         mkdir conftest.out
17353         sleep 3
17354         if $INSTALL -p conftest.in conftest.out 2>/dev/null
17355         then
17356                 if test -f conftest.out/conftest.in
17357                 then
17358                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17359                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17360                         if test -s conftest.err
17361                         then
17362                                 cf_cv_install_p=no
17363                         else
17364                                 cf_cv_install_p=yes
17365                         fi
17366                 else
17367                         cf_cv_install_p=no
17368                 fi
17369         else
17370                 cf_cv_install_p=no
17371         fi
17372         rm -rf ./conftest*
17373
17374 fi
17375 echo "$as_me:17375: result: $cf_cv_install_p" >&5
17376 echo "${ECHO_T}$cf_cv_install_p" >&6
17377
17378 echo "$as_me:17378: checking if install needs to be told about ownership" >&5
17379 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17380 case `$ac_config_guess` in
17381 (*minix)
17382         with_install_o=yes
17383         ;;
17384 (*)
17385         with_install_o=no
17386         ;;
17387 esac
17388
17389 echo "$as_me:17389: result: $with_install_o" >&5
17390 echo "${ECHO_T}$with_install_o" >&6
17391 if test "x$with_install_o" = xyes
17392 then
17393         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'`"
17394 else
17395         INSTALL_OPT_O=
17396 fi
17397
17398 if test -n "$INSTALL_OPT_S"
17399 then
17400         echo "$as_me:17400: checking if you want to specify strip-program" >&5
17401 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17402
17403 # Check whether --with-strip-program or --without-strip-program was given.
17404 if test "${with_strip_program+set}" = set; then
17405   withval="$with_strip_program"
17406   with_strip_program=$withval
17407 else
17408   with_strip_program=no
17409 fi;
17410         echo "$as_me:17410: result: $with_strip_program" >&5
17411 echo "${ECHO_T}$with_strip_program" >&6
17412         if test "$with_strip_program" != no
17413         then
17414                 echo "$as_me:17414: checking if strip-program is supported with this installer" >&5
17415 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17416                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17417                 check_install_strip=no
17418                 if test -f "$cf_install_program"
17419                 then
17420                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17421                         if test -n "$check_install_version"
17422                         then
17423                                 check_install_strip="option"
17424                         else
17425                                 for check_strip_variable in STRIPBIN STRIP
17426                                 do
17427                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17428                                         then
17429                                                 check_install_strip="environ"
17430                                                 break
17431                                         fi
17432                                 done
17433                         fi
17434                 fi
17435                 echo "$as_me:17435: result: $check_install_strip" >&5
17436 echo "${ECHO_T}$check_install_strip" >&6
17437                 case "$check_install_strip" in
17438                 (no)
17439                         { echo "$as_me:17439: WARNING: $cf_install_program does not support strip program option" >&5
17440 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17441                         with_strip_program=no
17442                         ;;
17443                 (environ)
17444                         cat >install.tmp <<-CF_EOF
17445                         #! $SHELL
17446                         STRIPBIN="$with_strip_program" \\
17447                         STRIP="$with_strip_program" \\
17448                         $INSTALL "$@"
17449                         CF_EOF
17450                         INSTALL="`pwd`/install.tmp"
17451                         chmod +x "$INSTALL"
17452                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17453
17454 echo "${as_me:-configure}:17454: testing created $INSTALL ..." 1>&5
17455
17456                         ;;
17457                 (option)
17458                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17459                         ;;
17460                 esac
17461         fi
17462 fi
17463
17464 # If we're avoiding relinking of shared libraries during install, that is to
17465 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17466 # the install program has "-p" (for preserving timestamps).
17467 cf_cv_do_reranlib=yes
17468 if test "x$cf_cv_install_p" = xyes
17469 then
17470         if test "x$cf_cv_do_relink" != xyes
17471         then
17472                 cf_cv_do_reranlib=no
17473                 INSTALL_OPT_P="-p"
17474                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17475         fi
17476 fi
17477
17478 ###     use option --enable-warnings to turn on all gcc warnings
17479
17480 echo "$as_me:17480: checking if you want to use C11 _Noreturn feature" >&5
17481 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17482
17483 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17484 if test "${enable_stdnoreturn+set}" = set; then
17485   enableval="$enable_stdnoreturn"
17486   test "$enableval" != yes && enableval=no
17487         if test "$enableval" != "no" ; then
17488     enable_stdnoreturn=yes
17489         else
17490                 enable_stdnoreturn=no
17491         fi
17492 else
17493   enableval=no
17494         enable_stdnoreturn=no
17495
17496 fi;
17497 echo "$as_me:17497: result: $enable_stdnoreturn" >&5
17498 echo "${ECHO_T}$enable_stdnoreturn" >&6
17499
17500 if test $enable_stdnoreturn = yes; then
17501 echo "$as_me:17501: checking for C11 _Noreturn feature" >&5
17502 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17503 if test "${cf_cv_c11_noreturn+set}" = set; then
17504   echo $ECHO_N "(cached) $ECHO_C" >&6
17505 else
17506   cat >"conftest.$ac_ext" <<_ACEOF
17507 #line 17507 "configure"
17508 #include "confdefs.h"
17509
17510 $ac_includes_default
17511 #include <stdnoreturn.h>
17512 static _Noreturn void giveup(void) { exit(0); }
17513
17514 int
17515 main (void)
17516 {
17517 if (feof(stdin)) giveup()
17518   ;
17519   return 0;
17520 }
17521 _ACEOF
17522 rm -f "conftest.$ac_objext"
17523 if { (eval echo "$as_me:17523: \"$ac_compile\"") >&5
17524   (eval $ac_compile) 2>&5
17525   ac_status=$?
17526   echo "$as_me:17526: \$? = $ac_status" >&5
17527   (exit "$ac_status"); } &&
17528          { ac_try='test -s "conftest.$ac_objext"'
17529   { (eval echo "$as_me:17529: \"$ac_try\"") >&5
17530   (eval $ac_try) 2>&5
17531   ac_status=$?
17532   echo "$as_me:17532: \$? = $ac_status" >&5
17533   (exit "$ac_status"); }; }; then
17534   cf_cv_c11_noreturn=yes
17535 else
17536   echo "$as_me: failed program was:" >&5
17537 cat "conftest.$ac_ext" >&5
17538 cf_cv_c11_noreturn=no
17539 fi
17540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17541
17542 fi
17543 echo "$as_me:17543: result: $cf_cv_c11_noreturn" >&5
17544 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17545 else
17546         cf_cv_c11_noreturn=no,
17547 fi
17548
17549 if test "$cf_cv_c11_noreturn" = yes; then
17550
17551 cat >>confdefs.h <<\EOF
17552 #define HAVE_STDNORETURN_H 1
17553 EOF
17554
17555 cat >>confdefs.h <<EOF
17556 #define STDC_NORETURN _Noreturn
17557 EOF
17558
17559         HAVE_STDNORETURN_H=1
17560 else
17561         HAVE_STDNORETURN_H=0
17562 fi
17563
17564 if test "$GCC" = yes || test "$GXX" = yes
17565 then
17566
17567 if test "$GCC" = yes || test "$GXX" = yes
17568 then
17569         case $CFLAGS in
17570         (*-Werror=*)
17571                 cf_temp_flags=
17572                 for cf_temp_scan in $CFLAGS
17573                 do
17574                         case "x$cf_temp_scan" in
17575                         (x-Werror=format*)
17576
17577         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17578         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17579
17580                                 ;;
17581                         (x-Werror=*)
17582
17583         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17584         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17585
17586                                 ;;
17587                         (*)
17588
17589         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17590         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17591
17592                                 ;;
17593                         esac
17594                 done
17595                 if test "x$CFLAGS" != "x$cf_temp_flags"
17596                 then
17597                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17598
17599 echo "${as_me:-configure}:17599: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17600
17601                         CFLAGS="$cf_temp_flags"
17602                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17603
17604 echo "${as_me:-configure}:17604: testing ... fixed $CFLAGS ..." 1>&5
17605
17606                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17607
17608 echo "${as_me:-configure}:17608: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17609
17610                 fi
17611                 ;;
17612         esac
17613 fi
17614
17615 if test "$GCC" = yes || test "$GXX" = yes
17616 then
17617         case $CPPFLAGS in
17618         (*-Werror=*)
17619                 cf_temp_flags=
17620                 for cf_temp_scan in $CPPFLAGS
17621                 do
17622                         case "x$cf_temp_scan" in
17623                         (x-Werror=format*)
17624
17625         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17626         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17627
17628                                 ;;
17629                         (x-Werror=*)
17630
17631         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17632         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17633
17634                                 ;;
17635                         (*)
17636
17637         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17638         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17639
17640                                 ;;
17641                         esac
17642                 done
17643                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17644                 then
17645                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17646
17647 echo "${as_me:-configure}:17647: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17648
17649                         CPPFLAGS="$cf_temp_flags"
17650                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17651
17652 echo "${as_me:-configure}:17652: testing ... fixed $CPPFLAGS ..." 1>&5
17653
17654                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17655
17656 echo "${as_me:-configure}:17656: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17657
17658                 fi
17659                 ;;
17660         esac
17661 fi
17662
17663 if test "$GCC" = yes || test "$GXX" = yes
17664 then
17665         case $LDFLAGS in
17666         (*-Werror=*)
17667                 cf_temp_flags=
17668                 for cf_temp_scan in $LDFLAGS
17669                 do
17670                         case "x$cf_temp_scan" in
17671                         (x-Werror=format*)
17672
17673         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17674         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17675
17676                                 ;;
17677                         (x-Werror=*)
17678
17679         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17680         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17681
17682                                 ;;
17683                         (*)
17684
17685         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17686         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17687
17688                                 ;;
17689                         esac
17690                 done
17691                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17692                 then
17693                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17694
17695 echo "${as_me:-configure}:17695: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17696
17697                         LDFLAGS="$cf_temp_flags"
17698                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17699
17700 echo "${as_me:-configure}:17700: testing ... fixed $LDFLAGS ..." 1>&5
17701
17702                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17703
17704 echo "${as_me:-configure}:17704: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17705
17706                 fi
17707                 ;;
17708         esac
17709 fi
17710
17711 echo "$as_me:17711: checking if you want to turn on gcc warnings" >&5
17712 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17713
17714 # Check whether --enable-warnings or --disable-warnings was given.
17715 if test "${enable_warnings+set}" = set; then
17716   enableval="$enable_warnings"
17717   test "$enableval" != yes && enableval=no
17718         if test "$enableval" != "no" ; then
17719     enable_warnings=yes
17720         else
17721                 enable_warnings=no
17722         fi
17723 else
17724   enableval=no
17725         enable_warnings=no
17726
17727 fi;
17728 echo "$as_me:17728: result: $enable_warnings" >&5
17729 echo "${ECHO_T}$enable_warnings" >&6
17730 if test "$enable_warnings" = "yes"
17731 then
17732
17733 if test "x$have_x" = xyes; then
17734
17735 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17736 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17737 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17738 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17739 for cf_X_CFLAGS in $X_CFLAGS
17740 do
17741         case "x$cf_X_CFLAGS" in
17742         x-[IUD]*)
17743                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17744                 ;;
17745         *)
17746                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17747                 ;;
17748         esac
17749 done
17750
17751 cat >"conftest.$ac_ext" <<_ACEOF
17752 #line 17752 "configure"
17753 #include "confdefs.h"
17754
17755 #include <stdlib.h>
17756 #include <X11/Intrinsic.h>
17757
17758 int
17759 main (void)
17760 {
17761 String foo = malloc(1); free((void*)foo)
17762   ;
17763   return 0;
17764 }
17765 _ACEOF
17766 rm -f "conftest.$ac_objext"
17767 if { (eval echo "$as_me:17767: \"$ac_compile\"") >&5
17768   (eval $ac_compile) 2>&5
17769   ac_status=$?
17770   echo "$as_me:17770: \$? = $ac_status" >&5
17771   (exit "$ac_status"); } &&
17772          { ac_try='test -s "conftest.$ac_objext"'
17773   { (eval echo "$as_me:17773: \"$ac_try\"") >&5
17774   (eval $ac_try) 2>&5
17775   ac_status=$?
17776   echo "$as_me:17776: \$? = $ac_status" >&5
17777   (exit "$ac_status"); }; }; then
17778
17779 echo "$as_me:17779: checking for X11/Xt const-feature" >&5
17780 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17781 if test "${cf_cv_const_x_string+set}" = set; then
17782   echo $ECHO_N "(cached) $ECHO_C" >&6
17783 else
17784
17785         cat >"conftest.$ac_ext" <<_ACEOF
17786 #line 17786 "configure"
17787 #include "confdefs.h"
17788
17789 #undef  _CONST_X_STRING
17790 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17791 #undef  XTSTRINGDEFINES /* X11R5 and later */
17792 #include <stdlib.h>
17793 #include <X11/Intrinsic.h>
17794
17795 int
17796 main (void)
17797 {
17798 String foo = malloc(1); *foo = 0
17799   ;
17800   return 0;
17801 }
17802 _ACEOF
17803 rm -f "conftest.$ac_objext"
17804 if { (eval echo "$as_me:17804: \"$ac_compile\"") >&5
17805   (eval $ac_compile) 2>&5
17806   ac_status=$?
17807   echo "$as_me:17807: \$? = $ac_status" >&5
17808   (exit "$ac_status"); } &&
17809          { ac_try='test -s "conftest.$ac_objext"'
17810   { (eval echo "$as_me:17810: \"$ac_try\"") >&5
17811   (eval $ac_try) 2>&5
17812   ac_status=$?
17813   echo "$as_me:17813: \$? = $ac_status" >&5
17814   (exit "$ac_status"); }; }; then
17815
17816                         cf_cv_const_x_string=no
17817
17818 else
17819   echo "$as_me: failed program was:" >&5
17820 cat "conftest.$ac_ext" >&5
17821
17822                         cf_cv_const_x_string=yes
17823
17824 fi
17825 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17826
17827 fi
17828 echo "$as_me:17828: result: $cf_cv_const_x_string" >&5
17829 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17830
17831 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17832 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17833 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17834
17835 case "$cf_cv_const_x_string" in
17836 (no)
17837
17838         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17839         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17840
17841         ;;
17842 (*)
17843
17844         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17845         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17846
17847         ;;
17848 esac
17849
17850 else
17851   echo "$as_me: failed program was:" >&5
17852 cat "conftest.$ac_ext" >&5
17853 fi
17854 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17855  fi
17856 cat > "conftest.$ac_ext" <<EOF
17857 #line 17857 "${as_me:-configure}"
17858 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17859 EOF
17860 if test "$INTEL_COMPILER" = yes
17861 then
17862 # The "-wdXXX" options suppress warnings:
17863 # remark #1419: external declaration in primary source file
17864 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17865 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17866 # remark #193: zero used for undefined preprocessing identifier
17867 # remark #593: variable "curs_sb_left_arrow" was set but never used
17868 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17869 # remark #869: parameter "tw" was never referenced
17870 # remark #981: operands are evaluated in unspecified order
17871 # warning #279: controlling expression is constant
17872
17873         { echo "$as_me:17873: checking for $CC warning options..." >&5
17874 echo "$as_me: checking for $CC warning options..." >&6;}
17875         cf_save_CFLAGS="$CFLAGS"
17876         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17877         for cf_opt in \
17878                 wd1419 \
17879                 wd1683 \
17880                 wd1684 \
17881                 wd193 \
17882                 wd593 \
17883                 wd279 \
17884                 wd810 \
17885                 wd869 \
17886                 wd981
17887         do
17888                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17889                 if { (eval echo "$as_me:17889: \"$ac_compile\"") >&5
17890   (eval $ac_compile) 2>&5
17891   ac_status=$?
17892   echo "$as_me:17892: \$? = $ac_status" >&5
17893   (exit "$ac_status"); }; then
17894                         test -n "$verbose" && echo "$as_me:17894: result: ... -$cf_opt" >&5
17895 echo "${ECHO_T}... -$cf_opt" >&6
17896                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17897                 fi
17898         done
17899         CFLAGS="$cf_save_CFLAGS"
17900 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17901 then
17902         { echo "$as_me:17902: checking for $CC warning options..." >&5
17903 echo "$as_me: checking for $CC warning options..." >&6;}
17904         cf_save_CFLAGS="$CFLAGS"
17905         cf_warn_CONST=""
17906         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17907         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17908         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17909         for cf_opt in W Wall \
17910                 Wbad-function-cast \
17911                 Wcast-align \
17912                 Wcast-qual \
17913                 Wdeclaration-after-statement \
17914                 Wextra \
17915                 Winline \
17916                 Wmissing-declarations \
17917                 Wmissing-prototypes \
17918                 Wnested-externs \
17919                 Wpointer-arith \
17920                 Wshadow \
17921                 Wstrict-prototypes \
17922                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17923         do
17924                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17925                 if { (eval echo "$as_me:17925: \"$ac_compile\"") >&5
17926   (eval $ac_compile) 2>&5
17927   ac_status=$?
17928   echo "$as_me:17928: \$? = $ac_status" >&5
17929   (exit "$ac_status"); }; then
17930                         test -n "$verbose" && echo "$as_me:17930: result: ... -$cf_opt" >&5
17931 echo "${ECHO_T}... -$cf_opt" >&6
17932                         case "$cf_opt" in
17933                         (Winline)
17934                                 case "$GCC_VERSION" in
17935                                 ([34].*)
17936                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17937
17938 echo "${as_me:-configure}:17938: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17939
17940                                         continue;;
17941                                 esac
17942                                 ;;
17943                         (Wpointer-arith)
17944                                 case "$GCC_VERSION" in
17945                                 ([12].*)
17946                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17947
17948 echo "${as_me:-configure}:17948: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17949
17950                                         continue;;
17951                                 esac
17952                                 ;;
17953                         esac
17954                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17955                 fi
17956         done
17957         CFLAGS="$cf_save_CFLAGS"
17958 fi
17959 rm -rf ./conftest*
17960
17961 fi
17962
17963 if test "$GCC" = yes || test "$GXX" = yes
17964 then
17965 cat > conftest.i <<EOF
17966 #ifndef GCC_PRINTF
17967 #define GCC_PRINTF 0
17968 #endif
17969 #ifndef GCC_SCANF
17970 #define GCC_SCANF 0
17971 #endif
17972 #ifndef GCC_NORETURN
17973 #define GCC_NORETURN /* nothing */
17974 #endif
17975 #ifndef GCC_UNUSED
17976 #define GCC_UNUSED /* nothing */
17977 #endif
17978 EOF
17979 if test "$GCC" = yes
17980 then
17981         { echo "$as_me:17981: checking for $CC __attribute__ directives..." >&5
17982 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17983 cat > "conftest.$ac_ext" <<EOF
17984 #line 17984 "${as_me:-configure}"
17985 #include <stdio.h>
17986 #include "confdefs.h"
17987 #include "conftest.h"
17988 #include "conftest.i"
17989 #if     GCC_PRINTF
17990 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17991 #else
17992 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17993 #endif
17994 #if     GCC_SCANF
17995 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17996 #else
17997 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17998 #endif
17999 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
18000 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
18001 extern GCC_NORETURN void foo(void);
18002 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
18003 EOF
18004         cf_printf_attribute=no
18005         cf_scanf_attribute=no
18006         for cf_attribute in scanf printf unused noreturn
18007         do
18008
18009 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18010
18011                 cf_directive="__attribute__(($cf_attribute))"
18012                 echo "checking for $CC $cf_directive" 1>&5
18013
18014                 case "$cf_attribute" in
18015                 (printf)
18016                         cf_printf_attribute=yes
18017                         cat >conftest.h <<EOF
18018 #define GCC_$cf_ATTRIBUTE 1
18019 EOF
18020                         ;;
18021                 (scanf)
18022                         cf_scanf_attribute=yes
18023                         cat >conftest.h <<EOF
18024 #define GCC_$cf_ATTRIBUTE 1
18025 EOF
18026                         ;;
18027                 (*)
18028                         cat >conftest.h <<EOF
18029 #define GCC_$cf_ATTRIBUTE $cf_directive
18030 EOF
18031                         ;;
18032                 esac
18033
18034                 if { (eval echo "$as_me:18034: \"$ac_compile\"") >&5
18035   (eval $ac_compile) 2>&5
18036   ac_status=$?
18037   echo "$as_me:18037: \$? = $ac_status" >&5
18038   (exit "$ac_status"); }; then
18039                         test -n "$verbose" && echo "$as_me:18039: result: ... $cf_attribute" >&5
18040 echo "${ECHO_T}... $cf_attribute" >&6
18041                         cat conftest.h >>confdefs.h
18042                         case "$cf_attribute" in
18043                         (noreturn)
18044
18045 cat >>confdefs.h <<EOF
18046 #define GCC_NORETURN $cf_directive
18047 EOF
18048
18049                                 ;;
18050                         (printf)
18051                                 cf_value='/* nothing */'
18052                                 if test "$cf_printf_attribute" != no ; then
18053                                         cf_value='__attribute__((format(printf,fmt,var)))'
18054
18055 cat >>confdefs.h <<\EOF
18056 #define GCC_PRINTF 1
18057 EOF
18058
18059                                 fi
18060
18061 cat >>confdefs.h <<EOF
18062 #define GCC_PRINTFLIKE(fmt,var) $cf_value
18063 EOF
18064
18065                                 ;;
18066                         (scanf)
18067                                 cf_value='/* nothing */'
18068                                 if test "$cf_scanf_attribute" != no ; then
18069                                         cf_value='__attribute__((format(scanf,fmt,var)))'
18070
18071 cat >>confdefs.h <<\EOF
18072 #define GCC_SCANF 1
18073 EOF
18074
18075                                 fi
18076
18077 cat >>confdefs.h <<EOF
18078 #define GCC_SCANFLIKE(fmt,var) $cf_value
18079 EOF
18080
18081                                 ;;
18082                         (unused)
18083
18084 cat >>confdefs.h <<EOF
18085 #define GCC_UNUSED $cf_directive
18086 EOF
18087
18088                                 ;;
18089                         esac
18090                 fi
18091         done
18092 else
18093         ${FGREP-fgrep} define conftest.i >>confdefs.h
18094 fi
18095 rm -rf ./conftest*
18096 fi
18097
18098 fi
18099
18100 if test "x$enable_warnings" = "xyes"; then
18101
18102         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
18103
18104         if test "x$cf_with_cxx" = xyes ; then
18105
18106 INTEL_CPLUSPLUS=no
18107
18108 if test "$GCC" = yes ; then
18109         case "$host_os" in
18110         (linux*|gnu*)
18111                 echo "$as_me:18111: checking if this is really Intel C++ compiler" >&5
18112 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
18113                 cf_save_CFLAGS="$CXXFLAGS"
18114                 CXXFLAGS="$CXXFLAGS -no-gcc"
18115                 cat >"conftest.$ac_ext" <<_ACEOF
18116 #line 18116 "configure"
18117 #include "confdefs.h"
18118
18119 int
18120 main (void)
18121 {
18122
18123 #ifdef __INTEL_COMPILER
18124 #else
18125 #error __INTEL_COMPILER is not defined
18126 #endif
18127
18128   ;
18129   return 0;
18130 }
18131 _ACEOF
18132 rm -f "conftest.$ac_objext"
18133 if { (eval echo "$as_me:18133: \"$ac_compile\"") >&5
18134   (eval $ac_compile) 2>&5
18135   ac_status=$?
18136   echo "$as_me:18136: \$? = $ac_status" >&5
18137   (exit "$ac_status"); } &&
18138          { ac_try='test -s "conftest.$ac_objext"'
18139   { (eval echo "$as_me:18139: \"$ac_try\"") >&5
18140   (eval $ac_try) 2>&5
18141   ac_status=$?
18142   echo "$as_me:18142: \$? = $ac_status" >&5
18143   (exit "$ac_status"); }; }; then
18144   INTEL_CPLUSPLUS=yes
18145 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
18146
18147 else
18148   echo "$as_me: failed program was:" >&5
18149 cat "conftest.$ac_ext" >&5
18150 fi
18151 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18152                 CXXFLAGS="$cf_save_CFLAGS"
18153                 echo "$as_me:18153: result: $INTEL_CPLUSPLUS" >&5
18154 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
18155                 ;;
18156         esac
18157 fi
18158
18159 CLANG_CPLUSPLUS=no
18160
18161 if test "$GCC" = yes ; then
18162         echo "$as_me:18162: checking if this is really Clang C++ compiler" >&5
18163 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
18164         cf_save_CFLAGS="$CXXFLAGS"
18165         cat >"conftest.$ac_ext" <<_ACEOF
18166 #line 18166 "configure"
18167 #include "confdefs.h"
18168
18169 int
18170 main (void)
18171 {
18172
18173 #ifdef __clang__
18174 #else
18175 #error __clang__ is not defined
18176 #endif
18177
18178   ;
18179   return 0;
18180 }
18181 _ACEOF
18182 rm -f "conftest.$ac_objext"
18183 if { (eval echo "$as_me:18183: \"$ac_compile\"") >&5
18184   (eval $ac_compile) 2>&5
18185   ac_status=$?
18186   echo "$as_me:18186: \$? = $ac_status" >&5
18187   (exit "$ac_status"); } &&
18188          { ac_try='test -s "conftest.$ac_objext"'
18189   { (eval echo "$as_me:18189: \"$ac_try\"") >&5
18190   (eval $ac_try) 2>&5
18191   ac_status=$?
18192   echo "$as_me:18192: \$? = $ac_status" >&5
18193   (exit "$ac_status"); }; }; then
18194   CLANG_CPLUSPLUS=yes
18195
18196 else
18197   echo "$as_me: failed program was:" >&5
18198 cat "conftest.$ac_ext" >&5
18199 fi
18200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18201         CXXFLAGS="$cf_save_CFLAGS"
18202         echo "$as_me:18202: result: $CLANG_CPLUSPLUS" >&5
18203 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
18204 fi
18205
18206 CLANG_VERSION=none
18207
18208 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
18209         case "$CC" in
18210         (c[1-9][0-9]|*/c[1-9][0-9])
18211                 { echo "$as_me:18211: WARNING: replacing broken compiler alias $CC" >&5
18212 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
18213                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
18214                 CC=clang
18215                 ;;
18216         esac
18217
18218         echo "$as_me:18218: checking version of $CC" >&5
18219 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
18220         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.].*//'`"
18221         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
18222         echo "$as_me:18222: result: $CLANG_VERSION" >&5
18223 echo "${ECHO_T}$CLANG_VERSION" >&6
18224
18225         for cf_clang_opt in \
18226                 -Qunused-arguments \
18227                 -Wno-error=implicit-function-declaration
18228         do
18229                 echo "$as_me:18229: checking if option $cf_clang_opt works" >&5
18230 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
18231                 cf_save_CFLAGS="$CFLAGS"
18232                 CFLAGS="$CFLAGS $cf_clang_opt"
18233                 cat >"conftest.$ac_ext" <<_ACEOF
18234 #line 18234 "configure"
18235 #include "confdefs.h"
18236
18237                         #include <stdio.h>
18238 int
18239 main (void)
18240 {
18241
18242                         printf("hello!\\n");
18243   ;
18244   return 0;
18245 }
18246 _ACEOF
18247 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18248 if { (eval echo "$as_me:18248: \"$ac_link\"") >&5
18249   (eval $ac_link) 2>&5
18250   ac_status=$?
18251   echo "$as_me:18251: \$? = $ac_status" >&5
18252   (exit "$ac_status"); } &&
18253          { ac_try='test -s "conftest$ac_exeext"'
18254   { (eval echo "$as_me:18254: \"$ac_try\"") >&5
18255   (eval $ac_try) 2>&5
18256   ac_status=$?
18257   echo "$as_me:18257: \$? = $ac_status" >&5
18258   (exit "$ac_status"); }; }; then
18259
18260                         cf_clang_optok=yes
18261 else
18262   echo "$as_me: failed program was:" >&5
18263 cat "conftest.$ac_ext" >&5
18264
18265                         cf_clang_optok=no
18266 fi
18267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18268                 echo "$as_me:18268: result: $cf_clang_optok" >&5
18269 echo "${ECHO_T}$cf_clang_optok" >&6
18270                 CFLAGS="$cf_save_CFLAGS"
18271                 if test "$cf_clang_optok" = yes; then
18272                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
18273
18274 echo "${as_me:-configure}:18274: testing adding option $cf_clang_opt ..." 1>&5
18275
18276         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18277         CFLAGS="${CFLAGS}$cf_clang_opt"
18278
18279                 fi
18280         done
18281 fi
18282
18283 ac_ext=cc
18284 ac_cpp='$CXXCPP $CPPFLAGS'
18285 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18286 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18287 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
18288 ac_main_return="return"
18289
18290 cat > conftest.$ac_ext <<EOF
18291 #line 18291 "configure"
18292 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
18293 EOF
18294
18295 if test "$INTEL_CPLUSPLUS" = yes
18296 then
18297 # The "-wdXXX" options suppress warnings:
18298 # remark #1419: external declaration in primary source file
18299 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18300 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
18301 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
18302 # remark #193: zero used for undefined preprocessing identifier
18303 # remark #593: variable "curs_sb_left_arrow" was set but never used
18304 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
18305 # remark #869: parameter "tw" was never referenced
18306 # remark #981: operands are evaluated in unspecified order
18307 # warning #269: invalid format string conversion
18308
18309         { echo "$as_me:18309: checking for $CC warning options..." >&5
18310 echo "$as_me: checking for $CC warning options..." >&6;}
18311         cf_save_CXXFLAGS="$CXXFLAGS"
18312         EXTRA_CXXFLAGS="-Wall"
18313         for cf_opt in \
18314                 wd1419 \
18315                 wd1682 \
18316                 wd1683 \
18317                 wd1684 \
18318                 wd193 \
18319                 wd279 \
18320                 wd593 \
18321                 wd810 \
18322                 wd869 \
18323                 wd981
18324         do
18325                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
18326                 if { (eval echo "$as_me:18326: \"$ac_compile\"") >&5
18327   (eval $ac_compile) 2>&5
18328   ac_status=$?
18329   echo "$as_me:18329: \$? = $ac_status" >&5
18330   (exit "$ac_status"); }; then
18331                         test -n "$verbose" && echo "$as_me:18331: result: ... -$cf_opt" >&5
18332 echo "${ECHO_T}... -$cf_opt" >&6
18333                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18334                 fi
18335         done
18336         CXXFLAGS="$cf_save_CXXFLAGS"
18337
18338 elif test "$GXX" = yes
18339 then
18340         { echo "$as_me:18340: checking for $CXX warning options..." >&5
18341 echo "$as_me: checking for $CXX warning options..." >&6;}
18342         cf_save_CXXFLAGS="$CXXFLAGS"
18343         EXTRA_CXXFLAGS="-W -Wall"
18344         cf_gxx_extra_warnings=""
18345         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18346         case "$GXX_VERSION" in
18347         ([1-2].*)
18348                 ;;
18349         (*)
18350                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18351                 ;;
18352         esac
18353         for cf_opt in \
18354                 Wabi \
18355                 fabi-version=0 \
18356                 Wextra \
18357                 Wignored-qualifiers \
18358                 Wlogical-op \
18359                 Woverloaded-virtual \
18360                 Wsign-promo \
18361                 Wsynth \
18362                 Wold-style-cast \
18363                 Wcast-align \
18364                 Wcast-qual \
18365                 Wpointer-arith \
18366                 Wshadow \
18367                 Wundef $cf_gxx_extra_warnings Wno-unused
18368         do
18369                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18370                 if { (eval echo "$as_me:18370: \"$ac_compile\"") >&5
18371   (eval $ac_compile) 2>&5
18372   ac_status=$?
18373   echo "$as_me:18373: \$? = $ac_status" >&5
18374   (exit "$ac_status"); }; then
18375                         test -n "$verbose" && echo "$as_me:18375: result: ... -$cf_opt" >&5
18376 echo "${ECHO_T}... -$cf_opt" >&6
18377                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18378                 else
18379                         test -n "$verbose" && echo "$as_me:18379: result: ... no -$cf_opt" >&5
18380 echo "${ECHO_T}... no -$cf_opt" >&6
18381                 fi
18382         done
18383         CXXFLAGS="$cf_save_CXXFLAGS"
18384 fi
18385
18386 rm -rf ./conftest*
18387 ac_ext=c
18388 ac_cpp='$CPP $CPPFLAGS'
18389 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18390 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18391 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18392 ac_main_return="return"
18393
18394         fi
18395 fi
18396
18397 echo "$as_me:18397: checking if you want to work around bogus compiler/loader warnings" >&5
18398 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18399
18400 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18401 if test "${enable_string_hacks+set}" = set; then
18402   enableval="$enable_string_hacks"
18403   enable_string_hacks=$enableval
18404 else
18405   enable_string_hacks=no
18406 fi;
18407 echo "$as_me:18407: result: $enable_string_hacks" >&5
18408 echo "${ECHO_T}$enable_string_hacks" >&6
18409
18410 if test "x$enable_string_hacks" = "xyes"; then
18411
18412 cat >>confdefs.h <<\EOF
18413 #define USE_STRING_HACKS 1
18414 EOF
18415
18416         { echo "$as_me:18416: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18417 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18418         echo "$as_me:18418: checking for strlcat" >&5
18419 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18420 if test "${ac_cv_func_strlcat+set}" = set; then
18421   echo $ECHO_N "(cached) $ECHO_C" >&6
18422 else
18423   cat >"conftest.$ac_ext" <<_ACEOF
18424 #line 18424 "configure"
18425 #include "confdefs.h"
18426 #define strlcat autoconf_temporary
18427 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18428 #undef strlcat
18429
18430 #ifdef __cplusplus
18431 extern "C"
18432 #endif
18433
18434 /* We use char because int might match the return type of a gcc2
18435    builtin and then its argument prototype would still apply.  */
18436 char strlcat (void);
18437
18438 int
18439 main (void)
18440 {
18441
18442 /* The GNU C library defines stubs for functions which it implements
18443     to always fail with ENOSYS.  Some functions are actually named
18444     something starting with __ and the normal name is an alias.  */
18445 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18446 #error found stub for strlcat
18447 #endif
18448
18449         return strlcat ();
18450   ;
18451   return 0;
18452 }
18453 _ACEOF
18454 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18455 if { (eval echo "$as_me:18455: \"$ac_link\"") >&5
18456   (eval $ac_link) 2>&5
18457   ac_status=$?
18458   echo "$as_me:18458: \$? = $ac_status" >&5
18459   (exit "$ac_status"); } &&
18460          { ac_try='test -s "conftest$ac_exeext"'
18461   { (eval echo "$as_me:18461: \"$ac_try\"") >&5
18462   (eval $ac_try) 2>&5
18463   ac_status=$?
18464   echo "$as_me:18464: \$? = $ac_status" >&5
18465   (exit "$ac_status"); }; }; then
18466   ac_cv_func_strlcat=yes
18467 else
18468   echo "$as_me: failed program was:" >&5
18469 cat "conftest.$ac_ext" >&5
18470 ac_cv_func_strlcat=no
18471 fi
18472 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18473 fi
18474 echo "$as_me:18474: result: $ac_cv_func_strlcat" >&5
18475 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18476 if test "$ac_cv_func_strlcat" = yes; then
18477
18478 cat >>confdefs.h <<\EOF
18479 #define HAVE_STRLCAT 1
18480 EOF
18481
18482 else
18483
18484                 echo "$as_me:18484: checking for strlcat in -lbsd" >&5
18485 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18486 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18487   echo $ECHO_N "(cached) $ECHO_C" >&6
18488 else
18489   ac_check_lib_save_LIBS=$LIBS
18490 LIBS="-lbsd  $LIBS"
18491 cat >"conftest.$ac_ext" <<_ACEOF
18492 #line 18492 "configure"
18493 #include "confdefs.h"
18494
18495 /* Override any gcc2 internal prototype to avoid an error.  */
18496 #ifdef __cplusplus
18497 extern "C"
18498 #endif
18499 /* We use char because int might match the return type of a gcc2
18500    builtin and then its argument prototype would still apply.  */
18501 char strlcat (void);
18502 int
18503 main (void)
18504 {
18505 strlcat ();
18506   ;
18507   return 0;
18508 }
18509 _ACEOF
18510 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18511 if { (eval echo "$as_me:18511: \"$ac_link\"") >&5
18512   (eval $ac_link) 2>&5
18513   ac_status=$?
18514   echo "$as_me:18514: \$? = $ac_status" >&5
18515   (exit "$ac_status"); } &&
18516          { ac_try='test -s "conftest$ac_exeext"'
18517   { (eval echo "$as_me:18517: \"$ac_try\"") >&5
18518   (eval $ac_try) 2>&5
18519   ac_status=$?
18520   echo "$as_me:18520: \$? = $ac_status" >&5
18521   (exit "$ac_status"); }; }; then
18522   ac_cv_lib_bsd_strlcat=yes
18523 else
18524   echo "$as_me: failed program was:" >&5
18525 cat "conftest.$ac_ext" >&5
18526 ac_cv_lib_bsd_strlcat=no
18527 fi
18528 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18529 LIBS=$ac_check_lib_save_LIBS
18530 fi
18531 echo "$as_me:18531: result: $ac_cv_lib_bsd_strlcat" >&5
18532 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18533 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18534
18535 cf_add_libs="$LIBS"
18536 # reverse order
18537 cf_add_0lib=
18538 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18539 # filter duplicates
18540 for cf_add_1lib in $cf_add_0lib; do
18541         for cf_add_2lib in $cf_add_libs; do
18542                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18543                         cf_add_1lib=
18544                         break
18545                 fi
18546         done
18547         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18548 done
18549 LIBS="$cf_add_libs"
18550
18551 for ac_header in bsd/string.h
18552 do
18553 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18554 echo "$as_me:18554: checking for $ac_header" >&5
18555 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18556 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18557   echo $ECHO_N "(cached) $ECHO_C" >&6
18558 else
18559   cat >"conftest.$ac_ext" <<_ACEOF
18560 #line 18560 "configure"
18561 #include "confdefs.h"
18562 #include <$ac_header>
18563 _ACEOF
18564 if { (eval echo "$as_me:18564: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18565   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18566   ac_status=$?
18567   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18568   rm -f conftest.er1
18569   cat conftest.err >&5
18570   echo "$as_me:18570: \$? = $ac_status" >&5
18571   (exit "$ac_status"); } >/dev/null; then
18572   if test -s conftest.err; then
18573     ac_cpp_err=$ac_c_preproc_warn_flag
18574   else
18575     ac_cpp_err=
18576   fi
18577 else
18578   ac_cpp_err=yes
18579 fi
18580 if test -z "$ac_cpp_err"; then
18581   eval "$as_ac_Header=yes"
18582 else
18583   echo "$as_me: failed program was:" >&5
18584   cat "conftest.$ac_ext" >&5
18585   eval "$as_ac_Header=no"
18586 fi
18587 rm -f conftest.err "conftest.$ac_ext"
18588 fi
18589 echo "$as_me:18589: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18590 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18591 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18592   cat >>confdefs.h <<EOF
18593 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18594 EOF
18595
18596 fi
18597 done
18598
18599 cat >>confdefs.h <<\EOF
18600 #define HAVE_STRLCAT 1
18601 EOF
18602
18603 fi
18604
18605 fi
18606
18607 for ac_func in strlcpy snprintf
18608 do
18609 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18610 echo "$as_me:18610: checking for $ac_func" >&5
18611 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18612 if eval "test \"\${$as_ac_var+set}\" = set"; then
18613   echo $ECHO_N "(cached) $ECHO_C" >&6
18614 else
18615   cat >"conftest.$ac_ext" <<_ACEOF
18616 #line 18616 "configure"
18617 #include "confdefs.h"
18618 #define $ac_func autoconf_temporary
18619 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18620 #undef $ac_func
18621
18622 #ifdef __cplusplus
18623 extern "C"
18624 #endif
18625
18626 /* We use char because int might match the return type of a gcc2
18627    builtin and then its argument prototype would still apply.  */
18628 char $ac_func (void);
18629
18630 int
18631 main (void)
18632 {
18633
18634 /* The GNU C library defines stubs for functions which it implements
18635     to always fail with ENOSYS.  Some functions are actually named
18636     something starting with __ and the normal name is an alias.  */
18637 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18638 #error found stub for $ac_func
18639 #endif
18640
18641         return $ac_func ();
18642   ;
18643   return 0;
18644 }
18645 _ACEOF
18646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18647 if { (eval echo "$as_me:18647: \"$ac_link\"") >&5
18648   (eval $ac_link) 2>&5
18649   ac_status=$?
18650   echo "$as_me:18650: \$? = $ac_status" >&5
18651   (exit "$ac_status"); } &&
18652          { ac_try='test -s "conftest$ac_exeext"'
18653   { (eval echo "$as_me:18653: \"$ac_try\"") >&5
18654   (eval $ac_try) 2>&5
18655   ac_status=$?
18656   echo "$as_me:18656: \$? = $ac_status" >&5
18657   (exit "$ac_status"); }; }; then
18658   eval "$as_ac_var=yes"
18659 else
18660   echo "$as_me: failed program was:" >&5
18661 cat "conftest.$ac_ext" >&5
18662 eval "$as_ac_var=no"
18663 fi
18664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18665 fi
18666 echo "$as_me:18666: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18667 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18668 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18669   cat >>confdefs.h <<EOF
18670 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18671 EOF
18672
18673 fi
18674 done
18675
18676 fi
18677
18678 ###     use option --enable-assertions to turn on generation of assertion code
18679 echo "$as_me:18679: checking if you want to enable runtime assertions" >&5
18680 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18681
18682 # Check whether --enable-assertions or --disable-assertions was given.
18683 if test "${enable_assertions+set}" = set; then
18684   enableval="$enable_assertions"
18685   with_assertions=$enableval
18686 else
18687   with_assertions=no
18688 fi;
18689 echo "$as_me:18689: result: $with_assertions" >&5
18690 echo "${ECHO_T}$with_assertions" >&6
18691 if test -n "$GCC"
18692 then
18693         if test "$with_assertions" = no
18694         then
18695                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18696         else
18697
18698         ADAFLAGS="$ADAFLAGS -gnata"
18699
18700         fi
18701 fi
18702
18703 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18704
18705 echo "$as_me:18705: checking if you want to use dmalloc for testing" >&5
18706 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18707
18708 # Check whether --with-dmalloc or --without-dmalloc was given.
18709 if test "${with_dmalloc+set}" = set; then
18710   withval="$with_dmalloc"
18711   case "x$withval" in
18712         (x|xno) ;;
18713         (*)
18714                 : "${with_cflags:=-g}"
18715                 : "${enable_leaks:=no}"
18716                 with_dmalloc=yes
18717
18718 cat >>confdefs.h <<EOF
18719 #define USE_DMALLOC 1
18720 EOF
18721
18722                 ;;
18723         esac
18724 else
18725   with_dmalloc=
18726 fi;
18727 echo "$as_me:18727: result: ${with_dmalloc:-no}" >&5
18728 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18729
18730 case ".$with_cflags" in
18731 (.*-g*)
18732         case .$CFLAGS in
18733         (.*-g*)
18734                 ;;
18735         (*)
18736
18737 cf_fix_cppflags=no
18738 cf_new_cflags=
18739 cf_new_cppflags=
18740 cf_new_extra_cppflags=
18741
18742 for cf_add_cflags in -g
18743 do
18744 case "$cf_fix_cppflags" in
18745 (no)
18746         case "$cf_add_cflags" in
18747         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18748                 case "$cf_add_cflags" in
18749                 (-D*)
18750                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18751
18752                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18753                                 && test -z "${cf_tst_cflags}" \
18754                                 && cf_fix_cppflags=yes
18755
18756                         if test "$cf_fix_cppflags" = yes ; then
18757
18758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18760
18761                                 continue
18762                         elif test "${cf_tst_cflags}" = "\"'" ; then
18763
18764         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18765         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18766
18767                                 continue
18768                         fi
18769                         ;;
18770                 esac
18771                 case "$CPPFLAGS" in
18772                 (*$cf_add_cflags)
18773                         ;;
18774                 (*)
18775                         case "$cf_add_cflags" in
18776                         (-D*)
18777                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18778
18779 CPPFLAGS=`echo "$CPPFLAGS" | \
18780         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18781                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18782
18783                                 ;;
18784                         esac
18785
18786         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18787         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18788
18789                         ;;
18790                 esac
18791                 ;;
18792         (*)
18793
18794         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18795         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18796
18797                 ;;
18798         esac
18799         ;;
18800 (yes)
18801
18802         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18803         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18804
18805         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18806
18807         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18808                 && test -z "${cf_tst_cflags}" \
18809                 && cf_fix_cppflags=no
18810         ;;
18811 esac
18812 done
18813
18814 if test -n "$cf_new_cflags" ; then
18815
18816         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18817         CFLAGS="${CFLAGS}$cf_new_cflags"
18818
18819 fi
18820
18821 if test -n "$cf_new_cppflags" ; then
18822
18823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18824         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18825
18826 fi
18827
18828 if test -n "$cf_new_extra_cppflags" ; then
18829
18830         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18831         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18832
18833 fi
18834
18835                 ;;
18836         esac
18837         ;;
18838 esac
18839
18840 if test "$with_dmalloc" = yes ; then
18841         echo "$as_me:18841: checking for dmalloc.h" >&5
18842 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18843 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18844   echo $ECHO_N "(cached) $ECHO_C" >&6
18845 else
18846   cat >"conftest.$ac_ext" <<_ACEOF
18847 #line 18847 "configure"
18848 #include "confdefs.h"
18849 #include <dmalloc.h>
18850 _ACEOF
18851 if { (eval echo "$as_me:18851: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18852   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18853   ac_status=$?
18854   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18855   rm -f conftest.er1
18856   cat conftest.err >&5
18857   echo "$as_me:18857: \$? = $ac_status" >&5
18858   (exit "$ac_status"); } >/dev/null; then
18859   if test -s conftest.err; then
18860     ac_cpp_err=$ac_c_preproc_warn_flag
18861   else
18862     ac_cpp_err=
18863   fi
18864 else
18865   ac_cpp_err=yes
18866 fi
18867 if test -z "$ac_cpp_err"; then
18868   ac_cv_header_dmalloc_h=yes
18869 else
18870   echo "$as_me: failed program was:" >&5
18871   cat "conftest.$ac_ext" >&5
18872   ac_cv_header_dmalloc_h=no
18873 fi
18874 rm -f conftest.err "conftest.$ac_ext"
18875 fi
18876 echo "$as_me:18876: result: $ac_cv_header_dmalloc_h" >&5
18877 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18878 if test "$ac_cv_header_dmalloc_h" = yes; then
18879
18880 echo "$as_me:18880: checking for dmalloc_debug in -ldmalloc" >&5
18881 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18882 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18883   echo $ECHO_N "(cached) $ECHO_C" >&6
18884 else
18885   ac_check_lib_save_LIBS=$LIBS
18886 LIBS="-ldmalloc  $LIBS"
18887 cat >"conftest.$ac_ext" <<_ACEOF
18888 #line 18888 "configure"
18889 #include "confdefs.h"
18890
18891 /* Override any gcc2 internal prototype to avoid an error.  */
18892 #ifdef __cplusplus
18893 extern "C"
18894 #endif
18895 /* We use char because int might match the return type of a gcc2
18896    builtin and then its argument prototype would still apply.  */
18897 char dmalloc_debug (void);
18898 int
18899 main (void)
18900 {
18901 dmalloc_debug ();
18902   ;
18903   return 0;
18904 }
18905 _ACEOF
18906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18907 if { (eval echo "$as_me:18907: \"$ac_link\"") >&5
18908   (eval $ac_link) 2>&5
18909   ac_status=$?
18910   echo "$as_me:18910: \$? = $ac_status" >&5
18911   (exit "$ac_status"); } &&
18912          { ac_try='test -s "conftest$ac_exeext"'
18913   { (eval echo "$as_me:18913: \"$ac_try\"") >&5
18914   (eval $ac_try) 2>&5
18915   ac_status=$?
18916   echo "$as_me:18916: \$? = $ac_status" >&5
18917   (exit "$ac_status"); }; }; then
18918   ac_cv_lib_dmalloc_dmalloc_debug=yes
18919 else
18920   echo "$as_me: failed program was:" >&5
18921 cat "conftest.$ac_ext" >&5
18922 ac_cv_lib_dmalloc_dmalloc_debug=no
18923 fi
18924 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18925 LIBS=$ac_check_lib_save_LIBS
18926 fi
18927 echo "$as_me:18927: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18928 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18929 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18930   cat >>confdefs.h <<EOF
18931 #define HAVE_LIBDMALLOC 1
18932 EOF
18933
18934   LIBS="-ldmalloc $LIBS"
18935
18936 fi
18937
18938 fi
18939
18940 fi
18941
18942 echo "$as_me:18942: checking if you want to use dbmalloc for testing" >&5
18943 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18944
18945 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18946 if test "${with_dbmalloc+set}" = set; then
18947   withval="$with_dbmalloc"
18948   case "x$withval" in
18949         (x|xno) ;;
18950         (*)
18951                 : "${with_cflags:=-g}"
18952                 : "${enable_leaks:=no}"
18953                 with_dbmalloc=yes
18954
18955 cat >>confdefs.h <<EOF
18956 #define USE_DBMALLOC 1
18957 EOF
18958
18959                 ;;
18960         esac
18961 else
18962   with_dbmalloc=
18963 fi;
18964 echo "$as_me:18964: result: ${with_dbmalloc:-no}" >&5
18965 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18966
18967 case ".$with_cflags" in
18968 (.*-g*)
18969         case .$CFLAGS in
18970         (.*-g*)
18971                 ;;
18972         (*)
18973
18974 cf_fix_cppflags=no
18975 cf_new_cflags=
18976 cf_new_cppflags=
18977 cf_new_extra_cppflags=
18978
18979 for cf_add_cflags in -g
18980 do
18981 case "$cf_fix_cppflags" in
18982 (no)
18983         case "$cf_add_cflags" in
18984         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18985                 case "$cf_add_cflags" in
18986                 (-D*)
18987                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18988
18989                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18990                                 && test -z "${cf_tst_cflags}" \
18991                                 && cf_fix_cppflags=yes
18992
18993                         if test "$cf_fix_cppflags" = yes ; then
18994
18995         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18996         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18997
18998                                 continue
18999                         elif test "${cf_tst_cflags}" = "\"'" ; then
19000
19001         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19002         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19003
19004                                 continue
19005                         fi
19006                         ;;
19007                 esac
19008                 case "$CPPFLAGS" in
19009                 (*$cf_add_cflags)
19010                         ;;
19011                 (*)
19012                         case "$cf_add_cflags" in
19013                         (-D*)
19014                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19015
19016 CPPFLAGS=`echo "$CPPFLAGS" | \
19017         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19018                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19019
19020                                 ;;
19021                         esac
19022
19023         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19024         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19025
19026                         ;;
19027                 esac
19028                 ;;
19029         (*)
19030
19031         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19032         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19033
19034                 ;;
19035         esac
19036         ;;
19037 (yes)
19038
19039         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19040         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19041
19042         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19043
19044         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19045                 && test -z "${cf_tst_cflags}" \
19046                 && cf_fix_cppflags=no
19047         ;;
19048 esac
19049 done
19050
19051 if test -n "$cf_new_cflags" ; then
19052
19053         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19054         CFLAGS="${CFLAGS}$cf_new_cflags"
19055
19056 fi
19057
19058 if test -n "$cf_new_cppflags" ; then
19059
19060         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19061         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19062
19063 fi
19064
19065 if test -n "$cf_new_extra_cppflags" ; then
19066
19067         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19068         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19069
19070 fi
19071
19072                 ;;
19073         esac
19074         ;;
19075 esac
19076
19077 if test "$with_dbmalloc" = yes ; then
19078         echo "$as_me:19078: checking for dbmalloc.h" >&5
19079 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19080 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19081   echo $ECHO_N "(cached) $ECHO_C" >&6
19082 else
19083   cat >"conftest.$ac_ext" <<_ACEOF
19084 #line 19084 "configure"
19085 #include "confdefs.h"
19086 #include <dbmalloc.h>
19087 _ACEOF
19088 if { (eval echo "$as_me:19088: \"$ac_cpp "conftest.$ac_ext"\"") >&5
19089   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
19090   ac_status=$?
19091   $EGREP -v '^ *\+' conftest.er1 >conftest.err
19092   rm -f conftest.er1
19093   cat conftest.err >&5
19094   echo "$as_me:19094: \$? = $ac_status" >&5
19095   (exit "$ac_status"); } >/dev/null; then
19096   if test -s conftest.err; then
19097     ac_cpp_err=$ac_c_preproc_warn_flag
19098   else
19099     ac_cpp_err=
19100   fi
19101 else
19102   ac_cpp_err=yes
19103 fi
19104 if test -z "$ac_cpp_err"; then
19105   ac_cv_header_dbmalloc_h=yes
19106 else
19107   echo "$as_me: failed program was:" >&5
19108   cat "conftest.$ac_ext" >&5
19109   ac_cv_header_dbmalloc_h=no
19110 fi
19111 rm -f conftest.err "conftest.$ac_ext"
19112 fi
19113 echo "$as_me:19113: result: $ac_cv_header_dbmalloc_h" >&5
19114 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
19115 if test "$ac_cv_header_dbmalloc_h" = yes; then
19116
19117 echo "$as_me:19117: checking for debug_malloc in -ldbmalloc" >&5
19118 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
19119 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
19120   echo $ECHO_N "(cached) $ECHO_C" >&6
19121 else
19122   ac_check_lib_save_LIBS=$LIBS
19123 LIBS="-ldbmalloc  $LIBS"
19124 cat >"conftest.$ac_ext" <<_ACEOF
19125 #line 19125 "configure"
19126 #include "confdefs.h"
19127
19128 /* Override any gcc2 internal prototype to avoid an error.  */
19129 #ifdef __cplusplus
19130 extern "C"
19131 #endif
19132 /* We use char because int might match the return type of a gcc2
19133    builtin and then its argument prototype would still apply.  */
19134 char debug_malloc (void);
19135 int
19136 main (void)
19137 {
19138 debug_malloc ();
19139   ;
19140   return 0;
19141 }
19142 _ACEOF
19143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19144 if { (eval echo "$as_me:19144: \"$ac_link\"") >&5
19145   (eval $ac_link) 2>&5
19146   ac_status=$?
19147   echo "$as_me:19147: \$? = $ac_status" >&5
19148   (exit "$ac_status"); } &&
19149          { ac_try='test -s "conftest$ac_exeext"'
19150   { (eval echo "$as_me:19150: \"$ac_try\"") >&5
19151   (eval $ac_try) 2>&5
19152   ac_status=$?
19153   echo "$as_me:19153: \$? = $ac_status" >&5
19154   (exit "$ac_status"); }; }; then
19155   ac_cv_lib_dbmalloc_debug_malloc=yes
19156 else
19157   echo "$as_me: failed program was:" >&5
19158 cat "conftest.$ac_ext" >&5
19159 ac_cv_lib_dbmalloc_debug_malloc=no
19160 fi
19161 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19162 LIBS=$ac_check_lib_save_LIBS
19163 fi
19164 echo "$as_me:19164: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
19165 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
19166 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
19167   cat >>confdefs.h <<EOF
19168 #define HAVE_LIBDBMALLOC 1
19169 EOF
19170
19171   LIBS="-ldbmalloc $LIBS"
19172
19173 fi
19174
19175 fi
19176
19177 fi
19178
19179 echo "$as_me:19179: checking if you want to use valgrind for testing" >&5
19180 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
19181
19182 # Check whether --with-valgrind or --without-valgrind was given.
19183 if test "${with_valgrind+set}" = set; then
19184   withval="$with_valgrind"
19185   case "x$withval" in
19186         (x|xno) ;;
19187         (*)
19188                 : "${with_cflags:=-g}"
19189                 : "${enable_leaks:=no}"
19190                 with_valgrind=yes
19191
19192 cat >>confdefs.h <<EOF
19193 #define USE_VALGRIND 1
19194 EOF
19195
19196                 ;;
19197         esac
19198 else
19199   with_valgrind=
19200 fi;
19201 echo "$as_me:19201: result: ${with_valgrind:-no}" >&5
19202 echo "${ECHO_T}${with_valgrind:-no}" >&6
19203
19204 case ".$with_cflags" in
19205 (.*-g*)
19206         case .$CFLAGS in
19207         (.*-g*)
19208                 ;;
19209         (*)
19210
19211 cf_fix_cppflags=no
19212 cf_new_cflags=
19213 cf_new_cppflags=
19214 cf_new_extra_cppflags=
19215
19216 for cf_add_cflags in -g
19217 do
19218 case "$cf_fix_cppflags" in
19219 (no)
19220         case "$cf_add_cflags" in
19221         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19222                 case "$cf_add_cflags" in
19223                 (-D*)
19224                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19225
19226                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19227                                 && test -z "${cf_tst_cflags}" \
19228                                 && cf_fix_cppflags=yes
19229
19230                         if test "$cf_fix_cppflags" = yes ; then
19231
19232         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19233         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19234
19235                                 continue
19236                         elif test "${cf_tst_cflags}" = "\"'" ; then
19237
19238         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19239         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19240
19241                                 continue
19242                         fi
19243                         ;;
19244                 esac
19245                 case "$CPPFLAGS" in
19246                 (*$cf_add_cflags)
19247                         ;;
19248                 (*)
19249                         case "$cf_add_cflags" in
19250                         (-D*)
19251                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19252
19253 CPPFLAGS=`echo "$CPPFLAGS" | \
19254         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19255                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19256
19257                                 ;;
19258                         esac
19259
19260         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19261         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19262
19263                         ;;
19264                 esac
19265                 ;;
19266         (*)
19267
19268         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19269         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19270
19271                 ;;
19272         esac
19273         ;;
19274 (yes)
19275
19276         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19277         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19278
19279         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19280
19281         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19282                 && test -z "${cf_tst_cflags}" \
19283                 && cf_fix_cppflags=no
19284         ;;
19285 esac
19286 done
19287
19288 if test -n "$cf_new_cflags" ; then
19289
19290         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19291         CFLAGS="${CFLAGS}$cf_new_cflags"
19292
19293 fi
19294
19295 if test -n "$cf_new_cppflags" ; then
19296
19297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19298         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19299
19300 fi
19301
19302 if test -n "$cf_new_extra_cppflags" ; then
19303
19304         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19305         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19306
19307 fi
19308
19309                 ;;
19310         esac
19311         ;;
19312 esac
19313
19314 echo "$as_me:19314: checking if you want to perform memory-leak testing" >&5
19315 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
19316
19317 # Check whether --enable-leaks or --disable-leaks was given.
19318 if test "${enable_leaks+set}" = set; then
19319   enableval="$enable_leaks"
19320   enable_leaks=$enableval
19321 else
19322   enable_leaks=yes
19323 fi;
19324 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19325 echo "$as_me:19325: result: $with_no_leaks" >&5
19326 echo "${ECHO_T}$with_no_leaks" >&6
19327
19328 if test "$enable_leaks" = no ; then
19329
19330 cat >>confdefs.h <<\EOF
19331 #define NO_LEAKS 1
19332 EOF
19333
19334 cat >>confdefs.h <<\EOF
19335 #define YY_NO_LEAKS 1
19336 EOF
19337
19338 fi
19339
19340 cat >>confdefs.h <<\EOF
19341 #define HAVE_NC_ALLOC_H 1
19342 EOF
19343
19344 ###     use option --enable-expanded to generate certain macros as functions
19345
19346 # Check whether --enable-expanded or --disable-expanded was given.
19347 if test "${enable_expanded+set}" = set; then
19348   enableval="$enable_expanded"
19349   test "x$enableval" = xyes &&
19350 cat >>confdefs.h <<\EOF
19351 #define NCURSES_EXPANDED 1
19352 EOF
19353
19354 fi;
19355
19356 ###     use option --disable-macros to suppress macros in favor of functions
19357
19358 # Check whether --enable-macros or --disable-macros was given.
19359 if test "${enable_macros+set}" = set; then
19360   enableval="$enable_macros"
19361   test "$enableval" = no &&
19362 cat >>confdefs.h <<\EOF
19363 #define NCURSES_NOMACROS 1
19364 EOF
19365
19366 fi;
19367
19368 # Normally we only add trace() to the debug-library.  Allow this to be
19369 # extended to all models of the ncurses library:
19370 cf_all_traces=no
19371 case "$CFLAGS $CPPFLAGS" in
19372 (*-DTRACE*)
19373         cf_all_traces=yes
19374         ;;
19375 esac
19376
19377 echo "$as_me:19377: checking whether to add trace feature to all models" >&5
19378 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19379
19380 # Check whether --with-trace or --without-trace was given.
19381 if test "${with_trace+set}" = set; then
19382   withval="$with_trace"
19383   cf_with_trace=$withval
19384 else
19385   cf_with_trace=$cf_all_traces
19386 fi;
19387 echo "$as_me:19387: result: $cf_with_trace" >&5
19388 echo "${ECHO_T}$cf_with_trace" >&6
19389
19390 if test "x$cf_with_trace" = xyes ; then
19391         LIB_TRACING=all
19392         ADA_TRACE=TRUE
19393
19394 cat >>confdefs.h <<\EOF
19395 #define TRACE 1
19396 EOF
19397
19398 cat >>confdefs.h <<\EOF
19399 #define HAVE__TRACEF 1
19400 EOF
19401
19402 else
19403         LIB_TRACING=DEBUG
19404         ADA_TRACE=FALSE
19405 fi
19406
19407 echo "$as_me:19407: checking if we want to use GNAT projects" >&5
19408 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19409
19410 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19411 if test "${enable_gnat_projects+set}" = set; then
19412   enableval="$enable_gnat_projects"
19413   test "$enableval" != no && enableval=yes
19414         if test "$enableval" != "yes" ; then
19415     enable_gnat_projects=no
19416         else
19417                 enable_gnat_projects=yes
19418         fi
19419 else
19420   enableval=yes
19421         enable_gnat_projects=yes
19422
19423 fi;
19424 echo "$as_me:19424: result: $enable_gnat_projects" >&5
19425 echo "${ECHO_T}$enable_gnat_projects" >&6
19426
19427 ###     Checks for libraries.
19428 case "$cf_cv_system_name" in
19429 (*mingw32*|*mingw64*)
19430         # Note: WINVER may be a problem with Windows 10
19431         if test "x$with_exp_win32" = xyes ; then
19432                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19433         else
19434                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19435         fi
19436
19437 echo "$as_me:19437: checking if ssp library is needed" >&5
19438 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19439 if test "${cf_cv_need_libssp+set}" = set; then
19440   echo $ECHO_N "(cached) $ECHO_C" >&6
19441 else
19442
19443 cat >"conftest.$ac_ext" <<_ACEOF
19444 #line 19444 "configure"
19445 #include "confdefs.h"
19446
19447 #include <sys/types.h>
19448 #include <dirent.h>
19449
19450 int
19451 main (void)
19452 {
19453
19454        DIR *dp = opendir(".");
19455
19456   ;
19457   return 0;
19458 }
19459 _ACEOF
19460 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19461 if { (eval echo "$as_me:19461: \"$ac_link\"") >&5
19462   (eval $ac_link) 2>&5
19463   ac_status=$?
19464   echo "$as_me:19464: \$? = $ac_status" >&5
19465   (exit "$ac_status"); } &&
19466          { ac_try='test -s "conftest$ac_exeext"'
19467   { (eval echo "$as_me:19467: \"$ac_try\"") >&5
19468   (eval $ac_try) 2>&5
19469   ac_status=$?
19470   echo "$as_me:19470: \$? = $ac_status" >&5
19471   (exit "$ac_status"); }; }; then
19472   cf_cv_need_libssp=no
19473 else
19474   echo "$as_me: failed program was:" >&5
19475 cat "conftest.$ac_ext" >&5
19476
19477         cf_save_LIBS="$LIBS"
19478         LIBS="$LIBS -lssp"
19479         cat >"conftest.$ac_ext" <<_ACEOF
19480 #line 19480 "configure"
19481 #include "confdefs.h"
19482
19483 #include <sys/types.h>
19484 #include <dirent.h>
19485
19486 int
19487 main (void)
19488 {
19489
19490                    DIR *dp = opendir(".");
19491
19492   ;
19493   return 0;
19494 }
19495 _ACEOF
19496 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19497 if { (eval echo "$as_me:19497: \"$ac_link\"") >&5
19498   (eval $ac_link) 2>&5
19499   ac_status=$?
19500   echo "$as_me:19500: \$? = $ac_status" >&5
19501   (exit "$ac_status"); } &&
19502          { ac_try='test -s "conftest$ac_exeext"'
19503   { (eval echo "$as_me:19503: \"$ac_try\"") >&5
19504   (eval $ac_try) 2>&5
19505   ac_status=$?
19506   echo "$as_me:19506: \$? = $ac_status" >&5
19507   (exit "$ac_status"); }; }; then
19508   cf_cv_need_libssp=yes
19509 else
19510   echo "$as_me: failed program was:" >&5
19511 cat "conftest.$ac_ext" >&5
19512 cf_cv_need_libssp=maybe
19513 fi
19514 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19515         LIBS="$cf_save_LIBS"
19516
19517 fi
19518 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19519 fi
19520 echo "$as_me:19520: result: $cf_cv_need_libssp" >&5
19521 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19522
19523 if test "x$cf_cv_need_libssp" = xyes
19524 then
19525
19526 cf_add_libs="$LIBS"
19527 # reverse order
19528 cf_add_0lib=
19529 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19530 # filter duplicates
19531 for cf_add_1lib in $cf_add_0lib; do
19532         for cf_add_2lib in $cf_add_libs; do
19533                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19534                         cf_add_1lib=
19535                         break
19536                 fi
19537         done
19538         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19539 done
19540 LIBS="$cf_add_libs"
19541
19542 fi
19543
19544         ;;
19545 (*)
19546         ;;
19547 esac
19548
19549 echo "$as_me:19549: checking if -lm needed for math functions" >&5
19550 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19551 if test "${cf_cv_need_libm+set}" = set; then
19552   echo $ECHO_N "(cached) $ECHO_C" >&6
19553 else
19554
19555         cat >"conftest.$ac_ext" <<_ACEOF
19556 #line 19556 "configure"
19557 #include "confdefs.h"
19558
19559                 #include <stdio.h>
19560                 #include <stdlib.h>
19561                 #include <math.h>
19562
19563 int
19564 main (void)
19565 {
19566 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19567   ;
19568   return 0;
19569 }
19570 _ACEOF
19571 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19572 if { (eval echo "$as_me:19572: \"$ac_link\"") >&5
19573   (eval $ac_link) 2>&5
19574   ac_status=$?
19575   echo "$as_me:19575: \$? = $ac_status" >&5
19576   (exit "$ac_status"); } &&
19577          { ac_try='test -s "conftest$ac_exeext"'
19578   { (eval echo "$as_me:19578: \"$ac_try\"") >&5
19579   (eval $ac_try) 2>&5
19580   ac_status=$?
19581   echo "$as_me:19581: \$? = $ac_status" >&5
19582   (exit "$ac_status"); }; }; then
19583   cf_cv_need_libm=no
19584 else
19585   echo "$as_me: failed program was:" >&5
19586 cat "conftest.$ac_ext" >&5
19587 cf_cv_need_libm=yes
19588 fi
19589 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19590 fi
19591 echo "$as_me:19591: result: $cf_cv_need_libm" >&5
19592 echo "${ECHO_T}$cf_cv_need_libm" >&6
19593
19594 if test "$cf_cv_need_libm" = yes
19595 then
19596
19597         cf_save_LIBS="$LIBS"
19598         LIBS="$LIBS -lm"
19599         echo "$as_me:19599: checking if -lm is available for math functions" >&5
19600 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19601 if test "${cf_cv_have_libm+set}" = set; then
19602   echo $ECHO_N "(cached) $ECHO_C" >&6
19603 else
19604
19605         cat >"conftest.$ac_ext" <<_ACEOF
19606 #line 19606 "configure"
19607 #include "confdefs.h"
19608
19609                 #include <stdio.h>
19610                 #include <stdlib.h>
19611                 #include <math.h>
19612
19613 int
19614 main (void)
19615 {
19616 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19617   ;
19618   return 0;
19619 }
19620 _ACEOF
19621 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19622 if { (eval echo "$as_me:19622: \"$ac_link\"") >&5
19623   (eval $ac_link) 2>&5
19624   ac_status=$?
19625   echo "$as_me:19625: \$? = $ac_status" >&5
19626   (exit "$ac_status"); } &&
19627          { ac_try='test -s "conftest$ac_exeext"'
19628   { (eval echo "$as_me:19628: \"$ac_try\"") >&5
19629   (eval $ac_try) 2>&5
19630   ac_status=$?
19631   echo "$as_me:19631: \$? = $ac_status" >&5
19632   (exit "$ac_status"); }; }; then
19633   cf_cv_have_libm=yes
19634 else
19635   echo "$as_me: failed program was:" >&5
19636 cat "conftest.$ac_ext" >&5
19637 cf_cv_have_libm=no
19638 fi
19639 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19640 fi
19641 echo "$as_me:19641: result: $cf_cv_have_libm" >&5
19642 echo "${ECHO_T}$cf_cv_have_libm" >&6
19643         LIBS="$cf_save_LIBS"
19644
19645         if test "$cf_cv_have_libm" = yes
19646         then
19647                 MATH_LIB=-lm
19648         fi
19649 else
19650         cf_cv_have_libm=yes
19651 fi
19652
19653 if test "$cf_cv_have_libm" = yes
19654 then
19655
19656 cat >>confdefs.h <<\EOF
19657 #define HAVE_MATH_FUNCS 1
19658 EOF
19659
19660 fi
19661
19662 ###     Checks for header files.
19663 echo "$as_me:19663: checking whether time.h and sys/time.h may both be included" >&5
19664 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19665 if test "${ac_cv_header_time+set}" = set; then
19666   echo $ECHO_N "(cached) $ECHO_C" >&6
19667 else
19668   cat >"conftest.$ac_ext" <<_ACEOF
19669 #line 19669 "configure"
19670 #include "confdefs.h"
19671 #include <sys/types.h>
19672 #include <sys/time.h>
19673 #include <time.h>
19674
19675 int
19676 main (void)
19677 {
19678 if ((struct tm *) 0)
19679 return 0;
19680   ;
19681   return 0;
19682 }
19683 _ACEOF
19684 rm -f "conftest.$ac_objext"
19685 if { (eval echo "$as_me:19685: \"$ac_compile\"") >&5
19686   (eval $ac_compile) 2>&5
19687   ac_status=$?
19688   echo "$as_me:19688: \$? = $ac_status" >&5
19689   (exit "$ac_status"); } &&
19690          { ac_try='test -s "conftest.$ac_objext"'
19691   { (eval echo "$as_me:19691: \"$ac_try\"") >&5
19692   (eval $ac_try) 2>&5
19693   ac_status=$?
19694   echo "$as_me:19694: \$? = $ac_status" >&5
19695   (exit "$ac_status"); }; }; then
19696   ac_cv_header_time=yes
19697 else
19698   echo "$as_me: failed program was:" >&5
19699 cat "conftest.$ac_ext" >&5
19700 ac_cv_header_time=no
19701 fi
19702 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19703 fi
19704 echo "$as_me:19704: result: $ac_cv_header_time" >&5
19705 echo "${ECHO_T}$ac_cv_header_time" >&6
19706 if test $ac_cv_header_time = yes; then
19707
19708 cat >>confdefs.h <<\EOF
19709 #define TIME_WITH_SYS_TIME 1
19710 EOF
19711
19712 fi
19713
19714 cf_regex_func=no
19715 cf_regex_libs=
19716 case "$host_os" in
19717 (mingw*)
19718         # -lsystre -ltre -lintl -liconv
19719         echo "$as_me:19719: checking for regcomp in -lsystre" >&5
19720 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19721 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19722   echo $ECHO_N "(cached) $ECHO_C" >&6
19723 else
19724   ac_check_lib_save_LIBS=$LIBS
19725 LIBS="-lsystre  $LIBS"
19726 cat >"conftest.$ac_ext" <<_ACEOF
19727 #line 19727 "configure"
19728 #include "confdefs.h"
19729
19730 /* Override any gcc2 internal prototype to avoid an error.  */
19731 #ifdef __cplusplus
19732 extern "C"
19733 #endif
19734 /* We use char because int might match the return type of a gcc2
19735    builtin and then its argument prototype would still apply.  */
19736 char regcomp (void);
19737 int
19738 main (void)
19739 {
19740 regcomp ();
19741   ;
19742   return 0;
19743 }
19744 _ACEOF
19745 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19746 if { (eval echo "$as_me:19746: \"$ac_link\"") >&5
19747   (eval $ac_link) 2>&5
19748   ac_status=$?
19749   echo "$as_me:19749: \$? = $ac_status" >&5
19750   (exit "$ac_status"); } &&
19751          { ac_try='test -s "conftest$ac_exeext"'
19752   { (eval echo "$as_me:19752: \"$ac_try\"") >&5
19753   (eval $ac_try) 2>&5
19754   ac_status=$?
19755   echo "$as_me:19755: \$? = $ac_status" >&5
19756   (exit "$ac_status"); }; }; then
19757   ac_cv_lib_systre_regcomp=yes
19758 else
19759   echo "$as_me: failed program was:" >&5
19760 cat "conftest.$ac_ext" >&5
19761 ac_cv_lib_systre_regcomp=no
19762 fi
19763 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19764 LIBS=$ac_check_lib_save_LIBS
19765 fi
19766 echo "$as_me:19766: result: $ac_cv_lib_systre_regcomp" >&5
19767 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19768 if test "$ac_cv_lib_systre_regcomp" = yes; then
19769
19770                 echo "$as_me:19770: checking for libiconv_open in -liconv" >&5
19771 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19772 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19773   echo $ECHO_N "(cached) $ECHO_C" >&6
19774 else
19775   ac_check_lib_save_LIBS=$LIBS
19776 LIBS="-liconv  $LIBS"
19777 cat >"conftest.$ac_ext" <<_ACEOF
19778 #line 19778 "configure"
19779 #include "confdefs.h"
19780
19781 /* Override any gcc2 internal prototype to avoid an error.  */
19782 #ifdef __cplusplus
19783 extern "C"
19784 #endif
19785 /* We use char because int might match the return type of a gcc2
19786    builtin and then its argument prototype would still apply.  */
19787 char libiconv_open (void);
19788 int
19789 main (void)
19790 {
19791 libiconv_open ();
19792   ;
19793   return 0;
19794 }
19795 _ACEOF
19796 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19797 if { (eval echo "$as_me:19797: \"$ac_link\"") >&5
19798   (eval $ac_link) 2>&5
19799   ac_status=$?
19800   echo "$as_me:19800: \$? = $ac_status" >&5
19801   (exit "$ac_status"); } &&
19802          { ac_try='test -s "conftest$ac_exeext"'
19803   { (eval echo "$as_me:19803: \"$ac_try\"") >&5
19804   (eval $ac_try) 2>&5
19805   ac_status=$?
19806   echo "$as_me:19806: \$? = $ac_status" >&5
19807   (exit "$ac_status"); }; }; then
19808   ac_cv_lib_iconv_libiconv_open=yes
19809 else
19810   echo "$as_me: failed program was:" >&5
19811 cat "conftest.$ac_ext" >&5
19812 ac_cv_lib_iconv_libiconv_open=no
19813 fi
19814 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19815 LIBS=$ac_check_lib_save_LIBS
19816 fi
19817 echo "$as_me:19817: result: $ac_cv_lib_iconv_libiconv_open" >&5
19818 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19819 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19820
19821 cf_add_libs="$LIBS"
19822 # reverse order
19823 cf_add_0lib=
19824 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19825 # filter duplicates
19826 for cf_add_1lib in $cf_add_0lib; do
19827         for cf_add_2lib in $cf_add_libs; do
19828                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19829                         cf_add_1lib=
19830                         break
19831                 fi
19832         done
19833         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19834 done
19835 LIBS="$cf_add_libs"
19836
19837 fi
19838
19839                 echo "$as_me:19839: checking for libintl_gettext in -lintl" >&5
19840 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19841 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19842   echo $ECHO_N "(cached) $ECHO_C" >&6
19843 else
19844   ac_check_lib_save_LIBS=$LIBS
19845 LIBS="-lintl  $LIBS"
19846 cat >"conftest.$ac_ext" <<_ACEOF
19847 #line 19847 "configure"
19848 #include "confdefs.h"
19849
19850 /* Override any gcc2 internal prototype to avoid an error.  */
19851 #ifdef __cplusplus
19852 extern "C"
19853 #endif
19854 /* We use char because int might match the return type of a gcc2
19855    builtin and then its argument prototype would still apply.  */
19856 char libintl_gettext (void);
19857 int
19858 main (void)
19859 {
19860 libintl_gettext ();
19861   ;
19862   return 0;
19863 }
19864 _ACEOF
19865 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19866 if { (eval echo "$as_me:19866: \"$ac_link\"") >&5
19867   (eval $ac_link) 2>&5
19868   ac_status=$?
19869   echo "$as_me:19869: \$? = $ac_status" >&5
19870   (exit "$ac_status"); } &&
19871          { ac_try='test -s "conftest$ac_exeext"'
19872   { (eval echo "$as_me:19872: \"$ac_try\"") >&5
19873   (eval $ac_try) 2>&5
19874   ac_status=$?
19875   echo "$as_me:19875: \$? = $ac_status" >&5
19876   (exit "$ac_status"); }; }; then
19877   ac_cv_lib_intl_libintl_gettext=yes
19878 else
19879   echo "$as_me: failed program was:" >&5
19880 cat "conftest.$ac_ext" >&5
19881 ac_cv_lib_intl_libintl_gettext=no
19882 fi
19883 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19884 LIBS=$ac_check_lib_save_LIBS
19885 fi
19886 echo "$as_me:19886: result: $ac_cv_lib_intl_libintl_gettext" >&5
19887 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19888 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19889
19890 cf_add_libs="$LIBS"
19891 # reverse order
19892 cf_add_0lib=
19893 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19894 # filter duplicates
19895 for cf_add_1lib in $cf_add_0lib; do
19896         for cf_add_2lib in $cf_add_libs; do
19897                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19898                         cf_add_1lib=
19899                         break
19900                 fi
19901         done
19902         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19903 done
19904 LIBS="$cf_add_libs"
19905
19906 fi
19907
19908                 echo "$as_me:19908: checking for tre_regcomp in -ltre" >&5
19909 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19910 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19911   echo $ECHO_N "(cached) $ECHO_C" >&6
19912 else
19913   ac_check_lib_save_LIBS=$LIBS
19914 LIBS="-ltre  $LIBS"
19915 cat >"conftest.$ac_ext" <<_ACEOF
19916 #line 19916 "configure"
19917 #include "confdefs.h"
19918
19919 /* Override any gcc2 internal prototype to avoid an error.  */
19920 #ifdef __cplusplus
19921 extern "C"
19922 #endif
19923 /* We use char because int might match the return type of a gcc2
19924    builtin and then its argument prototype would still apply.  */
19925 char tre_regcomp (void);
19926 int
19927 main (void)
19928 {
19929 tre_regcomp ();
19930   ;
19931   return 0;
19932 }
19933 _ACEOF
19934 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19935 if { (eval echo "$as_me:19935: \"$ac_link\"") >&5
19936   (eval $ac_link) 2>&5
19937   ac_status=$?
19938   echo "$as_me:19938: \$? = $ac_status" >&5
19939   (exit "$ac_status"); } &&
19940          { ac_try='test -s "conftest$ac_exeext"'
19941   { (eval echo "$as_me:19941: \"$ac_try\"") >&5
19942   (eval $ac_try) 2>&5
19943   ac_status=$?
19944   echo "$as_me:19944: \$? = $ac_status" >&5
19945   (exit "$ac_status"); }; }; then
19946   ac_cv_lib_tre_tre_regcomp=yes
19947 else
19948   echo "$as_me: failed program was:" >&5
19949 cat "conftest.$ac_ext" >&5
19950 ac_cv_lib_tre_tre_regcomp=no
19951 fi
19952 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19953 LIBS=$ac_check_lib_save_LIBS
19954 fi
19955 echo "$as_me:19955: result: $ac_cv_lib_tre_tre_regcomp" >&5
19956 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19957 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19958
19959 cf_add_libs="$LIBS"
19960 # reverse order
19961 cf_add_0lib=
19962 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19963 # filter duplicates
19964 for cf_add_1lib in $cf_add_0lib; do
19965         for cf_add_2lib in $cf_add_libs; do
19966                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19967                         cf_add_1lib=
19968                         break
19969                 fi
19970         done
19971         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19972 done
19973 LIBS="$cf_add_libs"
19974
19975 fi
19976
19977 cf_add_libs="$LIBS"
19978 # reverse order
19979 cf_add_0lib=
19980 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19981 # filter duplicates
19982 for cf_add_1lib in $cf_add_0lib; do
19983         for cf_add_2lib in $cf_add_libs; do
19984                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19985                         cf_add_1lib=
19986                         break
19987                 fi
19988         done
19989         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19990 done
19991 LIBS="$cf_add_libs"
19992
19993                 cf_regex_func=regcomp
19994
19995 else
19996
19997                 echo "$as_me:19997: checking for regcomp in -lgnurx" >&5
19998 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19999 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
20000   echo $ECHO_N "(cached) $ECHO_C" >&6
20001 else
20002   ac_check_lib_save_LIBS=$LIBS
20003 LIBS="-lgnurx  $LIBS"
20004 cat >"conftest.$ac_ext" <<_ACEOF
20005 #line 20005 "configure"
20006 #include "confdefs.h"
20007
20008 /* Override any gcc2 internal prototype to avoid an error.  */
20009 #ifdef __cplusplus
20010 extern "C"
20011 #endif
20012 /* We use char because int might match the return type of a gcc2
20013    builtin and then its argument prototype would still apply.  */
20014 char regcomp (void);
20015 int
20016 main (void)
20017 {
20018 regcomp ();
20019   ;
20020   return 0;
20021 }
20022 _ACEOF
20023 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20024 if { (eval echo "$as_me:20024: \"$ac_link\"") >&5
20025   (eval $ac_link) 2>&5
20026   ac_status=$?
20027   echo "$as_me:20027: \$? = $ac_status" >&5
20028   (exit "$ac_status"); } &&
20029          { ac_try='test -s "conftest$ac_exeext"'
20030   { (eval echo "$as_me:20030: \"$ac_try\"") >&5
20031   (eval $ac_try) 2>&5
20032   ac_status=$?
20033   echo "$as_me:20033: \$? = $ac_status" >&5
20034   (exit "$ac_status"); }; }; then
20035   ac_cv_lib_gnurx_regcomp=yes
20036 else
20037   echo "$as_me: failed program was:" >&5
20038 cat "conftest.$ac_ext" >&5
20039 ac_cv_lib_gnurx_regcomp=no
20040 fi
20041 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20042 LIBS=$ac_check_lib_save_LIBS
20043 fi
20044 echo "$as_me:20044: result: $ac_cv_lib_gnurx_regcomp" >&5
20045 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
20046 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
20047
20048 cf_add_libs="$LIBS"
20049 # reverse order
20050 cf_add_0lib=
20051 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20052 # filter duplicates
20053 for cf_add_1lib in $cf_add_0lib; do
20054         for cf_add_2lib in $cf_add_libs; do
20055                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20056                         cf_add_1lib=
20057                         break
20058                 fi
20059         done
20060         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20061 done
20062 LIBS="$cf_add_libs"
20063
20064                         cf_regex_func=regcomp
20065 fi
20066
20067 fi
20068
20069         ;;
20070 (*)
20071         cf_regex_libs="regex re"
20072         echo "$as_me:20072: checking for regcomp" >&5
20073 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
20074 if test "${ac_cv_func_regcomp+set}" = set; then
20075   echo $ECHO_N "(cached) $ECHO_C" >&6
20076 else
20077   cat >"conftest.$ac_ext" <<_ACEOF
20078 #line 20078 "configure"
20079 #include "confdefs.h"
20080 #define regcomp autoconf_temporary
20081 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20082 #undef regcomp
20083
20084 #ifdef __cplusplus
20085 extern "C"
20086 #endif
20087
20088 /* We use char because int might match the return type of a gcc2
20089    builtin and then its argument prototype would still apply.  */
20090 char regcomp (void);
20091
20092 int
20093 main (void)
20094 {
20095
20096 /* The GNU C library defines stubs for functions which it implements
20097     to always fail with ENOSYS.  Some functions are actually named
20098     something starting with __ and the normal name is an alias.  */
20099 #if defined (__stub_regcomp) || defined (__stub___regcomp)
20100 #error found stub for regcomp
20101 #endif
20102
20103         return regcomp ();
20104   ;
20105   return 0;
20106 }
20107 _ACEOF
20108 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20109 if { (eval echo "$as_me:20109: \"$ac_link\"") >&5
20110   (eval $ac_link) 2>&5
20111   ac_status=$?
20112   echo "$as_me:20112: \$? = $ac_status" >&5
20113   (exit "$ac_status"); } &&
20114          { ac_try='test -s "conftest$ac_exeext"'
20115   { (eval echo "$as_me:20115: \"$ac_try\"") >&5
20116   (eval $ac_try) 2>&5
20117   ac_status=$?
20118   echo "$as_me:20118: \$? = $ac_status" >&5
20119   (exit "$ac_status"); }; }; then
20120   ac_cv_func_regcomp=yes
20121 else
20122   echo "$as_me: failed program was:" >&5
20123 cat "conftest.$ac_ext" >&5
20124 ac_cv_func_regcomp=no
20125 fi
20126 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20127 fi
20128 echo "$as_me:20128: result: $ac_cv_func_regcomp" >&5
20129 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
20130 if test "$ac_cv_func_regcomp" = yes; then
20131   cf_regex_func=regcomp
20132 else
20133
20134                 for cf_regex_lib in $cf_regex_libs
20135                 do
20136                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
20137 echo "$as_me:20137: checking for regcomp in -l$cf_regex_lib" >&5
20138 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
20139 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
20140   echo $ECHO_N "(cached) $ECHO_C" >&6
20141 else
20142   ac_check_lib_save_LIBS=$LIBS
20143 LIBS="-l$cf_regex_lib  $LIBS"
20144 cat >"conftest.$ac_ext" <<_ACEOF
20145 #line 20145 "configure"
20146 #include "confdefs.h"
20147
20148 /* Override any gcc2 internal prototype to avoid an error.  */
20149 #ifdef __cplusplus
20150 extern "C"
20151 #endif
20152 /* We use char because int might match the return type of a gcc2
20153    builtin and then its argument prototype would still apply.  */
20154 char regcomp (void);
20155 int
20156 main (void)
20157 {
20158 regcomp ();
20159   ;
20160   return 0;
20161 }
20162 _ACEOF
20163 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20164 if { (eval echo "$as_me:20164: \"$ac_link\"") >&5
20165   (eval $ac_link) 2>&5
20166   ac_status=$?
20167   echo "$as_me:20167: \$? = $ac_status" >&5
20168   (exit "$ac_status"); } &&
20169          { ac_try='test -s "conftest$ac_exeext"'
20170   { (eval echo "$as_me:20170: \"$ac_try\"") >&5
20171   (eval $ac_try) 2>&5
20172   ac_status=$?
20173   echo "$as_me:20173: \$? = $ac_status" >&5
20174   (exit "$ac_status"); }; }; then
20175   eval "$as_ac_Lib=yes"
20176 else
20177   echo "$as_me: failed program was:" >&5
20178 cat "conftest.$ac_ext" >&5
20179 eval "$as_ac_Lib=no"
20180 fi
20181 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20182 LIBS=$ac_check_lib_save_LIBS
20183 fi
20184 echo "$as_me:20184: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
20185 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
20186 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
20187
20188 cf_add_libs="$LIBS"
20189 # reverse order
20190 cf_add_0lib=
20191 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20192 # filter duplicates
20193 for cf_add_1lib in $cf_add_0lib; do
20194         for cf_add_2lib in $cf_add_libs; do
20195                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20196                         cf_add_1lib=
20197                         break
20198                 fi
20199         done
20200         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20201 done
20202 LIBS="$cf_add_libs"
20203
20204                                         cf_regex_func=regcomp
20205                                         break
20206 fi
20207
20208                 done
20209
20210 fi
20211
20212         ;;
20213 esac
20214
20215 if test "$cf_regex_func" = no ; then
20216         echo "$as_me:20216: checking for compile" >&5
20217 echo $ECHO_N "checking for compile... $ECHO_C" >&6
20218 if test "${ac_cv_func_compile+set}" = set; then
20219   echo $ECHO_N "(cached) $ECHO_C" >&6
20220 else
20221   cat >"conftest.$ac_ext" <<_ACEOF
20222 #line 20222 "configure"
20223 #include "confdefs.h"
20224 #define compile autoconf_temporary
20225 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20226 #undef compile
20227
20228 #ifdef __cplusplus
20229 extern "C"
20230 #endif
20231
20232 /* We use char because int might match the return type of a gcc2
20233    builtin and then its argument prototype would still apply.  */
20234 char compile (void);
20235
20236 int
20237 main (void)
20238 {
20239
20240 /* The GNU C library defines stubs for functions which it implements
20241     to always fail with ENOSYS.  Some functions are actually named
20242     something starting with __ and the normal name is an alias.  */
20243 #if defined (__stub_compile) || defined (__stub___compile)
20244 #error found stub for compile
20245 #endif
20246
20247         return compile ();
20248   ;
20249   return 0;
20250 }
20251 _ACEOF
20252 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20253 if { (eval echo "$as_me:20253: \"$ac_link\"") >&5
20254   (eval $ac_link) 2>&5
20255   ac_status=$?
20256   echo "$as_me:20256: \$? = $ac_status" >&5
20257   (exit "$ac_status"); } &&
20258          { ac_try='test -s "conftest$ac_exeext"'
20259   { (eval echo "$as_me:20259: \"$ac_try\"") >&5
20260   (eval $ac_try) 2>&5
20261   ac_status=$?
20262   echo "$as_me:20262: \$? = $ac_status" >&5
20263   (exit "$ac_status"); }; }; then
20264   ac_cv_func_compile=yes
20265 else
20266   echo "$as_me: failed program was:" >&5
20267 cat "conftest.$ac_ext" >&5
20268 ac_cv_func_compile=no
20269 fi
20270 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20271 fi
20272 echo "$as_me:20272: result: $ac_cv_func_compile" >&5
20273 echo "${ECHO_T}$ac_cv_func_compile" >&6
20274 if test "$ac_cv_func_compile" = yes; then
20275   cf_regex_func=compile
20276 else
20277
20278                 echo "$as_me:20278: checking for compile in -lgen" >&5
20279 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20280 if test "${ac_cv_lib_gen_compile+set}" = set; then
20281   echo $ECHO_N "(cached) $ECHO_C" >&6
20282 else
20283   ac_check_lib_save_LIBS=$LIBS
20284 LIBS="-lgen  $LIBS"
20285 cat >"conftest.$ac_ext" <<_ACEOF
20286 #line 20286 "configure"
20287 #include "confdefs.h"
20288
20289 /* Override any gcc2 internal prototype to avoid an error.  */
20290 #ifdef __cplusplus
20291 extern "C"
20292 #endif
20293 /* We use char because int might match the return type of a gcc2
20294    builtin and then its argument prototype would still apply.  */
20295 char compile (void);
20296 int
20297 main (void)
20298 {
20299 compile ();
20300   ;
20301   return 0;
20302 }
20303 _ACEOF
20304 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20305 if { (eval echo "$as_me:20305: \"$ac_link\"") >&5
20306   (eval $ac_link) 2>&5
20307   ac_status=$?
20308   echo "$as_me:20308: \$? = $ac_status" >&5
20309   (exit "$ac_status"); } &&
20310          { ac_try='test -s "conftest$ac_exeext"'
20311   { (eval echo "$as_me:20311: \"$ac_try\"") >&5
20312   (eval $ac_try) 2>&5
20313   ac_status=$?
20314   echo "$as_me:20314: \$? = $ac_status" >&5
20315   (exit "$ac_status"); }; }; then
20316   ac_cv_lib_gen_compile=yes
20317 else
20318   echo "$as_me: failed program was:" >&5
20319 cat "conftest.$ac_ext" >&5
20320 ac_cv_lib_gen_compile=no
20321 fi
20322 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20323 LIBS=$ac_check_lib_save_LIBS
20324 fi
20325 echo "$as_me:20325: result: $ac_cv_lib_gen_compile" >&5
20326 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20327 if test "$ac_cv_lib_gen_compile" = yes; then
20328
20329 cf_add_libs="$LIBS"
20330 # reverse order
20331 cf_add_0lib=
20332 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20333 # filter duplicates
20334 for cf_add_1lib in $cf_add_0lib; do
20335         for cf_add_2lib in $cf_add_libs; do
20336                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20337                         cf_add_1lib=
20338                         break
20339                 fi
20340         done
20341         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20342 done
20343 LIBS="$cf_add_libs"
20344
20345                                 cf_regex_func=compile
20346 fi
20347
20348 fi
20349
20350 fi
20351
20352 if test "$cf_regex_func" = no ; then
20353         { echo "$as_me:20353: WARNING: cannot find regular expression library" >&5
20354 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20355 fi
20356
20357 echo "$as_me:20357: checking for regular-expression headers" >&5
20358 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20359 if test "${cf_cv_regex_hdrs+set}" = set; then
20360   echo $ECHO_N "(cached) $ECHO_C" >&6
20361 else
20362
20363 cf_cv_regex_hdrs=no
20364 case "$cf_regex_func" in
20365 (compile)
20366         for cf_regex_hdr in regexp.h regexpr.h
20367         do
20368                 cat >"conftest.$ac_ext" <<_ACEOF
20369 #line 20369 "configure"
20370 #include "confdefs.h"
20371 #include <$cf_regex_hdr>
20372 int
20373 main (void)
20374 {
20375
20376                         char *p = compile("", "", "", 0);
20377                         int x = step("", "");
20378                         (void)p;
20379                         (void)x;
20380
20381   ;
20382   return 0;
20383 }
20384 _ACEOF
20385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20386 if { (eval echo "$as_me:20386: \"$ac_link\"") >&5
20387   (eval $ac_link) 2>&5
20388   ac_status=$?
20389   echo "$as_me:20389: \$? = $ac_status" >&5
20390   (exit "$ac_status"); } &&
20391          { ac_try='test -s "conftest$ac_exeext"'
20392   { (eval echo "$as_me:20392: \"$ac_try\"") >&5
20393   (eval $ac_try) 2>&5
20394   ac_status=$?
20395   echo "$as_me:20395: \$? = $ac_status" >&5
20396   (exit "$ac_status"); }; }; then
20397
20398                         cf_cv_regex_hdrs=$cf_regex_hdr
20399                         break
20400
20401 else
20402   echo "$as_me: failed program was:" >&5
20403 cat "conftest.$ac_ext" >&5
20404 fi
20405 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20406         done
20407         ;;
20408 (*)
20409         for cf_regex_hdr in regex.h
20410         do
20411                 cat >"conftest.$ac_ext" <<_ACEOF
20412 #line 20412 "configure"
20413 #include "confdefs.h"
20414 #include <sys/types.h>
20415 #include <$cf_regex_hdr>
20416 int
20417 main (void)
20418 {
20419
20420                         regex_t *p = 0;
20421                         int x = regcomp(p, "", 0);
20422                         int y = regexec(p, "", 0, 0, 0);
20423                         (void)x;
20424                         (void)y;
20425                         regfree(p);
20426
20427   ;
20428   return 0;
20429 }
20430 _ACEOF
20431 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20432 if { (eval echo "$as_me:20432: \"$ac_link\"") >&5
20433   (eval $ac_link) 2>&5
20434   ac_status=$?
20435   echo "$as_me:20435: \$? = $ac_status" >&5
20436   (exit "$ac_status"); } &&
20437          { ac_try='test -s "conftest$ac_exeext"'
20438   { (eval echo "$as_me:20438: \"$ac_try\"") >&5
20439   (eval $ac_try) 2>&5
20440   ac_status=$?
20441   echo "$as_me:20441: \$? = $ac_status" >&5
20442   (exit "$ac_status"); }; }; then
20443
20444                         cf_cv_regex_hdrs=$cf_regex_hdr
20445                         break
20446
20447 else
20448   echo "$as_me: failed program was:" >&5
20449 cat "conftest.$ac_ext" >&5
20450 fi
20451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20452         done
20453         ;;
20454 esac
20455
20456 fi
20457 echo "$as_me:20457: result: $cf_cv_regex_hdrs" >&5
20458 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20459
20460 case "$cf_cv_regex_hdrs" in
20461         (no)            { echo "$as_me:20461: WARNING: no regular expression header found" >&5
20462 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20463         (regex.h)
20464 cat >>confdefs.h <<\EOF
20465 #define HAVE_REGEX_H_FUNCS 1
20466 EOF
20467  ;;
20468         (regexp.h)
20469 cat >>confdefs.h <<\EOF
20470 #define HAVE_REGEXP_H_FUNCS 1
20471 EOF
20472  ;;
20473         (regexpr.h)
20474 cat >>confdefs.h <<\EOF
20475 #define HAVE_REGEXPR_H_FUNCS 1
20476 EOF
20477  ;;
20478 esac
20479
20480 for ac_header in \
20481 fcntl.h \
20482 getopt.h \
20483 limits.h \
20484 locale.h \
20485 math.h \
20486 poll.h \
20487 sys/auxv.h \
20488 sys/ioctl.h \
20489 sys/param.h \
20490 sys/poll.h \
20491 sys/select.h \
20492 sys/time.h \
20493 sys/times.h \
20494 unistd.h \
20495 wctype.h \
20496
20497 do
20498 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20499 echo "$as_me:20499: checking for $ac_header" >&5
20500 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20501 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20502   echo $ECHO_N "(cached) $ECHO_C" >&6
20503 else
20504   cat >"conftest.$ac_ext" <<_ACEOF
20505 #line 20505 "configure"
20506 #include "confdefs.h"
20507 #include <$ac_header>
20508 _ACEOF
20509 if { (eval echo "$as_me:20509: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20510   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20511   ac_status=$?
20512   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20513   rm -f conftest.er1
20514   cat conftest.err >&5
20515   echo "$as_me:20515: \$? = $ac_status" >&5
20516   (exit "$ac_status"); } >/dev/null; then
20517   if test -s conftest.err; then
20518     ac_cpp_err=$ac_c_preproc_warn_flag
20519   else
20520     ac_cpp_err=
20521   fi
20522 else
20523   ac_cpp_err=yes
20524 fi
20525 if test -z "$ac_cpp_err"; then
20526   eval "$as_ac_Header=yes"
20527 else
20528   echo "$as_me: failed program was:" >&5
20529   cat "conftest.$ac_ext" >&5
20530   eval "$as_ac_Header=no"
20531 fi
20532 rm -f conftest.err "conftest.$ac_ext"
20533 fi
20534 echo "$as_me:20534: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20535 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20536 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20537   cat >>confdefs.h <<EOF
20538 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20539 EOF
20540
20541 fi
20542 done
20543
20544 for ac_header in unistd.h getopt.h
20545 do
20546 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20547 echo "$as_me:20547: checking for $ac_header" >&5
20548 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20549 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20550   echo $ECHO_N "(cached) $ECHO_C" >&6
20551 else
20552   cat >"conftest.$ac_ext" <<_ACEOF
20553 #line 20553 "configure"
20554 #include "confdefs.h"
20555 #include <$ac_header>
20556 _ACEOF
20557 if { (eval echo "$as_me:20557: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20558   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20559   ac_status=$?
20560   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20561   rm -f conftest.er1
20562   cat conftest.err >&5
20563   echo "$as_me:20563: \$? = $ac_status" >&5
20564   (exit "$ac_status"); } >/dev/null; then
20565   if test -s conftest.err; then
20566     ac_cpp_err=$ac_c_preproc_warn_flag
20567   else
20568     ac_cpp_err=
20569   fi
20570 else
20571   ac_cpp_err=yes
20572 fi
20573 if test -z "$ac_cpp_err"; then
20574   eval "$as_ac_Header=yes"
20575 else
20576   echo "$as_me: failed program was:" >&5
20577   cat "conftest.$ac_ext" >&5
20578   eval "$as_ac_Header=no"
20579 fi
20580 rm -f conftest.err "conftest.$ac_ext"
20581 fi
20582 echo "$as_me:20582: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20583 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20584 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20585   cat >>confdefs.h <<EOF
20586 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20587 EOF
20588
20589 fi
20590 done
20591
20592 echo "$as_me:20592: checking for header declaring getopt variables" >&5
20593 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20594 if test "${cf_cv_getopt_header+set}" = set; then
20595   echo $ECHO_N "(cached) $ECHO_C" >&6
20596 else
20597
20598 cf_cv_getopt_header=none
20599 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20600 do
20601 cat >"conftest.$ac_ext" <<_ACEOF
20602 #line 20602 "configure"
20603 #include "confdefs.h"
20604
20605 #include <$cf_header>
20606 int
20607 main (void)
20608 {
20609 int x = optind; char *y = optarg; (void)x; (void)y
20610   ;
20611   return 0;
20612 }
20613 _ACEOF
20614 rm -f "conftest.$ac_objext"
20615 if { (eval echo "$as_me:20615: \"$ac_compile\"") >&5
20616   (eval $ac_compile) 2>&5
20617   ac_status=$?
20618   echo "$as_me:20618: \$? = $ac_status" >&5
20619   (exit "$ac_status"); } &&
20620          { ac_try='test -s "conftest.$ac_objext"'
20621   { (eval echo "$as_me:20621: \"$ac_try\"") >&5
20622   (eval $ac_try) 2>&5
20623   ac_status=$?
20624   echo "$as_me:20624: \$? = $ac_status" >&5
20625   (exit "$ac_status"); }; }; then
20626   cf_cv_getopt_header=$cf_header
20627  break
20628 else
20629   echo "$as_me: failed program was:" >&5
20630 cat "conftest.$ac_ext" >&5
20631 fi
20632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20633 done
20634
20635 fi
20636 echo "$as_me:20636: result: $cf_cv_getopt_header" >&5
20637 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20638 if test "$cf_cv_getopt_header" != none ; then
20639
20640 cat >>confdefs.h <<\EOF
20641 #define HAVE_GETOPT_HEADER 1
20642 EOF
20643
20644 fi
20645 if test "$cf_cv_getopt_header" = getopt.h ; then
20646
20647 cat >>confdefs.h <<\EOF
20648 #define NEED_GETOPT_H 1
20649 EOF
20650
20651 fi
20652
20653 echo "$as_me:20653: checking if external environ is declared" >&5
20654 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20655 if test "${cf_cv_dcl_environ+set}" = set; then
20656   echo $ECHO_N "(cached) $ECHO_C" >&6
20657 else
20658
20659     cat >"conftest.$ac_ext" <<_ACEOF
20660 #line 20660 "configure"
20661 #include "confdefs.h"
20662
20663 $ac_includes_default
20664 int
20665 main (void)
20666 {
20667 void* x = (void*) environ; (void)x
20668   ;
20669   return 0;
20670 }
20671 _ACEOF
20672 rm -f "conftest.$ac_objext"
20673 if { (eval echo "$as_me:20673: \"$ac_compile\"") >&5
20674   (eval $ac_compile) 2>&5
20675   ac_status=$?
20676   echo "$as_me:20676: \$? = $ac_status" >&5
20677   (exit "$ac_status"); } &&
20678          { ac_try='test -s "conftest.$ac_objext"'
20679   { (eval echo "$as_me:20679: \"$ac_try\"") >&5
20680   (eval $ac_try) 2>&5
20681   ac_status=$?
20682   echo "$as_me:20682: \$? = $ac_status" >&5
20683   (exit "$ac_status"); }; }; then
20684   cf_cv_dcl_environ=yes
20685 else
20686   echo "$as_me: failed program was:" >&5
20687 cat "conftest.$ac_ext" >&5
20688 cf_cv_dcl_environ=no
20689 fi
20690 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20691
20692 fi
20693 echo "$as_me:20693: result: $cf_cv_dcl_environ" >&5
20694 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20695
20696 if test "$cf_cv_dcl_environ" = no ; then
20697
20698 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20699
20700     cat >>confdefs.h <<EOF
20701 #define $cf_result 1
20702 EOF
20703
20704 fi
20705
20706 # It's possible (for near-UNIX clones) that the data doesn't exist
20707
20708 echo "$as_me:20708: checking if external environ exists" >&5
20709 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20710 if test "${cf_cv_have_environ+set}" = set; then
20711   echo $ECHO_N "(cached) $ECHO_C" >&6
20712 else
20713
20714         cat >"conftest.$ac_ext" <<_ACEOF
20715 #line 20715 "configure"
20716 #include "confdefs.h"
20717
20718 #undef environ
20719 extern int environ;
20720
20721 int
20722 main (void)
20723 {
20724 environ = 2
20725   ;
20726   return 0;
20727 }
20728 _ACEOF
20729 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20730 if { (eval echo "$as_me:20730: \"$ac_link\"") >&5
20731   (eval $ac_link) 2>&5
20732   ac_status=$?
20733   echo "$as_me:20733: \$? = $ac_status" >&5
20734   (exit "$ac_status"); } &&
20735          { ac_try='test -s "conftest$ac_exeext"'
20736   { (eval echo "$as_me:20736: \"$ac_try\"") >&5
20737   (eval $ac_try) 2>&5
20738   ac_status=$?
20739   echo "$as_me:20739: \$? = $ac_status" >&5
20740   (exit "$ac_status"); }; }; then
20741   cf_cv_have_environ=yes
20742 else
20743   echo "$as_me: failed program was:" >&5
20744 cat "conftest.$ac_ext" >&5
20745 cf_cv_have_environ=no
20746 fi
20747 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20748
20749 fi
20750 echo "$as_me:20750: result: $cf_cv_have_environ" >&5
20751 echo "${ECHO_T}$cf_cv_have_environ" >&6
20752
20753 if test "$cf_cv_have_environ" = yes ; then
20754
20755 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20756
20757         cat >>confdefs.h <<EOF
20758 #define $cf_result 1
20759 EOF
20760
20761 fi
20762
20763 echo "$as_me:20763: checking for getenv" >&5
20764 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20765 if test "${ac_cv_func_getenv+set}" = set; then
20766   echo $ECHO_N "(cached) $ECHO_C" >&6
20767 else
20768   cat >"conftest.$ac_ext" <<_ACEOF
20769 #line 20769 "configure"
20770 #include "confdefs.h"
20771 #define getenv autoconf_temporary
20772 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20773 #undef getenv
20774
20775 #ifdef __cplusplus
20776 extern "C"
20777 #endif
20778
20779 /* We use char because int might match the return type of a gcc2
20780    builtin and then its argument prototype would still apply.  */
20781 char getenv (void);
20782
20783 int
20784 main (void)
20785 {
20786
20787 /* The GNU C library defines stubs for functions which it implements
20788     to always fail with ENOSYS.  Some functions are actually named
20789     something starting with __ and the normal name is an alias.  */
20790 #if defined (__stub_getenv) || defined (__stub___getenv)
20791 #error found stub for getenv
20792 #endif
20793
20794         return getenv ();
20795   ;
20796   return 0;
20797 }
20798 _ACEOF
20799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20800 if { (eval echo "$as_me:20800: \"$ac_link\"") >&5
20801   (eval $ac_link) 2>&5
20802   ac_status=$?
20803   echo "$as_me:20803: \$? = $ac_status" >&5
20804   (exit "$ac_status"); } &&
20805          { ac_try='test -s "conftest$ac_exeext"'
20806   { (eval echo "$as_me:20806: \"$ac_try\"") >&5
20807   (eval $ac_try) 2>&5
20808   ac_status=$?
20809   echo "$as_me:20809: \$? = $ac_status" >&5
20810   (exit "$ac_status"); }; }; then
20811   ac_cv_func_getenv=yes
20812 else
20813   echo "$as_me: failed program was:" >&5
20814 cat "conftest.$ac_ext" >&5
20815 ac_cv_func_getenv=no
20816 fi
20817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20818 fi
20819 echo "$as_me:20819: result: $ac_cv_func_getenv" >&5
20820 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20821
20822 for ac_func in putenv setenv strdup
20823 do
20824 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20825 echo "$as_me:20825: checking for $ac_func" >&5
20826 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20827 if eval "test \"\${$as_ac_var+set}\" = set"; then
20828   echo $ECHO_N "(cached) $ECHO_C" >&6
20829 else
20830   cat >"conftest.$ac_ext" <<_ACEOF
20831 #line 20831 "configure"
20832 #include "confdefs.h"
20833 #define $ac_func autoconf_temporary
20834 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20835 #undef $ac_func
20836
20837 #ifdef __cplusplus
20838 extern "C"
20839 #endif
20840
20841 /* We use char because int might match the return type of a gcc2
20842    builtin and then its argument prototype would still apply.  */
20843 char $ac_func (void);
20844
20845 int
20846 main (void)
20847 {
20848
20849 /* The GNU C library defines stubs for functions which it implements
20850     to always fail with ENOSYS.  Some functions are actually named
20851     something starting with __ and the normal name is an alias.  */
20852 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20853 #error found stub for $ac_func
20854 #endif
20855
20856         return $ac_func ();
20857   ;
20858   return 0;
20859 }
20860 _ACEOF
20861 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20862 if { (eval echo "$as_me:20862: \"$ac_link\"") >&5
20863   (eval $ac_link) 2>&5
20864   ac_status=$?
20865   echo "$as_me:20865: \$? = $ac_status" >&5
20866   (exit "$ac_status"); } &&
20867          { ac_try='test -s "conftest$ac_exeext"'
20868   { (eval echo "$as_me:20868: \"$ac_try\"") >&5
20869   (eval $ac_try) 2>&5
20870   ac_status=$?
20871   echo "$as_me:20871: \$? = $ac_status" >&5
20872   (exit "$ac_status"); }; }; then
20873   eval "$as_ac_var=yes"
20874 else
20875   echo "$as_me: failed program was:" >&5
20876 cat "conftest.$ac_ext" >&5
20877 eval "$as_ac_var=no"
20878 fi
20879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20880 fi
20881 echo "$as_me:20881: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20882 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20883 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20884   cat >>confdefs.h <<EOF
20885 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20886 EOF
20887
20888 fi
20889 done
20890
20891 echo "$as_me:20891: checking if getenv returns consistent values" >&5
20892 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20893 if test "${cf_cv_consistent_getenv+set}" = set; then
20894   echo $ECHO_N "(cached) $ECHO_C" >&6
20895 else
20896
20897 if test "$cross_compiling" = yes; then
20898   cf_cv_consistent_getenv=unknown
20899 else
20900   cat >"conftest.$ac_ext" <<_ACEOF
20901 #line 20901 "configure"
20902 #include "confdefs.h"
20903
20904 $ac_includes_default
20905
20906 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20907 extern char **environ;  /* POSIX, but some systems are not... */
20908 #endif
20909
20910 #if defined(HAVE_STRDUP)
20911 #define str_alloc(s) strdup(s)
20912 #else
20913 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20914 #endif
20915
20916 static void set_value(const char *name, const char *value)
20917 {
20918 #if defined(HAVE_SETENV)
20919         setenv(name, value, 1);
20920 #elif defined(HAVE_PUTENV)
20921         char buffer[1024];
20922         sprintf(buffer, "%s=%s", name, value);
20923         putenv(str_alloc(buffer));
20924 #else
20925 #error neither putenv/setenv found
20926 #endif
20927 }
20928 int main(void)
20929 {
20930         int pass;
20931         size_t numenv, limit, j;
20932         char **mynames;
20933         char **myvalues;
20934         char **mypointer;
20935         char *equals;
20936         for (numenv = 0; environ[numenv]; ++numenv) ;
20937         limit = numenv + 10;
20938         mynames = (char **) calloc(limit + 1, sizeof(char *));
20939         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20940         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20941 #if defined(HAVE_ENVIRON)
20942         for (j = 0; environ[j]; ++j) {
20943                 mynames[j] = str_alloc(environ[j]);
20944                 equals = strchr(mynames[j], '=');
20945                 if (equals != 0) {
20946                         *equals++ = '\\0';
20947                         myvalues[j] = str_alloc(equals);
20948                 } else {
20949                         myvalues[j] = str_alloc("");
20950                 }
20951         }
20952 #endif
20953         for (j = numenv; j < limit; ++j) {
20954                 char name[80];
20955                 char value[80];
20956                 size_t found;
20957                 size_t k = 0;
20958                 do {
20959                         size_t jk;
20960                         found = 0;
20961                         sprintf(name, "TERM%lu", (unsigned long) k);
20962                         for (jk = 0; jk < j; ++jk) {
20963                                 if (!strcmp(name, mynames[jk])) {
20964                                         found = 1;
20965                                         ++k;
20966                                         break;
20967                                 }
20968                         }
20969                 } while (found);
20970                 sprintf(value, "%lu:%p", (unsigned long) k, (void*)&mynames[j]);
20971                 set_value(name, value);
20972                 mynames[j] = str_alloc(name);
20973                 myvalues[j] = str_alloc(value);
20974         }
20975         for (pass = 0; pass < 3; ++pass) {
20976                 for (j = 0; j < limit; ++j) {
20977                         char *value = getenv(mynames[j]);
20978                         if (pass) {
20979                                 if (value == 0) {
20980                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20981                                         ${cf_cv_main_return:-return}(1);
20982                                 } else if (value != mypointer[j]) {
20983                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20984                                         ${cf_cv_main_return:-return}(1);
20985                                 } else if (strcmp(value, myvalues[j])) {
20986                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20987                                         ${cf_cv_main_return:-return}(1);
20988                                 }
20989                         } else {
20990                                 size_t k;
20991                                 mypointer[j] = value;
20992                                 for (k = 0; k < j; ++k) {
20993                                         if (mypointer[j] == mypointer[k]) {
20994                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20995                                                 ${cf_cv_main_return:-return}(1);
20996                                         }
20997                                 }
20998                         }
20999                 }
21000         }
21001         ${cf_cv_main_return:-return}(0);
21002 }
21003
21004 _ACEOF
21005 rm -f "conftest$ac_exeext"
21006 if { (eval echo "$as_me:21006: \"$ac_link\"") >&5
21007   (eval $ac_link) 2>&5
21008   ac_status=$?
21009   echo "$as_me:21009: \$? = $ac_status" >&5
21010   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21011   { (eval echo "$as_me:21011: \"$ac_try\"") >&5
21012   (eval $ac_try) 2>&5
21013   ac_status=$?
21014   echo "$as_me:21014: \$? = $ac_status" >&5
21015   (exit "$ac_status"); }; }; then
21016   cf_cv_consistent_getenv=yes
21017 else
21018   echo "$as_me: program exited with status $ac_status" >&5
21019 echo "$as_me: failed program was:" >&5
21020 cat "conftest.$ac_ext" >&5
21021 cf_cv_consistent_getenv=no
21022 fi
21023 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21024 fi
21025
21026 fi
21027 echo "$as_me:21027: result: $cf_cv_consistent_getenv" >&5
21028 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
21029
21030 if test "x$cf_cv_consistent_getenv" = xno
21031 then
21032
21033 cat >>confdefs.h <<\EOF
21034 #define HAVE_CONSISTENT_GETENV 1
21035 EOF
21036
21037 fi
21038
21039 if test "x$cf_cv_consistent_getenv" = xno && \
21040         test "x$cf_with_trace" = xyes
21041 then
21042         { echo "$as_me:21042: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
21043 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
21044 fi
21045
21046 echo "$as_me:21046: checking if sys/time.h works with sys/select.h" >&5
21047 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
21048 if test "${cf_cv_sys_time_select+set}" = set; then
21049   echo $ECHO_N "(cached) $ECHO_C" >&6
21050 else
21051
21052 cat >"conftest.$ac_ext" <<_ACEOF
21053 #line 21053 "configure"
21054 #include "confdefs.h"
21055
21056 #include <sys/types.h>
21057 #ifdef HAVE_SYS_TIME_H
21058 #include <sys/time.h>
21059 #endif
21060 #ifdef HAVE_SYS_SELECT_H
21061 #include <sys/select.h>
21062 #endif
21063
21064 int
21065 main (void)
21066 {
21067
21068   ;
21069   return 0;
21070 }
21071 _ACEOF
21072 rm -f "conftest.$ac_objext"
21073 if { (eval echo "$as_me:21073: \"$ac_compile\"") >&5
21074   (eval $ac_compile) 2>&5
21075   ac_status=$?
21076   echo "$as_me:21076: \$? = $ac_status" >&5
21077   (exit "$ac_status"); } &&
21078          { ac_try='test -s "conftest.$ac_objext"'
21079   { (eval echo "$as_me:21079: \"$ac_try\"") >&5
21080   (eval $ac_try) 2>&5
21081   ac_status=$?
21082   echo "$as_me:21082: \$? = $ac_status" >&5
21083   (exit "$ac_status"); }; }; then
21084   cf_cv_sys_time_select=yes
21085 else
21086   echo "$as_me: failed program was:" >&5
21087 cat "conftest.$ac_ext" >&5
21088 cf_cv_sys_time_select=no
21089 fi
21090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21091
21092 fi
21093
21094 echo "$as_me:21094: result: $cf_cv_sys_time_select" >&5
21095 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
21096 test "$cf_cv_sys_time_select" = yes &&
21097 cat >>confdefs.h <<\EOF
21098 #define HAVE_SYS_TIME_SELECT 1
21099 EOF
21100
21101 ###     checks for compiler characteristics
21102 ac_ext=c
21103 ac_cpp='$CPP $CPPFLAGS'
21104 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
21105 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
21106 ac_compiler_gnu=$ac_cv_c_compiler_gnu
21107 ac_main_return="return"
21108
21109 echo "$as_me:21109: checking for an ANSI C-conforming const" >&5
21110 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
21111 if test "${ac_cv_c_const+set}" = set; then
21112   echo $ECHO_N "(cached) $ECHO_C" >&6
21113 else
21114   cat >"conftest.$ac_ext" <<_ACEOF
21115 #line 21115 "configure"
21116 #include "confdefs.h"
21117
21118 int
21119 main (void)
21120 {
21121 /* FIXME: Include the comments suggested by Paul. */
21122 #ifndef __cplusplus
21123   /* Ultrix mips cc rejects this.  */
21124   typedef int charset[2];
21125   const charset x; (void)x;
21126   /* SunOS 4.1.1 cc rejects this.  */
21127   char const *const *ccp;
21128   char **p;
21129   /* NEC SVR4.0.2 mips cc rejects this.  */
21130   struct point {int x, y;};
21131   static struct point const zero = {0,0}; (void)zero;
21132   /* AIX XL C 1.02.0.0 rejects this.
21133      It does not let you subtract one const X* pointer from another in
21134      an arm of an if-expression whose if-part is not a constant
21135      expression */
21136   const char *g = "string";
21137   ccp = &g + (g ? g-g : 0);
21138   /* HPUX 7.0 cc rejects these. */
21139   ++ccp;
21140   p = (char**) ccp;
21141   ccp = (char const *const *) p;
21142   { /* SCO 3.2v4 cc rejects this.  */
21143     char *t;
21144     char const *s = 0 ? (char *) 0 : (char const *) 0;
21145
21146     *t++ = 0;
21147         (void)s;
21148   }
21149   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21150     int x[] = {25, 17};
21151     const int *foo = &x[0];
21152     ++foo;
21153         (void)foo;
21154   }
21155   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21156     typedef const int *iptr;
21157     iptr p = 0;
21158     ++p;
21159         (void)p;
21160   }
21161   { /* AIX XL C 1.02.0.0 rejects this saying
21162        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21163     struct s { int j; const int *ap[3]; };
21164     struct s *b; b->j = 5;
21165   }
21166   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21167     const int foo = 10;
21168         (void)foo;
21169   }
21170 #endif
21171
21172   ;
21173   return 0;
21174 }
21175 _ACEOF
21176 rm -f "conftest.$ac_objext"
21177 if { (eval echo "$as_me:21177: \"$ac_compile\"") >&5
21178   (eval $ac_compile) 2>&5
21179   ac_status=$?
21180   echo "$as_me:21180: \$? = $ac_status" >&5
21181   (exit "$ac_status"); } &&
21182          { ac_try='test -s "conftest.$ac_objext"'
21183   { (eval echo "$as_me:21183: \"$ac_try\"") >&5
21184   (eval $ac_try) 2>&5
21185   ac_status=$?
21186   echo "$as_me:21186: \$? = $ac_status" >&5
21187   (exit "$ac_status"); }; }; then
21188   ac_cv_c_const=yes
21189 else
21190   echo "$as_me: failed program was:" >&5
21191 cat "conftest.$ac_ext" >&5
21192 ac_cv_c_const=no
21193 fi
21194 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21195 fi
21196 echo "$as_me:21196: result: $ac_cv_c_const" >&5
21197 echo "${ECHO_T}$ac_cv_c_const" >&6
21198 if test $ac_cv_c_const = no; then
21199
21200 cat >>confdefs.h <<\EOF
21201 #define const
21202 EOF
21203
21204 fi
21205
21206 echo "$as_me:21206: checking for inline" >&5
21207 echo $ECHO_N "checking for inline... $ECHO_C" >&6
21208 if test "${ac_cv_c_inline+set}" = set; then
21209   echo $ECHO_N "(cached) $ECHO_C" >&6
21210 else
21211   ac_cv_c_inline=no
21212 for ac_kw in inline __inline__ __inline; do
21213   cat >"conftest.$ac_ext" <<_ACEOF
21214 #line 21214 "configure"
21215 #include "confdefs.h"
21216 #ifndef __cplusplus
21217 static $ac_kw int static_foo (void) {return 0; }
21218 $ac_kw int foo (void) {return 0; }
21219 #endif
21220
21221 _ACEOF
21222 rm -f "conftest.$ac_objext"
21223 if { (eval echo "$as_me:21223: \"$ac_compile\"") >&5
21224   (eval $ac_compile) 2>&5
21225   ac_status=$?
21226   echo "$as_me:21226: \$? = $ac_status" >&5
21227   (exit "$ac_status"); } &&
21228          { ac_try='test -s "conftest.$ac_objext"'
21229   { (eval echo "$as_me:21229: \"$ac_try\"") >&5
21230   (eval $ac_try) 2>&5
21231   ac_status=$?
21232   echo "$as_me:21232: \$? = $ac_status" >&5
21233   (exit "$ac_status"); }; }; then
21234   ac_cv_c_inline=$ac_kw; break
21235 else
21236   echo "$as_me: failed program was:" >&5
21237 cat "conftest.$ac_ext" >&5
21238 fi
21239 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21240 done
21241
21242 fi
21243 echo "$as_me:21243: result: $ac_cv_c_inline" >&5
21244 echo "${ECHO_T}$ac_cv_c_inline" >&6
21245 case $ac_cv_c_inline in
21246   inline | yes) ;;
21247   no)
21248 cat >>confdefs.h <<\EOF
21249 #define inline
21250 EOF
21251  ;;
21252   *)  cat >>confdefs.h <<EOF
21253 #define inline $ac_cv_c_inline
21254 EOF
21255  ;;
21256 esac
21257
21258 NCURSES_INLINE=
21259 if test "$ac_cv_c_inline" != no ; then
21260         NCURSES_INLINE=inline
21261         if test "$INTEL_COMPILER" = yes
21262         then
21263                 :
21264         elif test "$CLANG_COMPILER" = yes
21265         then
21266                 :
21267         elif test "$GCC" = yes
21268         then
21269                 echo "$as_me:21269: checking if $CC supports options to tune inlining" >&5
21270 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21271 if test "${cf_cv_gcc_inline+set}" = set; then
21272   echo $ECHO_N "(cached) $ECHO_C" >&6
21273 else
21274
21275                 cf_save_CFLAGS=$CFLAGS
21276                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21277                 cat >"conftest.$ac_ext" <<_ACEOF
21278 #line 21278 "configure"
21279 #include "confdefs.h"
21280 inline int foo(void) { return 1; }
21281 int
21282 main (void)
21283 {
21284 ${cf_cv_main_return:-return} foo()
21285   ;
21286   return 0;
21287 }
21288 _ACEOF
21289 rm -f "conftest.$ac_objext"
21290 if { (eval echo "$as_me:21290: \"$ac_compile\"") >&5
21291   (eval $ac_compile) 2>&5
21292   ac_status=$?
21293   echo "$as_me:21293: \$? = $ac_status" >&5
21294   (exit "$ac_status"); } &&
21295          { ac_try='test -s "conftest.$ac_objext"'
21296   { (eval echo "$as_me:21296: \"$ac_try\"") >&5
21297   (eval $ac_try) 2>&5
21298   ac_status=$?
21299   echo "$as_me:21299: \$? = $ac_status" >&5
21300   (exit "$ac_status"); }; }; then
21301   cf_cv_gcc_inline=yes
21302 else
21303   echo "$as_me: failed program was:" >&5
21304 cat "conftest.$ac_ext" >&5
21305 cf_cv_gcc_inline=no
21306 fi
21307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21308                 CFLAGS=$cf_save_CFLAGS
21309
21310 fi
21311 echo "$as_me:21311: result: $cf_cv_gcc_inline" >&5
21312 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21313                 if test "$cf_cv_gcc_inline" = yes ; then
21314
21315 cf_fix_cppflags=no
21316 cf_new_cflags=
21317 cf_new_cppflags=
21318 cf_new_extra_cppflags=
21319
21320 for cf_add_cflags in --param max-inline-insns-single=1200
21321 do
21322 case "$cf_fix_cppflags" in
21323 (no)
21324         case "$cf_add_cflags" in
21325         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21326                 case "$cf_add_cflags" in
21327                 (-D*)
21328                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21329
21330                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21331                                 && test -z "${cf_tst_cflags}" \
21332                                 && cf_fix_cppflags=yes
21333
21334                         if test "$cf_fix_cppflags" = yes ; then
21335
21336         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21337         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21338
21339                                 continue
21340                         elif test "${cf_tst_cflags}" = "\"'" ; then
21341
21342         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21343         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21344
21345                                 continue
21346                         fi
21347                         ;;
21348                 esac
21349                 case "$CPPFLAGS" in
21350                 (*$cf_add_cflags)
21351                         ;;
21352                 (*)
21353                         case "$cf_add_cflags" in
21354                         (-D*)
21355                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21356
21357 CPPFLAGS=`echo "$CPPFLAGS" | \
21358         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21359                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21360
21361                                 ;;
21362                         esac
21363
21364         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21365         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21366
21367                         ;;
21368                 esac
21369                 ;;
21370         (*)
21371
21372         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21373         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21374
21375                 ;;
21376         esac
21377         ;;
21378 (yes)
21379
21380         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21381         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21382
21383         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21384
21385         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21386                 && test -z "${cf_tst_cflags}" \
21387                 && cf_fix_cppflags=no
21388         ;;
21389 esac
21390 done
21391
21392 if test -n "$cf_new_cflags" ; then
21393
21394         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21395         CFLAGS="${CFLAGS}$cf_new_cflags"
21396
21397 fi
21398
21399 if test -n "$cf_new_cppflags" ; then
21400
21401         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21402         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21403
21404 fi
21405
21406 if test -n "$cf_new_extra_cppflags" ; then
21407
21408         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21409         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21410
21411 fi
21412
21413                 fi
21414         fi
21415 fi
21416
21417 echo "$as_me:21417: checking for signal global datatype" >&5
21418 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21419 if test "${cf_cv_sig_atomic_t+set}" = set; then
21420   echo $ECHO_N "(cached) $ECHO_C" >&6
21421 else
21422
21423         for cf_type in \
21424                 "volatile sig_atomic_t" \
21425                 "sig_atomic_t" \
21426                 "int"
21427         do
21428         cat >"conftest.$ac_ext" <<_ACEOF
21429 #line 21429 "configure"
21430 #include "confdefs.h"
21431
21432 #include <sys/types.h>
21433 #include <signal.h>
21434 #include <stdio.h>
21435
21436 extern $cf_type x;
21437 $cf_type x;
21438 static void handler(int sig)
21439 {
21440         (void)sig;
21441         x = 5;
21442 }
21443 int
21444 main (void)
21445 {
21446 signal(SIGINT, handler);
21447                  x = 1
21448   ;
21449   return 0;
21450 }
21451 _ACEOF
21452 rm -f "conftest.$ac_objext"
21453 if { (eval echo "$as_me:21453: \"$ac_compile\"") >&5
21454   (eval $ac_compile) 2>&5
21455   ac_status=$?
21456   echo "$as_me:21456: \$? = $ac_status" >&5
21457   (exit "$ac_status"); } &&
21458          { ac_try='test -s "conftest.$ac_objext"'
21459   { (eval echo "$as_me:21459: \"$ac_try\"") >&5
21460   (eval $ac_try) 2>&5
21461   ac_status=$?
21462   echo "$as_me:21462: \$? = $ac_status" >&5
21463   (exit "$ac_status"); }; }; then
21464   cf_cv_sig_atomic_t=$cf_type
21465 else
21466   echo "$as_me: failed program was:" >&5
21467 cat "conftest.$ac_ext" >&5
21468 cf_cv_sig_atomic_t=no
21469 fi
21470 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21471                 test "$cf_cv_sig_atomic_t" != no && break
21472         done
21473
21474 fi
21475
21476 echo "$as_me:21476: result: $cf_cv_sig_atomic_t" >&5
21477 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21478 test "$cf_cv_sig_atomic_t" != no &&
21479 cat >>confdefs.h <<EOF
21480 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21481 EOF
21482
21483 if test "$NCURSES_CHTYPE" = auto ; then
21484
21485 echo "$as_me:21485: checking for type of chtype" >&5
21486 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21487 if test "${cf_cv_typeof_chtype+set}" = set; then
21488   echo $ECHO_N "(cached) $ECHO_C" >&6
21489 else
21490
21491                 if test "$cross_compiling" = yes; then
21492   cf_cv_typeof_chtype=long
21493 else
21494   cat >"conftest.$ac_ext" <<_ACEOF
21495 #line 21495 "configure"
21496 #include "confdefs.h"
21497
21498 $ac_includes_default
21499 #define WANT_BITS 31
21500 int main(void)
21501 {
21502         FILE *fp = fopen("cf_test.out", "w");
21503         if (fp != 0) {
21504                 char *result = "long";
21505                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21506                         int n;
21507                         unsigned int x, y;
21508                         for (n = 0; n < WANT_BITS; n++) {
21509                                 x = (1 << n);
21510                                 y = (x >> n);
21511                                 if (y != 1 || x == 0) {
21512                                         x = 0;
21513                                         break;
21514                                 }
21515                         }
21516                         /*
21517                          * If x is nonzero, an int is big enough for the bits
21518                          * that we want.
21519                          */
21520                         result = (x != 0) ? "int" : "long";
21521                 }
21522                 fputs(result, fp);
21523                 fclose(fp);
21524         }
21525         ${cf_cv_main_return:-return}(0);
21526 }
21527
21528 _ACEOF
21529 rm -f "conftest$ac_exeext"
21530 if { (eval echo "$as_me:21530: \"$ac_link\"") >&5
21531   (eval $ac_link) 2>&5
21532   ac_status=$?
21533   echo "$as_me:21533: \$? = $ac_status" >&5
21534   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21535   { (eval echo "$as_me:21535: \"$ac_try\"") >&5
21536   (eval $ac_try) 2>&5
21537   ac_status=$?
21538   echo "$as_me:21538: \$? = $ac_status" >&5
21539   (exit "$ac_status"); }; }; then
21540   cf_cv_typeof_chtype=`cat cf_test.out`
21541 else
21542   echo "$as_me: program exited with status $ac_status" >&5
21543 echo "$as_me: failed program was:" >&5
21544 cat "conftest.$ac_ext" >&5
21545 cf_cv_typeof_chtype=long
21546 fi
21547 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21548 fi
21549                 rm -f cf_test.out
21550
21551 fi
21552
21553 echo "$as_me:21553: result: $cf_cv_typeof_chtype" >&5
21554 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21555
21556 cat >>confdefs.h <<EOF
21557 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21558 EOF
21559
21560 else
21561         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21562 fi
21563 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21564
21565 echo "$as_me:21565: checking if unsigned literals are legal" >&5
21566 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21567 if test "${cf_cv_unsigned_literals+set}" = set; then
21568   echo $ECHO_N "(cached) $ECHO_C" >&6
21569 else
21570
21571         cat >"conftest.$ac_ext" <<_ACEOF
21572 #line 21572 "configure"
21573 #include "confdefs.h"
21574
21575 int
21576 main (void)
21577 {
21578 long x = 1L + 1UL + 1U + 1; (void)x
21579   ;
21580   return 0;
21581 }
21582 _ACEOF
21583 rm -f "conftest.$ac_objext"
21584 if { (eval echo "$as_me:21584: \"$ac_compile\"") >&5
21585   (eval $ac_compile) 2>&5
21586   ac_status=$?
21587   echo "$as_me:21587: \$? = $ac_status" >&5
21588   (exit "$ac_status"); } &&
21589          { ac_try='test -s "conftest.$ac_objext"'
21590   { (eval echo "$as_me:21590: \"$ac_try\"") >&5
21591   (eval $ac_try) 2>&5
21592   ac_status=$?
21593   echo "$as_me:21593: \$? = $ac_status" >&5
21594   (exit "$ac_status"); }; }; then
21595   cf_cv_unsigned_literals=yes
21596 else
21597   echo "$as_me: failed program was:" >&5
21598 cat "conftest.$ac_ext" >&5
21599 cf_cv_unsigned_literals=no
21600 fi
21601 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21602
21603 fi
21604
21605 echo "$as_me:21605: result: $cf_cv_unsigned_literals" >&5
21606 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21607
21608 cf_cv_1UL="1"
21609 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21610 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21611
21612 if test "$NCURSES_MMASK_T" = auto ; then
21613         cf_cv_typeof_mmask_t=long
21614 else
21615         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21616 fi
21617 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21618
21619 ###     Checks for external-data
21620
21621 echo "$as_me:21621: checking if external errno is declared" >&5
21622 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21623 if test "${cf_cv_dcl_errno+set}" = set; then
21624   echo $ECHO_N "(cached) $ECHO_C" >&6
21625 else
21626
21627         cat >"conftest.$ac_ext" <<_ACEOF
21628 #line 21628 "configure"
21629 #include "confdefs.h"
21630
21631 $ac_includes_default
21632 #include <errno.h>
21633 int
21634 main (void)
21635 {
21636 int x = (int) errno; (void)x
21637   ;
21638   return 0;
21639 }
21640 _ACEOF
21641 rm -f "conftest.$ac_objext"
21642 if { (eval echo "$as_me:21642: \"$ac_compile\"") >&5
21643   (eval $ac_compile) 2>&5
21644   ac_status=$?
21645   echo "$as_me:21645: \$? = $ac_status" >&5
21646   (exit "$ac_status"); } &&
21647          { ac_try='test -s "conftest.$ac_objext"'
21648   { (eval echo "$as_me:21648: \"$ac_try\"") >&5
21649   (eval $ac_try) 2>&5
21650   ac_status=$?
21651   echo "$as_me:21651: \$? = $ac_status" >&5
21652   (exit "$ac_status"); }; }; then
21653   cf_cv_dcl_errno=yes
21654 else
21655   echo "$as_me: failed program was:" >&5
21656 cat "conftest.$ac_ext" >&5
21657 cf_cv_dcl_errno=no
21658 fi
21659 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21660
21661 fi
21662 echo "$as_me:21662: result: $cf_cv_dcl_errno" >&5
21663 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21664
21665 if test "$cf_cv_dcl_errno" = no ; then
21666
21667 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21668
21669         cat >>confdefs.h <<EOF
21670 #define $cf_result 1
21671 EOF
21672
21673 fi
21674
21675 # It's possible (for near-UNIX clones) that the data doesn't exist
21676
21677 echo "$as_me:21677: checking if external errno exists" >&5
21678 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21679 if test "${cf_cv_have_errno+set}" = set; then
21680   echo $ECHO_N "(cached) $ECHO_C" >&6
21681 else
21682
21683         cat >"conftest.$ac_ext" <<_ACEOF
21684 #line 21684 "configure"
21685 #include "confdefs.h"
21686
21687 #undef errno
21688 extern int errno;
21689
21690 int
21691 main (void)
21692 {
21693 errno = 2
21694   ;
21695   return 0;
21696 }
21697 _ACEOF
21698 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21699 if { (eval echo "$as_me:21699: \"$ac_link\"") >&5
21700   (eval $ac_link) 2>&5
21701   ac_status=$?
21702   echo "$as_me:21702: \$? = $ac_status" >&5
21703   (exit "$ac_status"); } &&
21704          { ac_try='test -s "conftest$ac_exeext"'
21705   { (eval echo "$as_me:21705: \"$ac_try\"") >&5
21706   (eval $ac_try) 2>&5
21707   ac_status=$?
21708   echo "$as_me:21708: \$? = $ac_status" >&5
21709   (exit "$ac_status"); }; }; then
21710   cf_cv_have_errno=yes
21711 else
21712   echo "$as_me: failed program was:" >&5
21713 cat "conftest.$ac_ext" >&5
21714 cf_cv_have_errno=no
21715 fi
21716 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21717
21718 fi
21719 echo "$as_me:21719: result: $cf_cv_have_errno" >&5
21720 echo "${ECHO_T}$cf_cv_have_errno" >&6
21721
21722 if test "$cf_cv_have_errno" = yes ; then
21723
21724 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21725
21726         cat >>confdefs.h <<EOF
21727 #define $cf_result 1
21728 EOF
21729
21730 fi
21731
21732 echo "$as_me:21732: checking if data-only library module links" >&5
21733 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21734 if test "${cf_cv_link_dataonly+set}" = set; then
21735   echo $ECHO_N "(cached) $ECHO_C" >&6
21736 else
21737
21738         rm -f conftest.a
21739         cat >conftest.$ac_ext <<EOF
21740 #line 21740 "configure"
21741 int     testdata[3] = { 123, 456, 789 };
21742 EOF
21743         if { (eval echo "$as_me:21743: \"$ac_compile\"") >&5
21744   (eval $ac_compile) 2>&5
21745   ac_status=$?
21746   echo "$as_me:21746: \$? = $ac_status" >&5
21747   (exit "$ac_status"); } ; then
21748                 mv conftest.o data.o && \
21749                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21750         fi
21751         rm -f conftest.$ac_ext data.o
21752         cat >conftest.$ac_ext <<EOF
21753 #line 21753 "configure"
21754 extern int testfunc(void);
21755 #if defined(NeXT)
21756 int     testfunc(void)
21757 {
21758         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21759 }
21760 #else
21761 extern int testdata[3];
21762 int     testfunc(void)
21763 {
21764         return testdata[0] == 123
21765            &&  testdata[1] == 456
21766            &&  testdata[2] == 789;
21767 }
21768 #endif
21769 EOF
21770         if { (eval echo "$as_me:21770: \"$ac_compile\"") >&5
21771   (eval $ac_compile) 2>&5
21772   ac_status=$?
21773   echo "$as_me:21773: \$? = $ac_status" >&5
21774   (exit "$ac_status"); }; then
21775                 mv conftest.o func.o && \
21776                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21777         fi
21778         rm -f conftest.$ac_ext func.o
21779         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21780         cf_saveLIBS="$LIBS"
21781         LIBS="conftest.a $LIBS"
21782         if test "$cross_compiling" = yes; then
21783   cf_cv_link_dataonly=unknown
21784 else
21785   cat >"conftest.$ac_ext" <<_ACEOF
21786 #line 21786 "configure"
21787 #include "confdefs.h"
21788
21789         extern int testfunc(void);
21790         int main(void)
21791         {
21792                 ${cf_cv_main_return:-return} (!testfunc());
21793         }
21794
21795 _ACEOF
21796 rm -f "conftest$ac_exeext"
21797 if { (eval echo "$as_me:21797: \"$ac_link\"") >&5
21798   (eval $ac_link) 2>&5
21799   ac_status=$?
21800   echo "$as_me:21800: \$? = $ac_status" >&5
21801   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21802   { (eval echo "$as_me:21802: \"$ac_try\"") >&5
21803   (eval $ac_try) 2>&5
21804   ac_status=$?
21805   echo "$as_me:21805: \$? = $ac_status" >&5
21806   (exit "$ac_status"); }; }; then
21807   cf_cv_link_dataonly=yes
21808 else
21809   echo "$as_me: program exited with status $ac_status" >&5
21810 echo "$as_me: failed program was:" >&5
21811 cat "conftest.$ac_ext" >&5
21812 cf_cv_link_dataonly=no
21813 fi
21814 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21815 fi
21816         LIBS="$cf_saveLIBS"
21817
21818 fi
21819
21820 echo "$as_me:21820: result: $cf_cv_link_dataonly" >&5
21821 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21822
21823 if test "$cf_cv_link_dataonly" = no ; then
21824
21825 cat >>confdefs.h <<\EOF
21826 #define BROKEN_LINKER 1
21827 EOF
21828
21829         BROKEN_LINKER=1
21830 fi
21831
21832 ###     Checks for library functions.
21833
21834 cf_save_libs="$LIBS"
21835 echo "$as_me:21835: checking for clock_gettime" >&5
21836 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21837 if test "${ac_cv_func_clock_gettime+set}" = set; then
21838   echo $ECHO_N "(cached) $ECHO_C" >&6
21839 else
21840   cat >"conftest.$ac_ext" <<_ACEOF
21841 #line 21841 "configure"
21842 #include "confdefs.h"
21843 #define clock_gettime autoconf_temporary
21844 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21845 #undef clock_gettime
21846
21847 #ifdef __cplusplus
21848 extern "C"
21849 #endif
21850
21851 /* We use char because int might match the return type of a gcc2
21852    builtin and then its argument prototype would still apply.  */
21853 char clock_gettime (void);
21854
21855 int
21856 main (void)
21857 {
21858
21859 /* The GNU C library defines stubs for functions which it implements
21860     to always fail with ENOSYS.  Some functions are actually named
21861     something starting with __ and the normal name is an alias.  */
21862 #if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
21863 #error found stub for clock_gettime
21864 #endif
21865
21866         return clock_gettime ();
21867   ;
21868   return 0;
21869 }
21870 _ACEOF
21871 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21872 if { (eval echo "$as_me:21872: \"$ac_link\"") >&5
21873   (eval $ac_link) 2>&5
21874   ac_status=$?
21875   echo "$as_me:21875: \$? = $ac_status" >&5
21876   (exit "$ac_status"); } &&
21877          { ac_try='test -s "conftest$ac_exeext"'
21878   { (eval echo "$as_me:21878: \"$ac_try\"") >&5
21879   (eval $ac_try) 2>&5
21880   ac_status=$?
21881   echo "$as_me:21881: \$? = $ac_status" >&5
21882   (exit "$ac_status"); }; }; then
21883   ac_cv_func_clock_gettime=yes
21884 else
21885   echo "$as_me: failed program was:" >&5
21886 cat "conftest.$ac_ext" >&5
21887 ac_cv_func_clock_gettime=no
21888 fi
21889 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21890 fi
21891 echo "$as_me:21891: result: $ac_cv_func_clock_gettime" >&5
21892 echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
21893 if test "$ac_cv_func_clock_gettime" = yes; then
21894   cf_cv_test_clock_gettime=yes
21895 else
21896   echo "$as_me:21896: checking for clock_gettime in -lrt" >&5
21897 echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
21898 if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
21899   echo $ECHO_N "(cached) $ECHO_C" >&6
21900 else
21901   ac_check_lib_save_LIBS=$LIBS
21902 LIBS="-lrt  $LIBS"
21903 cat >"conftest.$ac_ext" <<_ACEOF
21904 #line 21904 "configure"
21905 #include "confdefs.h"
21906
21907 /* Override any gcc2 internal prototype to avoid an error.  */
21908 #ifdef __cplusplus
21909 extern "C"
21910 #endif
21911 /* We use char because int might match the return type of a gcc2
21912    builtin and then its argument prototype would still apply.  */
21913 char clock_gettime (void);
21914 int
21915 main (void)
21916 {
21917 clock_gettime ();
21918   ;
21919   return 0;
21920 }
21921 _ACEOF
21922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21923 if { (eval echo "$as_me:21923: \"$ac_link\"") >&5
21924   (eval $ac_link) 2>&5
21925   ac_status=$?
21926   echo "$as_me:21926: \$? = $ac_status" >&5
21927   (exit "$ac_status"); } &&
21928          { ac_try='test -s "conftest$ac_exeext"'
21929   { (eval echo "$as_me:21929: \"$ac_try\"") >&5
21930   (eval $ac_try) 2>&5
21931   ac_status=$?
21932   echo "$as_me:21932: \$? = $ac_status" >&5
21933   (exit "$ac_status"); }; }; then
21934   ac_cv_lib_rt_clock_gettime=yes
21935 else
21936   echo "$as_me: failed program was:" >&5
21937 cat "conftest.$ac_ext" >&5
21938 ac_cv_lib_rt_clock_gettime=no
21939 fi
21940 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21941 LIBS=$ac_check_lib_save_LIBS
21942 fi
21943 echo "$as_me:21943: result: $ac_cv_lib_rt_clock_gettime" >&5
21944 echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
21945 if test "$ac_cv_lib_rt_clock_gettime" = yes; then
21946   LIBS="-lrt $LIBS"
21947                  cf_cv_test_clock_gettime=yes
21948 else
21949   cf_cv_test_clock_gettime=no
21950 fi
21951
21952 fi
21953
21954 if test "$cf_cv_test_clock_gettime" = yes ; then
21955 echo "$as_me:21955: checking if clock_gettime links" >&5
21956 echo $ECHO_N "checking if clock_gettime links... $ECHO_C" >&6
21957 if test "${cf_cv_func_clock_gettime+set}" = set; then
21958   echo $ECHO_N "(cached) $ECHO_C" >&6
21959 else
21960
21961                 cat >"conftest.$ac_ext" <<_ACEOF
21962 #line 21962 "configure"
21963 #include "confdefs.h"
21964
21965 $ac_includes_default
21966 #include <time.h>
21967
21968 int
21969 main (void)
21970 {
21971 struct timespec ts;
21972                 int rc = clock_gettime(CLOCK_REALTIME, &ts)
21973                            + clock_gettime(CLOCK_MONOTONIC, &ts);
21974                  (void) rc; (void)ts
21975   ;
21976   return 0;
21977 }
21978 _ACEOF
21979 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21980 if { (eval echo "$as_me:21980: \"$ac_link\"") >&5
21981   (eval $ac_link) 2>&5
21982   ac_status=$?
21983   echo "$as_me:21983: \$? = $ac_status" >&5
21984   (exit "$ac_status"); } &&
21985          { ac_try='test -s "conftest$ac_exeext"'
21986   { (eval echo "$as_me:21986: \"$ac_try\"") >&5
21987   (eval $ac_try) 2>&5
21988   ac_status=$?
21989   echo "$as_me:21989: \$? = $ac_status" >&5
21990   (exit "$ac_status"); }; }; then
21991   cf_cv_func_clock_gettime=yes
21992 else
21993   echo "$as_me: failed program was:" >&5
21994 cat "conftest.$ac_ext" >&5
21995 cf_cv_func_clock_gettime=no
21996 fi
21997 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21998
21999 fi
22000 echo "$as_me:22000: result: $cf_cv_func_clock_gettime" >&5
22001 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
22002 else
22003         cf_cv_func_clock_gettime=no
22004 fi
22005
22006 if test "$cf_cv_func_clock_gettime" = yes
22007 then
22008
22009 cat >>confdefs.h <<\EOF
22010 #define HAVE_CLOCK_GETTIME 1
22011 EOF
22012
22013 else
22014 echo "$as_me:22014: checking for gettimeofday" >&5
22015 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
22016 if test "${ac_cv_func_gettimeofday+set}" = set; then
22017   echo $ECHO_N "(cached) $ECHO_C" >&6
22018 else
22019   cat >"conftest.$ac_ext" <<_ACEOF
22020 #line 22020 "configure"
22021 #include "confdefs.h"
22022 #define gettimeofday autoconf_temporary
22023 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22024 #undef gettimeofday
22025
22026 #ifdef __cplusplus
22027 extern "C"
22028 #endif
22029
22030 /* We use char because int might match the return type of a gcc2
22031    builtin and then its argument prototype would still apply.  */
22032 char gettimeofday (void);
22033
22034 int
22035 main (void)
22036 {
22037
22038 /* The GNU C library defines stubs for functions which it implements
22039     to always fail with ENOSYS.  Some functions are actually named
22040     something starting with __ and the normal name is an alias.  */
22041 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
22042 #error found stub for gettimeofday
22043 #endif
22044
22045         return gettimeofday ();
22046   ;
22047   return 0;
22048 }
22049 _ACEOF
22050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22051 if { (eval echo "$as_me:22051: \"$ac_link\"") >&5
22052   (eval $ac_link) 2>&5
22053   ac_status=$?
22054   echo "$as_me:22054: \$? = $ac_status" >&5
22055   (exit "$ac_status"); } &&
22056          { ac_try='test -s "conftest$ac_exeext"'
22057   { (eval echo "$as_me:22057: \"$ac_try\"") >&5
22058   (eval $ac_try) 2>&5
22059   ac_status=$?
22060   echo "$as_me:22060: \$? = $ac_status" >&5
22061   (exit "$ac_status"); }; }; then
22062   ac_cv_func_gettimeofday=yes
22063 else
22064   echo "$as_me: failed program was:" >&5
22065 cat "conftest.$ac_ext" >&5
22066 ac_cv_func_gettimeofday=no
22067 fi
22068 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22069 fi
22070 echo "$as_me:22070: result: $ac_cv_func_gettimeofday" >&5
22071 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
22072 if test "$ac_cv_func_gettimeofday" = yes; then
22073
22074 cat >>confdefs.h <<\EOF
22075 #define HAVE_GETTIMEOFDAY 1
22076 EOF
22077
22078 else
22079
22080 echo "$as_me:22080: checking for gettimeofday in -lbsd" >&5
22081 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
22082 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
22083   echo $ECHO_N "(cached) $ECHO_C" >&6
22084 else
22085   ac_check_lib_save_LIBS=$LIBS
22086 LIBS="-lbsd  $LIBS"
22087 cat >"conftest.$ac_ext" <<_ACEOF
22088 #line 22088 "configure"
22089 #include "confdefs.h"
22090
22091 /* Override any gcc2 internal prototype to avoid an error.  */
22092 #ifdef __cplusplus
22093 extern "C"
22094 #endif
22095 /* We use char because int might match the return type of a gcc2
22096    builtin and then its argument prototype would still apply.  */
22097 char gettimeofday (void);
22098 int
22099 main (void)
22100 {
22101 gettimeofday ();
22102   ;
22103   return 0;
22104 }
22105 _ACEOF
22106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22107 if { (eval echo "$as_me:22107: \"$ac_link\"") >&5
22108   (eval $ac_link) 2>&5
22109   ac_status=$?
22110   echo "$as_me:22110: \$? = $ac_status" >&5
22111   (exit "$ac_status"); } &&
22112          { ac_try='test -s "conftest$ac_exeext"'
22113   { (eval echo "$as_me:22113: \"$ac_try\"") >&5
22114   (eval $ac_try) 2>&5
22115   ac_status=$?
22116   echo "$as_me:22116: \$? = $ac_status" >&5
22117   (exit "$ac_status"); }; }; then
22118   ac_cv_lib_bsd_gettimeofday=yes
22119 else
22120   echo "$as_me: failed program was:" >&5
22121 cat "conftest.$ac_ext" >&5
22122 ac_cv_lib_bsd_gettimeofday=no
22123 fi
22124 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22125 LIBS=$ac_check_lib_save_LIBS
22126 fi
22127 echo "$as_me:22127: result: $ac_cv_lib_bsd_gettimeofday" >&5
22128 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
22129 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
22130
22131 cat >>confdefs.h <<\EOF
22132 #define HAVE_GETTIMEOFDAY 1
22133 EOF
22134
22135 cf_add_libs="$LIBS"
22136 # reverse order
22137 cf_add_0lib=
22138 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22139 # filter duplicates
22140 for cf_add_1lib in $cf_add_0lib; do
22141         for cf_add_2lib in $cf_add_libs; do
22142                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22143                         cf_add_1lib=
22144                         break
22145                 fi
22146         done
22147         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22148 done
22149 LIBS="$cf_add_libs"
22150
22151 fi
22152
22153 fi
22154 fi
22155
22156 for ac_func in \
22157 fpathconf \
22158 getcwd \
22159 getauxval \
22160 getegid \
22161 geteuid \
22162 getopt \
22163 getuid \
22164 issetugid \
22165 localeconv \
22166 poll \
22167 remove \
22168 select \
22169 setbuf \
22170 setbuffer \
22171 setfsuid \
22172 setvbuf \
22173 sigaction \
22174 sigvec \
22175 snprintf \
22176 strdup \
22177 strstr \
22178 sysconf \
22179 tcgetpgrp \
22180 times \
22181 tsearch \
22182 vsnprintf \
22183
22184 do
22185 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22186 echo "$as_me:22186: checking for $ac_func" >&5
22187 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22188 if eval "test \"\${$as_ac_var+set}\" = set"; then
22189   echo $ECHO_N "(cached) $ECHO_C" >&6
22190 else
22191   cat >"conftest.$ac_ext" <<_ACEOF
22192 #line 22192 "configure"
22193 #include "confdefs.h"
22194 #define $ac_func autoconf_temporary
22195 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22196 #undef $ac_func
22197
22198 #ifdef __cplusplus
22199 extern "C"
22200 #endif
22201
22202 /* We use char because int might match the return type of a gcc2
22203    builtin and then its argument prototype would still apply.  */
22204 char $ac_func (void);
22205
22206 int
22207 main (void)
22208 {
22209
22210 /* The GNU C library defines stubs for functions which it implements
22211     to always fail with ENOSYS.  Some functions are actually named
22212     something starting with __ and the normal name is an alias.  */
22213 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22214 #error found stub for $ac_func
22215 #endif
22216
22217         return $ac_func ();
22218   ;
22219   return 0;
22220 }
22221 _ACEOF
22222 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22223 if { (eval echo "$as_me:22223: \"$ac_link\"") >&5
22224   (eval $ac_link) 2>&5
22225   ac_status=$?
22226   echo "$as_me:22226: \$? = $ac_status" >&5
22227   (exit "$ac_status"); } &&
22228          { ac_try='test -s "conftest$ac_exeext"'
22229   { (eval echo "$as_me:22229: \"$ac_try\"") >&5
22230   (eval $ac_try) 2>&5
22231   ac_status=$?
22232   echo "$as_me:22232: \$? = $ac_status" >&5
22233   (exit "$ac_status"); }; }; then
22234   eval "$as_ac_var=yes"
22235 else
22236   echo "$as_me: failed program was:" >&5
22237 cat "conftest.$ac_ext" >&5
22238 eval "$as_ac_var=no"
22239 fi
22240 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22241 fi
22242 echo "$as_me:22242: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22243 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22244 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22245   cat >>confdefs.h <<EOF
22246 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22247 EOF
22248
22249 fi
22250 done
22251
22252 echo "$as_me:22252: checking if _PATH_TTYS is defined in ttyent.h" >&5
22253 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
22254 if test "${cf_cv_PATH_TTYS+set}" = set; then
22255   echo $ECHO_N "(cached) $ECHO_C" >&6
22256 else
22257
22258 cat >"conftest.$ac_ext" <<_ACEOF
22259 #line 22259 "configure"
22260 #include "confdefs.h"
22261
22262 #include <stdio.h>
22263 #include <ttyent.h>
22264 int
22265 main (void)
22266 {
22267
22268 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
22269   ;
22270   return 0;
22271 }
22272 _ACEOF
22273 rm -f "conftest.$ac_objext"
22274 if { (eval echo "$as_me:22274: \"$ac_compile\"") >&5
22275   (eval $ac_compile) 2>&5
22276   ac_status=$?
22277   echo "$as_me:22277: \$? = $ac_status" >&5
22278   (exit "$ac_status"); } &&
22279          { ac_try='test -s "conftest.$ac_objext"'
22280   { (eval echo "$as_me:22280: \"$ac_try\"") >&5
22281   (eval $ac_try) 2>&5
22282   ac_status=$?
22283   echo "$as_me:22283: \$? = $ac_status" >&5
22284   (exit "$ac_status"); }; }; then
22285   cf_cv_PATH_TTYS=yes
22286 else
22287   echo "$as_me: failed program was:" >&5
22288 cat "conftest.$ac_ext" >&5
22289 cf_cv_PATH_TTYS=no
22290 fi
22291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22292 fi
22293 echo "$as_me:22293: result: $cf_cv_PATH_TTYS" >&5
22294 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
22295
22296 if test $cf_cv_PATH_TTYS = no
22297 then
22298         for cf_ttys in /etc/ttytype /etc/ttys
22299         do
22300                 if test -f $cf_ttys
22301                 then
22302                         cf_cv_PATH_TTYS=maybe
22303
22304 cat >>confdefs.h <<\EOF
22305 #define _PATH_TTYS $cf_ttys
22306 EOF
22307
22308                         break
22309                 fi
22310         done
22311 fi
22312
22313 if test $cf_cv_PATH_TTYS != no
22314 then
22315         echo "$as_me:22315: checking if _PATH_TTYS file exists" >&5
22316 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
22317 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
22318   echo $ECHO_N "(cached) $ECHO_C" >&6
22319 else
22320
22321                 if test "$cross_compiling" = yes; then
22322   cf_cv_have_PATH_TTYS=unknown
22323 else
22324   cat >"conftest.$ac_ext" <<_ACEOF
22325 #line 22325 "configure"
22326 #include "confdefs.h"
22327
22328 $ac_includes_default
22329
22330 #include <ttyent.h>
22331
22332 int main(void) {
22333         FILE *fp = fopen(_PATH_TTYS, "r");
22334         ${cf_cv_main_return:-return} (fp == 0);
22335 }
22336 _ACEOF
22337 rm -f "conftest$ac_exeext"
22338 if { (eval echo "$as_me:22338: \"$ac_link\"") >&5
22339   (eval $ac_link) 2>&5
22340   ac_status=$?
22341   echo "$as_me:22341: \$? = $ac_status" >&5
22342   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22343   { (eval echo "$as_me:22343: \"$ac_try\"") >&5
22344   (eval $ac_try) 2>&5
22345   ac_status=$?
22346   echo "$as_me:22346: \$? = $ac_status" >&5
22347   (exit "$ac_status"); }; }; then
22348   cf_cv_have_PATH_TTYS=yes
22349 else
22350   echo "$as_me: program exited with status $ac_status" >&5
22351 echo "$as_me: failed program was:" >&5
22352 cat "conftest.$ac_ext" >&5
22353 cf_cv_have_PATH_TTYS=no
22354 fi
22355 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22356 fi
22357 fi
22358 echo "$as_me:22358: result: $cf_cv_have_PATH_TTYS" >&5
22359 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
22360         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
22361 fi
22362
22363 if test $cf_cv_PATH_TTYS != no
22364 then
22365
22366 cat >>confdefs.h <<\EOF
22367 #define HAVE_PATH_TTYS 1
22368 EOF
22369
22370         echo "$as_me:22370: checking for getttynam" >&5
22371 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
22372 if test "${cf_cv_func_getttynam+set}" = set; then
22373   echo $ECHO_N "(cached) $ECHO_C" >&6
22374 else
22375
22376                 cat >"conftest.$ac_ext" <<_ACEOF
22377 #line 22377 "configure"
22378 #include "confdefs.h"
22379 #include <ttyent.h>
22380 int
22381 main (void)
22382 {
22383 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22384   ;
22385   return 0;
22386 }
22387 _ACEOF
22388 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22389 if { (eval echo "$as_me:22389: \"$ac_link\"") >&5
22390   (eval $ac_link) 2>&5
22391   ac_status=$?
22392   echo "$as_me:22392: \$? = $ac_status" >&5
22393   (exit "$ac_status"); } &&
22394          { ac_try='test -s "conftest$ac_exeext"'
22395   { (eval echo "$as_me:22395: \"$ac_try\"") >&5
22396   (eval $ac_try) 2>&5
22397   ac_status=$?
22398   echo "$as_me:22398: \$? = $ac_status" >&5
22399   (exit "$ac_status"); }; }; then
22400   cf_cv_func_getttynam=yes
22401 else
22402   echo "$as_me: failed program was:" >&5
22403 cat "conftest.$ac_ext" >&5
22404 cf_cv_func_getttynam=no
22405 fi
22406 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22407 fi
22408 echo "$as_me:22408: result: $cf_cv_func_getttynam" >&5
22409 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22410         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
22411 #define HAVE_GETTTYNAM 1
22412 EOF
22413
22414 fi
22415
22416 if test "x$ac_cv_func_getopt" = xno && \
22417    test "x$cf_with_progs$cf_with_tests" != xnono; then
22418         { { echo "$as_me:22418: error: getopt is required for building programs" >&5
22419 echo "$as_me: error: getopt is required for building programs" >&2;}
22420    { (exit 1); exit 1; }; }
22421 fi
22422
22423 if test "x$with_safe_sprintf" = xyes
22424 then
22425         if test "x$ac_cv_func_vsnprintf" = xyes
22426         then
22427                 { echo "$as_me:22427: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22428 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22429         else
22430
22431 cat >>confdefs.h <<\EOF
22432 #define USE_SAFE_SPRINTF 1
22433 EOF
22434
22435         fi
22436 fi
22437
22438 if test "x$with_getcap" = "xyes" ; then
22439
22440 echo "$as_me:22440: checking for terminal-capability database functions" >&5
22441 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22442 if test "${cf_cv_cgetent+set}" = set; then
22443   echo $ECHO_N "(cached) $ECHO_C" >&6
22444 else
22445
22446 cat >"conftest.$ac_ext" <<_ACEOF
22447 #line 22447 "configure"
22448 #include "confdefs.h"
22449
22450 $ac_includes_default
22451 int
22452 main (void)
22453 {
22454
22455         char temp[128];
22456         char *buf = temp;
22457         char *db_array = temp;
22458         cgetent(&buf, &db_array, "vt100");
22459         cgetcap(buf, "tc", '=');
22460         cgetmatch(buf, "tc");
22461
22462   ;
22463   return 0;
22464 }
22465 _ACEOF
22466 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22467 if { (eval echo "$as_me:22467: \"$ac_link\"") >&5
22468   (eval $ac_link) 2>&5
22469   ac_status=$?
22470   echo "$as_me:22470: \$? = $ac_status" >&5
22471   (exit "$ac_status"); } &&
22472          { ac_try='test -s "conftest$ac_exeext"'
22473   { (eval echo "$as_me:22473: \"$ac_try\"") >&5
22474   (eval $ac_try) 2>&5
22475   ac_status=$?
22476   echo "$as_me:22476: \$? = $ac_status" >&5
22477   (exit "$ac_status"); }; }; then
22478   cf_cv_cgetent=yes
22479 else
22480   echo "$as_me: failed program was:" >&5
22481 cat "conftest.$ac_ext" >&5
22482 cf_cv_cgetent=no
22483 fi
22484 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22485
22486 fi
22487 echo "$as_me:22487: result: $cf_cv_cgetent" >&5
22488 echo "${ECHO_T}$cf_cv_cgetent" >&6
22489
22490 if test "$cf_cv_cgetent" = yes
22491 then
22492
22493 cat >>confdefs.h <<\EOF
22494 #define HAVE_BSD_CGETENT 1
22495 EOF
22496
22497 echo "$as_me:22497: checking if cgetent uses const parameter" >&5
22498 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22499 if test "${cf_cv_cgetent_const+set}" = set; then
22500   echo $ECHO_N "(cached) $ECHO_C" >&6
22501 else
22502
22503 cat >"conftest.$ac_ext" <<_ACEOF
22504 #line 22504 "configure"
22505 #include "confdefs.h"
22506
22507 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22508 $ac_includes_default
22509 int
22510 main (void)
22511 {
22512
22513         char temp[128];
22514         char *buf = temp;
22515 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22516         const char *db_array = temp;
22517         cgetent(&buf, &db_array, "vt100");
22518 #endif
22519         cgetcap(buf, "tc", '=');
22520         cgetmatch(buf, "tc");
22521
22522   ;
22523   return 0;
22524 }
22525 _ACEOF
22526 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22527 if { (eval echo "$as_me:22527: \"$ac_link\"") >&5
22528   (eval $ac_link) 2>&5
22529   ac_status=$?
22530   echo "$as_me:22530: \$? = $ac_status" >&5
22531   (exit "$ac_status"); } &&
22532          { ac_try='test -s "conftest$ac_exeext"'
22533   { (eval echo "$as_me:22533: \"$ac_try\"") >&5
22534   (eval $ac_try) 2>&5
22535   ac_status=$?
22536   echo "$as_me:22536: \$? = $ac_status" >&5
22537   (exit "$ac_status"); }; }; then
22538   cf_cv_cgetent_const=yes
22539 else
22540   echo "$as_me: failed program was:" >&5
22541 cat "conftest.$ac_ext" >&5
22542 cf_cv_cgetent_const=no
22543 fi
22544 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22545
22546 fi
22547 echo "$as_me:22547: result: $cf_cv_cgetent_const" >&5
22548 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22549         if test "$cf_cv_cgetent_const" = yes
22550         then
22551
22552 cat >>confdefs.h <<EOF
22553 #define CGETENT_CONST const
22554 EOF
22555
22556         fi
22557 fi
22558
22559 fi
22560
22561 echo "$as_me:22561: checking for isascii" >&5
22562 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22563 if test "${cf_cv_have_isascii+set}" = set; then
22564   echo $ECHO_N "(cached) $ECHO_C" >&6
22565 else
22566
22567         cat >"conftest.$ac_ext" <<_ACEOF
22568 #line 22568 "configure"
22569 #include "confdefs.h"
22570 #include <ctype.h>
22571 int
22572 main (void)
22573 {
22574 int x = isascii(' '); (void)x
22575   ;
22576   return 0;
22577 }
22578 _ACEOF
22579 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22580 if { (eval echo "$as_me:22580: \"$ac_link\"") >&5
22581   (eval $ac_link) 2>&5
22582   ac_status=$?
22583   echo "$as_me:22583: \$? = $ac_status" >&5
22584   (exit "$ac_status"); } &&
22585          { ac_try='test -s "conftest$ac_exeext"'
22586   { (eval echo "$as_me:22586: \"$ac_try\"") >&5
22587   (eval $ac_try) 2>&5
22588   ac_status=$?
22589   echo "$as_me:22589: \$? = $ac_status" >&5
22590   (exit "$ac_status"); }; }; then
22591   cf_cv_have_isascii=yes
22592 else
22593   echo "$as_me: failed program was:" >&5
22594 cat "conftest.$ac_ext" >&5
22595 cf_cv_have_isascii=no
22596 fi
22597 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22598
22599 fi
22600 echo "$as_me:22600: result: $cf_cv_have_isascii" >&5
22601 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22602 test "$cf_cv_have_isascii" = yes &&
22603 cat >>confdefs.h <<\EOF
22604 #define HAVE_ISASCII 1
22605 EOF
22606
22607 if test "$ac_cv_func_sigaction" = yes; then
22608 echo "$as_me:22608: checking whether sigaction needs _POSIX_SOURCE" >&5
22609 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22610 cat >"conftest.$ac_ext" <<_ACEOF
22611 #line 22611 "configure"
22612 #include "confdefs.h"
22613
22614 #include <sys/types.h>
22615 #include <signal.h>
22616 int
22617 main (void)
22618 {
22619 struct sigaction act; (void)act
22620   ;
22621   return 0;
22622 }
22623 _ACEOF
22624 rm -f "conftest.$ac_objext"
22625 if { (eval echo "$as_me:22625: \"$ac_compile\"") >&5
22626   (eval $ac_compile) 2>&5
22627   ac_status=$?
22628   echo "$as_me:22628: \$? = $ac_status" >&5
22629   (exit "$ac_status"); } &&
22630          { ac_try='test -s "conftest.$ac_objext"'
22631   { (eval echo "$as_me:22631: \"$ac_try\"") >&5
22632   (eval $ac_try) 2>&5
22633   ac_status=$?
22634   echo "$as_me:22634: \$? = $ac_status" >&5
22635   (exit "$ac_status"); }; }; then
22636   sigact_bad=no
22637 else
22638   echo "$as_me: failed program was:" >&5
22639 cat "conftest.$ac_ext" >&5
22640
22641 cat >"conftest.$ac_ext" <<_ACEOF
22642 #line 22642 "configure"
22643 #include "confdefs.h"
22644
22645 #define _POSIX_SOURCE
22646 #include <sys/types.h>
22647 #include <signal.h>
22648 int
22649 main (void)
22650 {
22651 struct sigaction act; (void)act
22652   ;
22653   return 0;
22654 }
22655 _ACEOF
22656 rm -f "conftest.$ac_objext"
22657 if { (eval echo "$as_me:22657: \"$ac_compile\"") >&5
22658   (eval $ac_compile) 2>&5
22659   ac_status=$?
22660   echo "$as_me:22660: \$? = $ac_status" >&5
22661   (exit "$ac_status"); } &&
22662          { ac_try='test -s "conftest.$ac_objext"'
22663   { (eval echo "$as_me:22663: \"$ac_try\"") >&5
22664   (eval $ac_try) 2>&5
22665   ac_status=$?
22666   echo "$as_me:22666: \$? = $ac_status" >&5
22667   (exit "$ac_status"); }; }; then
22668   sigact_bad=yes
22669
22670 cat >>confdefs.h <<\EOF
22671 #define _POSIX_SOURCE 1
22672 EOF
22673
22674 else
22675   echo "$as_me: failed program was:" >&5
22676 cat "conftest.$ac_ext" >&5
22677 sigact_bad=unknown
22678 fi
22679 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22680 fi
22681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22682 echo "$as_me:22682: result: $sigact_bad" >&5
22683 echo "${ECHO_T}$sigact_bad" >&6
22684 fi
22685
22686 echo "$as_me:22686: checking if nanosleep really works" >&5
22687 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22688 if test "${cf_cv_func_nanosleep+set}" = set; then
22689   echo $ECHO_N "(cached) $ECHO_C" >&6
22690 else
22691
22692 if test "$cross_compiling" = yes; then
22693   cf_cv_func_nanosleep=unknown
22694 else
22695   cat >"conftest.$ac_ext" <<_ACEOF
22696 #line 22696 "configure"
22697 #include "confdefs.h"
22698
22699 $ac_includes_default
22700
22701 #include <errno.h>
22702 #include <time.h>
22703
22704 #ifdef HAVE_SYS_TIME_H
22705 #include <sys/time.h>
22706 #endif
22707
22708 int main(void) {
22709         struct timespec ts1, ts2;
22710         int code;
22711         ts1.tv_sec  = 0;
22712         ts1.tv_nsec = 750000000;
22713         ts2.tv_sec  = 0;
22714         ts2.tv_nsec = 0;
22715         errno = 0;
22716         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22717         ${cf_cv_main_return:-return}(code != 0);
22718 }
22719
22720 _ACEOF
22721 rm -f "conftest$ac_exeext"
22722 if { (eval echo "$as_me:22722: \"$ac_link\"") >&5
22723   (eval $ac_link) 2>&5
22724   ac_status=$?
22725   echo "$as_me:22725: \$? = $ac_status" >&5
22726   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22727   { (eval echo "$as_me:22727: \"$ac_try\"") >&5
22728   (eval $ac_try) 2>&5
22729   ac_status=$?
22730   echo "$as_me:22730: \$? = $ac_status" >&5
22731   (exit "$ac_status"); }; }; then
22732   cf_cv_func_nanosleep=yes
22733 else
22734   echo "$as_me: program exited with status $ac_status" >&5
22735 echo "$as_me: failed program was:" >&5
22736 cat "conftest.$ac_ext" >&5
22737 cf_cv_func_nanosleep=no
22738 fi
22739 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22740 fi
22741 fi
22742 echo "$as_me:22742: result: $cf_cv_func_nanosleep" >&5
22743 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22744
22745 test "$cf_cv_func_nanosleep" = "yes" &&
22746 cat >>confdefs.h <<\EOF
22747 #define HAVE_NANOSLEEP 1
22748 EOF
22749
22750 for ac_header in \
22751 termio.h \
22752 termios.h \
22753 unistd.h \
22754 sys/ioctl.h \
22755 sys/termio.h \
22756
22757 do
22758 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22759 echo "$as_me:22759: checking for $ac_header" >&5
22760 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22761 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22762   echo $ECHO_N "(cached) $ECHO_C" >&6
22763 else
22764   cat >"conftest.$ac_ext" <<_ACEOF
22765 #line 22765 "configure"
22766 #include "confdefs.h"
22767 #include <$ac_header>
22768 _ACEOF
22769 if { (eval echo "$as_me:22769: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22770   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22771   ac_status=$?
22772   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22773   rm -f conftest.er1
22774   cat conftest.err >&5
22775   echo "$as_me:22775: \$? = $ac_status" >&5
22776   (exit "$ac_status"); } >/dev/null; then
22777   if test -s conftest.err; then
22778     ac_cpp_err=$ac_c_preproc_warn_flag
22779   else
22780     ac_cpp_err=
22781   fi
22782 else
22783   ac_cpp_err=yes
22784 fi
22785 if test -z "$ac_cpp_err"; then
22786   eval "$as_ac_Header=yes"
22787 else
22788   echo "$as_me: failed program was:" >&5
22789   cat "conftest.$ac_ext" >&5
22790   eval "$as_ac_Header=no"
22791 fi
22792 rm -f conftest.err "conftest.$ac_ext"
22793 fi
22794 echo "$as_me:22794: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22795 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22796 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22797   cat >>confdefs.h <<EOF
22798 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22799 EOF
22800
22801 fi
22802 done
22803
22804 if test "$ac_cv_header_termios_h" = yes ; then
22805         case "$CFLAGS $CPPFLAGS" in
22806         (*-D_POSIX_SOURCE*)
22807                 termios_bad=dunno ;;
22808         (*)     termios_bad=maybe ;;
22809         esac
22810         if test "$termios_bad" = maybe ; then
22811         echo "$as_me:22811: checking whether termios.h needs _POSIX_SOURCE" >&5
22812 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22813         cat >"conftest.$ac_ext" <<_ACEOF
22814 #line 22814 "configure"
22815 #include "confdefs.h"
22816 #include <termios.h>
22817 int
22818 main (void)
22819 {
22820 struct termios foo; int x = (int)(foo.c_iflag = 1); (void)x
22821   ;
22822   return 0;
22823 }
22824 _ACEOF
22825 rm -f "conftest.$ac_objext"
22826 if { (eval echo "$as_me:22826: \"$ac_compile\"") >&5
22827   (eval $ac_compile) 2>&5
22828   ac_status=$?
22829   echo "$as_me:22829: \$? = $ac_status" >&5
22830   (exit "$ac_status"); } &&
22831          { ac_try='test -s "conftest.$ac_objext"'
22832   { (eval echo "$as_me:22832: \"$ac_try\"") >&5
22833   (eval $ac_try) 2>&5
22834   ac_status=$?
22835   echo "$as_me:22835: \$? = $ac_status" >&5
22836   (exit "$ac_status"); }; }; then
22837   termios_bad=no
22838 else
22839   echo "$as_me: failed program was:" >&5
22840 cat "conftest.$ac_ext" >&5
22841
22842                 cat >"conftest.$ac_ext" <<_ACEOF
22843 #line 22843 "configure"
22844 #include "confdefs.h"
22845
22846 #define _POSIX_SOURCE
22847 #include <termios.h>
22848 int
22849 main (void)
22850 {
22851 struct termios foo; int x = (int)(foo.c_iflag = 2); (void)x
22852   ;
22853   return 0;
22854 }
22855 _ACEOF
22856 rm -f "conftest.$ac_objext"
22857 if { (eval echo "$as_me:22857: \"$ac_compile\"") >&5
22858   (eval $ac_compile) 2>&5
22859   ac_status=$?
22860   echo "$as_me:22860: \$? = $ac_status" >&5
22861   (exit "$ac_status"); } &&
22862          { ac_try='test -s "conftest.$ac_objext"'
22863   { (eval echo "$as_me:22863: \"$ac_try\"") >&5
22864   (eval $ac_try) 2>&5
22865   ac_status=$?
22866   echo "$as_me:22866: \$? = $ac_status" >&5
22867   (exit "$ac_status"); }; }; then
22868   termios_bad=unknown
22869 else
22870   echo "$as_me: failed program was:" >&5
22871 cat "conftest.$ac_ext" >&5
22872 termios_bad=yes
22873 cat >>confdefs.h <<\EOF
22874 #define _POSIX_SOURCE 1
22875 EOF
22876
22877 fi
22878 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22879
22880 fi
22881 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22882         echo "$as_me:22882: result: $termios_bad" >&5
22883 echo "${ECHO_T}$termios_bad" >&6
22884         fi
22885 fi
22886
22887 echo "$as_me:22887: checking for tcgetattr" >&5
22888 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22889 if test "${cf_cv_have_tcgetattr+set}" = set; then
22890   echo $ECHO_N "(cached) $ECHO_C" >&6
22891 else
22892
22893 cat >"conftest.$ac_ext" <<_ACEOF
22894 #line 22894 "configure"
22895 #include "confdefs.h"
22896
22897 #include <sys/types.h>
22898 #ifdef HAVE_UNISTD_H
22899 #include <unistd.h>
22900 #endif
22901 #ifdef HAVE_TERMIOS_H
22902 #include <termios.h>
22903 #define TTY struct termios
22904 #else
22905 #ifdef HAVE_TERMIO_H
22906 #include <termio.h>
22907 #define TTY struct termio
22908 #endif
22909 #endif
22910
22911 int
22912 main (void)
22913 {
22914
22915 TTY foo;
22916 tcgetattr(1, &foo);
22917   ;
22918   return 0;
22919 }
22920 _ACEOF
22921 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22922 if { (eval echo "$as_me:22922: \"$ac_link\"") >&5
22923   (eval $ac_link) 2>&5
22924   ac_status=$?
22925   echo "$as_me:22925: \$? = $ac_status" >&5
22926   (exit "$ac_status"); } &&
22927          { ac_try='test -s "conftest$ac_exeext"'
22928   { (eval echo "$as_me:22928: \"$ac_try\"") >&5
22929   (eval $ac_try) 2>&5
22930   ac_status=$?
22931   echo "$as_me:22931: \$? = $ac_status" >&5
22932   (exit "$ac_status"); }; }; then
22933   cf_cv_have_tcgetattr=yes
22934 else
22935   echo "$as_me: failed program was:" >&5
22936 cat "conftest.$ac_ext" >&5
22937 cf_cv_have_tcgetattr=no
22938 fi
22939 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22940 fi
22941 echo "$as_me:22941: result: $cf_cv_have_tcgetattr" >&5
22942 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22943 test "$cf_cv_have_tcgetattr" = yes &&
22944 cat >>confdefs.h <<\EOF
22945 #define HAVE_TCGETATTR 1
22946 EOF
22947
22948 echo "$as_me:22948: checking for vsscanf function or workaround" >&5
22949 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22950 if test "${cf_cv_func_vsscanf+set}" = set; then
22951   echo $ECHO_N "(cached) $ECHO_C" >&6
22952 else
22953
22954 cat >"conftest.$ac_ext" <<_ACEOF
22955 #line 22955 "configure"
22956 #include "confdefs.h"
22957
22958 #include <stdarg.h>
22959 #include <stdio.h>
22960
22961 static void
22962 myfunc(const char *str, const char *fmt, ...)
22963 {
22964         va_list ap;
22965         va_start(ap, fmt);
22966         vsscanf(str, fmt, ap);
22967         va_end(ap);
22968 }
22969
22970 int
22971 main (void)
22972 {
22973
22974         myfunc("55", "%d");
22975
22976   ;
22977   return 0;
22978 }
22979 _ACEOF
22980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22981 if { (eval echo "$as_me:22981: \"$ac_link\"") >&5
22982   (eval $ac_link) 2>&5
22983   ac_status=$?
22984   echo "$as_me:22984: \$? = $ac_status" >&5
22985   (exit "$ac_status"); } &&
22986          { ac_try='test -s "conftest$ac_exeext"'
22987   { (eval echo "$as_me:22987: \"$ac_try\"") >&5
22988   (eval $ac_try) 2>&5
22989   ac_status=$?
22990   echo "$as_me:22990: \$? = $ac_status" >&5
22991   (exit "$ac_status"); }; }; then
22992   cf_cv_func_vsscanf=vsscanf
22993 else
22994   echo "$as_me: failed program was:" >&5
22995 cat "conftest.$ac_ext" >&5
22996
22997 cat >"conftest.$ac_ext" <<_ACEOF
22998 #line 22998 "configure"
22999 #include "confdefs.h"
23000
23001 #include <stdarg.h>
23002 #include <stdio.h>
23003 int
23004 main (void)
23005 {
23006
23007         FILE strbuf;
23008         char *str = "from";
23009
23010         strbuf._flag = _IOREAD;
23011         strbuf._ptr = strbuf._base = (unsigned char *) str;
23012         strbuf._cnt = strlen(str);
23013         strbuf._file = _NFILE;
23014         return (vfscanf(&strbuf, "%d", ap))
23015   ;
23016   return 0;
23017 }
23018 _ACEOF
23019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23020 if { (eval echo "$as_me:23020: \"$ac_link\"") >&5
23021   (eval $ac_link) 2>&5
23022   ac_status=$?
23023   echo "$as_me:23023: \$? = $ac_status" >&5
23024   (exit "$ac_status"); } &&
23025          { ac_try='test -s "conftest$ac_exeext"'
23026   { (eval echo "$as_me:23026: \"$ac_try\"") >&5
23027   (eval $ac_try) 2>&5
23028   ac_status=$?
23029   echo "$as_me:23029: \$? = $ac_status" >&5
23030   (exit "$ac_status"); }; }; then
23031   cf_cv_func_vsscanf=vfscanf
23032 else
23033   echo "$as_me: failed program was:" >&5
23034 cat "conftest.$ac_ext" >&5
23035
23036 cat >"conftest.$ac_ext" <<_ACEOF
23037 #line 23037 "configure"
23038 #include "confdefs.h"
23039
23040 #include <stdarg.h>
23041 #include <stdio.h>
23042 int
23043 main (void)
23044 {
23045
23046         FILE strbuf;
23047         char *str = "from";
23048
23049         strbuf._flag = _IOREAD;
23050         strbuf._ptr = strbuf._base = (unsigned char *) str;
23051         strbuf._cnt = strlen(str);
23052         strbuf._file = _NFILE;
23053         return (_doscan(&strbuf, "%d", ap))
23054   ;
23055   return 0;
23056 }
23057 _ACEOF
23058 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23059 if { (eval echo "$as_me:23059: \"$ac_link\"") >&5
23060   (eval $ac_link) 2>&5
23061   ac_status=$?
23062   echo "$as_me:23062: \$? = $ac_status" >&5
23063   (exit "$ac_status"); } &&
23064          { ac_try='test -s "conftest$ac_exeext"'
23065   { (eval echo "$as_me:23065: \"$ac_try\"") >&5
23066   (eval $ac_try) 2>&5
23067   ac_status=$?
23068   echo "$as_me:23068: \$? = $ac_status" >&5
23069   (exit "$ac_status"); }; }; then
23070   cf_cv_func_vsscanf=_doscan
23071 else
23072   echo "$as_me: failed program was:" >&5
23073 cat "conftest.$ac_ext" >&5
23074
23075 cf_cv_func_vsscanf=no
23076 fi
23077 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23078 fi
23079 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23080 fi
23081 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23082 fi
23083 echo "$as_me:23083: result: $cf_cv_func_vsscanf" >&5
23084 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
23085
23086 case "$cf_cv_func_vsscanf" in
23087 (vsscanf)
23088 cat >>confdefs.h <<\EOF
23089 #define HAVE_VSSCANF 1
23090 EOF
23091 ;;
23092 (vfscanf)
23093 cat >>confdefs.h <<\EOF
23094 #define HAVE_VFSCANF 1
23095 EOF
23096 ;;
23097 (_doscan)
23098 cat >>confdefs.h <<\EOF
23099 #define HAVE__DOSCAN 1
23100 EOF
23101 ;;
23102 esac
23103
23104 for ac_header in \
23105 unistd.h \
23106
23107 do
23108 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23109 echo "$as_me:23109: checking for $ac_header" >&5
23110 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23111 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23112   echo $ECHO_N "(cached) $ECHO_C" >&6
23113 else
23114   cat >"conftest.$ac_ext" <<_ACEOF
23115 #line 23115 "configure"
23116 #include "confdefs.h"
23117 #include <$ac_header>
23118 _ACEOF
23119 if { (eval echo "$as_me:23119: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23120   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23121   ac_status=$?
23122   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23123   rm -f conftest.er1
23124   cat conftest.err >&5
23125   echo "$as_me:23125: \$? = $ac_status" >&5
23126   (exit "$ac_status"); } >/dev/null; then
23127   if test -s conftest.err; then
23128     ac_cpp_err=$ac_c_preproc_warn_flag
23129   else
23130     ac_cpp_err=
23131   fi
23132 else
23133   ac_cpp_err=yes
23134 fi
23135 if test -z "$ac_cpp_err"; then
23136   eval "$as_ac_Header=yes"
23137 else
23138   echo "$as_me: failed program was:" >&5
23139   cat "conftest.$ac_ext" >&5
23140   eval "$as_ac_Header=no"
23141 fi
23142 rm -f conftest.err "conftest.$ac_ext"
23143 fi
23144 echo "$as_me:23144: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23145 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23146 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23147   cat >>confdefs.h <<EOF
23148 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23149 EOF
23150
23151 fi
23152 done
23153
23154 echo "$as_me:23154: checking for working mkstemp" >&5
23155 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
23156 if test "${cf_cv_func_mkstemp+set}" = set; then
23157   echo $ECHO_N "(cached) $ECHO_C" >&6
23158 else
23159
23160 rm -rf ./conftest*
23161 if test "$cross_compiling" = yes; then
23162   cf_cv_func_mkstemp=maybe
23163 else
23164   cat >"conftest.$ac_ext" <<_ACEOF
23165 #line 23165 "configure"
23166 #include "confdefs.h"
23167
23168 $ac_includes_default
23169
23170 int main(void)
23171 {
23172         static char tmpl[] = "conftestXXXXXX";
23173         char name[2][80];
23174         int n;
23175         int result = 0;
23176         int fd;
23177         struct stat sb;
23178
23179         umask(077);
23180         for (n = 0; n < 2; ++n) {
23181                 strcpy(name[n], tmpl);
23182                 if ((fd = mkstemp(name[n])) >= 0) {
23183                         if (!strcmp(name[n], tmpl)
23184                          || stat(name[n], &sb) != 0
23185                          || (sb.st_mode & S_IFMT) != S_IFREG
23186                          || (sb.st_mode & 077) != 0) {
23187                                 result = 1;
23188                         }
23189                         close(fd);
23190                 }
23191         }
23192         if (result == 0
23193          && !strcmp(name[0], name[1]))
23194                 result = 1;
23195         ${cf_cv_main_return:-return}(result);
23196 }
23197
23198 _ACEOF
23199 rm -f "conftest$ac_exeext"
23200 if { (eval echo "$as_me:23200: \"$ac_link\"") >&5
23201   (eval $ac_link) 2>&5
23202   ac_status=$?
23203   echo "$as_me:23203: \$? = $ac_status" >&5
23204   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23205   { (eval echo "$as_me:23205: \"$ac_try\"") >&5
23206   (eval $ac_try) 2>&5
23207   ac_status=$?
23208   echo "$as_me:23208: \$? = $ac_status" >&5
23209   (exit "$ac_status"); }; }; then
23210   cf_cv_func_mkstemp=yes
23211
23212 else
23213   echo "$as_me: program exited with status $ac_status" >&5
23214 echo "$as_me: failed program was:" >&5
23215 cat "conftest.$ac_ext" >&5
23216 cf_cv_func_mkstemp=no
23217
23218 fi
23219 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23220 fi
23221
23222 fi
23223 echo "$as_me:23223: result: $cf_cv_func_mkstemp" >&5
23224 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
23225 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
23226         echo "$as_me:23226: checking for mkstemp" >&5
23227 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
23228 if test "${ac_cv_func_mkstemp+set}" = set; then
23229   echo $ECHO_N "(cached) $ECHO_C" >&6
23230 else
23231   cat >"conftest.$ac_ext" <<_ACEOF
23232 #line 23232 "configure"
23233 #include "confdefs.h"
23234 #define mkstemp autoconf_temporary
23235 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23236 #undef mkstemp
23237
23238 #ifdef __cplusplus
23239 extern "C"
23240 #endif
23241
23242 /* We use char because int might match the return type of a gcc2
23243    builtin and then its argument prototype would still apply.  */
23244 char mkstemp (void);
23245
23246 int
23247 main (void)
23248 {
23249
23250 /* The GNU C library defines stubs for functions which it implements
23251     to always fail with ENOSYS.  Some functions are actually named
23252     something starting with __ and the normal name is an alias.  */
23253 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
23254 #error found stub for mkstemp
23255 #endif
23256
23257         return mkstemp ();
23258   ;
23259   return 0;
23260 }
23261 _ACEOF
23262 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23263 if { (eval echo "$as_me:23263: \"$ac_link\"") >&5
23264   (eval $ac_link) 2>&5
23265   ac_status=$?
23266   echo "$as_me:23266: \$? = $ac_status" >&5
23267   (exit "$ac_status"); } &&
23268          { ac_try='test -s "conftest$ac_exeext"'
23269   { (eval echo "$as_me:23269: \"$ac_try\"") >&5
23270   (eval $ac_try) 2>&5
23271   ac_status=$?
23272   echo "$as_me:23272: \$? = $ac_status" >&5
23273   (exit "$ac_status"); }; }; then
23274   ac_cv_func_mkstemp=yes
23275 else
23276   echo "$as_me: failed program was:" >&5
23277 cat "conftest.$ac_ext" >&5
23278 ac_cv_func_mkstemp=no
23279 fi
23280 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23281 fi
23282 echo "$as_me:23282: result: $ac_cv_func_mkstemp" >&5
23283 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
23284
23285 fi
23286 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
23287
23288 cat >>confdefs.h <<\EOF
23289 #define HAVE_MKSTEMP 1
23290 EOF
23291
23292 fi
23293
23294 # setup for prototype of fallback for vsscanf()
23295
23296 if test "$cf_cv_func_vsscanf" = vsscanf ; then
23297         HAVE_VSSCANF=1
23298 else
23299         HAVE_VSSCANF=0
23300 fi
23301
23302 if test "x$cross_compiling" = xyes ; then
23303         { echo "$as_me:23303: WARNING: cross compiling: assume setvbuf params not reversed" >&5
23304 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
23305 else
23306         echo "$as_me:23306: checking whether setvbuf arguments are reversed" >&5
23307 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
23308 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
23309   echo $ECHO_N "(cached) $ECHO_C" >&6
23310 else
23311   if test "$cross_compiling" = yes; then
23312   { { echo "$as_me:23312: error: cannot run test program while cross compiling" >&5
23313 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
23314    { (exit 1); exit 1; }; }
23315 else
23316   cat >"conftest.$ac_ext" <<_ACEOF
23317 #line 23317 "configure"
23318 #include "confdefs.h"
23319 #include <stdio.h>
23320 /* If setvbuf has the reversed format, exit 0. */
23321 int
23322 main (void)
23323 {
23324   /* This call has the arguments reversed.
23325      A reversed system may check and see that the address of main
23326      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
23327   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
23328     $ac_main_return(1);
23329   putc('\r', stdout);
23330   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
23331 }
23332 _ACEOF
23333 rm -f "conftest$ac_exeext"
23334 if { (eval echo "$as_me:23334: \"$ac_link\"") >&5
23335   (eval $ac_link) 2>&5
23336   ac_status=$?
23337   echo "$as_me:23337: \$? = $ac_status" >&5
23338   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23339   { (eval echo "$as_me:23339: \"$ac_try\"") >&5
23340   (eval $ac_try) 2>&5
23341   ac_status=$?
23342   echo "$as_me:23342: \$? = $ac_status" >&5
23343   (exit "$ac_status"); }; }; then
23344   ac_cv_func_setvbuf_reversed=yes
23345 else
23346   echo "$as_me: program exited with status $ac_status" >&5
23347 echo "$as_me: failed program was:" >&5
23348 cat "conftest.$ac_ext" >&5
23349 ac_cv_func_setvbuf_reversed=no
23350 fi
23351 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23352 fi
23353 rm -f core ./core.* ./*.core
23354 fi
23355 echo "$as_me:23355: result: $ac_cv_func_setvbuf_reversed" >&5
23356 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
23357 if test $ac_cv_func_setvbuf_reversed = yes; then
23358
23359 cat >>confdefs.h <<\EOF
23360 #define SETVBUF_REVERSED 1
23361 EOF
23362
23363 fi
23364
23365 fi
23366 echo "$as_me:23366: checking for intptr_t" >&5
23367 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
23368 if test "${ac_cv_type_intptr_t+set}" = set; then
23369   echo $ECHO_N "(cached) $ECHO_C" >&6
23370 else
23371   cat >"conftest.$ac_ext" <<_ACEOF
23372 #line 23372 "configure"
23373 #include "confdefs.h"
23374 $ac_includes_default
23375 int
23376 main (void)
23377 {
23378 if ((intptr_t *) 0)
23379   return 0;
23380 if (sizeof (intptr_t))
23381   return 0;
23382   ;
23383   return 0;
23384 }
23385 _ACEOF
23386 rm -f "conftest.$ac_objext"
23387 if { (eval echo "$as_me:23387: \"$ac_compile\"") >&5
23388   (eval $ac_compile) 2>&5
23389   ac_status=$?
23390   echo "$as_me:23390: \$? = $ac_status" >&5
23391   (exit "$ac_status"); } &&
23392          { ac_try='test -s "conftest.$ac_objext"'
23393   { (eval echo "$as_me:23393: \"$ac_try\"") >&5
23394   (eval $ac_try) 2>&5
23395   ac_status=$?
23396   echo "$as_me:23396: \$? = $ac_status" >&5
23397   (exit "$ac_status"); }; }; then
23398   ac_cv_type_intptr_t=yes
23399 else
23400   echo "$as_me: failed program was:" >&5
23401 cat "conftest.$ac_ext" >&5
23402 ac_cv_type_intptr_t=no
23403 fi
23404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23405 fi
23406 echo "$as_me:23406: result: $ac_cv_type_intptr_t" >&5
23407 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
23408 if test "$ac_cv_type_intptr_t" = yes; then
23409   :
23410 else
23411
23412 cat >>confdefs.h <<EOF
23413 #define intptr_t long
23414 EOF
23415
23416 fi
23417
23418 echo "$as_me:23418: checking for ssize_t" >&5
23419 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23420 if test "${ac_cv_type_ssize_t+set}" = set; then
23421   echo $ECHO_N "(cached) $ECHO_C" >&6
23422 else
23423   cat >"conftest.$ac_ext" <<_ACEOF
23424 #line 23424 "configure"
23425 #include "confdefs.h"
23426 $ac_includes_default
23427 int
23428 main (void)
23429 {
23430 if ((ssize_t *) 0)
23431   return 0;
23432 if (sizeof (ssize_t))
23433   return 0;
23434   ;
23435   return 0;
23436 }
23437 _ACEOF
23438 rm -f "conftest.$ac_objext"
23439 if { (eval echo "$as_me:23439: \"$ac_compile\"") >&5
23440   (eval $ac_compile) 2>&5
23441   ac_status=$?
23442   echo "$as_me:23442: \$? = $ac_status" >&5
23443   (exit "$ac_status"); } &&
23444          { ac_try='test -s "conftest.$ac_objext"'
23445   { (eval echo "$as_me:23445: \"$ac_try\"") >&5
23446   (eval $ac_try) 2>&5
23447   ac_status=$?
23448   echo "$as_me:23448: \$? = $ac_status" >&5
23449   (exit "$ac_status"); }; }; then
23450   ac_cv_type_ssize_t=yes
23451 else
23452   echo "$as_me: failed program was:" >&5
23453 cat "conftest.$ac_ext" >&5
23454 ac_cv_type_ssize_t=no
23455 fi
23456 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23457 fi
23458 echo "$as_me:23458: result: $ac_cv_type_ssize_t" >&5
23459 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23460 if test "$ac_cv_type_ssize_t" = yes; then
23461   :
23462 else
23463
23464 cat >>confdefs.h <<EOF
23465 #define ssize_t int
23466 EOF
23467
23468 fi
23469
23470 echo "$as_me:23470: checking for type sigaction_t" >&5
23471 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23472 if test "${cf_cv_type_sigaction+set}" = set; then
23473   echo $ECHO_N "(cached) $ECHO_C" >&6
23474 else
23475
23476         cat >"conftest.$ac_ext" <<_ACEOF
23477 #line 23477 "configure"
23478 #include "confdefs.h"
23479
23480 #include <signal.h>
23481 int
23482 main (void)
23483 {
23484 sigaction_t x; (void)x
23485   ;
23486   return 0;
23487 }
23488 _ACEOF
23489 rm -f "conftest.$ac_objext"
23490 if { (eval echo "$as_me:23490: \"$ac_compile\"") >&5
23491   (eval $ac_compile) 2>&5
23492   ac_status=$?
23493   echo "$as_me:23493: \$? = $ac_status" >&5
23494   (exit "$ac_status"); } &&
23495          { ac_try='test -s "conftest.$ac_objext"'
23496   { (eval echo "$as_me:23496: \"$ac_try\"") >&5
23497   (eval $ac_try) 2>&5
23498   ac_status=$?
23499   echo "$as_me:23499: \$? = $ac_status" >&5
23500   (exit "$ac_status"); }; }; then
23501   cf_cv_type_sigaction=yes
23502 else
23503   echo "$as_me: failed program was:" >&5
23504 cat "conftest.$ac_ext" >&5
23505 cf_cv_type_sigaction=no
23506 fi
23507 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23508 fi
23509
23510 echo "$as_me:23510: result: $cf_cv_type_sigaction" >&5
23511 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23512 test "$cf_cv_type_sigaction" = yes &&
23513 cat >>confdefs.h <<\EOF
23514 #define HAVE_TYPE_SIGACTION 1
23515 EOF
23516
23517 echo "$as_me:23517: checking declaration of size-change" >&5
23518 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23519 if test "${cf_cv_sizechange+set}" = set; then
23520   echo $ECHO_N "(cached) $ECHO_C" >&6
23521 else
23522
23523         cf_cv_sizechange=unknown
23524         cf_save_CPPFLAGS="$CPPFLAGS"
23525
23526 for cf_opts in "" "NEED_PTEM_H"
23527 do
23528
23529         CPPFLAGS="$cf_save_CPPFLAGS"
23530         if test -n "$cf_opts"
23531         then
23532
23533         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23534         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23535
23536         fi
23537         cat >"conftest.$ac_ext" <<_ACEOF
23538 #line 23538 "configure"
23539 #include "confdefs.h"
23540 #include <sys/types.h>
23541 #ifdef HAVE_TERMIOS_H
23542 #include <termios.h>
23543 #else
23544 #ifdef HAVE_TERMIO_H
23545 #include <termio.h>
23546 #endif
23547 #endif
23548
23549 #ifdef NEED_PTEM_H
23550 /* This is a workaround for SCO:  they neglected to define struct winsize in
23551  * termios.h -- it is only in termio.h and ptem.h
23552  */
23553 #include <sys/stream.h>
23554 #include <sys/ptem.h>
23555 #endif
23556
23557 #ifdef HAVE_SYS_IOCTL_H
23558 #include <sys/ioctl.h>
23559 #endif
23560
23561 int
23562 main (void)
23563 {
23564
23565 #ifdef TIOCGSIZE
23566         struct ttysize win;     /* SunOS 3.0... */
23567         int y = win.ts_lines = 2;
23568         int x = win.ts_cols = 1;
23569         (void)y;
23570         (void)x;
23571 #else
23572 #ifdef TIOCGWINSZ
23573         struct winsize win;     /* everything else */
23574         int y = win.ws_row = 2;
23575         int x = win.ws_col = 1;
23576         (void)y;
23577         (void)x;
23578 #else
23579         no TIOCGSIZE or TIOCGWINSZ
23580 #endif /* TIOCGWINSZ */
23581 #endif /* TIOCGSIZE */
23582
23583   ;
23584   return 0;
23585 }
23586 _ACEOF
23587 rm -f "conftest.$ac_objext"
23588 if { (eval echo "$as_me:23588: \"$ac_compile\"") >&5
23589   (eval $ac_compile) 2>&5
23590   ac_status=$?
23591   echo "$as_me:23591: \$? = $ac_status" >&5
23592   (exit "$ac_status"); } &&
23593          { ac_try='test -s "conftest.$ac_objext"'
23594   { (eval echo "$as_me:23594: \"$ac_try\"") >&5
23595   (eval $ac_try) 2>&5
23596   ac_status=$?
23597   echo "$as_me:23597: \$? = $ac_status" >&5
23598   (exit "$ac_status"); }; }; then
23599   cf_cv_sizechange=yes
23600 else
23601   echo "$as_me: failed program was:" >&5
23602 cat "conftest.$ac_ext" >&5
23603 cf_cv_sizechange=no
23604 fi
23605 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23606
23607         CPPFLAGS="$cf_save_CPPFLAGS"
23608         if test "$cf_cv_sizechange" = yes ; then
23609                 echo "size-change succeeded ($cf_opts)" >&5
23610                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23611                 break
23612         fi
23613 done
23614
23615 fi
23616 echo "$as_me:23616: result: $cf_cv_sizechange" >&5
23617 echo "${ECHO_T}$cf_cv_sizechange" >&6
23618 if test "$cf_cv_sizechange" != no ; then
23619
23620 cat >>confdefs.h <<\EOF
23621 #define HAVE_SIZECHANGE 1
23622 EOF
23623
23624         case "$cf_cv_sizechange" in
23625         (NEED*)
23626                 cat >>confdefs.h <<EOF
23627 #define $cf_cv_sizechange  1
23628 EOF
23629
23630                 ;;
23631         esac
23632 fi
23633
23634 echo "$as_me:23634: checking for memmove" >&5
23635 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23636 if test "${ac_cv_func_memmove+set}" = set; then
23637   echo $ECHO_N "(cached) $ECHO_C" >&6
23638 else
23639   cat >"conftest.$ac_ext" <<_ACEOF
23640 #line 23640 "configure"
23641 #include "confdefs.h"
23642 #define memmove autoconf_temporary
23643 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23644 #undef memmove
23645
23646 #ifdef __cplusplus
23647 extern "C"
23648 #endif
23649
23650 /* We use char because int might match the return type of a gcc2
23651    builtin and then its argument prototype would still apply.  */
23652 char memmove (void);
23653
23654 int
23655 main (void)
23656 {
23657
23658 /* The GNU C library defines stubs for functions which it implements
23659     to always fail with ENOSYS.  Some functions are actually named
23660     something starting with __ and the normal name is an alias.  */
23661 #if defined (__stub_memmove) || defined (__stub___memmove)
23662 #error found stub for memmove
23663 #endif
23664
23665         return memmove ();
23666   ;
23667   return 0;
23668 }
23669 _ACEOF
23670 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23671 if { (eval echo "$as_me:23671: \"$ac_link\"") >&5
23672   (eval $ac_link) 2>&5
23673   ac_status=$?
23674   echo "$as_me:23674: \$? = $ac_status" >&5
23675   (exit "$ac_status"); } &&
23676          { ac_try='test -s "conftest$ac_exeext"'
23677   { (eval echo "$as_me:23677: \"$ac_try\"") >&5
23678   (eval $ac_try) 2>&5
23679   ac_status=$?
23680   echo "$as_me:23680: \$? = $ac_status" >&5
23681   (exit "$ac_status"); }; }; then
23682   ac_cv_func_memmove=yes
23683 else
23684   echo "$as_me: failed program was:" >&5
23685 cat "conftest.$ac_ext" >&5
23686 ac_cv_func_memmove=no
23687 fi
23688 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23689 fi
23690 echo "$as_me:23690: result: $ac_cv_func_memmove" >&5
23691 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23692 if test "$ac_cv_func_memmove" = yes; then
23693   :
23694 else
23695
23696 echo "$as_me:23696: checking for bcopy" >&5
23697 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23698 if test "${ac_cv_func_bcopy+set}" = set; then
23699   echo $ECHO_N "(cached) $ECHO_C" >&6
23700 else
23701   cat >"conftest.$ac_ext" <<_ACEOF
23702 #line 23702 "configure"
23703 #include "confdefs.h"
23704 #define bcopy autoconf_temporary
23705 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23706 #undef bcopy
23707
23708 #ifdef __cplusplus
23709 extern "C"
23710 #endif
23711
23712 /* We use char because int might match the return type of a gcc2
23713    builtin and then its argument prototype would still apply.  */
23714 char bcopy (void);
23715
23716 int
23717 main (void)
23718 {
23719
23720 /* The GNU C library defines stubs for functions which it implements
23721     to always fail with ENOSYS.  Some functions are actually named
23722     something starting with __ and the normal name is an alias.  */
23723 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23724 #error found stub for bcopy
23725 #endif
23726
23727         return bcopy ();
23728   ;
23729   return 0;
23730 }
23731 _ACEOF
23732 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23733 if { (eval echo "$as_me:23733: \"$ac_link\"") >&5
23734   (eval $ac_link) 2>&5
23735   ac_status=$?
23736   echo "$as_me:23736: \$? = $ac_status" >&5
23737   (exit "$ac_status"); } &&
23738          { ac_try='test -s "conftest$ac_exeext"'
23739   { (eval echo "$as_me:23739: \"$ac_try\"") >&5
23740   (eval $ac_try) 2>&5
23741   ac_status=$?
23742   echo "$as_me:23742: \$? = $ac_status" >&5
23743   (exit "$ac_status"); }; }; then
23744   ac_cv_func_bcopy=yes
23745 else
23746   echo "$as_me: failed program was:" >&5
23747 cat "conftest.$ac_ext" >&5
23748 ac_cv_func_bcopy=no
23749 fi
23750 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23751 fi
23752 echo "$as_me:23752: result: $ac_cv_func_bcopy" >&5
23753 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23754 if test "$ac_cv_func_bcopy" = yes; then
23755
23756         echo "$as_me:23756: checking if bcopy does overlapping moves" >&5
23757 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23758 if test "${cf_cv_good_bcopy+set}" = set; then
23759   echo $ECHO_N "(cached) $ECHO_C" >&6
23760 else
23761
23762                 if test "$cross_compiling" = yes; then
23763   cf_cv_good_bcopy=unknown
23764 else
23765   cat >"conftest.$ac_ext" <<_ACEOF
23766 #line 23766 "configure"
23767 #include "confdefs.h"
23768
23769 $ac_includes_default
23770
23771 int main(void) {
23772         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23773         char temp[40];
23774         bcopy(data, temp, sizeof(data));
23775         bcopy(temp+10, temp, 15);
23776         bcopy(temp+5, temp+15, 10);
23777         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23778 }
23779
23780 _ACEOF
23781 rm -f "conftest$ac_exeext"
23782 if { (eval echo "$as_me:23782: \"$ac_link\"") >&5
23783   (eval $ac_link) 2>&5
23784   ac_status=$?
23785   echo "$as_me:23785: \$? = $ac_status" >&5
23786   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23787   { (eval echo "$as_me:23787: \"$ac_try\"") >&5
23788   (eval $ac_try) 2>&5
23789   ac_status=$?
23790   echo "$as_me:23790: \$? = $ac_status" >&5
23791   (exit "$ac_status"); }; }; then
23792   cf_cv_good_bcopy=yes
23793 else
23794   echo "$as_me: program exited with status $ac_status" >&5
23795 echo "$as_me: failed program was:" >&5
23796 cat "conftest.$ac_ext" >&5
23797 cf_cv_good_bcopy=no
23798 fi
23799 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23800 fi
23801
23802 fi
23803 echo "$as_me:23803: result: $cf_cv_good_bcopy" >&5
23804 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23805
23806 else
23807   cf_cv_good_bcopy=no
23808 fi
23809
23810         if test "$cf_cv_good_bcopy" = yes ; then
23811
23812 cat >>confdefs.h <<\EOF
23813 #define USE_OK_BCOPY 1
23814 EOF
23815
23816         else
23817
23818 cat >>confdefs.h <<\EOF
23819 #define USE_MY_MEMMOVE 1
23820 EOF
23821
23822         fi
23823
23824 fi
23825
23826 tty >/dev/null 2>&1 || {
23827 for ac_func in posix_openpt
23828 do
23829 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23830 echo "$as_me:23830: checking for $ac_func" >&5
23831 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23832 if eval "test \"\${$as_ac_var+set}\" = set"; then
23833   echo $ECHO_N "(cached) $ECHO_C" >&6
23834 else
23835   cat >"conftest.$ac_ext" <<_ACEOF
23836 #line 23836 "configure"
23837 #include "confdefs.h"
23838 #define $ac_func autoconf_temporary
23839 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23840 #undef $ac_func
23841
23842 #ifdef __cplusplus
23843 extern "C"
23844 #endif
23845
23846 /* We use char because int might match the return type of a gcc2
23847    builtin and then its argument prototype would still apply.  */
23848 char $ac_func (void);
23849
23850 int
23851 main (void)
23852 {
23853
23854 /* The GNU C library defines stubs for functions which it implements
23855     to always fail with ENOSYS.  Some functions are actually named
23856     something starting with __ and the normal name is an alias.  */
23857 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23858 #error found stub for $ac_func
23859 #endif
23860
23861         return $ac_func ();
23862   ;
23863   return 0;
23864 }
23865 _ACEOF
23866 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23867 if { (eval echo "$as_me:23867: \"$ac_link\"") >&5
23868   (eval $ac_link) 2>&5
23869   ac_status=$?
23870   echo "$as_me:23870: \$? = $ac_status" >&5
23871   (exit "$ac_status"); } &&
23872          { ac_try='test -s "conftest$ac_exeext"'
23873   { (eval echo "$as_me:23873: \"$ac_try\"") >&5
23874   (eval $ac_try) 2>&5
23875   ac_status=$?
23876   echo "$as_me:23876: \$? = $ac_status" >&5
23877   (exit "$ac_status"); }; }; then
23878   eval "$as_ac_var=yes"
23879 else
23880   echo "$as_me: failed program was:" >&5
23881 cat "conftest.$ac_ext" >&5
23882 eval "$as_ac_var=no"
23883 fi
23884 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23885 fi
23886 echo "$as_me:23886: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23887 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23888 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23889   cat >>confdefs.h <<EOF
23890 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23891 EOF
23892
23893 fi
23894 done
23895  }
23896 echo "$as_me:23896: checking if poll really works" >&5
23897 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23898 if test "${cf_cv_working_poll+set}" = set; then
23899   echo $ECHO_N "(cached) $ECHO_C" >&6
23900 else
23901
23902 if test "$cross_compiling" = yes; then
23903   cf_cv_working_poll=unknown
23904 else
23905   cat >"conftest.$ac_ext" <<_ACEOF
23906 #line 23906 "configure"
23907 #include "confdefs.h"
23908
23909 $ac_includes_default
23910
23911 #include <fcntl.h>
23912
23913 #ifdef HAVE_POLL_H
23914 #include <poll.h>
23915 #else
23916 #include <sys/poll.h>
23917 #endif
23918
23919 int main(void) {
23920         struct pollfd myfds;
23921         int ret;
23922
23923         /* check for Darwin bug with respect to "devices" */
23924         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23925         if (myfds.fd < 0)
23926                 myfds.fd = 0;
23927         myfds.events = POLLIN;
23928         myfds.revents = 0;
23929
23930         ret = poll(&myfds, 1, 100);
23931
23932         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23933                 ret = -1;
23934         } else {
23935                 int fd = 0;
23936                 if (!isatty(fd)) {
23937                         fd = open("/dev/tty", 2);       /* O_RDWR */
23938                 }
23939 #ifdef HAVE_POSIX_OPENPT
23940                 if (fd < 0) {
23941                         fd = posix_openpt(O_RDWR);
23942                 }
23943 #endif
23944
23945                 if (fd >= 0) {
23946                         /* also check with standard input */
23947                         myfds.fd = fd;
23948                         myfds.events = POLLIN;
23949                         myfds.revents = 0;
23950                         ret = poll(&myfds, 1, 100);
23951                 } else {
23952                         ret = -1;
23953                 }
23954         }
23955         ${cf_cv_main_return:-return}(ret < 0);
23956 }
23957 _ACEOF
23958 rm -f "conftest$ac_exeext"
23959 if { (eval echo "$as_me:23959: \"$ac_link\"") >&5
23960   (eval $ac_link) 2>&5
23961   ac_status=$?
23962   echo "$as_me:23962: \$? = $ac_status" >&5
23963   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23964   { (eval echo "$as_me:23964: \"$ac_try\"") >&5
23965   (eval $ac_try) 2>&5
23966   ac_status=$?
23967   echo "$as_me:23967: \$? = $ac_status" >&5
23968   (exit "$ac_status"); }; }; then
23969   cf_cv_working_poll=yes
23970 else
23971   echo "$as_me: program exited with status $ac_status" >&5
23972 echo "$as_me: failed program was:" >&5
23973 cat "conftest.$ac_ext" >&5
23974 cf_cv_working_poll=no
23975 fi
23976 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23977 fi
23978 fi
23979 echo "$as_me:23979: result: $cf_cv_working_poll" >&5
23980 echo "${ECHO_T}$cf_cv_working_poll" >&6
23981 test "$cf_cv_working_poll" = "yes" &&
23982 cat >>confdefs.h <<\EOF
23983 #define HAVE_WORKING_POLL 1
23984 EOF
23985
23986 echo "$as_me:23986: checking if MB_LEN_MAX is usable" >&5
23987 echo $ECHO_N "checking if MB_LEN_MAX is usable... $ECHO_C" >&6
23988 if test "${cf_cv_mb_len_max+set}" = set; then
23989   echo $ECHO_N "(cached) $ECHO_C" >&6
23990 else
23991
23992 cat >"conftest.$ac_ext" <<_ACEOF
23993 #line 23993 "configure"
23994 #include "confdefs.h"
23995
23996 $ac_includes_default
23997 #include <limits.h>
23998 int
23999 main (void)
24000 {
24001
24002 #if defined(MB_LEN_MAX) && MB_LEN_MAX >= 6
24003         ${cf_cv_main_return:-return}(0);
24004 #else
24005 #error MB_LEN_MAX is not usable
24006 #endif
24007
24008   ;
24009   return 0;
24010 }
24011 _ACEOF
24012 rm -f "conftest.$ac_objext"
24013 if { (eval echo "$as_me:24013: \"$ac_compile\"") >&5
24014   (eval $ac_compile) 2>&5
24015   ac_status=$?
24016   echo "$as_me:24016: \$? = $ac_status" >&5
24017   (exit "$ac_status"); } &&
24018          { ac_try='test -s "conftest.$ac_objext"'
24019   { (eval echo "$as_me:24019: \"$ac_try\"") >&5
24020   (eval $ac_try) 2>&5
24021   ac_status=$?
24022   echo "$as_me:24022: \$? = $ac_status" >&5
24023   (exit "$ac_status"); }; }; then
24024   cf_cv_mb_len_max=yes
24025 else
24026   echo "$as_me: failed program was:" >&5
24027 cat "conftest.$ac_ext" >&5
24028 cf_cv_mb_len_max=no
24029 fi
24030 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24031 fi
24032 echo "$as_me:24032: result: $cf_cv_mb_len_max" >&5
24033 echo "${ECHO_T}$cf_cv_mb_len_max" >&6
24034 if test "$cf_cv_mb_len_max" = yes
24035 then
24036
24037 cat >>confdefs.h <<\EOF
24038 #define HAVE_CONSISTENT_MB_LEN_MAX 1
24039 EOF
24040
24041 else
24042         { echo "$as_me:24042: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&5
24043 echo "$as_me: WARNING: MB_LEN_MAX is missing/inconsistent in system headers" >&2;}
24044 fi
24045
24046 echo "$as_me:24046: checking for va_copy" >&5
24047 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
24048 if test "${cf_cv_have_va_copy+set}" = set; then
24049   echo $ECHO_N "(cached) $ECHO_C" >&6
24050 else
24051
24052 cat >"conftest.$ac_ext" <<_ACEOF
24053 #line 24053 "configure"
24054 #include "confdefs.h"
24055
24056 #include <stdarg.h>
24057
24058 int
24059 main (void)
24060 {
24061
24062         static va_list dst;
24063         static va_list src;
24064         va_copy(dst, src)
24065   ;
24066   return 0;
24067 }
24068 _ACEOF
24069 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24070 if { (eval echo "$as_me:24070: \"$ac_link\"") >&5
24071   (eval $ac_link) 2>&5
24072   ac_status=$?
24073   echo "$as_me:24073: \$? = $ac_status" >&5
24074   (exit "$ac_status"); } &&
24075          { ac_try='test -s "conftest$ac_exeext"'
24076   { (eval echo "$as_me:24076: \"$ac_try\"") >&5
24077   (eval $ac_try) 2>&5
24078   ac_status=$?
24079   echo "$as_me:24079: \$? = $ac_status" >&5
24080   (exit "$ac_status"); }; }; then
24081   cf_cv_have_va_copy=yes
24082 else
24083   echo "$as_me: failed program was:" >&5
24084 cat "conftest.$ac_ext" >&5
24085 cf_cv_have_va_copy=no
24086 fi
24087 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24088 fi
24089 echo "$as_me:24089: result: $cf_cv_have_va_copy" >&5
24090 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
24091
24092 if test "$cf_cv_have_va_copy" = yes;
24093 then
24094
24095 cat >>confdefs.h <<\EOF
24096 #define HAVE_VA_COPY 1
24097 EOF
24098
24099 else # !cf_cv_have_va_copy
24100
24101 echo "$as_me:24101: checking for __va_copy" >&5
24102 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
24103 if test "${cf_cv_have___va_copy+set}" = set; then
24104   echo $ECHO_N "(cached) $ECHO_C" >&6
24105 else
24106
24107 cat >"conftest.$ac_ext" <<_ACEOF
24108 #line 24108 "configure"
24109 #include "confdefs.h"
24110
24111 #include <stdarg.h>
24112
24113 int
24114 main (void)
24115 {
24116
24117         static va_list dst;
24118         static va_list src;
24119         __va_copy(dst, src)
24120   ;
24121   return 0;
24122 }
24123 _ACEOF
24124 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24125 if { (eval echo "$as_me:24125: \"$ac_link\"") >&5
24126   (eval $ac_link) 2>&5
24127   ac_status=$?
24128   echo "$as_me:24128: \$? = $ac_status" >&5
24129   (exit "$ac_status"); } &&
24130          { ac_try='test -s "conftest$ac_exeext"'
24131   { (eval echo "$as_me:24131: \"$ac_try\"") >&5
24132   (eval $ac_try) 2>&5
24133   ac_status=$?
24134   echo "$as_me:24134: \$? = $ac_status" >&5
24135   (exit "$ac_status"); }; }; then
24136   cf_cv_have___va_copy=yes
24137 else
24138   echo "$as_me: failed program was:" >&5
24139 cat "conftest.$ac_ext" >&5
24140 cf_cv_have___va_copy=no
24141 fi
24142 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24143 fi
24144 echo "$as_me:24144: result: $cf_cv_have___va_copy" >&5
24145 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
24146
24147 if test "$cf_cv_have___va_copy" = yes
24148 then
24149
24150 cat >>confdefs.h <<\EOF
24151 #define HAVE___VA_COPY 1
24152 EOF
24153
24154 else # !cf_cv_have___va_copy
24155
24156 echo "$as_me:24156: checking for __builtin_va_copy" >&5
24157 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
24158 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
24159   echo $ECHO_N "(cached) $ECHO_C" >&6
24160 else
24161
24162 cat >"conftest.$ac_ext" <<_ACEOF
24163 #line 24163 "configure"
24164 #include "confdefs.h"
24165
24166 #include <stdarg.h>
24167
24168 int
24169 main (void)
24170 {
24171
24172         static va_list dst;
24173         static va_list src;
24174         __builtin_va_copy(dst, src)
24175   ;
24176   return 0;
24177 }
24178 _ACEOF
24179 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24180 if { (eval echo "$as_me:24180: \"$ac_link\"") >&5
24181   (eval $ac_link) 2>&5
24182   ac_status=$?
24183   echo "$as_me:24183: \$? = $ac_status" >&5
24184   (exit "$ac_status"); } &&
24185          { ac_try='test -s "conftest$ac_exeext"'
24186   { (eval echo "$as_me:24186: \"$ac_try\"") >&5
24187   (eval $ac_try) 2>&5
24188   ac_status=$?
24189   echo "$as_me:24189: \$? = $ac_status" >&5
24190   (exit "$ac_status"); }; }; then
24191   cf_cv_have___builtin_va_copy=yes
24192 else
24193   echo "$as_me: failed program was:" >&5
24194 cat "conftest.$ac_ext" >&5
24195 cf_cv_have___builtin_va_copy=no
24196 fi
24197 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24198 fi
24199 echo "$as_me:24199: result: $cf_cv_have___builtin_va_copy" >&5
24200 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
24201
24202 test "$cf_cv_have___builtin_va_copy" = yes &&
24203
24204 cat >>confdefs.h <<\EOF
24205 #define HAVE___BUILTIN_VA_COPY 1
24206 EOF
24207
24208 fi # cf_cv_have___va_copy
24209
24210 fi # cf_cv_have_va_copy
24211
24212 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
24213 (*yes*)
24214         ;;
24215
24216 (*)
24217         echo "$as_me:24217: checking if we can simply copy va_list" >&5
24218 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
24219 if test "${cf_cv_pointer_va_list+set}" = set; then
24220   echo $ECHO_N "(cached) $ECHO_C" >&6
24221 else
24222
24223 cat >"conftest.$ac_ext" <<_ACEOF
24224 #line 24224 "configure"
24225 #include "confdefs.h"
24226
24227 #include <stdarg.h>
24228
24229 int
24230 main (void)
24231 {
24232
24233         va_list dst;
24234         va_list src;
24235         dst = src
24236   ;
24237   return 0;
24238 }
24239 _ACEOF
24240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24241 if { (eval echo "$as_me:24241: \"$ac_link\"") >&5
24242   (eval $ac_link) 2>&5
24243   ac_status=$?
24244   echo "$as_me:24244: \$? = $ac_status" >&5
24245   (exit "$ac_status"); } &&
24246          { ac_try='test -s "conftest$ac_exeext"'
24247   { (eval echo "$as_me:24247: \"$ac_try\"") >&5
24248   (eval $ac_try) 2>&5
24249   ac_status=$?
24250   echo "$as_me:24250: \$? = $ac_status" >&5
24251   (exit "$ac_status"); }; }; then
24252   cf_cv_pointer_va_list=yes
24253 else
24254   echo "$as_me: failed program was:" >&5
24255 cat "conftest.$ac_ext" >&5
24256 cf_cv_pointer_va_list=no
24257 fi
24258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24259 fi
24260 echo "$as_me:24260: result: $cf_cv_pointer_va_list" >&5
24261 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
24262
24263         if test "$cf_cv_pointer_va_list" = no
24264         then
24265                 echo "$as_me:24265: checking if we can copy va_list indirectly" >&5
24266 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
24267 if test "${cf_cv_array_va_list+set}" = set; then
24268   echo $ECHO_N "(cached) $ECHO_C" >&6
24269 else
24270
24271 cat >"conftest.$ac_ext" <<_ACEOF
24272 #line 24272 "configure"
24273 #include "confdefs.h"
24274
24275 #include <stdarg.h>
24276
24277 int
24278 main (void)
24279 {
24280
24281         va_list dst;
24282         va_list src;
24283         *dst = *src
24284   ;
24285   return 0;
24286 }
24287 _ACEOF
24288 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24289 if { (eval echo "$as_me:24289: \"$ac_link\"") >&5
24290   (eval $ac_link) 2>&5
24291   ac_status=$?
24292   echo "$as_me:24292: \$? = $ac_status" >&5
24293   (exit "$ac_status"); } &&
24294          { ac_try='test -s "conftest$ac_exeext"'
24295   { (eval echo "$as_me:24295: \"$ac_try\"") >&5
24296   (eval $ac_try) 2>&5
24297   ac_status=$?
24298   echo "$as_me:24298: \$? = $ac_status" >&5
24299   (exit "$ac_status"); }; }; then
24300   cf_cv_array_va_list=yes
24301 else
24302   echo "$as_me: failed program was:" >&5
24303 cat "conftest.$ac_ext" >&5
24304 cf_cv_array_va_list=no
24305 fi
24306 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24307 fi
24308 echo "$as_me:24308: result: $cf_cv_array_va_list" >&5
24309 echo "${ECHO_T}$cf_cv_array_va_list" >&6
24310                 test "$cf_cv_array_va_list" = yes &&
24311 cat >>confdefs.h <<\EOF
24312 #define ARRAY_VA_LIST 1
24313 EOF
24314
24315         fi
24316         ;;
24317 esac
24318
24319 echo "$as_me:24319: checking for pid_t" >&5
24320 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
24321 if test "${ac_cv_type_pid_t+set}" = set; then
24322   echo $ECHO_N "(cached) $ECHO_C" >&6
24323 else
24324   cat >"conftest.$ac_ext" <<_ACEOF
24325 #line 24325 "configure"
24326 #include "confdefs.h"
24327 $ac_includes_default
24328 int
24329 main (void)
24330 {
24331 if ((pid_t *) 0)
24332   return 0;
24333 if (sizeof (pid_t))
24334   return 0;
24335   ;
24336   return 0;
24337 }
24338 _ACEOF
24339 rm -f "conftest.$ac_objext"
24340 if { (eval echo "$as_me:24340: \"$ac_compile\"") >&5
24341   (eval $ac_compile) 2>&5
24342   ac_status=$?
24343   echo "$as_me:24343: \$? = $ac_status" >&5
24344   (exit "$ac_status"); } &&
24345          { ac_try='test -s "conftest.$ac_objext"'
24346   { (eval echo "$as_me:24346: \"$ac_try\"") >&5
24347   (eval $ac_try) 2>&5
24348   ac_status=$?
24349   echo "$as_me:24349: \$? = $ac_status" >&5
24350   (exit "$ac_status"); }; }; then
24351   ac_cv_type_pid_t=yes
24352 else
24353   echo "$as_me: failed program was:" >&5
24354 cat "conftest.$ac_ext" >&5
24355 ac_cv_type_pid_t=no
24356 fi
24357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24358 fi
24359 echo "$as_me:24359: result: $ac_cv_type_pid_t" >&5
24360 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
24361 if test "$ac_cv_type_pid_t" = yes; then
24362   :
24363 else
24364
24365 cat >>confdefs.h <<EOF
24366 #define pid_t int
24367 EOF
24368
24369 fi
24370
24371 for ac_header in unistd.h vfork.h
24372 do
24373 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24374 echo "$as_me:24374: checking for $ac_header" >&5
24375 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24376 if eval "test \"\${$as_ac_Header+set}\" = set"; then
24377   echo $ECHO_N "(cached) $ECHO_C" >&6
24378 else
24379   cat >"conftest.$ac_ext" <<_ACEOF
24380 #line 24380 "configure"
24381 #include "confdefs.h"
24382 #include <$ac_header>
24383 _ACEOF
24384 if { (eval echo "$as_me:24384: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24385   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24386   ac_status=$?
24387   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24388   rm -f conftest.er1
24389   cat conftest.err >&5
24390   echo "$as_me:24390: \$? = $ac_status" >&5
24391   (exit "$ac_status"); } >/dev/null; then
24392   if test -s conftest.err; then
24393     ac_cpp_err=$ac_c_preproc_warn_flag
24394   else
24395     ac_cpp_err=
24396   fi
24397 else
24398   ac_cpp_err=yes
24399 fi
24400 if test -z "$ac_cpp_err"; then
24401   eval "$as_ac_Header=yes"
24402 else
24403   echo "$as_me: failed program was:" >&5
24404   cat "conftest.$ac_ext" >&5
24405   eval "$as_ac_Header=no"
24406 fi
24407 rm -f conftest.err "conftest.$ac_ext"
24408 fi
24409 echo "$as_me:24409: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24410 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24411 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24412   cat >>confdefs.h <<EOF
24413 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24414 EOF
24415
24416 fi
24417 done
24418
24419 for ac_func in fork vfork
24420 do
24421 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24422 echo "$as_me:24422: checking for $ac_func" >&5
24423 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24424 if eval "test \"\${$as_ac_var+set}\" = set"; then
24425   echo $ECHO_N "(cached) $ECHO_C" >&6
24426 else
24427   cat >"conftest.$ac_ext" <<_ACEOF
24428 #line 24428 "configure"
24429 #include "confdefs.h"
24430 #define $ac_func autoconf_temporary
24431 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
24432 #undef $ac_func
24433
24434 #ifdef __cplusplus
24435 extern "C"
24436 #endif
24437
24438 /* We use char because int might match the return type of a gcc2
24439    builtin and then its argument prototype would still apply.  */
24440 char $ac_func (void);
24441
24442 int
24443 main (void)
24444 {
24445
24446 /* The GNU C library defines stubs for functions which it implements
24447     to always fail with ENOSYS.  Some functions are actually named
24448     something starting with __ and the normal name is an alias.  */
24449 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24450 #error found stub for $ac_func
24451 #endif
24452
24453         return $ac_func ();
24454   ;
24455   return 0;
24456 }
24457 _ACEOF
24458 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24459 if { (eval echo "$as_me:24459: \"$ac_link\"") >&5
24460   (eval $ac_link) 2>&5
24461   ac_status=$?
24462   echo "$as_me:24462: \$? = $ac_status" >&5
24463   (exit "$ac_status"); } &&
24464          { ac_try='test -s "conftest$ac_exeext"'
24465   { (eval echo "$as_me:24465: \"$ac_try\"") >&5
24466   (eval $ac_try) 2>&5
24467   ac_status=$?
24468   echo "$as_me:24468: \$? = $ac_status" >&5
24469   (exit "$ac_status"); }; }; then
24470   eval "$as_ac_var=yes"
24471 else
24472   echo "$as_me: failed program was:" >&5
24473 cat "conftest.$ac_ext" >&5
24474 eval "$as_ac_var=no"
24475 fi
24476 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24477 fi
24478 echo "$as_me:24478: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24479 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24480 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24481   cat >>confdefs.h <<EOF
24482 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24483 EOF
24484
24485 fi
24486 done
24487
24488 ac_cv_func_fork_works=$ac_cv_func_fork
24489 if test "x$ac_cv_func_fork" = xyes; then
24490   echo "$as_me:24490: checking for working fork" >&5
24491 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24492 if test "${ac_cv_func_fork_works+set}" = set; then
24493   echo $ECHO_N "(cached) $ECHO_C" >&6
24494 else
24495   if test "$cross_compiling" = yes; then
24496   ac_cv_func_fork_works=cross
24497 else
24498   cat >"conftest.$ac_ext" <<_ACEOF
24499 /* By Rüdiger Kuhlmann. */
24500       #include <sys/types.h>
24501       #if HAVE_UNISTD_H
24502       # include <unistd.h>
24503       #endif
24504       /* Some systems only have a dummy stub for fork() */
24505       int main (void)
24506       {
24507         if (fork() < 0)
24508           $ac_main_return (1);
24509         $ac_main_return (0);
24510       }
24511 _ACEOF
24512 rm -f "conftest$ac_exeext"
24513 if { (eval echo "$as_me:24513: \"$ac_link\"") >&5
24514   (eval $ac_link) 2>&5
24515   ac_status=$?
24516   echo "$as_me:24516: \$? = $ac_status" >&5
24517   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24518   { (eval echo "$as_me:24518: \"$ac_try\"") >&5
24519   (eval $ac_try) 2>&5
24520   ac_status=$?
24521   echo "$as_me:24521: \$? = $ac_status" >&5
24522   (exit "$ac_status"); }; }; then
24523   ac_cv_func_fork_works=yes
24524 else
24525   echo "$as_me: program exited with status $ac_status" >&5
24526 echo "$as_me: failed program was:" >&5
24527 cat "conftest.$ac_ext" >&5
24528 ac_cv_func_fork_works=no
24529 fi
24530 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24531 fi
24532 fi
24533 echo "$as_me:24533: result: $ac_cv_func_fork_works" >&5
24534 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24535
24536 fi
24537 if test "x$ac_cv_func_fork_works" = xcross; then
24538   case $host in
24539     *-*-amigaos* | *-*-msdosdjgpp*)
24540       # Override, as these systems have only a dummy fork() stub
24541       ac_cv_func_fork_works=no
24542       ;;
24543     *)
24544       ac_cv_func_fork_works=yes
24545       ;;
24546   esac
24547   { echo "$as_me:24547: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24548 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24549 fi
24550 ac_cv_func_vfork_works=$ac_cv_func_vfork
24551 if test "x$ac_cv_func_vfork" = xyes; then
24552   echo "$as_me:24552: checking for working vfork" >&5
24553 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24554 if test "${ac_cv_func_vfork_works+set}" = set; then
24555   echo $ECHO_N "(cached) $ECHO_C" >&6
24556 else
24557   if test "$cross_compiling" = yes; then
24558   ac_cv_func_vfork_works=cross
24559 else
24560   cat >"conftest.$ac_ext" <<_ACEOF
24561 #line 24561 "configure"
24562 #include "confdefs.h"
24563 /* Thanks to Paul Eggert for this test.  */
24564 #include <stdio.h>
24565 #include <sys/types.h>
24566 #include <sys/stat.h>
24567 #if HAVE_UNISTD_H
24568 # include <unistd.h>
24569 #endif
24570 #if HAVE_VFORK_H
24571 # include <vfork.h>
24572 #endif
24573 /* On some sparc systems, changes by the child to local and incoming
24574    argument registers are propagated back to the parent.  The compiler
24575    is told about this with #include <vfork.h>, but some compilers
24576    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24577    static variable whose address is put into a register that is
24578    clobbered by the vfork.  */
24579 static
24580 sparc_address_test (int arg)
24581 {
24582   static pid_t child;
24583   if (!child) {
24584     child = vfork ();
24585     if (child < 0) {
24586       perror ("vfork");
24587       _exit(2);
24588     }
24589     if (!child) {
24590       arg = getpid();
24591       write(-1, "", 0);
24592       _exit (arg);
24593     }
24594   }
24595 }
24596
24597 int
24598 main (void)
24599 {
24600   pid_t parent = getpid ();
24601   pid_t child;
24602
24603   sparc_address_test ();
24604
24605   child = vfork ();
24606
24607   if (child == 0) {
24608     /* Here is another test for sparc vfork register problems.  This
24609        test uses lots of local variables, at least as many local
24610        variables as main has allocated so far including compiler
24611        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24612        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24613        reuse the register of parent for one of the local variables,
24614        since it will think that parent can't possibly be used any more
24615        in this routine.  Assigning to the local variable will thus
24616        munge parent in the parent process.  */
24617     pid_t
24618       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24619       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24620     /* Convince the compiler that p..p7 are live; otherwise, it might
24621        use the same hardware register for all 8 local variables.  */
24622     if (p != p1 || p != p2 || p != p3 || p != p4
24623         || p != p5 || p != p6 || p != p7)
24624       _exit(1);
24625
24626     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24627        from child file descriptors.  If the child closes a descriptor
24628        before it execs or exits, this munges the parent's descriptor
24629        as well.  Test for this by closing stdout in the child.  */
24630     _exit(close(fileno(stdout)) != 0);
24631   } else {
24632     int status;
24633     struct stat st;
24634
24635     while (wait(&status) != child)
24636       ;
24637     $ac_main_return(
24638          /* Was there some problem with vforking?  */
24639          child < 0
24640
24641          /* Did the child fail?  (This shouldn't happen.)  */
24642          || status
24643
24644          /* Did the vfork/compiler bug occur?  */
24645          || parent != getpid()
24646
24647          /* Did the file descriptor bug occur?  */
24648          || fstat(fileno(stdout), &st) != 0
24649          );
24650   }
24651 }
24652 _ACEOF
24653 rm -f "conftest$ac_exeext"
24654 if { (eval echo "$as_me:24654: \"$ac_link\"") >&5
24655   (eval $ac_link) 2>&5
24656   ac_status=$?
24657   echo "$as_me:24657: \$? = $ac_status" >&5
24658   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24659   { (eval echo "$as_me:24659: \"$ac_try\"") >&5
24660   (eval $ac_try) 2>&5
24661   ac_status=$?
24662   echo "$as_me:24662: \$? = $ac_status" >&5
24663   (exit "$ac_status"); }; }; then
24664   ac_cv_func_vfork_works=yes
24665 else
24666   echo "$as_me: program exited with status $ac_status" >&5
24667 echo "$as_me: failed program was:" >&5
24668 cat "conftest.$ac_ext" >&5
24669 ac_cv_func_vfork_works=no
24670 fi
24671 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24672 fi
24673 fi
24674 echo "$as_me:24674: result: $ac_cv_func_vfork_works" >&5
24675 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24676
24677 fi;
24678 if test "x$ac_cv_func_fork_works" = xcross; then
24679   ac_cv_func_vfork_works=ac_cv_func_vfork
24680   { echo "$as_me:24680: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24681 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24682 fi
24683
24684 if test "x$ac_cv_func_vfork_works" = xyes; then
24685
24686 cat >>confdefs.h <<\EOF
24687 #define HAVE_WORKING_VFORK 1
24688 EOF
24689
24690 else
24691
24692 cat >>confdefs.h <<\EOF
24693 #define vfork fork
24694 EOF
24695
24696 fi
24697 if test "x$ac_cv_func_fork_works" = xyes; then
24698
24699 cat >>confdefs.h <<\EOF
24700 #define HAVE_WORKING_FORK 1
24701 EOF
24702
24703 fi
24704
24705 echo "$as_me:24705: checking if fopen accepts explicit binary mode" >&5
24706 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24707 if test "${cf_cv_fopen_bin_r+set}" = set; then
24708   echo $ECHO_N "(cached) $ECHO_C" >&6
24709 else
24710
24711         if test "$cross_compiling" = yes; then
24712   cf_cv_fopen_bin_r=unknown
24713 else
24714   cat >"conftest.$ac_ext" <<_ACEOF
24715 #line 24715 "configure"
24716 #include "confdefs.h"
24717
24718 $ac_includes_default
24719
24720 int main(void)
24721 {
24722         FILE *fp = fopen("conftest.tmp", "wb");
24723         int rc = 0;
24724         if (fp != 0) {
24725                 int p, q;
24726                 for (p = 0; p < 256; ++p) {
24727                         fputc(p, fp);
24728                 }
24729                 fclose(fp);
24730                 fp = fopen("conftest.tmp", "rb");
24731                 if (fp != 0) {
24732                         for (p = 0; p < 256; ++p) {
24733                                 q = fgetc(fp);
24734                                 if (q != p) {
24735                                         rc = 1;
24736                                         break;
24737                                 }
24738                         }
24739                 } else {
24740                         rc = 1;
24741                 }
24742         } else {
24743                 rc = 1;
24744         }
24745         ${cf_cv_main_return:-return} (rc);
24746 }
24747
24748 _ACEOF
24749 rm -f "conftest$ac_exeext"
24750 if { (eval echo "$as_me:24750: \"$ac_link\"") >&5
24751   (eval $ac_link) 2>&5
24752   ac_status=$?
24753   echo "$as_me:24753: \$? = $ac_status" >&5
24754   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24755   { (eval echo "$as_me:24755: \"$ac_try\"") >&5
24756   (eval $ac_try) 2>&5
24757   ac_status=$?
24758   echo "$as_me:24758: \$? = $ac_status" >&5
24759   (exit "$ac_status"); }; }; then
24760   cf_cv_fopen_bin_r=yes
24761 else
24762   echo "$as_me: program exited with status $ac_status" >&5
24763 echo "$as_me: failed program was:" >&5
24764 cat "conftest.$ac_ext" >&5
24765 cf_cv_fopen_bin_r=no
24766 fi
24767 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24768 fi
24769
24770 fi
24771 echo "$as_me:24771: result: $cf_cv_fopen_bin_r" >&5
24772 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24773 test "x$cf_cv_fopen_bin_r" != xno &&
24774 cat >>confdefs.h <<\EOF
24775 #define USE_FOPEN_BIN_R 1
24776 EOF
24777
24778 # special check for test/ditto.c
24779
24780 echo "$as_me:24780: checking for openpty in -lutil" >&5
24781 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24782 if test "${ac_cv_lib_util_openpty+set}" = set; then
24783   echo $ECHO_N "(cached) $ECHO_C" >&6
24784 else
24785   ac_check_lib_save_LIBS=$LIBS
24786 LIBS="-lutil  $LIBS"
24787 cat >"conftest.$ac_ext" <<_ACEOF
24788 #line 24788 "configure"
24789 #include "confdefs.h"
24790
24791 /* Override any gcc2 internal prototype to avoid an error.  */
24792 #ifdef __cplusplus
24793 extern "C"
24794 #endif
24795 /* We use char because int might match the return type of a gcc2
24796    builtin and then its argument prototype would still apply.  */
24797 char openpty (void);
24798 int
24799 main (void)
24800 {
24801 openpty ();
24802   ;
24803   return 0;
24804 }
24805 _ACEOF
24806 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24807 if { (eval echo "$as_me:24807: \"$ac_link\"") >&5
24808   (eval $ac_link) 2>&5
24809   ac_status=$?
24810   echo "$as_me:24810: \$? = $ac_status" >&5
24811   (exit "$ac_status"); } &&
24812          { ac_try='test -s "conftest$ac_exeext"'
24813   { (eval echo "$as_me:24813: \"$ac_try\"") >&5
24814   (eval $ac_try) 2>&5
24815   ac_status=$?
24816   echo "$as_me:24816: \$? = $ac_status" >&5
24817   (exit "$ac_status"); }; }; then
24818   ac_cv_lib_util_openpty=yes
24819 else
24820   echo "$as_me: failed program was:" >&5
24821 cat "conftest.$ac_ext" >&5
24822 ac_cv_lib_util_openpty=no
24823 fi
24824 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24825 LIBS=$ac_check_lib_save_LIBS
24826 fi
24827 echo "$as_me:24827: result: $ac_cv_lib_util_openpty" >&5
24828 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24829 if test "$ac_cv_lib_util_openpty" = yes; then
24830   cf_cv_lib_util=yes
24831 else
24832   cf_cv_lib_util=no
24833 fi
24834
24835 echo "$as_me:24835: checking for openpty header" >&5
24836 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24837 if test "${cf_cv_func_openpty+set}" = set; then
24838   echo $ECHO_N "(cached) $ECHO_C" >&6
24839 else
24840
24841         cf_save_LIBS="$LIBS"
24842         test "$cf_cv_lib_util" = yes && {
24843 cf_add_libs="$LIBS"
24844 # reverse order
24845 cf_add_0lib=
24846 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24847 # filter duplicates
24848 for cf_add_1lib in $cf_add_0lib; do
24849         for cf_add_2lib in $cf_add_libs; do
24850                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24851                         cf_add_1lib=
24852                         break
24853                 fi
24854         done
24855         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24856 done
24857 LIBS="$cf_add_libs"
24858  }
24859         for cf_header in pty.h libutil.h util.h
24860         do
24861         cat >"conftest.$ac_ext" <<_ACEOF
24862 #line 24862 "configure"
24863 #include "confdefs.h"
24864
24865 #include <$cf_header>
24866
24867 int
24868 main (void)
24869 {
24870
24871         int x = openpty((int *)0, (int *)0, (char *)0,
24872                                    (struct termios *)0, (struct winsize *)0);
24873         (void)x;
24874
24875   ;
24876   return 0;
24877 }
24878 _ACEOF
24879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24880 if { (eval echo "$as_me:24880: \"$ac_link\"") >&5
24881   (eval $ac_link) 2>&5
24882   ac_status=$?
24883   echo "$as_me:24883: \$? = $ac_status" >&5
24884   (exit "$ac_status"); } &&
24885          { ac_try='test -s "conftest$ac_exeext"'
24886   { (eval echo "$as_me:24886: \"$ac_try\"") >&5
24887   (eval $ac_try) 2>&5
24888   ac_status=$?
24889   echo "$as_me:24889: \$? = $ac_status" >&5
24890   (exit "$ac_status"); }; }; then
24891
24892                 cf_cv_func_openpty=$cf_header
24893                 break
24894
24895 else
24896   echo "$as_me: failed program was:" >&5
24897 cat "conftest.$ac_ext" >&5
24898
24899                 cf_cv_func_openpty=no
24900
24901 fi
24902 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24903         done
24904         LIBS="$cf_save_LIBS"
24905
24906 fi
24907 echo "$as_me:24907: result: $cf_cv_func_openpty" >&5
24908 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24909
24910 if test "$cf_cv_func_openpty" != no ; then
24911
24912 cat >>confdefs.h <<EOF
24913 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24914 EOF
24915
24916 cat >>confdefs.h <<\EOF
24917 #define USE_XTERM_PTY 1
24918 EOF
24919
24920         if test "x$cf_cv_lib_util" = xyes ; then
24921
24922 cf_add_libs="$TEST_LIBS"
24923 # reverse order
24924 cf_add_0lib=
24925 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24926 # filter duplicates
24927 for cf_add_1lib in $cf_add_0lib; do
24928         for cf_add_2lib in $cf_add_libs; do
24929                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24930                         cf_add_1lib=
24931                         break
24932                 fi
24933         done
24934         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24935 done
24936 TEST_LIBS="$cf_add_libs"
24937
24938         fi
24939 fi
24940
24941 if test "$with_hashed_db" != no ; then
24942
24943 cat >>confdefs.h <<\EOF
24944 #define USE_HASHED_DB 1
24945 EOF
24946
24947 case $with_hashed_db in
24948 (yes|*able*)
24949         ;;
24950 (*)
24951         if test -d "$with_hashed_db" ; then
24952
24953 if test -n "$with_hashed_db/include" ; then
24954   for cf_add_incdir in $with_hashed_db/include
24955   do
24956         while test "$cf_add_incdir" != /usr/include
24957         do
24958           if test -d "$cf_add_incdir"
24959           then
24960                 cf_have_incdir=no
24961                 if test -n "$CFLAGS$CPPFLAGS" ; then
24962                   # a loop is needed to ensure we can add subdirs of existing dirs
24963                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24964                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24965                           cf_have_incdir=yes; break
24966                         fi
24967                   done
24968                 fi
24969
24970                 if test "$cf_have_incdir" = no ; then
24971                   if test "$cf_add_incdir" = /usr/local/include ; then
24972                         if test "$GCC" = yes
24973                         then
24974                           cf_save_CPPFLAGS=$CPPFLAGS
24975
24976         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24977         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24978
24979                           cat >"conftest.$ac_ext" <<_ACEOF
24980 #line 24980 "configure"
24981 #include "confdefs.h"
24982 #include <stdio.h>
24983 int
24984 main (void)
24985 {
24986 printf("Hello")
24987   ;
24988   return 0;
24989 }
24990 _ACEOF
24991 rm -f "conftest.$ac_objext"
24992 if { (eval echo "$as_me:24992: \"$ac_compile\"") >&5
24993   (eval $ac_compile) 2>&5
24994   ac_status=$?
24995   echo "$as_me:24995: \$? = $ac_status" >&5
24996   (exit "$ac_status"); } &&
24997          { ac_try='test -s "conftest.$ac_objext"'
24998   { (eval echo "$as_me:24998: \"$ac_try\"") >&5
24999   (eval $ac_try) 2>&5
25000   ac_status=$?
25001   echo "$as_me:25001: \$? = $ac_status" >&5
25002   (exit "$ac_status"); }; }; then
25003   :
25004 else
25005   echo "$as_me: failed program was:" >&5
25006 cat "conftest.$ac_ext" >&5
25007 cf_have_incdir=yes
25008 fi
25009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25010                           CPPFLAGS=$cf_save_CPPFLAGS
25011                         fi
25012                   fi
25013                 fi
25014
25015                 if test "$cf_have_incdir" = no ; then
25016                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
25017
25018 echo "${as_me:-configure}:25018: testing adding $cf_add_incdir to include-path ..." 1>&5
25019
25020                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25021
25022                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25023                   test "$cf_top_incdir" = "$cf_add_incdir" && break
25024                   cf_add_incdir="$cf_top_incdir"
25025                 else
25026                   break
25027                 fi
25028           else
25029                 break
25030           fi
25031         done
25032   done
25033 fi
25034
25035 if test -n "$with_hashed_db/lib" ; then
25036         for cf_add_libdir in $with_hashed_db/lib
25037         do
25038                 if test "$cf_add_libdir" = /usr/lib ; then
25039                         :
25040                 elif test -d "$cf_add_libdir"
25041                 then
25042                         cf_have_libdir=no
25043                         if test -n "$LDFLAGS$LIBS" ; then
25044                                 # a loop is needed to ensure we can add subdirs of existing dirs
25045                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
25046                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
25047                                                 cf_have_libdir=yes; break
25048                                         fi
25049                                 done
25050                         fi
25051                         if test "$cf_have_libdir" = no ; then
25052                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
25053
25054 echo "${as_me:-configure}:25054: testing adding $cf_add_libdir to library-path ..." 1>&5
25055
25056                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
25057                         fi
25058                 fi
25059         done
25060 fi
25061
25062         else
25063                 case "$with_hashed_db" in
25064                 (./*|../*|/*)
25065                         { echo "$as_me:25065: WARNING: no such directory $with_hashed_db" >&5
25066 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
25067                         ;;
25068                 (*)
25069
25070 cf_search=
25071
25072 test "x$prefix" != "xNONE" && \
25073 test -d "$prefix" && \
25074  {
25075         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
25076         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
25077         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
25078         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
25079         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
25080         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
25081 }
25082
25083 for cf_subdir_prefix in \
25084         /usr \
25085         /usr/local \
25086         /usr/pkg \
25087         /opt \
25088         /opt/local \
25089         $HOME
25090 do
25091
25092 test "x$cf_subdir_prefix" != "x$prefix" && \
25093 test -d "$cf_subdir_prefix" && \
25094 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25095         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
25096         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
25097         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
25098         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
25099         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
25100         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"
25101 }
25102
25103 done
25104
25105         for cf_item in $cf_search
25106         do
25107                 case "$cf_item" in
25108                 (*/$with_hashed_db)
25109
25110 if test -n "$cf_item" ; then
25111   for cf_add_incdir in $cf_item
25112   do
25113         while test "$cf_add_incdir" != /usr/include
25114         do
25115           if test -d "$cf_add_incdir"
25116           then
25117                 cf_have_incdir=no
25118                 if test -n "$CFLAGS$CPPFLAGS" ; then
25119                   # a loop is needed to ensure we can add subdirs of existing dirs
25120                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
25121                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
25122                           cf_have_incdir=yes; break
25123                         fi
25124                   done
25125                 fi
25126
25127                 if test "$cf_have_incdir" = no ; then
25128                   if test "$cf_add_incdir" = /usr/local/include ; then
25129                         if test "$GCC" = yes
25130                         then
25131                           cf_save_CPPFLAGS=$CPPFLAGS
25132
25133         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25134         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
25135
25136                           cat >"conftest.$ac_ext" <<_ACEOF
25137 #line 25137 "configure"
25138 #include "confdefs.h"
25139 #include <stdio.h>
25140 int
25141 main (void)
25142 {
25143 printf("Hello")
25144   ;
25145   return 0;
25146 }
25147 _ACEOF
25148 rm -f "conftest.$ac_objext"
25149 if { (eval echo "$as_me:25149: \"$ac_compile\"") >&5
25150   (eval $ac_compile) 2>&5
25151   ac_status=$?
25152   echo "$as_me:25152: \$? = $ac_status" >&5
25153   (exit "$ac_status"); } &&
25154          { ac_try='test -s "conftest.$ac_objext"'
25155   { (eval echo "$as_me:25155: \"$ac_try\"") >&5
25156   (eval $ac_try) 2>&5
25157   ac_status=$?
25158   echo "$as_me:25158: \$? = $ac_status" >&5
25159   (exit "$ac_status"); }; }; then
25160   :
25161 else
25162   echo "$as_me: failed program was:" >&5
25163 cat "conftest.$ac_ext" >&5
25164 cf_have_incdir=yes
25165 fi
25166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25167                           CPPFLAGS=$cf_save_CPPFLAGS
25168                         fi
25169                   fi
25170                 fi
25171
25172                 if test "$cf_have_incdir" = no ; then
25173                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
25174
25175 echo "${as_me:-configure}:25175: testing adding $cf_add_incdir to include-path ..." 1>&5
25176
25177                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
25178
25179                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
25180                   test "$cf_top_incdir" = "$cf_add_incdir" && break
25181                   cf_add_incdir="$cf_top_incdir"
25182                 else
25183                   break
25184                 fi
25185           else
25186                 break
25187           fi
25188         done
25189   done
25190 fi
25191
25192                         ;;
25193                 esac
25194         done
25195
25196 cf_search=
25197
25198 test "x$prefix" != "xNONE" && \
25199 test -d "$prefix" && \
25200  {
25201         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
25202         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
25203         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
25204         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
25205         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
25206         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
25207 }
25208
25209 for cf_subdir_prefix in \
25210         /usr \
25211         /usr/local \
25212         /usr/pkg \
25213         /opt \
25214         /opt/local \
25215         $HOME
25216 do
25217
25218 test "x$cf_subdir_prefix" != "x$prefix" && \
25219 test -d "$cf_subdir_prefix" && \
25220 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25221         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
25222         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
25223         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
25224         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
25225         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
25226         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"
25227 }
25228
25229 done
25230
25231         for cf_item in $cf_search
25232         do
25233                 case "$cf_item" in
25234                 (*/$with_hashed_db)
25235
25236 if test -n "$cf_item" ; then
25237         for cf_add_libdir in $cf_item
25238         do
25239                 if test "$cf_add_libdir" = /usr/lib ; then
25240                         :
25241                 elif test -d "$cf_add_libdir"
25242                 then
25243                         cf_have_libdir=no
25244                         if test -n "$LDFLAGS$LIBS" ; then
25245                                 # a loop is needed to ensure we can add subdirs of existing dirs
25246                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
25247                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
25248                                                 cf_have_libdir=yes; break
25249                                         fi
25250                                 done
25251                         fi
25252                         if test "$cf_have_libdir" = no ; then
25253                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
25254
25255 echo "${as_me:-configure}:25255: testing adding $cf_add_libdir to library-path ..." 1>&5
25256
25257                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
25258                         fi
25259                 fi
25260         done
25261 fi
25262
25263                         ;;
25264                 esac
25265         done
25266
25267                         ;;
25268                 esac
25269         fi
25270 esac
25271
25272 echo "$as_me:25272: checking for db.h" >&5
25273 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
25274 if test "${ac_cv_header_db_h+set}" = set; then
25275   echo $ECHO_N "(cached) $ECHO_C" >&6
25276 else
25277   cat >"conftest.$ac_ext" <<_ACEOF
25278 #line 25278 "configure"
25279 #include "confdefs.h"
25280 #include <db.h>
25281 _ACEOF
25282 if { (eval echo "$as_me:25282: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25283   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25284   ac_status=$?
25285   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25286   rm -f conftest.er1
25287   cat conftest.err >&5
25288   echo "$as_me:25288: \$? = $ac_status" >&5
25289   (exit "$ac_status"); } >/dev/null; then
25290   if test -s conftest.err; then
25291     ac_cpp_err=$ac_c_preproc_warn_flag
25292   else
25293     ac_cpp_err=
25294   fi
25295 else
25296   ac_cpp_err=yes
25297 fi
25298 if test -z "$ac_cpp_err"; then
25299   ac_cv_header_db_h=yes
25300 else
25301   echo "$as_me: failed program was:" >&5
25302   cat "conftest.$ac_ext" >&5
25303   ac_cv_header_db_h=no
25304 fi
25305 rm -f conftest.err "conftest.$ac_ext"
25306 fi
25307 echo "$as_me:25307: result: $ac_cv_header_db_h" >&5
25308 echo "${ECHO_T}$ac_cv_header_db_h" >&6
25309 if test "$ac_cv_header_db_h" = yes; then
25310
25311 echo "$as_me:25311: checking for version of db" >&5
25312 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
25313 if test "${cf_cv_hashed_db_version+set}" = set; then
25314   echo $ECHO_N "(cached) $ECHO_C" >&6
25315 else
25316
25317 cf_cv_hashed_db_version=unknown
25318
25319 for cf_db_version in 1 2 3 4 5 6
25320 do
25321
25322 echo "${as_me:-configure}:25322: testing checking for db version $cf_db_version ..." 1>&5
25323
25324         cat >"conftest.$ac_ext" <<_ACEOF
25325 #line 25325 "configure"
25326 #include "confdefs.h"
25327
25328 $ac_includes_default
25329 #include <db.h>
25330
25331 #ifdef DB_VERSION_MAJOR
25332         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
25333 #if $cf_db_version == DB_VERSION_MAJOR
25334         /* ok */
25335 #else
25336         #error $cf_db_version is not DB_VERSION_MAJOR
25337 #endif
25338 #else
25339 #if $cf_db_version == 1
25340         /* ok: assuming this is DB 1.8.5 */
25341 #else
25342         #error $cf_db_version is not 1
25343 #endif
25344 #endif
25345
25346 int
25347 main (void)
25348 {
25349 DBT *foo = 0
25350   ;
25351   return 0;
25352 }
25353 _ACEOF
25354 rm -f "conftest.$ac_objext"
25355 if { (eval echo "$as_me:25355: \"$ac_compile\"") >&5
25356   (eval $ac_compile) 2>&5
25357   ac_status=$?
25358   echo "$as_me:25358: \$? = $ac_status" >&5
25359   (exit "$ac_status"); } &&
25360          { ac_try='test -s "conftest.$ac_objext"'
25361   { (eval echo "$as_me:25361: \"$ac_try\"") >&5
25362   (eval $ac_try) 2>&5
25363   ac_status=$?
25364   echo "$as_me:25364: \$? = $ac_status" >&5
25365   (exit "$ac_status"); }; }; then
25366
25367         cf_cv_hashed_db_version=$cf_db_version
25368         break
25369
25370 else
25371   echo "$as_me: failed program was:" >&5
25372 cat "conftest.$ac_ext" >&5
25373 fi
25374 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25375 done
25376
25377 fi
25378 echo "$as_me:25378: result: $cf_cv_hashed_db_version" >&5
25379 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
25380
25381 if test "$cf_cv_hashed_db_version" = unknown ; then
25382         { { echo "$as_me:25382: error: Cannot determine version of db" >&5
25383 echo "$as_me: error: Cannot determine version of db" >&2;}
25384    { (exit 1); exit 1; }; }
25385 else
25386
25387 echo "$as_me:25387: checking for db libraries" >&5
25388 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
25389 if test "${cf_cv_hashed_db_libs+set}" = set; then
25390   echo $ECHO_N "(cached) $ECHO_C" >&6
25391 else
25392
25393 cf_cv_hashed_db_libs=unknown
25394 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
25395 do
25396         cf_save_libs="$LIBS"
25397         if test -n "$cf_db_libs"; then
25398
25399 cf_add_libs="$LIBS"
25400 # reverse order
25401 cf_add_0lib=
25402 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25403 # filter duplicates
25404 for cf_add_1lib in $cf_add_0lib; do
25405         for cf_add_2lib in $cf_add_libs; do
25406                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25407                         cf_add_1lib=
25408                         break
25409                 fi
25410         done
25411         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25412 done
25413 LIBS="$cf_add_libs"
25414
25415         fi
25416
25417 echo "${as_me:-configure}:25417: testing checking for library $cf_db_libs ..." 1>&5
25418
25419         cat >"conftest.$ac_ext" <<_ACEOF
25420 #line 25420 "configure"
25421 #include "confdefs.h"
25422
25423 $ac_includes_default
25424 #include <db.h>
25425
25426 int
25427 main (void)
25428 {
25429
25430         char *path = "/tmp/foo";
25431 #ifdef DB_VERSION_MAJOR
25432 #if DB_VERSION_MAJOR >= 4
25433         DB *result = 0;
25434         db_create(&result, NULL, 0);
25435         result->open(result,
25436                 NULL,
25437                 path,
25438                 path,
25439                 DB_HASH,
25440                 DB_CREATE,
25441                 0644);
25442 #elif DB_VERSION_MAJOR >= 3
25443         DB *result = 0;
25444         db_create(&result, NULL, 0);
25445         result->open(result,
25446                 path,
25447                 path,
25448                 DB_HASH,
25449                 DB_CREATE,
25450                 0644);
25451 #elif DB_VERSION_MAJOR >= 2
25452         DB *result = 0;
25453         db_open(path,
25454                 DB_HASH,
25455                 DB_CREATE,
25456                 0644,
25457                 (DB_ENV *) 0,
25458                 (DB_INFO *) 0,
25459                 &result);
25460 #endif /* DB_VERSION_MAJOR */
25461 #else
25462         DB *result = dbopen(path,
25463                      2,
25464                      0644,
25465                      DB_HASH,
25466                      0);
25467 #endif
25468         ${cf_cv_main_return:-return}(result != 0)
25469
25470   ;
25471   return 0;
25472 }
25473 _ACEOF
25474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25475 if { (eval echo "$as_me:25475: \"$ac_link\"") >&5
25476   (eval $ac_link) 2>&5
25477   ac_status=$?
25478   echo "$as_me:25478: \$? = $ac_status" >&5
25479   (exit "$ac_status"); } &&
25480          { ac_try='test -s "conftest$ac_exeext"'
25481   { (eval echo "$as_me:25481: \"$ac_try\"") >&5
25482   (eval $ac_try) 2>&5
25483   ac_status=$?
25484   echo "$as_me:25484: \$? = $ac_status" >&5
25485   (exit "$ac_status"); }; }; then
25486
25487         if test -n "$cf_db_libs" ; then
25488                 cf_cv_hashed_db_libs=$cf_db_libs
25489         else
25490                 cf_cv_hashed_db_libs=default
25491         fi
25492         LIBS="$cf_save_libs"
25493         break
25494
25495 else
25496   echo "$as_me: failed program was:" >&5
25497 cat "conftest.$ac_ext" >&5
25498 fi
25499 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25500         LIBS="$cf_save_libs"
25501 done
25502
25503 fi
25504 echo "$as_me:25504: result: $cf_cv_hashed_db_libs" >&5
25505 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25506
25507         if test "$cf_cv_hashed_db_libs" = unknown ; then
25508                 { { echo "$as_me:25508: error: Cannot determine library for db" >&5
25509 echo "$as_me: error: Cannot determine library for db" >&2;}
25510    { (exit 1); exit 1; }; }
25511         elif test "$cf_cv_hashed_db_libs" != default ; then
25512
25513 cf_add_libs="$LIBS"
25514 # reverse order
25515 cf_add_0lib=
25516 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25517 # filter duplicates
25518 for cf_add_1lib in $cf_add_0lib; do
25519         for cf_add_2lib in $cf_add_libs; do
25520                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25521                         cf_add_1lib=
25522                         break
25523                 fi
25524         done
25525         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25526 done
25527 LIBS="$cf_add_libs"
25528
25529         fi
25530 fi
25531
25532 else
25533
25534         { { echo "$as_me:25534: error: Cannot find db.h" >&5
25535 echo "$as_me: error: Cannot find db.h" >&2;}
25536    { (exit 1); exit 1; }; }
25537
25538 fi
25539
25540 fi
25541
25542 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25543         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25544         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25545 fi
25546
25547 # Just in case, check if the C compiler has a bool type.
25548
25549 echo "$as_me:25549: checking if we should include stdbool.h" >&5
25550 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25551
25552 if test "${cf_cv_header_stdbool_h+set}" = set; then
25553   echo $ECHO_N "(cached) $ECHO_C" >&6
25554 else
25555
25556         cat >"conftest.$ac_ext" <<_ACEOF
25557 #line 25557 "configure"
25558 #include "confdefs.h"
25559
25560 int
25561 main (void)
25562 {
25563 bool foo = false; (void)foo
25564   ;
25565   return 0;
25566 }
25567 _ACEOF
25568 rm -f "conftest.$ac_objext"
25569 if { (eval echo "$as_me:25569: \"$ac_compile\"") >&5
25570   (eval $ac_compile) 2>&5
25571   ac_status=$?
25572   echo "$as_me:25572: \$? = $ac_status" >&5
25573   (exit "$ac_status"); } &&
25574          { ac_try='test -s "conftest.$ac_objext"'
25575   { (eval echo "$as_me:25575: \"$ac_try\"") >&5
25576   (eval $ac_try) 2>&5
25577   ac_status=$?
25578   echo "$as_me:25578: \$? = $ac_status" >&5
25579   (exit "$ac_status"); }; }; then
25580   cf_cv_header_stdbool_h=0
25581 else
25582   echo "$as_me: failed program was:" >&5
25583 cat "conftest.$ac_ext" >&5
25584 cat >"conftest.$ac_ext" <<_ACEOF
25585 #line 25585 "configure"
25586 #include "confdefs.h"
25587
25588 #ifndef __BEOS__
25589 #include <stdbool.h>
25590 #endif
25591
25592 int
25593 main (void)
25594 {
25595 bool foo = false; (void)foo
25596   ;
25597   return 0;
25598 }
25599 _ACEOF
25600 rm -f "conftest.$ac_objext"
25601 if { (eval echo "$as_me:25601: \"$ac_compile\"") >&5
25602   (eval $ac_compile) 2>&5
25603   ac_status=$?
25604   echo "$as_me:25604: \$? = $ac_status" >&5
25605   (exit "$ac_status"); } &&
25606          { ac_try='test -s "conftest.$ac_objext"'
25607   { (eval echo "$as_me:25607: \"$ac_try\"") >&5
25608   (eval $ac_try) 2>&5
25609   ac_status=$?
25610   echo "$as_me:25610: \$? = $ac_status" >&5
25611   (exit "$ac_status"); }; }; then
25612   cf_cv_header_stdbool_h=1
25613 else
25614   echo "$as_me: failed program was:" >&5
25615 cat "conftest.$ac_ext" >&5
25616 cf_cv_header_stdbool_h=0
25617 fi
25618 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25619 fi
25620 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25621 fi
25622
25623 if test "$cf_cv_header_stdbool_h" = 1
25624 then    echo "$as_me:25624: result: yes" >&5
25625 echo "${ECHO_T}yes" >&6
25626 else    echo "$as_me:25626: result: no" >&5
25627 echo "${ECHO_T}no" >&6
25628 fi
25629
25630 echo "$as_me:25630: checking for builtin bool type" >&5
25631 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25632
25633 if test "${cf_cv_cc_bool_type+set}" = set; then
25634   echo $ECHO_N "(cached) $ECHO_C" >&6
25635 else
25636
25637         cat >"conftest.$ac_ext" <<_ACEOF
25638 #line 25638 "configure"
25639 #include "confdefs.h"
25640
25641 #include <stdio.h>
25642 #include <sys/types.h>
25643
25644 int
25645 main (void)
25646 {
25647 bool x = false; (void)x
25648   ;
25649   return 0;
25650 }
25651 _ACEOF
25652 rm -f "conftest.$ac_objext"
25653 if { (eval echo "$as_me:25653: \"$ac_compile\"") >&5
25654   (eval $ac_compile) 2>&5
25655   ac_status=$?
25656   echo "$as_me:25656: \$? = $ac_status" >&5
25657   (exit "$ac_status"); } &&
25658          { ac_try='test -s "conftest.$ac_objext"'
25659   { (eval echo "$as_me:25659: \"$ac_try\"") >&5
25660   (eval $ac_try) 2>&5
25661   ac_status=$?
25662   echo "$as_me:25662: \$? = $ac_status" >&5
25663   (exit "$ac_status"); }; }; then
25664   cf_cv_cc_bool_type=1
25665 else
25666   echo "$as_me: failed program was:" >&5
25667 cat "conftest.$ac_ext" >&5
25668 cf_cv_cc_bool_type=0
25669 fi
25670 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25671
25672 fi
25673
25674 if test "$cf_cv_cc_bool_type" = 1
25675 then    echo "$as_me:25675: result: yes" >&5
25676 echo "${ECHO_T}yes" >&6
25677 else    echo "$as_me:25677: result: no" >&5
25678 echo "${ECHO_T}no" >&6
25679 fi
25680
25681 # Check for C++ compiler characteristics (and ensure that it's there!)
25682 if test -n "$CXX" ; then
25683         ac_ext=cc
25684 ac_cpp='$CXXCPP $CPPFLAGS'
25685 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25686 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25687 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25688 ac_main_return="return"
25689
25690 if test -n "$GXX" ; then
25691
25692         cf_save="$LIBS"
25693         LIBS="$LIBS $CXXLIBS"
25694         echo "$as_me:25694: checking if we already have C++ library" >&5
25695 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25696         cat >"conftest.$ac_ext" <<_ACEOF
25697 #line 25697 "configure"
25698 #include "confdefs.h"
25699
25700                         #include <iostream>
25701 int
25702 main (void)
25703 {
25704
25705                         std::cout << "Hello World!" << std::endl;
25706   ;
25707   return 0;
25708 }
25709 _ACEOF
25710 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25711 if { (eval echo "$as_me:25711: \"$ac_link\"") >&5
25712   (eval $ac_link) 2>&5
25713   ac_status=$?
25714   echo "$as_me:25714: \$? = $ac_status" >&5
25715   (exit "$ac_status"); } &&
25716          { ac_try='test -s "conftest$ac_exeext"'
25717   { (eval echo "$as_me:25717: \"$ac_try\"") >&5
25718   (eval $ac_try) 2>&5
25719   ac_status=$?
25720   echo "$as_me:25720: \$? = $ac_status" >&5
25721   (exit "$ac_status"); }; }; then
25722   cf_have_libstdcpp=yes
25723 else
25724   echo "$as_me: failed program was:" >&5
25725 cat "conftest.$ac_ext" >&5
25726 cf_have_libstdcpp=no
25727 fi
25728 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25729         echo "$as_me:25729: result: $cf_have_libstdcpp" >&5
25730 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25731         LIBS="$cf_save"
25732
25733         if test "$cf_have_libstdcpp" != yes
25734         then
25735                 case "$cf_cv_system_name" in
25736                 (os2*)
25737                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25738                                 cf_stdcpp_libname=stdcpp
25739                         else
25740                                 cf_stdcpp_libname=stdc++
25741                         fi
25742                         ;;
25743                 (*)
25744                         cf_stdcpp_libname=stdc++
25745                         ;;
25746                 esac
25747
25748                 echo "$as_me:25748: checking for library $cf_stdcpp_libname" >&5
25749 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25750 if test "${cf_cv_libstdcpp+set}" = set; then
25751   echo $ECHO_N "(cached) $ECHO_C" >&6
25752 else
25753
25754                         cf_save="$LIBS"
25755                         LIBS="$LIBS $CXXLIBS"
25756
25757 cf_add_libs="$LIBS"
25758 # reverse order
25759 cf_add_0lib=
25760 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25761 # filter duplicates
25762 for cf_add_1lib in $cf_add_0lib; do
25763         for cf_add_2lib in $cf_add_libs; do
25764                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25765                         cf_add_1lib=
25766                         break
25767                 fi
25768         done
25769         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25770 done
25771 LIBS="$cf_add_libs"
25772
25773                 cat >"conftest.$ac_ext" <<_ACEOF
25774 #line 25774 "configure"
25775 #include "confdefs.h"
25776
25777                                 #include <iostream>
25778 int
25779 main (void)
25780 {
25781
25782                                 std::cout << "Hello World!" << std::endl;
25783   ;
25784   return 0;
25785 }
25786 _ACEOF
25787 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25788 if { (eval echo "$as_me:25788: \"$ac_link\"") >&5
25789   (eval $ac_link) 2>&5
25790   ac_status=$?
25791   echo "$as_me:25791: \$? = $ac_status" >&5
25792   (exit "$ac_status"); } &&
25793          { ac_try='test -s "conftest$ac_exeext"'
25794   { (eval echo "$as_me:25794: \"$ac_try\"") >&5
25795   (eval $ac_try) 2>&5
25796   ac_status=$?
25797   echo "$as_me:25797: \$? = $ac_status" >&5
25798   (exit "$ac_status"); }; }; then
25799   cf_cv_libstdcpp=yes
25800 else
25801   echo "$as_me: failed program was:" >&5
25802 cat "conftest.$ac_ext" >&5
25803 cf_cv_libstdcpp=no
25804 fi
25805 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25806                         LIBS="$cf_save"
25807
25808 fi
25809 echo "$as_me:25809: result: $cf_cv_libstdcpp" >&5
25810 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25811                 test "$cf_cv_libstdcpp" = yes && {
25812 cf_add_libs="$CXXLIBS"
25813 # reverse order
25814 cf_add_0lib=
25815 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25816 # filter duplicates
25817 for cf_add_1lib in $cf_add_0lib; do
25818         for cf_add_2lib in $cf_add_libs; do
25819                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25820                         cf_add_1lib=
25821                         break
25822                 fi
25823         done
25824         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25825 done
25826 CXXLIBS="$cf_add_libs"
25827  }
25828         fi
25829 fi
25830
25831         echo "$as_me:25831: checking whether $CXX understands -c and -o together" >&5
25832 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25833 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25834   echo $ECHO_N "(cached) $ECHO_C" >&6
25835 else
25836
25837 cat > conftest.$ac_ext <<CF_EOF
25838 int main(void)
25839 {
25840         ${cf_cv_main_return:-return}(0);
25841 }
25842 CF_EOF
25843 # We do the test twice because some compilers refuse to overwrite an
25844 # existing .o file with -o, though they will create one.
25845 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25846 if { (eval echo "$as_me:25846: \"$ac_try\"") >&5
25847   (eval $ac_try) 2>&5
25848   ac_status=$?
25849   echo "$as_me:25849: \$? = $ac_status" >&5
25850   (exit "$ac_status"); } &&
25851   test -f conftest2.$ac_objext && { (eval echo "$as_me:25851: \"$ac_try\"") >&5
25852   (eval $ac_try) 2>&5
25853   ac_status=$?
25854   echo "$as_me:25854: \$? = $ac_status" >&5
25855   (exit "$ac_status"); };
25856 then
25857   eval cf_cv_prog_CXX_c_o=yes
25858 else
25859   eval cf_cv_prog_CXX_c_o=no
25860 fi
25861 rm -rf ./conftest*
25862
25863 fi
25864 if test "$cf_cv_prog_CXX_c_o" = yes; then
25865   echo "$as_me:25865: result: yes" >&5
25866 echo "${ECHO_T}yes" >&6
25867 else
25868   echo "$as_me:25868: result: no" >&5
25869 echo "${ECHO_T}no" >&6
25870 fi
25871
25872         case "$GXX_VERSION" in
25873         (1.*|2.[0-6]*|[1-9][0-9].*)
25874                 cf_cxx_library=yes
25875                 ;;
25876         (*-2.7*|2.7*)
25877
25878 cf_cxx_library=unknown
25879 case "$cf_cv_system_name" in
25880 (os2*)
25881         cf_gpp_libname=gpp
25882         ;;
25883 (*)
25884         cf_gpp_libname=g++
25885         ;;
25886 esac
25887 if test "$GXX" = yes; then
25888         echo "$as_me:25888: checking for lib$cf_gpp_libname" >&5
25889 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25890         cf_save="$LIBS"
25891
25892 cf_add_libs="$LIBS"
25893 # reverse order
25894 cf_add_0lib=
25895 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25896 # filter duplicates
25897 for cf_add_1lib in $cf_add_0lib; do
25898         for cf_add_2lib in $cf_add_libs; do
25899                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25900                         cf_add_1lib=
25901                         break
25902                 fi
25903         done
25904         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25905 done
25906 LIBS="$cf_add_libs"
25907
25908         cat >"conftest.$ac_ext" <<_ACEOF
25909 #line 25909 "configure"
25910 #include "confdefs.h"
25911
25912 #include <$cf_gpp_libname/builtin.h>
25913
25914 int
25915 main (void)
25916 {
25917 two_arg_error_handler_t foo2 = lib_error_handler
25918   ;
25919   return 0;
25920 }
25921 _ACEOF
25922 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25923 if { (eval echo "$as_me:25923: \"$ac_link\"") >&5
25924   (eval $ac_link) 2>&5
25925   ac_status=$?
25926   echo "$as_me:25926: \$? = $ac_status" >&5
25927   (exit "$ac_status"); } &&
25928          { ac_try='test -s "conftest$ac_exeext"'
25929   { (eval echo "$as_me:25929: \"$ac_try\"") >&5
25930   (eval $ac_try) 2>&5
25931   ac_status=$?
25932   echo "$as_me:25932: \$? = $ac_status" >&5
25933   (exit "$ac_status"); }; }; then
25934   cf_cxx_library=yes
25935
25936 cf_add_libs="$CXXLIBS"
25937 # reverse order
25938 cf_add_0lib=
25939 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25940 # filter duplicates
25941 for cf_add_1lib in $cf_add_0lib; do
25942         for cf_add_2lib in $cf_add_libs; do
25943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25944                         cf_add_1lib=
25945                         break
25946                 fi
25947         done
25948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25949 done
25950 CXXLIBS="$cf_add_libs"
25951
25952          if test "$cf_gpp_libname" = cpp ; then
25953
25954 cat >>confdefs.h <<\EOF
25955 #define HAVE_GPP_BUILTIN_H 1
25956 EOF
25957
25958          else
25959
25960 cat >>confdefs.h <<\EOF
25961 #define HAVE_GXX_BUILTIN_H 1
25962 EOF
25963
25964          fi
25965 else
25966   echo "$as_me: failed program was:" >&5
25967 cat "conftest.$ac_ext" >&5
25968 cat >"conftest.$ac_ext" <<_ACEOF
25969 #line 25969 "configure"
25970 #include "confdefs.h"
25971
25972 #include <builtin.h>
25973
25974 int
25975 main (void)
25976 {
25977 two_arg_error_handler_t foo2 = lib_error_handler
25978   ;
25979   return 0;
25980 }
25981 _ACEOF
25982 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25983 if { (eval echo "$as_me:25983: \"$ac_link\"") >&5
25984   (eval $ac_link) 2>&5
25985   ac_status=$?
25986   echo "$as_me:25986: \$? = $ac_status" >&5
25987   (exit "$ac_status"); } &&
25988          { ac_try='test -s "conftest$ac_exeext"'
25989   { (eval echo "$as_me:25989: \"$ac_try\"") >&5
25990   (eval $ac_try) 2>&5
25991   ac_status=$?
25992   echo "$as_me:25992: \$? = $ac_status" >&5
25993   (exit "$ac_status"); }; }; then
25994   cf_cxx_library=yes
25995
25996 cf_add_libs="$CXXLIBS"
25997 # reverse order
25998 cf_add_0lib=
25999 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
26000 # filter duplicates
26001 for cf_add_1lib in $cf_add_0lib; do
26002         for cf_add_2lib in $cf_add_libs; do
26003                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
26004                         cf_add_1lib=
26005                         break
26006                 fi
26007         done
26008         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
26009 done
26010 CXXLIBS="$cf_add_libs"
26011
26012 cat >>confdefs.h <<\EOF
26013 #define HAVE_BUILTIN_H 1
26014 EOF
26015
26016 else
26017   echo "$as_me: failed program was:" >&5
26018 cat "conftest.$ac_ext" >&5
26019 cf_cxx_library=no
26020 fi
26021 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26022 fi
26023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26024         LIBS="$cf_save"
26025         echo "$as_me:26025: result: $cf_cxx_library" >&5
26026 echo "${ECHO_T}$cf_cxx_library" >&6
26027 fi
26028
26029                 ;;
26030         (*)
26031                 cf_cxx_library=no
26032                 ;;
26033         esac
26034
26035         ac_ext=cc
26036 ac_cpp='$CXXCPP $CPPFLAGS'
26037 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26038 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26039 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26040 ac_main_return="return"
26041 echo "$as_me:26041: checking how to run the C++ preprocessor" >&5
26042 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
26043 if test -z "$CXXCPP"; then
26044   if test "${ac_cv_prog_CXXCPP+set}" = set; then
26045   echo $ECHO_N "(cached) $ECHO_C" >&6
26046 else
26047       # Double quotes because CXXCPP needs to be expanded
26048     for CXXCPP in "$CXX -E" "/lib/cpp"
26049     do
26050       ac_preproc_ok=false
26051 for ac_cxx_preproc_warn_flag in '' yes
26052 do
26053   # Use a header file that comes with gcc, so configuring glibc
26054   # with a fresh cross-compiler works.
26055   # On the NeXT, cc -E runs the code through the compiler's parser,
26056   # not just through cpp. "Syntax error" is here to catch this case.
26057   cat >"conftest.$ac_ext" <<_ACEOF
26058 #line 26058 "configure"
26059 #include "confdefs.h"
26060 #include <assert.h>
26061                      Syntax error
26062 _ACEOF
26063 if { (eval echo "$as_me:26063: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26064   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26065   ac_status=$?
26066   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26067   rm -f conftest.er1
26068   cat conftest.err >&5
26069   echo "$as_me:26069: \$? = $ac_status" >&5
26070   (exit "$ac_status"); } >/dev/null; then
26071   if test -s conftest.err; then
26072     ac_cpp_err=$ac_cxx_preproc_warn_flag
26073   else
26074     ac_cpp_err=
26075   fi
26076 else
26077   ac_cpp_err=yes
26078 fi
26079 if test -z "$ac_cpp_err"; then
26080   :
26081 else
26082   echo "$as_me: failed program was:" >&5
26083   cat "conftest.$ac_ext" >&5
26084   # Broken: fails on valid input.
26085 continue
26086 fi
26087 rm -f conftest.err "conftest.$ac_ext"
26088
26089   # OK, works on sane cases.  Now check whether non-existent headers
26090   # can be detected and how.
26091   cat >"conftest.$ac_ext" <<_ACEOF
26092 #line 26092 "configure"
26093 #include "confdefs.h"
26094 #include <ac_nonexistent.h>
26095 _ACEOF
26096 if { (eval echo "$as_me:26096: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26097   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26098   ac_status=$?
26099   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26100   rm -f conftest.er1
26101   cat conftest.err >&5
26102   echo "$as_me:26102: \$? = $ac_status" >&5
26103   (exit "$ac_status"); } >/dev/null; then
26104   if test -s conftest.err; then
26105     ac_cpp_err=$ac_cxx_preproc_warn_flag
26106   else
26107     ac_cpp_err=
26108   fi
26109 else
26110   ac_cpp_err=yes
26111 fi
26112 if test -z "$ac_cpp_err"; then
26113   # Broken: success on invalid input.
26114 continue
26115 else
26116   echo "$as_me: failed program was:" >&5
26117   cat "conftest.$ac_ext" >&5
26118   # Passes both tests.
26119 ac_preproc_ok=:
26120 break
26121 fi
26122 rm -f conftest.err "conftest.$ac_ext"
26123
26124 done
26125 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
26126 rm -f conftest.err "conftest.$ac_ext"
26127 if $ac_preproc_ok; then
26128   break
26129 fi
26130
26131     done
26132     ac_cv_prog_CXXCPP=$CXXCPP
26133
26134 fi
26135   CXXCPP=$ac_cv_prog_CXXCPP
26136 else
26137   ac_cv_prog_CXXCPP=$CXXCPP
26138 fi
26139 echo "$as_me:26139: result: $CXXCPP" >&5
26140 echo "${ECHO_T}$CXXCPP" >&6
26141 ac_preproc_ok=false
26142 for ac_cxx_preproc_warn_flag in '' yes
26143 do
26144   # Use a header file that comes with gcc, so configuring glibc
26145   # with a fresh cross-compiler works.
26146   # On the NeXT, cc -E runs the code through the compiler's parser,
26147   # not just through cpp. "Syntax error" is here to catch this case.
26148   cat >"conftest.$ac_ext" <<_ACEOF
26149 #line 26149 "configure"
26150 #include "confdefs.h"
26151 #include <assert.h>
26152                      Syntax error
26153 _ACEOF
26154 if { (eval echo "$as_me:26154: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26155   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26156   ac_status=$?
26157   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26158   rm -f conftest.er1
26159   cat conftest.err >&5
26160   echo "$as_me:26160: \$? = $ac_status" >&5
26161   (exit "$ac_status"); } >/dev/null; then
26162   if test -s conftest.err; then
26163     ac_cpp_err=$ac_cxx_preproc_warn_flag
26164   else
26165     ac_cpp_err=
26166   fi
26167 else
26168   ac_cpp_err=yes
26169 fi
26170 if test -z "$ac_cpp_err"; then
26171   :
26172 else
26173   echo "$as_me: failed program was:" >&5
26174   cat "conftest.$ac_ext" >&5
26175   # Broken: fails on valid input.
26176 continue
26177 fi
26178 rm -f conftest.err "conftest.$ac_ext"
26179
26180   # OK, works on sane cases.  Now check whether non-existent headers
26181   # can be detected and how.
26182   cat >"conftest.$ac_ext" <<_ACEOF
26183 #line 26183 "configure"
26184 #include "confdefs.h"
26185 #include <ac_nonexistent.h>
26186 _ACEOF
26187 if { (eval echo "$as_me:26187: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26188   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26189   ac_status=$?
26190   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26191   rm -f conftest.er1
26192   cat conftest.err >&5
26193   echo "$as_me:26193: \$? = $ac_status" >&5
26194   (exit "$ac_status"); } >/dev/null; then
26195   if test -s conftest.err; then
26196     ac_cpp_err=$ac_cxx_preproc_warn_flag
26197   else
26198     ac_cpp_err=
26199   fi
26200 else
26201   ac_cpp_err=yes
26202 fi
26203 if test -z "$ac_cpp_err"; then
26204   # Broken: success on invalid input.
26205 continue
26206 else
26207   echo "$as_me: failed program was:" >&5
26208   cat "conftest.$ac_ext" >&5
26209   # Passes both tests.
26210 ac_preproc_ok=:
26211 break
26212 fi
26213 rm -f conftest.err "conftest.$ac_ext"
26214
26215 done
26216 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
26217 rm -f conftest.err "conftest.$ac_ext"
26218 if $ac_preproc_ok; then
26219   :
26220 else
26221   { { echo "$as_me:26221: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
26222 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
26223    { (exit 1); exit 1; }; }
26224 fi
26225
26226 ac_ext=cc
26227 ac_cpp='$CXXCPP $CPPFLAGS'
26228 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26229 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26230 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26231 ac_main_return="return"
26232
26233 for ac_header in typeinfo
26234 do
26235 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26236 echo "$as_me:26236: checking for $ac_header" >&5
26237 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26238 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26239   echo $ECHO_N "(cached) $ECHO_C" >&6
26240 else
26241   cat >"conftest.$ac_ext" <<_ACEOF
26242 #line 26242 "configure"
26243 #include "confdefs.h"
26244 #include <$ac_header>
26245 _ACEOF
26246 if { (eval echo "$as_me:26246: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26247   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26248   ac_status=$?
26249   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26250   rm -f conftest.er1
26251   cat conftest.err >&5
26252   echo "$as_me:26252: \$? = $ac_status" >&5
26253   (exit "$ac_status"); } >/dev/null; then
26254   if test -s conftest.err; then
26255     ac_cpp_err=$ac_cxx_preproc_warn_flag
26256   else
26257     ac_cpp_err=
26258   fi
26259 else
26260   ac_cpp_err=yes
26261 fi
26262 if test -z "$ac_cpp_err"; then
26263   eval "$as_ac_Header=yes"
26264 else
26265   echo "$as_me: failed program was:" >&5
26266   cat "conftest.$ac_ext" >&5
26267   eval "$as_ac_Header=no"
26268 fi
26269 rm -f conftest.err "conftest.$ac_ext"
26270 fi
26271 echo "$as_me:26271: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26272 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26273 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26274   cat >>confdefs.h <<EOF
26275 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26276 EOF
26277
26278 fi
26279 done
26280
26281 for ac_header in iostream
26282 do
26283 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26284 echo "$as_me:26284: checking for $ac_header" >&5
26285 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26286 if eval "test \"\${$as_ac_Header+set}\" = set"; then
26287   echo $ECHO_N "(cached) $ECHO_C" >&6
26288 else
26289   cat >"conftest.$ac_ext" <<_ACEOF
26290 #line 26290 "configure"
26291 #include "confdefs.h"
26292 #include <$ac_header>
26293 _ACEOF
26294 if { (eval echo "$as_me:26294: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26295   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26296   ac_status=$?
26297   $EGREP -v '^ *\+' conftest.er1 >conftest.err
26298   rm -f conftest.er1
26299   cat conftest.err >&5
26300   echo "$as_me:26300: \$? = $ac_status" >&5
26301   (exit "$ac_status"); } >/dev/null; then
26302   if test -s conftest.err; then
26303     ac_cpp_err=$ac_cxx_preproc_warn_flag
26304   else
26305     ac_cpp_err=
26306   fi
26307 else
26308   ac_cpp_err=yes
26309 fi
26310 if test -z "$ac_cpp_err"; then
26311   eval "$as_ac_Header=yes"
26312 else
26313   echo "$as_me: failed program was:" >&5
26314   cat "conftest.$ac_ext" >&5
26315   eval "$as_ac_Header=no"
26316 fi
26317 rm -f conftest.err "conftest.$ac_ext"
26318 fi
26319 echo "$as_me:26319: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26320 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26321 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26322   cat >>confdefs.h <<EOF
26323 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26324 EOF
26325
26326 fi
26327 done
26328
26329 if test x"$ac_cv_header_iostream" = xyes ; then
26330         echo "$as_me:26330: checking if iostream uses std-namespace" >&5
26331 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
26332         cat >"conftest.$ac_ext" <<_ACEOF
26333 #line 26333 "configure"
26334 #include "confdefs.h"
26335
26336 #include <iostream>
26337 using std::endl;
26338 using std::cerr;
26339 int
26340 main (void)
26341 {
26342
26343 cerr << "testing" << endl;
26344
26345   ;
26346   return 0;
26347 }
26348 _ACEOF
26349 rm -f "conftest.$ac_objext"
26350 if { (eval echo "$as_me:26350: \"$ac_compile\"") >&5
26351   (eval $ac_compile) 2>&5
26352   ac_status=$?
26353   echo "$as_me:26353: \$? = $ac_status" >&5
26354   (exit "$ac_status"); } &&
26355          { ac_try='test -s "conftest.$ac_objext"'
26356   { (eval echo "$as_me:26356: \"$ac_try\"") >&5
26357   (eval $ac_try) 2>&5
26358   ac_status=$?
26359   echo "$as_me:26359: \$? = $ac_status" >&5
26360   (exit "$ac_status"); }; }; then
26361   cf_iostream_namespace=yes
26362 else
26363   echo "$as_me: failed program was:" >&5
26364 cat "conftest.$ac_ext" >&5
26365 cf_iostream_namespace=no
26366 fi
26367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26368         echo "$as_me:26368: result: $cf_iostream_namespace" >&5
26369 echo "${ECHO_T}$cf_iostream_namespace" >&6
26370         if test "$cf_iostream_namespace" = yes ; then
26371
26372 cat >>confdefs.h <<\EOF
26373 #define IOSTREAM_NAMESPACE 1
26374 EOF
26375
26376         fi
26377 fi
26378
26379 echo "$as_me:26379: checking if we should include stdbool.h" >&5
26380 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
26381
26382 if test "${cf_cv_header_stdbool_h+set}" = set; then
26383   echo $ECHO_N "(cached) $ECHO_C" >&6
26384 else
26385
26386         cat >"conftest.$ac_ext" <<_ACEOF
26387 #line 26387 "configure"
26388 #include "confdefs.h"
26389
26390 int
26391 main (void)
26392 {
26393 bool foo = false; (void)foo
26394   ;
26395   return 0;
26396 }
26397 _ACEOF
26398 rm -f "conftest.$ac_objext"
26399 if { (eval echo "$as_me:26399: \"$ac_compile\"") >&5
26400   (eval $ac_compile) 2>&5
26401   ac_status=$?
26402   echo "$as_me:26402: \$? = $ac_status" >&5
26403   (exit "$ac_status"); } &&
26404          { ac_try='test -s "conftest.$ac_objext"'
26405   { (eval echo "$as_me:26405: \"$ac_try\"") >&5
26406   (eval $ac_try) 2>&5
26407   ac_status=$?
26408   echo "$as_me:26408: \$? = $ac_status" >&5
26409   (exit "$ac_status"); }; }; then
26410   cf_cv_header_stdbool_h=0
26411 else
26412   echo "$as_me: failed program was:" >&5
26413 cat "conftest.$ac_ext" >&5
26414 cat >"conftest.$ac_ext" <<_ACEOF
26415 #line 26415 "configure"
26416 #include "confdefs.h"
26417
26418 #ifndef __BEOS__
26419 #include <stdbool.h>
26420 #endif
26421
26422 int
26423 main (void)
26424 {
26425 bool foo = false; (void)foo
26426   ;
26427   return 0;
26428 }
26429 _ACEOF
26430 rm -f "conftest.$ac_objext"
26431 if { (eval echo "$as_me:26431: \"$ac_compile\"") >&5
26432   (eval $ac_compile) 2>&5
26433   ac_status=$?
26434   echo "$as_me:26434: \$? = $ac_status" >&5
26435   (exit "$ac_status"); } &&
26436          { ac_try='test -s "conftest.$ac_objext"'
26437   { (eval echo "$as_me:26437: \"$ac_try\"") >&5
26438   (eval $ac_try) 2>&5
26439   ac_status=$?
26440   echo "$as_me:26440: \$? = $ac_status" >&5
26441   (exit "$ac_status"); }; }; then
26442   cf_cv_header_stdbool_h=1
26443 else
26444   echo "$as_me: failed program was:" >&5
26445 cat "conftest.$ac_ext" >&5
26446 cf_cv_header_stdbool_h=0
26447 fi
26448 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26449 fi
26450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26451 fi
26452
26453 if test "$cf_cv_header_stdbool_h" = 1
26454 then    echo "$as_me:26454: result: yes" >&5
26455 echo "${ECHO_T}yes" >&6
26456 else    echo "$as_me:26456: result: no" >&5
26457 echo "${ECHO_T}no" >&6
26458 fi
26459
26460 echo "$as_me:26460: checking for builtin bool type" >&5
26461 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26462
26463 if test "${cf_cv_builtin_bool+set}" = set; then
26464   echo $ECHO_N "(cached) $ECHO_C" >&6
26465 else
26466
26467         cat >"conftest.$ac_ext" <<_ACEOF
26468 #line 26468 "configure"
26469 #include "confdefs.h"
26470
26471 #include <stdio.h>
26472 #include <sys/types.h>
26473
26474 int
26475 main (void)
26476 {
26477 bool x = false; (void)x
26478   ;
26479   return 0;
26480 }
26481 _ACEOF
26482 rm -f "conftest.$ac_objext"
26483 if { (eval echo "$as_me:26483: \"$ac_compile\"") >&5
26484   (eval $ac_compile) 2>&5
26485   ac_status=$?
26486   echo "$as_me:26486: \$? = $ac_status" >&5
26487   (exit "$ac_status"); } &&
26488          { ac_try='test -s "conftest.$ac_objext"'
26489   { (eval echo "$as_me:26489: \"$ac_try\"") >&5
26490   (eval $ac_try) 2>&5
26491   ac_status=$?
26492   echo "$as_me:26492: \$? = $ac_status" >&5
26493   (exit "$ac_status"); }; }; then
26494   cf_cv_builtin_bool=1
26495 else
26496   echo "$as_me: failed program was:" >&5
26497 cat "conftest.$ac_ext" >&5
26498 cf_cv_builtin_bool=0
26499 fi
26500 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26501
26502 fi
26503
26504 if test "$cf_cv_builtin_bool" = 1
26505 then    echo "$as_me:26505: result: yes" >&5
26506 echo "${ECHO_T}yes" >&6
26507 else    echo "$as_me:26507: result: no" >&5
26508 echo "${ECHO_T}no" >&6
26509 fi
26510
26511 echo "$as_me:26511: checking for bool" >&5
26512 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26513 if test "${ac_cv_type_bool+set}" = set; then
26514   echo $ECHO_N "(cached) $ECHO_C" >&6
26515 else
26516   cat >"conftest.$ac_ext" <<_ACEOF
26517 #line 26517 "configure"
26518 #include "confdefs.h"
26519
26520 $ac_includes_default
26521
26522 #if defined(__cplusplus)
26523
26524 #ifdef HAVE_GXX_BUILTIN_H
26525 #include <g++/builtin.h>
26526 #elif HAVE_GPP_BUILTIN_H
26527 #include <gpp/builtin.h>
26528 #elif HAVE_BUILTIN_H
26529 #include <builtin.h>
26530 #endif
26531
26532 #else
26533
26534 #if $cf_cv_header_stdbool_h
26535 #include <stdbool.h>
26536 #endif
26537
26538 #endif
26539
26540 int
26541 main (void)
26542 {
26543 if ((bool *) 0)
26544   return 0;
26545 if (sizeof (bool))
26546   return 0;
26547   ;
26548   return 0;
26549 }
26550 _ACEOF
26551 rm -f "conftest.$ac_objext"
26552 if { (eval echo "$as_me:26552: \"$ac_compile\"") >&5
26553   (eval $ac_compile) 2>&5
26554   ac_status=$?
26555   echo "$as_me:26555: \$? = $ac_status" >&5
26556   (exit "$ac_status"); } &&
26557          { ac_try='test -s "conftest.$ac_objext"'
26558   { (eval echo "$as_me:26558: \"$ac_try\"") >&5
26559   (eval $ac_try) 2>&5
26560   ac_status=$?
26561   echo "$as_me:26561: \$? = $ac_status" >&5
26562   (exit "$ac_status"); }; }; then
26563   ac_cv_type_bool=yes
26564 else
26565   echo "$as_me: failed program was:" >&5
26566 cat "conftest.$ac_ext" >&5
26567 ac_cv_type_bool=no
26568 fi
26569 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26570 fi
26571 echo "$as_me:26571: result: $ac_cv_type_bool" >&5
26572 echo "${ECHO_T}$ac_cv_type_bool" >&6
26573
26574 echo "$as_me:26574: checking size of bool" >&5
26575 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26576 if test "${ac_cv_sizeof_bool+set}" = set; then
26577   echo $ECHO_N "(cached) $ECHO_C" >&6
26578 else
26579   if test "$ac_cv_type_bool" = yes; then
26580   if test "$cross_compiling" = yes; then
26581   # Depending upon the size, compute the lo and hi bounds.
26582 cat >"conftest.$ac_ext" <<_ACEOF
26583 #line 26583 "configure"
26584 #include "confdefs.h"
26585
26586 $ac_includes_default
26587
26588 #if defined(__cplusplus)
26589
26590 #ifdef HAVE_GXX_BUILTIN_H
26591 #include <g++/builtin.h>
26592 #elif HAVE_GPP_BUILTIN_H
26593 #include <gpp/builtin.h>
26594 #elif HAVE_BUILTIN_H
26595 #include <builtin.h>
26596 #endif
26597
26598 #else
26599
26600 #if $cf_cv_header_stdbool_h
26601 #include <stdbool.h>
26602 #endif
26603
26604 #endif
26605
26606 int
26607 main (void)
26608 {
26609 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26610   ;
26611   return 0;
26612 }
26613 _ACEOF
26614 rm -f "conftest.$ac_objext"
26615 if { (eval echo "$as_me:26615: \"$ac_compile\"") >&5
26616   (eval $ac_compile) 2>&5
26617   ac_status=$?
26618   echo "$as_me:26618: \$? = $ac_status" >&5
26619   (exit "$ac_status"); } &&
26620          { ac_try='test -s "conftest.$ac_objext"'
26621   { (eval echo "$as_me:26621: \"$ac_try\"") >&5
26622   (eval $ac_try) 2>&5
26623   ac_status=$?
26624   echo "$as_me:26624: \$? = $ac_status" >&5
26625   (exit "$ac_status"); }; }; then
26626   ac_lo=0 ac_mid=0
26627   while :; do
26628     cat >"conftest.$ac_ext" <<_ACEOF
26629 #line 26629 "configure"
26630 #include "confdefs.h"
26631
26632 $ac_includes_default
26633
26634 #if defined(__cplusplus)
26635
26636 #ifdef HAVE_GXX_BUILTIN_H
26637 #include <g++/builtin.h>
26638 #elif HAVE_GPP_BUILTIN_H
26639 #include <gpp/builtin.h>
26640 #elif HAVE_BUILTIN_H
26641 #include <builtin.h>
26642 #endif
26643
26644 #else
26645
26646 #if $cf_cv_header_stdbool_h
26647 #include <stdbool.h>
26648 #endif
26649
26650 #endif
26651
26652 int
26653 main (void)
26654 {
26655 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26656   ;
26657   return 0;
26658 }
26659 _ACEOF
26660 rm -f "conftest.$ac_objext"
26661 if { (eval echo "$as_me:26661: \"$ac_compile\"") >&5
26662   (eval $ac_compile) 2>&5
26663   ac_status=$?
26664   echo "$as_me:26664: \$? = $ac_status" >&5
26665   (exit "$ac_status"); } &&
26666          { ac_try='test -s "conftest.$ac_objext"'
26667   { (eval echo "$as_me:26667: \"$ac_try\"") >&5
26668   (eval $ac_try) 2>&5
26669   ac_status=$?
26670   echo "$as_me:26670: \$? = $ac_status" >&5
26671   (exit "$ac_status"); }; }; then
26672   ac_hi=$ac_mid; break
26673 else
26674   echo "$as_me: failed program was:" >&5
26675 cat "conftest.$ac_ext" >&5
26676 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26677 fi
26678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26679   done
26680 else
26681   echo "$as_me: failed program was:" >&5
26682 cat "conftest.$ac_ext" >&5
26683 ac_hi=-1 ac_mid=-1
26684   while :; do
26685     cat >"conftest.$ac_ext" <<_ACEOF
26686 #line 26686 "configure"
26687 #include "confdefs.h"
26688
26689 $ac_includes_default
26690
26691 #if defined(__cplusplus)
26692
26693 #ifdef HAVE_GXX_BUILTIN_H
26694 #include <g++/builtin.h>
26695 #elif HAVE_GPP_BUILTIN_H
26696 #include <gpp/builtin.h>
26697 #elif HAVE_BUILTIN_H
26698 #include <builtin.h>
26699 #endif
26700
26701 #else
26702
26703 #if $cf_cv_header_stdbool_h
26704 #include <stdbool.h>
26705 #endif
26706
26707 #endif
26708
26709 int
26710 main (void)
26711 {
26712 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26713   ;
26714   return 0;
26715 }
26716 _ACEOF
26717 rm -f "conftest.$ac_objext"
26718 if { (eval echo "$as_me:26718: \"$ac_compile\"") >&5
26719   (eval $ac_compile) 2>&5
26720   ac_status=$?
26721   echo "$as_me:26721: \$? = $ac_status" >&5
26722   (exit "$ac_status"); } &&
26723          { ac_try='test -s "conftest.$ac_objext"'
26724   { (eval echo "$as_me:26724: \"$ac_try\"") >&5
26725   (eval $ac_try) 2>&5
26726   ac_status=$?
26727   echo "$as_me:26727: \$? = $ac_status" >&5
26728   (exit "$ac_status"); }; }; then
26729   ac_lo=$ac_mid; break
26730 else
26731   echo "$as_me: failed program was:" >&5
26732 cat "conftest.$ac_ext" >&5
26733 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26734 fi
26735 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26736   done
26737 fi
26738 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26739 # Binary search between lo and hi bounds.
26740 while test "x$ac_lo" != "x$ac_hi"; do
26741   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26742   cat >"conftest.$ac_ext" <<_ACEOF
26743 #line 26743 "configure"
26744 #include "confdefs.h"
26745
26746 $ac_includes_default
26747
26748 #if defined(__cplusplus)
26749
26750 #ifdef HAVE_GXX_BUILTIN_H
26751 #include <g++/builtin.h>
26752 #elif HAVE_GPP_BUILTIN_H
26753 #include <gpp/builtin.h>
26754 #elif HAVE_BUILTIN_H
26755 #include <builtin.h>
26756 #endif
26757
26758 #else
26759
26760 #if $cf_cv_header_stdbool_h
26761 #include <stdbool.h>
26762 #endif
26763
26764 #endif
26765
26766 int
26767 main (void)
26768 {
26769 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26770   ;
26771   return 0;
26772 }
26773 _ACEOF
26774 rm -f "conftest.$ac_objext"
26775 if { (eval echo "$as_me:26775: \"$ac_compile\"") >&5
26776   (eval $ac_compile) 2>&5
26777   ac_status=$?
26778   echo "$as_me:26778: \$? = $ac_status" >&5
26779   (exit "$ac_status"); } &&
26780          { ac_try='test -s "conftest.$ac_objext"'
26781   { (eval echo "$as_me:26781: \"$ac_try\"") >&5
26782   (eval $ac_try) 2>&5
26783   ac_status=$?
26784   echo "$as_me:26784: \$? = $ac_status" >&5
26785   (exit "$ac_status"); }; }; then
26786   ac_hi=$ac_mid
26787 else
26788   echo "$as_me: failed program was:" >&5
26789 cat "conftest.$ac_ext" >&5
26790 ac_lo=`expr "$ac_mid" + 1`
26791 fi
26792 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26793 done
26794 ac_cv_sizeof_bool=$ac_lo
26795 else
26796   if test "$cross_compiling" = yes; then
26797   { { echo "$as_me:26797: error: cannot run test program while cross compiling" >&5
26798 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26799    { (exit 1); exit 1; }; }
26800 else
26801   cat >"conftest.$ac_ext" <<_ACEOF
26802 #line 26802 "configure"
26803 #include "confdefs.h"
26804
26805 $ac_includes_default
26806
26807 #if defined(__cplusplus)
26808
26809 #ifdef HAVE_GXX_BUILTIN_H
26810 #include <g++/builtin.h>
26811 #elif HAVE_GPP_BUILTIN_H
26812 #include <gpp/builtin.h>
26813 #elif HAVE_BUILTIN_H
26814 #include <builtin.h>
26815 #endif
26816
26817 #else
26818
26819 #if $cf_cv_header_stdbool_h
26820 #include <stdbool.h>
26821 #endif
26822
26823 #endif
26824
26825 int
26826 main (void)
26827 {
26828 FILE *f = fopen ("conftest.val", "w");
26829 if (!f)
26830   $ac_main_return (1);
26831 fprintf (f, "%ld", (long)(sizeof (bool)));
26832 fclose (f);
26833   ;
26834   return 0;
26835 }
26836 _ACEOF
26837 rm -f "conftest$ac_exeext"
26838 if { (eval echo "$as_me:26838: \"$ac_link\"") >&5
26839   (eval $ac_link) 2>&5
26840   ac_status=$?
26841   echo "$as_me:26841: \$? = $ac_status" >&5
26842   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26843   { (eval echo "$as_me:26843: \"$ac_try\"") >&5
26844   (eval $ac_try) 2>&5
26845   ac_status=$?
26846   echo "$as_me:26846: \$? = $ac_status" >&5
26847   (exit "$ac_status"); }; }; then
26848   ac_cv_sizeof_bool=`cat conftest.val`
26849 else
26850   echo "$as_me: program exited with status $ac_status" >&5
26851 echo "$as_me: failed program was:" >&5
26852 cat "conftest.$ac_ext" >&5
26853 fi
26854 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26855 fi
26856 fi
26857 rm -f conftest.val
26858 else
26859   ac_cv_sizeof_bool=0
26860 fi
26861 fi
26862 echo "$as_me:26862: result: $ac_cv_sizeof_bool" >&5
26863 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26864 cat >>confdefs.h <<EOF
26865 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26866 EOF
26867
26868 echo "$as_me:26868: checking for type of bool" >&5
26869 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26870 if test "${cf_cv_type_of_bool+set}" = set; then
26871   echo $ECHO_N "(cached) $ECHO_C" >&6
26872 else
26873
26874         rm -f cf_test.out
26875         if test "$cross_compiling" = yes; then
26876
26877                 case x$ac_cv_sizeof_bool in
26878                 (x1) cf_cv_type_of_bool="unsigned char";;
26879                 (x2) cf_cv_type_of_bool="unsigned short";;
26880                 (x4) cf_cv_type_of_bool="unsigned int";;
26881                 (x8) cf_cv_type_of_bool="unsigned long";;
26882                 (*)  cf_cv_type_of_bool=unknown;;
26883                 esac
26884
26885 else
26886   cat >"conftest.$ac_ext" <<_ACEOF
26887 #line 26887 "configure"
26888 #include "confdefs.h"
26889
26890 $ac_includes_default
26891
26892 #if defined(__cplusplus)
26893
26894 #ifdef HAVE_GXX_BUILTIN_H
26895 #include <g++/builtin.h>
26896 #elif HAVE_GPP_BUILTIN_H
26897 #include <gpp/builtin.h>
26898 #elif HAVE_BUILTIN_H
26899 #include <builtin.h>
26900 #endif
26901
26902 #else
26903
26904 #if $cf_cv_header_stdbool_h
26905 #include <stdbool.h>
26906 #endif
26907
26908 #endif
26909
26910 int main(void)
26911 {
26912         FILE *fp = fopen("cf_test.out", "w");
26913         if (fp != 0) {
26914                 bool x = true;
26915                 if ((bool)(-x) >= 0)
26916                         fputs("unsigned ", fp);
26917                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26918                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26919                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26920                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26921                 fclose(fp);
26922         }
26923         ${cf_cv_main_return:-return}(0);
26924 }
26925
26926 _ACEOF
26927 rm -f "conftest$ac_exeext"
26928 if { (eval echo "$as_me:26928: \"$ac_link\"") >&5
26929   (eval $ac_link) 2>&5
26930   ac_status=$?
26931   echo "$as_me:26931: \$? = $ac_status" >&5
26932   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26933   { (eval echo "$as_me:26933: \"$ac_try\"") >&5
26934   (eval $ac_try) 2>&5
26935   ac_status=$?
26936   echo "$as_me:26936: \$? = $ac_status" >&5
26937   (exit "$ac_status"); }; }; then
26938   cf_cv_type_of_bool=`cat cf_test.out`
26939                  if test -z "$cf_cv_type_of_bool"; then
26940                    cf_cv_type_of_bool=unknown
26941                  fi
26942 else
26943   echo "$as_me: program exited with status $ac_status" >&5
26944 echo "$as_me: failed program was:" >&5
26945 cat "conftest.$ac_ext" >&5
26946 cf_cv_type_of_bool=unknown
26947 fi
26948 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26949 fi
26950         rm -f cf_test.out
26951
26952 fi
26953 echo "$as_me:26953: result: $cf_cv_type_of_bool" >&5
26954 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26955
26956 if test "$cf_cv_type_of_bool" = unknown ; then
26957         case .$NCURSES_BOOL in
26958         (.auto|.) NCURSES_BOOL=unsigned;;
26959         esac
26960         { echo "$as_me:26960: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26961 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26962         cf_cv_type_of_bool=$NCURSES_BOOL
26963 fi
26964
26965 echo "$as_me:26965: checking for special defines needed for etip.h" >&5
26966 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26967 cf_save_CXXFLAGS="$CXXFLAGS"
26968 cf_result="none"
26969
26970 # etip.h includes ncurses.h which includes ncurses_dll.h
26971 # But ncurses_dll.h is generated - fix here.
26972 test -d include || mkdir include
26973 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
26974
26975 for cf_math in "" MATH_H
26976 do
26977 for cf_excp in "" MATH_EXCEPTION
26978 do
26979         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26980         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26981         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26982 cat >"conftest.$ac_ext" <<_ACEOF
26983 #line 26983 "configure"
26984 #include "confdefs.h"
26985
26986 #include <etip.h.in>
26987
26988 int
26989 main (void)
26990 {
26991
26992   ;
26993   return 0;
26994 }
26995 _ACEOF
26996 rm -f "conftest.$ac_objext"
26997 if { (eval echo "$as_me:26997: \"$ac_compile\"") >&5
26998   (eval $ac_compile) 2>&5
26999   ac_status=$?
27000   echo "$as_me:27000: \$? = $ac_status" >&5
27001   (exit "$ac_status"); } &&
27002          { ac_try='test -s "conftest.$ac_objext"'
27003   { (eval echo "$as_me:27003: \"$ac_try\"") >&5
27004   (eval $ac_try) 2>&5
27005   ac_status=$?
27006   echo "$as_me:27006: \$? = $ac_status" >&5
27007   (exit "$ac_status"); }; }; then
27008
27009         test -n "$cf_math" && cat >>confdefs.h <<EOF
27010 #define ETIP_NEEDS_${cf_math} 1
27011 EOF
27012
27013         test -n "$cf_excp" && cat >>confdefs.h <<EOF
27014 #define ETIP_NEEDS_${cf_excp} 1
27015 EOF
27016
27017         cf_result="$cf_math $cf_excp"
27018         break 2
27019
27020 else
27021   echo "$as_me: failed program was:" >&5
27022 cat "conftest.$ac_ext" >&5
27023 fi
27024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27025 done
27026 done
27027 echo "$as_me:27027: result: ${cf_result:-(none)}" >&5
27028 echo "${ECHO_T}${cf_result:-(none)}" >&6
27029 CXXFLAGS="$cf_save_CXXFLAGS"
27030
27031 if test -n "$CXX"; then
27032 echo "$as_me:27032: checking if $CXX accepts override keyword" >&5
27033 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
27034 if test "${cf_cv_cpp_override+set}" = set; then
27035   echo $ECHO_N "(cached) $ECHO_C" >&6
27036 else
27037
27038         ac_ext=cc
27039 ac_cpp='$CXXCPP $CPPFLAGS'
27040 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27041 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27042 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27043 ac_main_return="return"
27044
27045         if test "$cross_compiling" = yes; then
27046   cf_cv_cpp_override=unknown
27047 else
27048   cat >"conftest.$ac_ext" <<_ACEOF
27049 #line 27049 "configure"
27050 #include "confdefs.h"
27051
27052 class base
27053 {
27054 public:
27055         virtual int foo(float x) = 0;
27056 };
27057
27058 class derived: public base
27059 {
27060 public:
27061         int foo(float x) override { return x != 0.0 ? 1 : 0; }
27062 };
27063
27064 int main(void) { }
27065
27066 _ACEOF
27067 rm -f "conftest$ac_exeext"
27068 if { (eval echo "$as_me:27068: \"$ac_link\"") >&5
27069   (eval $ac_link) 2>&5
27070   ac_status=$?
27071   echo "$as_me:27071: \$? = $ac_status" >&5
27072   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27073   { (eval echo "$as_me:27073: \"$ac_try\"") >&5
27074   (eval $ac_try) 2>&5
27075   ac_status=$?
27076   echo "$as_me:27076: \$? = $ac_status" >&5
27077   (exit "$ac_status"); }; }; then
27078   cf_cv_cpp_override=yes
27079 else
27080   echo "$as_me: program exited with status $ac_status" >&5
27081 echo "$as_me: failed program was:" >&5
27082 cat "conftest.$ac_ext" >&5
27083 cf_cv_cpp_override=no
27084 fi
27085 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27086 fi
27087         ac_ext=cc
27088 ac_cpp='$CXXCPP $CPPFLAGS'
27089 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27090 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27091 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27092 ac_main_return="return"
27093
27094 fi
27095 echo "$as_me:27095: result: $cf_cv_cpp_override" >&5
27096 echo "${ECHO_T}$cf_cv_cpp_override" >&6
27097 fi
27098 test "$cf_cv_cpp_override" = yes &&
27099 cat >>confdefs.h <<\EOF
27100 #define CPP_HAS_OVERRIDE 1
27101 EOF
27102
27103 if test -n "$CXX"; then
27104 echo "$as_me:27104: checking if $CXX accepts parameter initialization" >&5
27105 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
27106 if test "${cf_cv_cpp_param_init+set}" = set; then
27107   echo $ECHO_N "(cached) $ECHO_C" >&6
27108 else
27109
27110         ac_ext=cc
27111 ac_cpp='$CXXCPP $CPPFLAGS'
27112 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27113 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27114 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27115 ac_main_return="return"
27116
27117         if test "$cross_compiling" = yes; then
27118   cf_cv_cpp_param_init=unknown
27119 else
27120   cat >"conftest.$ac_ext" <<_ACEOF
27121 #line 27121 "configure"
27122 #include "confdefs.h"
27123
27124 class TEST {
27125 private:
27126         int value;
27127 public:
27128         TEST(int x = 1);
27129         ~TEST();
27130 };
27131
27132 TEST::TEST(int x = 1)   // some compilers do not like second initializer
27133 {
27134         value = x;
27135 }
27136 int main(void) { }
27137
27138 _ACEOF
27139 rm -f "conftest$ac_exeext"
27140 if { (eval echo "$as_me:27140: \"$ac_link\"") >&5
27141   (eval $ac_link) 2>&5
27142   ac_status=$?
27143   echo "$as_me:27143: \$? = $ac_status" >&5
27144   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27145   { (eval echo "$as_me:27145: \"$ac_try\"") >&5
27146   (eval $ac_try) 2>&5
27147   ac_status=$?
27148   echo "$as_me:27148: \$? = $ac_status" >&5
27149   (exit "$ac_status"); }; }; then
27150   cf_cv_cpp_param_init=yes
27151 else
27152   echo "$as_me: program exited with status $ac_status" >&5
27153 echo "$as_me: failed program was:" >&5
27154 cat "conftest.$ac_ext" >&5
27155 cf_cv_cpp_param_init=no
27156 fi
27157 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27158 fi
27159         ac_ext=cc
27160 ac_cpp='$CXXCPP $CPPFLAGS'
27161 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27162 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27163 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27164 ac_main_return="return"
27165
27166 fi
27167 echo "$as_me:27167: result: $cf_cv_cpp_param_init" >&5
27168 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
27169 fi
27170 test "$cf_cv_cpp_param_init" = yes &&
27171 cat >>confdefs.h <<\EOF
27172 #define CPP_HAS_PARAM_INIT 1
27173 EOF
27174
27175 if test -n "$CXX"; then
27176
27177 echo "$as_me:27177: checking if $CXX accepts static_cast" >&5
27178 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
27179 if test "${cf_cv_cpp_static_cast+set}" = set; then
27180   echo $ECHO_N "(cached) $ECHO_C" >&6
27181 else
27182
27183         ac_ext=cc
27184 ac_cpp='$CXXCPP $CPPFLAGS'
27185 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27186 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27187 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27188 ac_main_return="return"
27189
27190         cat >"conftest.$ac_ext" <<_ACEOF
27191 #line 27191 "configure"
27192 #include "confdefs.h"
27193
27194 class NCursesPanel
27195 {
27196 public:
27197   NCursesPanel(int nlines,
27198                int ncols,
27199                int begin_y = 0,
27200                int begin_x = 0)
27201   {
27202   }
27203   NCursesPanel();
27204   ~NCursesPanel();
27205 };
27206
27207 template<class T> class NCursesUserPanel : public NCursesPanel
27208 {
27209 public:
27210   NCursesUserPanel (int nlines,
27211                     int ncols,
27212                     int begin_y = 0,
27213                     int begin_x = 0,
27214                     const T* p_UserData = static_cast<T*>(0))
27215     : NCursesPanel (nlines, ncols, begin_y, begin_x)
27216   {
27217   };
27218   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
27219   {
27220   };
27221
27222   virtual ~NCursesUserPanel() {};
27223 };
27224
27225 int
27226 main (void)
27227 {
27228
27229         const char* p_UserData = static_cast<char*>(0)
27230   ;
27231   return 0;
27232 }
27233 _ACEOF
27234 rm -f "conftest.$ac_objext"
27235 if { (eval echo "$as_me:27235: \"$ac_compile\"") >&5
27236   (eval $ac_compile) 2>&5
27237   ac_status=$?
27238   echo "$as_me:27238: \$? = $ac_status" >&5
27239   (exit "$ac_status"); } &&
27240          { ac_try='test -s "conftest.$ac_objext"'
27241   { (eval echo "$as_me:27241: \"$ac_try\"") >&5
27242   (eval $ac_try) 2>&5
27243   ac_status=$?
27244   echo "$as_me:27244: \$? = $ac_status" >&5
27245   (exit "$ac_status"); }; }; then
27246   cf_cv_cpp_static_cast=yes
27247 else
27248   echo "$as_me: failed program was:" >&5
27249 cat "conftest.$ac_ext" >&5
27250 cf_cv_cpp_static_cast=no
27251 fi
27252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27253
27254         ac_ext=cc
27255 ac_cpp='$CXXCPP $CPPFLAGS'
27256 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
27257 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
27258 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
27259 ac_main_return="return"
27260
27261 fi
27262 echo "$as_me:27262: result: $cf_cv_cpp_static_cast" >&5
27263 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
27264
27265 fi
27266
27267 test "$cf_cv_cpp_static_cast" = yes &&
27268 cat >>confdefs.h <<\EOF
27269 #define CPP_HAS_STATIC_CAST 1
27270 EOF
27271
27272         CXX_AR='$(AR)'
27273         CXX_ARFLAGS='$(ARFLAGS)'
27274         case "$cf_cv_system_name" in
27275         (irix*)
27276             if test "$GXX" != yes ; then
27277                 CXX_AR='$(CXX)'
27278                 CXX_ARFLAGS='-ar -o'
27279             fi
27280             ;;
27281         (sco3.2v5*)
27282             CXXLDFLAGS="-u main"
27283             ;;
27284         (solaris2*)
27285             if test "$GXX" != yes ; then
27286                 CXX_AR='$(CXX)'
27287                 CXX_ARFLAGS='-xar -o'
27288             fi
27289             ;;
27290         esac
27291
27292 else
27293         cf_cxx_library=no
27294         cf_cv_builtin_bool=1
27295
27296         # Just because we are not configuring against C++ right now does not
27297         # mean that a user will not want to use C++.  Some distributors disable
27298         # the C++ portion of this configuration as a shortcut (or just to avoid
27299         # compiling the demo in the c++ directory).  So we need a reasonable
27300         # default for the 'bool' type.
27301         #
27302         # Caveat: since the storage of the bool type is not standardized, it
27303         # may change.
27304
27305         if test "$NCURSES_BOOL" != auto ; then
27306                 cf_cv_type_of_bool=$NCURSES_BOOL
27307                 cf_cv_header_stdbool_h=0
27308         else
27309                 if test "$cf_cv_header_stdbool_h" = 1 ; then
27310
27311 echo "$as_me:27311: checking for bool" >&5
27312 echo $ECHO_N "checking for bool... $ECHO_C" >&6
27313 if test "${ac_cv_type_bool+set}" = set; then
27314   echo $ECHO_N "(cached) $ECHO_C" >&6
27315 else
27316   cat >"conftest.$ac_ext" <<_ACEOF
27317 #line 27317 "configure"
27318 #include "confdefs.h"
27319
27320 $ac_includes_default
27321
27322 #if defined(__cplusplus)
27323
27324 #ifdef HAVE_GXX_BUILTIN_H
27325 #include <g++/builtin.h>
27326 #elif HAVE_GPP_BUILTIN_H
27327 #include <gpp/builtin.h>
27328 #elif HAVE_BUILTIN_H
27329 #include <builtin.h>
27330 #endif
27331
27332 #else
27333
27334 #if $cf_cv_header_stdbool_h
27335 #include <stdbool.h>
27336 #endif
27337
27338 #endif
27339
27340 int
27341 main (void)
27342 {
27343 if ((bool *) 0)
27344   return 0;
27345 if (sizeof (bool))
27346   return 0;
27347   ;
27348   return 0;
27349 }
27350 _ACEOF
27351 rm -f "conftest.$ac_objext"
27352 if { (eval echo "$as_me:27352: \"$ac_compile\"") >&5
27353   (eval $ac_compile) 2>&5
27354   ac_status=$?
27355   echo "$as_me:27355: \$? = $ac_status" >&5
27356   (exit "$ac_status"); } &&
27357          { ac_try='test -s "conftest.$ac_objext"'
27358   { (eval echo "$as_me:27358: \"$ac_try\"") >&5
27359   (eval $ac_try) 2>&5
27360   ac_status=$?
27361   echo "$as_me:27361: \$? = $ac_status" >&5
27362   (exit "$ac_status"); }; }; then
27363   ac_cv_type_bool=yes
27364 else
27365   echo "$as_me: failed program was:" >&5
27366 cat "conftest.$ac_ext" >&5
27367 ac_cv_type_bool=no
27368 fi
27369 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27370 fi
27371 echo "$as_me:27371: result: $ac_cv_type_bool" >&5
27372 echo "${ECHO_T}$ac_cv_type_bool" >&6
27373
27374 echo "$as_me:27374: checking size of bool" >&5
27375 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
27376 if test "${ac_cv_sizeof_bool+set}" = set; then
27377   echo $ECHO_N "(cached) $ECHO_C" >&6
27378 else
27379   if test "$ac_cv_type_bool" = yes; then
27380   if test "$cross_compiling" = yes; then
27381   # Depending upon the size, compute the lo and hi bounds.
27382 cat >"conftest.$ac_ext" <<_ACEOF
27383 #line 27383 "configure"
27384 #include "confdefs.h"
27385
27386 $ac_includes_default
27387
27388 #if defined(__cplusplus)
27389
27390 #ifdef HAVE_GXX_BUILTIN_H
27391 #include <g++/builtin.h>
27392 #elif HAVE_GPP_BUILTIN_H
27393 #include <gpp/builtin.h>
27394 #elif HAVE_BUILTIN_H
27395 #include <builtin.h>
27396 #endif
27397
27398 #else
27399
27400 #if $cf_cv_header_stdbool_h
27401 #include <stdbool.h>
27402 #endif
27403
27404 #endif
27405
27406 int
27407 main (void)
27408 {
27409 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
27410   ;
27411   return 0;
27412 }
27413 _ACEOF
27414 rm -f "conftest.$ac_objext"
27415 if { (eval echo "$as_me:27415: \"$ac_compile\"") >&5
27416   (eval $ac_compile) 2>&5
27417   ac_status=$?
27418   echo "$as_me:27418: \$? = $ac_status" >&5
27419   (exit "$ac_status"); } &&
27420          { ac_try='test -s "conftest.$ac_objext"'
27421   { (eval echo "$as_me:27421: \"$ac_try\"") >&5
27422   (eval $ac_try) 2>&5
27423   ac_status=$?
27424   echo "$as_me:27424: \$? = $ac_status" >&5
27425   (exit "$ac_status"); }; }; then
27426   ac_lo=0 ac_mid=0
27427   while :; do
27428     cat >"conftest.$ac_ext" <<_ACEOF
27429 #line 27429 "configure"
27430 #include "confdefs.h"
27431
27432 $ac_includes_default
27433
27434 #if defined(__cplusplus)
27435
27436 #ifdef HAVE_GXX_BUILTIN_H
27437 #include <g++/builtin.h>
27438 #elif HAVE_GPP_BUILTIN_H
27439 #include <gpp/builtin.h>
27440 #elif HAVE_BUILTIN_H
27441 #include <builtin.h>
27442 #endif
27443
27444 #else
27445
27446 #if $cf_cv_header_stdbool_h
27447 #include <stdbool.h>
27448 #endif
27449
27450 #endif
27451
27452 int
27453 main (void)
27454 {
27455 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27456   ;
27457   return 0;
27458 }
27459 _ACEOF
27460 rm -f "conftest.$ac_objext"
27461 if { (eval echo "$as_me:27461: \"$ac_compile\"") >&5
27462   (eval $ac_compile) 2>&5
27463   ac_status=$?
27464   echo "$as_me:27464: \$? = $ac_status" >&5
27465   (exit "$ac_status"); } &&
27466          { ac_try='test -s "conftest.$ac_objext"'
27467   { (eval echo "$as_me:27467: \"$ac_try\"") >&5
27468   (eval $ac_try) 2>&5
27469   ac_status=$?
27470   echo "$as_me:27470: \$? = $ac_status" >&5
27471   (exit "$ac_status"); }; }; then
27472   ac_hi=$ac_mid; break
27473 else
27474   echo "$as_me: failed program was:" >&5
27475 cat "conftest.$ac_ext" >&5
27476 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27477 fi
27478 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27479   done
27480 else
27481   echo "$as_me: failed program was:" >&5
27482 cat "conftest.$ac_ext" >&5
27483 ac_hi=-1 ac_mid=-1
27484   while :; do
27485     cat >"conftest.$ac_ext" <<_ACEOF
27486 #line 27486 "configure"
27487 #include "confdefs.h"
27488
27489 $ac_includes_default
27490
27491 #if defined(__cplusplus)
27492
27493 #ifdef HAVE_GXX_BUILTIN_H
27494 #include <g++/builtin.h>
27495 #elif HAVE_GPP_BUILTIN_H
27496 #include <gpp/builtin.h>
27497 #elif HAVE_BUILTIN_H
27498 #include <builtin.h>
27499 #endif
27500
27501 #else
27502
27503 #if $cf_cv_header_stdbool_h
27504 #include <stdbool.h>
27505 #endif
27506
27507 #endif
27508
27509 int
27510 main (void)
27511 {
27512 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27513   ;
27514   return 0;
27515 }
27516 _ACEOF
27517 rm -f "conftest.$ac_objext"
27518 if { (eval echo "$as_me:27518: \"$ac_compile\"") >&5
27519   (eval $ac_compile) 2>&5
27520   ac_status=$?
27521   echo "$as_me:27521: \$? = $ac_status" >&5
27522   (exit "$ac_status"); } &&
27523          { ac_try='test -s "conftest.$ac_objext"'
27524   { (eval echo "$as_me:27524: \"$ac_try\"") >&5
27525   (eval $ac_try) 2>&5
27526   ac_status=$?
27527   echo "$as_me:27527: \$? = $ac_status" >&5
27528   (exit "$ac_status"); }; }; then
27529   ac_lo=$ac_mid; break
27530 else
27531   echo "$as_me: failed program was:" >&5
27532 cat "conftest.$ac_ext" >&5
27533 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27534 fi
27535 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27536   done
27537 fi
27538 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27539 # Binary search between lo and hi bounds.
27540 while test "x$ac_lo" != "x$ac_hi"; do
27541   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27542   cat >"conftest.$ac_ext" <<_ACEOF
27543 #line 27543 "configure"
27544 #include "confdefs.h"
27545
27546 $ac_includes_default
27547
27548 #if defined(__cplusplus)
27549
27550 #ifdef HAVE_GXX_BUILTIN_H
27551 #include <g++/builtin.h>
27552 #elif HAVE_GPP_BUILTIN_H
27553 #include <gpp/builtin.h>
27554 #elif HAVE_BUILTIN_H
27555 #include <builtin.h>
27556 #endif
27557
27558 #else
27559
27560 #if $cf_cv_header_stdbool_h
27561 #include <stdbool.h>
27562 #endif
27563
27564 #endif
27565
27566 int
27567 main (void)
27568 {
27569 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27570   ;
27571   return 0;
27572 }
27573 _ACEOF
27574 rm -f "conftest.$ac_objext"
27575 if { (eval echo "$as_me:27575: \"$ac_compile\"") >&5
27576   (eval $ac_compile) 2>&5
27577   ac_status=$?
27578   echo "$as_me:27578: \$? = $ac_status" >&5
27579   (exit "$ac_status"); } &&
27580          { ac_try='test -s "conftest.$ac_objext"'
27581   { (eval echo "$as_me:27581: \"$ac_try\"") >&5
27582   (eval $ac_try) 2>&5
27583   ac_status=$?
27584   echo "$as_me:27584: \$? = $ac_status" >&5
27585   (exit "$ac_status"); }; }; then
27586   ac_hi=$ac_mid
27587 else
27588   echo "$as_me: failed program was:" >&5
27589 cat "conftest.$ac_ext" >&5
27590 ac_lo=`expr "$ac_mid" + 1`
27591 fi
27592 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27593 done
27594 ac_cv_sizeof_bool=$ac_lo
27595 else
27596   if test "$cross_compiling" = yes; then
27597   { { echo "$as_me:27597: error: cannot run test program while cross compiling" >&5
27598 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27599    { (exit 1); exit 1; }; }
27600 else
27601   cat >"conftest.$ac_ext" <<_ACEOF
27602 #line 27602 "configure"
27603 #include "confdefs.h"
27604
27605 $ac_includes_default
27606
27607 #if defined(__cplusplus)
27608
27609 #ifdef HAVE_GXX_BUILTIN_H
27610 #include <g++/builtin.h>
27611 #elif HAVE_GPP_BUILTIN_H
27612 #include <gpp/builtin.h>
27613 #elif HAVE_BUILTIN_H
27614 #include <builtin.h>
27615 #endif
27616
27617 #else
27618
27619 #if $cf_cv_header_stdbool_h
27620 #include <stdbool.h>
27621 #endif
27622
27623 #endif
27624
27625 int
27626 main (void)
27627 {
27628 FILE *f = fopen ("conftest.val", "w");
27629 if (!f)
27630   $ac_main_return (1);
27631 fprintf (f, "%ld", (long)(sizeof (bool)));
27632 fclose (f);
27633   ;
27634   return 0;
27635 }
27636 _ACEOF
27637 rm -f "conftest$ac_exeext"
27638 if { (eval echo "$as_me:27638: \"$ac_link\"") >&5
27639   (eval $ac_link) 2>&5
27640   ac_status=$?
27641   echo "$as_me:27641: \$? = $ac_status" >&5
27642   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27643   { (eval echo "$as_me:27643: \"$ac_try\"") >&5
27644   (eval $ac_try) 2>&5
27645   ac_status=$?
27646   echo "$as_me:27646: \$? = $ac_status" >&5
27647   (exit "$ac_status"); }; }; then
27648   ac_cv_sizeof_bool=`cat conftest.val`
27649 else
27650   echo "$as_me: program exited with status $ac_status" >&5
27651 echo "$as_me: failed program was:" >&5
27652 cat "conftest.$ac_ext" >&5
27653 fi
27654 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27655 fi
27656 fi
27657 rm -f conftest.val
27658 else
27659   ac_cv_sizeof_bool=0
27660 fi
27661 fi
27662 echo "$as_me:27662: result: $ac_cv_sizeof_bool" >&5
27663 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27664 cat >>confdefs.h <<EOF
27665 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27666 EOF
27667
27668 echo "$as_me:27668: checking for type of bool" >&5
27669 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27670 if test "${cf_cv_type_of_bool+set}" = set; then
27671   echo $ECHO_N "(cached) $ECHO_C" >&6
27672 else
27673
27674         rm -f cf_test.out
27675         if test "$cross_compiling" = yes; then
27676
27677                 case x$ac_cv_sizeof_bool in
27678                 (x1) cf_cv_type_of_bool="unsigned char";;
27679                 (x2) cf_cv_type_of_bool="unsigned short";;
27680                 (x4) cf_cv_type_of_bool="unsigned int";;
27681                 (x8) cf_cv_type_of_bool="unsigned long";;
27682                 (*)  cf_cv_type_of_bool=unknown;;
27683                 esac
27684
27685 else
27686   cat >"conftest.$ac_ext" <<_ACEOF
27687 #line 27687 "configure"
27688 #include "confdefs.h"
27689
27690 $ac_includes_default
27691
27692 #if defined(__cplusplus)
27693
27694 #ifdef HAVE_GXX_BUILTIN_H
27695 #include <g++/builtin.h>
27696 #elif HAVE_GPP_BUILTIN_H
27697 #include <gpp/builtin.h>
27698 #elif HAVE_BUILTIN_H
27699 #include <builtin.h>
27700 #endif
27701
27702 #else
27703
27704 #if $cf_cv_header_stdbool_h
27705 #include <stdbool.h>
27706 #endif
27707
27708 #endif
27709
27710 int main(void)
27711 {
27712         FILE *fp = fopen("cf_test.out", "w");
27713         if (fp != 0) {
27714                 bool x = true;
27715                 if ((bool)(-x) >= 0)
27716                         fputs("unsigned ", fp);
27717                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27718                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27719                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27720                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27721                 fclose(fp);
27722         }
27723         ${cf_cv_main_return:-return}(0);
27724 }
27725
27726 _ACEOF
27727 rm -f "conftest$ac_exeext"
27728 if { (eval echo "$as_me:27728: \"$ac_link\"") >&5
27729   (eval $ac_link) 2>&5
27730   ac_status=$?
27731   echo "$as_me:27731: \$? = $ac_status" >&5
27732   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27733   { (eval echo "$as_me:27733: \"$ac_try\"") >&5
27734   (eval $ac_try) 2>&5
27735   ac_status=$?
27736   echo "$as_me:27736: \$? = $ac_status" >&5
27737   (exit "$ac_status"); }; }; then
27738   cf_cv_type_of_bool=`cat cf_test.out`
27739                  if test -z "$cf_cv_type_of_bool"; then
27740                    cf_cv_type_of_bool=unknown
27741                  fi
27742 else
27743   echo "$as_me: program exited with status $ac_status" >&5
27744 echo "$as_me: failed program was:" >&5
27745 cat "conftest.$ac_ext" >&5
27746 cf_cv_type_of_bool=unknown
27747 fi
27748 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27749 fi
27750         rm -f cf_test.out
27751
27752 fi
27753 echo "$as_me:27753: result: $cf_cv_type_of_bool" >&5
27754 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27755
27756 if test "$cf_cv_type_of_bool" = unknown ; then
27757         case .$NCURSES_BOOL in
27758         (.auto|.) NCURSES_BOOL=unsigned;;
27759         esac
27760         { echo "$as_me:27760: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27761 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27762         cf_cv_type_of_bool=$NCURSES_BOOL
27763 fi
27764
27765                 else
27766                         echo "$as_me:27766: checking for fallback type of bool" >&5
27767 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27768                         case "$host_cpu" in
27769                         (i?86)  cf_cv_type_of_bool=char ;;
27770                         (*)     cf_cv_type_of_bool=int  ;;
27771                         esac
27772                         echo "$as_me:27772: result: $cf_cv_type_of_bool" >&5
27773 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27774                 fi
27775         fi
27776 fi
27777
27778 # If the C compiler did not declare bool, and we did not determine that the C++
27779 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27780 # ncurses library use the same type as C++ bool.  Note that this allows one to
27781 # specify the type of bool in a configure-script option and postpone
27782 # integration with the C++ compiler provided that the types are compatible.
27783 USE_CXX_BOOL=1
27784 if test "$cf_cv_cc_bool_type" = 1
27785 then
27786         # oops: C has a bool.  Unlikely, but C++ could differ.
27787         USE_CXX_BOOL=0
27788 elif test "$cf_cv_builtin_bool" = 0
27789 then
27790         # C++ has no bool
27791         USE_CXX_BOOL=0
27792 else
27793         # this is the normal case
27794         USE_CXX_BOOL='defined(__cplusplus)'
27795 fi
27796
27797 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27798
27799         if test "$cf_with_ada" != "no" ; then
27800                 if test "$with_libtool" != "no"; then
27801                         { echo "$as_me:27801: WARNING: libtool does not support Ada - disabling feature" >&5
27802 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27803                         cf_with_ada=no
27804                 fi
27805         fi
27806
27807         if test "$cf_with_ada" != "no" ; then
27808                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27809
27810         ADAFLAGS="$ADAFLAGS -gnatpn"
27811
27812         echo "$as_me:27812: checking optimization options for ADAFLAGS" >&5
27813 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27814         case "$CFLAGS" in
27815         (*-g*)
27816
27817         ADAFLAGS="$ADAFLAGS -g"
27818
27819                 ;;
27820         esac
27821         case "$CFLAGS" in
27822         (*-O*)
27823                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27824
27825         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27826
27827                 ;;
27828         esac
27829         echo "$as_me:27829: result: $ADAFLAGS" >&5
27830 echo "${ECHO_T}$ADAFLAGS" >&6
27831
27832 echo "$as_me:27832: checking if GNATPREP supports -T option" >&5
27833 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27834 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27835   echo $ECHO_N "(cached) $ECHO_C" >&6
27836 else
27837
27838 cf_cv_gnatprep_opt_t=no
27839 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27840
27841 fi
27842 echo "$as_me:27842: result: $cf_cv_gnatprep_opt_t" >&5
27843 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27844 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27845
27846 echo "$as_me:27846: checking if GNAT supports generics" >&5
27847 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27848 case "$cf_cv_gnat_version" in
27849 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27850         cf_gnat_generics=yes
27851         ;;
27852 (*)
27853         cf_gnat_generics=no
27854         ;;
27855 esac
27856 echo "$as_me:27856: result: $cf_gnat_generics" >&5
27857 echo "${ECHO_T}$cf_gnat_generics" >&6
27858
27859 if test "$cf_gnat_generics" = yes
27860 then
27861         cf_compile_generics=generics
27862         cf_generic_objects="\${GENOBJS}"
27863 else
27864         cf_compile_generics=
27865         cf_generic_objects=
27866 fi
27867
27868 echo "$as_me:27868: checking if GNAT supports SIGINT" >&5
27869 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27870 if test "${cf_cv_gnat_sigint+set}" = set; then
27871   echo $ECHO_N "(cached) $ECHO_C" >&6
27872 else
27873
27874 rm -rf ./conftest* ./*~conftest*
27875 cat >>conftest.ads <<CF_EOF
27876 with Ada.Interrupts.Names;
27877
27878 package ConfTest is
27879
27880    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27881    pragma Unreserve_All_Interrupts;
27882    pragma Warnings (On);
27883
27884    protected Process is
27885       procedure Stop;
27886       function Continue return Boolean;
27887       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27888    private
27889       Done : Boolean := False;
27890    end Process;
27891
27892 end ConfTest;
27893 CF_EOF
27894 cat >>conftest.adb <<CF_EOF
27895 package body ConfTest is
27896    protected body Process is
27897       procedure Stop is
27898       begin
27899          Done := True;
27900       end Stop;
27901       function Continue return Boolean is
27902       begin
27903          return not Done;
27904       end Continue;
27905    end Process;
27906 end ConfTest;
27907 CF_EOF
27908 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27909       cf_cv_gnat_sigint=yes
27910 else
27911    cf_cv_gnat_sigint=no
27912 fi
27913 rm -rf ./conftest* ./*~conftest*
27914
27915 fi
27916 echo "$as_me:27916: result: $cf_cv_gnat_sigint" >&5
27917 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27918
27919 if test "$cf_cv_gnat_sigint" = yes ; then
27920         USE_GNAT_SIGINT=""
27921 else
27922         USE_GNAT_SIGINT="#"
27923 fi
27924
27925 cf_gnat_libraries=no
27926 cf_gnat_projects=no
27927
27928 if test "$enable_gnat_projects" != no ; then
27929 echo "$as_me:27929: checking if GNAT supports project files" >&5
27930 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27931 case "$cf_cv_gnat_version" in
27932 (3.[0-9]*)
27933         ;;
27934 (*)
27935         case "$cf_cv_system_name" in
27936         (cygwin*|msys*)
27937                 ;;
27938         (*)
27939                 rm -rf ./conftest* ./*~conftest*
27940                 if mkdir conftest.src conftest.bin conftest.lib
27941                 then
27942                         cd conftest.src
27943                         rm -rf ./conftest* ./*~conftest*
27944                         cat >>library.gpr <<CF_EOF
27945 project Library is
27946   Kind := External ("LIB_KIND");
27947   for Library_Name use "ConfTest";
27948   for Object_Dir use ".";
27949   for Library_ALI_Dir use External("LIBRARY_DIR");
27950   for Library_Version use External ("SONAME");
27951   for Library_Kind use Kind;
27952   for Library_Dir use External("BUILD_DIR");
27953   Source_Dir := External ("SOURCE_DIR");
27954   for Source_Dirs use (Source_Dir);
27955 end Library;
27956 CF_EOF
27957                         cat >>confpackage.ads <<CF_EOF
27958 package ConfPackage is
27959    procedure conftest;
27960 end ConfPackage;
27961 CF_EOF
27962                         cat >>confpackage.adb <<CF_EOF
27963 with Text_IO;
27964 package body ConfPackage is
27965    procedure conftest is
27966    begin
27967       Text_IO.Put ("Hello World");
27968       Text_IO.New_Line;
27969    end conftest;
27970 end ConfPackage;
27971 CF_EOF
27972                         if ( "$cf_ada_make" $ADAFLAGS \
27973                                         -Plibrary.gpr \
27974                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27975                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27976                                         -XSOURCE_DIR="`pwd`" \
27977                                         -XSONAME=libConfTest.so.1 \
27978                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27979                                 cf_gnat_projects=yes
27980                         fi
27981                         cd ..
27982                 fi
27983                 if test -f conftest.lib/confpackage.ali
27984                 then
27985                         cf_gnat_libraries=yes
27986                 fi
27987                 rm -rf ./conftest* ./*~conftest*
27988                 ;;
27989         esac
27990         ;;
27991 esac
27992 echo "$as_me:27992: result: $cf_gnat_projects" >&5
27993 echo "${ECHO_T}$cf_gnat_projects" >&6
27994 fi # enable_gnat_projects
27995
27996 if test "$cf_gnat_projects" = yes
27997 then
27998         echo "$as_me:27998: checking if GNAT supports libraries" >&5
27999 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
28000         echo "$as_me:28000: result: $cf_gnat_libraries" >&5
28001 echo "${ECHO_T}$cf_gnat_libraries" >&6
28002 fi
28003
28004 USE_OLD_MAKERULES=""
28005 USE_GNAT_PROJECTS="#"
28006 USE_GNAT_MAKE_GPR="#"
28007 USE_GNAT_GPRBUILD="#"
28008
28009 if test "$cf_gnat_projects" = yes
28010 then
28011         USE_OLD_MAKERULES="#"
28012         USE_GNAT_PROJECTS=""
28013         if test "$cf_cv_VERSION_GPRBUILD" != no
28014         then
28015                 USE_GNAT_GPRBUILD=""
28016         elif test "$cf_cv_VERSION_GNATMAKE" != no
28017         then
28018                 USE_GNAT_MAKE_GPR=""
28019         else
28020                 { echo "$as_me:28020: WARNING: use old makefile rules since tools are missing" >&5
28021 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
28022         fi
28023 fi
28024
28025 if test "$cf_gnat_libraries" = yes
28026 then
28027         USE_GNAT_LIBRARIES=""
28028 else
28029         USE_GNAT_LIBRARIES="#"
28030 fi
28031
28032 echo "$as_me:28032: checking for Ada95 compiler" >&5
28033 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
28034
28035 # Check whether --with-ada-compiler or --without-ada-compiler was given.
28036 if test "${with_ada_compiler+set}" = set; then
28037   withval="$with_ada_compiler"
28038   cf_ada_compiler=$withval
28039 else
28040   cf_ada_compiler=gnatmake
28041 fi;
28042
28043 echo "$as_me:28043: result: $cf_ada_compiler" >&5
28044 echo "${ECHO_T}$cf_ada_compiler" >&6
28045
28046                         cf_ada_package=terminal_interface
28047
28048 echo "$as_me:28048: checking for Ada95 include directory" >&5
28049 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
28050
28051 # Check whether --with-ada-include or --without-ada-include was given.
28052 if test "${with_ada_include+set}" = set; then
28053   withval="$with_ada_include"
28054
28055 else
28056   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
28057 fi; if test -n "$prefix/share/ada/adainclude" ; then
28058
28059 if test "x$prefix" != xNONE; then
28060         cf_path_syntax="$prefix"
28061 else
28062         cf_path_syntax="$ac_default_prefix"
28063 fi
28064
28065 case ".$withval" in
28066 (.\$\(*\)*|.\'*\'*)
28067         ;;
28068 (..|./*|.\\*)
28069         ;;
28070 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
28071         ;;
28072 (.\$\{*prefix\}*|.\$\{*dir\}*)
28073         eval withval="$withval"
28074         case ".$withval" in
28075         (.NONE/*)
28076                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28077                 ;;
28078         esac
28079         ;;
28080 (.no|.NONE/*)
28081         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28082         ;;
28083 (*)
28084         { { echo "$as_me:28084: error: expected a pathname, not \"$withval\"" >&5
28085 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28086    { (exit 1); exit 1; }; }
28087         ;;
28088 esac
28089
28090 fi
28091 eval ADA_INCLUDE="$withval"
28092
28093 echo "$as_me:28093: result: $ADA_INCLUDE" >&5
28094 echo "${ECHO_T}$ADA_INCLUDE" >&6
28095
28096 echo "$as_me:28096: checking for Ada95 object directory" >&5
28097 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
28098
28099 # Check whether --with-ada-objects or --without-ada-objects was given.
28100 if test "${with_ada_objects+set}" = set; then
28101   withval="$with_ada_objects"
28102
28103 else
28104   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
28105 fi; if test -n "$prefix/lib/ada/adalib" ; then
28106
28107 if test "x$prefix" != xNONE; then
28108         cf_path_syntax="$prefix"
28109 else
28110         cf_path_syntax="$ac_default_prefix"
28111 fi
28112
28113 case ".$withval" in
28114 (.\$\(*\)*|.\'*\'*)
28115         ;;
28116 (..|./*|.\\*)
28117         ;;
28118 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
28119         ;;
28120 (.\$\{*prefix\}*|.\$\{*dir\}*)
28121         eval withval="$withval"
28122         case ".$withval" in
28123         (.NONE/*)
28124                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28125                 ;;
28126         esac
28127         ;;
28128 (.no|.NONE/*)
28129         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
28130         ;;
28131 (*)
28132         { { echo "$as_me:28132: error: expected a pathname, not \"$withval\"" >&5
28133 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
28134    { (exit 1); exit 1; }; }
28135         ;;
28136 esac
28137
28138 fi
28139 eval ADA_OBJECTS="$withval"
28140
28141 echo "$as_me:28141: result: $ADA_OBJECTS" >&5
28142 echo "${ECHO_T}$ADA_OBJECTS" >&6
28143
28144 echo "$as_me:28144: checking whether to build an Ada95 shared library" >&5
28145 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
28146
28147 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
28148 if test "${with_ada_sharedlib+set}" = set; then
28149   withval="$with_ada_sharedlib"
28150   with_ada_sharedlib=$withval
28151 else
28152   with_ada_sharedlib=no
28153 fi;
28154 cf_ada_sharedlib_warn=no
28155
28156 if test "x$with_ada_sharedlib" != xno
28157 then
28158         if test "x$cf_gnat_projects" != xyes
28159         then
28160                 with_ada_sharedlib=no
28161                 cf_ada_sharedlib_warn=yes
28162         fi
28163 fi
28164
28165 echo "$as_me:28165: result: $with_ada_sharedlib" >&5
28166 echo "${ECHO_T}$with_ada_sharedlib" >&6
28167 if test "x$cf_ada_sharedlib_warn" != xno
28168 then
28169         { echo "$as_me:28169: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
28170 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
28171 fi
28172
28173 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
28174 MAKE_ADA_SHAREDLIB="#"
28175
28176 if test "x$with_ada_sharedlib" != xno
28177 then
28178         MAKE_ADA_SHAREDLIB=
28179         if test "x$with_ada_sharedlib" != xyes
28180         then
28181                 ADA_SHAREDLIB="$with_ada_sharedlib"
28182         fi
28183 fi
28184
28185                         # allow the Ada binding to be renamed
28186
28187 echo "$as_me:28187: checking for Ada95 curses library name" >&5
28188 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
28189
28190 # Check whether --with-ada-libname or --without-ada-libname was given.
28191 if test "${with_ada_libname+set}" = set; then
28192   withval="$with_ada_libname"
28193   ADA_LIBNAME=$withval
28194 else
28195   ADA_LIBNAME=AdaCurses
28196 fi;
28197 case "x$ADA_LIBNAME" in
28198 (x|xyes|xno)
28199         ADA_LIBNAME=AdaCurses
28200         ;;
28201 esac
28202
28203 echo "$as_me:28203: result: $ADA_LIBNAME" >&5
28204 echo "${ECHO_T}$ADA_LIBNAME" >&6
28205
28206                 fi
28207         fi
28208 else
28209         cf_with_ada=no
28210 fi
28211
28212 # do this "late" to avoid conflict with header-checks
28213 if test "x$with_widec" = xyes ; then
28214         echo "$as_me:28214: checking for wchar_t" >&5
28215 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
28216 if test "${ac_cv_type_wchar_t+set}" = set; then
28217   echo $ECHO_N "(cached) $ECHO_C" >&6
28218 else
28219   cat >"conftest.$ac_ext" <<_ACEOF
28220 #line 28220 "configure"
28221 #include "confdefs.h"
28222 $ac_includes_default
28223 int
28224 main (void)
28225 {
28226 if ((wchar_t *) 0)
28227   return 0;
28228 if (sizeof (wchar_t))
28229   return 0;
28230   ;
28231   return 0;
28232 }
28233 _ACEOF
28234 rm -f "conftest.$ac_objext"
28235 if { (eval echo "$as_me:28235: \"$ac_compile\"") >&5
28236   (eval $ac_compile) 2>&5
28237   ac_status=$?
28238   echo "$as_me:28238: \$? = $ac_status" >&5
28239   (exit "$ac_status"); } &&
28240          { ac_try='test -s "conftest.$ac_objext"'
28241   { (eval echo "$as_me:28241: \"$ac_try\"") >&5
28242   (eval $ac_try) 2>&5
28243   ac_status=$?
28244   echo "$as_me:28244: \$? = $ac_status" >&5
28245   (exit "$ac_status"); }; }; then
28246   ac_cv_type_wchar_t=yes
28247 else
28248   echo "$as_me: failed program was:" >&5
28249 cat "conftest.$ac_ext" >&5
28250 ac_cv_type_wchar_t=no
28251 fi
28252 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28253 fi
28254 echo "$as_me:28254: result: $ac_cv_type_wchar_t" >&5
28255 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28256
28257 echo "$as_me:28257: checking size of wchar_t" >&5
28258 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28259 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28260   echo $ECHO_N "(cached) $ECHO_C" >&6
28261 else
28262   if test "$ac_cv_type_wchar_t" = yes; then
28263   if test "$cross_compiling" = yes; then
28264   # Depending upon the size, compute the lo and hi bounds.
28265 cat >"conftest.$ac_ext" <<_ACEOF
28266 #line 28266 "configure"
28267 #include "confdefs.h"
28268 $ac_includes_default
28269 int
28270 main (void)
28271 {
28272 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28273   ;
28274   return 0;
28275 }
28276 _ACEOF
28277 rm -f "conftest.$ac_objext"
28278 if { (eval echo "$as_me:28278: \"$ac_compile\"") >&5
28279   (eval $ac_compile) 2>&5
28280   ac_status=$?
28281   echo "$as_me:28281: \$? = $ac_status" >&5
28282   (exit "$ac_status"); } &&
28283          { ac_try='test -s "conftest.$ac_objext"'
28284   { (eval echo "$as_me:28284: \"$ac_try\"") >&5
28285   (eval $ac_try) 2>&5
28286   ac_status=$?
28287   echo "$as_me:28287: \$? = $ac_status" >&5
28288   (exit "$ac_status"); }; }; then
28289   ac_lo=0 ac_mid=0
28290   while :; do
28291     cat >"conftest.$ac_ext" <<_ACEOF
28292 #line 28292 "configure"
28293 #include "confdefs.h"
28294 $ac_includes_default
28295 int
28296 main (void)
28297 {
28298 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28299   ;
28300   return 0;
28301 }
28302 _ACEOF
28303 rm -f "conftest.$ac_objext"
28304 if { (eval echo "$as_me:28304: \"$ac_compile\"") >&5
28305   (eval $ac_compile) 2>&5
28306   ac_status=$?
28307   echo "$as_me:28307: \$? = $ac_status" >&5
28308   (exit "$ac_status"); } &&
28309          { ac_try='test -s "conftest.$ac_objext"'
28310   { (eval echo "$as_me:28310: \"$ac_try\"") >&5
28311   (eval $ac_try) 2>&5
28312   ac_status=$?
28313   echo "$as_me:28313: \$? = $ac_status" >&5
28314   (exit "$ac_status"); }; }; then
28315   ac_hi=$ac_mid; break
28316 else
28317   echo "$as_me: failed program was:" >&5
28318 cat "conftest.$ac_ext" >&5
28319 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28320 fi
28321 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28322   done
28323 else
28324   echo "$as_me: failed program was:" >&5
28325 cat "conftest.$ac_ext" >&5
28326 ac_hi=-1 ac_mid=-1
28327   while :; do
28328     cat >"conftest.$ac_ext" <<_ACEOF
28329 #line 28329 "configure"
28330 #include "confdefs.h"
28331 $ac_includes_default
28332 int
28333 main (void)
28334 {
28335 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28336   ;
28337   return 0;
28338 }
28339 _ACEOF
28340 rm -f "conftest.$ac_objext"
28341 if { (eval echo "$as_me:28341: \"$ac_compile\"") >&5
28342   (eval $ac_compile) 2>&5
28343   ac_status=$?
28344   echo "$as_me:28344: \$? = $ac_status" >&5
28345   (exit "$ac_status"); } &&
28346          { ac_try='test -s "conftest.$ac_objext"'
28347   { (eval echo "$as_me:28347: \"$ac_try\"") >&5
28348   (eval $ac_try) 2>&5
28349   ac_status=$?
28350   echo "$as_me:28350: \$? = $ac_status" >&5
28351   (exit "$ac_status"); }; }; then
28352   ac_lo=$ac_mid; break
28353 else
28354   echo "$as_me: failed program was:" >&5
28355 cat "conftest.$ac_ext" >&5
28356 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28357 fi
28358 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28359   done
28360 fi
28361 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28362 # Binary search between lo and hi bounds.
28363 while test "x$ac_lo" != "x$ac_hi"; do
28364   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28365   cat >"conftest.$ac_ext" <<_ACEOF
28366 #line 28366 "configure"
28367 #include "confdefs.h"
28368 $ac_includes_default
28369 int
28370 main (void)
28371 {
28372 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28373   ;
28374   return 0;
28375 }
28376 _ACEOF
28377 rm -f "conftest.$ac_objext"
28378 if { (eval echo "$as_me:28378: \"$ac_compile\"") >&5
28379   (eval $ac_compile) 2>&5
28380   ac_status=$?
28381   echo "$as_me:28381: \$? = $ac_status" >&5
28382   (exit "$ac_status"); } &&
28383          { ac_try='test -s "conftest.$ac_objext"'
28384   { (eval echo "$as_me:28384: \"$ac_try\"") >&5
28385   (eval $ac_try) 2>&5
28386   ac_status=$?
28387   echo "$as_me:28387: \$? = $ac_status" >&5
28388   (exit "$ac_status"); }; }; then
28389   ac_hi=$ac_mid
28390 else
28391   echo "$as_me: failed program was:" >&5
28392 cat "conftest.$ac_ext" >&5
28393 ac_lo=`expr "$ac_mid" + 1`
28394 fi
28395 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28396 done
28397 ac_cv_sizeof_wchar_t=$ac_lo
28398 else
28399   if test "$cross_compiling" = yes; then
28400   { { echo "$as_me:28400: error: cannot run test program while cross compiling" >&5
28401 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28402    { (exit 1); exit 1; }; }
28403 else
28404   cat >"conftest.$ac_ext" <<_ACEOF
28405 #line 28405 "configure"
28406 #include "confdefs.h"
28407 $ac_includes_default
28408 int
28409 main (void)
28410 {
28411 FILE *f = fopen ("conftest.val", "w");
28412 if (!f)
28413   $ac_main_return (1);
28414 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28415 fclose (f);
28416   ;
28417   return 0;
28418 }
28419 _ACEOF
28420 rm -f "conftest$ac_exeext"
28421 if { (eval echo "$as_me:28421: \"$ac_link\"") >&5
28422   (eval $ac_link) 2>&5
28423   ac_status=$?
28424   echo "$as_me:28424: \$? = $ac_status" >&5
28425   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28426   { (eval echo "$as_me:28426: \"$ac_try\"") >&5
28427   (eval $ac_try) 2>&5
28428   ac_status=$?
28429   echo "$as_me:28429: \$? = $ac_status" >&5
28430   (exit "$ac_status"); }; }; then
28431   ac_cv_sizeof_wchar_t=`cat conftest.val`
28432 else
28433   echo "$as_me: program exited with status $ac_status" >&5
28434 echo "$as_me: failed program was:" >&5
28435 cat "conftest.$ac_ext" >&5
28436 fi
28437 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28438 fi
28439 fi
28440 rm -f conftest.val
28441 else
28442   ac_cv_sizeof_wchar_t=0
28443 fi
28444 fi
28445 echo "$as_me:28445: result: $ac_cv_sizeof_wchar_t" >&5
28446 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28447 cat >>confdefs.h <<EOF
28448 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28449 EOF
28450
28451         # cross-compiling to mingw can run into the problem that attempting to
28452         # link with the regex library fails, causing the test to not set this to
28453         # a number.  "recent" autoconf does not address this problem either -TD
28454         if test -z "$ac_cv_sizeof_wchar_t"
28455         then
28456                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28457
28458 echo "${as_me:-configure}:28458: testing test failed (assume 2) ..." 1>&5
28459
28460                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28461                 mv confdefs.tmp confdefs.h
28462                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28463         fi
28464 fi
28465
28466 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28467 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28468 ###
28469 ### ticlib modules may be a separate library, otherwise contained in termlib.
28470 ### termlib modules may be a separate library, otherwise contained in ncurses.
28471 ###
28472 ### The of "+" or " " between the tokens controls the way the script
28473 ### chooses to split module lists into libraries.
28474 ###
28475 ### (see CF_LIB_RULES).
28476 echo "$as_me:28476: checking for library subsets" >&5
28477 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28478 LIB_SUBSETS=
28479
28480 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28481         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28482         if test "$with_ticlib" != no ; then
28483                 LIB_SUBSETS="${LIB_SUBSETS} "
28484         else
28485                 LIB_SUBSETS="${LIB_SUBSETS}+"
28486         fi
28487 fi
28488
28489 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28490 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28491
28492 if test "$with_termlib" != no ; then
28493         LIB_SUBSETS="${LIB_SUBSETS} "
28494 else
28495         LIB_SUBSETS="${LIB_SUBSETS}+"
28496 fi
28497
28498 LIB_SUBSETS="${LIB_SUBSETS}base"
28499
28500 # Most term-driver calls are to tinfo, but some like init_pair are to the
28501 # base library (so it resides in base).
28502 if test "$with_term_driver" != no ; then
28503         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28504         case "$cf_cv_system_name" in
28505         (*mingw32*|*mingw64*)
28506                 if test "x$with_exp_win32" = xyes ; then
28507                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28508                 else
28509                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28510                 fi
28511                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28512                 ;;
28513         (*)
28514                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28515                 ;;
28516         esac
28517 elif test "x$with_exp_win32" = xyes ; then
28518         case "$cf_cv_system_name" in
28519         (*mingw32*|*mingw64*)
28520                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28521                 ;;
28522         (*)
28523                 ;;
28524         esac
28525 fi
28526
28527 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28528 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28529
28530 echo "$as_me:28530: result: $LIB_SUBSETS" >&5
28531 echo "${ECHO_T}$LIB_SUBSETS" >&6
28532
28533 ### Construct the list of include-directories to be generated
28534
28535 if test "$srcdir" != "."; then
28536         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28537 fi
28538 CPPFLAGS="-I../include $CPPFLAGS"
28539 if test "$srcdir" != "."; then
28540         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28541 fi
28542 CPPFLAGS="-I. $CPPFLAGS"
28543
28544 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28545 if test "$srcdir" != "."; then
28546         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28547 fi
28548 if test "$GCC" != yes; then
28549         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28550 elif test "$includedir" != "/usr/include"; then
28551         if test "$includedir" = '${prefix}/include' ; then
28552                 if test x$prefix != x/usr ; then
28553                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28554                 fi
28555         else
28556                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28557         fi
28558 fi
28559
28560 ### Build up pieces for makefile rules
28561 echo "$as_me:28561: checking default library suffix" >&5
28562 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28563
28564         case $DFT_LWR_MODEL in
28565         (libtool) DFT_ARG_SUFFIX=''   ;;
28566         (normal)  DFT_ARG_SUFFIX=''   ;;
28567         (debug)   DFT_ARG_SUFFIX='_g' ;;
28568         (profile) DFT_ARG_SUFFIX='_p' ;;
28569         (shared)  DFT_ARG_SUFFIX=''   ;;
28570         esac
28571         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28572 echo "$as_me:28572: result: $DFT_ARG_SUFFIX" >&5
28573 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28574
28575 echo "$as_me:28575: checking default library-dependency suffix" >&5
28576 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28577
28578         case X$DFT_LWR_MODEL in
28579         (Xlibtool)
28580                 DFT_LIB_SUFFIX='.la'
28581                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28582                 ;;
28583         (Xdebug)
28584                 case "$cf_cv_system_name" in
28585                 (*-msvc*)
28586                         DFT_LIB_SUFFIX='_g.lib'
28587                         ;;
28588                 (*)
28589                         DFT_LIB_SUFFIX='_g.a'
28590                         ;;
28591                 esac
28592                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28593                 ;;
28594         (Xprofile)
28595                 case "$cf_cv_system_name" in
28596                 (*-msvc*)
28597                         DFT_LIB_SUFFIX='_p.lib'
28598                         ;;
28599                 (*)
28600                         DFT_LIB_SUFFIX='_p.a'
28601                         ;;
28602                 esac
28603                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28604                 ;;
28605         (Xshared)
28606                 case "$cf_cv_system_name" in
28607                 (aix[5-7]*)
28608                         DFT_LIB_SUFFIX='.so'
28609                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28610                         ;;
28611                 (*-msvc*)
28612                         DFT_LIB_SUFFIX='.dll'
28613                         DFT_DEP_SUFFIX='.dll.lib'
28614                         ;;
28615                 (cygwin*|msys*|mingw*)
28616                         DFT_LIB_SUFFIX='.dll'
28617                         DFT_DEP_SUFFIX='.dll.a'
28618                         ;;
28619                 (darwin*)
28620                         DFT_LIB_SUFFIX='.dylib'
28621                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28622                         ;;
28623                 (hpux*)
28624                         case "$target" in
28625                         (ia64*)
28626                                 DFT_LIB_SUFFIX='.so'
28627                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28628                                 ;;
28629                         (*)
28630                                 DFT_LIB_SUFFIX='.sl'
28631                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28632                                 ;;
28633                         esac
28634                         ;;
28635                 (*)
28636                         DFT_LIB_SUFFIX='.so'
28637                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28638                         ;;
28639                 esac
28640                 ;;
28641         (*)
28642                 case "$target" in
28643                 (*-msvc*)
28644                         DFT_LIB_SUFFIX='.lib'
28645                         ;;
28646                 (*)
28647                         DFT_LIB_SUFFIX='.a'
28648                         ;;
28649                 esac
28650                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28651                 ;;
28652         esac
28653         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28654         then
28655                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28656                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28657         fi
28658 echo "$as_me:28658: result: $DFT_DEP_SUFFIX" >&5
28659 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28660
28661 echo "$as_me:28661: checking default object directory" >&5
28662 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28663
28664         case $DFT_LWR_MODEL in
28665         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28666         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28667         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28668         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28669         (shared)
28670                 case "$cf_cv_system_name" in
28671                 (cygwin|msys)
28672                         DFT_OBJ_SUBDIR='objects' ;;
28673                 (*)
28674                         DFT_OBJ_SUBDIR='obj_s' ;;
28675                 esac
28676         esac
28677 echo "$as_me:28677: result: $DFT_OBJ_SUBDIR" >&5
28678 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28679
28680 if test "x$cf_with_cxx" = xyes ; then
28681 echo "$as_me:28681: checking c++ library-dependency suffix" >&5
28682 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28683 if test "$with_libtool" != "no"; then
28684         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28685         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28686 elif test "$with_shared_cxx" != "no"; then
28687         # also for g++ users...
28688         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28689 else
28690         # we normally make a static library because C/C++ library rules differ
28691
28692         case Xnormal in
28693         (Xlibtool)
28694                 CXX_LIB_SUFFIX='.la'
28695                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28696                 ;;
28697         (Xdebug)
28698                 case "$cf_cv_system_name" in
28699                 (*-msvc*)
28700                         CXX_LIB_SUFFIX='_g.lib'
28701                         ;;
28702                 (*)
28703                         CXX_LIB_SUFFIX='_g.a'
28704                         ;;
28705                 esac
28706                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28707                 ;;
28708         (Xprofile)
28709                 case "$cf_cv_system_name" in
28710                 (*-msvc*)
28711                         CXX_LIB_SUFFIX='_p.lib'
28712                         ;;
28713                 (*)
28714                         CXX_LIB_SUFFIX='_p.a'
28715                         ;;
28716                 esac
28717                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28718                 ;;
28719         (Xshared)
28720                 case "$cf_cv_system_name" in
28721                 (aix[5-7]*)
28722                         CXX_LIB_SUFFIX='.so'
28723                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28724                         ;;
28725                 (*-msvc*)
28726                         CXX_LIB_SUFFIX='.dll'
28727                         CXX_DEP_SUFFIX='.dll.lib'
28728                         ;;
28729                 (cygwin*|msys*|mingw*)
28730                         CXX_LIB_SUFFIX='.dll'
28731                         CXX_DEP_SUFFIX='.dll.a'
28732                         ;;
28733                 (darwin*)
28734                         CXX_LIB_SUFFIX='.dylib'
28735                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28736                         ;;
28737                 (hpux*)
28738                         case "$target" in
28739                         (ia64*)
28740                                 CXX_LIB_SUFFIX='.so'
28741                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28742                                 ;;
28743                         (*)
28744                                 CXX_LIB_SUFFIX='.sl'
28745                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28746                                 ;;
28747                         esac
28748                         ;;
28749                 (*)
28750                         CXX_LIB_SUFFIX='.so'
28751                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28752                         ;;
28753                 esac
28754                 ;;
28755         (*)
28756                 case "$target" in
28757                 (*-msvc*)
28758                         CXX_LIB_SUFFIX='.lib'
28759                         ;;
28760                 (*)
28761                         CXX_LIB_SUFFIX='.a'
28762                         ;;
28763                 esac
28764                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28765                 ;;
28766         esac
28767         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28768         then
28769                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28770                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28771         fi
28772
28773 fi
28774 echo "$as_me:28774: result: $CXX_LIB_SUFFIX" >&5
28775 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28776
28777 fi
28778
28779 # do not want -ldl in build except as needed for -lncurses dependency
28780 if test "x$with_dlsym" = xyes ; then
28781 if test "$DFT_LWR_MODEL" = shared || \
28782    test "$DFT_LWR_MODEL" = libtool ; then
28783
28784 # remove dl library from $LIBS
28785 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28786
28787 fi
28788 fi
28789 ### Set up low-level terminfo dependencies for makefiles.
28790
28791 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28792 # do not need libdl
28793 TICS_LIST=
28794 if test "x$with_dlsym" = xyes ; then
28795
28796 # remove dl library from $SHLIB_LIST
28797 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28798
28799 fi
28800
28801 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28802 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28803 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28804 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28805 then
28806         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28807 fi
28808
28809 if test "$with_ticlib" != no ; then
28810
28811         if test "x$with_ticlib" != xyes ; then
28812                 TICS_NAME=$with_ticlib
28813                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28814                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28815                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28816                 TICS_LIB_SUFFIX="${with_ticlib}"
28817         else
28818                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28819                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28820                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28821                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28822         fi
28823         TICS_LDFLAGS="-L${LIB_DIR}"
28824         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28825 else
28826         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28827         TICS_LDFLAGS="-L${LIB_DIR}"
28828         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28829 fi
28830
28831 if test "$with_termlib" != no ; then
28832
28833         if test "x$with_termlib" != xyes ; then
28834                 TINFO_NAME=$with_termlib
28835                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28836                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28837                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28838                 TINFO_LIB_SUFFIX="${with_termlib}"
28839         else
28840                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28841                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28842                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28843                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28844         fi
28845
28846         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28847         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28848         if test "$DFT_LWR_MODEL" = "libtool"; then
28849                 TEST_ARGS="${TEST_DEPS}"
28850                 TEST_ARG2="${TEST_DEP2}"
28851                 TINFO_LDFLAGS="-L${LIB_DIR}"
28852                 TINFO_LIBS="$TEST_ARGS"
28853                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28854                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28855         else
28856                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28857                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28858                 if test "x$with_term_driver" != xno ; then
28859                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28860                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28861                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28862                 else
28863                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28864                         TINFO_LIBS="$TEST_ARGS"
28865                 fi
28866                 TINFO_LDFLAGS="-L${LIB_DIR}"
28867                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28868         fi
28869 else
28870         # the next lines are needed for linking libtic over libncurses
28871         TINFO_NAME=${LIB_NAME}
28872         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28873         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28874         if test "x$with_tic_depends" = xyes ; then
28875                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28876         else
28877                 TICS_LIST="$SHLIB_LIST"
28878         fi
28879
28880         TINFO_LDFLAGS="-L${LIB_DIR}"
28881         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28882 fi
28883
28884 if test "$DFT_LWR_MODEL" = shared ; then
28885         case "$cf_cv_system_name" in
28886         (cygwin*|msys*)
28887                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28888                 TINFO_SUFFIX=.dll
28889                 ;;
28890         esac
28891 fi
28892
28893 if test "x$with_dlsym" = xyes ; then
28894
28895 # remove dl library from $TICS_LIST
28896 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28897
28898 fi
28899
28900 if test "$DFT_LWR_MODEL" = "libtool"; then
28901         OBJEXT=lo
28902 fi
28903
28904 # needed for Ada95
28905 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28906
28907 case "$DFT_LWR_MODEL" in
28908 (normal|debug|profile)
28909
28910 if test "$GCC" = yes ; then
28911         case "$cf_cv_system_name" in
28912         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28913                 LDFLAGS_STATIC=
28914                 LDFLAGS_SHARED=
28915                 ;;
28916         (*)     # normally, except when broken
28917                 LDFLAGS_STATIC=-static
28918                 LDFLAGS_SHARED=-dynamic
28919                 ;;
28920         esac
28921 else
28922         case "$cf_cv_system_name" in
28923         (aix[4-7]*)     # from ld manpage
28924                 LDFLAGS_STATIC=-bstatic
28925                 LDFLAGS_SHARED=-bdynamic
28926                 ;;
28927         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28928                 # We could also use just "archive" and "shared".
28929                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28930                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28931                 ;;
28932         (irix*)         # from ld manpage IRIX64
28933                 LDFLAGS_STATIC=-Bstatic
28934                 LDFLAGS_SHARED=-Bdynamic
28935                 ;;
28936         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28937                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28938                 LDFLAGS_STATIC=-noso
28939                 LDFLAGS_SHARED=-so_archive
28940                 ;;
28941         (solaris2*)
28942                 LDFLAGS_STATIC=-Bstatic
28943                 LDFLAGS_SHARED=-Bdynamic
28944                 ;;
28945         esac
28946 fi
28947
28948 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28949 then
28950         echo "$as_me:28950: checking if linker supports switching between static/dynamic" >&5
28951 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28952
28953         rm -f libconftest.a
28954         cat >conftest.$ac_ext <<EOF
28955 #line 28955 "configure"
28956 #include <stdio.h>
28957 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28958 EOF
28959         if { (eval echo "$as_me:28959: \"$ac_compile\"") >&5
28960   (eval $ac_compile) 2>&5
28961   ac_status=$?
28962   echo "$as_me:28962: \$? = $ac_status" >&5
28963   (exit "$ac_status"); } ; then
28964                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28965                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28966         fi
28967         rm -f conftest.*
28968
28969         cf_save_LIBS="$LIBS"
28970
28971         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28972         cat >"conftest.$ac_ext" <<_ACEOF
28973 #line 28973 "configure"
28974 #include "confdefs.h"
28975
28976 #line 28976 "configure"
28977 #include <stdio.h>
28978 int cf_ldflags_static(FILE *fp);
28979
28980 int
28981 main (void)
28982 {
28983
28984         return cf_ldflags_static(stdin);
28985
28986   ;
28987   return 0;
28988 }
28989 _ACEOF
28990 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28991 if { (eval echo "$as_me:28991: \"$ac_link\"") >&5
28992   (eval $ac_link) 2>&5
28993   ac_status=$?
28994   echo "$as_me:28994: \$? = $ac_status" >&5
28995   (exit "$ac_status"); } &&
28996          { ac_try='test -s "conftest$ac_exeext"'
28997   { (eval echo "$as_me:28997: \"$ac_try\"") >&5
28998   (eval $ac_try) 2>&5
28999   ac_status=$?
29000   echo "$as_me:29000: \$? = $ac_status" >&5
29001   (exit "$ac_status"); }; }; then
29002
29003         # some linkers simply ignore the -dynamic
29004         case x`file "conftest$ac_exeext" 2>/dev/null` in
29005         (*static*)
29006                 cf_ldflags_static=no
29007                 ;;
29008         (*)
29009                 cf_ldflags_static=yes
29010                 ;;
29011         esac
29012
29013 else
29014   echo "$as_me: failed program was:" >&5
29015 cat "conftest.$ac_ext" >&5
29016 cf_ldflags_static=no
29017 fi
29018 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29019
29020         rm -f libconftest.*
29021         LIBS="$cf_save_LIBS"
29022
29023         echo "$as_me:29023: result: $cf_ldflags_static" >&5
29024 echo "${ECHO_T}$cf_ldflags_static" >&6
29025
29026         if test "$cf_ldflags_static" != yes
29027         then
29028                 LDFLAGS_STATIC=
29029                 LDFLAGS_SHARED=
29030         fi
29031 else
29032         LDFLAGS_STATIC=
29033         LDFLAGS_SHARED=
29034 fi
29035
29036         ;;
29037 esac
29038
29039 echo "$as_me:29039: checking where we will install curses.h" >&5
29040 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
29041
29042 includesubdir=
29043 if test "$with_overwrite" = no && \
29044  { test "x$includedir" = 'x${prefix}/include' || \
29045    test "x$includedir" = "x${prefix}/include"; }
29046 then
29047         includesubdir="/ncurses${USE_LIB_SUFFIX}"
29048 fi
29049 echo "$as_me:29049: result: ${includedir}${includesubdir}" >&5
29050 echo "${ECHO_T}${includedir}${includesubdir}" >&6
29051
29052 ### Resolve a conflict between normal and wide-curses by forcing applications
29053 ### that will need libutf8 to add it to their configure script.
29054 if test "$with_overwrite" != no ; then
29055 if test "$NCURSES_LIBUTF8" = 1 ; then
29056         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
29057         { echo "$as_me:29057: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
29058 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
29059 fi
29060 fi
29061 WITH_OVERWRITE=$with_overwrite
29062
29063 ### At least on MinGW a shared library build without libtool
29064 ### requires adding the additional libs to the link list.
29065 case "$cf_cv_system_name" in
29066 (*mingw32*|*mingw64*)
29067         if test "$DFT_LWR_MODEL" != "libtool"; then
29068            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
29069         fi
29070         ;;
29071 *)      ;;
29072 esac
29073
29074 ### predefined stuff for the test programs
29075
29076 cat >>confdefs.h <<\EOF
29077 #define HAVE_SLK_COLOR 1
29078 EOF
29079
29080 # pkgsrc uses these
29081
29082 echo "$as_me:29082: checking for desired basename for form library" >&5
29083 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
29084
29085 # Check whether --with-form-libname or --without-form-libname was given.
29086 if test "${with_form_libname+set}" = set; then
29087   withval="$with_form_libname"
29088   with_lib_basename=$withval
29089 else
29090   with_lib_basename=form
29091 fi;
29092 FORM_NAME="$with_lib_basename"
29093
29094 case "x$FORM_NAME" in
29095 (x|xno|xnone|xyes)
29096         FORM_NAME=form
29097         ;;
29098 (*)
29099         ;;
29100 esac
29101
29102 echo "$as_me:29102: result: $FORM_NAME" >&5
29103 echo "${ECHO_T}$FORM_NAME" >&6
29104
29105 echo "$as_me:29105: checking for desired basename for menu library" >&5
29106 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
29107
29108 # Check whether --with-menu-libname or --without-menu-libname was given.
29109 if test "${with_menu_libname+set}" = set; then
29110   withval="$with_menu_libname"
29111   with_lib_basename=$withval
29112 else
29113   with_lib_basename=menu
29114 fi;
29115 MENU_NAME="$with_lib_basename"
29116
29117 case "x$MENU_NAME" in
29118 (x|xno|xnone|xyes)
29119         MENU_NAME=menu
29120         ;;
29121 (*)
29122         ;;
29123 esac
29124
29125 echo "$as_me:29125: result: $MENU_NAME" >&5
29126 echo "${ECHO_T}$MENU_NAME" >&6
29127
29128 echo "$as_me:29128: checking for desired basename for panel library" >&5
29129 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
29130
29131 # Check whether --with-panel-libname or --without-panel-libname was given.
29132 if test "${with_panel_libname+set}" = set; then
29133   withval="$with_panel_libname"
29134   with_lib_basename=$withval
29135 else
29136   with_lib_basename=panel
29137 fi;
29138 PANEL_NAME="$with_lib_basename"
29139
29140 case "x$PANEL_NAME" in
29141 (x|xno|xnone|xyes)
29142         PANEL_NAME=panel
29143         ;;
29144 (*)
29145         ;;
29146 esac
29147
29148 echo "$as_me:29148: result: $PANEL_NAME" >&5
29149 echo "${ECHO_T}$PANEL_NAME" >&6
29150
29151 echo "$as_me:29151: checking for desired basename for cxx library" >&5
29152 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
29153
29154 # Check whether --with-cxx-libname or --without-cxx-libname was given.
29155 if test "${with_cxx_libname+set}" = set; then
29156   withval="$with_cxx_libname"
29157   with_lib_basename=$withval
29158 else
29159   with_lib_basename=ncurses++
29160 fi;
29161 CXX_NAME="$with_lib_basename"
29162
29163 case "x$CXX_NAME" in
29164 (x|xno|xnone|xyes)
29165         CXX_NAME=ncurses++
29166         ;;
29167 (*)
29168         ;;
29169 esac
29170
29171 echo "$as_me:29171: result: $CXX_NAME" >&5
29172 echo "${ECHO_T}$CXX_NAME" >&6
29173
29174 ### Construct the list of subdirectories for which we'll customize makefiles
29175 ### with the appropriate compile-rules.
29176
29177 echo "$as_me:29177: checking for src modules" >&5
29178 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
29179
29180 # dependencies and linker-arguments for test-programs
29181 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
29182 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
29183 if test "$DFT_LWR_MODEL" = "libtool"; then
29184         TEST_ARGS="${TEST_DEPS}"
29185         TEST_ARG2="${TEST_DEP2}"
29186 else
29187         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
29188         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
29189 fi
29190
29191 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
29192 cf_cv_src_modules=
29193 for cf_dir in $modules_to_build
29194 do
29195         if test -f "$srcdir/$cf_dir/modules" ; then
29196
29197                 if test -z "$cf_cv_src_modules"; then
29198                         cf_cv_src_modules=$cf_dir
29199                 else
29200                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
29201                 fi
29202
29203                 # Make the ncurses_cfg.h file record the library interface files as
29204                 # well.  These are header files that are the same name as their
29205                 # directory.  Ncurses is the only library that does not follow
29206                 # that pattern.
29207                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
29208
29209 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29210
29211                         cat >>confdefs.h <<EOF
29212 #define HAVE_${cf_have_include}_H 1
29213 EOF
29214
29215                         cat >>confdefs.h <<EOF
29216 #define HAVE_LIB${cf_have_include} 1
29217 EOF
29218
29219 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29220
29221 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
29222
29223                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
29224                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
29225                         if test "$DFT_LWR_MODEL" = "libtool"; then
29226                                 TEST_ARGS="${TEST_DEPS}"
29227                                 TEST_ARG2="${TEST_DEP2}"
29228                         else
29229                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29230                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
29231                         fi
29232                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
29233                 fi
29234         fi
29235 done
29236 echo "$as_me:29236: result: $cf_cv_src_modules" >&5
29237 echo "${ECHO_T}$cf_cv_src_modules" >&6
29238
29239 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29240 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29241
29242 SRC_SUBDIRS=
29243 if test "x$cf_with_manpages" != xno ; then
29244         SRC_SUBDIRS="$SRC_SUBDIRS man"
29245 fi
29246 SRC_SUBDIRS="$SRC_SUBDIRS include"
29247 for cf_dir in $cf_cv_src_modules
29248 do
29249         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29250 done
29251 if test "x$cf_with_tests" != "xno" ; then
29252         SRC_SUBDIRS="$SRC_SUBDIRS test"
29253 fi
29254 # always make this, to install the ncurses-config script
29255 SRC_SUBDIRS="$SRC_SUBDIRS misc"
29256 if test "$cf_with_cxx_binding" != no; then
29257         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29258         SRC_SUBDIRS="$SRC_SUBDIRS c++"
29259 fi
29260
29261 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29262 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
29263
29264 ADA_SUBDIRS=
29265 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
29266         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29267         ADA_SUBDIRS="gen src"
29268         if test "x$cf_with_tests" != "xno" ; then
29269                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29270         fi
29271 fi
29272
29273 SUB_MAKEFILES=
29274 for cf_dir in $SRC_SUBDIRS
29275 do
29276         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29277 done
29278
29279 if test -n "$ADA_SUBDIRS"; then
29280         for cf_dir in $ADA_SUBDIRS
29281         do
29282                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29283         done
29284
29285 fi
29286
29287 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29288    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29289    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29290    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29291 fi
29292
29293 DIRS_TO_MAKE="lib"
29294 for cf_item in $cf_list_models
29295 do
29296
29297         case $cf_item in
29298         (libtool) cf_subdir='obj_lo'  ;;
29299         (normal)  cf_subdir='objects' ;;
29300         (debug)   cf_subdir='obj_g' ;;
29301         (profile) cf_subdir='obj_p' ;;
29302         (shared)
29303                 case "$cf_cv_system_name" in
29304                 (cygwin|msys)
29305                         cf_subdir='objects' ;;
29306                 (*)
29307                         cf_subdir='obj_s' ;;
29308                 esac
29309         esac
29310
29311         for cf_item2 in $DIRS_TO_MAKE
29312         do
29313                 test "$cf_item2" = "$cf_subdir" && break
29314         done
29315         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29316 done
29317 for cf_dir in $DIRS_TO_MAKE
29318 do
29319         test ! -d "$cf_dir" && mkdir "$cf_dir"
29320 done
29321
29322 # symbols that differ when compiling Ada95 by itself.
29323 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29324
29325 # values to use as strings
29326
29327 cat >>confdefs.h <<EOF
29328 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29329 EOF
29330
29331 cat >>confdefs.h <<EOF
29332 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29333 EOF
29334
29335 ### Define substitutions for header files to avoid name-pollution
29336
29337 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29338         HAVE_TCGETATTR=1
29339 else
29340         HAVE_TCGETATTR=0
29341 fi
29342
29343 if test "x$ac_cv_header_stdint_h" = xyes ; then
29344         HAVE_STDINT_H=1
29345 else
29346         HAVE_STDINT_H=0
29347 fi
29348
29349 if test "x$ac_cv_header_termio_h" = xyes ; then
29350         HAVE_TERMIO_H=1
29351 else
29352         HAVE_TERMIO_H=0
29353 fi
29354
29355 if test "x$ac_cv_header_termios_h" = xyes ; then
29356         HAVE_TERMIOS_H=1
29357 else
29358         HAVE_TERMIOS_H=0
29359 fi
29360
29361 ################################################################################
29362 test "x$use_database" = xyes && \
29363 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29364
29365 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29366 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29367
29368 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29369 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29370 fi
29371
29372 if test "x$cf_with_tests" != xno ; then
29373         MAKE_TESTS=
29374 else
29375         MAKE_TESTS="#"
29376 fi
29377
29378 ADAHTML_DIR=../../doc/html/ada
29379
29380 # workaround for OS/2 (20151017)
29381 case "$cf_cv_system_name" in
29382 (os2*)
29383         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29384         ;;
29385 (*)
29386         LIBTOOL_OPTS_CXX=
29387         ;;
29388 esac
29389
29390 # workaround for g++ versus Solaris (20131116)
29391 case "$cf_cv_system_name" in
29392 (solaris2*)
29393         case "x$CPPFLAGS" in
29394         (*-D_XOPEN_SOURCE_EXTENDED*)
29395                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29396
29397 echo "${as_me:-configure}:29397: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29398
29399                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29400                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29401                 ;;
29402         esac
29403         ;;
29404 esac
29405
29406 # Help to automatically enable the extended curses features when using either
29407 # the *-config or the ".pc" files by adding defines.
29408 echo "$as_me:29408: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29409 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29410 PKG_CFLAGS=
29411 for cf_loop1 in $CPPFLAGS_after_XOPEN
29412 do
29413         cf_found=no
29414         for cf_loop2 in $CPPFLAGS_before_XOPEN
29415         do
29416                 if test "x$cf_loop1" = "x$cf_loop2"
29417                 then
29418                         cf_found=yes
29419                         break
29420                 fi
29421         done
29422         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29423 done
29424 echo "$as_me:29424: result: $PKG_CFLAGS" >&5
29425 echo "${ECHO_T}$PKG_CFLAGS" >&6
29426
29427 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29428 case "x$NCURSES_OSPEED" in
29429 (*short*)
29430         cf_compatible=1
29431         ;;
29432 (*)
29433         cf_compatible=0
29434         ;;
29435 esac
29436
29437 cat >>confdefs.h <<EOF
29438 #define NCURSES_OSPEED_COMPAT $cf_compatible
29439 EOF
29440
29441 case "x$cf_cv_typeof_chtype" in
29442 (xshort|xint|xlong)
29443         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29444         ;;
29445 esac
29446
29447 case "x$cf_cv_typeof_mmask_t" in
29448 (xshort|xint|xlong)
29449         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29450         ;;
29451 esac
29452
29453 # substitute into misc/Makefile to suppress
29454 # (un)install.data from the
29455 # (un)install rules.
29456 if test "x$cf_with_db_install" = "xno"; then
29457         MISC_INSTALL_DATA=
29458         MISC_UNINSTALL_DATA=
29459 else
29460         MISC_INSTALL_DATA=install.data
29461         MISC_UNINSTALL_DATA=uninstall.data
29462 fi
29463
29464 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29465         MAKE_DATABASE="#"
29466 else
29467         MAKE_DATABASE="$MAKE_TERMINFO"
29468 fi
29469
29470 if test -n "$PACKAGE"
29471 then
29472         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29473         export PACKAGE
29474         echo "package: $PACKAGE"
29475 fi
29476
29477 UNALTERED_SYMS=
29478 cf_filter_syms=no
29479
29480 if test -n "$RESULTING_SYMS"
29481 then
29482         cf_filter_syms=$cf_dft_filter_syms
29483         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29484
29485 echo "${as_me:-configure}:29485: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29486
29487 fi
29488
29489 if test "x$WILDCARD_SYMS" = xno
29490 then
29491         cf_filter_syms=yes
29492 fi
29493
29494 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29495
29496 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29497 if test "$cf_filter_syms" = yes
29498 then
29499         RESULTING_SYMS=resulting.map
29500 fi
29501
29502 if test "x$cross_compiling" = xyes ; then
29503         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29504         CHECK_BUILD="#"
29505 else
29506         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29507         CHECK_BUILD=
29508 fi
29509
29510 # This is used for the *-config script and *.pc data files.
29511
29512 echo "$as_me:29512: checking for linker search path" >&5
29513 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29514 if test "${cf_cv_ld_searchpath+set}" = set; then
29515   echo $ECHO_N "(cached) $ECHO_C" >&6
29516 else
29517
29518 if test "$cross_compiling" != yes ; then
29519
29520 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29521 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29522
29523 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29524 # update the cache, which makes it run faster.
29525 test -z "$cf_pathlist" && \
29526         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29527
29528 test -z "$cf_pathlist" &&
29529         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29530
29531 # This works with OpenBSD 6.5, which lists only filenames
29532 test -z "$cf_pathlist" &&
29533         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29534
29535 if test -z "$cf_pathlist"
29536 then
29537         # dyld default path with MacOS
29538         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29539         then
29540                 # do this to bypass check
29541                 cf_cv_ld_searchpath='$HOME/lib'
29542                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29543         fi
29544 fi
29545
29546 if test -z "$cf_pathlist"
29547 then
29548         # Solaris is "SunOS"
29549         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29550         then
29551                 case x`(isainfo -b)` in
29552                 (x64)
29553                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29554                         ;;
29555                 (x32)
29556                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29557                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29558                         ;;
29559                 (*)
29560                         { echo "$as_me:29560: WARNING: problem with Solaris architecture" >&5
29561 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29562                         ;;
29563                 esac
29564         fi
29565 fi
29566
29567 if test -z "$cf_pathlist"
29568 then
29569         # HP-UX
29570         if test x"`uname -s`" = xHP-UX
29571         then
29572                 case x`getconf LONG_BIT` in
29573                 (x64)
29574                         cf_pathlist="/usr/lib/hpux64"
29575                         ;;
29576                 (x*)
29577                         cf_pathlist="/usr/lib/hpux32"
29578                         ;;
29579                 esac
29580         fi
29581 fi
29582
29583 fi
29584
29585 # If nothing else, assume it is conventional
29586 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29587
29588 # Finally, check that this is only directories
29589 for cf_path in $0 $cf_pathlist
29590 do
29591         if test -d "$cf_path"; then
29592                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29593                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29594         fi
29595 done
29596
29597 # Ensure that it is nonempty
29598 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29599
29600 fi
29601 echo "$as_me:29601: result: $cf_cv_ld_searchpath" >&5
29602 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29603
29604 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29605
29606 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"
29607 ac_config_commands="$ac_config_commands default"
29608 cat >confcache <<\_ACEOF
29609 # This file is a shell script that caches the results of configure
29610 # tests run on this system so they can be shared between configure
29611 # scripts and configure runs, see configure's option --config-cache.
29612 # It is not useful on other systems.  If it contains results you don't
29613 # want to keep, you may remove or edit it.
29614 #
29615 # config.status only pays attention to the cache file if you give it
29616 # the --recheck option to rerun configure.
29617 #
29618 # `ac_cv_env_foo' variables (set or unset) will be overridden when
29619 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29620 # following values.
29621
29622 _ACEOF
29623
29624 # The following way of writing the cache mishandles newlines in values,
29625 # but we know of no workaround that is simple, portable, and efficient.
29626 # So, don't put newlines in cache variables' values.
29627 # Ultrix sh set writes to stderr and can't be redirected directly,
29628 # and sets the high bit in the cache file unless we assign to the vars.
29629 {
29630   (set) 2>&1 |
29631     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29632     *ac_space=\ *)
29633       # `set' does not quote correctly, so add quotes (double-quote
29634       # substitution turns \\\\ into \\, and sed turns \\ into \).
29635       sed -n \
29636         "s/'/'\\\\''/g;
29637           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29638       ;;
29639     *)
29640       # `set' quotes correctly as required by POSIX, so do not add quotes.
29641       sed -n \
29642         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29643       ;;
29644     esac;
29645 } |
29646   sed '
29647      t clear
29648      : clear
29649      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29650      t end
29651      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29652      : end' >>confcache
29653 if cmp -s $cache_file confcache; then :; else
29654   if test -w $cache_file; then
29655     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29656     cat confcache >$cache_file
29657   else
29658     echo "not updating unwritable cache $cache_file"
29659   fi
29660 fi
29661 rm -f confcache
29662
29663 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29664 # Let make expand exec_prefix.
29665 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29666
29667 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29668 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29669 # trailing colons and then remove the whole line if VPATH becomes empty
29670 # (actually we leave an empty line to preserve line numbers).
29671 if test "x$srcdir" = x.; then
29672   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29673 s/:*\$(srcdir):*/:/;
29674 s/:*\${srcdir}:*/:/;
29675 s/:*@srcdir@:*/:/;
29676 s/^\([^=]*=[    ]*\):*/\1/;
29677 s/:*$//;
29678 s/^[^=]*=[      ]*$//;
29679 }'
29680 fi
29681
29682 DEFS=-DHAVE_CONFIG_H
29683
29684 : "${CONFIG_STATUS=./config.status}"
29685 ac_clean_files_save=$ac_clean_files
29686 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29687 { echo "$as_me:29687: creating $CONFIG_STATUS" >&5
29688 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29689 cat >"$CONFIG_STATUS" <<_ACEOF
29690 #! $SHELL
29691 # Generated automatically by configure.
29692 # Run this file to recreate the current configuration.
29693 # Compiler output produced by configure, useful for debugging
29694 # configure, is in config.log if it exists.
29695
29696 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29697
29698 debug=false
29699 SHELL=\${CONFIG_SHELL-$SHELL}
29700 ac_cs_invocation="\$0 \$@"
29701
29702 CLICOLOR_FORCE= GREP_OPTIONS=
29703 unset CLICOLOR_FORCE GREP_OPTIONS
29704 _ACEOF
29705
29706 cat >>"$CONFIG_STATUS" <<\_ACEOF
29707 # Be Bourne compatible
29708 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29709   emulate sh
29710   NULLCMD=:
29711 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29712   set -o posix
29713 fi
29714
29715 # Name of the executable.
29716 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29717
29718 if expr a : '\(a\)' >/dev/null 2>&1; then
29719   as_expr="expr"
29720 else
29721   as_expr="false"
29722 fi
29723
29724 rm -f conf$$ conf$$.exe conf$$.file
29725 echo >conf$$.file
29726 if ln -s conf$$.file conf$$ 2>/dev/null; then
29727   # We could just check for DJGPP; but this test a) works b) is more generic
29728   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29729   if test -f conf$$.exe; then
29730     # Don't use ln at all; we don't have any links
29731     as_ln_s='cp -p'
29732   else
29733     as_ln_s='ln -s'
29734   fi
29735 elif ln conf$$.file conf$$ 2>/dev/null; then
29736   as_ln_s='ln'
29737 else
29738   as_ln_s='cp -p'
29739 fi
29740 rm -f conf$$ conf$$.exe conf$$.file
29741
29742 as_executable_p="test -f"
29743
29744 # Support unset when possible.
29745 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29746   as_unset="unset"
29747 else
29748   as_unset="false"
29749 fi
29750
29751 # NLS nuisances.
29752 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29753 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29754 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29755 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29756 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29757 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29758 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29759 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29760
29761 # IFS
29762 # We need space, tab and new line, in precisely that order.
29763 as_nl='
29764 '
29765 IFS="   $as_nl"
29766
29767 # CDPATH.
29768 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29769
29770 exec 6>&1
29771
29772 _ACEOF
29773
29774 # Files that config.status was made for.
29775 if test -n "$ac_config_files"; then
29776   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29777 fi
29778
29779 if test -n "$ac_config_headers"; then
29780   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29781 fi
29782
29783 if test -n "$ac_config_links"; then
29784   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29785 fi
29786
29787 if test -n "$ac_config_commands"; then
29788   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29789 fi
29790
29791 cat >>"$CONFIG_STATUS" <<\EOF
29792
29793 ac_cs_usage="\
29794 \`$as_me' instantiates files from templates according to the
29795 current configuration.
29796
29797 Usage: $0 [OPTIONS] [FILE]...
29798
29799   -h, --help       print this help, then exit
29800   -V, --version    print version number, then exit
29801   -d, --debug      don't remove temporary files
29802       --recheck    update $as_me by reconfiguring in the same conditions
29803   --file=FILE[:TEMPLATE]
29804                    instantiate the configuration file FILE
29805   --header=FILE[:TEMPLATE]
29806                    instantiate the configuration header FILE
29807
29808 Configuration files:
29809 $config_files
29810
29811 Configuration headers:
29812 $config_headers
29813
29814 Configuration commands:
29815 $config_commands
29816
29817 Report bugs to <dickey@invisible-island.net>."
29818 EOF
29819
29820 cat >>"$CONFIG_STATUS" <<EOF
29821 ac_cs_version="\\
29822 config.status
29823 configured by $0, generated by GNU Autoconf 2.52.20231210,
29824   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29825
29826 Copyright 2003-2022,2023        Thomas E. Dickey
29827 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29828 Free Software Foundation, Inc.
29829 This config.status script is free software; the Free Software Foundation
29830 gives unlimited permission to copy, distribute and modify it."
29831 srcdir="$srcdir"
29832 INSTALL="$INSTALL"
29833 EOF
29834
29835 cat >>"$CONFIG_STATUS" <<\EOF
29836 # If no file are specified by the user, then we need to provide default
29837 # value.  By we need to know if files were specified by the user.
29838 ac_need_defaults=:
29839 while test $# != 0
29840 do
29841   case $1 in
29842   --*=*)
29843     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29844     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29845     shift
29846     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29847     shift
29848     ;;
29849   -*);;
29850   *) # This is not an option, so the user has probably given explicit
29851      # arguments.
29852      ac_need_defaults=false;;
29853   esac
29854
29855   case $1 in
29856   # Handling of the options.
29857 EOF
29858 cat >>"$CONFIG_STATUS" <<EOF
29859   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29860     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29861     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29862 EOF
29863 cat >>"$CONFIG_STATUS" <<\EOF
29864   --version | --vers* | -V )
29865     echo "$ac_cs_version"; exit 0 ;;
29866   --he | --h)
29867     # Conflict between --help and --header
29868     { { echo "$as_me:29868: error: ambiguous option: $1
29869 Try \`$0 --help' for more information." >&5
29870 echo "$as_me: error: ambiguous option: $1
29871 Try \`$0 --help' for more information." >&2;}
29872    { (exit 1); exit 1; }; };;
29873   --help | --hel | -h )
29874     echo "$ac_cs_usage"; exit 0 ;;
29875   --debug | --d* | -d )
29876     debug=: ;;
29877   --file | --fil | --fi | --f )
29878     shift
29879     CONFIG_FILES="$CONFIG_FILES $1"
29880     ac_need_defaults=false;;
29881   --header | --heade | --head | --hea )
29882     shift
29883     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29884     ac_need_defaults=false;;
29885
29886   # This is an error.
29887   -*) { { echo "$as_me:29887: error: unrecognized option: $1
29888 Try \`$0 --help' for more information." >&5
29889 echo "$as_me: error: unrecognized option: $1
29890 Try \`$0 --help' for more information." >&2;}
29891    { (exit 1); exit 1; }; } ;;
29892
29893   *) ac_config_targets="$ac_config_targets $1" ;;
29894
29895   esac
29896   shift
29897 done
29898
29899 exec 5>>config.log
29900 cat >&5 << _ACEOF
29901
29902 ## ----------------------- ##
29903 ## Running config.status.  ##
29904 ## ----------------------- ##
29905
29906 This file was extended by $as_me 2.52.20231210, executed with
29907   CONFIG_FILES    = $CONFIG_FILES
29908   CONFIG_HEADERS  = $CONFIG_HEADERS
29909   CONFIG_LINKS    = $CONFIG_LINKS
29910   CONFIG_COMMANDS = $CONFIG_COMMANDS
29911   > "$ac_cs_invocation"
29912 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29913
29914 _ACEOF
29915 EOF
29916
29917 cat >>"$CONFIG_STATUS" <<EOF
29918 #
29919 # INIT-COMMANDS section.
29920 #
29921
29922 ### Special initialization commands, used to pass information from the
29923 ### configuration-run into config.status
29924
29925 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29926 AWK="$AWK"
29927 CXX_NAME="$CXX_NAME"
29928 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29929 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29930 ECHO_LD="$ECHO_LD"
29931 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29932 FORM_NAME="$FORM_NAME"
29933 LDCONFIG="$LDCONFIG"
29934 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29935 LIB_NAME="$LIB_NAME"
29936 LIB_PREFIX="$LIB_PREFIX"
29937 LIB_SUBSETS="$LIB_SUBSETS"
29938 LIB_SUFFIX="$LIB_SUFFIX"
29939 LIB_TRACING="$LIB_TRACING"
29940 LN_S="$LN_S"
29941 MAKE_TERMINFO="$MAKE_TERMINFO"
29942 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29943 MENU_NAME="$MENU_NAME"
29944 NCURSES_MAJOR="$NCURSES_MAJOR"
29945 NCURSES_MINOR="$NCURSES_MINOR"
29946 NCURSES_OSPEED="$NCURSES_OSPEED"
29947 NCURSES_PATCH="$NCURSES_PATCH"
29948 PANEL_NAME="$PANEL_NAME"
29949 SRC_SUBDIRS="$SRC_SUBDIRS"
29950 TERMINFO="$TERMINFO"
29951 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29952 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29953 TICS_NAME="$TICS_NAME"
29954 TICS_SUFFIX="$TICS_SUFFIX"
29955 TIC_PATH="$TIC_PATH"
29956 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29957 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29958 TINFO_NAME="$TINFO_NAME"
29959 TINFO_SUFFIX="$TINFO_SUFFIX"
29960 UNALTERED_SYMS="$UNALTERED_SYMS"
29961 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29962 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29963 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29964 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29965 WILDCARD_SYMS="$WILDCARD_SYMS"
29966 WITH_CURSES_H="$with_curses_h"
29967 WITH_ECHO="${enable_echo:=yes}"
29968 WITH_OVERWRITE="$with_overwrite"
29969 cf_LIST_MODELS="$cf_list_models"
29970 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29971 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29972 cf_cv_abi_default="$cf_cv_abi_default"
29973 cf_cv_abi_version="$cf_cv_abi_version"
29974 cf_cv_do_relink="$cf_cv_do_relink"
29975 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29976 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29977 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29978 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29979 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29980 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29981 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29982 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29983 cf_cv_rel_version="$cf_cv_rel_version"
29984 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29985 cf_cv_shared_soname='$cf_cv_shared_soname'
29986 cf_cv_shlib_version="$cf_cv_shlib_version"
29987 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29988 cf_cv_system_name="$cf_cv_system_name"
29989 cf_cv_term_driver="$with_term_driver"
29990 cf_with_ada="$cf_with_ada"
29991 cf_with_cxx_binding="$cf_with_cxx_binding"
29992 cf_with_db_install="$cf_with_db_install"
29993 cf_with_manpages="$cf_with_manpages"
29994 cf_with_tests="$cf_with_tests"
29995 host="$host"
29996 target="$target"
29997 verbose="$verbose"
29998 with_shared_cxx="$with_shared_cxx"
29999
30000 EOF
30001
30002 cat >>"$CONFIG_STATUS" <<\EOF
30003 for ac_config_target in $ac_config_targets
30004 do
30005   case "$ac_config_target" in
30006   # Handling of arguments.
30007   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
30008   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
30009   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
30010   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
30011   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
30012   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
30013   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
30014   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
30015   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
30016   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
30017   *) { { echo "$as_me:30017: error: invalid argument: $ac_config_target" >&5
30018 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
30019    { (exit 1); exit 1; }; };;
30020   esac
30021 done
30022
30023 # If the user did not use the arguments to specify the items to instantiate,
30024 # then the envvar interface is used.  Set only those that are not.
30025 # We use the long form for the default assignment because of an extremely
30026 # bizarre bug on SunOS 4.1.3.
30027 if "$ac_need_defaults"; then
30028   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
30029   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
30030   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
30031 fi
30032
30033 # Create a temporary directory, and hook for its removal unless debugging.
30034 $debug ||
30035 {
30036   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
30037   trap '{ (exit 1); exit 1; }' 1 2 13 15
30038 }
30039
30040 # Create a (secure) tmp directory for tmp files.
30041 : "${TMPDIR=/tmp}"
30042 {
30043   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
30044   test -n "$tmp" && test -d "$tmp"
30045 }  ||
30046 {
30047   tmp=$TMPDIR/cs$$-$RANDOM
30048   (umask 077 && mkdir "$tmp")
30049 } ||
30050 {
30051    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
30052    { (exit 1); exit 1; }
30053 }
30054
30055 EOF
30056
30057 cat >>"$CONFIG_STATUS" <<EOF
30058
30059 #
30060 # CONFIG_FILES section.
30061 #
30062
30063 # No need to generate the scripts if there are no CONFIG_FILES.
30064 # This happens for instance when ./config.status config.h
30065 if test -n "\$CONFIG_FILES"; then
30066   # Protect against being on the right side of a sed subst in config.status.
30067   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
30068    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
30069 s,@SHELL@,$SHELL,;t t
30070 s,@exec_prefix@,$exec_prefix,;t t
30071 s,@prefix@,$prefix,;t t
30072 s,@program_transform_name@,$program_transform_name,;t t
30073 s,@bindir@,$bindir,;t t
30074 s,@sbindir@,$sbindir,;t t
30075 s,@libexecdir@,$libexecdir,;t t
30076 s,@datarootdir@,$datarootdir,;t t
30077 s,@datadir@,$datadir,;t t
30078 s,@sysconfdir@,$sysconfdir,;t t
30079 s,@sharedstatedir@,$sharedstatedir,;t t
30080 s,@localstatedir@,$localstatedir,;t t
30081 s,@runstatedir@,$runstatedir,;t t
30082 s,@libdir@,$libdir,;t t
30083 s,@includedir@,$includedir,;t t
30084 s,@oldincludedir@,$oldincludedir,;t t
30085 s,@infodir@,$infodir,;t t
30086 s,@mandir@,$mandir,;t t
30087 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
30088 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
30089 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
30090 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
30091 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
30092 s,@build_alias@,$build_alias,;t t
30093 s,@host_alias@,$host_alias,;t t
30094 s,@target_alias@,$target_alias,;t t
30095 s,@ECHO_C@,$ECHO_C,;t t
30096 s,@ECHO_N@,$ECHO_N,;t t
30097 s,@ECHO_T@,$ECHO_T,;t t
30098 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
30099 s,@DEFS@,$DEFS,;t t
30100 s,@LIBS@,$LIBS,;t t
30101 s,@top_builddir@,$top_builddir,;t t
30102 s,@GREP@,$GREP,;t t
30103 s,@EGREP@,$EGREP,;t t
30104 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
30105 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
30106 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
30107 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
30108 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
30109 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
30110 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
30111 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
30112 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
30113 s,@VERSION@,$VERSION,;t t
30114 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
30115 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
30116 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
30117 s,@PACKAGE@,$PACKAGE,;t t
30118 s,@build@,$build,;t t
30119 s,@build_cpu@,$build_cpu,;t t
30120 s,@build_vendor@,$build_vendor,;t t
30121 s,@build_os@,$build_os,;t t
30122 s,@host@,$host,;t t
30123 s,@host_cpu@,$host_cpu,;t t
30124 s,@host_vendor@,$host_vendor,;t t
30125 s,@host_os@,$host_os,;t t
30126 s,@target@,$target,;t t
30127 s,@target_cpu@,$target_cpu,;t t
30128 s,@target_vendor@,$target_vendor,;t t
30129 s,@target_os@,$target_os,;t t
30130 s,@FGREP@,$FGREP,;t t
30131 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30132 s,@M4_exists@,$M4_exists,;t t
30133 s,@cf_ada_make@,$cf_ada_make,;t t
30134 s,@cf_ada_config@,$cf_ada_config,;t t
30135 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30136 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30137 s,@cf_cv_path_gnatgcc@,$cf_cv_path_gnatgcc,;t t
30138 s,@CC@,$CC,;t t
30139 s,@CFLAGS@,$CFLAGS,;t t
30140 s,@LDFLAGS@,$LDFLAGS,;t t
30141 s,@CPPFLAGS@,$CPPFLAGS,;t t
30142 s,@ac_ct_CC@,$ac_ct_CC,;t t
30143 s,@EXEEXT@,$EXEEXT,;t t
30144 s,@OBJEXT@,$OBJEXT,;t t
30145 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
30146 s,@CPP@,$CPP,;t t
30147 s,@LDCONFIG@,$LDCONFIG,;t t
30148 s,@CXX@,$CXX,;t t
30149 s,@CXXFLAGS@,$CXXFLAGS,;t t
30150 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
30151 s,@AWK@,$AWK,;t t
30152 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
30153 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
30154 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
30155 s,@LINT@,$LINT,;t t
30156 s,@LINT_OPTS@,$LINT_OPTS,;t t
30157 s,@LINT_LIBS@,$LINT_LIBS,;t t
30158 s,@LN_S@,$LN_S,;t t
30159 s,@cf_config_suffix@,$cf_config_suffix,;t t
30160 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
30161 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
30162 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
30163 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
30164 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
30165 s,@SET_MAKE@,$SET_MAKE,;t t
30166 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
30167 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
30168 s,@CTAGS@,$CTAGS,;t t
30169 s,@ETAGS@,$ETAGS,;t t
30170 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
30171 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
30172 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
30173 s,@RANLIB@,$RANLIB,;t t
30174 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
30175 s,@LD@,$LD,;t t
30176 s,@ac_ct_LD@,$ac_ct_LD,;t t
30177 s,@AR@,$AR,;t t
30178 s,@ac_ct_AR@,$ac_ct_AR,;t t
30179 s,@NM@,$NM,;t t
30180 s,@ac_ct_NM@,$ac_ct_NM,;t t
30181 s,@ARFLAGS@,$ARFLAGS,;t t
30182 s,@DESTDIR@,$DESTDIR,;t t
30183 s,@BUILD_CC@,$BUILD_CC,;t t
30184 s,@BUILD_CPP@,$BUILD_CPP,;t t
30185 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
30186 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
30187 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
30188 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
30189 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
30190 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
30191 s,@cf_list_models@,$cf_list_models,;t t
30192 s,@ABI_VERSION@,$ABI_VERSION,;t t
30193 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
30194 s,@LIBTOOL@,$LIBTOOL,;t t
30195 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
30196 s,@LT_UNDEF@,$LT_UNDEF,;t t
30197 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
30198 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
30199 s,@LIB_CREATE@,$LIB_CREATE,;t t
30200 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
30201 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
30202 s,@LIB_PREP@,$LIB_PREP,;t t
30203 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
30204 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
30205 s,@LIB_LINK@,$LIB_LINK,;t t
30206 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
30207 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
30208 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
30209 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
30210 s,@TICS_NAME@,$TICS_NAME,;t t
30211 s,@TINFO_NAME@,$TINFO_NAME,;t t
30212 s,@LIB_NAME@,$LIB_NAME,;t t
30213 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
30214 s,@CC_G_OPT@,$CC_G_OPT,;t t
30215 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
30216 s,@LD_MODEL@,$LD_MODEL,;t t
30217 s,@shlibdir@,$shlibdir,;t t
30218 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
30219 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
30220 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
30221 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
30222 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
30223 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
30224 s,@LINK_PROGS@,$LINK_PROGS,;t t
30225 s,@LINK_TESTS@,$LINK_TESTS,;t t
30226 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
30227 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
30228 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
30229 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
30230 s,@RPATH_LIST@,$RPATH_LIST,;t t
30231 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30232 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30233 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30234 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30235 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
30236 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
30237 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
30238 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
30239 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
30240 s,@TIC@,$TIC,;t t
30241 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30242 s,@INFOCMP@,$INFOCMP,;t t
30243 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
30244 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
30245 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
30246 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
30247 s,@XTERM_KBS@,$XTERM_KBS,;t t
30248 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30249 s,@TERMINFO@,$TERMINFO,;t t
30250 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30251 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30252 s,@TERMPATH@,$TERMPATH,;t t
30253 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
30254 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
30255 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
30256 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30257 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30258 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30259 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30260 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30261 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30262 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30263 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30264 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30265 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
30266 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30267 s,@RGB_PATH@,$RGB_PATH,;t t
30268 s,@no_x11_rgb@,$no_x11_rgb,;t t
30269 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30270 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
30271 s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
30272 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
30273 s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
30274 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
30275 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30276 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30277 s,@cf_manpage_format@,$cf_manpage_format,;t t
30278 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30279 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30280 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30281 s,@cf_manpage_coptions@,$cf_manpage_coptions,;t t
30282 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30283 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30284 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30285 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30286 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30287 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30288 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30289 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30290 s,@cf_cv_enable_sigwinch@,$cf_cv_enable_sigwinch,;t t
30291 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30292 s,@PTHREAD@,$PTHREAD,;t t
30293 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30294 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30295 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30296 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30297 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30298 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30299 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30300 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30301 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30302 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30303 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30304 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30305 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30306 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30307 s,@ECHO_LT@,$ECHO_LT,;t t
30308 s,@ECHO_LD@,$ECHO_LD,;t t
30309 s,@RULE_CC@,$RULE_CC,;t t
30310 s,@SHOW_CC@,$SHOW_CC,;t t
30311 s,@ECHO_CC@,$ECHO_CC,;t t
30312 s,@ECHO_LINK@,$ECHO_LINK,;t t
30313 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30314 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30315 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30316 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30317 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30318 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30319 s,@ADAFLAGS@,$ADAFLAGS,;t t
30320 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30321 s,@ADA_TRACE@,$ADA_TRACE,;t t
30322 s,@MATH_LIB@,$MATH_LIB,;t t
30323 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30324 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30325 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30326 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30327 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30328 s,@TEST_LIBS@,$TEST_LIBS,;t t
30329 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30330 s,@CXXCPP@,$CXXCPP,;t t
30331 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30332 s,@CXX_AR@,$CXX_AR,;t t
30333 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30334 s,@CXXLIBS@,$CXXLIBS,;t t
30335 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30336 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30337 s,@cf_compile_generics@,$cf_compile_generics,;t t
30338 s,@cf_generic_objects@,$cf_generic_objects,;t t
30339 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30340 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30341 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30342 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30343 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30344 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30345 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30346 s,@cf_ada_package@,$cf_ada_package,;t t
30347 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30348 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30349 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30350 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30351 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30352 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30353 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30354 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30355 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30356 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30357 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30358 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30359 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30360 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30361 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30362 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30363 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30364 s,@TICS_LIBS@,$TICS_LIBS,;t t
30365 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30366 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30367 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30368 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30369 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30370 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30371 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30372 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30373 s,@includesubdir@,$includesubdir,;t t
30374 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30375 s,@TICS_LIST@,$TICS_LIST,;t t
30376 s,@TINFO_LIST@,$TINFO_LIST,;t t
30377 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30378 s,@FORM_NAME@,$FORM_NAME,;t t
30379 s,@MENU_NAME@,$MENU_NAME,;t t
30380 s,@PANEL_NAME@,$PANEL_NAME,;t t
30381 s,@CXX_NAME@,$CXX_NAME,;t t
30382 s,@TEST_ARGS@,$TEST_ARGS,;t t
30383 s,@TEST_DEPS@,$TEST_DEPS,;t t
30384 s,@TEST_ARG2@,$TEST_ARG2,;t t
30385 s,@TEST_DEP2@,$TEST_DEP2,;t t
30386 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30387 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30388 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30389 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30390 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30391 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30392 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30393 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30394 s,@cross_compiling@,$cross_compiling,;t t
30395 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30396 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30397 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30398 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30399 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30400 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30401 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30402 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30403 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30404 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30405 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30406 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30407 CEOF
30408
30409 EOF
30410
30411   cat >>"$CONFIG_STATUS" <<\EOF
30412   # Split the substitutions into bite-sized pieces for seds with
30413   # small command number limits, like on Digital OSF/1 and HP-UX.
30414   ac_max_sed_lines=48
30415   ac_sed_frag=1 # Number of current file.
30416   ac_beg=1 # First line for current file.
30417   ac_end=$ac_max_sed_lines # Line after last line for current file.
30418   ac_more_lines=:
30419   ac_sed_cmds=
30420   while "$ac_more_lines"; do
30421     if test "$ac_beg" -gt 1; then
30422       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30423     else
30424       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30425     fi
30426     if test ! -s "$tmp"/subs.frag; then
30427       ac_more_lines=false
30428     else
30429       # The purpose of the label and of the branching condition is to
30430       # speed up the sed processing (if there are no `@' at all, there
30431       # is no need to browse any of the substitutions).
30432       # These are the two extra sed commands mentioned above.
30433       (echo ':t
30434   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30435       # It is possible to make a multiline substitution using escaped newlines.
30436       # Ensure that we do not split the substitution between script fragments.
30437       ac_BEG=$ac_end
30438       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30439       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30440       if test -s "$tmp"/subs.next; then
30441         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30442         if test ! -s "$tmp"/subs.edit; then
30443           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30444           if test ! -s "$tmp"/subs.edit; then
30445             if test "$ac_beg" -gt 1; then
30446               ac_end=`expr "$ac_end" - 1`
30447               continue
30448             fi
30449           fi
30450         fi
30451       fi
30452
30453       if test -z "$ac_sed_cmds"; then
30454         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30455       else
30456         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30457       fi
30458       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30459       ac_beg=$ac_end
30460       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30461     fi
30462   done
30463   if test -z "$ac_sed_cmds"; then
30464     ac_sed_cmds="cat"
30465   fi
30466 fi # test -n "$CONFIG_FILES"
30467
30468 EOF
30469 cat >>"$CONFIG_STATUS" <<\EOF
30470 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30471   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30472   case "$ac_file" in
30473   - | *:- | *:-:* ) # input from stdin
30474         cat >"$tmp"/stdin
30475         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30476         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30477   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30478         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30479   * )   ac_file_in=$ac_file.in ;;
30480   esac
30481
30482   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30483   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30484          X"$ac_file" : 'X\(//\)[^/]' \| \
30485          X"$ac_file" : 'X\(//\)$' \| \
30486          X"$ac_file" : 'X\(/\)' \| \
30487          .     : '\(.\)' 2>/dev/null ||
30488 echo X"$ac_file" |
30489     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30490           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30491           /^X\(\/\/\)$/{ s//\1/; q; }
30492           /^X\(\/\).*/{ s//\1/; q; }
30493           s/.*/./; q'`
30494   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30495     { case "$ac_dir" in
30496   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30497   *)                      as_incr_dir=.;;
30498 esac
30499 as_dummy="$ac_dir"
30500 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30501   case $as_mkdir_dir in
30502     # Skip DOS drivespec
30503     ?:) as_incr_dir=$as_mkdir_dir ;;
30504     *)
30505       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30506       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30507     ;;
30508   esac
30509 done; }
30510
30511     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30512     # A "../" for each directory in $ac_dir_suffix.
30513     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30514   else
30515     ac_dir_suffix= ac_dots=
30516   fi
30517
30518   case "$srcdir" in
30519   .)  ac_srcdir=.
30520       if test -z "$ac_dots"; then
30521          ac_top_srcdir=.
30522       else
30523          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30524       fi ;;
30525   [\\/]* | ?:[\\/]* )
30526       ac_srcdir="$srcdir$ac_dir_suffix";
30527       ac_top_srcdir="$srcdir" ;;
30528   *) # Relative path.
30529     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30530     ac_top_srcdir="$ac_dots$srcdir" ;;
30531   esac
30532
30533   case $INSTALL in
30534   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30535   *) ac_INSTALL=$ac_dots$INSTALL ;;
30536   esac
30537
30538   if test x"$ac_file" != x-; then
30539     { echo "$as_me:30539: creating $ac_file" >&5
30540 echo "$as_me: creating $ac_file" >&6;}
30541     rm -f "$ac_file"
30542   fi
30543   # Let's still pretend it is `configure' which instantiates (i.e., don't
30544   # use $as_me), people would be surprised to read:
30545   #    /* config.h.  Generated automatically by config.status.  */
30546   configure_input="Generated automatically from `echo $ac_file_in |
30547                                                  sed 's,.*/,,'` by configure."
30548
30549   # First look for the input files in the build tree, otherwise in the
30550   # src tree.
30551   ac_file_inputs=`IFS=:
30552     for f in $ac_file_in; do
30553       case $f in
30554       -) echo "$tmp"/stdin ;;
30555       [\\/$]*)
30556          # Absolute (can't be DOS-style, as IFS=:)
30557          test -f "$f" || { { echo "$as_me:30557: error: cannot find input file: $f" >&5
30558 echo "$as_me: error: cannot find input file: $f" >&2;}
30559    { (exit 1); exit 1; }; }
30560          echo "$f";;
30561       *) # Relative
30562          if test -f "$f"; then
30563            # Build tree
30564            echo "$f"
30565          elif test -f "$srcdir/$f"; then
30566            # Source tree
30567            echo "$srcdir/$f"
30568          else
30569            # /dev/null tree
30570            { { echo "$as_me:30570: error: cannot find input file: $f" >&5
30571 echo "$as_me: error: cannot find input file: $f" >&2;}
30572    { (exit 1); exit 1; }; }
30573          fi;;
30574       esac
30575     done` || { (exit 1); exit 1; }
30576 EOF
30577 cat >>"$CONFIG_STATUS" <<\EOF
30578   ac_warn_datarootdir=no
30579   if test x"$ac_file" != x-; then
30580     for ac_item in $ac_file_inputs
30581     do
30582       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30583       if test -n "$ac_seen"; then
30584         ac_used=`grep '@datarootdir@' "$ac_item"`
30585         if test -z "$ac_used"; then
30586           { echo "$as_me:30586: WARNING: datarootdir was used implicitly but not set:
30587 $ac_seen" >&5
30588 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30589 $ac_seen" >&2;}
30590           ac_warn_datarootdir=yes
30591         fi
30592       fi
30593       ac_seen=`grep '${datarootdir}' "$ac_item"`
30594       if test -n "$ac_seen"; then
30595         { echo "$as_me:30595: WARNING: datarootdir was used explicitly but not set:
30596 $ac_seen" >&5
30597 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30598 $ac_seen" >&2;}
30599         ac_warn_datarootdir=yes
30600       fi
30601     done
30602   fi
30603
30604 if test "x$ac_warn_datarootdir" = xyes; then
30605   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30606 fi
30607
30608 EOF
30609 cat >>"$CONFIG_STATUS" <<EOF
30610   sed "$ac_vpsub
30611 $extrasub
30612 EOF
30613 cat >>"$CONFIG_STATUS" <<\EOF
30614 :t
30615 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30616 s,@configure_input@,$configure_input,;t t
30617 s,@srcdir@,$ac_srcdir,;t t
30618 s,@top_srcdir@,$ac_top_srcdir,;t t
30619 s,@INSTALL@,$ac_INSTALL,;t t
30620 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30621   rm -f "$tmp"/stdin
30622 EOF
30623 test -n "${FGREP}" || FGREP="grep -F"
30624 test -n "${EGREP}" || EGREP="grep -E"
30625 cat >>"$CONFIG_STATUS" <<EOF
30626   test -n "\${FGREP}" || FGREP="$FGREP"
30627   test -n "\${EGREP}" || EGREP="$EGREP"
30628 EOF
30629 cat >>"$CONFIG_STATUS" <<\EOF
30630   if test x"$ac_file" != x-; then
30631     cp "$tmp/out" "$ac_file"
30632
30633     for ac_name in prefix exec_prefix datarootdir
30634     do
30635         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30636         if test -n "$ac_seen"; then
30637             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30638             if test -z "$ac_init"; then
30639               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30640               { echo "$as_me:30640: WARNING: Variable $ac_name is used but was not set:
30641 $ac_seen" >&5
30642 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30643 $ac_seen" >&2;}
30644             fi
30645         fi
30646     done
30647     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30648     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30649     if test -s "$tmp"/out; then
30650       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30651       { echo "$as_me:30651: WARNING: Some variables may not be substituted:
30652 $ac_seen" >&5
30653 echo "$as_me: WARNING: Some variables may not be substituted:
30654 $ac_seen" >&2;}
30655     fi
30656   else
30657     cat "$tmp"/out
30658   fi
30659   rm -f "$tmp"/out
30660
30661 done
30662 EOF
30663 cat >>"$CONFIG_STATUS" <<\EOF
30664
30665 #
30666 # CONFIG_HEADER section.
30667 #
30668
30669 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30670 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30671 #
30672 # ac_d sets the value in "#define NAME VALUE" lines.
30673 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30674 ac_dB='[        ].*$,\1#\2'
30675 ac_dC=' '
30676 ac_dD=',;t'
30677 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30678 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30679 ac_iB='\([      ]\),\1#\2define\3'
30680 ac_iC=' '
30681 ac_iD='\4,;t'
30682 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30683 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30684 ac_uB='$,\1#\2define\3'
30685 ac_uC=' '
30686 ac_uD=',;t'
30687
30688 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30689   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30690   case "$ac_file" in
30691   - | *:- | *:-:* ) # input from stdin
30692         cat >"$tmp"/stdin
30693         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30694         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30695   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30696         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30697   * )   ac_file_in=$ac_file.in ;;
30698   esac
30699
30700   test x"$ac_file" != x- && { echo "$as_me:30700: creating $ac_file" >&5
30701 echo "$as_me: creating $ac_file" >&6;}
30702
30703   # First look for the input files in the build tree, otherwise in the
30704   # src tree.
30705   ac_file_inputs=`IFS=:
30706     for f in $ac_file_in; do
30707       case $f in
30708       -) echo "$tmp"/stdin ;;
30709       [\\/$]*)
30710          # Absolute (can't be DOS-style, as IFS=:)
30711          test -f "$f" || { { echo "$as_me:30711: error: cannot find input file: $f" >&5
30712 echo "$as_me: error: cannot find input file: $f" >&2;}
30713    { (exit 1); exit 1; }; }
30714          echo $f;;
30715       *) # Relative
30716          if test -f "$f"; then
30717            # Build tree
30718            echo $f
30719          elif test -f "$srcdir/$f"; then
30720            # Source tree
30721            echo "$srcdir/$f"
30722          else
30723            # /dev/null tree
30724            { { echo "$as_me:30724: error: cannot find input file: $f" >&5
30725 echo "$as_me: error: cannot find input file: $f" >&2;}
30726    { (exit 1); exit 1; }; }
30727          fi;;
30728       esac
30729     done` || { (exit 1); exit 1; }
30730   # Remove the trailing spaces.
30731   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30732
30733 EOF
30734
30735 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30736 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30737 # be either 'cat' or 'sort'.
30738 cat confdefs.h | uniq >conftest.vals
30739
30740 # Break up conftest.vals because some shells have a limit on
30741 # the size of here documents, and old seds have small limits too.
30742
30743 rm -f conftest.tail
30744 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30745 while grep . conftest.vals >/dev/null
30746 do
30747   # Write chunks of a limited-size here document to conftest.frag.
30748   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30749   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30750   echo 'CEOF' >> "$CONFIG_STATUS"
30751   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30752   rm -f conftest.vals
30753   mv conftest.tail conftest.vals
30754 done
30755 rm -f conftest.vals
30756
30757 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30758 # marker @DEFS@.
30759 echo '  cat >> conftest.edit <<CEOF
30760 /@DEFS@/r conftest.frag
30761 /@DEFS@/d
30762 CEOF
30763 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30764 rm -f "$tmp"/in
30765 mv "$tmp"/out "$tmp"/in
30766 rm -f conftest.edit conftest.frag
30767 ' >> "$CONFIG_STATUS"
30768
30769 cat >>"$CONFIG_STATUS" <<\EOF
30770   # Let's still pretend it is `configure' which instantiates (i.e., don't
30771   # use $as_me), people would be surprised to read:
30772   #    /* config.h.  Generated automatically by config.status.  */
30773   if test x"$ac_file" = x-; then
30774     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30775   else
30776     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30777   fi
30778   cat "$tmp"/in >>"$tmp"/config.h
30779   rm -f "$tmp"/in
30780   if test x"$ac_file" != x-; then
30781     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30782       { echo "$as_me:30782: $ac_file is unchanged" >&5
30783 echo "$as_me: $ac_file is unchanged" >&6;}
30784     else
30785       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30786          X"$ac_file" : 'X\(//\)[^/]' \| \
30787          X"$ac_file" : 'X\(//\)$' \| \
30788          X"$ac_file" : 'X\(/\)' \| \
30789          .     : '\(.\)' 2>/dev/null ||
30790 echo X"$ac_file" |
30791     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30792           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30793           /^X\(\/\/\)$/{ s//\1/; q; }
30794           /^X\(\/\).*/{ s//\1/; q; }
30795           s/.*/./; q'`
30796       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30797         { case "$ac_dir" in
30798   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30799   *)                      as_incr_dir=.;;
30800 esac
30801 as_dummy="$ac_dir"
30802 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30803   case $as_mkdir_dir in
30804     # Skip DOS drivespec
30805     ?:) as_incr_dir=$as_mkdir_dir ;;
30806     *)
30807       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30808       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30809     ;;
30810   esac
30811 done; }
30812
30813       fi
30814       rm -f "$ac_file"
30815       mv "$tmp/config.h" "$ac_file"
30816     fi
30817   else
30818     cat "$tmp"/config.h
30819     rm -f "$tmp"/config.h
30820   fi
30821 done
30822 EOF
30823 cat >>"$CONFIG_STATUS" <<\EOF
30824 #
30825 # CONFIG_COMMANDS section.
30826 #
30827 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30828   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30829   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30830
30831   case "$ac_dest" in
30832     default )
30833 if test "x$cf_with_tests" != xno ; then
30834
30835 for cf_dir in test
30836 do
30837         if test ! -d "$srcdir/$cf_dir" ; then
30838                 continue
30839         elif test -f "$srcdir/$cf_dir/programs" ; then
30840                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30841         fi
30842 done
30843
30844 fi
30845
30846 cf_prefix=$LIB_PREFIX
30847
30848 case "$cf_cv_shlib_version" in
30849 (cygdll|msysdll|mingw|msvcdll)
30850         TINFO_NAME=$TINFO_ARG_SUFFIX
30851         TINFO_SUFFIX=.dll
30852         ;;
30853 esac
30854
30855 if test -n "$TINFO_SUFFIX" ; then
30856         case "$TINFO_SUFFIX" in
30857         (tw*)
30858                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30859                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30860                 ;;
30861         (t*)
30862                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30863                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30864                 ;;
30865         (w*)
30866                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30867                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30868                 ;;
30869         esac
30870 fi
30871
30872 for cf_dir in $SRC_SUBDIRS
30873 do
30874         if test ! -d "$srcdir/$cf_dir" ; then
30875                 continue
30876         elif test -f "$srcdir/$cf_dir/modules" ; then
30877
30878                 SHARED_LIB=
30879                 Libs_To_Make=
30880                 cf_awk_program=
30881                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30882                 then
30883                         cf_awk_program="$cf_awk_program\
30884 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30885 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30886 "
30887                 fi
30888
30889                 if test "x$WILDCARD_SYMS" = xno
30890                 then
30891                         cf_awk_program="$cf_awk_program\
30892 /[      ]_\\*;/ { skip=1; next; }\
30893 "
30894                 fi
30895
30896                 if test "x$cf_awk_program" != "x"
30897                 then
30898                         cat >>$cf_dir/Makefile <<CF_EOF
30899
30900 # Generated by CF_LIB_RULES
30901 resulting.map: $UNALTERED_SYMS
30902         $AWK 'BEGIN { skip = 1; last=""; } \
30903 $cf_awk_program \
30904 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30905  skip = 0; last = \$\$0; } \
30906 END { print last; }' < "$UNALTERED_SYMS" >\$@
30907
30908 distclean::
30909         rm -f resulting.map
30910 CF_EOF
30911                 fi
30912
30913                 for cf_item in $cf_LIST_MODELS
30914                 do
30915
30916         case X$cf_item in
30917         (Xlibtool)
30918                 cf_suffix='.la'
30919                 cf_depsuf=$cf_suffix
30920                 ;;
30921         (Xdebug)
30922                 case "$cf_cv_system_name" in
30923                 (*-msvc*)
30924                         cf_suffix='_g.lib'
30925                         ;;
30926                 (*)
30927                         cf_suffix='_g.a'
30928                         ;;
30929                 esac
30930                 cf_depsuf=$cf_suffix
30931                 ;;
30932         (Xprofile)
30933                 case "$cf_cv_system_name" in
30934                 (*-msvc*)
30935                         cf_suffix='_p.lib'
30936                         ;;
30937                 (*)
30938                         cf_suffix='_p.a'
30939                         ;;
30940                 esac
30941                 cf_depsuf=$cf_suffix
30942                 ;;
30943         (Xshared)
30944                 case "$cf_cv_system_name" in
30945                 (aix[5-7]*)
30946                         cf_suffix='.so'
30947                         cf_depsuf=$cf_suffix
30948                         ;;
30949                 (*-msvc*)
30950                         cf_suffix='.dll'
30951                         cf_depsuf='.dll.lib'
30952                         ;;
30953                 (cygwin*|msys*|mingw*)
30954                         cf_suffix='.dll'
30955                         cf_depsuf='.dll.a'
30956                         ;;
30957                 (darwin*)
30958                         cf_suffix='.dylib'
30959                         cf_depsuf=$cf_suffix
30960                         ;;
30961                 (hpux*)
30962                         case "$target" in
30963                         (ia64*)
30964                                 cf_suffix='.so'
30965                                 cf_depsuf=$cf_suffix
30966                                 ;;
30967                         (*)
30968                                 cf_suffix='.sl'
30969                                 cf_depsuf=$cf_suffix
30970                                 ;;
30971                         esac
30972                         ;;
30973                 (*)
30974                         cf_suffix='.so'
30975                         cf_depsuf=$cf_suffix
30976                         ;;
30977                 esac
30978                 ;;
30979         (*)
30980                 case "$target" in
30981                 (*-msvc*)
30982                         cf_suffix='.lib'
30983                         ;;
30984                 (*)
30985                         cf_suffix='.a'
30986                         ;;
30987                 esac
30988                 cf_depsuf=$cf_suffix
30989                 ;;
30990         esac
30991         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30992         then
30993                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30994                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30995         fi
30996
30997                         if test "$cf_dir" = "c++"
30998                         then
30999
31000 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31001
31002 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31003
31004                         else
31005
31006 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31007
31008 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31009
31010                         fi
31011                         test -z "$cf_libname" && cf_libname="$cf_dir"
31012                         if test "$cf_item" = shared ; then
31013                                 if test -n "${LIB_SUFFIX}"
31014                                 then
31015                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
31016                                 else
31017                                         cf_shared_suffix="$cf_suffix"
31018                                 fi
31019                                 if test "$cf_cv_do_symlinks" = yes ; then
31020                                         cf_version_name=
31021
31022                                         case "$cf_cv_shlib_version" in
31023                                         (rel)
31024                                                 cf_version_name=REL_VERSION
31025                                                 ;;
31026                                         (abi)
31027                                                 cf_version_name=ABI_VERSION
31028                                                 ;;
31029                                         esac
31030
31031                                         if test -n "$cf_version_name"
31032                                         then
31033                                                 case "$cf_cv_system_name" in
31034                                                 (darwin*)
31035                                                         # "w", etc?
31036                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
31037                                                         ;;
31038                                                 (*)
31039                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
31040                                                         ;;
31041                                                 esac
31042                                         fi
31043                                         if test -n "${USE_LIB_SUFFIX}"
31044                                         then
31045                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
31046                                         else
31047                                                 cf_shared_suffix="$cf_suffix"
31048                                         fi
31049                                 fi
31050                                 # cygwin needs import library, and has unique naming convention
31051                                 # use autodetected ${cf_prefix} for import lib and static lib, but
31052                                 # use 'cyg' prefix for shared lib.
31053                                 case "$cf_cv_shlib_version" in
31054                                 (cygdll)
31055                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31056                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
31057                                         ;;
31058                                 (msysdll)
31059                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31060                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
31061                                         ;;
31062                                 (mingw)
31063                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31064                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
31065                                         ;;
31066                                 (msvcdll)
31067                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
31068                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
31069                                         ;;
31070                                 (*)
31071                                         cf_add_lib=
31072                                         ;;
31073                                 esac
31074                                 if test -n "$cf_add_lib"
31075                                 then
31076                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
31077                                         continue
31078                                 fi
31079                         fi
31080                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
31081                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
31082                 done
31083
31084                 if test "$cf_dir" = ncurses ; then
31085                         cf_subsets="$LIB_SUBSETS"
31086                         cf_r_parts="$cf_subsets"
31087                         cf_liblist="$Libs_To_Make"
31088
31089                         while test -n "$cf_r_parts"
31090                         do
31091                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
31092                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
31093                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
31094                                         cf_add_lib=
31095                                         case "$cf_l_parts" in
31096                                         (*termlib*)
31097                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
31098                                                 ;;
31099                                         (*ticlib*)
31100                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
31101                                                 ;;
31102                                         (*)
31103                                                 break
31104                                                 ;;
31105                                         esac
31106                                         if test -n "$cf_add_lib"; then
31107                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
31108                                         fi
31109                                 else
31110                                         break
31111                                 fi
31112                         done
31113                 else
31114                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
31115                 fi
31116
31117                 if test "$cf_dir" = c++; then
31118                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
31119                                 cf_list=
31120                                 for cf_item in $Libs_To_Make
31121                                 do
31122                                         case "$cf_item" in
31123                                         (*.a)
31124                                                 ;;
31125                                         (*)
31126                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
31127                                                 ;;
31128                                         esac
31129                                         for cf_test in $cf_list
31130                                         do
31131                                                 if test "$cf_test" = "$cf_item"
31132                                                 then
31133                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
31134                                                         cf_item=
31135                                                         break
31136                                                 fi
31137                                         done
31138                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
31139                                 done
31140                                 Libs_To_Make="$cf_list"
31141                         fi
31142                 fi
31143
31144                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
31145                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
31146                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
31147                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
31148
31149                 $AWK -f "$srcdir/mk-0th.awk" \
31150                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
31151                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31152
31153                 for cf_subset in $cf_subsets
31154                 do
31155                         cf_subdirs=
31156                         for cf_item in $cf_LIST_MODELS
31157                         do
31158
31159                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
31160
31161 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31162
31163                         CXX_MODEL=$cf_ITEM
31164                         if test "$CXX_MODEL" = SHARED; then
31165                                 case "$cf_cv_shlib_version" in
31166                                 (cygdll|msysdll|mingw|msvcdll)
31167                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
31168
31169 echo "${as_me:-configure}:31169: testing overriding CXX_MODEL to SHARED ..." 1>&5
31170
31171                                         with_shared_cxx=yes
31172                                         ;;
31173                                 (*)
31174                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
31175                                         ;;
31176                                 esac
31177                         fi
31178
31179         case X$cf_item in
31180         (Xlibtool)
31181                 cf_suffix='.la'
31182                 cf_depsuf=$cf_suffix
31183                 ;;
31184         (Xdebug)
31185                 case "$cf_cv_system_name" in
31186                 (*-msvc*)
31187                         cf_suffix='_g.lib'
31188                         ;;
31189                 (*)
31190                         cf_suffix='_g.a'
31191                         ;;
31192                 esac
31193                 cf_depsuf=$cf_suffix
31194                 ;;
31195         (Xprofile)
31196                 case "$cf_cv_system_name" in
31197                 (*-msvc*)
31198                         cf_suffix='_p.lib'
31199                         ;;
31200                 (*)
31201                         cf_suffix='_p.a'
31202                         ;;
31203                 esac
31204                 cf_depsuf=$cf_suffix
31205                 ;;
31206         (Xshared)
31207                 case "$cf_cv_system_name" in
31208                 (aix[5-7]*)
31209                         cf_suffix='.so'
31210                         cf_depsuf=$cf_suffix
31211                         ;;
31212                 (*-msvc*)
31213                         cf_suffix='.dll'
31214                         cf_depsuf='.dll.lib'
31215                         ;;
31216                 (cygwin*|msys*|mingw*)
31217                         cf_suffix='.dll'
31218                         cf_depsuf='.dll.a'
31219                         ;;
31220                 (darwin*)
31221                         cf_suffix='.dylib'
31222                         cf_depsuf=$cf_suffix
31223                         ;;
31224                 (hpux*)
31225                         case "$target" in
31226                         (ia64*)
31227                                 cf_suffix='.so'
31228                                 cf_depsuf=$cf_suffix
31229                                 ;;
31230                         (*)
31231                                 cf_suffix='.sl'
31232                                 cf_depsuf=$cf_suffix
31233                                 ;;
31234                         esac
31235                         ;;
31236                 (*)
31237                         cf_suffix='.so'
31238                         cf_depsuf=$cf_suffix
31239                         ;;
31240                 esac
31241                 ;;
31242         (*)
31243                 case "$target" in
31244                 (*-msvc*)
31245                         cf_suffix='.lib'
31246                         ;;
31247                 (*)
31248                         cf_suffix='.a'
31249                         ;;
31250                 esac
31251                 cf_depsuf=$cf_suffix
31252                 ;;
31253         esac
31254         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31255         then
31256                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31257                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31258         fi
31259
31260         case $cf_item in
31261         (libtool) cf_subdir='obj_lo'  ;;
31262         (normal)  cf_subdir='objects' ;;
31263         (debug)   cf_subdir='obj_g' ;;
31264         (profile) cf_subdir='obj_p' ;;
31265         (shared)
31266                 case "$cf_cv_system_name" in
31267                 (cygwin|msys)
31268                         cf_subdir='objects' ;;
31269                 (*)
31270                         cf_subdir='obj_s' ;;
31271                 esac
31272         esac
31273
31274                         # Test for case where we build libtinfo with a different name.
31275                         cf_libname=$cf_dir
31276                         if test "$cf_dir" = ncurses ; then
31277                                 case "$cf_subset" in
31278                                 (*base*)
31279                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31280                                         ;;
31281                                 (*termlib*)
31282                                         cf_libname=$TINFO_LIB_SUFFIX
31283                                         ;;
31284                                 (ticlib*)
31285                                         cf_libname=$TICS_LIB_SUFFIX
31286                                         ;;
31287                                 esac
31288                         elif test "$cf_dir" = c++ ; then
31289
31290 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31291
31292 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31293
31294                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31295                         else
31296
31297 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31298
31299 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31300
31301                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31302                         fi
31303                         if test -n "${USE_ARG_SUFFIX}" ; then
31304                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31305                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31306                         fi
31307
31308                         # These dependencies really are for development, not
31309                         # builds, but they are useful in porting, too.
31310                         cf_depend="../include/ncurses_cfg.h"
31311                         if test "$srcdir" = "."; then
31312                                 cf_reldir="."
31313                         else
31314                                 cf_reldir="\${srcdir}"
31315                         fi
31316
31317                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31318                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31319                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31320                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31321                         fi
31322
31323                         cf_dir_suffix=
31324                         old_cf_suffix="$cf_suffix"
31325                         if test "$cf_cv_shlib_version_infix" = yes ; then
31326                         if test -n "$USE_LIB_SUFFIX" ; then
31327                                 case "$USE_LIB_SUFFIX" in
31328                                 (tw*)
31329                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31330                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31331                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31332                                         ;;
31333                                 (t*)
31334                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31335                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31336                                         cf_dir_suffix=t$EXTRA_SUFFIX
31337                                         ;;
31338                                 (w*)
31339                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31340                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31341                                         cf_dir_suffix=w$EXTRA_SUFFIX
31342                                         ;;
31343                                 (*)
31344                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31345                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31346                                         cf_dir_suffix=$EXTRA_SUFFIX
31347                                         ;;
31348                                 esac
31349                         fi
31350                         fi
31351
31352                         $AWK -f "$srcdir/mk-1st.awk" \
31353                                 name=${cf_libname}${cf_dir_suffix} \
31354                                 traces=$LIB_TRACING \
31355                                 MODEL=$cf_ITEM \
31356                                 CXX_MODEL=$CXX_MODEL \
31357                                 LIB_SUFFIX=$LIB_SUFFIX \
31358                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31359                                 make_phony="${cf_cv_make_PHONY:-no}" \
31360                                 model=$cf_subdir \
31361                                 prefix=$cf_prefix \
31362                                 suffix=$cf_suffix \
31363                                 subset=$cf_subset \
31364                                 driver=$cf_cv_term_driver \
31365                                 SymLink="$LN_S" \
31366                                 TermlibRoot=$TINFO_NAME \
31367                                 TermlibSuffix=$TINFO_SUFFIX \
31368                                 ShlibVer=$cf_cv_shlib_version \
31369                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31370                                 ReLink=${cf_cv_do_relink:-no} \
31371                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31372                                 DoLinks=$cf_cv_do_symlinks \
31373                                 rmSoLocs=$cf_cv_rm_so_locs \
31374                                 ldconfig="$LDCONFIG" \
31375                                 overwrite=$WITH_OVERWRITE \
31376                                 depend="$cf_depend" \
31377                                 host="$host" \
31378                                 libtool_version="$LIBTOOL_VERSION" \
31379                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31380
31381                         cf_suffix="$old_cf_suffix"
31382
31383                         for cf_subdir2 in $cf_subdirs lib
31384                         do
31385                                 test "$cf_subdir" = "$cf_subdir2" && break
31386                         done
31387                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31388                         $AWK -f "$srcdir/mk-2nd.awk" \
31389                                 name=$cf_dir \
31390                                 traces=$LIB_TRACING \
31391                                 MODEL=$cf_ITEM \
31392                                 model=$cf_subdir \
31393                                 subset=$cf_subset \
31394                                 srcdir=$srcdir \
31395                                 echo=$WITH_ECHO \
31396                                 crenames=$cf_cv_prog_CC_c_o \
31397                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31398                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31399                         cf_subdirs="$cf_subdirs $cf_subdir"
31400                         done
31401                 done
31402         fi
31403
31404         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31405 done
31406
31407 echo >> Makefile
31408 echo '# generated by CF_LIB_RULES' >> Makefile
31409
31410 if test "x$cf_cv_make_PHONY" = xyes ; then
31411         cat >> Makefile <<-CF_EOF
31412
31413         .PHONY :        libs
31414         .PHONY :        lintlib
31415         .PHONY :        install.includes
31416         .PHONY :        uninstall.includes
31417         .PHONY :        install.libs
31418         .PHONY :        uninstall.libs
31419 CF_EOF
31420 fi
31421
31422 for cf_dir in $SRC_SUBDIRS
31423 do
31424         if test ! -d "$srcdir/$cf_dir" ; then
31425                 continue
31426         fi
31427
31428         if test -f "$cf_dir/Makefile" ; then
31429                 case "$cf_dir" in
31430                 (Ada95)
31431                         echo 'libs \' >> Makefile
31432                         echo 'install.libs \' >> Makefile
31433                         echo 'uninstall.libs ::' >> Makefile
31434                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31435                         ;;
31436                 esac
31437         fi
31438
31439         if test -f "$srcdir/$cf_dir/modules" ; then
31440
31441                 if test "x$cf_cv_make_PHONY" = xyes ; then
31442                         cat >> Makefile <<-CF_EOF
31443
31444                         .PHONY :        install.$cf_dir
31445                         .PHONY :        uninstall.$cf_dir
31446 CF_EOF
31447                 fi
31448
31449                 echo >> Makefile
31450                 if test -f "$srcdir/$cf_dir/headers" ; then
31451 cat >> Makefile <<CF_EOF
31452 install.includes \\
31453 uninstall.includes \\
31454 CF_EOF
31455                 fi
31456
31457 cat >> Makefile <<CF_EOF
31458 lint \\
31459 libs \\
31460 lintlib \\
31461 install.libs \\
31462 uninstall.libs \\
31463 install.$cf_dir \\
31464 uninstall.$cf_dir ::
31465         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31466 CF_EOF
31467         elif test -f "$srcdir/$cf_dir/headers" ; then
31468 cat >> Makefile <<CF_EOF
31469
31470 libs \\
31471 install.libs \\
31472 uninstall.libs \\
31473 install.includes \\
31474 uninstall.includes ::
31475         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31476 CF_EOF
31477 fi
31478 done
31479
31480 if test "x$cf_cv_make_PHONY" = xyes ; then
31481         cat >> Makefile <<-CF_EOF
31482
31483         .PHONY :        install.data
31484         .PHONY :        uninstall.data
31485 CF_EOF
31486 fi
31487
31488 if test "x$cf_with_db_install" = xyes; then
31489 cat >> Makefile <<CF_EOF
31490
31491 install.libs uninstall.libs \\
31492 install.data uninstall.data ::
31493 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31494 CF_EOF
31495 else
31496 cat >> Makefile <<CF_EOF
31497
31498 install.libs uninstall.libs ::
31499         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31500 CF_EOF
31501 fi
31502
31503 if test "x$cf_with_manpages" = xyes; then
31504
31505 if test "x$cf_cv_make_PHONY" = xyes ; then
31506         cat >> Makefile <<-CF_EOF
31507
31508         .PHONY :        install.man
31509         .PHONY :        uninstall.man
31510 CF_EOF
31511 fi
31512
31513 cat >> Makefile <<CF_EOF
31514
31515 install.man \\
31516 uninstall.man ::
31517         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31518 CF_EOF
31519 fi
31520
31521 cat >> Makefile <<CF_EOF
31522
31523 distclean ::
31524         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31525         rm -f headers.sh headers.sed mk_shared_lib.sh
31526         rm -f edit_man.* man_alias.* *.tmp
31527         rm -rf \${DIRS_TO_MAKE}
31528 CF_EOF
31529
31530 rm -f headers.sed headers.sh
31531
31532 echo creating headers.sh
31533 cat >headers.sh <<CF_EOF
31534 #! $SHELL
31535 # This shell script is generated by the 'configure' script.  It is invoked in a
31536 # subdirectory of the build tree.  It generates a sed-script in the parent
31537 # directory that is used to adjust includes for header files that reside in a
31538 # subdirectory of /usr/include, etc.
31539 PRG=""
31540 while test \$# != 3
31541 do
31542 PRG="\$PRG \$1"; shift
31543 done
31544 DST=\$1
31545 REF=\$2
31546 SRC=\$3
31547 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31548 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31549 echo installing \$SRC in \$DST
31550 CF_EOF
31551
31552 if test "$WITH_CURSES_H" = yes; then
31553         cat >>headers.sh <<CF_EOF
31554 case \$DST in
31555 (/*/include/*)
31556         END=\`basename \$DST\`
31557         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31558         do
31559                 NAME=\`basename \$i\`
31560                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31561         done
31562         ;;
31563 (*)
31564         echo "" >> \$TMPSED
31565         ;;
31566 esac
31567 CF_EOF
31568
31569 else
31570         cat >>headers.sh <<CF_EOF
31571 case \$DST in
31572 (/*/include/*)
31573         END=\`basename \$DST\`
31574         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31575         do
31576                 NAME=\`basename \$i\`
31577                 if test "\$NAME" = "curses.h"
31578                 then
31579                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31580                         NAME=ncurses.h
31581                 fi
31582                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31583         done
31584         ;;
31585 (*)
31586         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31587         ;;
31588 esac
31589 CF_EOF
31590 fi
31591 cat >>headers.sh <<CF_EOF
31592 rm -f \$TMPSRC
31593 sed -f \$TMPSED \$SRC > \$TMPSRC
31594 NAME=\`basename \$SRC\`
31595 CF_EOF
31596 if test "$WITH_CURSES_H" != yes; then
31597         cat >>headers.sh <<CF_EOF
31598 test "\$NAME" = "curses.h" && NAME=ncurses.h
31599 CF_EOF
31600 fi
31601 cat >>headers.sh <<CF_EOF
31602 # Just in case someone gzip'd manpages, remove the conflicting copy.
31603 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31604
31605 eval \$PRG \$TMPSRC \$DST/\$NAME
31606 rm -f \$TMPSRC \$TMPSED
31607 CF_EOF
31608
31609 chmod 0755 headers.sh
31610
31611 for cf_dir in $SRC_SUBDIRS
31612 do
31613         if test ! -d "$srcdir/$cf_dir" ; then
31614                 continue
31615         fi
31616
31617         if test -f "$srcdir/$cf_dir/headers" ; then
31618                 $AWK -f "$srcdir/mk-hdr.awk" \
31619                         subset="$LIB_SUBSETS" \
31620                         compat="$WITH_CURSES_H" \
31621                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31622         fi
31623
31624         if test -f "$srcdir/$cf_dir/modules" ; then
31625                 if test "$cf_dir" != "c++" ; then
31626                         if test "x$cf_cv_make_PHONY" = xyes ; then
31627                                 cat >> $cf_dir/Makefile <<-CF_EOF
31628
31629                                 .PHONY :        depend
31630 CF_EOF
31631                         fi
31632
31633                         cat >>$cf_dir/Makefile <<"CF_EOF"
31634 depend : ${AUTO_SRC}
31635         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31636
31637 # DO NOT DELETE THIS LINE -- make depend depends on it.
31638 CF_EOF
31639                 fi
31640         fi
31641 done
31642
31643 if test "$MANPAGE_RENAMES" != no ; then
31644         # Construct a sed-script to perform renaming within man-pages
31645         test -n "$verbose" && echo "creating edit_man.sed"
31646         test ! -d man && mkdir man
31647         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31648 fi
31649
31650 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31651 if test -z "$USE_OLD_MAKERULES" ; then
31652         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31653 fi
31654 fi
31655  ;;
31656   esac
31657 done
31658 EOF
31659
31660 cat >>"$CONFIG_STATUS" <<\EOF
31661
31662 { (exit 0); exit 0; }
31663 EOF
31664 chmod +x "$CONFIG_STATUS"
31665 ac_clean_files=$ac_clean_files_save
31666
31667 # configure is writing to config.log, and then calls config.status.
31668 # config.status does its own redirection, appending to config.log.
31669 # Unfortunately, on DOS this fails, as config.log is still kept open
31670 # by configure, so config.status won't be able to write to it; its
31671 # output is simply discarded.  So we exec the FD to /dev/null,
31672 # effectively closing config.log, so it can be properly (re)opened and
31673 # appended to by config.status.  When coming back to configure, we
31674 # need to make the FD available again.
31675 if test "$no_create" != yes; then
31676   ac_cs_success=:
31677   exec 5>/dev/null
31678   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31679   exec 5>>config.log
31680   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31681   # would make configure fail if this is the last instruction.
31682   "$ac_cs_success" || { (exit 1); exit 1; }
31683 fi
31684 ${MAKE:-make} preinstall