]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20230722
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.765 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230114.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --enable-widec          compile with wide-char/UTF-8 code
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        override fallback type of bool variable
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    compile using signed Boolean's in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
833   --enable-opaque-form    make form-library structures "opaque"
834   --enable-opaque-menu    make menu-library structures "opaque"
835   --enable-opaque-panel   make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-colorfgbg      compile-in experimental $COLORFGBG code
845   --enable-fvisibility    compile with -fvisibility=hidden
846   --enable-interop        compile-in interop bindings
847   --enable-safe-sprintf   compile with experimental safe-sprintf code
848   --disable-scroll-hints  compile without scroll-hints code
849   --enable-wgetch-events  compile with wgetch-events code
850   --enable-exp-win32      compile with experimental-Windows driver
851 Testing/development Options:
852   --disable-echo          do not display "compiling" commands
853   --disable-stripping     do not strip (debug info) installed executables
854   --with-strip-program=XX specify program to use when stripping in install
855   --enable-warnings       test: turn on gcc compiler warnings
856   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
857   --enable-string-hacks   work around bogus compiler/loader warnings
858   --enable-assertions     test: turn on generation of assertion code
859   --with-dmalloc          test: use Gray Watson's dmalloc library
860   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
861   --with-valgrind         test: use valgrind
862   --disable-leaks         test: free permanent memory, analyze leaks
863   --enable-expanded       test: generate functions for certain macros
864   --disable-macros        test: use functions rather than macros
865   --with-trace            test: add trace() function to all models of ncurses
866   --disable-gnat-projects test: disable GNAT projects even if usable
867 Ada Binding Options:
868   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
869   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
870   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
871   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
872   --with-ada-libname=XXX  override default Ada library-name
873   --with-form-libname=XXX override form basename of library
874   --with-menu-libname=XXX override menu basename of library
875   --with-panel-libname=XXX override panel basename of library
876   --with-cxx-libname=XXX override ncurses++ basename of library
877
878 Some influential environment variables:
879   CC          C compiler command
880   CFLAGS      C compiler flags
881   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
882               nonstandard directory <lib dir>
883   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
884               headers in a nonstandard directory <include dir>
885   CPP         C preprocessor
886   CXX         C++ compiler command
887   CXXFLAGS    C++ compiler flags
888   CXXCPP      C++ preprocessor
889
890 Use these variables to override the choices made by `configure' or to help
891 it to find libraries and programs with nonstandard names/locations.
892
893 EOF
894 fi
895
896 if test "$ac_init_help" = "recursive"; then
897   # If there are subdirs, report their specific --help.
898   ac_popdir=`pwd`
899   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
900     cd "$ac_subdir"
901     # A "../" for each directory in /$ac_subdir.
902     ac_dots=`echo "$ac_subdir" |
903              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
904
905     case "$srcdir" in
906     .) # No --srcdir option.  We are building in place.
907       ac_sub_srcdir="$srcdir" ;;
908     [\\/]* | ?:[\\/]* ) # Absolute path.
909       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
910     *) # Relative path.
911       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
912     esac
913
914     # Check for guested configure; otherwise get Cygnus style configure.
915     if test -f "$ac_sub_srcdir/configure.gnu"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure"; then
919       echo
920       $SHELL "$ac_sub_srcdir/configure" --help=recursive
921     elif test -f "$ac_sub_srcdir/configure.ac" ||
922            test -f "$ac_sub_srcdir/configure.in"; then
923       echo
924       "$ac_configure" --help
925     else
926       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
927     fi
928     cd "$ac_popdir"
929   done
930 fi
931
932 test -n "$ac_init_help" && exit 0
933 if "$ac_init_version"; then
934   cat <<\EOF
935
936 Copyright 2003-2022,2023        Thomas E. Dickey
937 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
938 Free Software Foundation, Inc.
939 This configure script is free software; the Free Software Foundation
940 gives unlimited permission to copy, distribute and modify it.
941 EOF
942   exit 0
943 fi
944 exec 5>config.log
945 cat >&5 <<EOF
946 This file contains any messages produced by compilers while
947 running configure, to aid debugging if configure makes a mistake.
948
949 It was created by $as_me, which was
950 generated by GNU Autoconf 2.52.20230114.  Invocation command line was
951
952   $ $0 $@
953
954 EOF
955 {
956 cat <<_ASUNAME
957 ## ---------- ##
958 ## Platform.  ##
959 ## ---------- ##
960
961 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
962 uname -m = `(uname -m) 2>/dev/null || echo unknown`
963 uname -r = `(uname -r) 2>/dev/null || echo unknown`
964 uname -s = `(uname -s) 2>/dev/null || echo unknown`
965 uname -v = `(uname -v) 2>/dev/null || echo unknown`
966
967 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
968 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
969
970 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
971 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
972 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
973 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
974 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
975 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
976 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
977
978 PATH = $PATH
979
980 _ASUNAME
981 } >&5
982
983 cat >&5 <<EOF
984 ## ------------ ##
985 ## Core tests.  ##
986 ## ------------ ##
987
988 EOF
989
990 # Keep a trace of the command line.
991 # Strip out --no-create and --no-recursion so they do not pile up.
992 # Also quote any args containing shell meta-characters.
993 ac_configure_args=
994 ac_sep=
995 for ac_arg
996 do
997   case "$ac_arg" in
998   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
999   | --no-cr | --no-c) ;;
1000   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1001   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1002   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1003     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1004     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1005     ac_sep=" " ;;
1006   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1007      ac_sep=" " ;;
1008   esac
1009   # Get rid of the leading space.
1010 done
1011
1012 # When interrupted or exit'd, cleanup temporary files, and complete
1013 # config.log.  We remove comments because anyway the quotes in there
1014 # would cause problems or look ugly.
1015 trap 'exit_status=$?
1016   # Save into config.log some information that might help in debugging.
1017   echo >&5
1018   echo "## ----------------- ##" >&5
1019   echo "## Cache variables.  ##" >&5
1020   echo "## ----------------- ##" >&5
1021   echo >&5
1022   # The following way of writing the cache mishandles newlines in values,
1023 {
1024   (set) 2>&1 |
1025     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1026     *ac_space=\ *)
1027       sed -n \
1028         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1029           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1030       ;;
1031     *)
1032       sed -n \
1033         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1034       ;;
1035     esac;
1036 } >&5
1037   sed "/^$/d" confdefs.h >conftest.log
1038   if test -s conftest.log; then
1039     echo >&5
1040     echo "## ------------ ##" >&5
1041     echo "## confdefs.h.  ##" >&5
1042     echo "## ------------ ##" >&5
1043     echo >&5
1044     cat conftest.log >&5
1045   fi
1046   (echo; echo) >&5
1047   test "$ac_signal" != 0 &&
1048     echo "$as_me: caught signal $ac_signal" >&5
1049   echo "$as_me: exit $exit_status" >&5
1050   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1051     exit $exit_status
1052      ' 0
1053 for ac_signal in 1 2 13 15; do
1054   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1055 done
1056 ac_signal=0
1057
1058 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1059 rm -rf conftest* confdefs.h
1060 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1061 echo >confdefs.h
1062
1063 # Let the site file select an alternate cache file if it wants to.
1064 # Prefer explicitly selected file to automatically selected ones.
1065 if test -z "$CONFIG_SITE"; then
1066   if test "x$prefix" != xNONE; then
1067     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1068   else
1069     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1070   fi
1071 fi
1072 for ac_site_file in $CONFIG_SITE; do
1073   if test -r "$ac_site_file"; then
1074     { echo "$as_me:1074: loading site script $ac_site_file" >&5
1075 echo "$as_me: loading site script $ac_site_file" >&6;}
1076     cat "$ac_site_file" >&5
1077     . "$ac_site_file"
1078   fi
1079 done
1080
1081 if test -r "$cache_file"; then
1082   # Some versions of bash will fail to source /dev/null (special
1083   # files actually), so we avoid doing that.
1084   if test -f "$cache_file"; then
1085     { echo "$as_me:1085: loading cache $cache_file" >&5
1086 echo "$as_me: loading cache $cache_file" >&6;}
1087     case $cache_file in
1088       [\\/]* | ?:[\\/]* ) . $cache_file;;
1089       *)                      . ./$cache_file;;
1090     esac
1091   fi
1092 else
1093   { echo "$as_me:1093: creating cache $cache_file" >&5
1094 echo "$as_me: creating cache $cache_file" >&6;}
1095   >$cache_file
1096 fi
1097
1098 # Check that the precious variables saved in the cache have kept the same
1099 # value.
1100 ac_cache_corrupted=false
1101 for ac_var in `(set) 2>&1 |
1102                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1103   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1104   eval ac_new_set=\$ac_env_${ac_var}_set
1105   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1106   eval ac_new_val="\$ac_env_${ac_var}_value"
1107   case "$ac_old_set,$ac_new_set" in
1108     set,)
1109       { echo "$as_me:1109: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1110 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1111       ac_cache_corrupted=: ;;
1112     ,set)
1113       { echo "$as_me:1113: error: \`$ac_var' was not set in the previous run" >&5
1114 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1115       ac_cache_corrupted=: ;;
1116     ,);;
1117     *)
1118       if test "x$ac_old_val" != "x$ac_new_val"; then
1119         { echo "$as_me:1119: error: \`$ac_var' has changed since the previous run:" >&5
1120 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1121         { echo "$as_me:1121:   former value:  $ac_old_val" >&5
1122 echo "$as_me:   former value:  $ac_old_val" >&2;}
1123         { echo "$as_me:1123:   current value: $ac_new_val" >&5
1124 echo "$as_me:   current value: $ac_new_val" >&2;}
1125         ac_cache_corrupted=:
1126       fi;;
1127   esac
1128   # Pass precious variables to config.status.  It doesn't matter if
1129   # we pass some twice (in addition to the command line arguments).
1130   if test "$ac_new_set" = set; then
1131     case "$ac_new_val" in
1132     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1133       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1134       ac_configure_args="$ac_configure_args '$ac_arg'"
1135       ;;
1136     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1137        ;;
1138     esac
1139   fi
1140 done
1141 if "$ac_cache_corrupted"; then
1142   { echo "$as_me:1142: error: changes in the environment can compromise the build" >&5
1143 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1144   { { echo "$as_me:1144: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1145 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1146    { (exit 1); exit 1; }; }
1147 fi
1148
1149 ac_ext=c
1150 ac_cpp='$CPP $CPPFLAGS'
1151 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1152 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1153 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1154 ac_main_return="return"
1155
1156 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1157   *c*,-n*) ECHO_N=
1158            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1159            ECHO_T='     '
1160            ;;
1161   *c*,*  ) ECHO_N=-n
1162            ECHO_C=
1163            ECHO_T=
1164            ;;
1165   *)       ECHO_N=
1166            ECHO_C='\c'
1167            ECHO_T=
1168            ;;
1169 esac
1170 echo "#! $SHELL" >conftest.sh
1171 echo  "exit 0"   >>conftest.sh
1172 chmod +x conftest.sh
1173 if { (echo "$as_me:1173: PATH=\".;.\"; conftest.sh") >&5
1174   (PATH=".;."; conftest.sh) 2>&5
1175   ac_status=$?
1176   echo "$as_me:1176: \$? = $ac_status" >&5
1177   (exit "$ac_status"); }; then
1178   ac_path_separator=';'
1179 else
1180   ac_path_separator=:
1181 fi
1182 PATH_SEPARATOR="$ac_path_separator"
1183 rm -f conftest.sh
1184
1185 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1186
1187 top_builddir=`pwd`
1188
1189 for ac_prog in ggrep grep
1190 do
1191   # Extract the first word of "$ac_prog", so it can be a program name with args.
1192 set dummy $ac_prog; ac_word=$2
1193 echo "$as_me:1193: checking for $ac_word" >&5
1194 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1195 if test "${ac_cv_prog_GREP+set}" = set; then
1196   echo $ECHO_N "(cached) $ECHO_C" >&6
1197 else
1198   if test -n "$GREP"; then
1199   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1200 else
1201   ac_save_IFS=$IFS; IFS=$ac_path_separator
1202 ac_dummy="$PATH"
1203 for ac_dir in $ac_dummy; do
1204   IFS=$ac_save_IFS
1205   test -z "$ac_dir" && ac_dir=.
1206   $as_executable_p "$ac_dir/$ac_word" || continue
1207 ac_cv_prog_GREP="$ac_prog"
1208 echo "$as_me:1208: found $ac_dir/$ac_word" >&5
1209 break
1210 done
1211
1212 fi
1213 fi
1214 GREP=$ac_cv_prog_GREP
1215 if test -n "$GREP"; then
1216   echo "$as_me:1216: result: $GREP" >&5
1217 echo "${ECHO_T}$GREP" >&6
1218 else
1219   echo "$as_me:1219: result: no" >&5
1220 echo "${ECHO_T}no" >&6
1221 fi
1222
1223   test -n "$GREP" && break
1224 done
1225 test -n "$GREP" || GREP=": "
1226
1227 echo "$as_me:1227: checking for egrep" >&5
1228 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1229 if test "${ac_cv_path_EGREP+set}" = set; then
1230   echo $ECHO_N "(cached) $ECHO_C" >&6
1231 else
1232   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1233    then ac_cv_path_EGREP="$GREP -E"
1234    else
1235      for ac_prog in gegrep egrep
1236 do
1237   # Extract the first word of "$ac_prog", so it can be a program name with args.
1238 set dummy $ac_prog; ac_word=$2
1239 echo "$as_me:1239: checking for $ac_word" >&5
1240 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1241 if test "${ac_cv_path_EGREP+set}" = set; then
1242   echo $ECHO_N "(cached) $ECHO_C" >&6
1243 else
1244   case $EGREP in
1245   [\\/]* | ?:[\\/]*)
1246   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1247   ;;
1248   *)
1249   ac_save_IFS=$IFS; IFS=$ac_path_separator
1250 ac_dummy="$PATH"
1251 for ac_dir in $ac_dummy; do
1252   IFS=$ac_save_IFS
1253   test -z "$ac_dir" && ac_dir=.
1254   if $as_executable_p "$ac_dir/$ac_word"; then
1255    ac_cv_path_EGREP="$ac_dir/$ac_word"
1256    echo "$as_me:1256: found $ac_dir/$ac_word" >&5
1257    break
1258 fi
1259 done
1260
1261   ;;
1262 esac
1263 fi
1264 EGREP=$ac_cv_path_EGREP
1265
1266 if test -n "$EGREP"; then
1267   echo "$as_me:1267: result: $EGREP" >&5
1268 echo "${ECHO_T}$EGREP" >&6
1269 else
1270   echo "$as_me:1270: result: no" >&5
1271 echo "${ECHO_T}no" >&6
1272 fi
1273
1274   test -n "$EGREP" && break
1275 done
1276 test -n "$EGREP" || EGREP=": "
1277
1278      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1278: error: cannot find workable egrep" >&5
1279 echo "$as_me: error: cannot find workable egrep" >&2;}
1280    { (exit 1); exit 1; }; }
1281    fi
1282 fi
1283 echo "$as_me:1283: result: $ac_cv_path_EGREP" >&5
1284 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1285  EGREP="$ac_cv_path_EGREP"
1286
1287 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1288 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 cf_cv_abi_version=${NCURSES_MAJOR}
1291 cf_cv_abi_default=${NCURSES_MAJOR}
1292 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1293 cf_cv_timestamp=`date`
1294 echo "$as_me:1294: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1295 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1296
1297 if test -f "$srcdir/VERSION" ; then
1298         echo "$as_me:1298: checking for package version" >&5
1299 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1300
1301         # if there are not enough fields, cut returns the last one...
1302         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1303         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1304         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1305
1306         # this is how CF_BUNDLED_INTL uses $VERSION:
1307         VERSION="$cf_field1"
1308
1309         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1310         test -z "$VERSION_MAJOR" && { { echo "$as_me:1310: error: missing major-version" >&5
1311 echo "$as_me: error: missing major-version" >&2;}
1312    { (exit 1); exit 1; }; }
1313
1314         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1315         test -z "$VERSION_MINOR" && { { echo "$as_me:1315: error: missing minor-version" >&5
1316 echo "$as_me: error: missing minor-version" >&2;}
1317    { (exit 1); exit 1; }; }
1318
1319         echo "$as_me:1319: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1320 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1321
1322         echo "$as_me:1322: checking for package patch date" >&5
1323 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1324         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1325         case .$VERSION_PATCH in
1326         (.)
1327                 { { echo "$as_me:1327: error: missing patch-date $VERSION_PATCH" >&5
1328 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1329    { (exit 1); exit 1; }; }
1330                 ;;
1331         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1332                 ;;
1333         (*)
1334                 { { echo "$as_me:1334: error: illegal patch-date $VERSION_PATCH" >&5
1335 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1336    { (exit 1); exit 1; }; }
1337                 ;;
1338         esac
1339         echo "$as_me:1339: result: $VERSION_PATCH" >&5
1340 echo "${ECHO_T}$VERSION_PATCH" >&6
1341 else
1342         { { echo "$as_me:1342: error: did not find $srcdir/VERSION" >&5
1343 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1344    { (exit 1); exit 1; }; }
1345 fi
1346
1347 # show the actual data that we have for versions:
1348 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing ABI VERSION $VERSION ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1359
1360 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1361
1362 echo "${as_me:-configure}:1362: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1363
1364         cf_PACKAGE=NCURSES
1365         PACKAGE=ncurses
1366
1367 cat >>confdefs.h <<EOF
1368 #define PACKAGE "$PACKAGE"
1369 EOF
1370
1371 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1375 EOF
1376
1377         cat >>confdefs.h <<EOF
1378 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1379 EOF
1380
1381 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1382
1383 # Check whether --with-rel-version or --without-rel-version was given.
1384 if test "${with_rel_version+set}" = set; then
1385   withval="$with_rel_version"
1386   { echo "$as_me:1386: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1387 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1388  cf_cv_rel_version=$withval
1389 fi;
1390
1391  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1392  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1393  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1394
1395 if test -n "$NCURSES_MAJOR" ; then
1396   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1397   (0)
1398         ;;
1399   (*)
1400         { { echo "$as_me:1400: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1401 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1402    { (exit 1); exit 1; }; }
1403         ;;
1404   esac
1405 else
1406   { { echo "$as_me:1406: error: Release major-version value is empty" >&5
1407 echo "$as_me: error: Release major-version value is empty" >&2;}
1408    { (exit 1); exit 1; }; }
1409 fi
1410
1411 if test -n "$NCURSES_MINOR" ; then
1412   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1413   (0)
1414         ;;
1415   (*)
1416         { { echo "$as_me:1416: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1417 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1418    { (exit 1); exit 1; }; }
1419         ;;
1420   esac
1421 else
1422   { { echo "$as_me:1422: error: Release minor-version value is empty" >&5
1423 echo "$as_me: error: Release minor-version value is empty" >&2;}
1424    { (exit 1); exit 1; }; }
1425 fi
1426
1427 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1428
1429 # Check whether --with-abi-version or --without-abi-version was given.
1430 if test "${with_abi_version+set}" = set; then
1431   withval="$with_abi_version"
1432
1433         if test "x$cf_cv_abi_version" != "x$withval"
1434         then
1435                 { echo "$as_me:1435: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1436 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1437                 case "$cf_cv_rel_version" in
1438                 (5.*)
1439                         cf_cv_rel_version=$withval.0
1440                         ;;
1441                 (6.*)
1442                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1443                         ;;
1444                 esac
1445         fi
1446         cf_cv_abi_version=$withval
1447 fi;
1448
1449 if test -n "$cf_cv_abi_version" ; then
1450   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1451   (0)
1452         ;;
1453   (*)
1454         { { echo "$as_me:1454: error: ABI version is not a number: $cf_cv_abi_version" >&5
1455 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1456    { (exit 1); exit 1; }; }
1457         ;;
1458   esac
1459 else
1460   { { echo "$as_me:1460: error: ABI version value is empty" >&5
1461 echo "$as_me: error: ABI version value is empty" >&2;}
1462    { (exit 1); exit 1; }; }
1463 fi
1464
1465 cf_cv_abi_default=$cf_cv_abi_version
1466
1467 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1468 then
1469         case "$cf_cv_rel_version" in
1470         (5.*)
1471                 cf_cv_rel_version=$with_abi_version.0
1472                 ;;
1473         esac
1474 fi
1475
1476 ac_aux_dir=
1477 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1478   if test -f "$ac_dir/install-sh"; then
1479     ac_aux_dir=$ac_dir
1480     ac_install_sh="$ac_aux_dir/install-sh -c"
1481     break
1482   elif test -f "$ac_dir/install.sh"; then
1483     ac_aux_dir=$ac_dir
1484     ac_install_sh="$ac_aux_dir/install.sh -c"
1485     break
1486   elif test -f "$ac_dir/shtool"; then
1487     ac_aux_dir=$ac_dir
1488     ac_install_sh="$ac_aux_dir/shtool install -c"
1489     break
1490   fi
1491 done
1492 if test -z "$ac_aux_dir"; then
1493   { { echo "$as_me:1493: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1494 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1495    { (exit 1); exit 1; }; }
1496 fi
1497 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1498 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1499 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1500
1501 # Make sure we can run config.sub.
1502 $ac_config_sub sun4 >/dev/null 2>&1 ||
1503   { { echo "$as_me:1503: error: cannot run $ac_config_sub" >&5
1504 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1505    { (exit 1); exit 1; }; }
1506
1507 echo "$as_me:1507: checking build system type" >&5
1508 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1509 if test "${ac_cv_build+set}" = set; then
1510   echo $ECHO_N "(cached) $ECHO_C" >&6
1511 else
1512   ac_cv_build_alias=$build_alias
1513 test -z "$ac_cv_build_alias" &&
1514   ac_cv_build_alias=`$ac_config_guess`
1515 test -z "$ac_cv_build_alias" &&
1516   { { echo "$as_me:1516: error: cannot guess build type; you must specify one" >&5
1517 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1518    { (exit 1); exit 1; }; }
1519 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1520   { { echo "$as_me:1520: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1521 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1522    { (exit 1); exit 1; }; }
1523
1524 fi
1525 echo "$as_me:1525: result: $ac_cv_build" >&5
1526 echo "${ECHO_T}$ac_cv_build" >&6
1527 build=$ac_cv_build
1528 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1529 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1530 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1531
1532 echo "$as_me:1532: checking host system type" >&5
1533 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1534 if test "${ac_cv_host+set}" = set; then
1535   echo $ECHO_N "(cached) $ECHO_C" >&6
1536 else
1537   ac_cv_host_alias=$host_alias
1538 test -z "$ac_cv_host_alias" &&
1539   ac_cv_host_alias=$ac_cv_build_alias
1540 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1541   { { echo "$as_me:1541: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1542 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1543    { (exit 1); exit 1; }; }
1544
1545 fi
1546 echo "$as_me:1546: result: $ac_cv_host" >&5
1547 echo "${ECHO_T}$ac_cv_host" >&6
1548 host=$ac_cv_host
1549 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1550 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1551 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1552
1553 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1554         echo "$as_me:1554: checking target system type" >&5
1555 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1556 if test "${ac_cv_target+set}" = set; then
1557   echo $ECHO_N "(cached) $ECHO_C" >&6
1558 else
1559   ac_cv_target_alias=$target_alias
1560 test "x$ac_cv_target_alias" = "x" &&
1561   ac_cv_target_alias=$ac_cv_host_alias
1562 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1563   { { echo "$as_me:1563: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1564 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1565    { (exit 1); exit 1; }; }
1566
1567 fi
1568 echo "$as_me:1568: result: $ac_cv_target" >&5
1569 echo "${ECHO_T}$ac_cv_target" >&6
1570 target=$ac_cv_target
1571 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1572 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1573 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1574
1575 # The aliases save the names the user supplied, while $host etc.
1576 # will get canonicalized.
1577 test -n "$target_alias" &&
1578   test "$program_prefix$program_suffix$program_transform_name" = \
1579     NONENONEs,x,x, &&
1580   program_prefix=${target_alias}-
1581         system_name="$host_os"
1582 else
1583         system_name="`(uname -s -r) 2>/dev/null`"
1584         if test -z "$system_name" ; then
1585                 system_name="`(hostname) 2>/dev/null`"
1586         fi
1587 fi
1588 test -n "$system_name" &&
1589 cat >>confdefs.h <<EOF
1590 #define SYSTEM_NAME "$system_name"
1591 EOF
1592
1593 if test "${cf_cv_system_name+set}" = set; then
1594   echo $ECHO_N "(cached) $ECHO_C" >&6
1595 else
1596   cf_cv_system_name="$system_name"
1597 fi
1598
1599 test -z "$system_name" && system_name="$cf_cv_system_name"
1600 test -n "$cf_cv_system_name" && echo "$as_me:1600: result: Configuring for $cf_cv_system_name" >&5
1601 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1602
1603 if test ".$system_name" != ".$cf_cv_system_name" ; then
1604         echo "$as_me:1604: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1605 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1606         { { echo "$as_me:1606: error: \"Please remove config.cache and try again.\"" >&5
1607 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1608    { (exit 1); exit 1; }; }
1609 fi
1610
1611 # Check whether --with-system-type or --without-system-type was given.
1612 if test "${with_system_type+set}" = set; then
1613   withval="$with_system_type"
1614   { echo "$as_me:1614: WARNING: overriding system type to $withval" >&5
1615 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1616         cf_cv_system_name=$withval
1617         host_os=$withval
1618
1619 fi;
1620
1621 ###     Save the given $CFLAGS to allow user-override.
1622 cf_user_CFLAGS="$CFLAGS"
1623
1624 ###     Default install-location
1625 echo "$as_me:1625: checking for fgrep" >&5
1626 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1627 if test "${ac_cv_path_FGREP+set}" = set; then
1628   echo $ECHO_N "(cached) $ECHO_C" >&6
1629 else
1630   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1631    then ac_cv_path_FGREP="$GREP -F"
1632    else
1633      for ac_prog in gfgrep fgrep
1634 do
1635   # Extract the first word of "$ac_prog", so it can be a program name with args.
1636 set dummy $ac_prog; ac_word=$2
1637 echo "$as_me:1637: checking for $ac_word" >&5
1638 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1639 if test "${ac_cv_path_FGREP+set}" = set; then
1640   echo $ECHO_N "(cached) $ECHO_C" >&6
1641 else
1642   case $FGREP in
1643   [\\/]* | ?:[\\/]*)
1644   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1645   ;;
1646   *)
1647   ac_save_IFS=$IFS; IFS=$ac_path_separator
1648 ac_dummy="$PATH"
1649 for ac_dir in $ac_dummy; do
1650   IFS=$ac_save_IFS
1651   test -z "$ac_dir" && ac_dir=.
1652   if $as_executable_p "$ac_dir/$ac_word"; then
1653    ac_cv_path_FGREP="$ac_dir/$ac_word"
1654    echo "$as_me:1654: found $ac_dir/$ac_word" >&5
1655    break
1656 fi
1657 done
1658
1659   ;;
1660 esac
1661 fi
1662 FGREP=$ac_cv_path_FGREP
1663
1664 if test -n "$FGREP"; then
1665   echo "$as_me:1665: result: $FGREP" >&5
1666 echo "${ECHO_T}$FGREP" >&6
1667 else
1668   echo "$as_me:1668: result: no" >&5
1669 echo "${ECHO_T}no" >&6
1670 fi
1671
1672   test -n "$FGREP" && break
1673 done
1674 test -n "$FGREP" || FGREP=": "
1675
1676      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1676: error: cannot find workable fgrep" >&5
1677 echo "$as_me: error: cannot find workable fgrep" >&2;}
1678    { (exit 1); exit 1; }; }
1679    fi
1680 fi
1681 echo "$as_me:1681: result: $ac_cv_path_FGREP" >&5
1682 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1683  FGREP="$ac_cv_path_FGREP"
1684
1685 echo "$as_me:1685: checking for prefix" >&5
1686 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1687 if test "x$prefix" = "xNONE" ; then
1688         case "$cf_cv_system_name" in
1689                 # non-vendor systems don't have a conflict
1690         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1691                 prefix=/usr
1692                 ;;
1693         (*)     prefix=$ac_default_prefix
1694                 ;;
1695         esac
1696 fi
1697 echo "$as_me:1697: result: $prefix" >&5
1698 echo "${ECHO_T}$prefix" >&6
1699
1700 if test "x$prefix" = "xNONE" ; then
1701 echo "$as_me:1701: checking for default include-directory" >&5
1702 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1703 test -n "$verbose" && echo 1>&6
1704 for cf_symbol in \
1705         "$includedir" \
1706         "$includedir/ncurses" \
1707         "$prefix/include" \
1708         "$prefix/include/ncurses" \
1709         /usr/local/include \
1710         /usr/local/include/ncurses \
1711         /usr/include \
1712         /usr/include/ncurses
1713 do
1714         cf_dir=`eval echo "$cf_symbol"`
1715         if test -f "$cf_dir/curses.h" ; then
1716         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1717                 includedir="$cf_symbol"
1718                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1719                 break
1720         fi
1721         fi
1722         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1723 done
1724 echo "$as_me:1724: result: $includedir" >&5
1725 echo "${ECHO_T}$includedir" >&6
1726 fi
1727
1728 ### Defaults for ncurses ABI
1729
1730 # ABI 5 defaults:
1731 cf_dft_ccharw_max=5
1732 cf_dft_chtype=auto
1733 cf_dft_ext_colors=no
1734 cf_dft_ext_const=no
1735 cf_dft_ext_mouse=no
1736 cf_dft_ext_putwin=no
1737 cf_dft_ext_spfuncs=no
1738 cf_dft_filter_syms=no
1739 cf_dft_interop=no
1740 cf_dft_mmask_t=auto
1741 cf_dft_opaque_curses=no
1742 cf_dft_ordinate_type=short
1743 cf_dft_signed_char=no
1744 cf_dft_tparm_arg=long
1745 cf_dft_with_lp64=no
1746
1747 # ABI 6 defaults:
1748 case x$cf_cv_abi_default in
1749 (x[6789])
1750         cf_dft_chtype=uint32_t
1751         cf_dft_ext_colors=yes
1752         cf_dft_ext_const=yes
1753         cf_dft_ext_mouse=yes
1754         cf_dft_ext_putwin=yes
1755         cf_dft_ext_spfuncs=yes
1756         cf_dft_filter_syms=yes
1757         cf_dft_interop=yes
1758         cf_dft_mmask_t=uint32_t
1759         cf_dft_tparm_arg=intptr_t
1760         cf_dft_with_lp64=yes
1761         ;;
1762 esac
1763
1764 # ABI 7 defaults:
1765 case x$cf_cv_abi_default in
1766 (x[789])
1767         cf_dft_ccharw_max=6
1768         cf_dft_mmask_t=uint64_t
1769         cf_dft_opaque_curses=yes
1770         cf_dft_ordinate_type=int
1771         cf_dft_signed_char=yes
1772         # also: remove the wgetch-events feature in ABI 7
1773         ;;
1774 esac
1775
1776 ### override ABI version, e.g., packagers
1777
1778 # Check whether --with-abi-altered or --without-abi-altered was given.
1779 if test "${with_abi_altered+set}" = set; then
1780   withval="$with_abi_altered"
1781
1782 if test -n "$withval" ; then
1783   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1784   (0)
1785         ;;
1786   (*)
1787         { { echo "$as_me:1787: error: ABI altered is not a number: $withval" >&5
1788 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1789    { (exit 1); exit 1; }; }
1790         ;;
1791   esac
1792 else
1793   { { echo "$as_me:1793: error: ABI altered value is empty" >&5
1794 echo "$as_me: error: ABI altered value is empty" >&2;}
1795    { (exit 1); exit 1; }; }
1796 fi
1797
1798         if test "$cf_cv_abi_version" != "$withval"
1799         then
1800                 { echo "$as_me:1800: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1801 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1802                 cf_cv_abi_version=$withval
1803         fi
1804
1805 fi;
1806
1807 ###     Checks for programs.
1808
1809 # Check whether --with-ada or --without-ada was given.
1810 if test "${with_ada+set}" = set; then
1811   withval="$with_ada"
1812   cf_with_ada=$withval
1813 else
1814   cf_with_ada=yes
1815 fi;
1816
1817 if test "x$cf_with_ada" = xyes
1818 then
1819         cf_prog_cc="gnatgcc gcc cc"
1820 else
1821         cf_prog_cc="gcc cc"
1822 fi
1823
1824 ac_ext=c
1825 ac_cpp='$CPP $CPPFLAGS'
1826 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1827 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1828 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1829 ac_main_return="return"
1830 if test -n "$ac_tool_prefix"; then
1831   for ac_prog in $cf_prog_cc
1832   do
1833     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1834 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1835 echo "$as_me:1835: checking for $ac_word" >&5
1836 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1837 if test "${ac_cv_prog_CC+set}" = set; then
1838   echo $ECHO_N "(cached) $ECHO_C" >&6
1839 else
1840   if test -n "$CC"; then
1841   ac_cv_prog_CC="$CC" # Let the user override the test.
1842 else
1843   ac_save_IFS=$IFS; IFS=$ac_path_separator
1844 ac_dummy="$PATH"
1845 for ac_dir in $ac_dummy; do
1846   IFS=$ac_save_IFS
1847   test -z "$ac_dir" && ac_dir=.
1848   $as_executable_p "$ac_dir/$ac_word" || continue
1849 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1850 echo "$as_me:1850: found $ac_dir/$ac_word" >&5
1851 break
1852 done
1853
1854 fi
1855 fi
1856 CC=$ac_cv_prog_CC
1857 if test -n "$CC"; then
1858   echo "$as_me:1858: result: $CC" >&5
1859 echo "${ECHO_T}$CC" >&6
1860 else
1861   echo "$as_me:1861: result: no" >&5
1862 echo "${ECHO_T}no" >&6
1863 fi
1864
1865     test -n "$CC" && break
1866   done
1867 fi
1868 if test -z "$CC"; then
1869   ac_ct_CC=$CC
1870   for ac_prog in $cf_prog_cc
1871 do
1872   # Extract the first word of "$ac_prog", so it can be a program name with args.
1873 set dummy $ac_prog; ac_word=$2
1874 echo "$as_me:1874: checking for $ac_word" >&5
1875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1876 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1877   echo $ECHO_N "(cached) $ECHO_C" >&6
1878 else
1879   if test -n "$ac_ct_CC"; then
1880   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1881 else
1882   ac_save_IFS=$IFS; IFS=$ac_path_separator
1883 ac_dummy="$PATH"
1884 for ac_dir in $ac_dummy; do
1885   IFS=$ac_save_IFS
1886   test -z "$ac_dir" && ac_dir=.
1887   $as_executable_p "$ac_dir/$ac_word" || continue
1888 ac_cv_prog_ac_ct_CC="$ac_prog"
1889 echo "$as_me:1889: found $ac_dir/$ac_word" >&5
1890 break
1891 done
1892
1893 fi
1894 fi
1895 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1896 if test -n "$ac_ct_CC"; then
1897   echo "$as_me:1897: result: $ac_ct_CC" >&5
1898 echo "${ECHO_T}$ac_ct_CC" >&6
1899 else
1900   echo "$as_me:1900: result: no" >&5
1901 echo "${ECHO_T}no" >&6
1902 fi
1903
1904   test -n "$ac_ct_CC" && break
1905 done
1906
1907   CC=$ac_ct_CC
1908 fi
1909
1910 test -z "$CC" && { { echo "$as_me:1910: error: no acceptable cc found in \$PATH" >&5
1911 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1912    { (exit 1); exit 1; }; }
1913
1914 # Provide some information about the compiler.
1915 echo "$as_me:1915:" \
1916      "checking for C compiler version" >&5
1917 ac_compiler=`set X $ac_compile; echo "$2"`
1918 { (eval echo "$as_me:1918: \"$ac_compiler --version </dev/null >&5\"") >&5
1919   (eval $ac_compiler --version </dev/null >&5) 2>&5
1920   ac_status=$?
1921   echo "$as_me:1921: \$? = $ac_status" >&5
1922   (exit "$ac_status"); }
1923 { (eval echo "$as_me:1923: \"$ac_compiler -v </dev/null >&5\"") >&5
1924   (eval $ac_compiler -v </dev/null >&5) 2>&5
1925   ac_status=$?
1926   echo "$as_me:1926: \$? = $ac_status" >&5
1927   (exit "$ac_status"); }
1928 { (eval echo "$as_me:1928: \"$ac_compiler -V </dev/null >&5\"") >&5
1929   (eval $ac_compiler -V </dev/null >&5) 2>&5
1930   ac_status=$?
1931   echo "$as_me:1931: \$? = $ac_status" >&5
1932   (exit "$ac_status"); }
1933
1934 cat >"conftest.$ac_ext" <<_ACEOF
1935 #line 1935 "configure"
1936 #include "confdefs.h"
1937
1938 int
1939 main (void)
1940 {
1941
1942   ;
1943   return 0;
1944 }
1945 _ACEOF
1946 ac_clean_files_save=$ac_clean_files
1947 ac_clean_files="$ac_clean_files a.out a.exe"
1948 # Try to create an executable without -o first, disregard a.out.
1949 # It will help us diagnose broken compilers, and finding out an intuition
1950 # of exeext.
1951 echo "$as_me:1951: checking for C compiler default output" >&5
1952 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1953 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1954 if { (eval echo "$as_me:1954: \"$ac_link_default\"") >&5
1955   (eval $ac_link_default) 2>&5
1956   ac_status=$?
1957   echo "$as_me:1957: \$? = $ac_status" >&5
1958   (exit "$ac_status"); }; then
1959   # Find the output, starting from the most likely.  This scheme is
1960 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1961 # resort.
1962 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1963                 ls a.out conftest 2>/dev/null;
1964                 ls a.* conftest.* 2>/dev/null`; do
1965   case $ac_file in
1966     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1967     a.out ) # We found the default executable, but exeext='' is most
1968             # certainly right.
1969             break;;
1970     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1971           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1972           export ac_cv_exeext
1973           break;;
1974     * ) break;;
1975   esac
1976 done
1977 else
1978   echo "$as_me: failed program was:" >&5
1979 cat "conftest.$ac_ext" >&5
1980 { { echo "$as_me:1980: error: C compiler cannot create executables" >&5
1981 echo "$as_me: error: C compiler cannot create executables" >&2;}
1982    { (exit 77); exit 77; }; }
1983 fi
1984
1985 ac_exeext=$ac_cv_exeext
1986 echo "$as_me:1986: result: $ac_file" >&5
1987 echo "${ECHO_T}$ac_file" >&6
1988
1989 # Check the compiler produces executables we can run.  If not, either
1990 # the compiler is broken, or we cross compile.
1991 echo "$as_me:1991: checking whether the C compiler works" >&5
1992 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1993 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1994 # If not cross compiling, check that we can run a simple program.
1995 if test "$cross_compiling" != yes; then
1996   if { ac_try='./$ac_file'
1997   { (eval echo "$as_me:1997: \"$ac_try\"") >&5
1998   (eval $ac_try) 2>&5
1999   ac_status=$?
2000   echo "$as_me:2000: \$? = $ac_status" >&5
2001   (exit "$ac_status"); }; }; then
2002     cross_compiling=no
2003   else
2004     if test "$cross_compiling" = maybe; then
2005         cross_compiling=yes
2006     else
2007         { { echo "$as_me:2007: error: cannot run C compiled programs.
2008 If you meant to cross compile, use \`--host'." >&5
2009 echo "$as_me: error: cannot run C compiled programs.
2010 If you meant to cross compile, use \`--host'." >&2;}
2011    { (exit 1); exit 1; }; }
2012     fi
2013   fi
2014 fi
2015 echo "$as_me:2015: result: yes" >&5
2016 echo "${ECHO_T}yes" >&6
2017
2018 rm -f a.out a.exe "conftest$ac_cv_exeext"
2019 ac_clean_files=$ac_clean_files_save
2020 # Check the compiler produces executables we can run.  If not, either
2021 # the compiler is broken, or we cross compile.
2022 echo "$as_me:2022: checking whether we are cross compiling" >&5
2023 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2024 echo "$as_me:2024: result: $cross_compiling" >&5
2025 echo "${ECHO_T}$cross_compiling" >&6
2026
2027 echo "$as_me:2027: checking for executable suffix" >&5
2028 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2029 if { (eval echo "$as_me:2029: \"$ac_link\"") >&5
2030   (eval $ac_link) 2>&5
2031   ac_status=$?
2032   echo "$as_me:2032: \$? = $ac_status" >&5
2033   (exit "$ac_status"); }; then
2034   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2035 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2036 # work properly (i.e., refer to `conftest.exe'), while it won't with
2037 # `rm'.
2038 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2039   case $ac_file in
2040     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2041     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2042           export ac_cv_exeext
2043           break;;
2044     * ) break;;
2045   esac
2046 done
2047 else
2048   { { echo "$as_me:2048: error: cannot compute EXEEXT: cannot compile and link" >&5
2049 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2050    { (exit 1); exit 1; }; }
2051 fi
2052
2053 rm -f "conftest$ac_cv_exeext"
2054 echo "$as_me:2054: result: $ac_cv_exeext" >&5
2055 echo "${ECHO_T}$ac_cv_exeext" >&6
2056
2057 rm -f "conftest.$ac_ext"
2058 EXEEXT=$ac_cv_exeext
2059 ac_exeext=$EXEEXT
2060 echo "$as_me:2060: checking for object suffix" >&5
2061 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2062 if test "${ac_cv_objext+set}" = set; then
2063   echo $ECHO_N "(cached) $ECHO_C" >&6
2064 else
2065   cat >"conftest.$ac_ext" <<_ACEOF
2066 #line 2066 "configure"
2067 #include "confdefs.h"
2068
2069 int
2070 main (void)
2071 {
2072
2073   ;
2074   return 0;
2075 }
2076 _ACEOF
2077 rm -f conftest.o conftest.obj
2078 if { (eval echo "$as_me:2078: \"$ac_compile\"") >&5
2079   (eval $ac_compile) 2>&5
2080   ac_status=$?
2081   echo "$as_me:2081: \$? = $ac_status" >&5
2082   (exit "$ac_status"); }; then
2083   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2084   case $ac_file in
2085     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2086     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2087        break;;
2088   esac
2089 done
2090 else
2091   echo "$as_me: failed program was:" >&5
2092 cat "conftest.$ac_ext" >&5
2093 { { echo "$as_me:2093: error: cannot compute OBJEXT: cannot compile" >&5
2094 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2095    { (exit 1); exit 1; }; }
2096 fi
2097
2098 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2099 fi
2100 echo "$as_me:2100: result: $ac_cv_objext" >&5
2101 echo "${ECHO_T}$ac_cv_objext" >&6
2102 OBJEXT=$ac_cv_objext
2103 ac_objext=$OBJEXT
2104 echo "$as_me:2104: checking whether we are using the GNU C compiler" >&5
2105 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2106 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2107   echo $ECHO_N "(cached) $ECHO_C" >&6
2108 else
2109   cat >"conftest.$ac_ext" <<_ACEOF
2110 #line 2110 "configure"
2111 #include "confdefs.h"
2112
2113 int
2114 main (void)
2115 {
2116 #ifndef __GNUC__
2117        choke me
2118 #endif
2119
2120   ;
2121   return 0;
2122 }
2123 _ACEOF
2124 rm -f "conftest.$ac_objext"
2125 if { (eval echo "$as_me:2125: \"$ac_compile\"") >&5
2126   (eval $ac_compile) 2>&5
2127   ac_status=$?
2128   echo "$as_me:2128: \$? = $ac_status" >&5
2129   (exit "$ac_status"); } &&
2130          { ac_try='test -s "conftest.$ac_objext"'
2131   { (eval echo "$as_me:2131: \"$ac_try\"") >&5
2132   (eval $ac_try) 2>&5
2133   ac_status=$?
2134   echo "$as_me:2134: \$? = $ac_status" >&5
2135   (exit "$ac_status"); }; }; then
2136   ac_compiler_gnu=yes
2137 else
2138   echo "$as_me: failed program was:" >&5
2139 cat "conftest.$ac_ext" >&5
2140 ac_compiler_gnu=no
2141 fi
2142 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2143 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2144
2145 fi
2146 echo "$as_me:2146: result: $ac_cv_c_compiler_gnu" >&5
2147 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2148 GCC=`test $ac_compiler_gnu = yes && echo yes`
2149 ac_test_CFLAGS=${CFLAGS+set}
2150 ac_save_CFLAGS=$CFLAGS
2151 CFLAGS="-g"
2152 echo "$as_me:2152: checking whether $CC accepts -g" >&5
2153 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2154 if test "${ac_cv_prog_cc_g+set}" = set; then
2155   echo $ECHO_N "(cached) $ECHO_C" >&6
2156 else
2157   cat >"conftest.$ac_ext" <<_ACEOF
2158 #line 2158 "configure"
2159 #include "confdefs.h"
2160
2161 int
2162 main (void)
2163 {
2164
2165   ;
2166   return 0;
2167 }
2168 _ACEOF
2169 rm -f "conftest.$ac_objext"
2170 if { (eval echo "$as_me:2170: \"$ac_compile\"") >&5
2171   (eval $ac_compile) 2>&5
2172   ac_status=$?
2173   echo "$as_me:2173: \$? = $ac_status" >&5
2174   (exit "$ac_status"); } &&
2175          { ac_try='test -s "conftest.$ac_objext"'
2176   { (eval echo "$as_me:2176: \"$ac_try\"") >&5
2177   (eval $ac_try) 2>&5
2178   ac_status=$?
2179   echo "$as_me:2179: \$? = $ac_status" >&5
2180   (exit "$ac_status"); }; }; then
2181   ac_cv_prog_cc_g=yes
2182 else
2183   echo "$as_me: failed program was:" >&5
2184 cat "conftest.$ac_ext" >&5
2185 ac_cv_prog_cc_g=no
2186 fi
2187 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2188 fi
2189 echo "$as_me:2189: result: $ac_cv_prog_cc_g" >&5
2190 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2191 if test "$ac_test_CFLAGS" = set; then
2192   CFLAGS=$ac_save_CFLAGS
2193 elif test $ac_cv_prog_cc_g = yes; then
2194   if test "$GCC" = yes; then
2195     CFLAGS="-g -O2"
2196   else
2197     CFLAGS="-g"
2198   fi
2199 else
2200   if test "$GCC" = yes; then
2201     CFLAGS="-O2"
2202   else
2203     CFLAGS=
2204   fi
2205 fi
2206 # Some people use a C++ compiler to compile C.  Since we use `exit',
2207 # in C++ we need to declare it.  In case someone uses the same compiler
2208 # for both compiling C and C++ we need to have the C++ compiler decide
2209 # the declaration of exit, since it's the most demanding environment.
2210 cat >"conftest.$ac_ext" <<_ACEOF
2211 #ifndef __cplusplus
2212   choke me
2213 #endif
2214 _ACEOF
2215 rm -f "conftest.$ac_objext"
2216 if { (eval echo "$as_me:2216: \"$ac_compile\"") >&5
2217   (eval $ac_compile) 2>&5
2218   ac_status=$?
2219   echo "$as_me:2219: \$? = $ac_status" >&5
2220   (exit "$ac_status"); } &&
2221          { ac_try='test -s "conftest.$ac_objext"'
2222   { (eval echo "$as_me:2222: \"$ac_try\"") >&5
2223   (eval $ac_try) 2>&5
2224   ac_status=$?
2225   echo "$as_me:2225: \$? = $ac_status" >&5
2226   (exit "$ac_status"); }; }; then
2227   for ac_declaration in \
2228    ''\
2229    '#include <stdlib.h>' \
2230    'extern "C" void std::exit (int) throw (); using std::exit;' \
2231    'extern "C" void std::exit (int); using std::exit;' \
2232    'extern "C" void exit (int) throw ();' \
2233    'extern "C" void exit (int);' \
2234    'void exit (int);'
2235 do
2236   cat >"conftest.$ac_ext" <<_ACEOF
2237 #line 2237 "configure"
2238 #include "confdefs.h"
2239 #include <stdlib.h>
2240 $ac_declaration
2241 int
2242 main (void)
2243 {
2244 exit (42);
2245   ;
2246   return 0;
2247 }
2248 _ACEOF
2249 rm -f "conftest.$ac_objext"
2250 if { (eval echo "$as_me:2250: \"$ac_compile\"") >&5
2251   (eval $ac_compile) 2>&5
2252   ac_status=$?
2253   echo "$as_me:2253: \$? = $ac_status" >&5
2254   (exit "$ac_status"); } &&
2255          { ac_try='test -s "conftest.$ac_objext"'
2256   { (eval echo "$as_me:2256: \"$ac_try\"") >&5
2257   (eval $ac_try) 2>&5
2258   ac_status=$?
2259   echo "$as_me:2259: \$? = $ac_status" >&5
2260   (exit "$ac_status"); }; }; then
2261   :
2262 else
2263   echo "$as_me: failed program was:" >&5
2264 cat "conftest.$ac_ext" >&5
2265 continue
2266 fi
2267 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2268   cat >"conftest.$ac_ext" <<_ACEOF
2269 #line 2269 "configure"
2270 #include "confdefs.h"
2271 $ac_declaration
2272 int
2273 main (void)
2274 {
2275 exit (42);
2276   ;
2277   return 0;
2278 }
2279 _ACEOF
2280 rm -f "conftest.$ac_objext"
2281 if { (eval echo "$as_me:2281: \"$ac_compile\"") >&5
2282   (eval $ac_compile) 2>&5
2283   ac_status=$?
2284   echo "$as_me:2284: \$? = $ac_status" >&5
2285   (exit "$ac_status"); } &&
2286          { ac_try='test -s "conftest.$ac_objext"'
2287   { (eval echo "$as_me:2287: \"$ac_try\"") >&5
2288   (eval $ac_try) 2>&5
2289   ac_status=$?
2290   echo "$as_me:2290: \$? = $ac_status" >&5
2291   (exit "$ac_status"); }; }; then
2292   break
2293 else
2294   echo "$as_me: failed program was:" >&5
2295 cat "conftest.$ac_ext" >&5
2296 fi
2297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2298 done
2299 rm -rf conftest*
2300 if test -n "$ac_declaration"; then
2301   echo '#ifdef __cplusplus' >>confdefs.h
2302   echo "$ac_declaration"    >>confdefs.h
2303   echo '#endif'             >>confdefs.h
2304 fi
2305
2306 else
2307   echo "$as_me: failed program was:" >&5
2308 cat "conftest.$ac_ext" >&5
2309 fi
2310 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2311 ac_ext=c
2312 ac_cpp='$CPP $CPPFLAGS'
2313 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2314 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2316 ac_main_return="return"
2317
2318 GCC_VERSION=none
2319 if test "$GCC" = yes ; then
2320         echo "$as_me:2320: checking version of $CC" >&5
2321 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2322         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2323         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2324         echo "$as_me:2324: result: $GCC_VERSION" >&5
2325 echo "${ECHO_T}$GCC_VERSION" >&6
2326 fi
2327
2328 INTEL_COMPILER=no
2329
2330 if test "$GCC" = yes ; then
2331         case "$host_os" in
2332         (linux*|gnu*)
2333                 echo "$as_me:2333: checking if this is really Intel C compiler" >&5
2334 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2335                 cf_save_CFLAGS="$CFLAGS"
2336                 CFLAGS="$CFLAGS -no-gcc"
2337                 cat >"conftest.$ac_ext" <<_ACEOF
2338 #line 2338 "configure"
2339 #include "confdefs.h"
2340
2341 int
2342 main (void)
2343 {
2344
2345 #ifdef __INTEL_COMPILER
2346 #else
2347 #error __INTEL_COMPILER is not defined
2348 #endif
2349
2350   ;
2351   return 0;
2352 }
2353 _ACEOF
2354 rm -f "conftest.$ac_objext"
2355 if { (eval echo "$as_me:2355: \"$ac_compile\"") >&5
2356   (eval $ac_compile) 2>&5
2357   ac_status=$?
2358   echo "$as_me:2358: \$? = $ac_status" >&5
2359   (exit "$ac_status"); } &&
2360          { ac_try='test -s "conftest.$ac_objext"'
2361   { (eval echo "$as_me:2361: \"$ac_try\"") >&5
2362   (eval $ac_try) 2>&5
2363   ac_status=$?
2364   echo "$as_me:2364: \$? = $ac_status" >&5
2365   (exit "$ac_status"); }; }; then
2366   INTEL_COMPILER=yes
2367 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2368
2369 else
2370   echo "$as_me: failed program was:" >&5
2371 cat "conftest.$ac_ext" >&5
2372 fi
2373 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2374                 CFLAGS="$cf_save_CFLAGS"
2375                 echo "$as_me:2375: result: $INTEL_COMPILER" >&5
2376 echo "${ECHO_T}$INTEL_COMPILER" >&6
2377                 ;;
2378         esac
2379 fi
2380
2381 CLANG_COMPILER=no
2382
2383 if test "$GCC" = yes ; then
2384         echo "$as_me:2384: checking if this is really Clang C compiler" >&5
2385 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2386         cf_save_CFLAGS="$CFLAGS"
2387         cat >"conftest.$ac_ext" <<_ACEOF
2388 #line 2388 "configure"
2389 #include "confdefs.h"
2390
2391 int
2392 main (void)
2393 {
2394
2395 #ifdef __clang__
2396 #else
2397 #error __clang__ is not defined
2398 #endif
2399
2400   ;
2401   return 0;
2402 }
2403 _ACEOF
2404 rm -f "conftest.$ac_objext"
2405 if { (eval echo "$as_me:2405: \"$ac_compile\"") >&5
2406   (eval $ac_compile) 2>&5
2407   ac_status=$?
2408   echo "$as_me:2408: \$? = $ac_status" >&5
2409   (exit "$ac_status"); } &&
2410          { ac_try='test -s "conftest.$ac_objext"'
2411   { (eval echo "$as_me:2411: \"$ac_try\"") >&5
2412   (eval $ac_try) 2>&5
2413   ac_status=$?
2414   echo "$as_me:2414: \$? = $ac_status" >&5
2415   (exit "$ac_status"); }; }; then
2416   CLANG_COMPILER=yes
2417
2418 else
2419   echo "$as_me: failed program was:" >&5
2420 cat "conftest.$ac_ext" >&5
2421 fi
2422 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2423         CFLAGS="$cf_save_CFLAGS"
2424         echo "$as_me:2424: result: $CLANG_COMPILER" >&5
2425 echo "${ECHO_T}$CLANG_COMPILER" >&6
2426 fi
2427
2428 CLANG_VERSION=none
2429
2430 if test "x$CLANG_COMPILER" = "xyes" ; then
2431         case "$CC" in
2432         (c[1-9][0-9]|*/c[1-9][0-9])
2433                 { echo "$as_me:2433: WARNING: replacing broken compiler alias $CC" >&5
2434 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2435                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2436                 CC=clang
2437                 ;;
2438         esac
2439
2440         echo "$as_me:2440: checking version of $CC" >&5
2441 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2442         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.].*//'`"
2443         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2444         echo "$as_me:2444: result: $CLANG_VERSION" >&5
2445 echo "${ECHO_T}$CLANG_VERSION" >&6
2446
2447         for cf_clang_opt in \
2448                 -Qunused-arguments \
2449                 -Wno-error=implicit-function-declaration
2450         do
2451                 echo "$as_me:2451: checking if option $cf_clang_opt works" >&5
2452 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2453                 cf_save_CFLAGS="$CFLAGS"
2454                 CFLAGS="$CFLAGS $cf_clang_opt"
2455                 cat >"conftest.$ac_ext" <<_ACEOF
2456 #line 2456 "configure"
2457 #include "confdefs.h"
2458
2459                         #include <stdio.h>
2460 int
2461 main (void)
2462 {
2463
2464                         printf("hello!\\n");
2465   ;
2466   return 0;
2467 }
2468 _ACEOF
2469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2470 if { (eval echo "$as_me:2470: \"$ac_link\"") >&5
2471   (eval $ac_link) 2>&5
2472   ac_status=$?
2473   echo "$as_me:2473: \$? = $ac_status" >&5
2474   (exit "$ac_status"); } &&
2475          { ac_try='test -s "conftest$ac_exeext"'
2476   { (eval echo "$as_me:2476: \"$ac_try\"") >&5
2477   (eval $ac_try) 2>&5
2478   ac_status=$?
2479   echo "$as_me:2479: \$? = $ac_status" >&5
2480   (exit "$ac_status"); }; }; then
2481
2482                         cf_clang_optok=yes
2483 else
2484   echo "$as_me: failed program was:" >&5
2485 cat "conftest.$ac_ext" >&5
2486
2487                         cf_clang_optok=no
2488 fi
2489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2490                 echo "$as_me:2490: result: $cf_clang_optok" >&5
2491 echo "${ECHO_T}$cf_clang_optok" >&6
2492                 CFLAGS="$cf_save_CFLAGS"
2493                 if test "$cf_clang_optok" = yes; then
2494                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2495
2496 echo "${as_me:-configure}:2496: testing adding option $cf_clang_opt ..." 1>&5
2497
2498         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2499         CFLAGS="${CFLAGS}$cf_clang_opt"
2500
2501                 fi
2502         done
2503 fi
2504
2505 echo "$as_me:2505: checking for $CC option to accept ANSI C" >&5
2506 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2507 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2508   echo $ECHO_N "(cached) $ECHO_C" >&6
2509 else
2510   ac_cv_prog_cc_stdc=no
2511 ac_save_CC=$CC
2512 cat >"conftest.$ac_ext" <<_ACEOF
2513 #line 2513 "configure"
2514 #include "confdefs.h"
2515 #include <stdarg.h>
2516 #include <stdio.h>
2517 #include <sys/types.h>
2518 #include <sys/stat.h>
2519 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2520 struct buf { int x; };
2521 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2522 static char *e (char **p, int i)
2523 {
2524   return p[i];
2525 }
2526 static char *f (char * (*g) (char **, int), char **p, ...)
2527 {
2528   char *s;
2529   va_list v;
2530   va_start (v,p);
2531   s = g (p, va_arg (v,int));
2532   va_end (v);
2533   return s;
2534 }
2535 int test (int i, double x);
2536 struct s1 {int (*f) (int a);};
2537 struct s2 {int (*f) (double a);};
2538 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2539 int argc;
2540 char **argv;
2541 int
2542 main (void)
2543 {
2544 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2545   ;
2546   return 0;
2547 }
2548 _ACEOF
2549 # Don't try gcc -ansi; that turns off useful extensions and
2550 # breaks some systems' header files.
2551 # AIX                   -qlanglvl=ansi
2552 # Ultrix and OSF/1      -std1
2553 # HP-UX 10.20 and later -Ae
2554 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2555 # SVR4                  -Xc -D__EXTENSIONS__
2556 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2557 do
2558   CC="$ac_save_CC $ac_arg"
2559   rm -f "conftest.$ac_objext"
2560 if { (eval echo "$as_me:2560: \"$ac_compile\"") >&5
2561   (eval $ac_compile) 2>&5
2562   ac_status=$?
2563   echo "$as_me:2563: \$? = $ac_status" >&5
2564   (exit "$ac_status"); } &&
2565          { ac_try='test -s "conftest.$ac_objext"'
2566   { (eval echo "$as_me:2566: \"$ac_try\"") >&5
2567   (eval $ac_try) 2>&5
2568   ac_status=$?
2569   echo "$as_me:2569: \$? = $ac_status" >&5
2570   (exit "$ac_status"); }; }; then
2571   ac_cv_prog_cc_stdc=$ac_arg
2572 break
2573 else
2574   echo "$as_me: failed program was:" >&5
2575 cat "conftest.$ac_ext" >&5
2576 fi
2577 rm -f "conftest.$ac_objext"
2578 done
2579 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2580 CC=$ac_save_CC
2581
2582 fi
2583
2584 case "x$ac_cv_prog_cc_stdc" in
2585   x|xno)
2586     echo "$as_me:2586: result: none needed" >&5
2587 echo "${ECHO_T}none needed" >&6 ;;
2588   *)
2589     echo "$as_me:2589: result: $ac_cv_prog_cc_stdc" >&5
2590 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2591     CC="$CC $ac_cv_prog_cc_stdc" ;;
2592 esac
2593
2594 # This should have been defined by AC_PROG_CC
2595 : "${CC:=cc}"
2596
2597 echo "$as_me:2597: checking \$CFLAGS variable" >&5
2598 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2599 case "x$CFLAGS" in
2600 (*-[IUD]*)
2601         echo "$as_me:2601: result: broken" >&5
2602 echo "${ECHO_T}broken" >&6
2603         { echo "$as_me:2603: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2604 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2605         cf_flags="$CFLAGS"
2606         CFLAGS=
2607         for cf_arg in $cf_flags
2608         do
2609
2610 cf_fix_cppflags=no
2611 cf_new_cflags=
2612 cf_new_cppflags=
2613 cf_new_extra_cppflags=
2614
2615 for cf_add_cflags in $cf_arg
2616 do
2617 case "$cf_fix_cppflags" in
2618 (no)
2619         case "$cf_add_cflags" in
2620         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2621                 case "$cf_add_cflags" in
2622                 (-D*)
2623                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2624
2625                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2626                                 && test -z "${cf_tst_cflags}" \
2627                                 && cf_fix_cppflags=yes
2628
2629                         if test "$cf_fix_cppflags" = yes ; then
2630
2631         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2632         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2633
2634                                 continue
2635                         elif test "${cf_tst_cflags}" = "\"'" ; then
2636
2637         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2638         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2639
2640                                 continue
2641                         fi
2642                         ;;
2643                 esac
2644                 case "$CPPFLAGS" in
2645                 (*$cf_add_cflags)
2646                         ;;
2647                 (*)
2648                         case "$cf_add_cflags" in
2649                         (-D*)
2650                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2651
2652 CPPFLAGS=`echo "$CPPFLAGS" | \
2653         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2654                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2655
2656                                 ;;
2657                         esac
2658
2659         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2660         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2661
2662                         ;;
2663                 esac
2664                 ;;
2665         (*)
2666
2667         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2668         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2669
2670                 ;;
2671         esac
2672         ;;
2673 (yes)
2674
2675         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2676         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2677
2678         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2679
2680         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2681                 && test -z "${cf_tst_cflags}" \
2682                 && cf_fix_cppflags=no
2683         ;;
2684 esac
2685 done
2686
2687 if test -n "$cf_new_cflags" ; then
2688
2689         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2690         CFLAGS="${CFLAGS}$cf_new_cflags"
2691
2692 fi
2693
2694 if test -n "$cf_new_cppflags" ; then
2695
2696         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2697         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2698
2699 fi
2700
2701 if test -n "$cf_new_extra_cppflags" ; then
2702
2703         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2704         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2705
2706 fi
2707
2708         done
2709         ;;
2710 (*)
2711         echo "$as_me:2711: result: ok" >&5
2712 echo "${ECHO_T}ok" >&6
2713         ;;
2714 esac
2715
2716 echo "$as_me:2716: checking \$CC variable" >&5
2717 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2718 case "$CC" in
2719 (*[\ \  ]-*)
2720         echo "$as_me:2720: result: broken" >&5
2721 echo "${ECHO_T}broken" >&6
2722         { echo "$as_me:2722: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2723 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2724         # humor him...
2725         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2726         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2727         CC="$cf_prog"
2728         for cf_arg in $cf_flags
2729         do
2730                 case "x$cf_arg" in
2731                 (x-[IUDfgOW]*)
2732
2733 cf_fix_cppflags=no
2734 cf_new_cflags=
2735 cf_new_cppflags=
2736 cf_new_extra_cppflags=
2737
2738 for cf_add_cflags in $cf_arg
2739 do
2740 case "$cf_fix_cppflags" in
2741 (no)
2742         case "$cf_add_cflags" in
2743         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2744                 case "$cf_add_cflags" in
2745                 (-D*)
2746                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2747
2748                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2749                                 && test -z "${cf_tst_cflags}" \
2750                                 && cf_fix_cppflags=yes
2751
2752                         if test "$cf_fix_cppflags" = yes ; then
2753
2754         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2755         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2756
2757                                 continue
2758                         elif test "${cf_tst_cflags}" = "\"'" ; then
2759
2760         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2761         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2762
2763                                 continue
2764                         fi
2765                         ;;
2766                 esac
2767                 case "$CPPFLAGS" in
2768                 (*$cf_add_cflags)
2769                         ;;
2770                 (*)
2771                         case "$cf_add_cflags" in
2772                         (-D*)
2773                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2774
2775 CPPFLAGS=`echo "$CPPFLAGS" | \
2776         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2777                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2778
2779                                 ;;
2780                         esac
2781
2782         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2783         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2784
2785                         ;;
2786                 esac
2787                 ;;
2788         (*)
2789
2790         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2791         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2792
2793                 ;;
2794         esac
2795         ;;
2796 (yes)
2797
2798         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2799         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2800
2801         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2802
2803         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2804                 && test -z "${cf_tst_cflags}" \
2805                 && cf_fix_cppflags=no
2806         ;;
2807 esac
2808 done
2809
2810 if test -n "$cf_new_cflags" ; then
2811
2812         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2813         CFLAGS="${CFLAGS}$cf_new_cflags"
2814
2815 fi
2816
2817 if test -n "$cf_new_cppflags" ; then
2818
2819         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2820         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2821
2822 fi
2823
2824 if test -n "$cf_new_extra_cppflags" ; then
2825
2826         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2827         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2828
2829 fi
2830
2831                         ;;
2832                 (*)
2833                         CC="$CC $cf_arg"
2834                         ;;
2835                 esac
2836         done
2837         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2838
2839 echo "${as_me:-configure}:2839: testing resulting CC: '$CC' ..." 1>&5
2840
2841         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2842
2843 echo "${as_me:-configure}:2843: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2844
2845         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2846
2847 echo "${as_me:-configure}:2847: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2848
2849         ;;
2850 (*)
2851         echo "$as_me:2851: result: ok" >&5
2852 echo "${ECHO_T}ok" >&6
2853         ;;
2854 esac
2855
2856 ac_ext=c
2857 ac_cpp='$CPP $CPPFLAGS'
2858 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2859 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2860 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2861 ac_main_return="return"
2862 echo "$as_me:2862: checking how to run the C preprocessor" >&5
2863 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2864 # On Suns, sometimes $CPP names a directory.
2865 if test -n "$CPP" && test -d "$CPP"; then
2866   CPP=
2867 fi
2868 if test -z "$CPP"; then
2869   if test "${ac_cv_prog_CPP+set}" = set; then
2870   echo $ECHO_N "(cached) $ECHO_C" >&6
2871 else
2872       # Double quotes because CPP needs to be expanded
2873     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2874     do
2875       ac_preproc_ok=false
2876 for ac_c_preproc_warn_flag in '' yes
2877 do
2878   # Use a header file that comes with gcc, so configuring glibc
2879   # with a fresh cross-compiler works.
2880   # On the NeXT, cc -E runs the code through the compiler's parser,
2881   # not just through cpp. "Syntax error" is here to catch this case.
2882   cat >"conftest.$ac_ext" <<_ACEOF
2883 #line 2883 "configure"
2884 #include "confdefs.h"
2885 #include <assert.h>
2886                      Syntax error
2887 _ACEOF
2888 if { (eval echo "$as_me:2888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2889   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2890   ac_status=$?
2891   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2892   rm -f conftest.er1
2893   cat conftest.err >&5
2894   echo "$as_me:2894: \$? = $ac_status" >&5
2895   (exit "$ac_status"); } >/dev/null; then
2896   if test -s conftest.err; then
2897     ac_cpp_err=$ac_c_preproc_warn_flag
2898   else
2899     ac_cpp_err=
2900   fi
2901 else
2902   ac_cpp_err=yes
2903 fi
2904 if test -z "$ac_cpp_err"; then
2905   :
2906 else
2907   echo "$as_me: failed program was:" >&5
2908   cat "conftest.$ac_ext" >&5
2909   # Broken: fails on valid input.
2910 continue
2911 fi
2912 rm -f conftest.err "conftest.$ac_ext"
2913
2914   # OK, works on sane cases.  Now check whether non-existent headers
2915   # can be detected and how.
2916   cat >"conftest.$ac_ext" <<_ACEOF
2917 #line 2917 "configure"
2918 #include "confdefs.h"
2919 #include <ac_nonexistent.h>
2920 _ACEOF
2921 if { (eval echo "$as_me:2921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2922   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2923   ac_status=$?
2924   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2925   rm -f conftest.er1
2926   cat conftest.err >&5
2927   echo "$as_me:2927: \$? = $ac_status" >&5
2928   (exit "$ac_status"); } >/dev/null; then
2929   if test -s conftest.err; then
2930     ac_cpp_err=$ac_c_preproc_warn_flag
2931   else
2932     ac_cpp_err=
2933   fi
2934 else
2935   ac_cpp_err=yes
2936 fi
2937 if test -z "$ac_cpp_err"; then
2938   # Broken: success on invalid input.
2939 continue
2940 else
2941   echo "$as_me: failed program was:" >&5
2942   cat "conftest.$ac_ext" >&5
2943   # Passes both tests.
2944 ac_preproc_ok=:
2945 break
2946 fi
2947 rm -f conftest.err "conftest.$ac_ext"
2948
2949 done
2950 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2951 rm -f conftest.err "conftest.$ac_ext"
2952 if $ac_preproc_ok; then
2953   break
2954 fi
2955
2956     done
2957     ac_cv_prog_CPP=$CPP
2958
2959 fi
2960   CPP=$ac_cv_prog_CPP
2961 else
2962   ac_cv_prog_CPP=$CPP
2963 fi
2964 echo "$as_me:2964: result: $CPP" >&5
2965 echo "${ECHO_T}$CPP" >&6
2966 ac_preproc_ok=false
2967 for ac_c_preproc_warn_flag in '' yes
2968 do
2969   # Use a header file that comes with gcc, so configuring glibc
2970   # with a fresh cross-compiler works.
2971   # On the NeXT, cc -E runs the code through the compiler's parser,
2972   # not just through cpp. "Syntax error" is here to catch this case.
2973   cat >"conftest.$ac_ext" <<_ACEOF
2974 #line 2974 "configure"
2975 #include "confdefs.h"
2976 #include <assert.h>
2977                      Syntax error
2978 _ACEOF
2979 if { (eval echo "$as_me:2979: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2980   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2981   ac_status=$?
2982   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2983   rm -f conftest.er1
2984   cat conftest.err >&5
2985   echo "$as_me:2985: \$? = $ac_status" >&5
2986   (exit "$ac_status"); } >/dev/null; then
2987   if test -s conftest.err; then
2988     ac_cpp_err=$ac_c_preproc_warn_flag
2989   else
2990     ac_cpp_err=
2991   fi
2992 else
2993   ac_cpp_err=yes
2994 fi
2995 if test -z "$ac_cpp_err"; then
2996   :
2997 else
2998   echo "$as_me: failed program was:" >&5
2999   cat "conftest.$ac_ext" >&5
3000   # Broken: fails on valid input.
3001 continue
3002 fi
3003 rm -f conftest.err "conftest.$ac_ext"
3004
3005   # OK, works on sane cases.  Now check whether non-existent headers
3006   # can be detected and how.
3007   cat >"conftest.$ac_ext" <<_ACEOF
3008 #line 3008 "configure"
3009 #include "confdefs.h"
3010 #include <ac_nonexistent.h>
3011 _ACEOF
3012 if { (eval echo "$as_me:3012: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3013   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3014   ac_status=$?
3015   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3016   rm -f conftest.er1
3017   cat conftest.err >&5
3018   echo "$as_me:3018: \$? = $ac_status" >&5
3019   (exit "$ac_status"); } >/dev/null; then
3020   if test -s conftest.err; then
3021     ac_cpp_err=$ac_c_preproc_warn_flag
3022   else
3023     ac_cpp_err=
3024   fi
3025 else
3026   ac_cpp_err=yes
3027 fi
3028 if test -z "$ac_cpp_err"; then
3029   # Broken: success on invalid input.
3030 continue
3031 else
3032   echo "$as_me: failed program was:" >&5
3033   cat "conftest.$ac_ext" >&5
3034   # Passes both tests.
3035 ac_preproc_ok=:
3036 break
3037 fi
3038 rm -f conftest.err "conftest.$ac_ext"
3039
3040 done
3041 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3042 rm -f conftest.err "conftest.$ac_ext"
3043 if $ac_preproc_ok; then
3044   :
3045 else
3046   { { echo "$as_me:3046: error: C preprocessor \"$CPP\" fails sanity check" >&5
3047 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3048    { (exit 1); exit 1; }; }
3049 fi
3050
3051 ac_ext=c
3052 ac_cpp='$CPP $CPPFLAGS'
3053 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3054 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3055 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3056 ac_main_return="return"
3057
3058 if test $ac_cv_c_compiler_gnu = yes; then
3059     echo "$as_me:3059: checking whether $CC needs -traditional" >&5
3060 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3061 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3062   echo $ECHO_N "(cached) $ECHO_C" >&6
3063 else
3064     ac_pattern="Autoconf.*'x'"
3065   cat >"conftest.$ac_ext" <<_ACEOF
3066 #line 3066 "configure"
3067 #include "confdefs.h"
3068 #include <sgtty.h>
3069 int Autoconf = TIOCGETP;
3070 _ACEOF
3071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3072   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3073   ac_cv_prog_gcc_traditional=yes
3074 else
3075   ac_cv_prog_gcc_traditional=no
3076 fi
3077 rm -rf conftest*
3078
3079   if test $ac_cv_prog_gcc_traditional = no; then
3080     cat >"conftest.$ac_ext" <<_ACEOF
3081 #line 3081 "configure"
3082 #include "confdefs.h"
3083 #include <termio.h>
3084 int Autoconf = TCGETA;
3085 _ACEOF
3086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3087   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3088   ac_cv_prog_gcc_traditional=yes
3089 fi
3090 rm -rf conftest*
3091
3092   fi
3093 fi
3094 echo "$as_me:3094: result: $ac_cv_prog_gcc_traditional" >&5
3095 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3096   if test $ac_cv_prog_gcc_traditional = yes; then
3097     CC="$CC -traditional"
3098   fi
3099 fi
3100
3101 echo "$as_me:3101: checking whether $CC understands -c and -o together" >&5
3102 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3103 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3104   echo $ECHO_N "(cached) $ECHO_C" >&6
3105 else
3106
3107 cat > conftest.$ac_ext <<CF_EOF
3108 int main(void)
3109 {
3110         ${cf_cv_main_return:-return}(0);
3111 }
3112 CF_EOF
3113 # We do the test twice because some compilers refuse to overwrite an
3114 # existing .o file with -o, though they will create one.
3115 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3116 if { (eval echo "$as_me:3116: \"$ac_try\"") >&5
3117   (eval $ac_try) 2>&5
3118   ac_status=$?
3119   echo "$as_me:3119: \$? = $ac_status" >&5
3120   (exit "$ac_status"); } &&
3121   test -f conftest2.$ac_objext && { (eval echo "$as_me:3121: \"$ac_try\"") >&5
3122   (eval $ac_try) 2>&5
3123   ac_status=$?
3124   echo "$as_me:3124: \$? = $ac_status" >&5
3125   (exit "$ac_status"); };
3126 then
3127   eval cf_cv_prog_CC_c_o=yes
3128 else
3129   eval cf_cv_prog_CC_c_o=no
3130 fi
3131 rm -rf ./conftest*
3132
3133 fi
3134 if test "$cf_cv_prog_CC_c_o" = yes; then
3135   echo "$as_me:3135: result: yes" >&5
3136 echo "${ECHO_T}yes" >&6
3137 else
3138   echo "$as_me:3138: result: no" >&5
3139 echo "${ECHO_T}no" >&6
3140 fi
3141
3142 if test "$cross_compiling" = yes ; then
3143         LDCONFIG=:
3144 else
3145         case "$cf_cv_system_name" in
3146         (dragonfly*|mirbsd*|freebsd*)
3147                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3148                 ;;
3149         (*) LDPATH=$PATH:/sbin:/usr/sbin
3150                 # Extract the first word of "ldconfig", so it can be a program name with args.
3151 set dummy ldconfig; ac_word=$2
3152 echo "$as_me:3152: checking for $ac_word" >&5
3153 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3154 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3155   echo $ECHO_N "(cached) $ECHO_C" >&6
3156 else
3157   case $LDCONFIG in
3158   [\\/]* | ?:[\\/]*)
3159   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3160   ;;
3161   *)
3162   ac_save_IFS=$IFS; IFS=$ac_path_separator
3163 ac_dummy="$LDPATH"
3164 for ac_dir in $ac_dummy; do
3165   IFS=$ac_save_IFS
3166   test -z "$ac_dir" && ac_dir=.
3167   if $as_executable_p "$ac_dir/$ac_word"; then
3168    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3169    echo "$as_me:3169: found $ac_dir/$ac_word" >&5
3170    break
3171 fi
3172 done
3173
3174   ;;
3175 esac
3176 fi
3177 LDCONFIG=$ac_cv_path_LDCONFIG
3178
3179 if test -n "$LDCONFIG"; then
3180   echo "$as_me:3180: result: $LDCONFIG" >&5
3181 echo "${ECHO_T}$LDCONFIG" >&6
3182 else
3183   echo "$as_me:3183: result: no" >&5
3184 echo "${ECHO_T}no" >&6
3185 fi
3186
3187                 ;;
3188         esac
3189 fi
3190
3191 echo "$as_me:3191: checking if you want to ensure bool is consistent with C++" >&5
3192 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3193
3194 # Check whether --with-cxx or --without-cxx was given.
3195 if test "${with_cxx+set}" = set; then
3196   withval="$with_cxx"
3197   cf_with_cxx=$withval
3198 else
3199   cf_with_cxx=yes
3200 fi;
3201 echo "$as_me:3201: result: $cf_with_cxx" >&5
3202 echo "${ECHO_T}$cf_with_cxx" >&6
3203 if test "X$cf_with_cxx" = Xno ; then
3204         CXX=""
3205         GXX=""
3206 else
3207         # with autoconf 2.13, we can change the error to a warning:
3208                 ac_ext=cc
3209 ac_cpp='$CXXCPP $CPPFLAGS'
3210 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3211 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3212 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3213 ac_main_return="return"
3214 if test -n "$ac_tool_prefix"; then
3215   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3216   do
3217     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3218 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3219 echo "$as_me:3219: checking for $ac_word" >&5
3220 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3221 if test "${ac_cv_prog_CXX+set}" = set; then
3222   echo $ECHO_N "(cached) $ECHO_C" >&6
3223 else
3224   if test -n "$CXX"; then
3225   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3226 else
3227   ac_save_IFS=$IFS; IFS=$ac_path_separator
3228 ac_dummy="$PATH"
3229 for ac_dir in $ac_dummy; do
3230   IFS=$ac_save_IFS
3231   test -z "$ac_dir" && ac_dir=.
3232   $as_executable_p "$ac_dir/$ac_word" || continue
3233 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3234 echo "$as_me:3234: found $ac_dir/$ac_word" >&5
3235 break
3236 done
3237
3238 fi
3239 fi
3240 CXX=$ac_cv_prog_CXX
3241 if test -n "$CXX"; then
3242   echo "$as_me:3242: result: $CXX" >&5
3243 echo "${ECHO_T}$CXX" >&6
3244 else
3245   echo "$as_me:3245: result: no" >&5
3246 echo "${ECHO_T}no" >&6
3247 fi
3248
3249     test -n "$CXX" && break
3250   done
3251 fi
3252 if test -z "$CXX"; then
3253   ac_ct_CXX=$CXX
3254   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3255 do
3256   # Extract the first word of "$ac_prog", so it can be a program name with args.
3257 set dummy $ac_prog; ac_word=$2
3258 echo "$as_me:3258: checking for $ac_word" >&5
3259 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3260 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3261   echo $ECHO_N "(cached) $ECHO_C" >&6
3262 else
3263   if test -n "$ac_ct_CXX"; then
3264   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3265 else
3266   ac_save_IFS=$IFS; IFS=$ac_path_separator
3267 ac_dummy="$PATH"
3268 for ac_dir in $ac_dummy; do
3269   IFS=$ac_save_IFS
3270   test -z "$ac_dir" && ac_dir=.
3271   $as_executable_p "$ac_dir/$ac_word" || continue
3272 ac_cv_prog_ac_ct_CXX="$ac_prog"
3273 echo "$as_me:3273: found $ac_dir/$ac_word" >&5
3274 break
3275 done
3276
3277 fi
3278 fi
3279 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3280 if test -n "$ac_ct_CXX"; then
3281   echo "$as_me:3281: result: $ac_ct_CXX" >&5
3282 echo "${ECHO_T}$ac_ct_CXX" >&6
3283 else
3284   echo "$as_me:3284: result: no" >&5
3285 echo "${ECHO_T}no" >&6
3286 fi
3287
3288   test -n "$ac_ct_CXX" && break
3289 done
3290 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3291
3292   CXX=$ac_ct_CXX
3293 fi
3294
3295 # Provide some information about the compiler.
3296 echo "$as_me:3296:" \
3297      "checking for C++ compiler version" >&5
3298 ac_compiler=`set X $ac_compile; echo $2`
3299 { (eval echo "$as_me:3299: \"$ac_compiler --version </dev/null >&5\"") >&5
3300   (eval $ac_compiler --version </dev/null >&5) 2>&5
3301   ac_status=$?
3302   echo "$as_me:3302: \$? = $ac_status" >&5
3303   (exit "$ac_status"); }
3304 { (eval echo "$as_me:3304: \"$ac_compiler -v </dev/null >&5\"") >&5
3305   (eval $ac_compiler -v </dev/null >&5) 2>&5
3306   ac_status=$?
3307   echo "$as_me:3307: \$? = $ac_status" >&5
3308   (exit "$ac_status"); }
3309 { (eval echo "$as_me:3309: \"$ac_compiler -V </dev/null >&5\"") >&5
3310   (eval $ac_compiler -V </dev/null >&5) 2>&5
3311   ac_status=$?
3312   echo "$as_me:3312: \$? = $ac_status" >&5
3313   (exit "$ac_status"); }
3314
3315 echo "$as_me:3315: checking whether we are using the GNU C++ compiler" >&5
3316 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3317 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3318   echo $ECHO_N "(cached) $ECHO_C" >&6
3319 else
3320   cat >"conftest.$ac_ext" <<_ACEOF
3321 #line 3321 "configure"
3322 #include "confdefs.h"
3323
3324 int
3325 main (void)
3326 {
3327 #ifndef __GNUC__
3328        choke me
3329 #endif
3330
3331   ;
3332   return 0;
3333 }
3334 _ACEOF
3335 rm -f "conftest.$ac_objext"
3336 if { (eval echo "$as_me:3336: \"$ac_compile\"") >&5
3337   (eval $ac_compile) 2>&5
3338   ac_status=$?
3339   echo "$as_me:3339: \$? = $ac_status" >&5
3340   (exit "$ac_status"); } &&
3341          { ac_try='test -s "conftest.$ac_objext"'
3342   { (eval echo "$as_me:3342: \"$ac_try\"") >&5
3343   (eval $ac_try) 2>&5
3344   ac_status=$?
3345   echo "$as_me:3345: \$? = $ac_status" >&5
3346   (exit "$ac_status"); }; }; then
3347   ac_compiler_gnu=yes
3348 else
3349   echo "$as_me: failed program was:" >&5
3350 cat "conftest.$ac_ext" >&5
3351 ac_compiler_gnu=no
3352 fi
3353 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3354 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3355
3356 fi
3357 echo "$as_me:3357: result: $ac_cv_cxx_compiler_gnu" >&5
3358 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3359 GXX=`test $ac_compiler_gnu = yes && echo yes`
3360 ac_test_CXXFLAGS=${CXXFLAGS+set}
3361 ac_save_CXXFLAGS=$CXXFLAGS
3362 CXXFLAGS="-g"
3363 echo "$as_me:3363: checking whether $CXX accepts -g" >&5
3364 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3365 if test "${ac_cv_prog_cxx_g+set}" = set; then
3366   echo $ECHO_N "(cached) $ECHO_C" >&6
3367 else
3368   cat >"conftest.$ac_ext" <<_ACEOF
3369 #line 3369 "configure"
3370 #include "confdefs.h"
3371
3372 int
3373 main (void)
3374 {
3375
3376   ;
3377   return 0;
3378 }
3379 _ACEOF
3380 rm -f "conftest.$ac_objext"
3381 if { (eval echo "$as_me:3381: \"$ac_compile\"") >&5
3382   (eval $ac_compile) 2>&5
3383   ac_status=$?
3384   echo "$as_me:3384: \$? = $ac_status" >&5
3385   (exit "$ac_status"); } &&
3386          { ac_try='test -s "conftest.$ac_objext"'
3387   { (eval echo "$as_me:3387: \"$ac_try\"") >&5
3388   (eval $ac_try) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); }; }; then
3392   ac_cv_prog_cxx_g=yes
3393 else
3394   echo "$as_me: failed program was:" >&5
3395 cat "conftest.$ac_ext" >&5
3396 ac_cv_prog_cxx_g=no
3397 fi
3398 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3399 fi
3400 echo "$as_me:3400: result: $ac_cv_prog_cxx_g" >&5
3401 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3402 if test "$ac_test_CXXFLAGS" = set; then
3403   CXXFLAGS=$ac_save_CXXFLAGS
3404 elif test $ac_cv_prog_cxx_g = yes; then
3405   if test "$GXX" = yes; then
3406     CXXFLAGS="-g -O2"
3407   else
3408     CXXFLAGS="-g"
3409   fi
3410 else
3411   if test "$GXX" = yes; then
3412     CXXFLAGS="-O2"
3413   else
3414     CXXFLAGS=
3415   fi
3416 fi
3417 for ac_declaration in \
3418    ''\
3419    '#include <stdlib.h>' \
3420    'extern "C" void std::exit (int) throw (); using std::exit;' \
3421    'extern "C" void std::exit (int); using std::exit;' \
3422    'extern "C" void exit (int) throw ();' \
3423    'extern "C" void exit (int);' \
3424    'void exit (int);'
3425 do
3426   cat >"conftest.$ac_ext" <<_ACEOF
3427 #line 3427 "configure"
3428 #include "confdefs.h"
3429 #include <stdlib.h>
3430 $ac_declaration
3431 int
3432 main (void)
3433 {
3434 exit (42);
3435   ;
3436   return 0;
3437 }
3438 _ACEOF
3439 rm -f "conftest.$ac_objext"
3440 if { (eval echo "$as_me:3440: \"$ac_compile\"") >&5
3441   (eval $ac_compile) 2>&5
3442   ac_status=$?
3443   echo "$as_me:3443: \$? = $ac_status" >&5
3444   (exit "$ac_status"); } &&
3445          { ac_try='test -s "conftest.$ac_objext"'
3446   { (eval echo "$as_me:3446: \"$ac_try\"") >&5
3447   (eval $ac_try) 2>&5
3448   ac_status=$?
3449   echo "$as_me:3449: \$? = $ac_status" >&5
3450   (exit "$ac_status"); }; }; then
3451   :
3452 else
3453   echo "$as_me: failed program was:" >&5
3454 cat "conftest.$ac_ext" >&5
3455 continue
3456 fi
3457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3458   cat >"conftest.$ac_ext" <<_ACEOF
3459 #line 3459 "configure"
3460 #include "confdefs.h"
3461 $ac_declaration
3462 int
3463 main (void)
3464 {
3465 exit (42);
3466   ;
3467   return 0;
3468 }
3469 _ACEOF
3470 rm -f "conftest.$ac_objext"
3471 if { (eval echo "$as_me:3471: \"$ac_compile\"") >&5
3472   (eval $ac_compile) 2>&5
3473   ac_status=$?
3474   echo "$as_me:3474: \$? = $ac_status" >&5
3475   (exit "$ac_status"); } &&
3476          { ac_try='test -s "conftest.$ac_objext"'
3477   { (eval echo "$as_me:3477: \"$ac_try\"") >&5
3478   (eval $ac_try) 2>&5
3479   ac_status=$?
3480   echo "$as_me:3480: \$? = $ac_status" >&5
3481   (exit "$ac_status"); }; }; then
3482   break
3483 else
3484   echo "$as_me: failed program was:" >&5
3485 cat "conftest.$ac_ext" >&5
3486 fi
3487 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3488 done
3489 rm -rf conftest*
3490 if test -n "$ac_declaration"; then
3491   echo '#ifdef __cplusplus' >>confdefs.h
3492   echo "$ac_declaration"    >>confdefs.h
3493   echo '#endif'             >>confdefs.h
3494 fi
3495
3496 ac_ext=c
3497 ac_cpp='$CPP $CPPFLAGS'
3498 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3499 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3500 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3501 ac_main_return="return"
3502
3503         ac_ext=cc
3504 ac_cpp='$CXXCPP $CPPFLAGS'
3505 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3506 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3507 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3508 ac_main_return="return"
3509
3510         if test "x$cf_with_cxx" != xno
3511         then
3512                 # Several of the C++ configurations do not work, particularly when
3513                 # cross-compiling (20140913 -TD)
3514                 echo "$as_me:3514: checking if $CXX works" >&5
3515 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3516
3517                 save_CPPFLAGS="$CPPFLAGS"
3518                 eval cf_includedir=${includedir}
3519                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3520
3521 cat >"conftest.$ac_ext" <<_ACEOF
3522 #line 3522 "configure"
3523 #include "confdefs.h"
3524
3525 #include <stdlib.h>
3526 #include <stdio.h>
3527
3528 int
3529 main (void)
3530 {
3531
3532                 printf("Hello world!\n")
3533
3534   ;
3535   return 0;
3536 }
3537 _ACEOF
3538 rm -f "conftest.$ac_objext"
3539 if { (eval echo "$as_me:3539: \"$ac_compile\"") >&5
3540   (eval $ac_compile) 2>&5
3541   ac_status=$?
3542   echo "$as_me:3542: \$? = $ac_status" >&5
3543   (exit "$ac_status"); } &&
3544          { ac_try='test -s "conftest.$ac_objext"'
3545   { (eval echo "$as_me:3545: \"$ac_try\"") >&5
3546   (eval $ac_try) 2>&5
3547   ac_status=$?
3548   echo "$as_me:3548: \$? = $ac_status" >&5
3549   (exit "$ac_status"); }; }; then
3550   cf_cxx_works=yes
3551 else
3552   echo "$as_me: failed program was:" >&5
3553 cat "conftest.$ac_ext" >&5
3554 cf_cxx_works=no
3555 fi
3556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3557                 CPPFLAGS="$save_CPPFLAGS"
3558
3559                 echo "$as_me:3559: result: $cf_cxx_works" >&5
3560 echo "${ECHO_T}$cf_cxx_works" >&6
3561                 if test "x$cf_cxx_works" = xno
3562                 then
3563                         { echo "$as_me:3563: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3564 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3565                         cf_with_cxx=no; CXX=""; GXX="";
3566                 fi
3567         fi
3568         ac_ext=c
3569 ac_cpp='$CPP $CPPFLAGS'
3570 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3571 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3572 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3573 ac_main_return="return"
3574
3575         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3576         if test "$CXX" = "g++" ; then
3577                 # Extract the first word of "g++", so it can be a program name with args.
3578 set dummy g++; ac_word=$2
3579 echo "$as_me:3579: checking for $ac_word" >&5
3580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3581 if test "${ac_cv_path_CXX+set}" = set; then
3582   echo $ECHO_N "(cached) $ECHO_C" >&6
3583 else
3584   case $CXX in
3585   [\\/]* | ?:[\\/]*)
3586   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3587   ;;
3588   *)
3589   ac_save_IFS=$IFS; IFS=$ac_path_separator
3590 ac_dummy="$PATH"
3591 for ac_dir in $ac_dummy; do
3592   IFS=$ac_save_IFS
3593   test -z "$ac_dir" && ac_dir=.
3594   if $as_executable_p "$ac_dir/$ac_word"; then
3595    ac_cv_path_CXX="$ac_dir/$ac_word"
3596    echo "$as_me:3596: found $ac_dir/$ac_word" >&5
3597    break
3598 fi
3599 done
3600
3601   ;;
3602 esac
3603 fi
3604 CXX=$ac_cv_path_CXX
3605
3606 if test -n "$CXX"; then
3607   echo "$as_me:3607: result: $CXX" >&5
3608 echo "${ECHO_T}$CXX" >&6
3609 else
3610   echo "$as_me:3610: result: no" >&5
3611 echo "${ECHO_T}no" >&6
3612 fi
3613
3614         fi
3615         case "x$CXX" in
3616         (x|xg++)
3617                 { echo "$as_me:3617: WARNING: You don't have any C++ compiler, too bad" >&5
3618 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3619                 cf_with_cxx=no; CXX=""; GXX="";
3620                 ;;
3621         esac
3622 fi
3623
3624 GXX_VERSION=none
3625 if test "$GXX" = yes; then
3626         echo "$as_me:3626: checking version of ${CXX:-g++}" >&5
3627 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3628         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3629         if test -z "$GXX_VERSION"
3630         then
3631                 GXX_VERSION=unknown
3632                 GXX=no
3633         fi
3634         echo "$as_me:3634: result: $GXX_VERSION" >&5
3635 echo "${ECHO_T}$GXX_VERSION" >&6
3636 fi
3637
3638 case "$GXX_VERSION" in
3639 ([1-9][0-9].*)
3640         ;;
3641 (1.*|2.[0-6]*)
3642         { echo "$as_me:3642: WARNING: templates do not work" >&5
3643 echo "$as_me: WARNING: templates do not work" >&2;}
3644         ;;
3645 esac
3646
3647 echo "$as_me:3647: checking if you want to build C++ binding and demo" >&5
3648 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3649
3650 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3651 if test "${with_cxx_binding+set}" = set; then
3652   withval="$with_cxx_binding"
3653   cf_with_cxx_binding=$withval
3654 else
3655   cf_with_cxx_binding=$cf_with_cxx
3656 fi;
3657 echo "$as_me:3657: result: $cf_with_cxx_binding" >&5
3658 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3659
3660 echo "$as_me:3660: checking if you want to build with Ada" >&5
3661 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3662 echo "$as_me:3662: result: $cf_with_ada" >&5
3663 echo "${ECHO_T}$cf_with_ada" >&6
3664
3665 echo "$as_me:3665: checking if you want to install terminal database" >&5
3666 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3667
3668 # Check whether --enable-db-install or --disable-db-install was given.
3669 if test "${enable_db_install+set}" = set; then
3670   enableval="$enable_db_install"
3671   cf_with_db_install=$enableval
3672 else
3673   cf_with_db_install=yes
3674 fi;
3675 echo "$as_me:3675: result: $cf_with_db_install" >&5
3676 echo "${ECHO_T}$cf_with_db_install" >&6
3677
3678 echo "$as_me:3678: checking if you want to install manpages" >&5
3679 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3680
3681 # Check whether --with-manpages or --without-manpages was given.
3682 if test "${with_manpages+set}" = set; then
3683   withval="$with_manpages"
3684   cf_with_manpages=$withval
3685 else
3686   cf_with_manpages=yes
3687 fi;
3688 echo "$as_me:3688: result: $cf_with_manpages" >&5
3689 echo "${ECHO_T}$cf_with_manpages" >&6
3690
3691 echo "$as_me:3691: checking if you want to build programs such as tic" >&5
3692 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3693
3694 # Check whether --with-progs or --without-progs was given.
3695 if test "${with_progs+set}" = set; then
3696   withval="$with_progs"
3697   cf_with_progs=$withval
3698 else
3699   cf_with_progs=yes
3700 fi;
3701 echo "$as_me:3701: result: $cf_with_progs" >&5
3702 echo "${ECHO_T}$cf_with_progs" >&6
3703
3704 echo "$as_me:3704: checking if you want to build test-programs" >&5
3705 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3706
3707 # Check whether --with-tests or --without-tests was given.
3708 if test "${with_tests+set}" = set; then
3709   withval="$with_tests"
3710   cf_with_tests=$withval
3711 else
3712   cf_with_tests=yes
3713 fi;
3714 echo "$as_me:3714: result: $cf_with_tests" >&5
3715 echo "${ECHO_T}$cf_with_tests" >&6
3716
3717 echo "$as_me:3717: checking if you wish to install curses.h" >&5
3718 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3719
3720 # Check whether --with-curses-h or --without-curses-h was given.
3721 if test "${with_curses_h+set}" = set; then
3722   withval="$with_curses_h"
3723   with_curses_h=$withval
3724 else
3725   with_curses_h=yes
3726 fi;
3727 echo "$as_me:3727: result: $with_curses_h" >&5
3728 echo "${ECHO_T}$with_curses_h" >&6
3729
3730 modules_to_build="ncurses"
3731 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3732 modules_to_build="$modules_to_build panel menu form"
3733
3734 test "$program_prefix" != NONE &&
3735   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3736 # Use a double $ so make ignores it.
3737 test "$program_suffix" != NONE &&
3738   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3739 # Double any \ or $.  echo might interpret backslashes.
3740 # By default was `s,x,x', remove it if useless.
3741 cat <<\_ACEOF >conftest.sed
3742 s/[\\$]/&&/g;s/;s,x,x,$//
3743 _ACEOF
3744 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3745 rm conftest.sed
3746
3747 for ac_prog in mawk gawk nawk awk
3748 do
3749   # Extract the first word of "$ac_prog", so it can be a program name with args.
3750 set dummy $ac_prog; ac_word=$2
3751 echo "$as_me:3751: checking for $ac_word" >&5
3752 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3753 if test "${ac_cv_prog_AWK+set}" = set; then
3754   echo $ECHO_N "(cached) $ECHO_C" >&6
3755 else
3756   if test -n "$AWK"; then
3757   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3758 else
3759   ac_save_IFS=$IFS; IFS=$ac_path_separator
3760 ac_dummy="$PATH"
3761 for ac_dir in $ac_dummy; do
3762   IFS=$ac_save_IFS
3763   test -z "$ac_dir" && ac_dir=.
3764   $as_executable_p "$ac_dir/$ac_word" || continue
3765 ac_cv_prog_AWK="$ac_prog"
3766 echo "$as_me:3766: found $ac_dir/$ac_word" >&5
3767 break
3768 done
3769
3770 fi
3771 fi
3772 AWK=$ac_cv_prog_AWK
3773 if test -n "$AWK"; then
3774   echo "$as_me:3774: result: $AWK" >&5
3775 echo "${ECHO_T}$AWK" >&6
3776 else
3777   echo "$as_me:3777: result: no" >&5
3778 echo "${ECHO_T}no" >&6
3779 fi
3780
3781   test -n "$AWK" && break
3782 done
3783
3784 test -z "$AWK" && { { echo "$as_me:3784: error: No awk program found" >&5
3785 echo "$as_me: error: No awk program found" >&2;}
3786    { (exit 1); exit 1; }; }
3787
3788 # Find a good install program.  We prefer a C program (faster),
3789 # so one script is as good as another.  But avoid the broken or
3790 # incompatible versions:
3791 # SysV /etc/install, /usr/sbin/install
3792 # SunOS /usr/etc/install
3793 # IRIX /sbin/install
3794 # AIX /bin/install
3795 # AmigaOS /C/install, which installs bootblocks on floppy discs
3796 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3797 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3798 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3799 # ./install, which can be erroneously created by make from ./install.sh.
3800 echo "$as_me:3800: checking for a BSD compatible install" >&5
3801 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3802 if test -z "$INSTALL"; then
3803 if test "${ac_cv_path_install+set}" = set; then
3804   echo $ECHO_N "(cached) $ECHO_C" >&6
3805 else
3806     ac_save_IFS=$IFS; IFS=$ac_path_separator
3807   for ac_dir in $PATH; do
3808     IFS=$ac_save_IFS
3809     # Account for people who put trailing slashes in PATH elements.
3810     case $ac_dir/ in
3811     / | ./ | .// | /cC/* \
3812     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3813     | /usr/ucb/* ) ;;
3814     *)
3815       # OSF1 and SCO ODT 3.0 have their own names for install.
3816       # Don't use installbsd from OSF since it installs stuff as root
3817       # by default.
3818       for ac_prog in ginstall scoinst install; do
3819         if $as_executable_p "$ac_dir/$ac_prog"; then
3820           if test $ac_prog = install &&
3821             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3822             # AIX install.  It has an incompatible calling convention.
3823             :
3824           elif test $ac_prog = install &&
3825             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3826             # program-specific install script used by HP pwplus--don't use.
3827             :
3828           else
3829             ac_cv_path_install="$ac_dir/$ac_prog -c"
3830             break 2
3831           fi
3832         fi
3833       done
3834       ;;
3835     esac
3836   done
3837
3838 fi
3839   if test "${ac_cv_path_install+set}" = set; then
3840     INSTALL=$ac_cv_path_install
3841   else
3842     # As a last resort, use the slow shell script.  We don't cache a
3843     # path for INSTALL within a source directory, because that will
3844     # break other packages using the cache if that directory is
3845     # removed, or if the path is relative.
3846     INSTALL=$ac_install_sh
3847   fi
3848 fi
3849 echo "$as_me:3849: result: $INSTALL" >&5
3850 echo "${ECHO_T}$INSTALL" >&6
3851
3852 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3853 # It thinks the first close brace ends the variable substitution.
3854 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3855
3856 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3857
3858 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3859
3860 case $INSTALL in
3861 (/*)
3862         ;;
3863 (*)
3864         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3865         test -z "$cf_dir" && cf_dir=.
3866         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3867         ;;
3868 esac
3869
3870 for ac_prog in lint cppcheck splint
3871 do
3872   # Extract the first word of "$ac_prog", so it can be a program name with args.
3873 set dummy $ac_prog; ac_word=$2
3874 echo "$as_me:3874: checking for $ac_word" >&5
3875 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3876 if test "${ac_cv_prog_LINT+set}" = set; then
3877   echo $ECHO_N "(cached) $ECHO_C" >&6
3878 else
3879   if test -n "$LINT"; then
3880   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3881 else
3882   ac_save_IFS=$IFS; IFS=$ac_path_separator
3883 ac_dummy="$PATH"
3884 for ac_dir in $ac_dummy; do
3885   IFS=$ac_save_IFS
3886   test -z "$ac_dir" && ac_dir=.
3887   $as_executable_p "$ac_dir/$ac_word" || continue
3888 ac_cv_prog_LINT="$ac_prog"
3889 echo "$as_me:3889: found $ac_dir/$ac_word" >&5
3890 break
3891 done
3892
3893 fi
3894 fi
3895 LINT=$ac_cv_prog_LINT
3896 if test -n "$LINT"; then
3897   echo "$as_me:3897: result: $LINT" >&5
3898 echo "${ECHO_T}$LINT" >&6
3899 else
3900   echo "$as_me:3900: result: no" >&5
3901 echo "${ECHO_T}no" >&6
3902 fi
3903
3904   test -n "$LINT" && break
3905 done
3906
3907 case "x$LINT" in
3908 (xcppcheck|x*/cppcheck)
3909         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3910         ;;
3911 esac
3912
3913 echo "$as_me:3913: checking whether ln -s works" >&5
3914 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3915 LN_S=$as_ln_s
3916 if test "$LN_S" = "ln -s"; then
3917   echo "$as_me:3917: result: yes" >&5
3918 echo "${ECHO_T}yes" >&6
3919 else
3920   echo "$as_me:3920: result: no, using $LN_S" >&5
3921 echo "${ECHO_T}no, using $LN_S" >&6
3922 fi
3923
3924 echo "$as_me:3924: checking if $LN_S -f options work" >&5
3925 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3926
3927 rm -f conf$$.src conf$$dst
3928 echo >conf$$.dst
3929 echo first >conf$$.src
3930 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3931         cf_prog_ln_sf=yes
3932 else
3933         cf_prog_ln_sf=no
3934 fi
3935 rm -f conf$$.dst conf$$src
3936 echo "$as_me:3936: result: $cf_prog_ln_sf" >&5
3937 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3938
3939 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3940
3941 echo "$as_me:3941: checking for long file names" >&5
3942 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3943 if test "${ac_cv_sys_long_file_names+set}" = set; then
3944   echo $ECHO_N "(cached) $ECHO_C" >&6
3945 else
3946   ac_cv_sys_long_file_names=yes
3947 # Test for long file names in all the places we know might matter:
3948 #      .                the current directory, where building will happen
3949 #      $prefix/lib      where we will be installing things
3950 #      $exec_prefix/lib likewise
3951 # eval it to expand exec_prefix.
3952 #      $TMPDIR          if set, where it might want to write temporary files
3953 # if $TMPDIR is not set:
3954 #      /tmp             where it might want to write temporary files
3955 #      /var/tmp         likewise
3956 #      /usr/tmp         likewise
3957 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3958   ac_tmpdirs=$TMPDIR
3959 else
3960   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3961 fi
3962 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3963   test -d "$ac_dir" || continue
3964   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3965   ac_xdir=$ac_dir/cf$$
3966   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3967   ac_tf1=$ac_xdir/conftest9012345
3968   ac_tf2=$ac_xdir/conftest9012346
3969   (echo 1 >"$ac_tf1") 2>/dev/null
3970   (echo 2 >"$ac_tf2") 2>/dev/null
3971   ac_val=`cat "$ac_tf1" 2>/dev/null`
3972   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3973     ac_cv_sys_long_file_names=no
3974     rm -rf "$ac_xdir" 2>/dev/null
3975     break
3976   fi
3977   rm -rf "$ac_xdir" 2>/dev/null
3978 done
3979 fi
3980 echo "$as_me:3980: result: $ac_cv_sys_long_file_names" >&5
3981 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3982 if test "$ac_cv_sys_long_file_names" = yes; then
3983
3984 cat >>confdefs.h <<\EOF
3985 #define HAVE_LONG_FILE_NAMES 1
3986 EOF
3987
3988 fi
3989
3990 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3991 # of package conflict.
3992 cf_config_suffix=
3993
3994 # Check whether --with-config-suffix or --without-config-suffix was given.
3995 if test "${with_config_suffix+set}" = set; then
3996   withval="$with_config_suffix"
3997   case "x$withval" in
3998         (xyes|xno)
3999                 { echo "$as_me:3999: WARNING: expected a value for config-suffix option" >&5
4000 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4001                 ;;
4002         (*)     cf_config_suffix="$withval"
4003                 ;;
4004         esac
4005 fi;
4006
4007 # If we find pkg-config, check if we should install the ".pc" files.
4008
4009 echo "$as_me:4009: checking if you want to use pkg-config" >&5
4010 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4011
4012 # Check whether --with-pkg-config or --without-pkg-config was given.
4013 if test "${with_pkg_config+set}" = set; then
4014   withval="$with_pkg_config"
4015   cf_pkg_config=$withval
4016 else
4017   cf_pkg_config=yes
4018 fi;
4019 echo "$as_me:4019: result: $cf_pkg_config" >&5
4020 echo "${ECHO_T}$cf_pkg_config" >&6
4021
4022 case "$cf_pkg_config" in
4023 (no)
4024         PKG_CONFIG=none
4025         ;;
4026 (yes)
4027
4028 if test -n "$ac_tool_prefix"; then
4029   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4030 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4031 echo "$as_me:4031: checking for $ac_word" >&5
4032 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4033 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4034   echo $ECHO_N "(cached) $ECHO_C" >&6
4035 else
4036   case $PKG_CONFIG in
4037   [\\/]* | ?:[\\/]*)
4038   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4039   ;;
4040   *)
4041   ac_save_IFS=$IFS; IFS=$ac_path_separator
4042 ac_dummy="$PATH"
4043 for ac_dir in $ac_dummy; do
4044   IFS=$ac_save_IFS
4045   test -z "$ac_dir" && ac_dir=.
4046   if $as_executable_p "$ac_dir/$ac_word"; then
4047    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4048    echo "$as_me:4048: found $ac_dir/$ac_word" >&5
4049    break
4050 fi
4051 done
4052
4053   ;;
4054 esac
4055 fi
4056 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4057
4058 if test -n "$PKG_CONFIG"; then
4059   echo "$as_me:4059: result: $PKG_CONFIG" >&5
4060 echo "${ECHO_T}$PKG_CONFIG" >&6
4061 else
4062   echo "$as_me:4062: result: no" >&5
4063 echo "${ECHO_T}no" >&6
4064 fi
4065
4066 fi
4067 if test -z "$ac_cv_path_PKG_CONFIG"; then
4068   ac_pt_PKG_CONFIG=$PKG_CONFIG
4069   # Extract the first word of "pkg-config", so it can be a program name with args.
4070 set dummy pkg-config; ac_word=$2
4071 echo "$as_me:4071: checking for $ac_word" >&5
4072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4073 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4074   echo $ECHO_N "(cached) $ECHO_C" >&6
4075 else
4076   case $ac_pt_PKG_CONFIG in
4077   [\\/]* | ?:[\\/]*)
4078   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4079   ;;
4080   *)
4081   ac_save_IFS=$IFS; IFS=$ac_path_separator
4082 ac_dummy="$PATH"
4083 for ac_dir in $ac_dummy; do
4084   IFS=$ac_save_IFS
4085   test -z "$ac_dir" && ac_dir=.
4086   if $as_executable_p "$ac_dir/$ac_word"; then
4087    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4088    echo "$as_me:4088: found $ac_dir/$ac_word" >&5
4089    break
4090 fi
4091 done
4092
4093   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4094   ;;
4095 esac
4096 fi
4097 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4098
4099 if test -n "$ac_pt_PKG_CONFIG"; then
4100   echo "$as_me:4100: result: $ac_pt_PKG_CONFIG" >&5
4101 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4102 else
4103   echo "$as_me:4103: result: no" >&5
4104 echo "${ECHO_T}no" >&6
4105 fi
4106
4107   PKG_CONFIG=$ac_pt_PKG_CONFIG
4108 else
4109   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4110 fi
4111
4112         ;;
4113 (*)
4114         PKG_CONFIG=$withval
4115         ;;
4116 esac
4117
4118 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4119 if test "$PKG_CONFIG" != none ; then
4120
4121 if test "x$prefix" != xNONE; then
4122         cf_path_syntax="$prefix"
4123 else
4124         cf_path_syntax="$ac_default_prefix"
4125 fi
4126
4127 case ".$PKG_CONFIG" in
4128 (.\$\(*\)*|.\'*\'*)
4129         ;;
4130 (..|./*|.\\*)
4131         ;;
4132 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4133         ;;
4134 (.\$\{*prefix\}*|.\$\{*dir\}*)
4135         eval PKG_CONFIG="$PKG_CONFIG"
4136         case ".$PKG_CONFIG" in
4137         (.NONE/*)
4138                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4139                 ;;
4140         esac
4141         ;;
4142 (.no|.NONE/*)
4143         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4144         ;;
4145 (*)
4146         { { echo "$as_me:4146: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4147 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4148    { (exit 1); exit 1; }; }
4149         ;;
4150 esac
4151
4152 elif test "x$cf_pkg_config" != xno ; then
4153         { echo "$as_me:4153: WARNING: pkg-config is not installed" >&5
4154 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4155 fi
4156
4157 case "$PKG_CONFIG" in
4158 (no|none|yes)
4159         echo "$as_me:4159: checking for pkg-config library directory" >&5
4160 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4161         ;;
4162 (*)
4163         echo "$as_me:4163: checking for $PKG_CONFIG library directory" >&5
4164 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4165         ;;
4166 esac
4167
4168 # if $PKG_CONFIG_LIBDIR is set, try to use that
4169 if test -n "$PKG_CONFIG_PATH"; then
4170         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4171 elif test -n "$PKG_CONFIG_LIBDIR"; then
4172         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4173 else
4174         cf_search_path=auto
4175 fi
4176
4177 # if the option is used, let that override.  otherwise default to "libdir"
4178
4179 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4180 if test "${with_pkg_config_libdir+set}" = set; then
4181   withval="$with_pkg_config_libdir"
4182   cf_search_path=$withval
4183 else
4184   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4185 fi;
4186
4187 case "x$cf_search_path" in
4188 (xlibdir)
4189         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4190         echo "$as_me:4190: result: $PKG_CONFIG_LIBDIR" >&5
4191 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4192         cf_search_path=
4193         ;;
4194 (x)
4195         ;;
4196 (x/*\ *)
4197         PKG_CONFIG_LIBDIR=
4198         ;;
4199 (x/*)
4200         PKG_CONFIG_LIBDIR="$cf_search_path"
4201         echo "$as_me:4201: result: $PKG_CONFIG_LIBDIR" >&5
4202 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4203         cf_search_path=
4204         ;;
4205 (xyes|xauto)
4206         echo "$as_me:4206: result: auto" >&5
4207 echo "${ECHO_T}auto" >&6
4208         cf_search_path=
4209         # Look for the library directory using the same prefix as the executable
4210         echo "$as_me:4210: checking for search-list" >&5
4211 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4212         if test "x$PKG_CONFIG" != xnone
4213         then
4214                 # works for pkg-config since version 0.24 (2009)
4215                 # works for pkgconf since version 0.8.3 (2012)
4216                 for cf_pkg_program in \
4217                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4218                         pkg-config \
4219                         pkgconf
4220                 do
4221                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4222                         test -n "$cf_search_path" && break
4223                 done
4224
4225                 # works for pkg-config since import in 2005 of original 2001 HP code.
4226                 test -z "$cf_search_path" && \
4227                 cf_search_path=`
4228                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4229 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4230         sub(\"^[^']*'\",\"\"); \
4231         sub(\"'.*\",\"\"); \
4232         printf \" %s\", \\$0; } \
4233 { next; } \
4234 "`
4235         fi
4236
4237         echo "$as_me:4237: result: $cf_search_path" >&5
4238 echo "${ECHO_T}$cf_search_path" >&6
4239         ;;
4240 (*)
4241         { { echo "$as_me:4241: error: Unexpected option value: $cf_search_path" >&5
4242 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4243    { (exit 1); exit 1; }; }
4244         ;;
4245 esac
4246
4247 if test -n "$cf_search_path"
4248 then
4249         echo "$as_me:4249: checking for first directory" >&5
4250 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4251         cf_pkg_config_path=none
4252         for cf_config in $cf_search_path
4253         do
4254                 if test -d "$cf_config"
4255                 then
4256                         cf_pkg_config_path=$cf_config
4257                         break
4258                 fi
4259         done
4260         echo "$as_me:4260: result: $cf_pkg_config_path" >&5
4261 echo "${ECHO_T}$cf_pkg_config_path" >&6
4262
4263         if test "x$cf_pkg_config_path" != xnone ; then
4264                 # limit this to the first directory found
4265                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4266         fi
4267
4268         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4269         then
4270                 echo "$as_me:4270: checking for workaround" >&5
4271 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4272                 if test "$prefix" = "NONE" ; then
4273                         cf_prefix="$ac_default_prefix"
4274                 else
4275                         cf_prefix="$prefix"
4276                 fi
4277                 eval cf_libdir=$libdir
4278                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4279                 cf_backup=
4280                 for cf_config in $cf_search_path
4281                 do
4282                         case $cf_config in
4283                         $cf_libdir/pkgconfig)
4284                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4285                                 break
4286                                 ;;
4287                         *)
4288                                 test -z "$cf_backup" && cf_backup=$cf_config
4289                                 ;;
4290                         esac
4291                 done
4292                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4293                 echo "$as_me:4293: result: $PKG_CONFIG_LIBDIR" >&5
4294 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4295         fi
4296 fi
4297
4298 if test "x$PKG_CONFIG" != xnone
4299 then
4300         echo "$as_me:4300: checking if we should install .pc files for $PKG_CONFIG" >&5
4301 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4302 else
4303         echo "$as_me:4303: checking if we should install .pc files" >&5
4304 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4305 fi
4306
4307 # Check whether --enable-pc-files or --disable-pc-files was given.
4308 if test "${enable_pc_files+set}" = set; then
4309   enableval="$enable_pc_files"
4310   enable_pc_files=$enableval
4311 else
4312   enable_pc_files=no
4313 fi;
4314 echo "$as_me:4314: result: $enable_pc_files" >&5
4315 echo "${ECHO_T}$enable_pc_files" >&6
4316
4317 if test "x$enable_pc_files" != xno
4318 then
4319         MAKE_PC_FILES=
4320         case "x$PKG_CONFIG_LIBDIR" in
4321         (xno|xnone|xyes|x)
4322                 { echo "$as_me:4322: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4323 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4324                 ;;
4325         (*)
4326                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4327
4328 if test "x$prefix" != xNONE; then
4329         cf_path_syntax="$prefix"
4330 else
4331         cf_path_syntax="$ac_default_prefix"
4332 fi
4333
4334 case ".$cf_pkg_config_libdir" in
4335 (.\$\(*\)*|.\'*\'*)
4336         ;;
4337 (..|./*|.\\*)
4338         ;;
4339 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4340         ;;
4341 (.\$\{*prefix\}*|.\$\{*dir\}*)
4342         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4343         case ".$cf_pkg_config_libdir" in
4344         (.NONE/*)
4345                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4346                 ;;
4347         esac
4348         ;;
4349 (.no|.NONE/*)
4350         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4351         ;;
4352 (*)
4353         { { echo "$as_me:4353: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4354 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4355    { (exit 1); exit 1; }; }
4356         ;;
4357 esac
4358
4359                 ;;
4360         esac
4361 else
4362         MAKE_PC_FILES="#"
4363 fi
4364
4365 if test -z "$MAKE_PC_FILES"
4366 then
4367         echo "$as_me:4367: checking for suffix to add to pc-files" >&5
4368 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4369
4370 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4371 if test "${with_pc_suffix+set}" = set; then
4372   withval="$with_pc_suffix"
4373   case "x$withval" in
4374         (xyes|xno)
4375                 PC_MODULE_SUFFIX=
4376                 ;;
4377         (*)     PC_MODULE_SUFFIX="$withval"
4378                 ;;
4379         esac
4380 fi;
4381         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4382         echo "$as_me:4382: result: $PC_MODULE_SUFFIX" >&5
4383 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4384         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4385
4386 fi
4387
4388 echo "$as_me:4388: checking if we should assume mixed-case filenames" >&5
4389 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4390
4391 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4392 if test "${enable_mixed_case+set}" = set; then
4393   enableval="$enable_mixed_case"
4394   enable_mixedcase=$enableval
4395 else
4396   enable_mixedcase=auto
4397 fi;
4398 echo "$as_me:4398: result: $enable_mixedcase" >&5
4399 echo "${ECHO_T}$enable_mixedcase" >&6
4400 if test "$enable_mixedcase" = "auto" ; then
4401
4402 echo "$as_me:4402: checking if filesystem supports mixed-case filenames" >&5
4403 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4404 if test "${cf_cv_mixedcase+set}" = set; then
4405   echo $ECHO_N "(cached) $ECHO_C" >&6
4406 else
4407
4408 if test "$cross_compiling" = yes ; then
4409         case "$target_alias" in
4410         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4411                 cf_cv_mixedcase=no
4412                 ;;
4413         (*)
4414                 cf_cv_mixedcase=yes
4415                 ;;
4416         esac
4417 else
4418         rm -f conftest CONFTEST
4419         echo test >conftest
4420         if test -f CONFTEST ; then
4421                 cf_cv_mixedcase=no
4422         else
4423                 cf_cv_mixedcase=yes
4424         fi
4425         rm -f conftest CONFTEST
4426 fi
4427
4428 fi
4429 echo "$as_me:4429: result: $cf_cv_mixedcase" >&5
4430 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4431 test "$cf_cv_mixedcase" = yes &&
4432 cat >>confdefs.h <<\EOF
4433 #define MIXEDCASE_FILENAMES 1
4434 EOF
4435
4436 else
4437         cf_cv_mixedcase=$enable_mixedcase
4438         if test "x$enable_mixedcase" = "xyes" ; then
4439
4440 cat >>confdefs.h <<\EOF
4441 #define MIXEDCASE_FILENAMES 1
4442 EOF
4443
4444         fi
4445 fi
4446
4447 # do this after mixed-case option (tags/TAGS is not as important as tic).
4448 echo "$as_me:4448: checking whether ${MAKE-make} sets \${MAKE}" >&5
4449 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4450 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4451 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4452   echo $ECHO_N "(cached) $ECHO_C" >&6
4453 else
4454   cat >conftest.make <<\EOF
4455 all:
4456         @echo 'ac_maketemp="${MAKE}"'
4457 EOF
4458 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4459 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4460 if test -n "$ac_maketemp"; then
4461   eval ac_cv_prog_make_${ac_make}_set=yes
4462 else
4463   eval ac_cv_prog_make_${ac_make}_set=no
4464 fi
4465 rm -f conftest.make
4466 fi
4467 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4468   echo "$as_me:4468: result: yes" >&5
4469 echo "${ECHO_T}yes" >&6
4470   SET_MAKE=
4471 else
4472   echo "$as_me:4472: result: no" >&5
4473 echo "${ECHO_T}no" >&6
4474   SET_MAKE="MAKE=${MAKE-make}"
4475 fi
4476
4477 echo "$as_me:4477: checking for \".PHONY\" make-support" >&5
4478 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4479 if test "${cf_cv_make_PHONY+set}" = set; then
4480   echo $ECHO_N "(cached) $ECHO_C" >&6
4481 else
4482
4483         rm -rf conftest*
4484         (
4485                 mkdir conftest || exit 1
4486                 cd conftest
4487                 cat >makefile <<'CF_EOF'
4488 .PHONY: always
4489 DATA=0
4490 always: always.out
4491         @echo "** making $@ $(DATA)"
4492 once: once.out
4493         @echo "** making $@ $(DATA)"
4494 always.out:
4495         @echo "** making $@ $(DATA)"
4496         echo $(DATA) > $@
4497 once.out:
4498         @echo "** making $@ $(DATA)"
4499         echo $(DATA) > $@
4500 CF_EOF
4501                 for cf_data in 1 2 3
4502                 do
4503                         ${MAKE:-make} always DATA=$cf_data
4504                         ${MAKE:-make} once   DATA=$cf_data
4505                         ${MAKE:-make} -t always once
4506                         if test -f always ; then
4507                                 echo "no (case 1)" > ../conftest.tmp
4508                         elif test ! -f always.out ; then
4509                                 echo "no (case 2)" > ../conftest.tmp
4510                         elif test ! -f once.out ; then
4511                                 echo "no (case 3)" > ../conftest.tmp
4512                         elif ! cmp -s always.out once.out ; then
4513                                 echo "no (case 4)" > ../conftest.tmp
4514                                 diff always.out once.out
4515                         else
4516                                 cf_check="`cat always.out`"
4517                                 if test "x$cf_check" != "x$cf_data" ; then
4518                                         echo "no (case 5)" > ../conftest.tmp
4519                                 else
4520                                         echo yes > ../conftest.tmp
4521                                         rm -f ./*.out
4522                                         continue
4523                                 fi
4524                         fi
4525                         break
4526                 done
4527         ) >&5 2>&1
4528         cf_cv_make_PHONY="`cat conftest.tmp`"
4529         rm -rf conftest*
4530
4531 fi
4532 echo "$as_me:4532: result: $cf_cv_make_PHONY" >&5
4533 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4534 MAKE_NO_PHONY="#"
4535 MAKE_PHONY="#"
4536 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4537 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4538
4539 for ac_prog in exctags ctags
4540 do
4541   # Extract the first word of "$ac_prog", so it can be a program name with args.
4542 set dummy $ac_prog; ac_word=$2
4543 echo "$as_me:4543: checking for $ac_word" >&5
4544 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4545 if test "${ac_cv_prog_CTAGS+set}" = set; then
4546   echo $ECHO_N "(cached) $ECHO_C" >&6
4547 else
4548   if test -n "$CTAGS"; then
4549   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4550 else
4551   ac_save_IFS=$IFS; IFS=$ac_path_separator
4552 ac_dummy="$PATH"
4553 for ac_dir in $ac_dummy; do
4554   IFS=$ac_save_IFS
4555   test -z "$ac_dir" && ac_dir=.
4556   $as_executable_p "$ac_dir/$ac_word" || continue
4557 ac_cv_prog_CTAGS="$ac_prog"
4558 echo "$as_me:4558: found $ac_dir/$ac_word" >&5
4559 break
4560 done
4561
4562 fi
4563 fi
4564 CTAGS=$ac_cv_prog_CTAGS
4565 if test -n "$CTAGS"; then
4566   echo "$as_me:4566: result: $CTAGS" >&5
4567 echo "${ECHO_T}$CTAGS" >&6
4568 else
4569   echo "$as_me:4569: result: no" >&5
4570 echo "${ECHO_T}no" >&6
4571 fi
4572
4573   test -n "$CTAGS" && break
4574 done
4575
4576 for ac_prog in exetags etags
4577 do
4578   # Extract the first word of "$ac_prog", so it can be a program name with args.
4579 set dummy $ac_prog; ac_word=$2
4580 echo "$as_me:4580: checking for $ac_word" >&5
4581 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4582 if test "${ac_cv_prog_ETAGS+set}" = set; then
4583   echo $ECHO_N "(cached) $ECHO_C" >&6
4584 else
4585   if test -n "$ETAGS"; then
4586   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4587 else
4588   ac_save_IFS=$IFS; IFS=$ac_path_separator
4589 ac_dummy="$PATH"
4590 for ac_dir in $ac_dummy; do
4591   IFS=$ac_save_IFS
4592   test -z "$ac_dir" && ac_dir=.
4593   $as_executable_p "$ac_dir/$ac_word" || continue
4594 ac_cv_prog_ETAGS="$ac_prog"
4595 echo "$as_me:4595: found $ac_dir/$ac_word" >&5
4596 break
4597 done
4598
4599 fi
4600 fi
4601 ETAGS=$ac_cv_prog_ETAGS
4602 if test -n "$ETAGS"; then
4603   echo "$as_me:4603: result: $ETAGS" >&5
4604 echo "${ECHO_T}$ETAGS" >&6
4605 else
4606   echo "$as_me:4606: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610   test -n "$ETAGS" && break
4611 done
4612
4613 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4614 set dummy ${CTAGS:-ctags}; ac_word=$2
4615 echo "$as_me:4615: checking for $ac_word" >&5
4616 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4617 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4618   echo $ECHO_N "(cached) $ECHO_C" >&6
4619 else
4620   if test -n "$MAKE_LOWER_TAGS"; then
4621   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4622 else
4623   ac_save_IFS=$IFS; IFS=$ac_path_separator
4624 ac_dummy="$PATH"
4625 for ac_dir in $ac_dummy; do
4626   IFS=$ac_save_IFS
4627   test -z "$ac_dir" && ac_dir=.
4628   $as_executable_p "$ac_dir/$ac_word" || continue
4629 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4630 echo "$as_me:4630: found $ac_dir/$ac_word" >&5
4631 break
4632 done
4633
4634   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4635 fi
4636 fi
4637 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4638 if test -n "$MAKE_LOWER_TAGS"; then
4639   echo "$as_me:4639: result: $MAKE_LOWER_TAGS" >&5
4640 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4641 else
4642   echo "$as_me:4642: result: no" >&5
4643 echo "${ECHO_T}no" >&6
4644 fi
4645
4646 if test "$cf_cv_mixedcase" = yes ; then
4647         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4648 set dummy ${ETAGS:-etags}; ac_word=$2
4649 echo "$as_me:4649: checking for $ac_word" >&5
4650 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4651 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4652   echo $ECHO_N "(cached) $ECHO_C" >&6
4653 else
4654   if test -n "$MAKE_UPPER_TAGS"; then
4655   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4656 else
4657   ac_save_IFS=$IFS; IFS=$ac_path_separator
4658 ac_dummy="$PATH"
4659 for ac_dir in $ac_dummy; do
4660   IFS=$ac_save_IFS
4661   test -z "$ac_dir" && ac_dir=.
4662   $as_executable_p "$ac_dir/$ac_word" || continue
4663 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4664 echo "$as_me:4664: found $ac_dir/$ac_word" >&5
4665 break
4666 done
4667
4668   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4669 fi
4670 fi
4671 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4672 if test -n "$MAKE_UPPER_TAGS"; then
4673   echo "$as_me:4673: result: $MAKE_UPPER_TAGS" >&5
4674 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4675 else
4676   echo "$as_me:4676: result: no" >&5
4677 echo "${ECHO_T}no" >&6
4678 fi
4679
4680 else
4681         MAKE_UPPER_TAGS=no
4682 fi
4683
4684 if test "$MAKE_UPPER_TAGS" = yes ; then
4685         MAKE_UPPER_TAGS=
4686 else
4687         MAKE_UPPER_TAGS="#"
4688 fi
4689
4690 if test "$MAKE_LOWER_TAGS" = yes ; then
4691         MAKE_LOWER_TAGS=
4692 else
4693         MAKE_LOWER_TAGS="#"
4694 fi
4695
4696 echo "$as_me:4696: checking for makeflags variable" >&5
4697 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4698 if test "${cf_cv_makeflags+set}" = set; then
4699   echo $ECHO_N "(cached) $ECHO_C" >&6
4700 else
4701
4702         cf_cv_makeflags=''
4703         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4704         do
4705                 cat >cf_makeflags.tmp <<CF_EOF
4706 SHELL = $SHELL
4707 all :
4708         @ echo '.$cf_option'
4709 CF_EOF
4710                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4711                 case "$cf_result" in
4712                 (.*k|.*kw)
4713                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4714                         case "$cf_result" in
4715                         (.*CC=*)        cf_cv_makeflags=
4716                                 ;;
4717                         (*)     cf_cv_makeflags=$cf_option
4718                                 ;;
4719                         esac
4720                         break
4721                         ;;
4722                 (.-)
4723                         ;;
4724                 (*)
4725
4726 echo "${as_me:-configure}:4726: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4727
4728                         ;;
4729                 esac
4730         done
4731         rm -f cf_makeflags.tmp
4732
4733 fi
4734 echo "$as_me:4734: result: $cf_cv_makeflags" >&5
4735 echo "${ECHO_T}$cf_cv_makeflags" >&6
4736
4737 if test -n "$ac_tool_prefix"; then
4738   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4739 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4740 echo "$as_me:4740: checking for $ac_word" >&5
4741 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4742 if test "${ac_cv_prog_RANLIB+set}" = set; then
4743   echo $ECHO_N "(cached) $ECHO_C" >&6
4744 else
4745   if test -n "$RANLIB"; then
4746   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4747 else
4748   ac_save_IFS=$IFS; IFS=$ac_path_separator
4749 ac_dummy="$PATH"
4750 for ac_dir in $ac_dummy; do
4751   IFS=$ac_save_IFS
4752   test -z "$ac_dir" && ac_dir=.
4753   $as_executable_p "$ac_dir/$ac_word" || continue
4754 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4755 echo "$as_me:4755: found $ac_dir/$ac_word" >&5
4756 break
4757 done
4758
4759 fi
4760 fi
4761 RANLIB=$ac_cv_prog_RANLIB
4762 if test -n "$RANLIB"; then
4763   echo "$as_me:4763: result: $RANLIB" >&5
4764 echo "${ECHO_T}$RANLIB" >&6
4765 else
4766   echo "$as_me:4766: result: no" >&5
4767 echo "${ECHO_T}no" >&6
4768 fi
4769
4770 fi
4771 if test -z "$ac_cv_prog_RANLIB"; then
4772   ac_ct_RANLIB=$RANLIB
4773   # Extract the first word of "ranlib", so it can be a program name with args.
4774 set dummy ranlib; ac_word=$2
4775 echo "$as_me:4775: checking for $ac_word" >&5
4776 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4777 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4778   echo $ECHO_N "(cached) $ECHO_C" >&6
4779 else
4780   if test -n "$ac_ct_RANLIB"; then
4781   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4782 else
4783   ac_save_IFS=$IFS; IFS=$ac_path_separator
4784 ac_dummy="$PATH"
4785 for ac_dir in $ac_dummy; do
4786   IFS=$ac_save_IFS
4787   test -z "$ac_dir" && ac_dir=.
4788   $as_executable_p "$ac_dir/$ac_word" || continue
4789 ac_cv_prog_ac_ct_RANLIB="ranlib"
4790 echo "$as_me:4790: found $ac_dir/$ac_word" >&5
4791 break
4792 done
4793
4794   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4795 fi
4796 fi
4797 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4798 if test -n "$ac_ct_RANLIB"; then
4799   echo "$as_me:4799: result: $ac_ct_RANLIB" >&5
4800 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4801 else
4802   echo "$as_me:4802: result: no" >&5
4803 echo "${ECHO_T}no" >&6
4804 fi
4805
4806   RANLIB=$ac_ct_RANLIB
4807 else
4808   RANLIB="$ac_cv_prog_RANLIB"
4809 fi
4810
4811 if test -n "$ac_tool_prefix"; then
4812   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4813 set dummy ${ac_tool_prefix}ld; ac_word=$2
4814 echo "$as_me:4814: checking for $ac_word" >&5
4815 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4816 if test "${ac_cv_prog_LD+set}" = set; then
4817   echo $ECHO_N "(cached) $ECHO_C" >&6
4818 else
4819   if test -n "$LD"; then
4820   ac_cv_prog_LD="$LD" # Let the user override the test.
4821 else
4822   ac_save_IFS=$IFS; IFS=$ac_path_separator
4823 ac_dummy="$PATH"
4824 for ac_dir in $ac_dummy; do
4825   IFS=$ac_save_IFS
4826   test -z "$ac_dir" && ac_dir=.
4827   $as_executable_p "$ac_dir/$ac_word" || continue
4828 ac_cv_prog_LD="${ac_tool_prefix}ld"
4829 echo "$as_me:4829: found $ac_dir/$ac_word" >&5
4830 break
4831 done
4832
4833 fi
4834 fi
4835 LD=$ac_cv_prog_LD
4836 if test -n "$LD"; then
4837   echo "$as_me:4837: result: $LD" >&5
4838 echo "${ECHO_T}$LD" >&6
4839 else
4840   echo "$as_me:4840: result: no" >&5
4841 echo "${ECHO_T}no" >&6
4842 fi
4843
4844 fi
4845 if test -z "$ac_cv_prog_LD"; then
4846   ac_ct_LD=$LD
4847   # Extract the first word of "ld", so it can be a program name with args.
4848 set dummy ld; ac_word=$2
4849 echo "$as_me:4849: checking for $ac_word" >&5
4850 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4851 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4852   echo $ECHO_N "(cached) $ECHO_C" >&6
4853 else
4854   if test -n "$ac_ct_LD"; then
4855   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4856 else
4857   ac_save_IFS=$IFS; IFS=$ac_path_separator
4858 ac_dummy="$PATH"
4859 for ac_dir in $ac_dummy; do
4860   IFS=$ac_save_IFS
4861   test -z "$ac_dir" && ac_dir=.
4862   $as_executable_p "$ac_dir/$ac_word" || continue
4863 ac_cv_prog_ac_ct_LD="ld"
4864 echo "$as_me:4864: found $ac_dir/$ac_word" >&5
4865 break
4866 done
4867
4868   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4869 fi
4870 fi
4871 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4872 if test -n "$ac_ct_LD"; then
4873   echo "$as_me:4873: result: $ac_ct_LD" >&5
4874 echo "${ECHO_T}$ac_ct_LD" >&6
4875 else
4876   echo "$as_me:4876: result: no" >&5
4877 echo "${ECHO_T}no" >&6
4878 fi
4879
4880   LD=$ac_ct_LD
4881 else
4882   LD="$ac_cv_prog_LD"
4883 fi
4884
4885 if test -n "$ac_tool_prefix"; then
4886   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4887 set dummy ${ac_tool_prefix}ar; ac_word=$2
4888 echo "$as_me:4888: checking for $ac_word" >&5
4889 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4890 if test "${ac_cv_prog_AR+set}" = set; then
4891   echo $ECHO_N "(cached) $ECHO_C" >&6
4892 else
4893   if test -n "$AR"; then
4894   ac_cv_prog_AR="$AR" # Let the user override the test.
4895 else
4896   ac_save_IFS=$IFS; IFS=$ac_path_separator
4897 ac_dummy="$PATH"
4898 for ac_dir in $ac_dummy; do
4899   IFS=$ac_save_IFS
4900   test -z "$ac_dir" && ac_dir=.
4901   $as_executable_p "$ac_dir/$ac_word" || continue
4902 ac_cv_prog_AR="${ac_tool_prefix}ar"
4903 echo "$as_me:4903: found $ac_dir/$ac_word" >&5
4904 break
4905 done
4906
4907 fi
4908 fi
4909 AR=$ac_cv_prog_AR
4910 if test -n "$AR"; then
4911   echo "$as_me:4911: result: $AR" >&5
4912 echo "${ECHO_T}$AR" >&6
4913 else
4914   echo "$as_me:4914: result: no" >&5
4915 echo "${ECHO_T}no" >&6
4916 fi
4917
4918 fi
4919 if test -z "$ac_cv_prog_AR"; then
4920   ac_ct_AR=$AR
4921   # Extract the first word of "ar", so it can be a program name with args.
4922 set dummy ar; ac_word=$2
4923 echo "$as_me:4923: checking for $ac_word" >&5
4924 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4925 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4926   echo $ECHO_N "(cached) $ECHO_C" >&6
4927 else
4928   if test -n "$ac_ct_AR"; then
4929   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4930 else
4931   ac_save_IFS=$IFS; IFS=$ac_path_separator
4932 ac_dummy="$PATH"
4933 for ac_dir in $ac_dummy; do
4934   IFS=$ac_save_IFS
4935   test -z "$ac_dir" && ac_dir=.
4936   $as_executable_p "$ac_dir/$ac_word" || continue
4937 ac_cv_prog_ac_ct_AR="ar"
4938 echo "$as_me:4938: found $ac_dir/$ac_word" >&5
4939 break
4940 done
4941
4942   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4943 fi
4944 fi
4945 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4946 if test -n "$ac_ct_AR"; then
4947   echo "$as_me:4947: result: $ac_ct_AR" >&5
4948 echo "${ECHO_T}$ac_ct_AR" >&6
4949 else
4950   echo "$as_me:4950: result: no" >&5
4951 echo "${ECHO_T}no" >&6
4952 fi
4953
4954   AR=$ac_ct_AR
4955 else
4956   AR="$ac_cv_prog_AR"
4957 fi
4958
4959 if test -n "$ac_tool_prefix"; then
4960   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4961 set dummy ${ac_tool_prefix}nm; ac_word=$2
4962 echo "$as_me:4962: checking for $ac_word" >&5
4963 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4964 if test "${ac_cv_prog_NM+set}" = set; then
4965   echo $ECHO_N "(cached) $ECHO_C" >&6
4966 else
4967   if test -n "$NM"; then
4968   ac_cv_prog_NM="$NM" # Let the user override the test.
4969 else
4970   ac_save_IFS=$IFS; IFS=$ac_path_separator
4971 ac_dummy="$PATH"
4972 for ac_dir in $ac_dummy; do
4973   IFS=$ac_save_IFS
4974   test -z "$ac_dir" && ac_dir=.
4975   $as_executable_p "$ac_dir/$ac_word" || continue
4976 ac_cv_prog_NM="${ac_tool_prefix}nm"
4977 echo "$as_me:4977: found $ac_dir/$ac_word" >&5
4978 break
4979 done
4980
4981 fi
4982 fi
4983 NM=$ac_cv_prog_NM
4984 if test -n "$NM"; then
4985   echo "$as_me:4985: result: $NM" >&5
4986 echo "${ECHO_T}$NM" >&6
4987 else
4988   echo "$as_me:4988: result: no" >&5
4989 echo "${ECHO_T}no" >&6
4990 fi
4991
4992 fi
4993 if test -z "$ac_cv_prog_NM"; then
4994   ac_ct_NM=$NM
4995   # Extract the first word of "nm", so it can be a program name with args.
4996 set dummy nm; ac_word=$2
4997 echo "$as_me:4997: checking for $ac_word" >&5
4998 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4999 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5000   echo $ECHO_N "(cached) $ECHO_C" >&6
5001 else
5002   if test -n "$ac_ct_NM"; then
5003   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5004 else
5005   ac_save_IFS=$IFS; IFS=$ac_path_separator
5006 ac_dummy="$PATH"
5007 for ac_dir in $ac_dummy; do
5008   IFS=$ac_save_IFS
5009   test -z "$ac_dir" && ac_dir=.
5010   $as_executable_p "$ac_dir/$ac_word" || continue
5011 ac_cv_prog_ac_ct_NM="nm"
5012 echo "$as_me:5012: found $ac_dir/$ac_word" >&5
5013 break
5014 done
5015
5016   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5017 fi
5018 fi
5019 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5020 if test -n "$ac_ct_NM"; then
5021   echo "$as_me:5021: result: $ac_ct_NM" >&5
5022 echo "${ECHO_T}$ac_ct_NM" >&6
5023 else
5024   echo "$as_me:5024: result: no" >&5
5025 echo "${ECHO_T}no" >&6
5026 fi
5027
5028   NM=$ac_ct_NM
5029 else
5030   NM="$ac_cv_prog_NM"
5031 fi
5032
5033 if test -n "$ac_tool_prefix"; then
5034   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5035 set dummy ${ac_tool_prefix}ar; ac_word=$2
5036 echo "$as_me:5036: checking for $ac_word" >&5
5037 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5038 if test "${ac_cv_prog_AR+set}" = set; then
5039   echo $ECHO_N "(cached) $ECHO_C" >&6
5040 else
5041   if test -n "$AR"; then
5042   ac_cv_prog_AR="$AR" # Let the user override the test.
5043 else
5044   ac_save_IFS=$IFS; IFS=$ac_path_separator
5045 ac_dummy="$PATH"
5046 for ac_dir in $ac_dummy; do
5047   IFS=$ac_save_IFS
5048   test -z "$ac_dir" && ac_dir=.
5049   $as_executable_p "$ac_dir/$ac_word" || continue
5050 ac_cv_prog_AR="${ac_tool_prefix}ar"
5051 echo "$as_me:5051: found $ac_dir/$ac_word" >&5
5052 break
5053 done
5054
5055 fi
5056 fi
5057 AR=$ac_cv_prog_AR
5058 if test -n "$AR"; then
5059   echo "$as_me:5059: result: $AR" >&5
5060 echo "${ECHO_T}$AR" >&6
5061 else
5062   echo "$as_me:5062: result: no" >&5
5063 echo "${ECHO_T}no" >&6
5064 fi
5065
5066 fi
5067 if test -z "$ac_cv_prog_AR"; then
5068   ac_ct_AR=$AR
5069   # Extract the first word of "ar", so it can be a program name with args.
5070 set dummy ar; ac_word=$2
5071 echo "$as_me:5071: checking for $ac_word" >&5
5072 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5073 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5074   echo $ECHO_N "(cached) $ECHO_C" >&6
5075 else
5076   if test -n "$ac_ct_AR"; then
5077   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5078 else
5079   ac_save_IFS=$IFS; IFS=$ac_path_separator
5080 ac_dummy="$PATH"
5081 for ac_dir in $ac_dummy; do
5082   IFS=$ac_save_IFS
5083   test -z "$ac_dir" && ac_dir=.
5084   $as_executable_p "$ac_dir/$ac_word" || continue
5085 ac_cv_prog_ac_ct_AR="ar"
5086 echo "$as_me:5086: found $ac_dir/$ac_word" >&5
5087 break
5088 done
5089
5090   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5091 fi
5092 fi
5093 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5094 if test -n "$ac_ct_AR"; then
5095   echo "$as_me:5095: result: $ac_ct_AR" >&5
5096 echo "${ECHO_T}$ac_ct_AR" >&6
5097 else
5098   echo "$as_me:5098: result: no" >&5
5099 echo "${ECHO_T}no" >&6
5100 fi
5101
5102   AR=$ac_ct_AR
5103 else
5104   AR="$ac_cv_prog_AR"
5105 fi
5106
5107 echo "$as_me:5107: checking for options to update archives" >&5
5108 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5109 if test "${cf_cv_ar_flags+set}" = set; then
5110   echo $ECHO_N "(cached) $ECHO_C" >&6
5111 else
5112
5113         case "$cf_cv_system_name" in
5114         (*-msvc*)
5115                 cf_cv_ar_flags=''
5116                 cat >mk_static_lib.sh <<-EOF
5117                 #!$SHELL
5118                 MSVC_BIN="$AR"
5119                 out="\$1"
5120                 shift
5121                 exec \$MSVC_BIN -out:"\$out" \$@
5122                 EOF
5123                 chmod +x mk_static_lib.sh
5124                 AR=`pwd`/mk_static_lib.sh
5125                 ;;
5126         (*)
5127                 cf_cv_ar_flags=unknown
5128                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5129                 do
5130
5131                         # check if $ARFLAGS already contains this choice
5132                         if test "x$ARFLAGS" != "x" ; then
5133                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5134                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5135                                         cf_cv_ar_flags=
5136                                         break
5137                                 fi
5138                         fi
5139
5140                         rm -f "conftest.$ac_cv_objext"
5141                         rm -f conftest.a
5142
5143                         cat >"conftest.$ac_ext" <<EOF
5144 #line 5144 "configure"
5145 int     testdata[3] = { 123, 456, 789 };
5146 EOF
5147                         if { (eval echo "$as_me:5147: \"$ac_compile\"") >&5
5148   (eval $ac_compile) 2>&5
5149   ac_status=$?
5150   echo "$as_me:5150: \$? = $ac_status" >&5
5151   (exit "$ac_status"); } ; then
5152                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5153                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5154                                 if test -f conftest.a ; then
5155                                         cf_cv_ar_flags="$cf_ar_flags"
5156                                         break
5157                                 fi
5158                         else
5159                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5160
5161 echo "${as_me:-configure}:5161: testing cannot compile test-program ..." 1>&5
5162
5163                                 break
5164                         fi
5165                 done
5166                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5167                 ;;
5168         esac
5169
5170 fi
5171 echo "$as_me:5171: result: $cf_cv_ar_flags" >&5
5172 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5173
5174 if test -n "$ARFLAGS" ; then
5175         if test -n "$cf_cv_ar_flags" ; then
5176                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5177         fi
5178 else
5179         ARFLAGS=$cf_cv_ar_flags
5180 fi
5181
5182 echo "$as_me:5182: checking if you have specified an install-prefix" >&5
5183 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5184
5185 # Check whether --with-install-prefix or --without-install-prefix was given.
5186 if test "${with_install_prefix+set}" = set; then
5187   withval="$with_install_prefix"
5188   case "x$withval" in
5189         (xyes|xno)
5190                 ;;
5191         (*)     DESTDIR="$withval"
5192                 ;;
5193         esac
5194 fi;
5195 echo "$as_me:5195: result: $DESTDIR" >&5
5196 echo "${ECHO_T}$DESTDIR" >&6
5197
5198 ###############################################################################
5199
5200 # If we're cross-compiling, allow the user to override the tools and their
5201 # options.  The configure script is oriented toward identifying the host
5202 # compiler, etc., but we need a build compiler to generate parts of the source.
5203
5204 case "$cf_cv_system_name" in
5205 (*-msvc*)
5206         LDFLAGS="$LDFLAGS user32.lib"
5207         export LDFLAGS
5208         ;;
5209 esac
5210
5211 if test "$cross_compiling" = yes ; then
5212
5213         # defaults that we might want to override
5214         : ${BUILD_CFLAGS:=''}
5215         : ${BUILD_CPPFLAGS:=''}
5216         : ${BUILD_LDFLAGS:=''}
5217         : ${BUILD_LIBS:=''}
5218         : ${BUILD_EXEEXT:='$x'}
5219         : ${BUILD_OBJEXT:='o'}
5220
5221 # Check whether --with-build-cc or --without-build-cc was given.
5222 if test "${with_build_cc+set}" = set; then
5223   withval="$with_build_cc"
5224   BUILD_CC="$withval"
5225 else
5226   for ac_prog in gcc clang c99 c89 cc cl
5227 do
5228   # Extract the first word of "$ac_prog", so it can be a program name with args.
5229 set dummy $ac_prog; ac_word=$2
5230 echo "$as_me:5230: checking for $ac_word" >&5
5231 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5232 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5233   echo $ECHO_N "(cached) $ECHO_C" >&6
5234 else
5235   if test -n "$BUILD_CC"; then
5236   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5237 else
5238   ac_save_IFS=$IFS; IFS=$ac_path_separator
5239 ac_dummy="$PATH"
5240 for ac_dir in $ac_dummy; do
5241   IFS=$ac_save_IFS
5242   test -z "$ac_dir" && ac_dir=.
5243   $as_executable_p "$ac_dir/$ac_word" || continue
5244 ac_cv_prog_BUILD_CC="$ac_prog"
5245 echo "$as_me:5245: found $ac_dir/$ac_word" >&5
5246 break
5247 done
5248
5249 fi
5250 fi
5251 BUILD_CC=$ac_cv_prog_BUILD_CC
5252 if test -n "$BUILD_CC"; then
5253   echo "$as_me:5253: result: $BUILD_CC" >&5
5254 echo "${ECHO_T}$BUILD_CC" >&6
5255 else
5256   echo "$as_me:5256: result: no" >&5
5257 echo "${ECHO_T}no" >&6
5258 fi
5259
5260   test -n "$BUILD_CC" && break
5261 done
5262 test -n "$BUILD_CC" || BUILD_CC="none"
5263
5264 fi;
5265         echo "$as_me:5265: checking for native build C compiler" >&5
5266 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5267         echo "$as_me:5267: result: $BUILD_CC" >&5
5268 echo "${ECHO_T}$BUILD_CC" >&6
5269
5270         echo "$as_me:5270: checking for native build C preprocessor" >&5
5271 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5272
5273 # Check whether --with-build-cpp or --without-build-cpp was given.
5274 if test "${with_build_cpp+set}" = set; then
5275   withval="$with_build_cpp"
5276   BUILD_CPP="$withval"
5277 else
5278   BUILD_CPP='${BUILD_CC} -E'
5279 fi;
5280         echo "$as_me:5280: result: $BUILD_CPP" >&5
5281 echo "${ECHO_T}$BUILD_CPP" >&6
5282
5283         echo "$as_me:5283: checking for native build C flags" >&5
5284 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5285
5286 # Check whether --with-build-cflags or --without-build-cflags was given.
5287 if test "${with_build_cflags+set}" = set; then
5288   withval="$with_build_cflags"
5289   BUILD_CFLAGS="$withval"
5290 fi;
5291         echo "$as_me:5291: result: $BUILD_CFLAGS" >&5
5292 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5293
5294         echo "$as_me:5294: checking for native build C preprocessor-flags" >&5
5295 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5296
5297 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5298 if test "${with_build_cppflags+set}" = set; then
5299   withval="$with_build_cppflags"
5300   BUILD_CPPFLAGS="$withval"
5301 fi;
5302         echo "$as_me:5302: result: $BUILD_CPPFLAGS" >&5
5303 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5304
5305         echo "$as_me:5305: checking for native build linker-flags" >&5
5306 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5307
5308 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5309 if test "${with_build_ldflags+set}" = set; then
5310   withval="$with_build_ldflags"
5311   BUILD_LDFLAGS="$withval"
5312 fi;
5313         echo "$as_me:5313: result: $BUILD_LDFLAGS" >&5
5314 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5315
5316         echo "$as_me:5316: checking for native build linker-libraries" >&5
5317 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5318
5319 # Check whether --with-build-libs or --without-build-libs was given.
5320 if test "${with_build_libs+set}" = set; then
5321   withval="$with_build_libs"
5322   BUILD_LIBS="$withval"
5323 fi;
5324         echo "$as_me:5324: result: $BUILD_LIBS" >&5
5325 echo "${ECHO_T}$BUILD_LIBS" >&6
5326
5327         # this assumes we're on Unix.
5328         BUILD_EXEEXT=
5329         BUILD_OBJEXT=o
5330
5331         : ${BUILD_CC:='${CC}'}
5332
5333         echo "$as_me:5333: checking if the build-compiler \"$BUILD_CC\" works" >&5
5334 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5335
5336         cf_save_crossed=$cross_compiling
5337         cf_save_ac_link=$ac_link
5338         cross_compiling=no
5339         cf_build_cppflags=$BUILD_CPPFLAGS
5340         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5341         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5342
5343         if test "$cross_compiling" = yes; then
5344   cf_ok_build_cc=unknown
5345 else
5346   cat >"conftest.$ac_ext" <<_ACEOF
5347 #line 5347 "configure"
5348 #include "confdefs.h"
5349 #include <stdio.h>
5350                 int main(int argc, char *argv[])
5351                 {
5352                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5353                 }
5354
5355 _ACEOF
5356 rm -f "conftest$ac_exeext"
5357 if { (eval echo "$as_me:5357: \"$ac_link\"") >&5
5358   (eval $ac_link) 2>&5
5359   ac_status=$?
5360   echo "$as_me:5360: \$? = $ac_status" >&5
5361   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5362   { (eval echo "$as_me:5362: \"$ac_try\"") >&5
5363   (eval $ac_try) 2>&5
5364   ac_status=$?
5365   echo "$as_me:5365: \$? = $ac_status" >&5
5366   (exit "$ac_status"); }; }; then
5367   cf_ok_build_cc=yes
5368 else
5369   echo "$as_me: program exited with status $ac_status" >&5
5370 echo "$as_me: failed program was:" >&5
5371 cat "conftest.$ac_ext" >&5
5372 cf_ok_build_cc=no
5373 fi
5374 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5375 fi
5376
5377         cross_compiling=$cf_save_crossed
5378         ac_link=$cf_save_ac_link
5379
5380         echo "$as_me:5380: result: $cf_ok_build_cc" >&5
5381 echo "${ECHO_T}$cf_ok_build_cc" >&6
5382
5383         if test "$cf_ok_build_cc" != yes
5384         then
5385                 { { echo "$as_me:5385: error: Cross-build requires two compilers.
5386 Use --with-build-cc to specify the native compiler." >&5
5387 echo "$as_me: error: Cross-build requires two compilers.
5388 Use --with-build-cc to specify the native compiler." >&2;}
5389    { (exit 1); exit 1; }; }
5390         fi
5391
5392 else
5393         : ${BUILD_CC:='${CC}'}
5394         : ${BUILD_CPP:='${CPP}'}
5395         : ${BUILD_CFLAGS:='${CFLAGS}'}
5396         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5397         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5398         : ${BUILD_LIBS:='${LIBS}'}
5399         : ${BUILD_EXEEXT:='$x'}
5400         : ${BUILD_OBJEXT:='o'}
5401 fi
5402
5403 ###############################################################################
5404
5405 ### Options to allow the user to specify the set of libraries which are used.
5406 ### Use "--without-normal --with-shared" to allow the default model to be
5407 ### shared, for example.
5408 cf_list_models=""
5409
5410 echo "$as_me:5410: checking if libtool -version-number should be used" >&5
5411 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5412
5413 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5414 if test "${enable_libtool_version+set}" = set; then
5415   enableval="$enable_libtool_version"
5416   test "$enableval" != no && enableval=yes
5417         if test "$enableval" != "yes" ; then
5418     cf_libtool_version=no
5419         else
5420                 cf_libtool_version=yes
5421         fi
5422 else
5423   enableval=yes
5424         cf_libtool_version=yes
5425
5426 fi;
5427 echo "$as_me:5427: result: $cf_libtool_version" >&5
5428 echo "${ECHO_T}$cf_libtool_version" >&6
5429
5430 if test "$cf_libtool_version" = yes ; then
5431         LIBTOOL_VERSION="-version-number"
5432 else
5433         LIBTOOL_VERSION="-version-info"
5434         case "x$VERSION" in
5435         (x)
5436                 { echo "$as_me:5436: WARNING: VERSION was not set" >&5
5437 echo "$as_me: WARNING: VERSION was not set" >&2;}
5438                 ;;
5439         (x*.*.*)
5440                 ABI_VERSION="$VERSION"
5441                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5442
5443 echo "${as_me:-configure}:5443: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5444
5445                 ;;
5446         (x*:*:*)
5447                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5448                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5449
5450 echo "${as_me:-configure}:5450: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5451
5452                 ;;
5453         (*)
5454                 { echo "$as_me:5454: WARNING: unexpected VERSION value: $VERSION" >&5
5455 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5456                 ;;
5457         esac
5458 fi
5459
5460 LIBTOOL=
5461
5462 # common library maintenance symbols that are convenient for libtool scripts:
5463 LIB_CREATE='${AR} -cr'
5464 LIB_OBJECT='${OBJECTS}'
5465 LIB_SUFFIX=.a
5466 LIB_PREP="$RANLIB"
5467
5468 # symbols used to prop libtool up to enable it to determine what it should be
5469 # doing:
5470 LIB_CLEAN=
5471 LIB_COMPILE=
5472 LIB_LINK='${CC}'
5473 LIB_INSTALL=
5474 LIB_UNINSTALL=
5475
5476 echo "$as_me:5476: checking if you want to build libraries with libtool" >&5
5477 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5478
5479 # Check whether --with-libtool or --without-libtool was given.
5480 if test "${with_libtool+set}" = set; then
5481   withval="$with_libtool"
5482   with_libtool=$withval
5483 else
5484   with_libtool=no
5485 fi;
5486 echo "$as_me:5486: result: $with_libtool" >&5
5487 echo "${ECHO_T}$with_libtool" >&6
5488 if test "$with_libtool" != "no"; then
5489
5490         if test "$with_libtool" != "yes" ; then
5491
5492 if test "x$prefix" != xNONE; then
5493         cf_path_syntax="$prefix"
5494 else
5495         cf_path_syntax="$ac_default_prefix"
5496 fi
5497
5498 case ".$with_libtool" in
5499 (.\$\(*\)*|.\'*\'*)
5500         ;;
5501 (..|./*|.\\*)
5502         ;;
5503 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5504         ;;
5505 (.\$\{*prefix\}*|.\$\{*dir\}*)
5506         eval with_libtool="$with_libtool"
5507         case ".$with_libtool" in
5508         (.NONE/*)
5509                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5510                 ;;
5511         esac
5512         ;;
5513 (.no|.NONE/*)
5514         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5515         ;;
5516 (*)
5517         { { echo "$as_me:5517: error: expected a pathname, not \"$with_libtool\"" >&5
5518 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5519    { (exit 1); exit 1; }; }
5520         ;;
5521 esac
5522
5523                 LIBTOOL=$with_libtool
5524         else
5525                 if test -n "$ac_tool_prefix"; then
5526   for ac_prog in libtool glibtool
5527   do
5528     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5529 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5530 echo "$as_me:5530: checking for $ac_word" >&5
5531 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5532 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5533   echo $ECHO_N "(cached) $ECHO_C" >&6
5534 else
5535   if test -n "$LIBTOOL"; then
5536   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5537 else
5538   ac_save_IFS=$IFS; IFS=$ac_path_separator
5539 ac_dummy="$PATH"
5540 for ac_dir in $ac_dummy; do
5541   IFS=$ac_save_IFS
5542   test -z "$ac_dir" && ac_dir=.
5543   $as_executable_p "$ac_dir/$ac_word" || continue
5544 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5545 echo "$as_me:5545: found $ac_dir/$ac_word" >&5
5546 break
5547 done
5548
5549 fi
5550 fi
5551 LIBTOOL=$ac_cv_prog_LIBTOOL
5552 if test -n "$LIBTOOL"; then
5553   echo "$as_me:5553: result: $LIBTOOL" >&5
5554 echo "${ECHO_T}$LIBTOOL" >&6
5555 else
5556   echo "$as_me:5556: result: no" >&5
5557 echo "${ECHO_T}no" >&6
5558 fi
5559
5560     test -n "$LIBTOOL" && break
5561   done
5562 fi
5563 if test -z "$LIBTOOL"; then
5564   ac_ct_LIBTOOL=$LIBTOOL
5565   for ac_prog in libtool glibtool
5566 do
5567   # Extract the first word of "$ac_prog", so it can be a program name with args.
5568 set dummy $ac_prog; ac_word=$2
5569 echo "$as_me:5569: checking for $ac_word" >&5
5570 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5571 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5572   echo $ECHO_N "(cached) $ECHO_C" >&6
5573 else
5574   if test -n "$ac_ct_LIBTOOL"; then
5575   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5576 else
5577   ac_save_IFS=$IFS; IFS=$ac_path_separator
5578 ac_dummy="$PATH"
5579 for ac_dir in $ac_dummy; do
5580   IFS=$ac_save_IFS
5581   test -z "$ac_dir" && ac_dir=.
5582   $as_executable_p "$ac_dir/$ac_word" || continue
5583 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5584 echo "$as_me:5584: found $ac_dir/$ac_word" >&5
5585 break
5586 done
5587
5588 fi
5589 fi
5590 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5591 if test -n "$ac_ct_LIBTOOL"; then
5592   echo "$as_me:5592: result: $ac_ct_LIBTOOL" >&5
5593 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5594 else
5595   echo "$as_me:5595: result: no" >&5
5596 echo "${ECHO_T}no" >&6
5597 fi
5598
5599   test -n "$ac_ct_LIBTOOL" && break
5600 done
5601 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5602
5603   LIBTOOL=$ac_ct_LIBTOOL
5604 fi
5605
5606 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5607 then
5608         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.].*//'`
5609 else
5610         cf_cv_libtool_version=
5611 fi
5612 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5613
5614                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5615                 then
5616
5617 unset ac_cv_prog_ac_ct_LIBTOOL
5618 unset ac_ct_LIBTOOL
5619 unset LIBTOOL
5620
5621                         if test -n "$ac_tool_prefix"; then
5622   for ac_prog in glibtool
5623   do
5624     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5625 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5626 echo "$as_me:5626: checking for $ac_word" >&5
5627 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5628 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5629   echo $ECHO_N "(cached) $ECHO_C" >&6
5630 else
5631   if test -n "$LIBTOOL"; then
5632   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5633 else
5634   ac_save_IFS=$IFS; IFS=$ac_path_separator
5635 ac_dummy="$PATH"
5636 for ac_dir in $ac_dummy; do
5637   IFS=$ac_save_IFS
5638   test -z "$ac_dir" && ac_dir=.
5639   $as_executable_p "$ac_dir/$ac_word" || continue
5640 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5641 echo "$as_me:5641: found $ac_dir/$ac_word" >&5
5642 break
5643 done
5644
5645 fi
5646 fi
5647 LIBTOOL=$ac_cv_prog_LIBTOOL
5648 if test -n "$LIBTOOL"; then
5649   echo "$as_me:5649: result: $LIBTOOL" >&5
5650 echo "${ECHO_T}$LIBTOOL" >&6
5651 else
5652   echo "$as_me:5652: result: no" >&5
5653 echo "${ECHO_T}no" >&6
5654 fi
5655
5656     test -n "$LIBTOOL" && break
5657   done
5658 fi
5659 if test -z "$LIBTOOL"; then
5660   ac_ct_LIBTOOL=$LIBTOOL
5661   for ac_prog in glibtool
5662 do
5663   # Extract the first word of "$ac_prog", so it can be a program name with args.
5664 set dummy $ac_prog; ac_word=$2
5665 echo "$as_me:5665: checking for $ac_word" >&5
5666 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5667 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5668   echo $ECHO_N "(cached) $ECHO_C" >&6
5669 else
5670   if test -n "$ac_ct_LIBTOOL"; then
5671   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5672 else
5673   ac_save_IFS=$IFS; IFS=$ac_path_separator
5674 ac_dummy="$PATH"
5675 for ac_dir in $ac_dummy; do
5676   IFS=$ac_save_IFS
5677   test -z "$ac_dir" && ac_dir=.
5678   $as_executable_p "$ac_dir/$ac_word" || continue
5679 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5680 echo "$as_me:5680: found $ac_dir/$ac_word" >&5
5681 break
5682 done
5683
5684 fi
5685 fi
5686 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5687 if test -n "$ac_ct_LIBTOOL"; then
5688   echo "$as_me:5688: result: $ac_ct_LIBTOOL" >&5
5689 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5690 else
5691   echo "$as_me:5691: result: no" >&5
5692 echo "${ECHO_T}no" >&6
5693 fi
5694
5695   test -n "$ac_ct_LIBTOOL" && break
5696 done
5697 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5698
5699   LIBTOOL=$ac_ct_LIBTOOL
5700 fi
5701
5702 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5703 then
5704         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.].*//'`
5705 else
5706         cf_cv_libtool_version=
5707 fi
5708 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5709
5710                 fi
5711         fi
5712         if test -z "$LIBTOOL" ; then
5713                 { { echo "$as_me:5713: error: Cannot find libtool" >&5
5714 echo "$as_me: error: Cannot find libtool" >&2;}
5715    { (exit 1); exit 1; }; }
5716         fi
5717         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5718         LIB_OBJECT='${OBJECTS:.o=.lo}'
5719         LIB_SUFFIX=.la
5720         LIB_CLEAN='${LIBTOOL} --mode=clean'
5721         LIB_COMPILE='${LIBTOOL} --mode=compile'
5722         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5723         LIB_INSTALL='${LIBTOOL} --mode=install'
5724         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5725         LIB_PREP=:
5726
5727 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5728 then
5729         echo "$as_me:5729: checking version of $LIBTOOL" >&5
5730 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5731
5732 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5733 then
5734         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.].*//'`
5735 else
5736         cf_cv_libtool_version=
5737 fi
5738 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5739
5740         echo "$as_me:5740: result: $cf_cv_libtool_version" >&5
5741 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5742         if test -n "$cf_cv_libtool_version"
5743         then
5744                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5745                 case "x$cf_check_libtool_version" in
5746                 (*...GNU-libtool...*)
5747                         ;;
5748                 (*)
5749                         { { echo "$as_me:5749: error: This is not GNU libtool" >&5
5750 echo "$as_me: error: This is not GNU libtool" >&2;}
5751    { (exit 1); exit 1; }; }
5752                         ;;
5753                 esac
5754         else
5755                 { { echo "$as_me:5755: error: No version found for $LIBTOOL" >&5
5756 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5757    { (exit 1); exit 1; }; }
5758         fi
5759 else
5760         { { echo "$as_me:5760: error: GNU libtool has not been found" >&5
5761 echo "$as_me: error: GNU libtool has not been found" >&2;}
5762    { (exit 1); exit 1; }; }
5763 fi
5764
5765         # special hack to add -no-undefined (which libtool should do for itself)
5766         LT_UNDEF=
5767         case "$cf_cv_system_name" in
5768         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5769                 LT_UNDEF=-no-undefined
5770                 ;;
5771         esac
5772
5773         # special hack to add --tag option for C++ compiler
5774         case "$cf_cv_libtool_version" in
5775         (1.[5-9]*|[2-9].[0-9.a-z]*)
5776                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5777                 LIBTOOL="$LIBTOOL --tag=CC"
5778                 ;;
5779         (*)
5780                 LIBTOOL_CXX="$LIBTOOL"
5781                 ;;
5782         esac
5783 else
5784         LIBTOOL=""
5785         LIBTOOL_CXX=""
5786 fi
5787
5788 test -z "$LIBTOOL" && ECHO_LT=
5789
5790 if test "$with_libtool" != "no" ; then
5791
5792 cf_list_models="$cf_list_models libtool"
5793
5794 else
5795
5796 echo "$as_me:5796: checking if you want to build shared libraries" >&5
5797 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5798
5799 # Check whether --with-shared or --without-shared was given.
5800 if test "${with_shared+set}" = set; then
5801   withval="$with_shared"
5802   with_shared=$withval
5803 else
5804   with_shared=no
5805 fi;
5806 echo "$as_me:5806: result: $with_shared" >&5
5807 echo "${ECHO_T}$with_shared" >&6
5808 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5809
5810 echo "$as_me:5810: checking if you want to build static libraries" >&5
5811 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5812
5813 # Check whether --with-normal or --without-normal was given.
5814 if test "${with_normal+set}" = set; then
5815   withval="$with_normal"
5816   with_normal=$withval
5817 else
5818   with_normal=yes
5819 fi;
5820 echo "$as_me:5820: result: $with_normal" >&5
5821 echo "${ECHO_T}$with_normal" >&6
5822 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5823
5824 echo "$as_me:5824: checking if you want to build debug libraries" >&5
5825 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5826
5827 # Check whether --with-debug or --without-debug was given.
5828 if test "${with_debug+set}" = set; then
5829   withval="$with_debug"
5830   with_debug=$withval
5831 else
5832   with_debug=yes
5833 fi;
5834 echo "$as_me:5834: result: $with_debug" >&5
5835 echo "${ECHO_T}$with_debug" >&6
5836 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5837
5838 echo "$as_me:5838: checking if you want to build profiling libraries" >&5
5839 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5840
5841 # Check whether --with-profile or --without-profile was given.
5842 if test "${with_profile+set}" = set; then
5843   withval="$with_profile"
5844   with_profile=$withval
5845 else
5846   with_profile=no
5847 fi;
5848 echo "$as_me:5848: result: $with_profile" >&5
5849 echo "${ECHO_T}$with_profile" >&6
5850 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5851
5852 fi
5853
5854 if test "X$cf_with_cxx_binding" != Xno; then
5855 if test "x$with_shared" = "xyes"; then
5856 echo "$as_me:5856: checking if you want to build C++ shared libraries" >&5
5857 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5858
5859 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5860 if test "${with_cxx_shared+set}" = set; then
5861   withval="$with_cxx_shared"
5862   with_shared_cxx=$withval
5863 else
5864   with_shared_cxx=no
5865 fi;
5866 echo "$as_me:5866: result: $with_shared_cxx" >&5
5867 echo "${ECHO_T}$with_shared_cxx" >&6
5868 fi
5869 fi
5870
5871 ###############################################################################
5872
5873 echo "$as_me:5873: checking for specified models" >&5
5874 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5875 test -z "$cf_list_models" && cf_list_models=normal
5876 test "$with_libtool" != "no" && cf_list_models=libtool
5877 echo "$as_me:5877: result: $cf_list_models" >&5
5878 echo "${ECHO_T}$cf_list_models" >&6
5879
5880 ### Use the first model as the default, and save its suffix for use in building
5881 ### up test-applications.
5882 echo "$as_me:5882: checking for default model" >&5
5883 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5884 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5885 echo "$as_me:5885: result: $DFT_LWR_MODEL" >&5
5886 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5887
5888 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5889
5890 TICS_NAME=tic
5891
5892 TINFO_NAME=tinfo
5893
5894 LIB_NAME=ncurses
5895
5896 LIB_DIR=../lib
5897 LIB_2ND=../../lib
5898
5899 echo "$as_me:5899: checking if you want to have a library-prefix" >&5
5900 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5901
5902 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5903 if test "${with_lib_prefix+set}" = set; then
5904   withval="$with_lib_prefix"
5905   with_lib_prefix=$withval
5906 else
5907   with_lib_prefix=auto
5908 fi;
5909 echo "$as_me:5909: result: $with_lib_prefix" >&5
5910 echo "${ECHO_T}$with_lib_prefix" >&6
5911
5912 if test "$with_lib_prefix" = auto
5913 then
5914
5915         case "$cf_cv_system_name" in
5916         (OS/2*|os2*)
5917                 if test "$DFT_LWR_MODEL" = libtool; then
5918                         LIB_PREFIX='lib'
5919                 else
5920                         LIB_PREFIX=''
5921                 fi
5922                 ;;
5923         (*-msvc*)
5924                 LIB_PREFIX=''
5925                 ;;
5926         (*)     LIB_PREFIX='lib'
5927                 ;;
5928         esac
5929 cf_prefix=$LIB_PREFIX
5930
5931 elif test "$with_lib_prefix" = no
5932 then
5933         LIB_PREFIX=
5934 else
5935         LIB_PREFIX=$with_lib_prefix
5936 fi
5937
5938 LIB_SUFFIX=
5939
5940         echo "$as_me:5940: checking for PATH separator" >&5
5941 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5942         case "$cf_cv_system_name" in
5943         (os2*)  PATH_SEPARATOR=';'  ;;
5944         (*)     ${PATH_SEPARATOR:=':'}  ;;
5945         esac
5946
5947         echo "$as_me:5947: result: $PATH_SEPARATOR" >&5
5948 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5949
5950 # headers needed for checks...
5951 echo "$as_me:5951: checking for ANSI C header files" >&5
5952 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5953 if test "${ac_cv_header_stdc+set}" = set; then
5954   echo $ECHO_N "(cached) $ECHO_C" >&6
5955 else
5956   cat >"conftest.$ac_ext" <<_ACEOF
5957 #line 5957 "configure"
5958 #include "confdefs.h"
5959 #include <stdlib.h>
5960 #include <stdarg.h>
5961 #include <string.h>
5962 #include <float.h>
5963
5964 _ACEOF
5965 if { (eval echo "$as_me:5965: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5966   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5967   ac_status=$?
5968   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5969   rm -f conftest.er1
5970   cat conftest.err >&5
5971   echo "$as_me:5971: \$? = $ac_status" >&5
5972   (exit "$ac_status"); } >/dev/null; then
5973   if test -s conftest.err; then
5974     ac_cpp_err=$ac_c_preproc_warn_flag
5975   else
5976     ac_cpp_err=
5977   fi
5978 else
5979   ac_cpp_err=yes
5980 fi
5981 if test -z "$ac_cpp_err"; then
5982   ac_cv_header_stdc=yes
5983 else
5984   echo "$as_me: failed program was:" >&5
5985   cat "conftest.$ac_ext" >&5
5986   ac_cv_header_stdc=no
5987 fi
5988 rm -f conftest.err "conftest.$ac_ext"
5989
5990 if test $ac_cv_header_stdc = yes; then
5991   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5992   cat >"conftest.$ac_ext" <<_ACEOF
5993 #line 5993 "configure"
5994 #include "confdefs.h"
5995 #include <string.h>
5996
5997 _ACEOF
5998 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5999   $EGREP "memchr" >/dev/null 2>&1; then
6000   :
6001 else
6002   ac_cv_header_stdc=no
6003 fi
6004 rm -rf conftest*
6005
6006 fi
6007
6008 if test $ac_cv_header_stdc = yes; then
6009   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6010   cat >"conftest.$ac_ext" <<_ACEOF
6011 #line 6011 "configure"
6012 #include "confdefs.h"
6013 #include <stdlib.h>
6014
6015 _ACEOF
6016 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6017   $EGREP "free" >/dev/null 2>&1; then
6018   :
6019 else
6020   ac_cv_header_stdc=no
6021 fi
6022 rm -rf conftest*
6023
6024 fi
6025
6026 if test $ac_cv_header_stdc = yes; then
6027   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6028   if test "$cross_compiling" = yes; then
6029   :
6030 else
6031   cat >"conftest.$ac_ext" <<_ACEOF
6032 #line 6032 "configure"
6033 #include "confdefs.h"
6034 #include <ctype.h>
6035 #if ((' ' & 0x0FF) == 0x020)
6036 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6037 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6038 #else
6039 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6040                      || ('j' <= (c) && (c) <= 'r') \
6041                      || ('s' <= (c) && (c) <= 'z'))
6042 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6043 #endif
6044
6045 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6046 int
6047 main (void)
6048 {
6049   int i;
6050   for (i = 0; i < 256; i++)
6051     if (XOR (islower (i), ISLOWER (i))
6052         || toupper (i) != TOUPPER (i))
6053       $ac_main_return(2);
6054   $ac_main_return (0);
6055 }
6056 _ACEOF
6057 rm -f "conftest$ac_exeext"
6058 if { (eval echo "$as_me:6058: \"$ac_link\"") >&5
6059   (eval $ac_link) 2>&5
6060   ac_status=$?
6061   echo "$as_me:6061: \$? = $ac_status" >&5
6062   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6063   { (eval echo "$as_me:6063: \"$ac_try\"") >&5
6064   (eval $ac_try) 2>&5
6065   ac_status=$?
6066   echo "$as_me:6066: \$? = $ac_status" >&5
6067   (exit "$ac_status"); }; }; then
6068   :
6069 else
6070   echo "$as_me: program exited with status $ac_status" >&5
6071 echo "$as_me: failed program was:" >&5
6072 cat "conftest.$ac_ext" >&5
6073 ac_cv_header_stdc=no
6074 fi
6075 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6076 fi
6077 fi
6078 fi
6079 echo "$as_me:6079: result: $ac_cv_header_stdc" >&5
6080 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6081 if test $ac_cv_header_stdc = yes; then
6082
6083 cat >>confdefs.h <<\EOF
6084 #define STDC_HEADERS 1
6085 EOF
6086
6087 fi
6088
6089 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6090
6091 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6092                   inttypes.h stdint.h unistd.h
6093 do
6094 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6095 echo "$as_me:6095: checking for $ac_header" >&5
6096 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6097 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6098   echo $ECHO_N "(cached) $ECHO_C" >&6
6099 else
6100   cat >"conftest.$ac_ext" <<_ACEOF
6101 #line 6101 "configure"
6102 #include "confdefs.h"
6103 $ac_includes_default
6104 #include <$ac_header>
6105 _ACEOF
6106 rm -f "conftest.$ac_objext"
6107 if { (eval echo "$as_me:6107: \"$ac_compile\"") >&5
6108   (eval $ac_compile) 2>&5
6109   ac_status=$?
6110   echo "$as_me:6110: \$? = $ac_status" >&5
6111   (exit "$ac_status"); } &&
6112          { ac_try='test -s "conftest.$ac_objext"'
6113   { (eval echo "$as_me:6113: \"$ac_try\"") >&5
6114   (eval $ac_try) 2>&5
6115   ac_status=$?
6116   echo "$as_me:6116: \$? = $ac_status" >&5
6117   (exit "$ac_status"); }; }; then
6118   eval "$as_ac_Header=yes"
6119 else
6120   echo "$as_me: failed program was:" >&5
6121 cat "conftest.$ac_ext" >&5
6122 eval "$as_ac_Header=no"
6123 fi
6124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6125 fi
6126 echo "$as_me:6126: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6127 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6128 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6129   cat >>confdefs.h <<EOF
6130 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6131 EOF
6132
6133 fi
6134 done
6135
6136 echo "$as_me:6136: checking whether exit is declared" >&5
6137 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6138 if test "${ac_cv_have_decl_exit+set}" = set; then
6139   echo $ECHO_N "(cached) $ECHO_C" >&6
6140 else
6141   cat >"conftest.$ac_ext" <<_ACEOF
6142 #line 6142 "configure"
6143 #include "confdefs.h"
6144 $ac_includes_default
6145 int
6146 main (void)
6147 {
6148 #ifndef exit
6149   char *p = (char *) exit; (void) p;
6150 #endif
6151
6152   ;
6153   return 0;
6154 }
6155 _ACEOF
6156 rm -f "conftest.$ac_objext"
6157 if { (eval echo "$as_me:6157: \"$ac_compile\"") >&5
6158   (eval $ac_compile) 2>&5
6159   ac_status=$?
6160   echo "$as_me:6160: \$? = $ac_status" >&5
6161   (exit "$ac_status"); } &&
6162          { ac_try='test -s "conftest.$ac_objext"'
6163   { (eval echo "$as_me:6163: \"$ac_try\"") >&5
6164   (eval $ac_try) 2>&5
6165   ac_status=$?
6166   echo "$as_me:6166: \$? = $ac_status" >&5
6167   (exit "$ac_status"); }; }; then
6168   ac_cv_have_decl_exit=yes
6169 else
6170   echo "$as_me: failed program was:" >&5
6171 cat "conftest.$ac_ext" >&5
6172 ac_cv_have_decl_exit=no
6173 fi
6174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6175 fi
6176 echo "$as_me:6176: result: $ac_cv_have_decl_exit" >&5
6177 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6178
6179 ac_header_dirent=no
6180 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6181   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6182 echo "$as_me:6182: checking for $ac_hdr that defines DIR" >&5
6183 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6184 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6185   echo $ECHO_N "(cached) $ECHO_C" >&6
6186 else
6187   cat >"conftest.$ac_ext" <<_ACEOF
6188 #line 6188 "configure"
6189 #include "confdefs.h"
6190 #include <sys/types.h>
6191 #include <$ac_hdr>
6192
6193 int
6194 main (void)
6195 {
6196 if ((DIR *) 0)
6197 return 0;
6198   ;
6199   return 0;
6200 }
6201 _ACEOF
6202 rm -f "conftest.$ac_objext"
6203 if { (eval echo "$as_me:6203: \"$ac_compile\"") >&5
6204   (eval $ac_compile) 2>&5
6205   ac_status=$?
6206   echo "$as_me:6206: \$? = $ac_status" >&5
6207   (exit "$ac_status"); } &&
6208          { ac_try='test -s "conftest.$ac_objext"'
6209   { (eval echo "$as_me:6209: \"$ac_try\"") >&5
6210   (eval $ac_try) 2>&5
6211   ac_status=$?
6212   echo "$as_me:6212: \$? = $ac_status" >&5
6213   (exit "$ac_status"); }; }; then
6214   eval "$as_ac_Header=yes"
6215 else
6216   echo "$as_me: failed program was:" >&5
6217 cat "conftest.$ac_ext" >&5
6218 eval "$as_ac_Header=no"
6219 fi
6220 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6221 fi
6222 echo "$as_me:6222: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6223 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6224 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6225   cat >>confdefs.h <<EOF
6226 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6227 EOF
6228
6229 ac_header_dirent=$ac_hdr; break
6230 fi
6231
6232 done
6233 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6234 if test $ac_header_dirent = dirent.h; then
6235   echo "$as_me:6235: checking for opendir in -ldir" >&5
6236 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6237 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6238   echo $ECHO_N "(cached) $ECHO_C" >&6
6239 else
6240   ac_check_lib_save_LIBS=$LIBS
6241 LIBS="-ldir  $LIBS"
6242 cat >"conftest.$ac_ext" <<_ACEOF
6243 #line 6243 "configure"
6244 #include "confdefs.h"
6245
6246 /* Override any gcc2 internal prototype to avoid an error.  */
6247 #ifdef __cplusplus
6248 extern "C"
6249 #endif
6250 /* We use char because int might match the return type of a gcc2
6251    builtin and then its argument prototype would still apply.  */
6252 char opendir ();
6253 int
6254 main (void)
6255 {
6256 opendir ();
6257   ;
6258   return 0;
6259 }
6260 _ACEOF
6261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6262 if { (eval echo "$as_me:6262: \"$ac_link\"") >&5
6263   (eval $ac_link) 2>&5
6264   ac_status=$?
6265   echo "$as_me:6265: \$? = $ac_status" >&5
6266   (exit "$ac_status"); } &&
6267          { ac_try='test -s "conftest$ac_exeext"'
6268   { (eval echo "$as_me:6268: \"$ac_try\"") >&5
6269   (eval $ac_try) 2>&5
6270   ac_status=$?
6271   echo "$as_me:6271: \$? = $ac_status" >&5
6272   (exit "$ac_status"); }; }; then
6273   ac_cv_lib_dir_opendir=yes
6274 else
6275   echo "$as_me: failed program was:" >&5
6276 cat "conftest.$ac_ext" >&5
6277 ac_cv_lib_dir_opendir=no
6278 fi
6279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6280 LIBS=$ac_check_lib_save_LIBS
6281 fi
6282 echo "$as_me:6282: result: $ac_cv_lib_dir_opendir" >&5
6283 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6284 if test "$ac_cv_lib_dir_opendir" = yes; then
6285   LIBS="$LIBS -ldir"
6286 fi
6287
6288 else
6289   echo "$as_me:6289: checking for opendir in -lx" >&5
6290 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6291 if test "${ac_cv_lib_x_opendir+set}" = set; then
6292   echo $ECHO_N "(cached) $ECHO_C" >&6
6293 else
6294   ac_check_lib_save_LIBS=$LIBS
6295 LIBS="-lx  $LIBS"
6296 cat >"conftest.$ac_ext" <<_ACEOF
6297 #line 6297 "configure"
6298 #include "confdefs.h"
6299
6300 /* Override any gcc2 internal prototype to avoid an error.  */
6301 #ifdef __cplusplus
6302 extern "C"
6303 #endif
6304 /* We use char because int might match the return type of a gcc2
6305    builtin and then its argument prototype would still apply.  */
6306 char opendir ();
6307 int
6308 main (void)
6309 {
6310 opendir ();
6311   ;
6312   return 0;
6313 }
6314 _ACEOF
6315 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6316 if { (eval echo "$as_me:6316: \"$ac_link\"") >&5
6317   (eval $ac_link) 2>&5
6318   ac_status=$?
6319   echo "$as_me:6319: \$? = $ac_status" >&5
6320   (exit "$ac_status"); } &&
6321          { ac_try='test -s "conftest$ac_exeext"'
6322   { (eval echo "$as_me:6322: \"$ac_try\"") >&5
6323   (eval $ac_try) 2>&5
6324   ac_status=$?
6325   echo "$as_me:6325: \$? = $ac_status" >&5
6326   (exit "$ac_status"); }; }; then
6327   ac_cv_lib_x_opendir=yes
6328 else
6329   echo "$as_me: failed program was:" >&5
6330 cat "conftest.$ac_ext" >&5
6331 ac_cv_lib_x_opendir=no
6332 fi
6333 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6334 LIBS=$ac_check_lib_save_LIBS
6335 fi
6336 echo "$as_me:6336: result: $ac_cv_lib_x_opendir" >&5
6337 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6338 if test "$ac_cv_lib_x_opendir" = yes; then
6339   LIBS="$LIBS -lx"
6340 fi
6341
6342 fi
6343
6344 ###############################################################################
6345
6346 echo "$as_me:6346: checking if you want to build a separate terminfo library" >&5
6347 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6348
6349 # Check whether --with-termlib or --without-termlib was given.
6350 if test "${with_termlib+set}" = set; then
6351   withval="$with_termlib"
6352   with_termlib=$withval
6353 else
6354   with_termlib=no
6355 fi;
6356 echo "$as_me:6356: result: $with_termlib" >&5
6357 echo "${ECHO_T}$with_termlib" >&6
6358
6359 echo "$as_me:6359: checking if you want to build a separate tic library" >&5
6360 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6361
6362 # Check whether --with-ticlib or --without-ticlib was given.
6363 if test "${with_ticlib+set}" = set; then
6364   withval="$with_ticlib"
6365   with_ticlib=$withval
6366 else
6367   with_ticlib=no
6368 fi;
6369 echo "$as_me:6369: result: $with_ticlib" >&5
6370 echo "${ECHO_T}$with_ticlib" >&6
6371
6372 if test X"$CC_G_OPT" = X"" ; then
6373         CC_G_OPT='-g'
6374         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6375 fi
6376
6377 if test X"$CXX_G_OPT" = X"" ; then
6378         CXX_G_OPT='-g'
6379         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6380 fi
6381
6382 echo "$as_me:6382: checking for default loader flags" >&5
6383 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6384 case "$DFT_LWR_MODEL" in
6385 (libtool) LD_MODEL=''   ;;
6386 (normal)  LD_MODEL=''   ;;
6387 (debug)   LD_MODEL=$CC_G_OPT ;;
6388 (profile) LD_MODEL='-pg';;
6389 (shared)  LD_MODEL=''   ;;
6390 esac
6391 echo "$as_me:6391: result: $LD_MODEL" >&5
6392 echo "${ECHO_T}$LD_MODEL" >&6
6393
6394 case "$DFT_LWR_MODEL" in
6395 (shared)
6396
6397 echo "$as_me:6397: checking if rpath option should be used" >&5
6398 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6399
6400 # Check whether --enable-rpath or --disable-rpath was given.
6401 if test "${enable_rpath+set}" = set; then
6402   enableval="$enable_rpath"
6403   cf_cv_enable_rpath=$enableval
6404 else
6405   cf_cv_enable_rpath=no
6406 fi;
6407 echo "$as_me:6407: result: $cf_cv_enable_rpath" >&5
6408 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6409
6410 echo "$as_me:6410: checking if shared libraries should be relinked during install" >&5
6411 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6412
6413 # Check whether --enable-relink or --disable-relink was given.
6414 if test "${enable_relink+set}" = set; then
6415   enableval="$enable_relink"
6416   cf_cv_do_relink=$enableval
6417 else
6418   cf_cv_do_relink=yes
6419 fi;
6420 echo "$as_me:6420: result: $cf_cv_do_relink" >&5
6421 echo "${ECHO_T}$cf_cv_do_relink" >&6
6422         ;;
6423 esac
6424
6425 # we will build libraries one-level down.
6426 rel_builddir=..
6427
6428 LD_RPATH_OPT=
6429 if test "x$cf_cv_enable_rpath" != xno
6430 then
6431         echo "$as_me:6431: checking for an rpath option" >&5
6432 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6433         case "$cf_cv_system_name" in
6434         (irix*)
6435                 if test "$GCC" = yes; then
6436                         LD_RPATH_OPT="-Wl,-rpath,"
6437                 else
6438                         LD_RPATH_OPT="-rpath "
6439                 fi
6440                 ;;
6441         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6442                 LD_RPATH_OPT="-Wl,-rpath,"
6443                 ;;
6444         (openbsd[2-9].*|mirbsd*)
6445                 LD_RPATH_OPT="-Wl,-rpath,"
6446                 ;;
6447         (dragonfly*)
6448                 LD_RPATH_OPT="-rpath "
6449                 ;;
6450         (netbsd*)
6451                 LD_RPATH_OPT="-Wl,-rpath,"
6452                 ;;
6453         (osf*|mls+*)
6454                 LD_RPATH_OPT="-rpath "
6455                 ;;
6456         (solaris2*)
6457                 LD_RPATH_OPT="-R"
6458                 ;;
6459         (*)
6460                 ;;
6461         esac
6462         echo "$as_me:6462: result: $LD_RPATH_OPT" >&5
6463 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6464
6465         case "x$LD_RPATH_OPT" in
6466         (x-R*)
6467                 echo "$as_me:6467: checking if we need a space after rpath option" >&5
6468 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6469                 cf_save_LIBS="$LIBS"
6470
6471 cf_add_libs="$LIBS"
6472 # reverse order
6473 cf_add_0lib=
6474 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6475 # filter duplicates
6476 for cf_add_1lib in $cf_add_0lib; do
6477         for cf_add_2lib in $cf_add_libs; do
6478                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6479                         cf_add_1lib=
6480                         break
6481                 fi
6482         done
6483         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6484 done
6485 LIBS="$cf_add_libs"
6486
6487                 cat >"conftest.$ac_ext" <<_ACEOF
6488 #line 6488 "configure"
6489 #include "confdefs.h"
6490
6491 int
6492 main (void)
6493 {
6494
6495   ;
6496   return 0;
6497 }
6498 _ACEOF
6499 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6500 if { (eval echo "$as_me:6500: \"$ac_link\"") >&5
6501   (eval $ac_link) 2>&5
6502   ac_status=$?
6503   echo "$as_me:6503: \$? = $ac_status" >&5
6504   (exit "$ac_status"); } &&
6505          { ac_try='test -s "conftest$ac_exeext"'
6506   { (eval echo "$as_me:6506: \"$ac_try\"") >&5
6507   (eval $ac_try) 2>&5
6508   ac_status=$?
6509   echo "$as_me:6509: \$? = $ac_status" >&5
6510   (exit "$ac_status"); }; }; then
6511   cf_rpath_space=no
6512 else
6513   echo "$as_me: failed program was:" >&5
6514 cat "conftest.$ac_ext" >&5
6515 cf_rpath_space=yes
6516 fi
6517 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6518                 LIBS="$cf_save_LIBS"
6519                 echo "$as_me:6519: result: $cf_rpath_space" >&5
6520 echo "${ECHO_T}$cf_rpath_space" >&6
6521                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6522                 ;;
6523         esac
6524 fi
6525
6526         RM_SHARED_OPTS=
6527         LOCAL_LDFLAGS=
6528         LOCAL_LDFLAGS2=
6529         LD_SHARED_OPTS=
6530         INSTALL_LIB="-m 644"
6531         : ${rel_builddir:=.}
6532
6533         shlibdir=$libdir
6534
6535         MAKE_DLLS="#"
6536
6537         cf_cv_do_symlinks=no
6538         cf_ld_rpath_opt=
6539         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6540
6541         echo "$as_me:6541: checking if release/abi version should be used for shared libs" >&5
6542 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6543
6544 # Check whether --with-shlib-version or --without-shlib-version was given.
6545 if test "${with_shlib_version+set}" = set; then
6546   withval="$with_shlib_version"
6547   test -z "$withval" && withval=auto
6548         case "$withval" in
6549         (yes)
6550                 cf_cv_shlib_version=auto
6551                 ;;
6552         (rel|abi|auto)
6553                 cf_cv_shlib_version=$withval
6554                 ;;
6555         (*)
6556                 echo "$as_me:6556: result: $withval" >&5
6557 echo "${ECHO_T}$withval" >&6
6558                 { { echo "$as_me:6558: error: option value must be one of: rel, abi, or auto" >&5
6559 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6560    { (exit 1); exit 1; }; }
6561                 ;;
6562         esac
6563
6564 else
6565   cf_cv_shlib_version=auto
6566 fi;
6567         echo "$as_me:6567: result: $cf_cv_shlib_version" >&5
6568 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6569
6570         cf_cv_rm_so_locs=no
6571         cf_try_cflags=
6572
6573         # Some less-capable ports of gcc support only -fpic
6574         CC_SHARED_OPTS=
6575
6576         cf_try_fPIC=no
6577         if test "$GCC" = yes
6578         then
6579                 cf_try_fPIC=yes
6580         else
6581                 case "$cf_cv_system_name" in
6582                 (*linux*)       # e.g., PGI compiler
6583                         cf_try_fPIC=yes
6584                         ;;
6585                 esac
6586         fi
6587
6588         if test "$cf_try_fPIC" = yes
6589         then
6590                 echo "$as_me:6590: checking which $CC option to use" >&5
6591 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6592                 cf_save_CFLAGS="$CFLAGS"
6593                 for CC_SHARED_OPTS in -fPIC -fpic ''
6594                 do
6595                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6596                         cat >"conftest.$ac_ext" <<_ACEOF
6597 #line 6597 "configure"
6598 #include "confdefs.h"
6599 #include <stdio.h>
6600 int
6601 main (void)
6602 {
6603 int x = 1
6604   ;
6605   return 0;
6606 }
6607 _ACEOF
6608 rm -f "conftest.$ac_objext"
6609 if { (eval echo "$as_me:6609: \"$ac_compile\"") >&5
6610   (eval $ac_compile) 2>&5
6611   ac_status=$?
6612   echo "$as_me:6612: \$? = $ac_status" >&5
6613   (exit "$ac_status"); } &&
6614          { ac_try='test -s "conftest.$ac_objext"'
6615   { (eval echo "$as_me:6615: \"$ac_try\"") >&5
6616   (eval $ac_try) 2>&5
6617   ac_status=$?
6618   echo "$as_me:6618: \$? = $ac_status" >&5
6619   (exit "$ac_status"); }; }; then
6620   break
6621 else
6622   echo "$as_me: failed program was:" >&5
6623 cat "conftest.$ac_ext" >&5
6624 fi
6625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6626                 done
6627                 echo "$as_me:6627: result: $CC_SHARED_OPTS" >&5
6628 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6629                 CFLAGS="$cf_save_CFLAGS"
6630         fi
6631
6632         cf_cv_shlib_version_infix=no
6633
6634         case "$cf_cv_system_name" in
6635         (aix4.3-9*|aix[5-7]*)
6636                 if test "$GCC" = yes; then
6637                         CC_SHARED_OPTS='-Wl,-brtl'
6638                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6639                 else
6640                         CC_SHARED_OPTS='-brtl'
6641                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6642                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6643                 fi
6644                 ;;
6645         (beos*)
6646                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6647                 ;;
6648         (cygwin*)
6649                 CC_SHARED_OPTS=
6650                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6651                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6652                 cf_cv_shlib_version=cygdll
6653                 cf_cv_shlib_version_infix=cygdll
6654                 shlibdir=$bindir
6655                 MAKE_DLLS=
6656                 cat >mk_shared_lib.sh <<-CF_EOF
6657                 #!$SHELL
6658                 SHARED_LIB=\$1
6659                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6660                 shift
6661                 cat <<-EOF
6662                 Linking shared library
6663                 ** SHARED_LIB \$SHARED_LIB
6664                 ** IMPORT_LIB \$IMPORT_LIB
6665 EOF
6666                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6667 CF_EOF
6668                 chmod +x mk_shared_lib.sh
6669                 ;;
6670         (msys*)
6671                 CC_SHARED_OPTS=
6672                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6673                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6674                 cf_cv_shlib_version=msysdll
6675                 cf_cv_shlib_version_infix=msysdll
6676                 shlibdir=$bindir
6677                 MAKE_DLLS=
6678                 cat >mk_shared_lib.sh <<-CF_EOF
6679                 #!$SHELL
6680                 SHARED_LIB=\$1
6681                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6682                 shift
6683                 cat <<-EOF
6684                 Linking shared library
6685                 ** SHARED_LIB \$SHARED_LIB
6686                 ** IMPORT_LIB \$IMPORT_LIB
6687 EOF
6688                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6689 CF_EOF
6690                 chmod +x mk_shared_lib.sh
6691                 ;;
6692         (darwin*)
6693                 cf_try_cflags="no-cpp-precomp"
6694                 CC_SHARED_OPTS="-dynamic"
6695                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6696                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6697                 cf_cv_shlib_version_infix=yes
6698                 echo "$as_me:6698: checking if ld -search_paths_first works" >&5
6699 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6700 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6701   echo $ECHO_N "(cached) $ECHO_C" >&6
6702 else
6703
6704                         cf_save_LDFLAGS=$LDFLAGS
6705                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6706                         cat >"conftest.$ac_ext" <<_ACEOF
6707 #line 6707 "configure"
6708 #include "confdefs.h"
6709
6710 int
6711 main (void)
6712 {
6713 int i;
6714   ;
6715   return 0;
6716 }
6717 _ACEOF
6718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6719 if { (eval echo "$as_me:6719: \"$ac_link\"") >&5
6720   (eval $ac_link) 2>&5
6721   ac_status=$?
6722   echo "$as_me:6722: \$? = $ac_status" >&5
6723   (exit "$ac_status"); } &&
6724          { ac_try='test -s "conftest$ac_exeext"'
6725   { (eval echo "$as_me:6725: \"$ac_try\"") >&5
6726   (eval $ac_try) 2>&5
6727   ac_status=$?
6728   echo "$as_me:6728: \$? = $ac_status" >&5
6729   (exit "$ac_status"); }; }; then
6730   cf_cv_ldflags_search_paths_first=yes
6731 else
6732   echo "$as_me: failed program was:" >&5
6733 cat "conftest.$ac_ext" >&5
6734 cf_cv_ldflags_search_paths_first=no
6735 fi
6736 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6737                                 LDFLAGS=$cf_save_LDFLAGS
6738 fi
6739 echo "$as_me:6739: result: $cf_cv_ldflags_search_paths_first" >&5
6740 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6741                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6742                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6743                 fi
6744                 ;;
6745         (haiku*)
6746
6747         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6748         if test "$cf_cv_shlib_version" = rel; then
6749                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6750         else
6751                 cf_cv_shared_soname='`basename $@`'
6752         fi
6753
6754                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6755                 ;;
6756         (hpux[7-8]*)
6757                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6758                 if test "$GCC" != yes; then
6759                         CC_SHARED_OPTS='+Z'
6760                 fi
6761                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6762                 INSTALL_LIB="-m 555"
6763                 ;;
6764         (hpux*)
6765                 # (tested with gcc 2.7.2 -- I don't have c89)
6766                 if test "$GCC" = yes; then
6767                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6768                 else
6769                         CC_SHARED_OPTS='+Z'
6770                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6771                 fi
6772                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6773                 # HP-UX shared libraries must be executable, and should be
6774                 # readonly to exploit a quirk in the memory manager.
6775                 INSTALL_LIB="-m 555"
6776                 ;;
6777         (interix*)
6778                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6779                 if test "$cf_cv_shlib_version" = rel; then
6780                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6781                 else
6782                         cf_shared_soname='`basename $@`'
6783                 fi
6784                 CC_SHARED_OPTS=
6785                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6786                 ;;
6787         (irix*)
6788                 if test "$cf_cv_enable_rpath" = yes ; then
6789                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6790                 fi
6791                 # tested with IRIX 5.2 and 'cc'.
6792                 if test "$GCC" != yes; then
6793                         CC_SHARED_OPTS='-KPIC'
6794                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6795                 else
6796                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6797                 fi
6798                 cf_cv_rm_so_locs=yes
6799                 ;;
6800         (linux*|gnu*|k*bsd*-gnu)
6801                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6802                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6803                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6804                 fi
6805                 if test "$cf_cv_enable_rpath" = yes ; then
6806                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6807                 fi
6808
6809         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6810         if test "$cf_cv_shlib_version" = rel; then
6811                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6812         else
6813                 cf_cv_shared_soname='`basename $@`'
6814         fi
6815
6816                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6817                 ;;
6818         (mingw*msvc*)
6819                 cf_cv_shlib_version=msvcdll
6820                 cf_cv_shlib_version_infix=msvcdll
6821                 shlibdir=$bindir
6822                 MAKE_DLLS=
6823                 if test "$DFT_LWR_MODEL" = "shared" ; then
6824                         LOCAL_LDFLAGS="-link -dll"
6825                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6826                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6827                 fi
6828                 CC_SHARED_OPTS=
6829                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6830                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6831                 cat >mk_shared_lib.sh <<-CF_EOF
6832                 #!$SHELL
6833                 SHARED_LIB=\$1
6834                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6835                 shift
6836                 my_ld=\$1
6837                 shift
6838                 cat <<-EOF
6839                 Linking shared library
6840                 ** SHARED LIB \$SHARED_LIB
6841                 ** IMPORT_LIB \$IMPORT_LIB
6842 EOF
6843                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6844                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6845                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6846 CF_EOF
6847                 chmod +x mk_shared_lib.sh
6848                 cat >mk_prog.sh <<-CF_EOF
6849                 #!$SHELL
6850                 shift
6851                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6852                 LD="$LD"
6853                 clopts=()
6854                 ldopts=("/subsystem:console")
6855                 libs=()
6856                 isdll=0
6857                 while test \$# -gt 0; do
6858                         case "\$1" in
6859                                 -link)
6860                                         # ignore -link argument
6861                                         ;;
6862                                 -M[TD] | -M[TD]d)
6863                                         # ignore runtime-library option
6864                                         ;;
6865                                 -dll)
6866                                         isdll=1
6867                                         ;;
6868                                 -W* | -w*)
6869                                         # ignore warnings
6870                                         ;;
6871                                 -D*)
6872                                         clopts+=("\$1")
6873                                         ;;
6874                                 -I*)
6875                                         clopts+=("\$1")
6876                                         ;;
6877                                 -l*)
6878                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6879                                         ;;
6880                                 -L*)
6881                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6882                                         ;;
6883                                 *.obj | *.o)
6884                                         ldopts+=("\$1")
6885                                         ;;
6886                                 -Wl,*)
6887                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6888                                                 ldopts+=("\${linkarg}")
6889                                         done
6890                                         ;;
6891                                 *.lib)
6892                                         ldopts+=("\$1")
6893                                         ;;
6894                                 -o)
6895                                         shift
6896                                         ldopts+=("-out:\$1")
6897                                         ;;
6898                                 *)
6899                                         clopts+=("\$1")
6900                                         ldopts+=("\$1")
6901                                         ;;
6902                         esac
6903                         shift
6904                 done
6905                 if [ "\$isdll" -ne 0 ]; then
6906                         for lib in \${libs[*]}; do
6907                                 ldopts+=("\$lib.dll.lib")
6908                         done
6909                 else
6910                         for lib in \${libs[*]}; do
6911                                 ldopts+=("\$lib.lib")
6912                         done
6913                 fi
6914                 cat <<-EOF
6915                 Creating program
6916                 ** ld options:   "\${ldopts[@]}"
6917 EOF
6918                 exec \$LD \${ldopts[@]}
6919 CF_EOF
6920                 chmod +x mk_prog.sh
6921                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6922                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6923                 ;;
6924         (mingw*)
6925                 cf_cv_shlib_version=mingw
6926                 cf_cv_shlib_version_infix=mingw
6927                 shlibdir=$bindir
6928                 MAKE_DLLS=
6929                 if test "$DFT_LWR_MODEL" = "shared" ; then
6930                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6931                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6932                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6933                 fi
6934                 CC_SHARED_OPTS=
6935                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6936                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6937                 cat >mk_shared_lib.sh <<-CF_EOF
6938                 #!$SHELL
6939                 SHARED_LIB=\$1
6940                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6941                 shift
6942                 cat <<-EOF
6943                 Linking shared library
6944                 ** SHARED_LIB \$SHARED_LIB
6945                 ** IMPORT_LIB \$IMPORT_LIB
6946 EOF
6947                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6948 CF_EOF
6949                 chmod +x mk_shared_lib.sh
6950                 ;;
6951         (openbsd[2-9].*|mirbsd*)
6952                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6953                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6954                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6955                 fi
6956                 if test "$cf_cv_enable_rpath" = yes ; then
6957                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6958                 fi
6959                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6960
6961         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6962         if test "$cf_cv_shlib_version" = rel; then
6963                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6964         else
6965                 cf_cv_shared_soname='`basename $@`'
6966         fi
6967
6968                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6969                 ;;
6970         (nskJ*)
6971                 CC_SHARED_OPTS=
6972                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6973                 ;;
6974         (nskL*)
6975                 CC_SHARED_OPTS=
6976                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6977                 ;;
6978         (nto-qnx*|openbsd*|freebsd[12].*)
6979                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6980                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6981                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6982                 ;;
6983         (dragonfly*|freebsd*)
6984                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6985                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6986                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6987                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6988                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6989                 fi
6990
6991         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6992         if test "$cf_cv_shlib_version" = rel; then
6993                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6994         else
6995                 cf_cv_shared_soname='`basename $@`'
6996         fi
6997
6998                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6999                 ;;
7000         (netbsd*)
7001                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7002                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7003                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7004                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7005                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7006                         if test "$cf_cv_shlib_version" = auto; then
7007                         if test -f /usr/libexec/ld.elf_so; then
7008                                 cf_cv_shlib_version=abi
7009                         else
7010                                 cf_cv_shlib_version=rel
7011                         fi
7012                         fi
7013
7014         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7015         if test "$cf_cv_shlib_version" = rel; then
7016                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7017         else
7018                 cf_cv_shared_soname='`basename $@`'
7019         fi
7020
7021                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7022                 else
7023                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7024                 fi
7025                 ;;
7026         (osf*|mls+*)
7027                 # tested with OSF/1 V3.2 and 'cc'
7028                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7029                 # link with shared libs).
7030                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7031                 case "$host_os" in
7032                 (osf4*)
7033                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7034                         ;;
7035                 esac
7036                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7037                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7038                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7039                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7040                 fi
7041                 cf_cv_rm_so_locs=yes
7042                 ;;
7043         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7044                 # tested with osr5.0.5
7045                 if test "$GCC" != yes; then
7046                         CC_SHARED_OPTS='-belf -KPIC'
7047                 fi
7048                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7049                 if test "$cf_cv_enable_rpath" = yes ; then
7050                         # only way is to set LD_RUN_PATH but no switch for it
7051                         RUN_PATH=$libdir
7052                 fi
7053                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7054                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7055                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7056                 ;;
7057         (sunos4*)
7058                 # tested with SunOS 4.1.1 and gcc 2.7.0
7059                 if test "$GCC" != yes; then
7060                         CC_SHARED_OPTS='-KPIC'
7061                 fi
7062                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7063                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7064                 ;;
7065         (solaris2*)
7066                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7067                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7068                 if test "$DFT_LWR_MODEL" = "shared" ; then
7069                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7070                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7071                 fi
7072                 if test "$cf_cv_enable_rpath" = yes ; then
7073                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7074                 fi
7075
7076         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7077         if test "$cf_cv_shlib_version" = rel; then
7078                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7079         else
7080                 cf_cv_shared_soname='`basename $@`'
7081         fi
7082
7083                 if test "$GCC" != yes; then
7084                         cf_save_CFLAGS="$CFLAGS"
7085                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7086                         do
7087                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7088                                 cat >"conftest.$ac_ext" <<_ACEOF
7089 #line 7089 "configure"
7090 #include "confdefs.h"
7091 #include <stdio.h>
7092 int
7093 main (void)
7094 {
7095 printf("Hello\\n");
7096   ;
7097   return 0;
7098 }
7099 _ACEOF
7100 rm -f "conftest.$ac_objext"
7101 if { (eval echo "$as_me:7101: \"$ac_compile\"") >&5
7102   (eval $ac_compile) 2>&5
7103   ac_status=$?
7104   echo "$as_me:7104: \$? = $ac_status" >&5
7105   (exit "$ac_status"); } &&
7106          { ac_try='test -s "conftest.$ac_objext"'
7107   { (eval echo "$as_me:7107: \"$ac_try\"") >&5
7108   (eval $ac_try) 2>&5
7109   ac_status=$?
7110   echo "$as_me:7110: \$? = $ac_status" >&5
7111   (exit "$ac_status"); }; }; then
7112   break
7113 else
7114   echo "$as_me: failed program was:" >&5
7115 cat "conftest.$ac_ext" >&5
7116 fi
7117 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7118                         done
7119                         CFLAGS="$cf_save_CFLAGS"
7120                         CC_SHARED_OPTS=$cf_shared_opts
7121                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7122                 else
7123                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7124                 fi
7125                 ;;
7126         (sysv5uw7*|unix_sv*)
7127                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7128                 if test "$GCC" != yes; then
7129                         CC_SHARED_OPTS='-KPIC'
7130                 fi
7131                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7132                 ;;
7133         (*)
7134                 CC_SHARED_OPTS='unknown'
7135                 MK_SHARED_LIB='echo unknown'
7136                 ;;
7137         esac
7138
7139         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7140         case "$cf_cv_shlib_version" in
7141         (rel|abi)
7142                 case "$MK_SHARED_LIB" in
7143                 (*'-o $@')
7144                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7145                         ;;
7146                 (*)
7147                         { echo "$as_me:7147: WARNING: ignored --with-shlib-version" >&5
7148 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7149                         ;;
7150                 esac
7151                 ;;
7152         esac
7153
7154         if test -n "$cf_try_cflags"
7155         then
7156 cat > conftest.$ac_ext <<EOF
7157 #line 7157 "${as_me:-configure}"
7158 #include <stdio.h>
7159 int main(int argc, char *argv[])
7160 {
7161         printf("hello\\n");
7162         return (argv[argc-1] == 0) ;
7163 }
7164 EOF
7165                 cf_save_CFLAGS="$CFLAGS"
7166                 for cf_opt in $cf_try_cflags
7167                 do
7168                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7169                         echo "$as_me:7169: checking if CFLAGS option -$cf_opt works" >&5
7170 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7171                         if { (eval echo "$as_me:7171: \"$ac_compile\"") >&5
7172   (eval $ac_compile) 2>&5
7173   ac_status=$?
7174   echo "$as_me:7174: \$? = $ac_status" >&5
7175   (exit "$ac_status"); }; then
7176                                 echo "$as_me:7176: result: yes" >&5
7177 echo "${ECHO_T}yes" >&6
7178                                 cf_save_CFLAGS="$CFLAGS"
7179                         else
7180                                 echo "$as_me:7180: result: no" >&5
7181 echo "${ECHO_T}no" >&6
7182                         fi
7183                 done
7184                 CFLAGS="$cf_save_CFLAGS"
7185         fi
7186
7187         # RPATH_LIST is a colon-separated list of directories
7188         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7189         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7190
7191         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7192
7193         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7194
7195 echo "${as_me:-configure}:7195: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7196
7197         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7198
7199 echo "${as_me:-configure}:7199: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7200
7201 for model in $cf_list_models ; do
7202         case "$model" in
7203         (libtool)
7204
7205 echo "$as_me:7205: checking for additional libtool options" >&5
7206 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7207
7208 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7209 if test "${with_libtool_opts+set}" = set; then
7210   withval="$with_libtool_opts"
7211   with_libtool_opts=$withval
7212 else
7213   with_libtool_opts=no
7214 fi;
7215 echo "$as_me:7215: result: $with_libtool_opts" >&5
7216 echo "${ECHO_T}$with_libtool_opts" >&6
7217
7218 case .$with_libtool_opts in
7219 (.yes|.no|.)
7220         ;;
7221 (*)
7222         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7223         ;;
7224 esac
7225
7226 echo "$as_me:7226: checking if exported-symbols file should be used" >&5
7227 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7228
7229 # Check whether --with-export-syms or --without-export-syms was given.
7230 if test "${with_export_syms+set}" = set; then
7231   withval="$with_export_syms"
7232   with_export_syms=$withval
7233 else
7234   with_export_syms=no
7235 fi;
7236 if test "x$with_export_syms" = xyes
7237 then
7238         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7239
7240 fi
7241 echo "$as_me:7241: result: $with_export_syms" >&5
7242 echo "${ECHO_T}$with_export_syms" >&6
7243 if test "x$with_export_syms" != xno
7244 then
7245         EXPORT_SYMS="-export-symbols $with_export_syms"
7246
7247 fi
7248
7249                 ;;
7250         (shared)
7251                 if test "$CC_SHARED_OPTS" = "unknown"; then
7252                         { { echo "$as_me:7252: error: Shared libraries are not supported in this version" >&5
7253 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7254    { (exit 1); exit 1; }; }
7255                 fi
7256                 # workaround for inept transition to PIE vs PIC...
7257                 echo "$as_me:7257: checking if current CFLAGS link properly" >&5
7258 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7259                 cat >"conftest.$ac_ext" <<_ACEOF
7260 #line 7260 "configure"
7261 #include "confdefs.h"
7262 #include <stdio.h>
7263 int
7264 main (void)
7265 {
7266 printf("Hello work\\n");
7267   ;
7268   return 0;
7269 }
7270 _ACEOF
7271 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7272 if { (eval echo "$as_me:7272: \"$ac_link\"") >&5
7273   (eval $ac_link) 2>&5
7274   ac_status=$?
7275   echo "$as_me:7275: \$? = $ac_status" >&5
7276   (exit "$ac_status"); } &&
7277          { ac_try='test -s "conftest$ac_exeext"'
7278   { (eval echo "$as_me:7278: \"$ac_try\"") >&5
7279   (eval $ac_try) 2>&5
7280   ac_status=$?
7281   echo "$as_me:7281: \$? = $ac_status" >&5
7282   (exit "$ac_status"); }; }; then
7283   cf_cflags_work=yes
7284 else
7285   echo "$as_me: failed program was:" >&5
7286 cat "conftest.$ac_ext" >&5
7287 cf_cflags_work=no
7288 fi
7289 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7290                 echo "$as_me:7290: result: $cf_cflags_work" >&5
7291 echo "${ECHO_T}$cf_cflags_work" >&6
7292                 if test "$cf_cflags_work" = no
7293                 then
7294                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7295
7296 echo "${as_me:-configure}:7296: testing try to work around by appending shared-options ..." 1>&5
7297
7298                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7299                 fi
7300
7301 echo "$as_me:7301: checking if versioned-symbols file should be used" >&5
7302 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7303
7304 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7305 if test "${with_versioned_syms+set}" = set; then
7306   withval="$with_versioned_syms"
7307   with_versioned_syms=$withval
7308 else
7309   with_versioned_syms=no
7310 fi;
7311 case "x$with_versioned_syms" in
7312 (xyes)
7313         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7314
7315         ;;
7316 (xno)
7317         ;;
7318 (x/*)
7319         test -f "$with_versioned_syms" || { { echo "$as_me:7319: error: expected a filename: $with_versioned_syms" >&5
7320 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7321    { (exit 1); exit 1; }; }
7322         ;;
7323 (*)
7324         test -f "$with_versioned_syms" || { { echo "$as_me:7324: error: expected a filename: $with_versioned_syms" >&5
7325 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7326    { (exit 1); exit 1; }; }
7327         with_versioned_syms=`pwd`/"$with_versioned_syms"
7328         ;;
7329 esac
7330 echo "$as_me:7330: result: $with_versioned_syms" >&5
7331 echo "${ECHO_T}$with_versioned_syms" >&6
7332
7333 RESULTING_SYMS=
7334 VERSIONED_SYMS=
7335 WILDCARD_SYMS=
7336
7337 if test "x$with_versioned_syms" != xno
7338 then
7339         RESULTING_SYMS=$with_versioned_syms
7340         case "x$MK_SHARED_LIB" in
7341         (*-Wl,*)
7342                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7343                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7344                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7345
7346 echo "${as_me:-configure}:7346: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7347
7348                 ;;
7349         (*-dy\ *)
7350                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7351                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7352                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7353
7354 echo "${as_me:-configure}:7354: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7355
7356                 ;;
7357         (*)
7358                 { echo "$as_me:7358: WARNING: this system does not support versioned-symbols" >&5
7359 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7360                 ;;
7361         esac
7362
7363         # Linux ld can selectively override scope, e.g., of symbols beginning with
7364         # "_" by first declaring some as global, and then using a wildcard to
7365         # declare the others as local.  Some other loaders cannot do this.  Check
7366         # by constructing a (very) simple shared library and inspecting its
7367         # symbols.
7368         if test "x$VERSIONED_SYMS" != "x"
7369         then
7370                 echo "$as_me:7370: checking if wildcards can be used to selectively omit symbols" >&5
7371 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7372                 WILDCARD_SYMS=no
7373
7374                 # make sources
7375                 rm -f conftest.*
7376
7377                 cat >conftest.ver <<EOF
7378 module_1.0 {
7379 global:
7380         globalf1;
7381 local:
7382         localf1;
7383 };
7384 module_2.0 {
7385 global:
7386         globalf2;
7387 local:
7388         localf2;
7389         _*;
7390 } module_1.0;
7391 submodule_1.0 {
7392 global:
7393         subglobalf1;
7394         _ismissing;
7395 local:
7396         sublocalf1;
7397 };
7398 submodule_2.0 {
7399 global:
7400         subglobalf2;
7401 local:
7402         sublocalf2;
7403         _*;
7404 } submodule_1.0;
7405 EOF
7406                 cat >conftest.$ac_ext <<EOF
7407 #line 7407 "configure"
7408 int     _ismissing(void) { return 1; }
7409 int     _localf1(void) { return 1; }
7410 int     _localf2(void) { return 2; }
7411 int     globalf1(void) { return 1; }
7412 int     globalf2(void) { return 2; }
7413 int     _sublocalf1(void) { return 1; }
7414 int     _sublocalf2(void) { return 2; }
7415 int     subglobalf1(void) { return 1; }
7416 int     subglobalf2(void) { return 2; }
7417 EOF
7418                 cat >conftest.mk <<EOF
7419 CC=${CC}
7420 CFLAGS=${CFLAGS}
7421 CPPFLAGS=${CPPFLAGS}
7422 LDFLAGS=${LDFLAGS}
7423 LIBS=${LIBS}
7424 VERSIONED_SYMS=${VERSIONED_SYMS}
7425 RESULTING_SYMS=conftest.ver
7426 MK_SHARED_LIB=${MK_SHARED_LIB}
7427 conftest.so: conftest.$ac_cv_objext
7428                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7429 EOF
7430
7431                 # compile source, make library
7432                 if make -f conftest.mk 2>&5 >/dev/null
7433                 then
7434                         # test for missing symbol in either Data or Text section
7435                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7436                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7437                 fi
7438                 echo "$as_me:7438: result: $WILDCARD_SYMS" >&5
7439 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7440                 rm -f conftest.*
7441         fi
7442 fi
7443
7444                 ;;
7445         esac
7446 done
7447
7448 ### Checks for special libraries, must be done up-front.
7449 SHLIB_LIST=""
7450
7451 echo "$as_me:7451: checking if you want to link with the GPM mouse library" >&5
7452 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7453
7454 # Check whether --with-gpm or --without-gpm was given.
7455 if test "${with_gpm+set}" = set; then
7456   withval="$with_gpm"
7457   with_gpm=$withval
7458 else
7459   with_gpm=maybe
7460 fi;
7461 echo "$as_me:7461: result: $with_gpm" >&5
7462 echo "${ECHO_T}$with_gpm" >&6
7463
7464 if test "$with_gpm" != no ; then
7465         echo "$as_me:7465: checking for gpm.h" >&5
7466 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7467 if test "${ac_cv_header_gpm_h+set}" = set; then
7468   echo $ECHO_N "(cached) $ECHO_C" >&6
7469 else
7470   cat >"conftest.$ac_ext" <<_ACEOF
7471 #line 7471 "configure"
7472 #include "confdefs.h"
7473 #include <gpm.h>
7474 _ACEOF
7475 if { (eval echo "$as_me:7475: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7476   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7477   ac_status=$?
7478   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7479   rm -f conftest.er1
7480   cat conftest.err >&5
7481   echo "$as_me:7481: \$? = $ac_status" >&5
7482   (exit "$ac_status"); } >/dev/null; then
7483   if test -s conftest.err; then
7484     ac_cpp_err=$ac_c_preproc_warn_flag
7485   else
7486     ac_cpp_err=
7487   fi
7488 else
7489   ac_cpp_err=yes
7490 fi
7491 if test -z "$ac_cpp_err"; then
7492   ac_cv_header_gpm_h=yes
7493 else
7494   echo "$as_me: failed program was:" >&5
7495   cat "conftest.$ac_ext" >&5
7496   ac_cv_header_gpm_h=no
7497 fi
7498 rm -f conftest.err "conftest.$ac_ext"
7499 fi
7500 echo "$as_me:7500: result: $ac_cv_header_gpm_h" >&5
7501 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7502 if test "$ac_cv_header_gpm_h" = yes; then
7503
7504 cat >>confdefs.h <<\EOF
7505 #define HAVE_GPM_H 1
7506 EOF
7507
7508                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7509                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7510
7511 echo "${as_me:-configure}:7511: testing assuming we really have GPM library ..." 1>&5
7512
7513 cat >>confdefs.h <<\EOF
7514 #define HAVE_LIBGPM 1
7515 EOF
7516
7517                         with_gpm=yes
7518                 else
7519                         echo "$as_me:7519: checking for Gpm_Open in -lgpm" >&5
7520 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7521 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7522   echo $ECHO_N "(cached) $ECHO_C" >&6
7523 else
7524   ac_check_lib_save_LIBS=$LIBS
7525 LIBS="-lgpm  $LIBS"
7526 cat >"conftest.$ac_ext" <<_ACEOF
7527 #line 7527 "configure"
7528 #include "confdefs.h"
7529
7530 /* Override any gcc2 internal prototype to avoid an error.  */
7531 #ifdef __cplusplus
7532 extern "C"
7533 #endif
7534 /* We use char because int might match the return type of a gcc2
7535    builtin and then its argument prototype would still apply.  */
7536 char Gpm_Open ();
7537 int
7538 main (void)
7539 {
7540 Gpm_Open ();
7541   ;
7542   return 0;
7543 }
7544 _ACEOF
7545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7546 if { (eval echo "$as_me:7546: \"$ac_link\"") >&5
7547   (eval $ac_link) 2>&5
7548   ac_status=$?
7549   echo "$as_me:7549: \$? = $ac_status" >&5
7550   (exit "$ac_status"); } &&
7551          { ac_try='test -s "conftest$ac_exeext"'
7552   { (eval echo "$as_me:7552: \"$ac_try\"") >&5
7553   (eval $ac_try) 2>&5
7554   ac_status=$?
7555   echo "$as_me:7555: \$? = $ac_status" >&5
7556   (exit "$ac_status"); }; }; then
7557   ac_cv_lib_gpm_Gpm_Open=yes
7558 else
7559   echo "$as_me: failed program was:" >&5
7560 cat "conftest.$ac_ext" >&5
7561 ac_cv_lib_gpm_Gpm_Open=no
7562 fi
7563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7564 LIBS=$ac_check_lib_save_LIBS
7565 fi
7566 echo "$as_me:7566: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7567 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7568 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7569   with_gpm=yes
7570 else
7571
7572                                 if test "$with_gpm" = maybe; then
7573                                         { echo "$as_me:7573: WARNING: Cannot link with GPM library" >&5
7574 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7575                                         with_gpm=no
7576                                 else
7577                                         { { echo "$as_me:7577: error: Cannot link with GPM library" >&5
7578 echo "$as_me: error: Cannot link with GPM library" >&2;}
7579    { (exit 1); exit 1; }; }
7580                                 fi
7581
7582 fi
7583
7584                 fi
7585
7586 else
7587
7588                 test "$with_gpm" != maybe && { echo "$as_me:7588: WARNING: Cannot find GPM header" >&5
7589 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7590                 with_gpm=no
7591
7592 fi
7593
7594 fi
7595
7596 if test "$with_gpm" != no ; then
7597         echo "$as_me:7597: checking if you want to load GPM dynamically" >&5
7598 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7599
7600 # Check whether --with-dlsym or --without-dlsym was given.
7601 if test "${with_dlsym+set}" = set; then
7602   withval="$with_dlsym"
7603   with_dlsym=$withval
7604 else
7605   with_dlsym=yes
7606 fi;
7607         echo "$as_me:7607: result: $with_dlsym" >&5
7608 echo "${ECHO_T}$with_dlsym" >&6
7609         if test "x$with_dlsym" = xyes ; then
7610
7611 cf_have_dlsym=no
7612 echo "$as_me:7612: checking for dlsym" >&5
7613 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7614 if test "${ac_cv_func_dlsym+set}" = set; then
7615   echo $ECHO_N "(cached) $ECHO_C" >&6
7616 else
7617   cat >"conftest.$ac_ext" <<_ACEOF
7618 #line 7618 "configure"
7619 #include "confdefs.h"
7620 #define dlsym autoconf_temporary
7621 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7622 #undef dlsym
7623
7624 #ifdef __cplusplus
7625 extern "C"
7626 #endif
7627
7628 /* We use char because int might match the return type of a gcc2
7629    builtin and then its argument prototype would still apply.  */
7630 char dlsym (void);
7631
7632 int
7633 main (void)
7634 {
7635
7636 /* The GNU C library defines stubs for functions which it implements
7637     to always fail with ENOSYS.  Some functions are actually named
7638     something starting with __ and the normal name is an alias.  */
7639 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7640 #error found stub for dlsym
7641 #endif
7642
7643         return dlsym ();
7644   ;
7645   return 0;
7646 }
7647 _ACEOF
7648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7649 if { (eval echo "$as_me:7649: \"$ac_link\"") >&5
7650   (eval $ac_link) 2>&5
7651   ac_status=$?
7652   echo "$as_me:7652: \$? = $ac_status" >&5
7653   (exit "$ac_status"); } &&
7654          { ac_try='test -s "conftest$ac_exeext"'
7655   { (eval echo "$as_me:7655: \"$ac_try\"") >&5
7656   (eval $ac_try) 2>&5
7657   ac_status=$?
7658   echo "$as_me:7658: \$? = $ac_status" >&5
7659   (exit "$ac_status"); }; }; then
7660   ac_cv_func_dlsym=yes
7661 else
7662   echo "$as_me: failed program was:" >&5
7663 cat "conftest.$ac_ext" >&5
7664 ac_cv_func_dlsym=no
7665 fi
7666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7667 fi
7668 echo "$as_me:7668: result: $ac_cv_func_dlsym" >&5
7669 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7670 if test "$ac_cv_func_dlsym" = yes; then
7671   cf_have_dlsym=yes
7672 else
7673
7674 cf_have_libdl=no
7675 echo "$as_me:7675: checking for dlsym in -ldl" >&5
7676 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7677 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7678   echo $ECHO_N "(cached) $ECHO_C" >&6
7679 else
7680   ac_check_lib_save_LIBS=$LIBS
7681 LIBS="-ldl  $LIBS"
7682 cat >"conftest.$ac_ext" <<_ACEOF
7683 #line 7683 "configure"
7684 #include "confdefs.h"
7685
7686 /* Override any gcc2 internal prototype to avoid an error.  */
7687 #ifdef __cplusplus
7688 extern "C"
7689 #endif
7690 /* We use char because int might match the return type of a gcc2
7691    builtin and then its argument prototype would still apply.  */
7692 char dlsym ();
7693 int
7694 main (void)
7695 {
7696 dlsym ();
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7702 if { (eval echo "$as_me:7702: \"$ac_link\"") >&5
7703   (eval $ac_link) 2>&5
7704   ac_status=$?
7705   echo "$as_me:7705: \$? = $ac_status" >&5
7706   (exit "$ac_status"); } &&
7707          { ac_try='test -s "conftest$ac_exeext"'
7708   { (eval echo "$as_me:7708: \"$ac_try\"") >&5
7709   (eval $ac_try) 2>&5
7710   ac_status=$?
7711   echo "$as_me:7711: \$? = $ac_status" >&5
7712   (exit "$ac_status"); }; }; then
7713   ac_cv_lib_dl_dlsym=yes
7714 else
7715   echo "$as_me: failed program was:" >&5
7716 cat "conftest.$ac_ext" >&5
7717 ac_cv_lib_dl_dlsym=no
7718 fi
7719 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7720 LIBS=$ac_check_lib_save_LIBS
7721 fi
7722 echo "$as_me:7722: result: $ac_cv_lib_dl_dlsym" >&5
7723 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7724 if test "$ac_cv_lib_dl_dlsym" = yes; then
7725
7726         cf_have_dlsym=yes
7727         cf_have_libdl=yes
7728 fi
7729
7730 fi
7731
7732 if test "$cf_have_dlsym" = yes ; then
7733         test "$cf_have_libdl" = yes && {
7734 cf_add_libs="$LIBS"
7735 # reverse order
7736 cf_add_0lib=
7737 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7738 # filter duplicates
7739 for cf_add_1lib in $cf_add_0lib; do
7740         for cf_add_2lib in $cf_add_libs; do
7741                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7742                         cf_add_1lib=
7743                         break
7744                 fi
7745         done
7746         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7747 done
7748 LIBS="$cf_add_libs"
7749  }
7750
7751         echo "$as_me:7751: checking whether able to link to dl*() functions" >&5
7752 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7753         cat >"conftest.$ac_ext" <<_ACEOF
7754 #line 7754 "configure"
7755 #include "confdefs.h"
7756 #include <dlfcn.h>
7757 int
7758 main (void)
7759 {
7760
7761                 void *obj;
7762                 if ((obj = dlopen("filename", 0)) != 0) {
7763                         if (dlsym(obj, "symbolname") == 0) {
7764                         dlclose(obj);
7765                         }
7766                 }
7767   ;
7768   return 0;
7769 }
7770 _ACEOF
7771 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7772 if { (eval echo "$as_me:7772: \"$ac_link\"") >&5
7773   (eval $ac_link) 2>&5
7774   ac_status=$?
7775   echo "$as_me:7775: \$? = $ac_status" >&5
7776   (exit "$ac_status"); } &&
7777          { ac_try='test -s "conftest$ac_exeext"'
7778   { (eval echo "$as_me:7778: \"$ac_try\"") >&5
7779   (eval $ac_try) 2>&5
7780   ac_status=$?
7781   echo "$as_me:7781: \$? = $ac_status" >&5
7782   (exit "$ac_status"); }; }; then
7783
7784 cat >>confdefs.h <<\EOF
7785 #define HAVE_LIBDL 1
7786 EOF
7787
7788 else
7789   echo "$as_me: failed program was:" >&5
7790 cat "conftest.$ac_ext" >&5
7791
7792                 { { echo "$as_me:7792: error: Cannot link test program for libdl" >&5
7793 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7794    { (exit 1); exit 1; }; }
7795 fi
7796 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7797         echo "$as_me:7797: result: ok" >&5
7798 echo "${ECHO_T}ok" >&6
7799 else
7800         { { echo "$as_me:7800: error: Cannot find dlsym function" >&5
7801 echo "$as_me: error: Cannot find dlsym function" >&2;}
7802    { (exit 1); exit 1; }; }
7803 fi
7804
7805                 if test "x$with_gpm" != xyes ; then
7806                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7807
7808 echo "${as_me:-configure}:7808: testing assuming soname for gpm is $with_gpm ..." 1>&5
7809
7810                         cf_cv_gpm_soname="$with_gpm"
7811                 else
7812
7813 echo "$as_me:7813: checking for soname of gpm library" >&5
7814 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7815 if test "${cf_cv_gpm_soname+set}" = set; then
7816   echo $ECHO_N "(cached) $ECHO_C" >&6
7817 else
7818
7819 cf_cv_gpm_soname=unknown
7820 if test "$cross_compiling" != yes ; then
7821 cat >conftest.$ac_ext <<CF_EOF
7822 #include <gpm.h>
7823 int main(void)
7824 {
7825 if (Gpm_Open(0,0)) Gpm_Close();
7826         ${cf_cv_main_return:-return}(0);
7827 }
7828 CF_EOF
7829 cf_save_LIBS="$LIBS"
7830
7831 cf_add_libs="$LIBS"
7832 # reverse order
7833 cf_add_0lib=
7834 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7835 # filter duplicates
7836 for cf_add_1lib in $cf_add_0lib; do
7837         for cf_add_2lib in $cf_add_libs; do
7838                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7839                         cf_add_1lib=
7840                         break
7841                 fi
7842         done
7843         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7844 done
7845 LIBS="$cf_add_libs"
7846
7847         if { (eval echo "$as_me:7847: \"$ac_compile\"") >&5
7848   (eval $ac_compile) 2>&5
7849   ac_status=$?
7850   echo "$as_me:7850: \$? = $ac_status" >&5
7851   (exit "$ac_status"); } ; then
7852                 if { (eval echo "$as_me:7852: \"$ac_link\"") >&5
7853   (eval $ac_link) 2>&5
7854   ac_status=$?
7855   echo "$as_me:7855: \$? = $ac_status" >&5
7856   (exit "$ac_status"); } ; then
7857                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7858                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7859                 fi
7860         fi
7861 rm -rf ./conftest*
7862 LIBS="$cf_save_LIBS"
7863 fi
7864
7865 fi
7866 echo "$as_me:7866: result: $cf_cv_gpm_soname" >&5
7867 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7868
7869                 fi
7870                 test "$cf_cv_gpm_soname" != "unknown" &&
7871 cat >>confdefs.h <<EOF
7872 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7873 EOF
7874
7875                 SHLIB_LIST="-ldl $SHLIB_LIST"
7876
7877 cf_add_libs="$PRIVATE_LIBS"
7878 # reverse order
7879 cf_add_0lib=
7880 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7881 # filter duplicates
7882 for cf_add_1lib in $cf_add_0lib; do
7883         for cf_add_2lib in $cf_add_libs; do
7884                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7885                         cf_add_1lib=
7886                         break
7887                 fi
7888         done
7889         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7890 done
7891 PRIVATE_LIBS="$cf_add_libs"
7892
7893         else
7894                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7895
7896 cf_add_libs="$TEST_LIBS"
7897 # reverse order
7898 cf_add_0lib=
7899 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7900 # filter duplicates
7901 for cf_add_1lib in $cf_add_0lib; do
7902         for cf_add_2lib in $cf_add_libs; do
7903                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7904                         cf_add_1lib=
7905                         break
7906                 fi
7907         done
7908         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7909 done
7910 TEST_LIBS="$cf_add_libs"
7911
7912 cf_add_libs="$PRIVATE_LIBS"
7913 # reverse order
7914 cf_add_0lib=
7915 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7916 # filter duplicates
7917 for cf_add_1lib in $cf_add_0lib; do
7918         for cf_add_2lib in $cf_add_libs; do
7919                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7920                         cf_add_1lib=
7921                         break
7922                 fi
7923         done
7924         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7925 done
7926 PRIVATE_LIBS="$cf_add_libs"
7927
7928         fi
7929
7930 cat >>confdefs.h <<\EOF
7931 #define HAVE_LIBGPM 1
7932 EOF
7933
7934 echo "$as_me:7934: checking for Gpm_Wgetch in -lgpm" >&5
7935 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7936 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7937   echo $ECHO_N "(cached) $ECHO_C" >&6
7938 else
7939   ac_check_lib_save_LIBS=$LIBS
7940 LIBS="-lgpm  $LIBS"
7941 cat >"conftest.$ac_ext" <<_ACEOF
7942 #line 7942 "configure"
7943 #include "confdefs.h"
7944
7945 /* Override any gcc2 internal prototype to avoid an error.  */
7946 #ifdef __cplusplus
7947 extern "C"
7948 #endif
7949 /* We use char because int might match the return type of a gcc2
7950    builtin and then its argument prototype would still apply.  */
7951 char Gpm_Wgetch ();
7952 int
7953 main (void)
7954 {
7955 Gpm_Wgetch ();
7956   ;
7957   return 0;
7958 }
7959 _ACEOF
7960 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7961 if { (eval echo "$as_me:7961: \"$ac_link\"") >&5
7962   (eval $ac_link) 2>&5
7963   ac_status=$?
7964   echo "$as_me:7964: \$? = $ac_status" >&5
7965   (exit "$ac_status"); } &&
7966          { ac_try='test -s "conftest$ac_exeext"'
7967   { (eval echo "$as_me:7967: \"$ac_try\"") >&5
7968   (eval $ac_try) 2>&5
7969   ac_status=$?
7970   echo "$as_me:7970: \$? = $ac_status" >&5
7971   (exit "$ac_status"); }; }; then
7972   ac_cv_lib_gpm_Gpm_Wgetch=yes
7973 else
7974   echo "$as_me: failed program was:" >&5
7975 cat "conftest.$ac_ext" >&5
7976 ac_cv_lib_gpm_Gpm_Wgetch=no
7977 fi
7978 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7979 LIBS=$ac_check_lib_save_LIBS
7980 fi
7981 echo "$as_me:7981: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7982 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7983 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7984
7985 echo "$as_me:7985: checking if GPM is weakly bound to curses library" >&5
7986 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7987 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7988   echo $ECHO_N "(cached) $ECHO_C" >&6
7989 else
7990
7991 cf_cv_check_gpm_wgetch=unknown
7992 if test "$cross_compiling" != yes ; then
7993
7994 cat >conftest.$ac_ext <<CF_EOF
7995 #include <gpm.h>
7996 int main(void)
7997 {
7998         Gpm_Wgetch();
7999         ${cf_cv_main_return:-return}(0);
8000 }
8001 CF_EOF
8002
8003         cf_save_LIBS="$LIBS"
8004         # This only works if we can look at the symbol table.  If a shared
8005         # library is stripped for install, we cannot use that.  So we're forced
8006         # to rely on the static library, noting that some packagers may not
8007         # include it.
8008         LIBS="-static -lgpm -dynamic $LIBS"
8009         if { (eval echo "$as_me:8009: \"$ac_compile\"") >&5
8010   (eval $ac_compile) 2>&5
8011   ac_status=$?
8012   echo "$as_me:8012: \$? = $ac_status" >&5
8013   (exit "$ac_status"); } ; then
8014                 if { (eval echo "$as_me:8014: \"$ac_link\"") >&5
8015   (eval $ac_link) 2>&5
8016   ac_status=$?
8017   echo "$as_me:8017: \$? = $ac_status" >&5
8018   (exit "$ac_status"); } ; then
8019                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8020                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8021                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8022                 fi
8023         fi
8024         rm -rf ./conftest*
8025         LIBS="$cf_save_LIBS"
8026 fi
8027
8028 fi
8029 echo "$as_me:8029: result: $cf_cv_check_gpm_wgetch" >&5
8030 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8031
8032 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8033         { echo "$as_me:8033: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8034 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8035 fi
8036
8037 fi
8038
8039 fi
8040
8041 echo "$as_me:8041: checking if you want to use PCRE2 for regular-expressions" >&5
8042 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8043
8044 # Check whether --with-pcre2 or --without-pcre2 was given.
8045 if test "${with_pcre2+set}" = set; then
8046   withval="$with_pcre2"
8047
8048 fi;
8049 test -z "$with_pcre2" && with_pcre2=no
8050 echo "$as_me:8050: result: $with_pcre2" >&5
8051 echo "${ECHO_T}$with_pcre2" >&6
8052
8053 if test "x$with_pcre2" != xno ; then
8054         cf_with_pcre2_ok=no
8055         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8056         do
8057
8058 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8059         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8060
8061 echo "${as_me:-configure}:8061: testing found package $cf_with_pcre2 ..." 1>&5
8062
8063         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8064         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8065         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8066
8067 echo "${as_me:-configure}:8067: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8068
8069         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8070
8071 echo "${as_me:-configure}:8071: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8072
8073 cf_fix_cppflags=no
8074 cf_new_cflags=
8075 cf_new_cppflags=
8076 cf_new_extra_cppflags=
8077
8078 for cf_add_cflags in $cf_pkgconfig_incs
8079 do
8080 case "$cf_fix_cppflags" in
8081 (no)
8082         case "$cf_add_cflags" in
8083         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8084                 case "$cf_add_cflags" in
8085                 (-D*)
8086                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8087
8088                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8089                                 && test -z "${cf_tst_cflags}" \
8090                                 && cf_fix_cppflags=yes
8091
8092                         if test "$cf_fix_cppflags" = yes ; then
8093
8094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8096
8097                                 continue
8098                         elif test "${cf_tst_cflags}" = "\"'" ; then
8099
8100         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8101         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8102
8103                                 continue
8104                         fi
8105                         ;;
8106                 esac
8107                 case "$CPPFLAGS" in
8108                 (*$cf_add_cflags)
8109                         ;;
8110                 (*)
8111                         case "$cf_add_cflags" in
8112                         (-D*)
8113                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8114
8115 CPPFLAGS=`echo "$CPPFLAGS" | \
8116         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8117                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8118
8119                                 ;;
8120                         esac
8121
8122         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8123         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8124
8125                         ;;
8126                 esac
8127                 ;;
8128         (*)
8129
8130         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8131         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8132
8133                 ;;
8134         esac
8135         ;;
8136 (yes)
8137
8138         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8139         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8140
8141         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8142
8143         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8144                 && test -z "${cf_tst_cflags}" \
8145                 && cf_fix_cppflags=no
8146         ;;
8147 esac
8148 done
8149
8150 if test -n "$cf_new_cflags" ; then
8151
8152         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8153         CFLAGS="${CFLAGS}$cf_new_cflags"
8154
8155 fi
8156
8157 if test -n "$cf_new_cppflags" ; then
8158
8159         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8160         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8161
8162 fi
8163
8164 if test -n "$cf_new_extra_cppflags" ; then
8165
8166         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8167         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8168
8169 fi
8170
8171 cf_add_libs="$LIBS"
8172 # reverse order
8173 cf_add_0lib=
8174 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8175 # filter duplicates
8176 for cf_add_1lib in $cf_add_0lib; do
8177         for cf_add_2lib in $cf_add_libs; do
8178                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8179                         cf_add_1lib=
8180                         break
8181                 fi
8182         done
8183         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8184 done
8185 LIBS="$cf_add_libs"
8186
8187         cf_with_pcre2_ok=yes; break
8188 else
8189         cf_pkgconfig_incs=
8190         cf_pkgconfig_libs=
8191         :
8192 fi
8193
8194         done
8195         cf_with_pcre2_ok=yes || { { echo "$as_me:8195: error: Cannot find PCRE2 library" >&5
8196 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8197    { (exit 1); exit 1; }; }
8198
8199 cat >>confdefs.h <<\EOF
8200 #define HAVE_LIB_PCRE2 1
8201 EOF
8202
8203         # if pkgconfig gave no results, look for the libraries directly
8204         case "$LIBS" in
8205         (*pcre2-posix*|*pcreposix*)
8206                 ;;
8207         (*)
8208                 echo "$as_me:8208: checking for regcomp in -lpcre2-posix" >&5
8209 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8210 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8211   echo $ECHO_N "(cached) $ECHO_C" >&6
8212 else
8213   ac_check_lib_save_LIBS=$LIBS
8214 LIBS="-lpcre2-posix  $LIBS"
8215 cat >"conftest.$ac_ext" <<_ACEOF
8216 #line 8216 "configure"
8217 #include "confdefs.h"
8218
8219 /* Override any gcc2 internal prototype to avoid an error.  */
8220 #ifdef __cplusplus
8221 extern "C"
8222 #endif
8223 /* We use char because int might match the return type of a gcc2
8224    builtin and then its argument prototype would still apply.  */
8225 char regcomp ();
8226 int
8227 main (void)
8228 {
8229 regcomp ();
8230   ;
8231   return 0;
8232 }
8233 _ACEOF
8234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8235 if { (eval echo "$as_me:8235: \"$ac_link\"") >&5
8236   (eval $ac_link) 2>&5
8237   ac_status=$?
8238   echo "$as_me:8238: \$? = $ac_status" >&5
8239   (exit "$ac_status"); } &&
8240          { ac_try='test -s "conftest$ac_exeext"'
8241   { (eval echo "$as_me:8241: \"$ac_try\"") >&5
8242   (eval $ac_try) 2>&5
8243   ac_status=$?
8244   echo "$as_me:8244: \$? = $ac_status" >&5
8245   (exit "$ac_status"); }; }; then
8246   ac_cv_lib_pcre2_posix_regcomp=yes
8247 else
8248   echo "$as_me: failed program was:" >&5
8249 cat "conftest.$ac_ext" >&5
8250 ac_cv_lib_pcre2_posix_regcomp=no
8251 fi
8252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8253 LIBS=$ac_check_lib_save_LIBS
8254 fi
8255 echo "$as_me:8255: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8256 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8257 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8258
8259 cf_add_libs="$LIBS"
8260 # reverse order
8261 cf_add_0lib=
8262 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8263 # filter duplicates
8264 for cf_add_1lib in $cf_add_0lib; do
8265         for cf_add_2lib in $cf_add_libs; do
8266                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8267                         cf_add_1lib=
8268                         break
8269                 fi
8270         done
8271         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8272 done
8273 LIBS="$cf_add_libs"
8274
8275 else
8276   echo "$as_me:8276: checking for regcomp in -lpcreposix" >&5
8277 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8278 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8279   echo $ECHO_N "(cached) $ECHO_C" >&6
8280 else
8281   ac_check_lib_save_LIBS=$LIBS
8282 LIBS="-lpcreposix  $LIBS"
8283 cat >"conftest.$ac_ext" <<_ACEOF
8284 #line 8284 "configure"
8285 #include "confdefs.h"
8286
8287 /* Override any gcc2 internal prototype to avoid an error.  */
8288 #ifdef __cplusplus
8289 extern "C"
8290 #endif
8291 /* We use char because int might match the return type of a gcc2
8292    builtin and then its argument prototype would still apply.  */
8293 char regcomp ();
8294 int
8295 main (void)
8296 {
8297 regcomp ();
8298   ;
8299   return 0;
8300 }
8301 _ACEOF
8302 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8303 if { (eval echo "$as_me:8303: \"$ac_link\"") >&5
8304   (eval $ac_link) 2>&5
8305   ac_status=$?
8306   echo "$as_me:8306: \$? = $ac_status" >&5
8307   (exit "$ac_status"); } &&
8308          { ac_try='test -s "conftest$ac_exeext"'
8309   { (eval echo "$as_me:8309: \"$ac_try\"") >&5
8310   (eval $ac_try) 2>&5
8311   ac_status=$?
8312   echo "$as_me:8312: \$? = $ac_status" >&5
8313   (exit "$ac_status"); }; }; then
8314   ac_cv_lib_pcreposix_regcomp=yes
8315 else
8316   echo "$as_me: failed program was:" >&5
8317 cat "conftest.$ac_ext" >&5
8318 ac_cv_lib_pcreposix_regcomp=no
8319 fi
8320 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8321 LIBS=$ac_check_lib_save_LIBS
8322 fi
8323 echo "$as_me:8323: result: $ac_cv_lib_pcreposix_regcomp" >&5
8324 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8325 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8326
8327 cf_add_libs="$LIBS"
8328 # reverse order
8329 cf_add_0lib=
8330 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8331 # filter duplicates
8332 for cf_add_1lib in $cf_add_0lib; do
8333         for cf_add_2lib in $cf_add_libs; do
8334                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8335                         cf_add_1lib=
8336                         break
8337                 fi
8338         done
8339         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8340 done
8341 LIBS="$cf_add_libs"
8342
8343 else
8344   { { echo "$as_me:8344: error: Cannot find PCRE2 POSIX library" >&5
8345 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8346    { (exit 1); exit 1; }; }
8347 fi
8348
8349 fi
8350
8351                 ;;
8352         esac
8353
8354         # either way, check for the library header files
8355
8356 for ac_header in pcre2posix.h pcreposix.h
8357 do
8358 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8359 echo "$as_me:8359: checking for $ac_header" >&5
8360 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8361 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8362   echo $ECHO_N "(cached) $ECHO_C" >&6
8363 else
8364   cat >"conftest.$ac_ext" <<_ACEOF
8365 #line 8365 "configure"
8366 #include "confdefs.h"
8367 #include <$ac_header>
8368 _ACEOF
8369 if { (eval echo "$as_me:8369: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8370   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8371   ac_status=$?
8372   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8373   rm -f conftest.er1
8374   cat conftest.err >&5
8375   echo "$as_me:8375: \$? = $ac_status" >&5
8376   (exit "$ac_status"); } >/dev/null; then
8377   if test -s conftest.err; then
8378     ac_cpp_err=$ac_c_preproc_warn_flag
8379   else
8380     ac_cpp_err=
8381   fi
8382 else
8383   ac_cpp_err=yes
8384 fi
8385 if test -z "$ac_cpp_err"; then
8386   eval "$as_ac_Header=yes"
8387 else
8388   echo "$as_me: failed program was:" >&5
8389   cat "conftest.$ac_ext" >&5
8390   eval "$as_ac_Header=no"
8391 fi
8392 rm -f conftest.err "conftest.$ac_ext"
8393 fi
8394 echo "$as_me:8394: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8395 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8396 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8397   cat >>confdefs.h <<EOF
8398 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8399 EOF
8400
8401 fi
8402 done
8403
8404 for ac_func in PCRE2regcomp
8405 do
8406 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8407 echo "$as_me:8407: checking for $ac_func" >&5
8408 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8409 if eval "test \"\${$as_ac_var+set}\" = set"; then
8410   echo $ECHO_N "(cached) $ECHO_C" >&6
8411 else
8412   cat >"conftest.$ac_ext" <<_ACEOF
8413 #line 8413 "configure"
8414 #include "confdefs.h"
8415 #define $ac_func autoconf_temporary
8416 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8417 #undef $ac_func
8418
8419 #ifdef __cplusplus
8420 extern "C"
8421 #endif
8422
8423 /* We use char because int might match the return type of a gcc2
8424    builtin and then its argument prototype would still apply.  */
8425 char $ac_func (void);
8426
8427 int
8428 main (void)
8429 {
8430
8431 /* The GNU C library defines stubs for functions which it implements
8432     to always fail with ENOSYS.  Some functions are actually named
8433     something starting with __ and the normal name is an alias.  */
8434 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8435 #error found stub for $ac_func
8436 #endif
8437
8438         return $ac_func ();
8439   ;
8440   return 0;
8441 }
8442 _ACEOF
8443 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8444 if { (eval echo "$as_me:8444: \"$ac_link\"") >&5
8445   (eval $ac_link) 2>&5
8446   ac_status=$?
8447   echo "$as_me:8447: \$? = $ac_status" >&5
8448   (exit "$ac_status"); } &&
8449          { ac_try='test -s "conftest$ac_exeext"'
8450   { (eval echo "$as_me:8450: \"$ac_try\"") >&5
8451   (eval $ac_try) 2>&5
8452   ac_status=$?
8453   echo "$as_me:8453: \$? = $ac_status" >&5
8454   (exit "$ac_status"); }; }; then
8455   eval "$as_ac_var=yes"
8456 else
8457   echo "$as_me: failed program was:" >&5
8458 cat "conftest.$ac_ext" >&5
8459 eval "$as_ac_var=no"
8460 fi
8461 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8462 fi
8463 echo "$as_me:8463: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8464 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8465 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8466   cat >>confdefs.h <<EOF
8467 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8468 EOF
8469
8470 fi
8471 done
8472
8473 fi
8474
8475 # not everyone has "test -c"
8476 if test -c /dev/sysmouse 2>/dev/null ; then
8477 echo "$as_me:8477: checking if you want to use sysmouse" >&5
8478 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8479
8480 # Check whether --with-sysmouse or --without-sysmouse was given.
8481 if test "${with_sysmouse+set}" = set; then
8482   withval="$with_sysmouse"
8483   cf_with_sysmouse=$withval
8484 else
8485   cf_with_sysmouse=maybe
8486 fi;
8487         if test "$cf_with_sysmouse" != no ; then
8488         cat >"conftest.$ac_ext" <<_ACEOF
8489 #line 8489 "configure"
8490 #include "confdefs.h"
8491
8492 #include <osreldate.h>
8493 #if (__FreeBSD_version >= 400017)
8494 #include <sys/consio.h>
8495 #include <sys/fbio.h>
8496 #else
8497 #include <machine/console.h>
8498 #endif
8499
8500 int
8501 main (void)
8502 {
8503
8504         struct mouse_info the_mouse;
8505         ioctl(0, CONS_MOUSECTL, &the_mouse);
8506
8507   ;
8508   return 0;
8509 }
8510 _ACEOF
8511 rm -f "conftest.$ac_objext"
8512 if { (eval echo "$as_me:8512: \"$ac_compile\"") >&5
8513   (eval $ac_compile) 2>&5
8514   ac_status=$?
8515   echo "$as_me:8515: \$? = $ac_status" >&5
8516   (exit "$ac_status"); } &&
8517          { ac_try='test -s "conftest.$ac_objext"'
8518   { (eval echo "$as_me:8518: \"$ac_try\"") >&5
8519   (eval $ac_try) 2>&5
8520   ac_status=$?
8521   echo "$as_me:8521: \$? = $ac_status" >&5
8522   (exit "$ac_status"); }; }; then
8523   cf_with_sysmouse=yes
8524 else
8525   echo "$as_me: failed program was:" >&5
8526 cat "conftest.$ac_ext" >&5
8527 cf_with_sysmouse=no
8528 fi
8529 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8530         fi
8531 echo "$as_me:8531: result: $cf_with_sysmouse" >&5
8532 echo "${ECHO_T}$cf_with_sysmouse" >&6
8533 test "$cf_with_sysmouse" = yes &&
8534 cat >>confdefs.h <<\EOF
8535 #define USE_SYSMOUSE 1
8536 EOF
8537
8538 fi
8539
8540 # pretend that ncurses==ncursesw==ncursest
8541 echo "$as_me:8541: checking if you want to disable library suffixes" >&5
8542 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8543
8544 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8545 if test "${enable_lib_suffixes+set}" = set; then
8546   enableval="$enable_lib_suffixes"
8547   test "$enableval" != no && enableval=yes
8548         if test "$enableval" != "yes" ; then
8549     disable_lib_suffixes=yes
8550         else
8551                 disable_lib_suffixes=no
8552         fi
8553 else
8554   enableval=yes
8555         disable_lib_suffixes=no
8556
8557 fi;
8558 echo "$as_me:8558: result: $disable_lib_suffixes" >&5
8559 echo "${ECHO_T}$disable_lib_suffixes" >&6
8560
8561 ### If we're building with rpath, try to link non-standard libs that way too.
8562 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8563
8564 echo "$as_me:8564: checking if rpath-hack should be disabled" >&5
8565 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8566
8567 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8568 if test "${enable_rpath_hack+set}" = set; then
8569   enableval="$enable_rpath_hack"
8570   test "$enableval" != no && enableval=yes
8571         if test "$enableval" != "yes" ; then
8572     enable_rpath_hack=no
8573         else
8574                 enable_rpath_hack=yes
8575         fi
8576 else
8577   enableval=yes
8578         enable_rpath_hack=yes
8579
8580 fi;
8581 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8582 echo "$as_me:8582: result: $cf_disable_rpath_hack" >&5
8583 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8584
8585 if test "$enable_rpath_hack" = yes ; then
8586
8587 echo "$as_me:8587: checking for updated LDFLAGS" >&5
8588 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8589 if test -n "$LD_RPATH_OPT" ; then
8590         echo "$as_me:8590: result: maybe" >&5
8591 echo "${ECHO_T}maybe" >&6
8592
8593         for ac_prog in ldd
8594 do
8595   # Extract the first word of "$ac_prog", so it can be a program name with args.
8596 set dummy $ac_prog; ac_word=$2
8597 echo "$as_me:8597: checking for $ac_word" >&5
8598 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8599 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8600   echo $ECHO_N "(cached) $ECHO_C" >&6
8601 else
8602   if test -n "$cf_ldd_prog"; then
8603   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8604 else
8605   ac_save_IFS=$IFS; IFS=$ac_path_separator
8606 ac_dummy="$PATH"
8607 for ac_dir in $ac_dummy; do
8608   IFS=$ac_save_IFS
8609   test -z "$ac_dir" && ac_dir=.
8610   $as_executable_p "$ac_dir/$ac_word" || continue
8611 ac_cv_prog_cf_ldd_prog="$ac_prog"
8612 echo "$as_me:8612: found $ac_dir/$ac_word" >&5
8613 break
8614 done
8615
8616 fi
8617 fi
8618 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8619 if test -n "$cf_ldd_prog"; then
8620   echo "$as_me:8620: result: $cf_ldd_prog" >&5
8621 echo "${ECHO_T}$cf_ldd_prog" >&6
8622 else
8623   echo "$as_me:8623: result: no" >&5
8624 echo "${ECHO_T}no" >&6
8625 fi
8626
8627   test -n "$cf_ldd_prog" && break
8628 done
8629 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8630
8631         cf_rpath_list="/usr/lib /lib"
8632         if test "$cf_ldd_prog" != no
8633         then
8634                 cf_rpath_oops=
8635
8636 cat >"conftest.$ac_ext" <<_ACEOF
8637 #line 8637 "configure"
8638 #include "confdefs.h"
8639 #include <stdio.h>
8640 int
8641 main (void)
8642 {
8643 printf("Hello");
8644   ;
8645   return 0;
8646 }
8647 _ACEOF
8648 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8649 if { (eval echo "$as_me:8649: \"$ac_link\"") >&5
8650   (eval $ac_link) 2>&5
8651   ac_status=$?
8652   echo "$as_me:8652: \$? = $ac_status" >&5
8653   (exit "$ac_status"); } &&
8654          { ac_try='test -s "conftest$ac_exeext"'
8655   { (eval echo "$as_me:8655: \"$ac_try\"") >&5
8656   (eval $ac_try) 2>&5
8657   ac_status=$?
8658   echo "$as_me:8658: \$? = $ac_status" >&5
8659   (exit "$ac_status"); }; }; then
8660   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8661                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8662 else
8663   echo "$as_me: failed program was:" >&5
8664 cat "conftest.$ac_ext" >&5
8665 fi
8666 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8667
8668                 # If we passed the link-test, but get a "not found" on a given library,
8669                 # this could be due to inept reconfiguration of gcc to make it only
8670                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8671                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8672                 # /usr/local libraries.
8673                 if test -n "$cf_rpath_oops"
8674                 then
8675                         for cf_rpath_src in $cf_rpath_oops
8676                         do
8677                                 for cf_rpath_dir in \
8678                                         /usr/local \
8679                                         /usr/pkg \
8680                                         /opt/sfw
8681                                 do
8682                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8683                                         then
8684                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8685
8686 echo "${as_me:-configure}:8686: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8687
8688                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8689                                                 break
8690                                         fi
8691                                 done
8692                         done
8693                 fi
8694         fi
8695
8696         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8697
8698 echo "${as_me:-configure}:8698: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8699
8700 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8701
8702 echo "${as_me:-configure}:8702: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8703
8704 cf_rpath_dst=
8705 for cf_rpath_src in $LDFLAGS
8706 do
8707         case "$cf_rpath_src" in
8708         (-L*)
8709
8710                 # check if this refers to a directory which we will ignore
8711                 cf_rpath_skip=no
8712                 if test -n "$cf_rpath_list"
8713                 then
8714                         for cf_rpath_item in $cf_rpath_list
8715                         do
8716                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8717                                 then
8718                                         cf_rpath_skip=yes
8719                                         break
8720                                 fi
8721                         done
8722                 fi
8723
8724                 if test "$cf_rpath_skip" = no
8725                 then
8726                         # transform the option
8727                         if test "$LD_RPATH_OPT" = "-R " ; then
8728                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8729                         else
8730                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8731                         fi
8732
8733                         # if we have not already added this, add it now
8734                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8735                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8736                         then
8737                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8738
8739 echo "${as_me:-configure}:8739: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8740
8741                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8742                         fi
8743                 fi
8744                 ;;
8745         esac
8746         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8747 done
8748 LDFLAGS=$cf_rpath_dst
8749
8750 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8751
8752 echo "${as_me:-configure}:8752: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8753
8754 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8755
8756 echo "${as_me:-configure}:8756: testing ...checking LIBS $LIBS ..." 1>&5
8757
8758 cf_rpath_dst=
8759 for cf_rpath_src in $LIBS
8760 do
8761         case "$cf_rpath_src" in
8762         (-L*)
8763
8764                 # check if this refers to a directory which we will ignore
8765                 cf_rpath_skip=no
8766                 if test -n "$cf_rpath_list"
8767                 then
8768                         for cf_rpath_item in $cf_rpath_list
8769                         do
8770                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8771                                 then
8772                                         cf_rpath_skip=yes
8773                                         break
8774                                 fi
8775                         done
8776                 fi
8777
8778                 if test "$cf_rpath_skip" = no
8779                 then
8780                         # transform the option
8781                         if test "$LD_RPATH_OPT" = "-R " ; then
8782                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8783                         else
8784                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8785                         fi
8786
8787                         # if we have not already added this, add it now
8788                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8789                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8790                         then
8791                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8792
8793 echo "${as_me:-configure}:8793: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8794
8795                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8796                         fi
8797                 fi
8798                 ;;
8799         esac
8800         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8801 done
8802 LIBS=$cf_rpath_dst
8803
8804 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8805
8806 echo "${as_me:-configure}:8806: testing ...checked LIBS $LIBS ..." 1>&5
8807
8808         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8809
8810 echo "${as_me:-configure}:8810: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8811
8812 else
8813         echo "$as_me:8813: result: no" >&5
8814 echo "${ECHO_T}no" >&6
8815 fi
8816
8817 fi
8818
8819 fi
8820
8821 ### Depending on the system, someone may use rpath to build ncurses but not
8822 # want users of the package to rely upon that feature.  Give those people an
8823 # option to suppress that detail from EXTRA_LDFLAGS.
8824 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8825 if test -n "$EXTRA_PKG_LDFLAGS"
8826 then
8827         echo "$as_me:8827: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8828 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8829
8830 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8831 if test "${enable_pkg_ldflags+set}" = set; then
8832   enableval="$enable_pkg_ldflags"
8833   test "$enableval" != no && enableval=yes
8834         if test "$enableval" != "yes" ; then
8835     disable_pkg_ldflags=yes
8836         else
8837                 disable_pkg_ldflags=no
8838         fi
8839 else
8840   enableval=yes
8841         disable_pkg_ldflags=no
8842
8843 fi;
8844         echo "$as_me:8844: result: $disable_pkg_ldflags" >&5
8845 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8846         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8847 fi
8848
8849 ###############################################################################
8850
8851 ###     use option --with-extra-suffix to append suffix to headers and libraries
8852 echo "$as_me:8852: checking if you wish to append extra suffix to header/library paths" >&5
8853 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8854 EXTRA_SUFFIX=
8855
8856 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8857 if test "${with_extra_suffix+set}" = set; then
8858   withval="$with_extra_suffix"
8859   case x$withval in
8860         (xno)
8861                 ;;
8862         (xyes|x)
8863                 EXTRA_SUFFIX=$cf_cv_abi_version
8864                 ;;
8865         (*)
8866                 EXTRA_SUFFIX=$withval
8867                 ;;
8868         esac
8869
8870 fi;
8871 echo "$as_me:8871: result: $EXTRA_SUFFIX" >&5
8872 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8873
8874 ###     use option --disable-overwrite to leave out the link to -lcurses
8875 echo "$as_me:8875: checking if you wish to install ncurses overwriting curses" >&5
8876 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8877
8878 # Check whether --enable-overwrite or --disable-overwrite was given.
8879 if test "${enable_overwrite+set}" = set; then
8880   enableval="$enable_overwrite"
8881   with_overwrite=$enableval
8882 else
8883   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8884 fi;
8885 echo "$as_me:8885: result: $with_overwrite" >&5
8886 echo "${ECHO_T}$with_overwrite" >&6
8887
8888 echo "$as_me:8888: checking if external terminfo-database is used" >&5
8889 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8890
8891 # Check whether --enable-database or --disable-database was given.
8892 if test "${enable_database+set}" = set; then
8893   enableval="$enable_database"
8894   use_database=$enableval
8895 else
8896   use_database=yes
8897 fi;
8898 echo "$as_me:8898: result: $use_database" >&5
8899 echo "${ECHO_T}$use_database" >&6
8900
8901 case "$host_os" in
8902 (os2*)
8903         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8904         ;;
8905 (*)
8906         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8907         ;;
8908 esac
8909
8910 NCURSES_USE_DATABASE=0
8911 if test "$use_database" != no ; then
8912         NCURSES_USE_DATABASE=1
8913
8914         echo "$as_me:8914: checking which terminfo source-file will be installed" >&5
8915 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8916
8917 # Check whether --with-database or --without-database was given.
8918 if test "${with_database+set}" = set; then
8919   withval="$with_database"
8920   TERMINFO_SRC=$withval
8921 fi;
8922         echo "$as_me:8922: result: $TERMINFO_SRC" >&5
8923 echo "${ECHO_T}$TERMINFO_SRC" >&6
8924
8925         echo "$as_me:8925: checking whether to use hashed database instead of directory/tree" >&5
8926 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8927
8928 # Check whether --with-hashed-db or --without-hashed-db was given.
8929 if test "${with_hashed_db+set}" = set; then
8930   withval="$with_hashed_db"
8931
8932 else
8933   with_hashed_db=no
8934 fi;
8935         echo "$as_me:8935: result: $with_hashed_db" >&5
8936 echo "${ECHO_T}$with_hashed_db" >&6
8937 else
8938         with_hashed_db=no
8939 fi
8940
8941 echo "$as_me:8941: checking for list of fallback descriptions" >&5
8942 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8943
8944 # Check whether --with-fallbacks or --without-fallbacks was given.
8945 if test "${with_fallbacks+set}" = set; then
8946   withval="$with_fallbacks"
8947   with_fallback=$withval
8948 else
8949   with_fallback=
8950 fi;
8951 echo "$as_me:8951: result: $with_fallback" >&5
8952 echo "${ECHO_T}$with_fallback" >&6
8953
8954 case ".$with_fallback" in
8955 (.|.no)
8956         FALLBACK_LIST=
8957         ;;
8958 (.yes)
8959         { echo "$as_me:8959: WARNING: expected a list of terminal descriptions" >&5
8960 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8961         ;;
8962 (*)
8963         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8964         ;;
8965 esac
8966
8967 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8968 # tree for generating the terminal descriptions that will be compiled into the
8969 # library.  If your toolchain is old, it may not handle current terminal
8970 # databases.  Use configure-options to point to the tools which will be used,
8971 # rather than the first ones found on the $PATH.
8972 if test -n "$ac_tool_prefix"; then
8973   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8974 set dummy ${ac_tool_prefix}tic; ac_word=$2
8975 echo "$as_me:8975: checking for $ac_word" >&5
8976 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8977 if test "${ac_cv_prog_TIC+set}" = set; then
8978   echo $ECHO_N "(cached) $ECHO_C" >&6
8979 else
8980   if test -n "$TIC"; then
8981   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8982 else
8983   ac_save_IFS=$IFS; IFS=$ac_path_separator
8984 ac_dummy="$PATH"
8985 for ac_dir in $ac_dummy; do
8986   IFS=$ac_save_IFS
8987   test -z "$ac_dir" && ac_dir=.
8988   $as_executable_p "$ac_dir/$ac_word" || continue
8989 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8990 echo "$as_me:8990: found $ac_dir/$ac_word" >&5
8991 break
8992 done
8993
8994 fi
8995 fi
8996 TIC=$ac_cv_prog_TIC
8997 if test -n "$TIC"; then
8998   echo "$as_me:8998: result: $TIC" >&5
8999 echo "${ECHO_T}$TIC" >&6
9000 else
9001   echo "$as_me:9001: result: no" >&5
9002 echo "${ECHO_T}no" >&6
9003 fi
9004
9005 fi
9006 if test -z "$ac_cv_prog_TIC"; then
9007   ac_ct_TIC=$TIC
9008   # Extract the first word of "tic", so it can be a program name with args.
9009 set dummy tic; ac_word=$2
9010 echo "$as_me:9010: checking for $ac_word" >&5
9011 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9012 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9013   echo $ECHO_N "(cached) $ECHO_C" >&6
9014 else
9015   if test -n "$ac_ct_TIC"; then
9016   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9017 else
9018   ac_save_IFS=$IFS; IFS=$ac_path_separator
9019 ac_dummy="$PATH"
9020 for ac_dir in $ac_dummy; do
9021   IFS=$ac_save_IFS
9022   test -z "$ac_dir" && ac_dir=.
9023   $as_executable_p "$ac_dir/$ac_word" || continue
9024 ac_cv_prog_ac_ct_TIC="tic"
9025 echo "$as_me:9025: found $ac_dir/$ac_word" >&5
9026 break
9027 done
9028
9029 fi
9030 fi
9031 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9032 if test -n "$ac_ct_TIC"; then
9033   echo "$as_me:9033: result: $ac_ct_TIC" >&5
9034 echo "${ECHO_T}$ac_ct_TIC" >&6
9035 else
9036   echo "$as_me:9036: result: no" >&5
9037 echo "${ECHO_T}no" >&6
9038 fi
9039
9040   TIC=$ac_ct_TIC
9041 else
9042   TIC="$ac_cv_prog_TIC"
9043 fi
9044
9045 if test -n "$ac_tool_prefix"; then
9046   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9047 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9048 echo "$as_me:9048: checking for $ac_word" >&5
9049 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9050 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9051   echo $ECHO_N "(cached) $ECHO_C" >&6
9052 else
9053   if test -n "$INFOCMP"; then
9054   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9055 else
9056   ac_save_IFS=$IFS; IFS=$ac_path_separator
9057 ac_dummy="$PATH"
9058 for ac_dir in $ac_dummy; do
9059   IFS=$ac_save_IFS
9060   test -z "$ac_dir" && ac_dir=.
9061   $as_executable_p "$ac_dir/$ac_word" || continue
9062 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9063 echo "$as_me:9063: found $ac_dir/$ac_word" >&5
9064 break
9065 done
9066
9067 fi
9068 fi
9069 INFOCMP=$ac_cv_prog_INFOCMP
9070 if test -n "$INFOCMP"; then
9071   echo "$as_me:9071: result: $INFOCMP" >&5
9072 echo "${ECHO_T}$INFOCMP" >&6
9073 else
9074   echo "$as_me:9074: result: no" >&5
9075 echo "${ECHO_T}no" >&6
9076 fi
9077
9078 fi
9079 if test -z "$ac_cv_prog_INFOCMP"; then
9080   ac_ct_INFOCMP=$INFOCMP
9081   # Extract the first word of "infocmp", so it can be a program name with args.
9082 set dummy infocmp; ac_word=$2
9083 echo "$as_me:9083: checking for $ac_word" >&5
9084 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9085 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9086   echo $ECHO_N "(cached) $ECHO_C" >&6
9087 else
9088   if test -n "$ac_ct_INFOCMP"; then
9089   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9090 else
9091   ac_save_IFS=$IFS; IFS=$ac_path_separator
9092 ac_dummy="$PATH"
9093 for ac_dir in $ac_dummy; do
9094   IFS=$ac_save_IFS
9095   test -z "$ac_dir" && ac_dir=.
9096   $as_executable_p "$ac_dir/$ac_word" || continue
9097 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9098 echo "$as_me:9098: found $ac_dir/$ac_word" >&5
9099 break
9100 done
9101
9102 fi
9103 fi
9104 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9105 if test -n "$ac_ct_INFOCMP"; then
9106   echo "$as_me:9106: result: $ac_ct_INFOCMP" >&5
9107 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9108 else
9109   echo "$as_me:9109: result: no" >&5
9110 echo "${ECHO_T}no" >&6
9111 fi
9112
9113   INFOCMP=$ac_ct_INFOCMP
9114 else
9115   INFOCMP="$ac_cv_prog_INFOCMP"
9116 fi
9117
9118 if test -n "$FALLBACK_LIST"
9119 then
9120
9121 # Check whether --with-tic-path or --without-tic-path was given.
9122 if test "${with_tic_path+set}" = set; then
9123   withval="$with_tic_path"
9124   echo "$as_me:9124: checking for tic program for fallbacks" >&5
9125 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9126                 TIC=$withval
9127                 echo "$as_me:9127: result: $TIC" >&5
9128 echo "${ECHO_T}$TIC" >&6
9129
9130 if test "x$prefix" != xNONE; then
9131         cf_path_syntax="$prefix"
9132 else
9133         cf_path_syntax="$ac_default_prefix"
9134 fi
9135
9136 case ".$TIC" in
9137 (.\$\(*\)*|.\'*\'*)
9138         ;;
9139 (..|./*|.\\*)
9140         ;;
9141 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9142         ;;
9143 (.\$\{*prefix\}*|.\$\{*dir\}*)
9144         eval TIC="$TIC"
9145         case ".$TIC" in
9146         (.NONE/*)
9147                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9148                 ;;
9149         esac
9150         ;;
9151 (.no|.NONE/*)
9152         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9153         ;;
9154 (*)
9155         { { echo "$as_me:9155: error: expected a pathname, not \"$TIC\"" >&5
9156 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9157    { (exit 1); exit 1; }; }
9158         ;;
9159 esac
9160
9161 else
9162
9163 test -z "$TIC" && TIC="tic"
9164 for ac_prog in $TIC tic
9165 do
9166   # Extract the first word of "$ac_prog", so it can be a program name with args.
9167 set dummy $ac_prog; ac_word=$2
9168 echo "$as_me:9168: checking for $ac_word" >&5
9169 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9170 if test "${ac_cv_path_TIC+set}" = set; then
9171   echo $ECHO_N "(cached) $ECHO_C" >&6
9172 else
9173   case $TIC in
9174   [\\/]* | ?:[\\/]*)
9175   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9176   ;;
9177   *)
9178   ac_save_IFS=$IFS; IFS=$ac_path_separator
9179 ac_dummy="$PATH:/usr/local/ncurses/bin"
9180 for ac_dir in $ac_dummy; do
9181   IFS=$ac_save_IFS
9182   test -z "$ac_dir" && ac_dir=.
9183   if $as_executable_p "$ac_dir/$ac_word"; then
9184    ac_cv_path_TIC="$ac_dir/$ac_word"
9185    echo "$as_me:9185: found $ac_dir/$ac_word" >&5
9186    break
9187 fi
9188 done
9189
9190   ;;
9191 esac
9192 fi
9193 TIC=$ac_cv_path_TIC
9194
9195 if test -n "$TIC"; then
9196   echo "$as_me:9196: result: $TIC" >&5
9197 echo "${ECHO_T}$TIC" >&6
9198 else
9199   echo "$as_me:9199: result: no" >&5
9200 echo "${ECHO_T}no" >&6
9201 fi
9202
9203   test -n "$TIC" && break
9204 done
9205 test -n "$TIC" || TIC="$TIC"
9206
9207 cf_path_prog=""
9208 cf_path_args=""
9209 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9210 for cf_temp in $ac_cv_path_TIC
9211 do
9212         if test -z "$cf_path_prog" ; then
9213                 if test "$with_full_paths" = yes ; then
9214
9215 if test "x$prefix" != xNONE; then
9216         cf_path_syntax="$prefix"
9217 else
9218         cf_path_syntax="$ac_default_prefix"
9219 fi
9220
9221 case ".$cf_temp" in
9222 (.\$\(*\)*|.\'*\'*)
9223         ;;
9224 (..|./*|.\\*)
9225         ;;
9226 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9227         ;;
9228 (.\$\{*prefix\}*|.\$\{*dir\}*)
9229         eval cf_temp="$cf_temp"
9230         case ".$cf_temp" in
9231         (.NONE/*)
9232                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9233                 ;;
9234         esac
9235         ;;
9236 (.no|.NONE/*)
9237         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9238         ;;
9239 (*)
9240         break
9241         ;;
9242 esac
9243
9244                         cf_path_prog="$cf_temp"
9245                 else
9246                         cf_path_prog="`basename "$cf_temp"`"
9247                 fi
9248         elif test -z "$cf_path_args" ; then
9249                 cf_path_args="$cf_temp"
9250         else
9251                 cf_path_args="$cf_path_args $cf_temp"
9252         fi
9253 done
9254 IFS="$cf_save_ifs"
9255
9256 if test -n "$cf_path_prog" ; then
9257
9258 echo "${as_me:-configure}:9258: testing defining path for ${cf_path_prog} ..." 1>&5
9259
9260 cat >>confdefs.h <<EOF
9261 #define TIC_PATH "$cf_path_prog"
9262 EOF
9263
9264         test -n "$cf_path_args" &&
9265 cat >>confdefs.h <<EOF
9266 #define TIC_ARGS "$cf_path_args"
9267 EOF
9268
9269 fi
9270
9271                 if test -z "$TIC"
9272                 then
9273                         { echo "$as_me:9273: WARNING: no tic program found for fallbacks" >&5
9274 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9275                 fi
9276
9277 fi;
9278
9279 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9280 if test "${with_infocmp_path+set}" = set; then
9281   withval="$with_infocmp_path"
9282   echo "$as_me:9282: checking for infocmp program for fallbacks" >&5
9283 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9284                 INFOCMP=$withval
9285                 echo "$as_me:9285: result: $INFOCMP" >&5
9286 echo "${ECHO_T}$INFOCMP" >&6
9287
9288 if test "x$prefix" != xNONE; then
9289         cf_path_syntax="$prefix"
9290 else
9291         cf_path_syntax="$ac_default_prefix"
9292 fi
9293
9294 case ".$INFOCMP" in
9295 (.\$\(*\)*|.\'*\'*)
9296         ;;
9297 (..|./*|.\\*)
9298         ;;
9299 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9300         ;;
9301 (.\$\{*prefix\}*|.\$\{*dir\}*)
9302         eval INFOCMP="$INFOCMP"
9303         case ".$INFOCMP" in
9304         (.NONE/*)
9305                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9306                 ;;
9307         esac
9308         ;;
9309 (.no|.NONE/*)
9310         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9311         ;;
9312 (*)
9313         { { echo "$as_me:9313: error: expected a pathname, not \"$INFOCMP\"" >&5
9314 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9315    { (exit 1); exit 1; }; }
9316         ;;
9317 esac
9318
9319 else
9320
9321 test -z "$INFOCMP" && INFOCMP="infocmp"
9322 for ac_prog in $INFOCMP infocmp
9323 do
9324   # Extract the first word of "$ac_prog", so it can be a program name with args.
9325 set dummy $ac_prog; ac_word=$2
9326 echo "$as_me:9326: checking for $ac_word" >&5
9327 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9328 if test "${ac_cv_path_INFOCMP+set}" = set; then
9329   echo $ECHO_N "(cached) $ECHO_C" >&6
9330 else
9331   case $INFOCMP in
9332   [\\/]* | ?:[\\/]*)
9333   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9334   ;;
9335   *)
9336   ac_save_IFS=$IFS; IFS=$ac_path_separator
9337 ac_dummy="$PATH:/usr/local/ncurses/bin"
9338 for ac_dir in $ac_dummy; do
9339   IFS=$ac_save_IFS
9340   test -z "$ac_dir" && ac_dir=.
9341   if $as_executable_p "$ac_dir/$ac_word"; then
9342    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9343    echo "$as_me:9343: found $ac_dir/$ac_word" >&5
9344    break
9345 fi
9346 done
9347
9348   ;;
9349 esac
9350 fi
9351 INFOCMP=$ac_cv_path_INFOCMP
9352
9353 if test -n "$INFOCMP"; then
9354   echo "$as_me:9354: result: $INFOCMP" >&5
9355 echo "${ECHO_T}$INFOCMP" >&6
9356 else
9357   echo "$as_me:9357: result: no" >&5
9358 echo "${ECHO_T}no" >&6
9359 fi
9360
9361   test -n "$INFOCMP" && break
9362 done
9363 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9364
9365 cf_path_prog=""
9366 cf_path_args=""
9367 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9368 for cf_temp in $ac_cv_path_INFOCMP
9369 do
9370         if test -z "$cf_path_prog" ; then
9371                 if test "$with_full_paths" = yes ; then
9372
9373 if test "x$prefix" != xNONE; then
9374         cf_path_syntax="$prefix"
9375 else
9376         cf_path_syntax="$ac_default_prefix"
9377 fi
9378
9379 case ".$cf_temp" in
9380 (.\$\(*\)*|.\'*\'*)
9381         ;;
9382 (..|./*|.\\*)
9383         ;;
9384 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9385         ;;
9386 (.\$\{*prefix\}*|.\$\{*dir\}*)
9387         eval cf_temp="$cf_temp"
9388         case ".$cf_temp" in
9389         (.NONE/*)
9390                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9391                 ;;
9392         esac
9393         ;;
9394 (.no|.NONE/*)
9395         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9396         ;;
9397 (*)
9398         break
9399         ;;
9400 esac
9401
9402                         cf_path_prog="$cf_temp"
9403                 else
9404                         cf_path_prog="`basename "$cf_temp"`"
9405                 fi
9406         elif test -z "$cf_path_args" ; then
9407                 cf_path_args="$cf_temp"
9408         else
9409                 cf_path_args="$cf_path_args $cf_temp"
9410         fi
9411 done
9412 IFS="$cf_save_ifs"
9413
9414 if test -n "$cf_path_prog" ; then
9415
9416 echo "${as_me:-configure}:9416: testing defining path for ${cf_path_prog} ..." 1>&5
9417
9418 cat >>confdefs.h <<EOF
9419 #define INFOCMP_PATH "$cf_path_prog"
9420 EOF
9421
9422         test -n "$cf_path_args" &&
9423 cat >>confdefs.h <<EOF
9424 #define INFOCMP_ARGS "$cf_path_args"
9425 EOF
9426
9427 fi
9428
9429                 if test -z "$INFOCMP"
9430                 then
9431                         { echo "$as_me:9431: WARNING: no infocmp program found for fallbacks" >&5
9432 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9433                 fi
9434
9435 fi;
9436
9437         test -z "$TIC" && FALLBACK_LIST=
9438         test -z "$INFOCMP" && FALLBACK_LIST=
9439         if test -z "$FALLBACK_LIST"
9440         then
9441                 { echo "$as_me:9441: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9442 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9443         fi
9444 fi
9445
9446 USE_FALLBACKS=
9447 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9448
9449 echo "$as_me:9449: checking if you want modern xterm or antique" >&5
9450 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9451
9452 # Check whether --with-xterm-new or --without-xterm-new was given.
9453 if test "${with_xterm_new+set}" = set; then
9454   withval="$with_xterm_new"
9455   with_xterm_new=$withval
9456 else
9457   with_xterm_new=yes
9458 fi;
9459 case "$with_xterm_new" in
9460 (no) with_xterm_new=xterm-old;;
9461 (*)      with_xterm_new=xterm-new;;
9462 esac
9463 echo "$as_me:9463: result: $with_xterm_new" >&5
9464 echo "${ECHO_T}$with_xterm_new" >&6
9465 WHICH_XTERM=$with_xterm_new
9466
9467 case $host_os in
9468 (*linux-gnu|*cygwin|*mingw32|*msys)
9469         want_xterm_kbs=DEL
9470         ;;
9471 (*)
9472         want_xterm_kbs=BS
9473         ;;
9474 esac
9475
9476 echo "$as_me:9476: checking if xterm backspace sends BS or DEL" >&5
9477 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9478
9479 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9480 if test "${with_xterm_kbs+set}" = set; then
9481   withval="$with_xterm_kbs"
9482   with_xterm_kbs=$withval
9483 else
9484   with_xterm_kbs=auto
9485 fi;
9486 case x$with_xterm_kbs in
9487 (xyes|xno|xBS|xbs|x8)
9488         with_xterm_kbs=BS
9489         ;;
9490 (xDEL|xdel|x127)
9491         with_xterm_kbs=DEL
9492         ;;
9493 (xauto)
9494         with_xterm_kbs=$want_xterm_kbs
9495         ;;
9496 (*)
9497         with_xterm_kbs=$withval
9498         ;;
9499 esac
9500 echo "$as_me:9500: result: $with_xterm_kbs" >&5
9501 echo "${ECHO_T}$with_xterm_kbs" >&6
9502 XTERM_KBS=$with_xterm_kbs
9503
9504 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9505 then
9506         { echo "$as_me:9506: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9507 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9508 fi
9509
9510 MAKE_TERMINFO=
9511 if test "$use_database" = no ; then
9512         TERMINFO="${datadir}/terminfo"
9513         MAKE_TERMINFO="#"
9514 else
9515
9516 echo "$as_me:9516: checking for list of terminfo directories" >&5
9517 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9518
9519 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9520 if test "${with_terminfo_dirs+set}" = set; then
9521   withval="$with_terminfo_dirs"
9522
9523 else
9524   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9525 fi;
9526 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9527 cf_dst_path=
9528 for cf_src_path in $withval
9529 do
9530
9531 if test "x$prefix" != xNONE; then
9532         cf_path_syntax="$prefix"
9533 else
9534         cf_path_syntax="$ac_default_prefix"
9535 fi
9536
9537 case ".$cf_src_path" in
9538 (.\$\(*\)*|.\'*\'*)
9539         ;;
9540 (..|./*|.\\*)
9541         ;;
9542 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9543         ;;
9544 (.\$\{*prefix\}*|.\$\{*dir\}*)
9545         eval cf_src_path="$cf_src_path"
9546         case ".$cf_src_path" in
9547         (.NONE/*)
9548                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9549                 ;;
9550         esac
9551         ;;
9552 (.no|.NONE/*)
9553         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9554         ;;
9555 (*)
9556         { { echo "$as_me:9556: error: expected a pathname, not \"$cf_src_path\"" >&5
9557 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9558    { (exit 1); exit 1; }; }
9559         ;;
9560 esac
9561
9562   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9563   cf_dst_path="${cf_dst_path}${cf_src_path}"
9564 done
9565 IFS="$ac_save_ifs"
9566
9567 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9568 # so we have to check/work around.  We do prefer the result of "eval"...
9569 eval cf_dst_eval="$cf_dst_path"
9570 case "x$cf_dst_eval" in
9571 (xNONE*)
9572         TERMINFO_DIRS=$cf_dst_path
9573         ;;
9574 (*)
9575         TERMINFO_DIRS="$cf_dst_eval"
9576         ;;
9577 esac
9578
9579 echo "$as_me:9579: result: $TERMINFO_DIRS" >&5
9580 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9581 test -n "$TERMINFO_DIRS" &&
9582 cat >>confdefs.h <<EOF
9583 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9584 EOF
9585
9586 case "x$TERMINFO" in
9587 x???:*)
9588         { echo "$as_me:9588: WARNING: ignoring non-directory/file TERMINFO value" >&5
9589 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9590         unset TERMINFO
9591         ;;
9592 esac
9593
9594 echo "$as_me:9594: checking for default terminfo directory" >&5
9595 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9596
9597 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9598 if test "${with_default_terminfo_dir+set}" = set; then
9599   withval="$with_default_terminfo_dir"
9600
9601 else
9602   withval="${TERMINFO:-${datadir}/terminfo}"
9603 fi; if test -n "${datadir}/terminfo" ; then
9604
9605 if test "x$prefix" != xNONE; then
9606         cf_path_syntax="$prefix"
9607 else
9608         cf_path_syntax="$ac_default_prefix"
9609 fi
9610
9611 case ".$withval" in
9612 (.\$\(*\)*|.\'*\'*)
9613         ;;
9614 (..|./*|.\\*)
9615         ;;
9616 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9617         ;;
9618 (.\$\{*prefix\}*|.\$\{*dir\}*)
9619         eval withval="$withval"
9620         case ".$withval" in
9621         (.NONE/*)
9622                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9623                 ;;
9624         esac
9625         ;;
9626 (.no|.NONE/*)
9627         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9628         ;;
9629 (*)
9630         { { echo "$as_me:9630: error: expected a pathname, not \"$withval\"" >&5
9631 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9632    { (exit 1); exit 1; }; }
9633         ;;
9634 esac
9635
9636 fi
9637 eval TERMINFO="$withval"
9638
9639 echo "$as_me:9639: result: $TERMINFO" >&5
9640 echo "${ECHO_T}$TERMINFO" >&6
9641
9642 cat >>confdefs.h <<EOF
9643 #define TERMINFO "$TERMINFO"
9644 EOF
9645
9646 fi
9647
9648 ###     use option --disable-big-core to make tic run on small machines
9649 ###     We need 4Mb, check if we can allocate 50% more than that.
9650 echo "$as_me:9650: checking if big-core option selected" >&5
9651 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9652
9653 # Check whether --enable-big-core or --disable-big-core was given.
9654 if test "${enable_big_core+set}" = set; then
9655   enableval="$enable_big_core"
9656   with_big_core=$enableval
9657 else
9658   if test "$cross_compiling" = yes; then
9659   with_big_core=no
9660 else
9661   cat >"conftest.$ac_ext" <<_ACEOF
9662 #line 9662 "configure"
9663 #include "confdefs.h"
9664
9665 #include <stdlib.h>
9666 #include <string.h>
9667 int main() {
9668         unsigned long n = 6000000L;
9669         char *s = malloc(n);
9670         if (s != 0)
9671                 s[0] = s[n-1] = 0;
9672         ${cf_cv_main_return:-return}(s == 0);
9673 }
9674 _ACEOF
9675 rm -f "conftest$ac_exeext"
9676 if { (eval echo "$as_me:9676: \"$ac_link\"") >&5
9677   (eval $ac_link) 2>&5
9678   ac_status=$?
9679   echo "$as_me:9679: \$? = $ac_status" >&5
9680   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9681   { (eval echo "$as_me:9681: \"$ac_try\"") >&5
9682   (eval $ac_try) 2>&5
9683   ac_status=$?
9684   echo "$as_me:9684: \$? = $ac_status" >&5
9685   (exit "$ac_status"); }; }; then
9686   with_big_core=yes
9687 else
9688   echo "$as_me: program exited with status $ac_status" >&5
9689 echo "$as_me: failed program was:" >&5
9690 cat "conftest.$ac_ext" >&5
9691 with_big_core=no
9692 fi
9693 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9694 fi
9695 fi;
9696 echo "$as_me:9696: result: $with_big_core" >&5
9697 echo "${ECHO_T}$with_big_core" >&6
9698 test "x$with_big_core" = "xyes" &&
9699 cat >>confdefs.h <<\EOF
9700 #define HAVE_BIG_CORE 1
9701 EOF
9702
9703 ### ISO C only guarantees 512-char strings, we have tables which load faster
9704 ### when constructed using "big" strings.  More than the C compiler, the awk
9705 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9706 echo "$as_me:9706: checking if big-strings option selected" >&5
9707 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9708
9709 # Check whether --enable-big-strings or --disable-big-strings was given.
9710 if test "${enable_big_strings+set}" = set; then
9711   enableval="$enable_big_strings"
9712   with_big_strings=$enableval
9713 else
9714
9715         case x$AWK in
9716         (x)
9717                 eval with_big_strings=no
9718                 ;;
9719         (*)
9720                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9721                         | $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
9722                         eval with_big_strings=yes
9723                 else
9724                         eval with_big_strings=no
9725                 fi
9726                 ;;
9727         esac
9728
9729 fi;
9730 echo "$as_me:9730: result: $with_big_strings" >&5
9731 echo "${ECHO_T}$with_big_strings" >&6
9732
9733 USE_BIG_STRINGS=0
9734 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9735
9736 ###     use option --enable-termcap to compile in the termcap fallback support
9737 echo "$as_me:9737: checking if you want termcap-fallback support" >&5
9738 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9739
9740 # Check whether --enable-termcap or --disable-termcap was given.
9741 if test "${enable_termcap+set}" = set; then
9742   enableval="$enable_termcap"
9743   with_termcap=$enableval
9744 else
9745   with_termcap=no
9746 fi;
9747 echo "$as_me:9747: result: $with_termcap" >&5
9748 echo "${ECHO_T}$with_termcap" >&6
9749
9750 NCURSES_USE_TERMCAP=0
9751 if test "x$with_termcap" != "xyes" ; then
9752         if test "$use_database" = no ; then
9753                 if test -z "$with_fallback" ; then
9754                         { { echo "$as_me:9754: error: You have disabled the database w/o specifying fallbacks" >&5
9755 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9756    { (exit 1); exit 1; }; }
9757                 fi
9758         fi
9759
9760 cat >>confdefs.h <<\EOF
9761 #define PURE_TERMINFO 1
9762 EOF
9763
9764 else
9765
9766         if test "$with_ticlib" != no ; then
9767                 { { echo "$as_me:9767: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9768 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9769    { (exit 1); exit 1; }; }
9770         fi
9771
9772         NCURSES_USE_TERMCAP=1
9773         echo "$as_me:9773: checking for list of termcap files" >&5
9774 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9775
9776 # Check whether --with-termpath or --without-termpath was given.
9777 if test "${with_termpath+set}" = set; then
9778   withval="$with_termpath"
9779
9780 else
9781   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9782 fi;
9783 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9784 cf_dst_path=
9785 for cf_src_path in $withval
9786 do
9787
9788 if test "x$prefix" != xNONE; then
9789         cf_path_syntax="$prefix"
9790 else
9791         cf_path_syntax="$ac_default_prefix"
9792 fi
9793
9794 case ".$cf_src_path" in
9795 (.\$\(*\)*|.\'*\'*)
9796         ;;
9797 (..|./*|.\\*)
9798         ;;
9799 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9800         ;;
9801 (.\$\{*prefix\}*|.\$\{*dir\}*)
9802         eval cf_src_path="$cf_src_path"
9803         case ".$cf_src_path" in
9804         (.NONE/*)
9805                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9806                 ;;
9807         esac
9808         ;;
9809 (.no|.NONE/*)
9810         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9811         ;;
9812 (*)
9813         { { echo "$as_me:9813: error: expected a pathname, not \"$cf_src_path\"" >&5
9814 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9815    { (exit 1); exit 1; }; }
9816         ;;
9817 esac
9818
9819   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9820   cf_dst_path="${cf_dst_path}${cf_src_path}"
9821 done
9822 IFS="$ac_save_ifs"
9823
9824 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9825 # so we have to check/work around.  We do prefer the result of "eval"...
9826 eval cf_dst_eval="$cf_dst_path"
9827 case "x$cf_dst_eval" in
9828 (xNONE*)
9829         TERMPATH=$cf_dst_path
9830         ;;
9831 (*)
9832         TERMPATH="$cf_dst_eval"
9833         ;;
9834 esac
9835
9836         echo "$as_me:9836: result: $TERMPATH" >&5
9837 echo "${ECHO_T}$TERMPATH" >&6
9838         test -n "$TERMPATH" &&
9839 cat >>confdefs.h <<EOF
9840 #define TERMPATH "$TERMPATH"
9841 EOF
9842
9843         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9844         echo "$as_me:9844: checking if fast termcap-loader is needed" >&5
9845 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9846
9847 # Check whether --enable-getcap or --disable-getcap was given.
9848 if test "${enable_getcap+set}" = set; then
9849   enableval="$enable_getcap"
9850   with_getcap=$enableval
9851 else
9852   with_getcap=no
9853 fi;
9854         echo "$as_me:9854: result: $with_getcap" >&5
9855 echo "${ECHO_T}$with_getcap" >&6
9856         test "x$with_getcap" = "xyes" &&
9857 cat >>confdefs.h <<\EOF
9858 #define USE_GETCAP 1
9859 EOF
9860
9861         echo "$as_me:9861: checking if translated termcaps will be cached in ~/.terminfo" >&5
9862 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9863
9864 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9865 if test "${enable_getcap_cache+set}" = set; then
9866   enableval="$enable_getcap_cache"
9867   with_getcap_cache=$enableval
9868 else
9869   with_getcap_cache=no
9870 fi;
9871         echo "$as_me:9871: result: $with_getcap_cache" >&5
9872 echo "${ECHO_T}$with_getcap_cache" >&6
9873         test "x$with_getcap_cache" = "xyes" &&
9874 cat >>confdefs.h <<\EOF
9875 #define USE_GETCAP_CACHE 1
9876 EOF
9877
9878 fi
9879
9880 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9881 echo "$as_me:9881: checking if ~/.terminfo is wanted" >&5
9882 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9883
9884 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9885 if test "${enable_home_terminfo+set}" = set; then
9886   enableval="$enable_home_terminfo"
9887   with_home_terminfo=$enableval
9888 else
9889   with_home_terminfo=yes
9890 fi;
9891 echo "$as_me:9891: result: $with_home_terminfo" >&5
9892 echo "${ECHO_T}$with_home_terminfo" >&6
9893 test "x$with_home_terminfo" = "xyes" &&
9894 cat >>confdefs.h <<\EOF
9895 #define USE_HOME_TERMINFO 1
9896 EOF
9897
9898 echo "$as_me:9898: checking if you want to permit root to use ncurses environment variables" >&5
9899 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9900
9901 # Check whether --enable-root-environ or --disable-root-environ was given.
9902 if test "${enable_root_environ+set}" = set; then
9903   enableval="$enable_root_environ"
9904   with_root_environ=$enableval
9905 else
9906   with_root_environ=yes
9907 fi;
9908 echo "$as_me:9908: result: $with_root_environ" >&5
9909 echo "${ECHO_T}$with_root_environ" >&6
9910 test "x$with_root_environ" = xyes &&
9911 cat >>confdefs.h <<\EOF
9912 #define USE_ROOT_ENVIRON 1
9913 EOF
9914
9915 echo "$as_me:9915: checking if you want to permit setuid programs to access all files" >&5
9916 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9917
9918 # Check whether --enable-root-access or --disable-root-access was given.
9919 if test "${enable_root_access+set}" = set; then
9920   enableval="$enable_root_access"
9921   with_root_access=$enableval
9922 else
9923   with_root_access=yes
9924 fi;
9925 echo "$as_me:9925: result: $with_root_access" >&5
9926 echo "${ECHO_T}$with_root_access" >&6
9927 test "x$with_root_access" = xyes &&
9928 cat >>confdefs.h <<\EOF
9929 #define USE_ROOT_ACCESS 1
9930 EOF
9931
9932 echo "$as_me:9932: checking if you want to permit setuid use of ncurses environment variables" >&5
9933 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9934
9935 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9936 if test "${enable_setuid_environ+set}" = set; then
9937   enableval="$enable_setuid_environ"
9938   with_setuid_environ=$enableval
9939 else
9940   with_setuid_environ=$with_root_environ
9941 fi;
9942 echo "$as_me:9942: result: $with_setuid_environ" >&5
9943 echo "${ECHO_T}$with_setuid_environ" >&6
9944 test "x$with_setuid_environ" = xyes &&
9945 cat >>confdefs.h <<\EOF
9946 #define USE_SETUID_ENVIRON 1
9947 EOF
9948
9949 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9950 ###   to reduce storage requirements for the terminfo database.
9951
9952 for ac_header in \
9953 unistd.h \
9954
9955 do
9956 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9957 echo "$as_me:9957: checking for $ac_header" >&5
9958 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9959 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9960   echo $ECHO_N "(cached) $ECHO_C" >&6
9961 else
9962   cat >"conftest.$ac_ext" <<_ACEOF
9963 #line 9963 "configure"
9964 #include "confdefs.h"
9965 #include <$ac_header>
9966 _ACEOF
9967 if { (eval echo "$as_me:9967: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9968   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9969   ac_status=$?
9970   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9971   rm -f conftest.er1
9972   cat conftest.err >&5
9973   echo "$as_me:9973: \$? = $ac_status" >&5
9974   (exit "$ac_status"); } >/dev/null; then
9975   if test -s conftest.err; then
9976     ac_cpp_err=$ac_c_preproc_warn_flag
9977   else
9978     ac_cpp_err=
9979   fi
9980 else
9981   ac_cpp_err=yes
9982 fi
9983 if test -z "$ac_cpp_err"; then
9984   eval "$as_ac_Header=yes"
9985 else
9986   echo "$as_me: failed program was:" >&5
9987   cat "conftest.$ac_ext" >&5
9988   eval "$as_ac_Header=no"
9989 fi
9990 rm -f conftest.err "conftest.$ac_ext"
9991 fi
9992 echo "$as_me:9992: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9993 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9994 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9995   cat >>confdefs.h <<EOF
9996 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9997 EOF
9998
9999 fi
10000 done
10001
10002 for ac_func in \
10003         remove \
10004         unlink
10005 do
10006 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10007 echo "$as_me:10007: checking for $ac_func" >&5
10008 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10009 if eval "test \"\${$as_ac_var+set}\" = set"; then
10010   echo $ECHO_N "(cached) $ECHO_C" >&6
10011 else
10012   cat >"conftest.$ac_ext" <<_ACEOF
10013 #line 10013 "configure"
10014 #include "confdefs.h"
10015 #define $ac_func autoconf_temporary
10016 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10017 #undef $ac_func
10018
10019 #ifdef __cplusplus
10020 extern "C"
10021 #endif
10022
10023 /* We use char because int might match the return type of a gcc2
10024    builtin and then its argument prototype would still apply.  */
10025 char $ac_func (void);
10026
10027 int
10028 main (void)
10029 {
10030
10031 /* The GNU C library defines stubs for functions which it implements
10032     to always fail with ENOSYS.  Some functions are actually named
10033     something starting with __ and the normal name is an alias.  */
10034 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10035 #error found stub for $ac_func
10036 #endif
10037
10038         return $ac_func ();
10039   ;
10040   return 0;
10041 }
10042 _ACEOF
10043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10044 if { (eval echo "$as_me:10044: \"$ac_link\"") >&5
10045   (eval $ac_link) 2>&5
10046   ac_status=$?
10047   echo "$as_me:10047: \$? = $ac_status" >&5
10048   (exit "$ac_status"); } &&
10049          { ac_try='test -s "conftest$ac_exeext"'
10050   { (eval echo "$as_me:10050: \"$ac_try\"") >&5
10051   (eval $ac_try) 2>&5
10052   ac_status=$?
10053   echo "$as_me:10053: \$? = $ac_status" >&5
10054   (exit "$ac_status"); }; }; then
10055   eval "$as_ac_var=yes"
10056 else
10057   echo "$as_me: failed program was:" >&5
10058 cat "conftest.$ac_ext" >&5
10059 eval "$as_ac_var=no"
10060 fi
10061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10062 fi
10063 echo "$as_me:10063: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10064 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10065 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10066   cat >>confdefs.h <<EOF
10067 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10068 EOF
10069
10070 fi
10071 done
10072
10073 if test "$cross_compiling" = yes ; then
10074
10075 for ac_func in \
10076                 link \
10077                 symlink
10078 do
10079 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10080 echo "$as_me:10080: checking for $ac_func" >&5
10081 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10082 if eval "test \"\${$as_ac_var+set}\" = set"; then
10083   echo $ECHO_N "(cached) $ECHO_C" >&6
10084 else
10085   cat >"conftest.$ac_ext" <<_ACEOF
10086 #line 10086 "configure"
10087 #include "confdefs.h"
10088 #define $ac_func autoconf_temporary
10089 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10090 #undef $ac_func
10091
10092 #ifdef __cplusplus
10093 extern "C"
10094 #endif
10095
10096 /* We use char because int might match the return type of a gcc2
10097    builtin and then its argument prototype would still apply.  */
10098 char $ac_func (void);
10099
10100 int
10101 main (void)
10102 {
10103
10104 /* The GNU C library defines stubs for functions which it implements
10105     to always fail with ENOSYS.  Some functions are actually named
10106     something starting with __ and the normal name is an alias.  */
10107 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10108 #error found stub for $ac_func
10109 #endif
10110
10111         return $ac_func ();
10112   ;
10113   return 0;
10114 }
10115 _ACEOF
10116 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10117 if { (eval echo "$as_me:10117: \"$ac_link\"") >&5
10118   (eval $ac_link) 2>&5
10119   ac_status=$?
10120   echo "$as_me:10120: \$? = $ac_status" >&5
10121   (exit "$ac_status"); } &&
10122          { ac_try='test -s "conftest$ac_exeext"'
10123   { (eval echo "$as_me:10123: \"$ac_try\"") >&5
10124   (eval $ac_try) 2>&5
10125   ac_status=$?
10126   echo "$as_me:10126: \$? = $ac_status" >&5
10127   (exit "$ac_status"); }; }; then
10128   eval "$as_ac_var=yes"
10129 else
10130   echo "$as_me: failed program was:" >&5
10131 cat "conftest.$ac_ext" >&5
10132 eval "$as_ac_var=no"
10133 fi
10134 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10135 fi
10136 echo "$as_me:10136: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10137 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10138 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10139   cat >>confdefs.h <<EOF
10140 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10141 EOF
10142
10143 fi
10144 done
10145
10146 else
10147         echo "$as_me:10147: checking if link/symlink functions work" >&5
10148 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10149 if test "${cf_cv_link_funcs+set}" = set; then
10150   echo $ECHO_N "(cached) $ECHO_C" >&6
10151 else
10152
10153                 cf_cv_link_funcs=
10154                 for cf_func in link symlink ; do
10155                         if test "$cross_compiling" = yes; then
10156
10157                         eval 'ac_cv_func_'$cf_func'=error'
10158 else
10159   cat >"conftest.$ac_ext" <<_ACEOF
10160 #line 10160 "configure"
10161 #include "confdefs.h"
10162
10163 $ac_includes_default
10164
10165 int main(void)
10166 {
10167         int fail = 0;
10168         char *src = "conftest.tmp";
10169         char *dst = "conftest.chk";
10170         struct stat src_sb, dst_sb;
10171         FILE *fp = fopen(src, "w");
10172         if (fp == 0) { fail = 3; } else {
10173                 fclose(fp); stat(src, &src_sb);
10174                 if ($cf_func(src, dst) < 0) {
10175                         fail = 1;
10176                 } else if (stat(dst, &dst_sb) < 0) {
10177                         fail = 2;
10178                 } else {
10179                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10180                         if (diff < 0) diff = -diff;
10181                         if (diff > 2) fail = 3;
10182                 }
10183         }
10184 #ifdef HAVE_UNLINK
10185         unlink(dst); unlink(src);
10186 #else
10187         remove(dst); remove(src);
10188 #endif
10189         ${cf_cv_main_return:-return} (fail);
10190 }
10191
10192 _ACEOF
10193 rm -f "conftest$ac_exeext"
10194 if { (eval echo "$as_me:10194: \"$ac_link\"") >&5
10195   (eval $ac_link) 2>&5
10196   ac_status=$?
10197   echo "$as_me:10197: \$? = $ac_status" >&5
10198   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10199   { (eval echo "$as_me:10199: \"$ac_try\"") >&5
10200   (eval $ac_try) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit "$ac_status"); }; }; then
10204
10205                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10206                         eval 'ac_cv_func_'$cf_func'=yes'
10207 else
10208   echo "$as_me: program exited with status $ac_status" >&5
10209 echo "$as_me: failed program was:" >&5
10210 cat "conftest.$ac_ext" >&5
10211
10212                         eval 'ac_cv_func_'$cf_func'=no'
10213 fi
10214 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10215 fi
10216                 done
10217                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10218
10219 fi
10220 echo "$as_me:10220: result: $cf_cv_link_funcs" >&5
10221 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10222         test "$ac_cv_func_link"    = yes &&
10223 cat >>confdefs.h <<\EOF
10224 #define HAVE_LINK 1
10225 EOF
10226
10227         test "$ac_cv_func_symlink" = yes &&
10228 cat >>confdefs.h <<\EOF
10229 #define HAVE_SYMLINK 1
10230 EOF
10231
10232 fi
10233
10234 with_links=no
10235 with_symlinks=no
10236
10237 # soft links (symbolic links) are useful for some systems where hard links do
10238 # not work, or to make it simpler to copy terminfo trees around.
10239 if test "x$ac_cv_func_symlink" = xyes ; then
10240         echo "$as_me:10240: checking if tic should use symbolic links" >&5
10241 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10242
10243 # Check whether --enable-symlinks or --disable-symlinks was given.
10244 if test "${enable_symlinks+set}" = set; then
10245   enableval="$enable_symlinks"
10246   with_symlinks=$enableval
10247 else
10248   with_symlinks=no
10249 fi;
10250         echo "$as_me:10250: result: $with_symlinks" >&5
10251 echo "${ECHO_T}$with_symlinks" >&6
10252 fi
10253
10254 # If we have hard links and did not choose to use soft links instead, there is
10255 # no reason to make this choice optional - use the hard links.
10256 if test "$with_symlinks" = no ; then
10257         echo "$as_me:10257: checking if tic should use hard links" >&5
10258 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10259         if test "x$ac_cv_func_link" = xyes ; then
10260                 with_links=yes
10261         else
10262                 with_links=no
10263         fi
10264         echo "$as_me:10264: result: $with_links" >&5
10265 echo "${ECHO_T}$with_links" >&6
10266 fi
10267
10268 test "x$with_links" = xyes &&
10269 cat >>confdefs.h <<\EOF
10270 #define USE_LINKS 1
10271 EOF
10272
10273 test "x$with_symlinks" = xyes &&
10274 cat >>confdefs.h <<\EOF
10275 #define USE_SYMLINKS 1
10276 EOF
10277
10278 ###   use option --enable-broken-linker to force on use of broken-linker support
10279
10280 echo "$as_me:10280: checking if you want broken-linker support code" >&5
10281 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10282
10283 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10284 if test "${enable_broken_linker+set}" = set; then
10285   enableval="$enable_broken_linker"
10286   with_broken_linker=$enableval
10287 else
10288   with_broken_linker=no
10289 fi;
10290 echo "$as_me:10290: result: $with_broken_linker" >&5
10291 echo "${ECHO_T}$with_broken_linker" >&6
10292
10293 : "${BROKEN_LINKER:=0}"
10294 if test "x$with_broken_linker" = xyes ; then
10295
10296 cat >>confdefs.h <<\EOF
10297 #define BROKEN_LINKER 1
10298 EOF
10299
10300         BROKEN_LINKER=1
10301 fi
10302
10303 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10304 echo "$as_me:10304: checking if tputs should process BSD-style prefix padding" >&5
10305 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10306
10307 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10308 if test "${enable_bsdpad+set}" = set; then
10309   enableval="$enable_bsdpad"
10310   with_bsdpad=$enableval
10311 else
10312   with_bsdpad=no
10313 fi;
10314 echo "$as_me:10314: result: $with_bsdpad" >&5
10315 echo "${ECHO_T}$with_bsdpad" >&6
10316 test "x$with_bsdpad" = xyes &&
10317 cat >>confdefs.h <<\EOF
10318 #define BSD_TPUTS 1
10319 EOF
10320
10321 ###   use option --enable-widec to turn on use of wide-character support
10322 NCURSES_CH_T=chtype
10323 NCURSES_LIBUTF8=0
10324
10325 NEED_WCHAR_H=0
10326 NCURSES_MBSTATE_T=0
10327 NCURSES_WCHAR_T=0
10328 NCURSES_WINT_T=0
10329
10330 # Check to define _XOPEN_SOURCE "automatically"
10331 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10332
10333 echo "$as_me:10333: checking if the POSIX test-macros are already defined" >&5
10334 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10335 if test "${cf_cv_posix_visible+set}" = set; then
10336   echo $ECHO_N "(cached) $ECHO_C" >&6
10337 else
10338
10339 cat >"conftest.$ac_ext" <<_ACEOF
10340 #line 10340 "configure"
10341 #include "confdefs.h"
10342 #include <stdio.h>
10343 int
10344 main (void)
10345 {
10346
10347 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10348         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10349         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10350         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10351 #error conflicting symbols found
10352 #endif
10353
10354   ;
10355   return 0;
10356 }
10357 _ACEOF
10358 rm -f "conftest.$ac_objext"
10359 if { (eval echo "$as_me:10359: \"$ac_compile\"") >&5
10360   (eval $ac_compile) 2>&5
10361   ac_status=$?
10362   echo "$as_me:10362: \$? = $ac_status" >&5
10363   (exit "$ac_status"); } &&
10364          { ac_try='test -s "conftest.$ac_objext"'
10365   { (eval echo "$as_me:10365: \"$ac_try\"") >&5
10366   (eval $ac_try) 2>&5
10367   ac_status=$?
10368   echo "$as_me:10368: \$? = $ac_status" >&5
10369   (exit "$ac_status"); }; }; then
10370   cf_cv_posix_visible=no
10371 else
10372   echo "$as_me: failed program was:" >&5
10373 cat "conftest.$ac_ext" >&5
10374 cf_cv_posix_visible=yes
10375 fi
10376 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10377
10378 fi
10379 echo "$as_me:10379: result: $cf_cv_posix_visible" >&5
10380 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10381
10382 if test "$cf_cv_posix_visible" = no; then
10383
10384 cf_XOPEN_SOURCE=600
10385 cf_POSIX_C_SOURCE=199506L
10386 cf_xopen_source=
10387
10388 case "$host_os" in
10389 (aix[4-7]*)
10390         cf_xopen_source="-D_ALL_SOURCE"
10391         ;;
10392 (darwin[0-8].*)
10393         cf_xopen_source="-D_APPLE_C_SOURCE"
10394         ;;
10395 (darwin*)
10396         cf_xopen_source="-D_DARWIN_C_SOURCE"
10397         cf_XOPEN_SOURCE=
10398         ;;
10399 (freebsd*|dragonfly*|midnightbsd*)
10400         # 5.x headers associate
10401         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10402         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10403         cf_POSIX_C_SOURCE=200112L
10404         cf_XOPEN_SOURCE=600
10405         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10406         ;;
10407 (hpux11*)
10408         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10409         ;;
10410 (hpux*)
10411         cf_xopen_source="-D_HPUX_SOURCE"
10412         ;;
10413 (irix[56].*)
10414         cf_xopen_source="-D_SGI_SOURCE"
10415         cf_XOPEN_SOURCE=
10416         ;;
10417 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*)
10418
10419 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10420
10421 echo "$as_me:10421: checking if this is the GNU C library" >&5
10422 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10423 if test "${cf_cv_gnu_library+set}" = set; then
10424   echo $ECHO_N "(cached) $ECHO_C" >&6
10425 else
10426
10427 cat >"conftest.$ac_ext" <<_ACEOF
10428 #line 10428 "configure"
10429 #include "confdefs.h"
10430 #include <sys/types.h>
10431 int
10432 main (void)
10433 {
10434
10435         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10436                 return 0;
10437         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10438                 return 0;
10439         #else
10440         #       error not GNU C library
10441         #endif
10442   ;
10443   return 0;
10444 }
10445 _ACEOF
10446 rm -f "conftest.$ac_objext"
10447 if { (eval echo "$as_me:10447: \"$ac_compile\"") >&5
10448   (eval $ac_compile) 2>&5
10449   ac_status=$?
10450   echo "$as_me:10450: \$? = $ac_status" >&5
10451   (exit "$ac_status"); } &&
10452          { ac_try='test -s "conftest.$ac_objext"'
10453   { (eval echo "$as_me:10453: \"$ac_try\"") >&5
10454   (eval $ac_try) 2>&5
10455   ac_status=$?
10456   echo "$as_me:10456: \$? = $ac_status" >&5
10457   (exit "$ac_status"); }; }; then
10458   cf_cv_gnu_library=yes
10459 else
10460   echo "$as_me: failed program was:" >&5
10461 cat "conftest.$ac_ext" >&5
10462 cf_cv_gnu_library=no
10463 fi
10464 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10465
10466 fi
10467 echo "$as_me:10467: result: $cf_cv_gnu_library" >&5
10468 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10469
10470 if test x$cf_cv_gnu_library = xyes; then
10471
10472         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10473         # was changed to help a little.  newlib incorporated the change about 4
10474         # years later.
10475         echo "$as_me:10475: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10476 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10477 if test "${cf_cv_gnu_library_219+set}" = set; then
10478   echo $ECHO_N "(cached) $ECHO_C" >&6
10479 else
10480
10481                 cf_save="$CPPFLAGS"
10482
10483         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10484         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10485
10486                 cat >"conftest.$ac_ext" <<_ACEOF
10487 #line 10487 "configure"
10488 #include "confdefs.h"
10489 #include <sys/types.h>
10490 int
10491 main (void)
10492 {
10493
10494                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10495                                 return 0;
10496                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10497                                 return 0;
10498                         #else
10499                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10500                         #endif
10501   ;
10502   return 0;
10503 }
10504 _ACEOF
10505 rm -f "conftest.$ac_objext"
10506 if { (eval echo "$as_me:10506: \"$ac_compile\"") >&5
10507   (eval $ac_compile) 2>&5
10508   ac_status=$?
10509   echo "$as_me:10509: \$? = $ac_status" >&5
10510   (exit "$ac_status"); } &&
10511          { ac_try='test -s "conftest.$ac_objext"'
10512   { (eval echo "$as_me:10512: \"$ac_try\"") >&5
10513   (eval $ac_try) 2>&5
10514   ac_status=$?
10515   echo "$as_me:10515: \$? = $ac_status" >&5
10516   (exit "$ac_status"); }; }; then
10517   cf_cv_gnu_library_219=yes
10518 else
10519   echo "$as_me: failed program was:" >&5
10520 cat "conftest.$ac_ext" >&5
10521 cf_cv_gnu_library_219=no
10522 fi
10523 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10524                 CPPFLAGS="$cf_save"
10525
10526 fi
10527 echo "$as_me:10527: result: $cf_cv_gnu_library_219" >&5
10528 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10529
10530         if test "x$cf_cv_gnu_library_219" = xyes; then
10531                 cf_save="$CPPFLAGS"
10532                 echo "$as_me:10532: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10533 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10534 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10535   echo $ECHO_N "(cached) $ECHO_C" >&6
10536 else
10537
10538 cf_fix_cppflags=no
10539 cf_new_cflags=
10540 cf_new_cppflags=
10541 cf_new_extra_cppflags=
10542
10543 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10544 do
10545 case "$cf_fix_cppflags" in
10546 (no)
10547         case "$cf_add_cflags" in
10548         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10549                 case "$cf_add_cflags" in
10550                 (-D*)
10551                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10552
10553                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10554                                 && test -z "${cf_tst_cflags}" \
10555                                 && cf_fix_cppflags=yes
10556
10557                         if test "$cf_fix_cppflags" = yes ; then
10558
10559         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10560         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10561
10562                                 continue
10563                         elif test "${cf_tst_cflags}" = "\"'" ; then
10564
10565         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10566         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10567
10568                                 continue
10569                         fi
10570                         ;;
10571                 esac
10572                 case "$CPPFLAGS" in
10573                 (*$cf_add_cflags)
10574                         ;;
10575                 (*)
10576                         case "$cf_add_cflags" in
10577                         (-D*)
10578                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10579
10580 CPPFLAGS=`echo "$CPPFLAGS" | \
10581         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10582                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10583
10584                                 ;;
10585                         esac
10586
10587         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10588         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10589
10590                         ;;
10591                 esac
10592                 ;;
10593         (*)
10594
10595         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10596         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10597
10598                 ;;
10599         esac
10600         ;;
10601 (yes)
10602
10603         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10604         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10605
10606         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10607
10608         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10609                 && test -z "${cf_tst_cflags}" \
10610                 && cf_fix_cppflags=no
10611         ;;
10612 esac
10613 done
10614
10615 if test -n "$cf_new_cflags" ; then
10616
10617         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10618         CFLAGS="${CFLAGS}$cf_new_cflags"
10619
10620 fi
10621
10622 if test -n "$cf_new_cppflags" ; then
10623
10624         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10625         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10626
10627 fi
10628
10629 if test -n "$cf_new_extra_cppflags" ; then
10630
10631         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10632         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10633
10634 fi
10635
10636                         cat >"conftest.$ac_ext" <<_ACEOF
10637 #line 10637 "configure"
10638 #include "confdefs.h"
10639
10640                                 #include <limits.h>
10641                                 #include <sys/types.h>
10642
10643 int
10644 main (void)
10645 {
10646
10647                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10648                                         return 0;
10649                                 #else
10650                                 #       error GNU C library is too old
10651                                 #endif
10652   ;
10653   return 0;
10654 }
10655 _ACEOF
10656 rm -f "conftest.$ac_objext"
10657 if { (eval echo "$as_me:10657: \"$ac_compile\"") >&5
10658   (eval $ac_compile) 2>&5
10659   ac_status=$?
10660   echo "$as_me:10660: \$? = $ac_status" >&5
10661   (exit "$ac_status"); } &&
10662          { ac_try='test -s "conftest.$ac_objext"'
10663   { (eval echo "$as_me:10663: \"$ac_try\"") >&5
10664   (eval $ac_try) 2>&5
10665   ac_status=$?
10666   echo "$as_me:10666: \$? = $ac_status" >&5
10667   (exit "$ac_status"); }; }; then
10668   cf_cv_gnu_dftsrc_219=yes
10669 else
10670   echo "$as_me: failed program was:" >&5
10671 cat "conftest.$ac_ext" >&5
10672 cf_cv_gnu_dftsrc_219=no
10673 fi
10674 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10675
10676 fi
10677 echo "$as_me:10677: result: $cf_cv_gnu_dftsrc_219" >&5
10678 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10679                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10680         else
10681                 cf_cv_gnu_dftsrc_219=maybe
10682         fi
10683
10684         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10685
10686                 echo "$as_me:10686: checking if we must define _GNU_SOURCE" >&5
10687 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10688 if test "${cf_cv_gnu_source+set}" = set; then
10689   echo $ECHO_N "(cached) $ECHO_C" >&6
10690 else
10691
10692                 cat >"conftest.$ac_ext" <<_ACEOF
10693 #line 10693 "configure"
10694 #include "confdefs.h"
10695 #include <sys/types.h>
10696 int
10697 main (void)
10698 {
10699
10700                         #ifndef _XOPEN_SOURCE
10701                         #error  expected _XOPEN_SOURCE to be defined
10702                         #endif
10703   ;
10704   return 0;
10705 }
10706 _ACEOF
10707 rm -f "conftest.$ac_objext"
10708 if { (eval echo "$as_me:10708: \"$ac_compile\"") >&5
10709   (eval $ac_compile) 2>&5
10710   ac_status=$?
10711   echo "$as_me:10711: \$? = $ac_status" >&5
10712   (exit "$ac_status"); } &&
10713          { ac_try='test -s "conftest.$ac_objext"'
10714   { (eval echo "$as_me:10714: \"$ac_try\"") >&5
10715   (eval $ac_try) 2>&5
10716   ac_status=$?
10717   echo "$as_me:10717: \$? = $ac_status" >&5
10718   (exit "$ac_status"); }; }; then
10719   cf_cv_gnu_source=no
10720 else
10721   echo "$as_me: failed program was:" >&5
10722 cat "conftest.$ac_ext" >&5
10723 cf_save="$CPPFLAGS"
10724
10725 cf_fix_cppflags=no
10726 cf_new_cflags=
10727 cf_new_cppflags=
10728 cf_new_extra_cppflags=
10729
10730 for cf_add_cflags in -D_GNU_SOURCE
10731 do
10732 case "$cf_fix_cppflags" in
10733 (no)
10734         case "$cf_add_cflags" in
10735         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10736                 case "$cf_add_cflags" in
10737                 (-D*)
10738                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10739
10740                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10741                                 && test -z "${cf_tst_cflags}" \
10742                                 && cf_fix_cppflags=yes
10743
10744                         if test "$cf_fix_cppflags" = yes ; then
10745
10746         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10747         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10748
10749                                 continue
10750                         elif test "${cf_tst_cflags}" = "\"'" ; then
10751
10752         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10753         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10754
10755                                 continue
10756                         fi
10757                         ;;
10758                 esac
10759                 case "$CPPFLAGS" in
10760                 (*$cf_add_cflags)
10761                         ;;
10762                 (*)
10763                         case "$cf_add_cflags" in
10764                         (-D*)
10765                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10766
10767 CPPFLAGS=`echo "$CPPFLAGS" | \
10768         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10769                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10770
10771                                 ;;
10772                         esac
10773
10774         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10775         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10776
10777                         ;;
10778                 esac
10779                 ;;
10780         (*)
10781
10782         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10783         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10784
10785                 ;;
10786         esac
10787         ;;
10788 (yes)
10789
10790         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10791         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10792
10793         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10794
10795         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10796                 && test -z "${cf_tst_cflags}" \
10797                 && cf_fix_cppflags=no
10798         ;;
10799 esac
10800 done
10801
10802 if test -n "$cf_new_cflags" ; then
10803
10804         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10805         CFLAGS="${CFLAGS}$cf_new_cflags"
10806
10807 fi
10808
10809 if test -n "$cf_new_cppflags" ; then
10810
10811         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10812         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10813
10814 fi
10815
10816 if test -n "$cf_new_extra_cppflags" ; then
10817
10818         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10819         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10820
10821 fi
10822
10823                          cat >"conftest.$ac_ext" <<_ACEOF
10824 #line 10824 "configure"
10825 #include "confdefs.h"
10826 #include <sys/types.h>
10827 int
10828 main (void)
10829 {
10830
10831                                 #ifdef _XOPEN_SOURCE
10832                                 #error  expected _XOPEN_SOURCE to be undefined
10833                                 #endif
10834   ;
10835   return 0;
10836 }
10837 _ACEOF
10838 rm -f "conftest.$ac_objext"
10839 if { (eval echo "$as_me:10839: \"$ac_compile\"") >&5
10840   (eval $ac_compile) 2>&5
10841   ac_status=$?
10842   echo "$as_me:10842: \$? = $ac_status" >&5
10843   (exit "$ac_status"); } &&
10844          { ac_try='test -s "conftest.$ac_objext"'
10845   { (eval echo "$as_me:10845: \"$ac_try\"") >&5
10846   (eval $ac_try) 2>&5
10847   ac_status=$?
10848   echo "$as_me:10848: \$? = $ac_status" >&5
10849   (exit "$ac_status"); }; }; then
10850   cf_cv_gnu_source=no
10851 else
10852   echo "$as_me: failed program was:" >&5
10853 cat "conftest.$ac_ext" >&5
10854 cf_cv_gnu_source=yes
10855 fi
10856 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10857                         CPPFLAGS="$cf_save"
10858
10859 fi
10860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861
10862 fi
10863 echo "$as_me:10863: result: $cf_cv_gnu_source" >&5
10864 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10865
10866                 if test "$cf_cv_gnu_source" = yes
10867                 then
10868                 echo "$as_me:10868: checking if we should also define _DEFAULT_SOURCE" >&5
10869 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10870 if test "${cf_cv_default_source+set}" = set; then
10871   echo $ECHO_N "(cached) $ECHO_C" >&6
10872 else
10873
10874         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10875         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10876
10877                         cat >"conftest.$ac_ext" <<_ACEOF
10878 #line 10878 "configure"
10879 #include "confdefs.h"
10880 #include <sys/types.h>
10881 int
10882 main (void)
10883 {
10884
10885                                 #ifdef _DEFAULT_SOURCE
10886                                 #error  expected _DEFAULT_SOURCE to be undefined
10887                                 #endif
10888   ;
10889   return 0;
10890 }
10891 _ACEOF
10892 rm -f "conftest.$ac_objext"
10893 if { (eval echo "$as_me:10893: \"$ac_compile\"") >&5
10894   (eval $ac_compile) 2>&5
10895   ac_status=$?
10896   echo "$as_me:10896: \$? = $ac_status" >&5
10897   (exit "$ac_status"); } &&
10898          { ac_try='test -s "conftest.$ac_objext"'
10899   { (eval echo "$as_me:10899: \"$ac_try\"") >&5
10900   (eval $ac_try) 2>&5
10901   ac_status=$?
10902   echo "$as_me:10902: \$? = $ac_status" >&5
10903   (exit "$ac_status"); }; }; then
10904   cf_cv_default_source=no
10905 else
10906   echo "$as_me: failed program was:" >&5
10907 cat "conftest.$ac_ext" >&5
10908 cf_cv_default_source=yes
10909 fi
10910 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10911
10912 fi
10913 echo "$as_me:10913: result: $cf_cv_default_source" >&5
10914 echo "${ECHO_T}$cf_cv_default_source" >&6
10915                         if test "$cf_cv_default_source" = yes
10916                         then
10917
10918         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10919         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10920
10921                         fi
10922                 fi
10923         fi
10924
10925 fi
10926
10927         ;;
10928 (minix*)
10929         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10930         ;;
10931 (mirbsd*)
10932         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10933         cf_XOPEN_SOURCE=
10934
10935 if test "$cf_cv_posix_visible" = no; then
10936
10937 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10938
10939 cf_save_CFLAGS="$CFLAGS"
10940 cf_save_CPPFLAGS="$CPPFLAGS"
10941
10942 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10943         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10944                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10945
10946 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10947         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10948                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10949
10950 echo "$as_me:10950: checking if we should define _POSIX_C_SOURCE" >&5
10951 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10952 if test "${cf_cv_posix_c_source+set}" = set; then
10953   echo $ECHO_N "(cached) $ECHO_C" >&6
10954 else
10955
10956 echo "${as_me:-configure}:10956: testing if the symbol is already defined go no further ..." 1>&5
10957
10958         cat >"conftest.$ac_ext" <<_ACEOF
10959 #line 10959 "configure"
10960 #include "confdefs.h"
10961 #include <sys/types.h>
10962 int
10963 main (void)
10964 {
10965
10966 #ifndef _POSIX_C_SOURCE
10967 #error _POSIX_C_SOURCE is not defined
10968 #endif
10969   ;
10970   return 0;
10971 }
10972 _ACEOF
10973 rm -f "conftest.$ac_objext"
10974 if { (eval echo "$as_me:10974: \"$ac_compile\"") >&5
10975   (eval $ac_compile) 2>&5
10976   ac_status=$?
10977   echo "$as_me:10977: \$? = $ac_status" >&5
10978   (exit "$ac_status"); } &&
10979          { ac_try='test -s "conftest.$ac_objext"'
10980   { (eval echo "$as_me:10980: \"$ac_try\"") >&5
10981   (eval $ac_try) 2>&5
10982   ac_status=$?
10983   echo "$as_me:10983: \$? = $ac_status" >&5
10984   (exit "$ac_status"); }; }; then
10985   cf_cv_posix_c_source=no
10986 else
10987   echo "$as_me: failed program was:" >&5
10988 cat "conftest.$ac_ext" >&5
10989 cf_want_posix_source=no
10990          case .$cf_POSIX_C_SOURCE in
10991          (.[12]??*)
10992                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10993                 ;;
10994          (.2)
10995                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10996                 cf_want_posix_source=yes
10997                 ;;
10998          (.*)
10999                 cf_want_posix_source=yes
11000                 ;;
11001          esac
11002          if test "$cf_want_posix_source" = yes ; then
11003                 cat >"conftest.$ac_ext" <<_ACEOF
11004 #line 11004 "configure"
11005 #include "confdefs.h"
11006 #include <sys/types.h>
11007 int
11008 main (void)
11009 {
11010
11011 #ifdef _POSIX_SOURCE
11012 #error _POSIX_SOURCE is defined
11013 #endif
11014   ;
11015   return 0;
11016 }
11017 _ACEOF
11018 rm -f "conftest.$ac_objext"
11019 if { (eval echo "$as_me:11019: \"$ac_compile\"") >&5
11020   (eval $ac_compile) 2>&5
11021   ac_status=$?
11022   echo "$as_me:11022: \$? = $ac_status" >&5
11023   (exit "$ac_status"); } &&
11024          { ac_try='test -s "conftest.$ac_objext"'
11025   { (eval echo "$as_me:11025: \"$ac_try\"") >&5
11026   (eval $ac_try) 2>&5
11027   ac_status=$?
11028   echo "$as_me:11028: \$? = $ac_status" >&5
11029   (exit "$ac_status"); }; }; then
11030   :
11031 else
11032   echo "$as_me: failed program was:" >&5
11033 cat "conftest.$ac_ext" >&5
11034 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11035 fi
11036 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11037          fi
11038
11039 echo "${as_me:-configure}:11039: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11040
11041          CFLAGS="$cf_trim_CFLAGS"
11042          CPPFLAGS="$cf_trim_CPPFLAGS"
11043
11044         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11045         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11046
11047 echo "${as_me:-configure}:11047: testing if the second compile does not leave our definition intact error ..." 1>&5
11048
11049          cat >"conftest.$ac_ext" <<_ACEOF
11050 #line 11050 "configure"
11051 #include "confdefs.h"
11052 #include <sys/types.h>
11053 int
11054 main (void)
11055 {
11056
11057 #ifndef _POSIX_C_SOURCE
11058 #error _POSIX_C_SOURCE is not defined
11059 #endif
11060   ;
11061   return 0;
11062 }
11063 _ACEOF
11064 rm -f "conftest.$ac_objext"
11065 if { (eval echo "$as_me:11065: \"$ac_compile\"") >&5
11066   (eval $ac_compile) 2>&5
11067   ac_status=$?
11068   echo "$as_me:11068: \$? = $ac_status" >&5
11069   (exit "$ac_status"); } &&
11070          { ac_try='test -s "conftest.$ac_objext"'
11071   { (eval echo "$as_me:11071: \"$ac_try\"") >&5
11072   (eval $ac_try) 2>&5
11073   ac_status=$?
11074   echo "$as_me:11074: \$? = $ac_status" >&5
11075   (exit "$ac_status"); }; }; then
11076   :
11077 else
11078   echo "$as_me: failed program was:" >&5
11079 cat "conftest.$ac_ext" >&5
11080 cf_cv_posix_c_source=no
11081 fi
11082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11083          CFLAGS="$cf_save_CFLAGS"
11084          CPPFLAGS="$cf_save_CPPFLAGS"
11085
11086 fi
11087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11088
11089 fi
11090 echo "$as_me:11090: result: $cf_cv_posix_c_source" >&5
11091 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11092
11093 if test "$cf_cv_posix_c_source" != no ; then
11094         CFLAGS="$cf_trim_CFLAGS"
11095         CPPFLAGS="$cf_trim_CPPFLAGS"
11096
11097 cf_fix_cppflags=no
11098 cf_new_cflags=
11099 cf_new_cppflags=
11100 cf_new_extra_cppflags=
11101
11102 for cf_add_cflags in $cf_cv_posix_c_source
11103 do
11104 case "$cf_fix_cppflags" in
11105 (no)
11106         case "$cf_add_cflags" in
11107         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11108                 case "$cf_add_cflags" in
11109                 (-D*)
11110                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11111
11112                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11113                                 && test -z "${cf_tst_cflags}" \
11114                                 && cf_fix_cppflags=yes
11115
11116                         if test "$cf_fix_cppflags" = yes ; then
11117
11118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11120
11121                                 continue
11122                         elif test "${cf_tst_cflags}" = "\"'" ; then
11123
11124         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11125         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11126
11127                                 continue
11128                         fi
11129                         ;;
11130                 esac
11131                 case "$CPPFLAGS" in
11132                 (*$cf_add_cflags)
11133                         ;;
11134                 (*)
11135                         case "$cf_add_cflags" in
11136                         (-D*)
11137                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11138
11139 CPPFLAGS=`echo "$CPPFLAGS" | \
11140         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11141                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11142
11143                                 ;;
11144                         esac
11145
11146         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11147         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11148
11149                         ;;
11150                 esac
11151                 ;;
11152         (*)
11153
11154         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11155         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11156
11157                 ;;
11158         esac
11159         ;;
11160 (yes)
11161
11162         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11163         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11164
11165         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11166
11167         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11168                 && test -z "${cf_tst_cflags}" \
11169                 && cf_fix_cppflags=no
11170         ;;
11171 esac
11172 done
11173
11174 if test -n "$cf_new_cflags" ; then
11175
11176         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11177         CFLAGS="${CFLAGS}$cf_new_cflags"
11178
11179 fi
11180
11181 if test -n "$cf_new_cppflags" ; then
11182
11183         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11184         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11185
11186 fi
11187
11188 if test -n "$cf_new_extra_cppflags" ; then
11189
11190         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11191         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11192
11193 fi
11194
11195 fi
11196
11197 fi # cf_cv_posix_visible
11198
11199         ;;
11200 (netbsd*)
11201         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11202         ;;
11203 (openbsd[6-9]*)
11204         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11205         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11206         # Abusing the conformance level is a workaround.
11207         { echo "$as_me:11207: WARNING: this system does not provide usable locale support" >&5
11208 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11209         cf_xopen_source="-D_BSD_SOURCE"
11210         cf_XOPEN_SOURCE=700
11211         ;;
11212 (openbsd[4-5]*)
11213         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11214         cf_xopen_source="-D_BSD_SOURCE"
11215         cf_XOPEN_SOURCE=600
11216         ;;
11217 (openbsd*)
11218         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11219         ;;
11220 (osf[45]*)
11221         cf_xopen_source="-D_OSF_SOURCE"
11222         ;;
11223 (nto-qnx*)
11224         cf_xopen_source="-D_QNX_SOURCE"
11225         ;;
11226 (sco*)
11227         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11228         ;;
11229 (solaris2.*)
11230         cf_xopen_source="-D__EXTENSIONS__"
11231         cf_cv_xopen_source=broken
11232         ;;
11233 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11234         cf_XOPEN_SOURCE=
11235         cf_POSIX_C_SOURCE=
11236         ;;
11237 (*)
11238
11239 echo "$as_me:11239: checking if we should define _XOPEN_SOURCE" >&5
11240 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11241 if test "${cf_cv_xopen_source+set}" = set; then
11242   echo $ECHO_N "(cached) $ECHO_C" >&6
11243 else
11244
11245         cat >"conftest.$ac_ext" <<_ACEOF
11246 #line 11246 "configure"
11247 #include "confdefs.h"
11248
11249 $ac_includes_default
11250
11251 int
11252 main (void)
11253 {
11254
11255 #ifndef _XOPEN_SOURCE
11256 #error _XOPEN_SOURCE is not defined
11257 #endif
11258
11259   ;
11260   return 0;
11261 }
11262 _ACEOF
11263 rm -f "conftest.$ac_objext"
11264 if { (eval echo "$as_me:11264: \"$ac_compile\"") >&5
11265   (eval $ac_compile) 2>&5
11266   ac_status=$?
11267   echo "$as_me:11267: \$? = $ac_status" >&5
11268   (exit "$ac_status"); } &&
11269          { ac_try='test -s "conftest.$ac_objext"'
11270   { (eval echo "$as_me:11270: \"$ac_try\"") >&5
11271   (eval $ac_try) 2>&5
11272   ac_status=$?
11273   echo "$as_me:11273: \$? = $ac_status" >&5
11274   (exit "$ac_status"); }; }; then
11275   cf_cv_xopen_source=no
11276 else
11277   echo "$as_me: failed program was:" >&5
11278 cat "conftest.$ac_ext" >&5
11279 cf_save="$CPPFLAGS"
11280
11281         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11282         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11283
11284          cat >"conftest.$ac_ext" <<_ACEOF
11285 #line 11285 "configure"
11286 #include "confdefs.h"
11287
11288 $ac_includes_default
11289
11290 int
11291 main (void)
11292 {
11293
11294 #ifndef _XOPEN_SOURCE
11295 #error _XOPEN_SOURCE is not defined
11296 #endif
11297
11298   ;
11299   return 0;
11300 }
11301 _ACEOF
11302 rm -f "conftest.$ac_objext"
11303 if { (eval echo "$as_me:11303: \"$ac_compile\"") >&5
11304   (eval $ac_compile) 2>&5
11305   ac_status=$?
11306   echo "$as_me:11306: \$? = $ac_status" >&5
11307   (exit "$ac_status"); } &&
11308          { ac_try='test -s "conftest.$ac_objext"'
11309   { (eval echo "$as_me:11309: \"$ac_try\"") >&5
11310   (eval $ac_try) 2>&5
11311   ac_status=$?
11312   echo "$as_me:11312: \$? = $ac_status" >&5
11313   (exit "$ac_status"); }; }; then
11314   cf_cv_xopen_source=no
11315 else
11316   echo "$as_me: failed program was:" >&5
11317 cat "conftest.$ac_ext" >&5
11318 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11319 fi
11320 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11321                 CPPFLAGS="$cf_save"
11322
11323 fi
11324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11325
11326 fi
11327 echo "$as_me:11327: result: $cf_cv_xopen_source" >&5
11328 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11329
11330 if test "$cf_cv_xopen_source" != no ; then
11331
11332 CFLAGS=`echo "$CFLAGS" | \
11333         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11334                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11335
11336 CPPFLAGS=`echo "$CPPFLAGS" | \
11337         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11339
11340         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11341
11342 for cf_add_cflags in $cf_temp_xopen_source
11343 do
11344         case "x$cf_add_cflags" in
11345         (x-[DU]*)
11346
11347 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11348 while true
11349 do
11350         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'`
11351         test "$CFLAGS" != "$cf_old_cflag" || break
11352
11353         CFLAGS="$cf_old_cflag"
11354 done
11355
11356 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11357 while true
11358 do
11359         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'`
11360         test "$CPPFLAGS" != "$cf_old_cflag" || break
11361
11362         CPPFLAGS="$cf_old_cflag"
11363 done
11364
11365                 ;;
11366         esac
11367
11368 cf_fix_cppflags=no
11369 cf_new_cflags=
11370 cf_new_cppflags=
11371 cf_new_extra_cppflags=
11372
11373 for cf_add_cflags in $cf_add_cflags
11374 do
11375 case "$cf_fix_cppflags" in
11376 (no)
11377         case "$cf_add_cflags" in
11378         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11379                 case "$cf_add_cflags" in
11380                 (-D*)
11381                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11382
11383                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11384                                 && test -z "${cf_tst_cflags}" \
11385                                 && cf_fix_cppflags=yes
11386
11387                         if test "$cf_fix_cppflags" = yes ; then
11388
11389         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11390         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11391
11392                                 continue
11393                         elif test "${cf_tst_cflags}" = "\"'" ; then
11394
11395         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11396         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11397
11398                                 continue
11399                         fi
11400                         ;;
11401                 esac
11402                 case "$CPPFLAGS" in
11403                 (*$cf_add_cflags)
11404                         ;;
11405                 (*)
11406                         case "$cf_add_cflags" in
11407                         (-D*)
11408                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11409
11410 CPPFLAGS=`echo "$CPPFLAGS" | \
11411         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11412                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11413
11414                                 ;;
11415                         esac
11416
11417         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11418         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11419
11420                         ;;
11421                 esac
11422                 ;;
11423         (*)
11424
11425         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11426         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11427
11428                 ;;
11429         esac
11430         ;;
11431 (yes)
11432
11433         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11434         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11435
11436         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11437
11438         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11439                 && test -z "${cf_tst_cflags}" \
11440                 && cf_fix_cppflags=no
11441         ;;
11442 esac
11443 done
11444
11445 if test -n "$cf_new_cflags" ; then
11446
11447         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11448         CFLAGS="${CFLAGS}$cf_new_cflags"
11449
11450 fi
11451
11452 if test -n "$cf_new_cppflags" ; then
11453
11454         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11455         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11456
11457 fi
11458
11459 if test -n "$cf_new_extra_cppflags" ; then
11460
11461         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11462         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11463
11464 fi
11465
11466 done
11467
11468 fi
11469
11470         cf_save_xopen_cppflags="$CPPFLAGS"
11471
11472 if test "$cf_cv_posix_visible" = no; then
11473
11474 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11475
11476 cf_save_CFLAGS="$CFLAGS"
11477 cf_save_CPPFLAGS="$CPPFLAGS"
11478
11479 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11480         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11481                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11482
11483 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11486
11487 echo "$as_me:11487: checking if we should define _POSIX_C_SOURCE" >&5
11488 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11489 if test "${cf_cv_posix_c_source+set}" = set; then
11490   echo $ECHO_N "(cached) $ECHO_C" >&6
11491 else
11492
11493 echo "${as_me:-configure}:11493: testing if the symbol is already defined go no further ..." 1>&5
11494
11495         cat >"conftest.$ac_ext" <<_ACEOF
11496 #line 11496 "configure"
11497 #include "confdefs.h"
11498 #include <sys/types.h>
11499 int
11500 main (void)
11501 {
11502
11503 #ifndef _POSIX_C_SOURCE
11504 #error _POSIX_C_SOURCE is not defined
11505 #endif
11506   ;
11507   return 0;
11508 }
11509 _ACEOF
11510 rm -f "conftest.$ac_objext"
11511 if { (eval echo "$as_me:11511: \"$ac_compile\"") >&5
11512   (eval $ac_compile) 2>&5
11513   ac_status=$?
11514   echo "$as_me:11514: \$? = $ac_status" >&5
11515   (exit "$ac_status"); } &&
11516          { ac_try='test -s "conftest.$ac_objext"'
11517   { (eval echo "$as_me:11517: \"$ac_try\"") >&5
11518   (eval $ac_try) 2>&5
11519   ac_status=$?
11520   echo "$as_me:11520: \$? = $ac_status" >&5
11521   (exit "$ac_status"); }; }; then
11522   cf_cv_posix_c_source=no
11523 else
11524   echo "$as_me: failed program was:" >&5
11525 cat "conftest.$ac_ext" >&5
11526 cf_want_posix_source=no
11527          case .$cf_POSIX_C_SOURCE in
11528          (.[12]??*)
11529                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11530                 ;;
11531          (.2)
11532                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11533                 cf_want_posix_source=yes
11534                 ;;
11535          (.*)
11536                 cf_want_posix_source=yes
11537                 ;;
11538          esac
11539          if test "$cf_want_posix_source" = yes ; then
11540                 cat >"conftest.$ac_ext" <<_ACEOF
11541 #line 11541 "configure"
11542 #include "confdefs.h"
11543 #include <sys/types.h>
11544 int
11545 main (void)
11546 {
11547
11548 #ifdef _POSIX_SOURCE
11549 #error _POSIX_SOURCE is defined
11550 #endif
11551   ;
11552   return 0;
11553 }
11554 _ACEOF
11555 rm -f "conftest.$ac_objext"
11556 if { (eval echo "$as_me:11556: \"$ac_compile\"") >&5
11557   (eval $ac_compile) 2>&5
11558   ac_status=$?
11559   echo "$as_me:11559: \$? = $ac_status" >&5
11560   (exit "$ac_status"); } &&
11561          { ac_try='test -s "conftest.$ac_objext"'
11562   { (eval echo "$as_me:11562: \"$ac_try\"") >&5
11563   (eval $ac_try) 2>&5
11564   ac_status=$?
11565   echo "$as_me:11565: \$? = $ac_status" >&5
11566   (exit "$ac_status"); }; }; then
11567   :
11568 else
11569   echo "$as_me: failed program was:" >&5
11570 cat "conftest.$ac_ext" >&5
11571 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11572 fi
11573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11574          fi
11575
11576 echo "${as_me:-configure}:11576: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11577
11578          CFLAGS="$cf_trim_CFLAGS"
11579          CPPFLAGS="$cf_trim_CPPFLAGS"
11580
11581         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11582         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11583
11584 echo "${as_me:-configure}:11584: testing if the second compile does not leave our definition intact error ..." 1>&5
11585
11586          cat >"conftest.$ac_ext" <<_ACEOF
11587 #line 11587 "configure"
11588 #include "confdefs.h"
11589 #include <sys/types.h>
11590 int
11591 main (void)
11592 {
11593
11594 #ifndef _POSIX_C_SOURCE
11595 #error _POSIX_C_SOURCE is not defined
11596 #endif
11597   ;
11598   return 0;
11599 }
11600 _ACEOF
11601 rm -f "conftest.$ac_objext"
11602 if { (eval echo "$as_me:11602: \"$ac_compile\"") >&5
11603   (eval $ac_compile) 2>&5
11604   ac_status=$?
11605   echo "$as_me:11605: \$? = $ac_status" >&5
11606   (exit "$ac_status"); } &&
11607          { ac_try='test -s "conftest.$ac_objext"'
11608   { (eval echo "$as_me:11608: \"$ac_try\"") >&5
11609   (eval $ac_try) 2>&5
11610   ac_status=$?
11611   echo "$as_me:11611: \$? = $ac_status" >&5
11612   (exit "$ac_status"); }; }; then
11613   :
11614 else
11615   echo "$as_me: failed program was:" >&5
11616 cat "conftest.$ac_ext" >&5
11617 cf_cv_posix_c_source=no
11618 fi
11619 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11620          CFLAGS="$cf_save_CFLAGS"
11621          CPPFLAGS="$cf_save_CPPFLAGS"
11622
11623 fi
11624 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11625
11626 fi
11627 echo "$as_me:11627: result: $cf_cv_posix_c_source" >&5
11628 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11629
11630 if test "$cf_cv_posix_c_source" != no ; then
11631         CFLAGS="$cf_trim_CFLAGS"
11632         CPPFLAGS="$cf_trim_CPPFLAGS"
11633
11634 cf_fix_cppflags=no
11635 cf_new_cflags=
11636 cf_new_cppflags=
11637 cf_new_extra_cppflags=
11638
11639 for cf_add_cflags in $cf_cv_posix_c_source
11640 do
11641 case "$cf_fix_cppflags" in
11642 (no)
11643         case "$cf_add_cflags" in
11644         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11645                 case "$cf_add_cflags" in
11646                 (-D*)
11647                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11648
11649                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11650                                 && test -z "${cf_tst_cflags}" \
11651                                 && cf_fix_cppflags=yes
11652
11653                         if test "$cf_fix_cppflags" = yes ; then
11654
11655         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11656         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11657
11658                                 continue
11659                         elif test "${cf_tst_cflags}" = "\"'" ; then
11660
11661         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11662         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11663
11664                                 continue
11665                         fi
11666                         ;;
11667                 esac
11668                 case "$CPPFLAGS" in
11669                 (*$cf_add_cflags)
11670                         ;;
11671                 (*)
11672                         case "$cf_add_cflags" in
11673                         (-D*)
11674                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11675
11676 CPPFLAGS=`echo "$CPPFLAGS" | \
11677         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11678                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11679
11680                                 ;;
11681                         esac
11682
11683         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11684         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11685
11686                         ;;
11687                 esac
11688                 ;;
11689         (*)
11690
11691         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11692         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11693
11694                 ;;
11695         esac
11696         ;;
11697 (yes)
11698
11699         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11700         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11701
11702         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11703
11704         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11705                 && test -z "${cf_tst_cflags}" \
11706                 && cf_fix_cppflags=no
11707         ;;
11708 esac
11709 done
11710
11711 if test -n "$cf_new_cflags" ; then
11712
11713         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11714         CFLAGS="${CFLAGS}$cf_new_cflags"
11715
11716 fi
11717
11718 if test -n "$cf_new_cppflags" ; then
11719
11720         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11721         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11722
11723 fi
11724
11725 if test -n "$cf_new_extra_cppflags" ; then
11726
11727         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11728         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11729
11730 fi
11731
11732 fi
11733
11734 fi # cf_cv_posix_visible
11735
11736         # Some of these niche implementations use copy/paste, double-check...
11737         if test "$cf_cv_xopen_source" = no ; then
11738                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11739
11740 echo "${as_me:-configure}:11740: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11741
11742                 cat >"conftest.$ac_ext" <<_ACEOF
11743 #line 11743 "configure"
11744 #include "confdefs.h"
11745
11746 $ac_includes_default
11747
11748 int
11749 main (void)
11750 {
11751
11752 #ifndef _XOPEN_SOURCE
11753 #error _XOPEN_SOURCE is not defined
11754 #endif
11755
11756   ;
11757   return 0;
11758 }
11759 _ACEOF
11760 rm -f "conftest.$ac_objext"
11761 if { (eval echo "$as_me:11761: \"$ac_compile\"") >&5
11762   (eval $ac_compile) 2>&5
11763   ac_status=$?
11764   echo "$as_me:11764: \$? = $ac_status" >&5
11765   (exit "$ac_status"); } &&
11766          { ac_try='test -s "conftest.$ac_objext"'
11767   { (eval echo "$as_me:11767: \"$ac_try\"") >&5
11768   (eval $ac_try) 2>&5
11769   ac_status=$?
11770   echo "$as_me:11770: \$? = $ac_status" >&5
11771   (exit "$ac_status"); }; }; then
11772   :
11773 else
11774   echo "$as_me: failed program was:" >&5
11775 cat "conftest.$ac_ext" >&5
11776
11777                         { echo "$as_me:11777: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11778 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11779                         CPPFLAGS="$cf_save_xopen_cppflags"
11780 fi
11781 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11782         fi
11783         ;;
11784 esac
11785
11786 if test -n "$cf_xopen_source" ; then
11787
11788 for cf_add_cflags in $cf_xopen_source
11789 do
11790         case "x$cf_add_cflags" in
11791         (x-[DU]*)
11792
11793 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11794 while true
11795 do
11796         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'`
11797         test "$CFLAGS" != "$cf_old_cflag" || break
11798         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11799
11800 echo "${as_me:-configure}:11800: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11801
11802         CFLAGS="$cf_old_cflag"
11803 done
11804
11805 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11806 while true
11807 do
11808         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'`
11809         test "$CPPFLAGS" != "$cf_old_cflag" || break
11810         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11811
11812 echo "${as_me:-configure}:11812: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11813
11814         CPPFLAGS="$cf_old_cflag"
11815 done
11816
11817                 ;;
11818         esac
11819
11820 cf_fix_cppflags=no
11821 cf_new_cflags=
11822 cf_new_cppflags=
11823 cf_new_extra_cppflags=
11824
11825 for cf_add_cflags in $cf_add_cflags
11826 do
11827 case "$cf_fix_cppflags" in
11828 (no)
11829         case "$cf_add_cflags" in
11830         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11831                 case "$cf_add_cflags" in
11832                 (-D*)
11833                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11834
11835                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11836                                 && test -z "${cf_tst_cflags}" \
11837                                 && cf_fix_cppflags=yes
11838
11839                         if test "$cf_fix_cppflags" = yes ; then
11840
11841         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11842         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11843
11844                                 continue
11845                         elif test "${cf_tst_cflags}" = "\"'" ; then
11846
11847         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11848         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11849
11850                                 continue
11851                         fi
11852                         ;;
11853                 esac
11854                 case "$CPPFLAGS" in
11855                 (*$cf_add_cflags)
11856                         ;;
11857                 (*)
11858                         case "$cf_add_cflags" in
11859                         (-D*)
11860                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11861
11862 CPPFLAGS=`echo "$CPPFLAGS" | \
11863         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11864                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11865
11866                                 ;;
11867                         esac
11868
11869         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11870         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11871
11872                         ;;
11873                 esac
11874                 ;;
11875         (*)
11876
11877         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11878         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11879
11880                 ;;
11881         esac
11882         ;;
11883 (yes)
11884
11885         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11886         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11887
11888         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11889
11890         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11891                 && test -z "${cf_tst_cflags}" \
11892                 && cf_fix_cppflags=no
11893         ;;
11894 esac
11895 done
11896
11897 if test -n "$cf_new_cflags" ; then
11898         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11899
11900 echo "${as_me:-configure}:11900: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11901
11902         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11903         CFLAGS="${CFLAGS}$cf_new_cflags"
11904
11905 fi
11906
11907 if test -n "$cf_new_cppflags" ; then
11908         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11909
11910 echo "${as_me:-configure}:11910: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11911
11912         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11913         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11914
11915 fi
11916
11917 if test -n "$cf_new_extra_cppflags" ; then
11918         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11919
11920 echo "${as_me:-configure}:11920: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11921
11922         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11923         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11924
11925 fi
11926
11927 done
11928
11929 fi
11930
11931 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11932         echo "$as_me:11932: checking if _XOPEN_SOURCE really is set" >&5
11933 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11934         cat >"conftest.$ac_ext" <<_ACEOF
11935 #line 11935 "configure"
11936 #include "confdefs.h"
11937 #include <stdlib.h>
11938 int
11939 main (void)
11940 {
11941
11942 #ifndef _XOPEN_SOURCE
11943 #error _XOPEN_SOURCE is not defined
11944 #endif
11945   ;
11946   return 0;
11947 }
11948 _ACEOF
11949 rm -f "conftest.$ac_objext"
11950 if { (eval echo "$as_me:11950: \"$ac_compile\"") >&5
11951   (eval $ac_compile) 2>&5
11952   ac_status=$?
11953   echo "$as_me:11953: \$? = $ac_status" >&5
11954   (exit "$ac_status"); } &&
11955          { ac_try='test -s "conftest.$ac_objext"'
11956   { (eval echo "$as_me:11956: \"$ac_try\"") >&5
11957   (eval $ac_try) 2>&5
11958   ac_status=$?
11959   echo "$as_me:11959: \$? = $ac_status" >&5
11960   (exit "$ac_status"); }; }; then
11961   cf_XOPEN_SOURCE_set=yes
11962 else
11963   echo "$as_me: failed program was:" >&5
11964 cat "conftest.$ac_ext" >&5
11965 cf_XOPEN_SOURCE_set=no
11966 fi
11967 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11968         echo "$as_me:11968: result: $cf_XOPEN_SOURCE_set" >&5
11969 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11970         if test "$cf_XOPEN_SOURCE_set" = yes
11971         then
11972                 cat >"conftest.$ac_ext" <<_ACEOF
11973 #line 11973 "configure"
11974 #include "confdefs.h"
11975 #include <stdlib.h>
11976 int
11977 main (void)
11978 {
11979
11980 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11981 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11982 #endif
11983   ;
11984   return 0;
11985 }
11986 _ACEOF
11987 rm -f "conftest.$ac_objext"
11988 if { (eval echo "$as_me:11988: \"$ac_compile\"") >&5
11989   (eval $ac_compile) 2>&5
11990   ac_status=$?
11991   echo "$as_me:11991: \$? = $ac_status" >&5
11992   (exit "$ac_status"); } &&
11993          { ac_try='test -s "conftest.$ac_objext"'
11994   { (eval echo "$as_me:11994: \"$ac_try\"") >&5
11995   (eval $ac_try) 2>&5
11996   ac_status=$?
11997   echo "$as_me:11997: \$? = $ac_status" >&5
11998   (exit "$ac_status"); }; }; then
11999   cf_XOPEN_SOURCE_set_ok=yes
12000 else
12001   echo "$as_me: failed program was:" >&5
12002 cat "conftest.$ac_ext" >&5
12003 cf_XOPEN_SOURCE_set_ok=no
12004 fi
12005 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12006                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12007                 then
12008                         { echo "$as_me:12008: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12009 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12010                 fi
12011         else
12012
12013 echo "$as_me:12013: checking if we should define _XOPEN_SOURCE" >&5
12014 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12015 if test "${cf_cv_xopen_source+set}" = set; then
12016   echo $ECHO_N "(cached) $ECHO_C" >&6
12017 else
12018
12019         cat >"conftest.$ac_ext" <<_ACEOF
12020 #line 12020 "configure"
12021 #include "confdefs.h"
12022
12023 $ac_includes_default
12024
12025 int
12026 main (void)
12027 {
12028
12029 #ifndef _XOPEN_SOURCE
12030 #error _XOPEN_SOURCE is not defined
12031 #endif
12032
12033   ;
12034   return 0;
12035 }
12036 _ACEOF
12037 rm -f "conftest.$ac_objext"
12038 if { (eval echo "$as_me:12038: \"$ac_compile\"") >&5
12039   (eval $ac_compile) 2>&5
12040   ac_status=$?
12041   echo "$as_me:12041: \$? = $ac_status" >&5
12042   (exit "$ac_status"); } &&
12043          { ac_try='test -s "conftest.$ac_objext"'
12044   { (eval echo "$as_me:12044: \"$ac_try\"") >&5
12045   (eval $ac_try) 2>&5
12046   ac_status=$?
12047   echo "$as_me:12047: \$? = $ac_status" >&5
12048   (exit "$ac_status"); }; }; then
12049   cf_cv_xopen_source=no
12050 else
12051   echo "$as_me: failed program was:" >&5
12052 cat "conftest.$ac_ext" >&5
12053 cf_save="$CPPFLAGS"
12054
12055         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12056         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12057
12058          cat >"conftest.$ac_ext" <<_ACEOF
12059 #line 12059 "configure"
12060 #include "confdefs.h"
12061
12062 $ac_includes_default
12063
12064 int
12065 main (void)
12066 {
12067
12068 #ifndef _XOPEN_SOURCE
12069 #error _XOPEN_SOURCE is not defined
12070 #endif
12071
12072   ;
12073   return 0;
12074 }
12075 _ACEOF
12076 rm -f "conftest.$ac_objext"
12077 if { (eval echo "$as_me:12077: \"$ac_compile\"") >&5
12078   (eval $ac_compile) 2>&5
12079   ac_status=$?
12080   echo "$as_me:12080: \$? = $ac_status" >&5
12081   (exit "$ac_status"); } &&
12082          { ac_try='test -s "conftest.$ac_objext"'
12083   { (eval echo "$as_me:12083: \"$ac_try\"") >&5
12084   (eval $ac_try) 2>&5
12085   ac_status=$?
12086   echo "$as_me:12086: \$? = $ac_status" >&5
12087   (exit "$ac_status"); }; }; then
12088   cf_cv_xopen_source=no
12089 else
12090   echo "$as_me: failed program was:" >&5
12091 cat "conftest.$ac_ext" >&5
12092 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12093 fi
12094 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12095                 CPPFLAGS="$cf_save"
12096
12097 fi
12098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12099
12100 fi
12101 echo "$as_me:12101: result: $cf_cv_xopen_source" >&5
12102 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12103
12104 if test "$cf_cv_xopen_source" != no ; then
12105
12106 CFLAGS=`echo "$CFLAGS" | \
12107         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12108                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12109
12110 CPPFLAGS=`echo "$CPPFLAGS" | \
12111         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12112                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12113
12114         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12115
12116 for cf_add_cflags in $cf_temp_xopen_source
12117 do
12118         case "x$cf_add_cflags" in
12119         (x-[DU]*)
12120
12121 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12122 while true
12123 do
12124         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'`
12125         test "$CFLAGS" != "$cf_old_cflag" || break
12126
12127         CFLAGS="$cf_old_cflag"
12128 done
12129
12130 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12131 while true
12132 do
12133         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'`
12134         test "$CPPFLAGS" != "$cf_old_cflag" || break
12135
12136         CPPFLAGS="$cf_old_cflag"
12137 done
12138
12139                 ;;
12140         esac
12141
12142 cf_fix_cppflags=no
12143 cf_new_cflags=
12144 cf_new_cppflags=
12145 cf_new_extra_cppflags=
12146
12147 for cf_add_cflags in $cf_add_cflags
12148 do
12149 case "$cf_fix_cppflags" in
12150 (no)
12151         case "$cf_add_cflags" in
12152         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12153                 case "$cf_add_cflags" in
12154                 (-D*)
12155                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12156
12157                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12158                                 && test -z "${cf_tst_cflags}" \
12159                                 && cf_fix_cppflags=yes
12160
12161                         if test "$cf_fix_cppflags" = yes ; then
12162
12163         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12164         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12165
12166                                 continue
12167                         elif test "${cf_tst_cflags}" = "\"'" ; then
12168
12169         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12170         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12171
12172                                 continue
12173                         fi
12174                         ;;
12175                 esac
12176                 case "$CPPFLAGS" in
12177                 (*$cf_add_cflags)
12178                         ;;
12179                 (*)
12180                         case "$cf_add_cflags" in
12181                         (-D*)
12182                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12183
12184 CPPFLAGS=`echo "$CPPFLAGS" | \
12185         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12186                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12187
12188                                 ;;
12189                         esac
12190
12191         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12192         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12193
12194                         ;;
12195                 esac
12196                 ;;
12197         (*)
12198
12199         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12200         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12201
12202                 ;;
12203         esac
12204         ;;
12205 (yes)
12206
12207         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12208         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12209
12210         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12211
12212         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12213                 && test -z "${cf_tst_cflags}" \
12214                 && cf_fix_cppflags=no
12215         ;;
12216 esac
12217 done
12218
12219 if test -n "$cf_new_cflags" ; then
12220
12221         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12222         CFLAGS="${CFLAGS}$cf_new_cflags"
12223
12224 fi
12225
12226 if test -n "$cf_new_cppflags" ; then
12227
12228         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12229         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12230
12231 fi
12232
12233 if test -n "$cf_new_extra_cppflags" ; then
12234
12235         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12236         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12237
12238 fi
12239
12240 done
12241
12242 fi
12243
12244         fi
12245 fi
12246 fi # cf_cv_posix_visible
12247
12248 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12249
12250 # Work around breakage on OS X
12251
12252 echo "$as_me:12252: checking if SIGWINCH is defined" >&5
12253 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12254 if test "${cf_cv_define_sigwinch+set}" = set; then
12255   echo $ECHO_N "(cached) $ECHO_C" >&6
12256 else
12257
12258         cat >"conftest.$ac_ext" <<_ACEOF
12259 #line 12259 "configure"
12260 #include "confdefs.h"
12261
12262 #include <sys/types.h>
12263 #include <sys/signal.h>
12264
12265 int
12266 main (void)
12267 {
12268 int x = SIGWINCH; (void)x
12269   ;
12270   return 0;
12271 }
12272 _ACEOF
12273 rm -f "conftest.$ac_objext"
12274 if { (eval echo "$as_me:12274: \"$ac_compile\"") >&5
12275   (eval $ac_compile) 2>&5
12276   ac_status=$?
12277   echo "$as_me:12277: \$? = $ac_status" >&5
12278   (exit "$ac_status"); } &&
12279          { ac_try='test -s "conftest.$ac_objext"'
12280   { (eval echo "$as_me:12280: \"$ac_try\"") >&5
12281   (eval $ac_try) 2>&5
12282   ac_status=$?
12283   echo "$as_me:12283: \$? = $ac_status" >&5
12284   (exit "$ac_status"); }; }; then
12285   cf_cv_define_sigwinch=yes
12286 else
12287   echo "$as_me: failed program was:" >&5
12288 cat "conftest.$ac_ext" >&5
12289 cat >"conftest.$ac_ext" <<_ACEOF
12290 #line 12290 "configure"
12291 #include "confdefs.h"
12292
12293 #undef _XOPEN_SOURCE
12294 #undef _POSIX_SOURCE
12295 #undef _POSIX_C_SOURCE
12296 #include <sys/types.h>
12297 #include <sys/signal.h>
12298
12299 int
12300 main (void)
12301 {
12302 int x = SIGWINCH; (void)x
12303   ;
12304   return 0;
12305 }
12306 _ACEOF
12307 rm -f "conftest.$ac_objext"
12308 if { (eval echo "$as_me:12308: \"$ac_compile\"") >&5
12309   (eval $ac_compile) 2>&5
12310   ac_status=$?
12311   echo "$as_me:12311: \$? = $ac_status" >&5
12312   (exit "$ac_status"); } &&
12313          { ac_try='test -s "conftest.$ac_objext"'
12314   { (eval echo "$as_me:12314: \"$ac_try\"") >&5
12315   (eval $ac_try) 2>&5
12316   ac_status=$?
12317   echo "$as_me:12317: \$? = $ac_status" >&5
12318   (exit "$ac_status"); }; }; then
12319   cf_cv_define_sigwinch=maybe
12320 else
12321   echo "$as_me: failed program was:" >&5
12322 cat "conftest.$ac_ext" >&5
12323 cf_cv_define_sigwinch=no
12324 fi
12325 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12326
12327 fi
12328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12329
12330 fi
12331 echo "$as_me:12331: result: $cf_cv_define_sigwinch" >&5
12332 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12333
12334 if test "$cf_cv_define_sigwinch" = maybe ; then
12335 echo "$as_me:12335: checking for actual SIGWINCH definition" >&5
12336 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12337 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12338   echo $ECHO_N "(cached) $ECHO_C" >&6
12339 else
12340
12341 cf_cv_fixup_sigwinch=unknown
12342 cf_sigwinch=32
12343 while test "$cf_sigwinch" != 1
12344 do
12345         cat >"conftest.$ac_ext" <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348
12349 #undef _XOPEN_SOURCE
12350 #undef _POSIX_SOURCE
12351 #undef _POSIX_C_SOURCE
12352 #include <sys/types.h>
12353 #include <sys/signal.h>
12354
12355 int
12356 main (void)
12357 {
12358
12359 #if SIGWINCH != $cf_sigwinch
12360 #error SIGWINCH is not $cf_sigwinch
12361 #endif
12362 int x = SIGWINCH; (void)x
12363   ;
12364   return 0;
12365 }
12366 _ACEOF
12367 rm -f "conftest.$ac_objext"
12368 if { (eval echo "$as_me:12368: \"$ac_compile\"") >&5
12369   (eval $ac_compile) 2>&5
12370   ac_status=$?
12371   echo "$as_me:12371: \$? = $ac_status" >&5
12372   (exit "$ac_status"); } &&
12373          { ac_try='test -s "conftest.$ac_objext"'
12374   { (eval echo "$as_me:12374: \"$ac_try\"") >&5
12375   (eval $ac_try) 2>&5
12376   ac_status=$?
12377   echo "$as_me:12377: \$? = $ac_status" >&5
12378   (exit "$ac_status"); }; }; then
12379   cf_cv_fixup_sigwinch=$cf_sigwinch
12380          break
12381 else
12382   echo "$as_me: failed program was:" >&5
12383 cat "conftest.$ac_ext" >&5
12384 fi
12385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12386
12387 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12388 done
12389
12390 fi
12391 echo "$as_me:12391: result: $cf_cv_fixup_sigwinch" >&5
12392 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12393
12394         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12395                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12396         fi
12397 fi
12398
12399 # Checks for CODESET support.
12400
12401 echo "$as_me:12401: checking for nl_langinfo and CODESET" >&5
12402 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12403 if test "${am_cv_langinfo_codeset+set}" = set; then
12404   echo $ECHO_N "(cached) $ECHO_C" >&6
12405 else
12406   cat >"conftest.$ac_ext" <<_ACEOF
12407 #line 12407 "configure"
12408 #include "confdefs.h"
12409
12410 $ac_includes_default
12411 #include <langinfo.h>
12412 int
12413 main (void)
12414 {
12415 char* cs = nl_langinfo(CODESET); (void)cs
12416   ;
12417   return 0;
12418 }
12419 _ACEOF
12420 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12421 if { (eval echo "$as_me:12421: \"$ac_link\"") >&5
12422   (eval $ac_link) 2>&5
12423   ac_status=$?
12424   echo "$as_me:12424: \$? = $ac_status" >&5
12425   (exit "$ac_status"); } &&
12426          { ac_try='test -s "conftest$ac_exeext"'
12427   { (eval echo "$as_me:12427: \"$ac_try\"") >&5
12428   (eval $ac_try) 2>&5
12429   ac_status=$?
12430   echo "$as_me:12430: \$? = $ac_status" >&5
12431   (exit "$ac_status"); }; }; then
12432   am_cv_langinfo_codeset=yes
12433 else
12434   echo "$as_me: failed program was:" >&5
12435 cat "conftest.$ac_ext" >&5
12436 am_cv_langinfo_codeset=no
12437 fi
12438 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12439
12440 fi
12441 echo "$as_me:12441: result: $am_cv_langinfo_codeset" >&5
12442 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12443         if test "$am_cv_langinfo_codeset" = yes; then
12444
12445 cat >>confdefs.h <<\EOF
12446 #define HAVE_LANGINFO_CODESET 1
12447 EOF
12448
12449         fi
12450
12451 # use these variables to work around a defect in gcc's fixincludes.
12452 NCURSES_OK_WCHAR_T=
12453 NCURSES_OK_WINT_T=
12454
12455 echo "$as_me:12455: checking if you want wide-character code" >&5
12456 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12457
12458 # Check whether --enable-widec or --disable-widec was given.
12459 if test "${enable_widec+set}" = set; then
12460   enableval="$enable_widec"
12461   with_widec=$enableval
12462 else
12463   with_widec=no
12464 fi;
12465 echo "$as_me:12465: result: $with_widec" >&5
12466 echo "${ECHO_T}$with_widec" >&6
12467
12468 NCURSES_WCWIDTH_GRAPHICS=1
12469
12470 if test "x$with_widec" = xyes ; then
12471         if test "x$disable_lib_suffixes" = xno ; then
12472                 LIB_SUFFIX="w${LIB_SUFFIX}"
12473         fi
12474
12475 cat >>confdefs.h <<\EOF
12476 #define USE_WIDEC_SUPPORT 1
12477 EOF
12478
12479 cat >>confdefs.h <<\EOF
12480 #define NCURSES_WIDECHAR 1
12481 EOF
12482
12483         case "$CPPFLAGS" in
12484         (*_XOPEN_SOURCE=*)
12485                 ;;
12486         (*)
12487                 { echo "$as_me:12487: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12488 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12489                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12490                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12491                 ;;
12492         esac
12493
12494 for ac_header in \
12495 wchar.h \
12496 wctype.h \
12497
12498 do
12499 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12500 echo "$as_me:12500: checking for $ac_header" >&5
12501 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12502 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12503   echo $ECHO_N "(cached) $ECHO_C" >&6
12504 else
12505   cat >"conftest.$ac_ext" <<_ACEOF
12506 #line 12506 "configure"
12507 #include "confdefs.h"
12508 #include <$ac_header>
12509 _ACEOF
12510 if { (eval echo "$as_me:12510: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12511   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12512   ac_status=$?
12513   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12514   rm -f conftest.er1
12515   cat conftest.err >&5
12516   echo "$as_me:12516: \$? = $ac_status" >&5
12517   (exit "$ac_status"); } >/dev/null; then
12518   if test -s conftest.err; then
12519     ac_cpp_err=$ac_c_preproc_warn_flag
12520   else
12521     ac_cpp_err=
12522   fi
12523 else
12524   ac_cpp_err=yes
12525 fi
12526 if test -z "$ac_cpp_err"; then
12527   eval "$as_ac_Header=yes"
12528 else
12529   echo "$as_me: failed program was:" >&5
12530   cat "conftest.$ac_ext" >&5
12531   eval "$as_ac_Header=no"
12532 fi
12533 rm -f conftest.err "conftest.$ac_ext"
12534 fi
12535 echo "$as_me:12535: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12536 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12537 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12538   cat >>confdefs.h <<EOF
12539 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12540 EOF
12541
12542 fi
12543 done
12544
12545 echo "$as_me:12545: checking if wchar.h can be used as is" >&5
12546 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12547 if test "${cf_cv_wchar_h_okay+set}" = set; then
12548   echo $ECHO_N "(cached) $ECHO_C" >&6
12549 else
12550
12551 cat >"conftest.$ac_ext" <<_ACEOF
12552 #line 12552 "configure"
12553 #include "confdefs.h"
12554
12555 $ac_includes_default
12556 #ifdef HAVE_WCHAR_H
12557 #include <wchar.h>
12558 #endif
12559 #ifdef HAVE_WCTYPE_H
12560 #include <wctype.h>
12561 #endif
12562
12563 int
12564 main (void)
12565 {
12566
12567         wint_t foo = 0;
12568         int bar = iswpunct(foo)
12569   ;
12570   return 0;
12571 }
12572 _ACEOF
12573 rm -f "conftest.$ac_objext"
12574 if { (eval echo "$as_me:12574: \"$ac_compile\"") >&5
12575   (eval $ac_compile) 2>&5
12576   ac_status=$?
12577   echo "$as_me:12577: \$? = $ac_status" >&5
12578   (exit "$ac_status"); } &&
12579          { ac_try='test -s "conftest.$ac_objext"'
12580   { (eval echo "$as_me:12580: \"$ac_try\"") >&5
12581   (eval $ac_try) 2>&5
12582   ac_status=$?
12583   echo "$as_me:12583: \$? = $ac_status" >&5
12584   (exit "$ac_status"); }; }; then
12585   cf_cv_wchar_h_okay=yes
12586 else
12587   echo "$as_me: failed program was:" >&5
12588 cat "conftest.$ac_ext" >&5
12589 cf_cv_wchar_h_okay=no
12590 fi
12591 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12592 fi
12593 echo "$as_me:12593: result: $cf_cv_wchar_h_okay" >&5
12594 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12595
12596 if test "$cf_cv_wchar_h_okay" = no
12597 then
12598
12599 echo "$as_me:12599: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12600 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12601 cat >"conftest.$ac_ext" <<_ACEOF
12602 #line 12602 "configure"
12603 #include "confdefs.h"
12604 #include <sys/types.h>
12605
12606 int
12607 main (void)
12608 {
12609
12610 #ifndef _XOPEN_SOURCE_EXTENDED
12611 #error _XOPEN_SOURCE_EXTENDED is not defined
12612 #endif
12613   ;
12614   return 0;
12615 }
12616 _ACEOF
12617 rm -f "conftest.$ac_objext"
12618 if { (eval echo "$as_me:12618: \"$ac_compile\"") >&5
12619   (eval $ac_compile) 2>&5
12620   ac_status=$?
12621   echo "$as_me:12621: \$? = $ac_status" >&5
12622   (exit "$ac_status"); } &&
12623          { ac_try='test -s "conftest.$ac_objext"'
12624   { (eval echo "$as_me:12624: \"$ac_try\"") >&5
12625   (eval $ac_try) 2>&5
12626   ac_status=$?
12627   echo "$as_me:12627: \$? = $ac_status" >&5
12628   (exit "$ac_status"); }; }; then
12629   cf_result=no
12630 else
12631   echo "$as_me: failed program was:" >&5
12632 cat "conftest.$ac_ext" >&5
12633 cf_result=yes
12634 fi
12635 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12636 echo "$as_me:12636: result: $cf_result" >&5
12637 echo "${ECHO_T}$cf_result" >&6
12638
12639 if test "$cf_result" = yes ; then
12640         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12641 elif test "x" != "x" ; then
12642         echo "$as_me:12642: checking checking for compatible value versus " >&5
12643 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12644         cat >"conftest.$ac_ext" <<_ACEOF
12645 #line 12645 "configure"
12646 #include "confdefs.h"
12647 #include <sys/types.h>
12648
12649 int
12650 main (void)
12651 {
12652
12653 #if _XOPEN_SOURCE_EXTENDED- < 0
12654 #error _XOPEN_SOURCE_EXTENDED- is negative
12655 #endif
12656   ;
12657   return 0;
12658 }
12659 _ACEOF
12660 rm -f "conftest.$ac_objext"
12661 if { (eval echo "$as_me:12661: \"$ac_compile\"") >&5
12662   (eval $ac_compile) 2>&5
12663   ac_status=$?
12664   echo "$as_me:12664: \$? = $ac_status" >&5
12665   (exit "$ac_status"); } &&
12666          { ac_try='test -s "conftest.$ac_objext"'
12667   { (eval echo "$as_me:12667: \"$ac_try\"") >&5
12668   (eval $ac_try) 2>&5
12669   ac_status=$?
12670   echo "$as_me:12670: \$? = $ac_status" >&5
12671   (exit "$ac_status"); }; }; then
12672   cf_result=yes
12673 else
12674   echo "$as_me: failed program was:" >&5
12675 cat "conftest.$ac_ext" >&5
12676 cf_result=no
12677 fi
12678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12679         echo "$as_me:12679: result: $cf_result" >&5
12680 echo "${ECHO_T}$cf_result" >&6
12681         if test "$cf_result" = no ; then
12682                 # perhaps we can override it - try...
12683                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12684         fi
12685 fi
12686
12687 fi
12688
12689 echo "$as_me:12689: checking if wcwidth agrees graphics are single-width" >&5
12690 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12691 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12692   echo $ECHO_N "(cached) $ECHO_C" >&6
12693 else
12694
12695 cat >conftest.in <<CF_EOF
12696 -       VT100 symbols
12697 0x250c  upper left corner
12698 0x2514  lower left corner
12699 0x2510  upper right corner
12700 0x2518  lower right corner
12701 0x251c  tee pointing left
12702 0x2524  tee pointing right
12703 0x2534  tee pointing up
12704 0x252c  tee pointing down
12705 0x2500  horizontal line
12706 0x2502  vertical line
12707 0x253c  large plus or crossover
12708 0x23ba  scan line 1
12709 0x23bd  scan line 9
12710 0x25c6  diamond
12711 0x2592  checker board (stipple)
12712 0x00b0  degree symbol
12713 0x00b1  plus/minus
12714 0x00b7  bullet
12715 -       Teletype 5410v1 symbols
12716 0x2190  arrow pointing left
12717 0x2192  arrow pointing right
12718 0x2193  arrow pointing down
12719 0x2191  arrow pointing up
12720 0x2592  board of squares
12721 0x2603  lantern symbol
12722 0x25ae  solid square block
12723 -       these defaults were invented for ncurses
12724 0x23bb  scan line 3
12725 0x23bc  scan line 7
12726 0x2264  less-than-or-equal-to
12727 0x2265  greater-than-or-equal-to
12728 0x03c0  greek pi
12729 0x2260  not-equal
12730 0x00a3  pound-sterling symbol
12731 -       thick-line-drawing
12732 0x250f  upper left corner
12733 0x2517  lower left corner
12734 0x2513  upper right corner
12735 0x251b  lower right corner
12736 0x2523  tee pointing left
12737 0x252b  tee pointing right
12738 0x253b  tee pointing up
12739 0x2533  tee pointing down
12740 0x2501  horizontal line
12741 0x2503  vertical line
12742 0x254b  large plus or crossover
12743 -       double-line-drawing
12744 0x2554  upper left corner
12745 0x255a  lower left corner
12746 0x2557  upper right corner
12747 0x255d  lower right corner
12748 0x2563  tee pointing left
12749 0x2560  tee pointing right
12750 0x2569  tee pointing up
12751 0x2566  tee pointing down
12752 0x2550  horizontal line
12753 0x2551  vertical line
12754 0x256c  large plus or crossover
12755 CF_EOF
12756 if test "$cross_compiling" = yes; then
12757   cf_cv_wcwidth_graphics=unknown
12758 else
12759   cat >"conftest.$ac_ext" <<_ACEOF
12760 #line 12760 "configure"
12761 #include "confdefs.h"
12762
12763 $ac_includes_default
12764
12765 #include <locale.h>
12766 #include <wchar.h>
12767
12768 #define MY_LEN 80
12769
12770 int
12771 main(void)
12772 {
12773         FILE *fp;
12774         int value;
12775         char buffer[MY_LEN + 1];
12776         char notes[MY_LEN + 1];
12777         int totals = 0;
12778         int passed = 0;
12779
12780         if (setlocale(LC_ALL, "en_US.UTF8") ||
12781                 setlocale(LC_ALL, "en_US.UTF-8") ||
12782                 setlocale(LC_ALL, "en_US.utf8") ||
12783                 setlocale(LC_ALL, "en_US.utf-8")) {
12784                 if ((fp = fopen("conftest.in", "r")) != 0) {
12785                         while (fgets(buffer, MY_LEN, fp) != 0) {
12786                                 if (*buffer == '-') {
12787                                         fprintf(stderr, "\\t%s", buffer);
12788                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12789                                         ++totals;
12790                                         if (wcwidth(value) == 1)
12791                                                 ++passed;
12792                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12793                                 } else {
12794                                         fprintf(stderr, "?\\t%s", buffer);
12795                                 }
12796                         }
12797                 }
12798         }
12799         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12800         return (totals == passed) ? 0 : 1;
12801 }
12802
12803 _ACEOF
12804 rm -f "conftest$ac_exeext"
12805 if { (eval echo "$as_me:12805: \"$ac_link\"") >&5
12806   (eval $ac_link) 2>&5
12807   ac_status=$?
12808   echo "$as_me:12808: \$? = $ac_status" >&5
12809   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12810   { (eval echo "$as_me:12810: \"$ac_try\"") >&5
12811   (eval $ac_try) 2>&5
12812   ac_status=$?
12813   echo "$as_me:12813: \$? = $ac_status" >&5
12814   (exit "$ac_status"); }; }; then
12815   cf_cv_wcwidth_graphics=yes
12816 else
12817   echo "$as_me: program exited with status $ac_status" >&5
12818 echo "$as_me: failed program was:" >&5
12819 cat "conftest.$ac_ext" >&5
12820 cf_cv_wcwidth_graphics=no
12821 fi
12822 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12823 fi
12824
12825 fi
12826 echo "$as_me:12826: result: $cf_cv_wcwidth_graphics" >&5
12827 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12828
12829         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12830
12831         # with_overwrite=no
12832         NCURSES_CH_T=cchar_t
12833
12834 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12835 do
12836 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12837 echo "$as_me:12837: checking for $ac_func" >&5
12838 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12839 if eval "test \"\${$as_ac_var+set}\" = set"; then
12840   echo $ECHO_N "(cached) $ECHO_C" >&6
12841 else
12842   cat >"conftest.$ac_ext" <<_ACEOF
12843 #line 12843 "configure"
12844 #include "confdefs.h"
12845 #define $ac_func autoconf_temporary
12846 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12847 #undef $ac_func
12848
12849 #ifdef __cplusplus
12850 extern "C"
12851 #endif
12852
12853 /* We use char because int might match the return type of a gcc2
12854    builtin and then its argument prototype would still apply.  */
12855 char $ac_func (void);
12856
12857 int
12858 main (void)
12859 {
12860
12861 /* The GNU C library defines stubs for functions which it implements
12862     to always fail with ENOSYS.  Some functions are actually named
12863     something starting with __ and the normal name is an alias.  */
12864 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12865 #error found stub for $ac_func
12866 #endif
12867
12868         return $ac_func ();
12869   ;
12870   return 0;
12871 }
12872 _ACEOF
12873 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12874 if { (eval echo "$as_me:12874: \"$ac_link\"") >&5
12875   (eval $ac_link) 2>&5
12876   ac_status=$?
12877   echo "$as_me:12877: \$? = $ac_status" >&5
12878   (exit "$ac_status"); } &&
12879          { ac_try='test -s "conftest$ac_exeext"'
12880   { (eval echo "$as_me:12880: \"$ac_try\"") >&5
12881   (eval $ac_try) 2>&5
12882   ac_status=$?
12883   echo "$as_me:12883: \$? = $ac_status" >&5
12884   (exit "$ac_status"); }; }; then
12885   eval "$as_ac_var=yes"
12886 else
12887   echo "$as_me: failed program was:" >&5
12888 cat "conftest.$ac_ext" >&5
12889 eval "$as_ac_var=no"
12890 fi
12891 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12892 fi
12893 echo "$as_me:12893: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12894 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12895 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12896   cat >>confdefs.h <<EOF
12897 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12898 EOF
12899
12900 fi
12901 done
12902
12903         if test "x$ac_cv_func_putwc" != xyes ; then
12904
12905 for ac_header in wchar.h
12906 do
12907 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12908 echo "$as_me:12908: checking for $ac_header" >&5
12909 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12910 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12911   echo $ECHO_N "(cached) $ECHO_C" >&6
12912 else
12913   cat >"conftest.$ac_ext" <<_ACEOF
12914 #line 12914 "configure"
12915 #include "confdefs.h"
12916 #include <$ac_header>
12917 _ACEOF
12918 if { (eval echo "$as_me:12918: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12919   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12920   ac_status=$?
12921   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12922   rm -f conftest.er1
12923   cat conftest.err >&5
12924   echo "$as_me:12924: \$? = $ac_status" >&5
12925   (exit "$ac_status"); } >/dev/null; then
12926   if test -s conftest.err; then
12927     ac_cpp_err=$ac_c_preproc_warn_flag
12928   else
12929     ac_cpp_err=
12930   fi
12931 else
12932   ac_cpp_err=yes
12933 fi
12934 if test -z "$ac_cpp_err"; then
12935   eval "$as_ac_Header=yes"
12936 else
12937   echo "$as_me: failed program was:" >&5
12938   cat "conftest.$ac_ext" >&5
12939   eval "$as_ac_Header=no"
12940 fi
12941 rm -f conftest.err "conftest.$ac_ext"
12942 fi
12943 echo "$as_me:12943: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12944 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12945 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12946   cat >>confdefs.h <<EOF
12947 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12948 EOF
12949
12950 fi
12951 done
12952
12953 echo "$as_me:12953: checking for multibyte character support" >&5
12954 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12955 if test "${cf_cv_utf8_lib+set}" = set; then
12956   echo $ECHO_N "(cached) $ECHO_C" >&6
12957 else
12958
12959         cf_save_LIBS="$LIBS"
12960         cat >"conftest.$ac_ext" <<_ACEOF
12961 #line 12961 "configure"
12962 #include "confdefs.h"
12963
12964 $ac_includes_default
12965 #ifdef HAVE_WCHAR_H
12966 #include <wchar.h>
12967 #endif
12968
12969 int
12970 main (void)
12971 {
12972 putwc(0,0);
12973   ;
12974   return 0;
12975 }
12976 _ACEOF
12977 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12978 if { (eval echo "$as_me:12978: \"$ac_link\"") >&5
12979   (eval $ac_link) 2>&5
12980   ac_status=$?
12981   echo "$as_me:12981: \$? = $ac_status" >&5
12982   (exit "$ac_status"); } &&
12983          { ac_try='test -s "conftest$ac_exeext"'
12984   { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985   (eval $ac_try) 2>&5
12986   ac_status=$?
12987   echo "$as_me:12987: \$? = $ac_status" >&5
12988   (exit "$ac_status"); }; }; then
12989   cf_cv_utf8_lib=yes
12990 else
12991   echo "$as_me: failed program was:" >&5
12992 cat "conftest.$ac_ext" >&5
12993
12994 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12995 # will be set on completion of the AC_TRY_LINK below.
12996 cf_cv_header_path_utf8=
12997 cf_cv_library_path_utf8=
12998
12999 echo "${as_me:-configure}:12999: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13000
13001 cf_save_LIBS="$LIBS"
13002
13003 cat >"conftest.$ac_ext" <<_ACEOF
13004 #line 13004 "configure"
13005 #include "confdefs.h"
13006
13007 #include <libutf8.h>
13008 int
13009 main (void)
13010 {
13011 putwc(0,0);
13012   ;
13013   return 0;
13014 }
13015 _ACEOF
13016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13017 if { (eval echo "$as_me:13017: \"$ac_link\"") >&5
13018   (eval $ac_link) 2>&5
13019   ac_status=$?
13020   echo "$as_me:13020: \$? = $ac_status" >&5
13021   (exit "$ac_status"); } &&
13022          { ac_try='test -s "conftest$ac_exeext"'
13023   { (eval echo "$as_me:13023: \"$ac_try\"") >&5
13024   (eval $ac_try) 2>&5
13025   ac_status=$?
13026   echo "$as_me:13026: \$? = $ac_status" >&5
13027   (exit "$ac_status"); }; }; then
13028
13029         cf_cv_find_linkage_utf8=yes
13030         cf_cv_header_path_utf8=/usr/include
13031         cf_cv_library_path_utf8=/usr/lib
13032
13033 else
13034   echo "$as_me: failed program was:" >&5
13035 cat "conftest.$ac_ext" >&5
13036
13037 LIBS="-lutf8  $cf_save_LIBS"
13038
13039 cat >"conftest.$ac_ext" <<_ACEOF
13040 #line 13040 "configure"
13041 #include "confdefs.h"
13042
13043 #include <libutf8.h>
13044 int
13045 main (void)
13046 {
13047 putwc(0,0);
13048   ;
13049   return 0;
13050 }
13051 _ACEOF
13052 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13053 if { (eval echo "$as_me:13053: \"$ac_link\"") >&5
13054   (eval $ac_link) 2>&5
13055   ac_status=$?
13056   echo "$as_me:13056: \$? = $ac_status" >&5
13057   (exit "$ac_status"); } &&
13058          { ac_try='test -s "conftest$ac_exeext"'
13059   { (eval echo "$as_me:13059: \"$ac_try\"") >&5
13060   (eval $ac_try) 2>&5
13061   ac_status=$?
13062   echo "$as_me:13062: \$? = $ac_status" >&5
13063   (exit "$ac_status"); }; }; then
13064
13065         cf_cv_find_linkage_utf8=yes
13066         cf_cv_header_path_utf8=/usr/include
13067         cf_cv_library_path_utf8=/usr/lib
13068         cf_cv_library_file_utf8="-lutf8"
13069
13070 else
13071   echo "$as_me: failed program was:" >&5
13072 cat "conftest.$ac_ext" >&5
13073
13074         cf_cv_find_linkage_utf8=no
13075         LIBS="$cf_save_LIBS"
13076
13077         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13078
13079 echo "${as_me:-configure}:13079: testing find linkage for utf8 library ..." 1>&5
13080
13081 echo "${as_me:-configure}:13081: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13082
13083         cf_save_CPPFLAGS="$CPPFLAGS"
13084         cf_test_CPPFLAGS="$CPPFLAGS"
13085
13086 cf_search=
13087
13088 # collect the current set of include-directories from compiler flags
13089 cf_header_path_list=""
13090 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13091         for cf_header_path in $CPPFLAGS $CFLAGS
13092         do
13093                 case "$cf_header_path" in
13094                 (-I*)
13095                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13096
13097 test "x$cf_header_path" != "xNONE" && \
13098 test -d "$cf_header_path" && \
13099  {
13100         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13101         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13102         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13103         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13104         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13105         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13106 }
13107
13108                         cf_header_path_list="$cf_header_path_list $cf_search"
13109                         ;;
13110                 esac
13111         done
13112 fi
13113
13114 # add the variations for the package we are looking for
13115
13116 cf_search=
13117
13118 test "x$prefix" != "xNONE" && \
13119 test -d "$prefix" && \
13120  {
13121         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13122         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13123         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13124         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13125         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13126         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13127 }
13128
13129 for cf_subdir_prefix in \
13130         /usr \
13131         /usr/local \
13132         /usr/pkg \
13133         /opt \
13134         /opt/local \
13135         $HOME
13136 do
13137
13138 test "x$cf_subdir_prefix" != "x$prefix" && \
13139 test -d "$cf_subdir_prefix" && \
13140 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13141         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13142         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13143         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13144         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13145         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13146         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13147 }
13148
13149 done
13150
13151 test "$includedir" != NONE && \
13152 test "$includedir" != "/usr/include" && \
13153 test -d "$includedir" && {
13154         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13155         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13156 }
13157
13158 test "$oldincludedir" != NONE && \
13159 test "$oldincludedir" != "/usr/include" && \
13160 test -d "$oldincludedir" && {
13161         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13162         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13163 }
13164
13165 cf_search="$cf_search $cf_header_path_list"
13166
13167         for cf_cv_header_path_utf8 in $cf_search
13168         do
13169                 if test -d "$cf_cv_header_path_utf8" ; then
13170                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13171
13172 echo "${as_me:-configure}:13172: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13173
13174                         CPPFLAGS="$cf_save_CPPFLAGS"
13175
13176         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13177         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13178
13179                         cat >"conftest.$ac_ext" <<_ACEOF
13180 #line 13180 "configure"
13181 #include "confdefs.h"
13182
13183 #include <libutf8.h>
13184 int
13185 main (void)
13186 {
13187 putwc(0,0);
13188   ;
13189   return 0;
13190 }
13191 _ACEOF
13192 rm -f "conftest.$ac_objext"
13193 if { (eval echo "$as_me:13193: \"$ac_compile\"") >&5
13194   (eval $ac_compile) 2>&5
13195   ac_status=$?
13196   echo "$as_me:13196: \$? = $ac_status" >&5
13197   (exit "$ac_status"); } &&
13198          { ac_try='test -s "conftest.$ac_objext"'
13199   { (eval echo "$as_me:13199: \"$ac_try\"") >&5
13200   (eval $ac_try) 2>&5
13201   ac_status=$?
13202   echo "$as_me:13202: \$? = $ac_status" >&5
13203   (exit "$ac_status"); }; }; then
13204
13205                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13206
13207 echo "${as_me:-configure}:13207: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13208
13209                                 cf_cv_find_linkage_utf8=maybe
13210                                 cf_test_CPPFLAGS="$CPPFLAGS"
13211                                 break
13212 else
13213   echo "$as_me: failed program was:" >&5
13214 cat "conftest.$ac_ext" >&5
13215
13216                                 CPPFLAGS="$cf_save_CPPFLAGS"
13217
13218 fi
13219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13220                 fi
13221         done
13222
13223         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13224
13225 echo "${as_me:-configure}:13225: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13226
13227                 cf_save_LIBS="$LIBS"
13228                 cf_save_LDFLAGS="$LDFLAGS"
13229
13230                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13231
13232 cf_search=
13233 cf_library_path_list=""
13234 if test -n "${LDFLAGS}${LIBS}" ; then
13235         for cf_library_path in $LDFLAGS $LIBS
13236         do
13237                 case "$cf_library_path" in
13238                 (-L*)
13239                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13240
13241 test "x$cf_library_path" != "xNONE" && \
13242 test -d "$cf_library_path" && \
13243  {
13244         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13245         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13246         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13247         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13248         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13249         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13250 }
13251
13252                         cf_library_path_list="$cf_library_path_list $cf_search"
13253                         ;;
13254                 esac
13255         done
13256 fi
13257
13258 cf_search=
13259
13260 test "x$prefix" != "xNONE" && \
13261 test -d "$prefix" && \
13262  {
13263         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13264         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13265         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13266         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13267         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13268         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13269 }
13270
13271 for cf_subdir_prefix in \
13272         /usr \
13273         /usr/local \
13274         /usr/pkg \
13275         /opt \
13276         /opt/local \
13277         $HOME
13278 do
13279
13280 test "x$cf_subdir_prefix" != "x$prefix" && \
13281 test -d "$cf_subdir_prefix" && \
13282 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13283         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13284         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13285         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13286         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13287         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13288         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13289 }
13290
13291 done
13292
13293 cf_search="$cf_library_path_list $cf_search"
13294
13295                         for cf_cv_library_path_utf8 in $cf_search
13296                         do
13297                                 if test -d "$cf_cv_library_path_utf8" ; then
13298                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13299
13300 echo "${as_me:-configure}:13300: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13301
13302                                         CPPFLAGS="$cf_test_CPPFLAGS"
13303                                         LIBS="-lutf8  $cf_save_LIBS"
13304                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
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                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13332
13333 echo "${as_me:-configure}:13333: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13334
13335                                         cf_cv_find_linkage_utf8=yes
13336                                         cf_cv_library_file_utf8="-lutf8"
13337                                         break
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341
13342                                         CPPFLAGS="$cf_save_CPPFLAGS"
13343                                         LIBS="$cf_save_LIBS"
13344                                         LDFLAGS="$cf_save_LDFLAGS"
13345
13346 fi
13347 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13348                                 fi
13349                         done
13350                         CPPFLAGS="$cf_save_CPPFLAGS"
13351                         LDFLAGS="$cf_save_LDFLAGS"
13352                 fi
13353
13354         else
13355                 cf_cv_find_linkage_utf8=no
13356         fi
13357
13358 fi
13359 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13360
13361 fi
13362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13363
13364 LIBS="$cf_save_LIBS"
13365
13366 if test "$cf_cv_find_linkage_utf8" = yes ; then
13367 cf_cv_utf8_lib=add-on
13368 else
13369 cf_cv_utf8_lib=no
13370 fi
13371
13372 fi
13373 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13374 fi
13375 echo "$as_me:13375: result: $cf_cv_utf8_lib" >&5
13376 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13377
13378 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13379 # ncurses/ncursesw:
13380 if test "$cf_cv_utf8_lib" = "add-on" ; then
13381
13382 cat >>confdefs.h <<\EOF
13383 #define HAVE_LIBUTF8_H 1
13384 EOF
13385
13386 if test -n "$cf_cv_header_path_utf8" ; then
13387   for cf_add_incdir in $cf_cv_header_path_utf8
13388   do
13389         while test "$cf_add_incdir" != /usr/include
13390         do
13391           if test -d "$cf_add_incdir"
13392           then
13393                 cf_have_incdir=no
13394                 if test -n "$CFLAGS$CPPFLAGS" ; then
13395                   # a loop is needed to ensure we can add subdirs of existing dirs
13396                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13397                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13398                           cf_have_incdir=yes; break
13399                         fi
13400                   done
13401                 fi
13402
13403                 if test "$cf_have_incdir" = no ; then
13404                   if test "$cf_add_incdir" = /usr/local/include ; then
13405                         if test "$GCC" = yes
13406                         then
13407                           cf_save_CPPFLAGS=$CPPFLAGS
13408
13409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13410         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13411
13412                           cat >"conftest.$ac_ext" <<_ACEOF
13413 #line 13413 "configure"
13414 #include "confdefs.h"
13415 #include <stdio.h>
13416 int
13417 main (void)
13418 {
13419 printf("Hello")
13420   ;
13421   return 0;
13422 }
13423 _ACEOF
13424 rm -f "conftest.$ac_objext"
13425 if { (eval echo "$as_me:13425: \"$ac_compile\"") >&5
13426   (eval $ac_compile) 2>&5
13427   ac_status=$?
13428   echo "$as_me:13428: \$? = $ac_status" >&5
13429   (exit "$ac_status"); } &&
13430          { ac_try='test -s "conftest.$ac_objext"'
13431   { (eval echo "$as_me:13431: \"$ac_try\"") >&5
13432   (eval $ac_try) 2>&5
13433   ac_status=$?
13434   echo "$as_me:13434: \$? = $ac_status" >&5
13435   (exit "$ac_status"); }; }; then
13436   :
13437 else
13438   echo "$as_me: failed program was:" >&5
13439 cat "conftest.$ac_ext" >&5
13440 cf_have_incdir=yes
13441 fi
13442 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13443                           CPPFLAGS=$cf_save_CPPFLAGS
13444                         fi
13445                   fi
13446                 fi
13447
13448                 if test "$cf_have_incdir" = no ; then
13449                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13450
13451 echo "${as_me:-configure}:13451: testing adding $cf_add_incdir to include-path ..." 1>&5
13452
13453                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13454
13455                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13456                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13457                   cf_add_incdir="$cf_top_incdir"
13458                 else
13459                   break
13460                 fi
13461           else
13462                 break
13463           fi
13464         done
13465   done
13466 fi
13467
13468 if test -n "$cf_cv_library_path_utf8" ; then
13469         for cf_add_libdir in $cf_cv_library_path_utf8
13470         do
13471                 if test "$cf_add_libdir" = /usr/lib ; then
13472                         :
13473                 elif test -d "$cf_add_libdir"
13474                 then
13475                         cf_have_libdir=no
13476                         if test -n "$LDFLAGS$LIBS" ; then
13477                                 # a loop is needed to ensure we can add subdirs of existing dirs
13478                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13479                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13480                                                 cf_have_libdir=yes; break
13481                                         fi
13482                                 done
13483                         fi
13484                         if test "$cf_have_libdir" = no ; then
13485                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13486
13487 echo "${as_me:-configure}:13487: testing adding $cf_add_libdir to library-path ..." 1>&5
13488
13489                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13490                         fi
13491                 fi
13492         done
13493 fi
13494
13495 cf_add_libs="$LIBS"
13496 # reverse order
13497 cf_add_0lib=
13498 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13499 # filter duplicates
13500 for cf_add_1lib in $cf_add_0lib; do
13501         for cf_add_2lib in $cf_add_libs; do
13502                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13503                         cf_add_1lib=
13504                         break
13505                 fi
13506         done
13507         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13508 done
13509 LIBS="$cf_add_libs"
13510
13511 fi
13512
13513                 if test "$cf_cv_utf8_lib" != no ; then
13514                         NCURSES_LIBUTF8=1
13515                 fi
13516         fi
13517
13518 # This is needed on Tru64 5.0 to declare mbstate_t
13519 echo "$as_me:13519: checking if we must include wchar.h to declare mbstate_t" >&5
13520 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13521 if test "${cf_cv_mbstate_t+set}" = set; then
13522   echo $ECHO_N "(cached) $ECHO_C" >&6
13523 else
13524
13525 cat >"conftest.$ac_ext" <<_ACEOF
13526 #line 13526 "configure"
13527 #include "confdefs.h"
13528
13529 #include <stdlib.h>
13530 #include <stdarg.h>
13531 #include <stdio.h>
13532 #ifdef HAVE_LIBUTF8_H
13533 #include <libutf8.h>
13534 #endif
13535 int
13536 main (void)
13537 {
13538 mbstate_t state
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 rm -f "conftest.$ac_objext"
13544 if { (eval echo "$as_me:13544: \"$ac_compile\"") >&5
13545   (eval $ac_compile) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit "$ac_status"); } &&
13549          { ac_try='test -s "conftest.$ac_objext"'
13550   { (eval echo "$as_me:13550: \"$ac_try\"") >&5
13551   (eval $ac_try) 2>&5
13552   ac_status=$?
13553   echo "$as_me:13553: \$? = $ac_status" >&5
13554   (exit "$ac_status"); }; }; then
13555   cf_cv_mbstate_t=no
13556 else
13557   echo "$as_me: failed program was:" >&5
13558 cat "conftest.$ac_ext" >&5
13559 cat >"conftest.$ac_ext" <<_ACEOF
13560 #line 13560 "configure"
13561 #include "confdefs.h"
13562
13563 #include <stdlib.h>
13564 #include <stdarg.h>
13565 #include <stdio.h>
13566 #include <wchar.h>
13567 #ifdef HAVE_LIBUTF8_H
13568 #include <libutf8.h>
13569 #endif
13570 int
13571 main (void)
13572 {
13573 mbstate_t value
13574   ;
13575   return 0;
13576 }
13577 _ACEOF
13578 rm -f "conftest.$ac_objext"
13579 if { (eval echo "$as_me:13579: \"$ac_compile\"") >&5
13580   (eval $ac_compile) 2>&5
13581   ac_status=$?
13582   echo "$as_me:13582: \$? = $ac_status" >&5
13583   (exit "$ac_status"); } &&
13584          { ac_try='test -s "conftest.$ac_objext"'
13585   { (eval echo "$as_me:13585: \"$ac_try\"") >&5
13586   (eval $ac_try) 2>&5
13587   ac_status=$?
13588   echo "$as_me:13588: \$? = $ac_status" >&5
13589   (exit "$ac_status"); }; }; then
13590   cf_cv_mbstate_t=yes
13591 else
13592   echo "$as_me: failed program was:" >&5
13593 cat "conftest.$ac_ext" >&5
13594 cf_cv_mbstate_t=unknown
13595 fi
13596 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13597 fi
13598 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13599 fi
13600 echo "$as_me:13600: result: $cf_cv_mbstate_t" >&5
13601 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13602
13603 if test "$cf_cv_mbstate_t" = yes ; then
13604
13605 cat >>confdefs.h <<\EOF
13606 #define NEED_WCHAR_H 1
13607 EOF
13608
13609         NEED_WCHAR_H=1
13610 fi
13611
13612 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13613 if test "$cf_cv_mbstate_t" = unknown ; then
13614         NCURSES_MBSTATE_T=1
13615 fi
13616
13617 # This is needed on Tru64 5.0 to declare wchar_t
13618 echo "$as_me:13618: checking if we must include wchar.h to declare wchar_t" >&5
13619 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13620 if test "${cf_cv_wchar_t+set}" = set; then
13621   echo $ECHO_N "(cached) $ECHO_C" >&6
13622 else
13623
13624 cat >"conftest.$ac_ext" <<_ACEOF
13625 #line 13625 "configure"
13626 #include "confdefs.h"
13627
13628 #include <stdlib.h>
13629 #include <stdarg.h>
13630 #include <stdio.h>
13631 #ifdef HAVE_LIBUTF8_H
13632 #include <libutf8.h>
13633 #endif
13634 int
13635 main (void)
13636 {
13637 wchar_t state
13638   ;
13639   return 0;
13640 }
13641 _ACEOF
13642 rm -f "conftest.$ac_objext"
13643 if { (eval echo "$as_me:13643: \"$ac_compile\"") >&5
13644   (eval $ac_compile) 2>&5
13645   ac_status=$?
13646   echo "$as_me:13646: \$? = $ac_status" >&5
13647   (exit "$ac_status"); } &&
13648          { ac_try='test -s "conftest.$ac_objext"'
13649   { (eval echo "$as_me:13649: \"$ac_try\"") >&5
13650   (eval $ac_try) 2>&5
13651   ac_status=$?
13652   echo "$as_me:13652: \$? = $ac_status" >&5
13653   (exit "$ac_status"); }; }; then
13654   cf_cv_wchar_t=no
13655 else
13656   echo "$as_me: failed program was:" >&5
13657 cat "conftest.$ac_ext" >&5
13658 cat >"conftest.$ac_ext" <<_ACEOF
13659 #line 13659 "configure"
13660 #include "confdefs.h"
13661
13662 #include <stdlib.h>
13663 #include <stdarg.h>
13664 #include <stdio.h>
13665 #include <wchar.h>
13666 #ifdef HAVE_LIBUTF8_H
13667 #include <libutf8.h>
13668 #endif
13669 int
13670 main (void)
13671 {
13672 wchar_t value
13673   ;
13674   return 0;
13675 }
13676 _ACEOF
13677 rm -f "conftest.$ac_objext"
13678 if { (eval echo "$as_me:13678: \"$ac_compile\"") >&5
13679   (eval $ac_compile) 2>&5
13680   ac_status=$?
13681   echo "$as_me:13681: \$? = $ac_status" >&5
13682   (exit "$ac_status"); } &&
13683          { ac_try='test -s "conftest.$ac_objext"'
13684   { (eval echo "$as_me:13684: \"$ac_try\"") >&5
13685   (eval $ac_try) 2>&5
13686   ac_status=$?
13687   echo "$as_me:13687: \$? = $ac_status" >&5
13688   (exit "$ac_status"); }; }; then
13689   cf_cv_wchar_t=yes
13690 else
13691   echo "$as_me: failed program was:" >&5
13692 cat "conftest.$ac_ext" >&5
13693 cf_cv_wchar_t=unknown
13694 fi
13695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13696 fi
13697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13698 fi
13699 echo "$as_me:13699: result: $cf_cv_wchar_t" >&5
13700 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13701
13702 if test "$cf_cv_wchar_t" = yes ; then
13703
13704 cat >>confdefs.h <<\EOF
13705 #define NEED_WCHAR_H 1
13706 EOF
13707
13708         NEED_WCHAR_H=1
13709 fi
13710
13711 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13712 if test "$cf_cv_wchar_t" = unknown ; then
13713         NCURSES_WCHAR_T=1
13714 fi
13715
13716 # if we find wchar_t in either place, use substitution to provide a fallback.
13717 if test "$cf_cv_wchar_t" != unknown ; then
13718         NCURSES_OK_WCHAR_T=1
13719 fi
13720
13721 # This is needed on Tru64 5.0 to declare wint_t
13722 echo "$as_me:13722: checking if we must include wchar.h to declare wint_t" >&5
13723 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13724 if test "${cf_cv_wint_t+set}" = set; then
13725   echo $ECHO_N "(cached) $ECHO_C" >&6
13726 else
13727
13728 cat >"conftest.$ac_ext" <<_ACEOF
13729 #line 13729 "configure"
13730 #include "confdefs.h"
13731
13732 #include <stdlib.h>
13733 #include <stdarg.h>
13734 #include <stdio.h>
13735 #ifdef HAVE_LIBUTF8_H
13736 #include <libutf8.h>
13737 #endif
13738 int
13739 main (void)
13740 {
13741 wint_t state
13742   ;
13743   return 0;
13744 }
13745 _ACEOF
13746 rm -f "conftest.$ac_objext"
13747 if { (eval echo "$as_me:13747: \"$ac_compile\"") >&5
13748   (eval $ac_compile) 2>&5
13749   ac_status=$?
13750   echo "$as_me:13750: \$? = $ac_status" >&5
13751   (exit "$ac_status"); } &&
13752          { ac_try='test -s "conftest.$ac_objext"'
13753   { (eval echo "$as_me:13753: \"$ac_try\"") >&5
13754   (eval $ac_try) 2>&5
13755   ac_status=$?
13756   echo "$as_me:13756: \$? = $ac_status" >&5
13757   (exit "$ac_status"); }; }; then
13758   cf_cv_wint_t=no
13759 else
13760   echo "$as_me: failed program was:" >&5
13761 cat "conftest.$ac_ext" >&5
13762 cat >"conftest.$ac_ext" <<_ACEOF
13763 #line 13763 "configure"
13764 #include "confdefs.h"
13765
13766 #include <stdlib.h>
13767 #include <stdarg.h>
13768 #include <stdio.h>
13769 #include <wchar.h>
13770 #ifdef HAVE_LIBUTF8_H
13771 #include <libutf8.h>
13772 #endif
13773 int
13774 main (void)
13775 {
13776 wint_t value
13777   ;
13778   return 0;
13779 }
13780 _ACEOF
13781 rm -f "conftest.$ac_objext"
13782 if { (eval echo "$as_me:13782: \"$ac_compile\"") >&5
13783   (eval $ac_compile) 2>&5
13784   ac_status=$?
13785   echo "$as_me:13785: \$? = $ac_status" >&5
13786   (exit "$ac_status"); } &&
13787          { ac_try='test -s "conftest.$ac_objext"'
13788   { (eval echo "$as_me:13788: \"$ac_try\"") >&5
13789   (eval $ac_try) 2>&5
13790   ac_status=$?
13791   echo "$as_me:13791: \$? = $ac_status" >&5
13792   (exit "$ac_status"); }; }; then
13793   cf_cv_wint_t=yes
13794 else
13795   echo "$as_me: failed program was:" >&5
13796 cat "conftest.$ac_ext" >&5
13797 cf_cv_wint_t=unknown
13798 fi
13799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13800 fi
13801 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13802 fi
13803 echo "$as_me:13803: result: $cf_cv_wint_t" >&5
13804 echo "${ECHO_T}$cf_cv_wint_t" >&6
13805
13806 if test "$cf_cv_wint_t" = yes ; then
13807
13808 cat >>confdefs.h <<\EOF
13809 #define NEED_WCHAR_H 1
13810 EOF
13811
13812         NEED_WCHAR_H=1
13813 fi
13814
13815 # if we do not find wint_t in either place, use substitution to provide a fallback.
13816 if test "$cf_cv_wint_t" = unknown ; then
13817         NCURSES_WINT_T=1
13818 fi
13819
13820 # if we find wint_t in either place, use substitution to provide a fallback.
13821 if test "$cf_cv_wint_t" != unknown ; then
13822         NCURSES_OK_WINT_T=1
13823 fi
13824
13825         if test "$NCURSES_MBSTATE_T" != 0; then
13826
13827 cat >>confdefs.h <<\EOF
13828 #define NEED_MBSTATE_T_DEF 1
13829 EOF
13830
13831         fi
13832 fi
13833
13834 ###   use option --disable-lp64 to allow long chtype
13835 echo "$as_me:13835: checking whether to enable _LP64 definition in curses.h" >&5
13836 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13837
13838 # Check whether --enable-lp64 or --disable-lp64 was given.
13839 if test "${enable_lp64+set}" = set; then
13840   enableval="$enable_lp64"
13841   with_lp64=$enableval
13842 else
13843   with_lp64=$cf_dft_with_lp64
13844 fi;
13845 echo "$as_me:13845: result: $with_lp64" >&5
13846 echo "${ECHO_T}$with_lp64" >&6
13847
13848 if test "x$with_lp64" = xyes ; then
13849         cf_cv_enable_lp64=1
13850 else
13851         cf_cv_enable_lp64=0
13852 fi
13853
13854 # Check whether --enable-largefile or --disable-largefile was given.
13855 if test "${enable_largefile+set}" = set; then
13856   enableval="$enable_largefile"
13857
13858 fi;
13859 if test "$enable_largefile" != no; then
13860
13861   echo "$as_me:13861: checking for special C compiler options needed for large files" >&5
13862 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13863 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13864   echo $ECHO_N "(cached) $ECHO_C" >&6
13865 else
13866   ac_cv_sys_largefile_CC=no
13867      if test "$GCC" != yes; then
13868        ac_save_CC=$CC
13869        while :; do
13870          # IRIX 6.2 and later do not support large files by default,
13871          # so use the C compiler's -n32 option if that helps.
13872          cat >"conftest.$ac_ext" <<_ACEOF
13873 #line 13873 "configure"
13874 #include "confdefs.h"
13875 #include <sys/types.h>
13876  /* Check that off_t can represent 2**63 - 1 correctly.
13877     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13878     since some C++ compilers masquerading as C compilers
13879     incorrectly reject 9223372036854775807.  */
13880 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13881   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13882                        && LARGE_OFF_T % 2147483647 == 1)
13883                       ? 1 : -1];
13884 int
13885 main (void)
13886 {
13887
13888   ;
13889   return 0;
13890 }
13891 _ACEOF
13892          rm -f "conftest.$ac_objext"
13893 if { (eval echo "$as_me:13893: \"$ac_compile\"") >&5
13894   (eval $ac_compile) 2>&5
13895   ac_status=$?
13896   echo "$as_me:13896: \$? = $ac_status" >&5
13897   (exit "$ac_status"); } &&
13898          { ac_try='test -s "conftest.$ac_objext"'
13899   { (eval echo "$as_me:13899: \"$ac_try\"") >&5
13900   (eval $ac_try) 2>&5
13901   ac_status=$?
13902   echo "$as_me:13902: \$? = $ac_status" >&5
13903   (exit "$ac_status"); }; }; then
13904   break
13905 else
13906   echo "$as_me: failed program was:" >&5
13907 cat "conftest.$ac_ext" >&5
13908 fi
13909 rm -f "conftest.$ac_objext"
13910          CC="$CC -n32"
13911          rm -f "conftest.$ac_objext"
13912 if { (eval echo "$as_me:13912: \"$ac_compile\"") >&5
13913   (eval $ac_compile) 2>&5
13914   ac_status=$?
13915   echo "$as_me:13915: \$? = $ac_status" >&5
13916   (exit "$ac_status"); } &&
13917          { ac_try='test -s "conftest.$ac_objext"'
13918   { (eval echo "$as_me:13918: \"$ac_try\"") >&5
13919   (eval $ac_try) 2>&5
13920   ac_status=$?
13921   echo "$as_me:13921: \$? = $ac_status" >&5
13922   (exit "$ac_status"); }; }; then
13923   ac_cv_sys_largefile_CC=' -n32'; break
13924 else
13925   echo "$as_me: failed program was:" >&5
13926 cat "conftest.$ac_ext" >&5
13927 fi
13928 rm -f "conftest.$ac_objext"
13929          break
13930        done
13931        CC=$ac_save_CC
13932        rm -f "conftest.$ac_ext"
13933     fi
13934 fi
13935 echo "$as_me:13935: result: $ac_cv_sys_largefile_CC" >&5
13936 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13937   if test "$ac_cv_sys_largefile_CC" != no; then
13938     CC=$CC$ac_cv_sys_largefile_CC
13939   fi
13940
13941   echo "$as_me:13941: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13942 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13943 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13944   echo $ECHO_N "(cached) $ECHO_C" >&6
13945 else
13946   while :; do
13947   ac_cv_sys_file_offset_bits=no
13948   cat >"conftest.$ac_ext" <<_ACEOF
13949 #line 13949 "configure"
13950 #include "confdefs.h"
13951 #include <sys/types.h>
13952  /* Check that off_t can represent 2**63 - 1 correctly.
13953     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13954     since some C++ compilers masquerading as C compilers
13955     incorrectly reject 9223372036854775807.  */
13956 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13957   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13958                        && LARGE_OFF_T % 2147483647 == 1)
13959                       ? 1 : -1];
13960 int
13961 main (void)
13962 {
13963
13964   ;
13965   return 0;
13966 }
13967 _ACEOF
13968 rm -f "conftest.$ac_objext"
13969 if { (eval echo "$as_me:13969: \"$ac_compile\"") >&5
13970   (eval $ac_compile) 2>&5
13971   ac_status=$?
13972   echo "$as_me:13972: \$? = $ac_status" >&5
13973   (exit "$ac_status"); } &&
13974          { ac_try='test -s "conftest.$ac_objext"'
13975   { (eval echo "$as_me:13975: \"$ac_try\"") >&5
13976   (eval $ac_try) 2>&5
13977   ac_status=$?
13978   echo "$as_me:13978: \$? = $ac_status" >&5
13979   (exit "$ac_status"); }; }; then
13980   break
13981 else
13982   echo "$as_me: failed program was:" >&5
13983 cat "conftest.$ac_ext" >&5
13984 fi
13985 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13986   cat >"conftest.$ac_ext" <<_ACEOF
13987 #line 13987 "configure"
13988 #include "confdefs.h"
13989 #define _FILE_OFFSET_BITS 64
13990 #include <sys/types.h>
13991  /* Check that off_t can represent 2**63 - 1 correctly.
13992     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13993     since some C++ compilers masquerading as C compilers
13994     incorrectly reject 9223372036854775807.  */
13995 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13996   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13997                        && LARGE_OFF_T % 2147483647 == 1)
13998                       ? 1 : -1];
13999 int
14000 main (void)
14001 {
14002
14003   ;
14004   return 0;
14005 }
14006 _ACEOF
14007 rm -f "conftest.$ac_objext"
14008 if { (eval echo "$as_me:14008: \"$ac_compile\"") >&5
14009   (eval $ac_compile) 2>&5
14010   ac_status=$?
14011   echo "$as_me:14011: \$? = $ac_status" >&5
14012   (exit "$ac_status"); } &&
14013          { ac_try='test -s "conftest.$ac_objext"'
14014   { (eval echo "$as_me:14014: \"$ac_try\"") >&5
14015   (eval $ac_try) 2>&5
14016   ac_status=$?
14017   echo "$as_me:14017: \$? = $ac_status" >&5
14018   (exit "$ac_status"); }; }; then
14019   ac_cv_sys_file_offset_bits=64; break
14020 else
14021   echo "$as_me: failed program was:" >&5
14022 cat "conftest.$ac_ext" >&5
14023 fi
14024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14025   break
14026 done
14027 fi
14028 echo "$as_me:14028: result: $ac_cv_sys_file_offset_bits" >&5
14029 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14030 if test "$ac_cv_sys_file_offset_bits" != no; then
14031
14032 cat >>confdefs.h <<EOF
14033 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14034 EOF
14035
14036 fi
14037 rm -rf conftest*
14038   echo "$as_me:14038: checking for _LARGE_FILES value needed for large files" >&5
14039 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14040 if test "${ac_cv_sys_large_files+set}" = set; then
14041   echo $ECHO_N "(cached) $ECHO_C" >&6
14042 else
14043   while :; do
14044   ac_cv_sys_large_files=no
14045   cat >"conftest.$ac_ext" <<_ACEOF
14046 #line 14046 "configure"
14047 #include "confdefs.h"
14048 #include <sys/types.h>
14049  /* Check that off_t can represent 2**63 - 1 correctly.
14050     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14051     since some C++ compilers masquerading as C compilers
14052     incorrectly reject 9223372036854775807.  */
14053 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14054   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14055                        && LARGE_OFF_T % 2147483647 == 1)
14056                       ? 1 : -1];
14057 int
14058 main (void)
14059 {
14060
14061   ;
14062   return 0;
14063 }
14064 _ACEOF
14065 rm -f "conftest.$ac_objext"
14066 if { (eval echo "$as_me:14066: \"$ac_compile\"") >&5
14067   (eval $ac_compile) 2>&5
14068   ac_status=$?
14069   echo "$as_me:14069: \$? = $ac_status" >&5
14070   (exit "$ac_status"); } &&
14071          { ac_try='test -s "conftest.$ac_objext"'
14072   { (eval echo "$as_me:14072: \"$ac_try\"") >&5
14073   (eval $ac_try) 2>&5
14074   ac_status=$?
14075   echo "$as_me:14075: \$? = $ac_status" >&5
14076   (exit "$ac_status"); }; }; then
14077   break
14078 else
14079   echo "$as_me: failed program was:" >&5
14080 cat "conftest.$ac_ext" >&5
14081 fi
14082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14083   cat >"conftest.$ac_ext" <<_ACEOF
14084 #line 14084 "configure"
14085 #include "confdefs.h"
14086 #define _LARGE_FILES 1
14087 #include <sys/types.h>
14088  /* Check that off_t can represent 2**63 - 1 correctly.
14089     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14090     since some C++ compilers masquerading as C compilers
14091     incorrectly reject 9223372036854775807.  */
14092 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14093   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14094                        && LARGE_OFF_T % 2147483647 == 1)
14095                       ? 1 : -1];
14096 int
14097 main (void)
14098 {
14099
14100   ;
14101   return 0;
14102 }
14103 _ACEOF
14104 rm -f "conftest.$ac_objext"
14105 if { (eval echo "$as_me:14105: \"$ac_compile\"") >&5
14106   (eval $ac_compile) 2>&5
14107   ac_status=$?
14108   echo "$as_me:14108: \$? = $ac_status" >&5
14109   (exit "$ac_status"); } &&
14110          { ac_try='test -s "conftest.$ac_objext"'
14111   { (eval echo "$as_me:14111: \"$ac_try\"") >&5
14112   (eval $ac_try) 2>&5
14113   ac_status=$?
14114   echo "$as_me:14114: \$? = $ac_status" >&5
14115   (exit "$ac_status"); }; }; then
14116   ac_cv_sys_large_files=1; break
14117 else
14118   echo "$as_me: failed program was:" >&5
14119 cat "conftest.$ac_ext" >&5
14120 fi
14121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14122   break
14123 done
14124 fi
14125 echo "$as_me:14125: result: $ac_cv_sys_large_files" >&5
14126 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14127 if test "$ac_cv_sys_large_files" != no; then
14128
14129 cat >>confdefs.h <<EOF
14130 #define _LARGE_FILES $ac_cv_sys_large_files
14131 EOF
14132
14133 fi
14134 rm -rf conftest*
14135 fi
14136
14137         if test "$enable_largefile" != no ; then
14138         echo "$as_me:14138: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14139 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14140 if test "${ac_cv_sys_largefile_source+set}" = set; then
14141   echo $ECHO_N "(cached) $ECHO_C" >&6
14142 else
14143   while :; do
14144   ac_cv_sys_largefile_source=no
14145   cat >"conftest.$ac_ext" <<_ACEOF
14146 #line 14146 "configure"
14147 #include "confdefs.h"
14148 #include <stdio.h>
14149 int
14150 main (void)
14151 {
14152 return !fseeko;
14153   ;
14154   return 0;
14155 }
14156 _ACEOF
14157 rm -f "conftest.$ac_objext"
14158 if { (eval echo "$as_me:14158: \"$ac_compile\"") >&5
14159   (eval $ac_compile) 2>&5
14160   ac_status=$?
14161   echo "$as_me:14161: \$? = $ac_status" >&5
14162   (exit "$ac_status"); } &&
14163          { ac_try='test -s "conftest.$ac_objext"'
14164   { (eval echo "$as_me:14164: \"$ac_try\"") >&5
14165   (eval $ac_try) 2>&5
14166   ac_status=$?
14167   echo "$as_me:14167: \$? = $ac_status" >&5
14168   (exit "$ac_status"); }; }; then
14169   break
14170 else
14171   echo "$as_me: failed program was:" >&5
14172 cat "conftest.$ac_ext" >&5
14173 fi
14174 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14175   cat >"conftest.$ac_ext" <<_ACEOF
14176 #line 14176 "configure"
14177 #include "confdefs.h"
14178 #define _LARGEFILE_SOURCE 1
14179 #include <stdio.h>
14180 int
14181 main (void)
14182 {
14183 return !fseeko;
14184   ;
14185   return 0;
14186 }
14187 _ACEOF
14188 rm -f "conftest.$ac_objext"
14189 if { (eval echo "$as_me:14189: \"$ac_compile\"") >&5
14190   (eval $ac_compile) 2>&5
14191   ac_status=$?
14192   echo "$as_me:14192: \$? = $ac_status" >&5
14193   (exit "$ac_status"); } &&
14194          { ac_try='test -s "conftest.$ac_objext"'
14195   { (eval echo "$as_me:14195: \"$ac_try\"") >&5
14196   (eval $ac_try) 2>&5
14197   ac_status=$?
14198   echo "$as_me:14198: \$? = $ac_status" >&5
14199   (exit "$ac_status"); }; }; then
14200   ac_cv_sys_largefile_source=1; break
14201 else
14202   echo "$as_me: failed program was:" >&5
14203 cat "conftest.$ac_ext" >&5
14204 fi
14205 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14206   break
14207 done
14208 fi
14209 echo "$as_me:14209: result: $ac_cv_sys_largefile_source" >&5
14210 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14211 if test "$ac_cv_sys_largefile_source" != no; then
14212
14213 cat >>confdefs.h <<EOF
14214 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14215 EOF
14216
14217 fi
14218 rm -rf conftest*
14219
14220 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14221 # in glibc 2.1.3, but that breaks too many other things.
14222 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14223 echo "$as_me:14223: checking for fseeko" >&5
14224 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14225 if test "${ac_cv_func_fseeko+set}" = set; then
14226   echo $ECHO_N "(cached) $ECHO_C" >&6
14227 else
14228   cat >"conftest.$ac_ext" <<_ACEOF
14229 #line 14229 "configure"
14230 #include "confdefs.h"
14231 #include <stdio.h>
14232 int
14233 main (void)
14234 {
14235 return fseeko && fseeko (stdin, 0, 0);
14236   ;
14237   return 0;
14238 }
14239 _ACEOF
14240 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14241 if { (eval echo "$as_me:14241: \"$ac_link\"") >&5
14242   (eval $ac_link) 2>&5
14243   ac_status=$?
14244   echo "$as_me:14244: \$? = $ac_status" >&5
14245   (exit "$ac_status"); } &&
14246          { ac_try='test -s "conftest$ac_exeext"'
14247   { (eval echo "$as_me:14247: \"$ac_try\"") >&5
14248   (eval $ac_try) 2>&5
14249   ac_status=$?
14250   echo "$as_me:14250: \$? = $ac_status" >&5
14251   (exit "$ac_status"); }; }; then
14252   ac_cv_func_fseeko=yes
14253 else
14254   echo "$as_me: failed program was:" >&5
14255 cat "conftest.$ac_ext" >&5
14256 ac_cv_func_fseeko=no
14257 fi
14258 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14259 fi
14260 echo "$as_me:14260: result: $ac_cv_func_fseeko" >&5
14261 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14262 if test $ac_cv_func_fseeko = yes; then
14263
14264 cat >>confdefs.h <<\EOF
14265 #define HAVE_FSEEKO 1
14266 EOF
14267
14268 fi
14269
14270         # Normally we would collect these definitions in the config.h,
14271         # but (like _XOPEN_SOURCE), some environments rely on having these
14272         # defined before any of the system headers are included.  Another
14273         # case comes up with C++, e.g., on AIX the compiler compiles the
14274         # header files by themselves before looking at the body files it is
14275         # told to compile.  For ncurses, those header files do not include
14276         # the config.h
14277         if test "$ac_cv_sys_large_files" != no
14278         then
14279
14280         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14281         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14282
14283         fi
14284         if test "$ac_cv_sys_largefile_source" != no
14285         then
14286
14287         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14288         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14289
14290         fi
14291         if test "$ac_cv_sys_file_offset_bits" != no
14292         then
14293
14294         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14295         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14296
14297         fi
14298
14299         echo "$as_me:14299: checking whether to use struct dirent64" >&5
14300 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14301 if test "${cf_cv_struct_dirent64+set}" = set; then
14302   echo $ECHO_N "(cached) $ECHO_C" >&6
14303 else
14304
14305                 cat >"conftest.$ac_ext" <<_ACEOF
14306 #line 14306 "configure"
14307 #include "confdefs.h"
14308
14309 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14310 #include <sys/types.h>
14311 #include <dirent.h>
14312
14313 int
14314 main (void)
14315 {
14316
14317                 /* if transitional largefile support is setup, this is true */
14318                 extern struct dirent64 * readdir(DIR *);
14319                 struct dirent64 *x = readdir((DIR *)0);
14320                 struct dirent *y = readdir((DIR *)0);
14321                 int z = x - y;
14322                 (void)z;
14323
14324   ;
14325   return 0;
14326 }
14327 _ACEOF
14328 rm -f "conftest.$ac_objext"
14329 if { (eval echo "$as_me:14329: \"$ac_compile\"") >&5
14330   (eval $ac_compile) 2>&5
14331   ac_status=$?
14332   echo "$as_me:14332: \$? = $ac_status" >&5
14333   (exit "$ac_status"); } &&
14334          { ac_try='test -s "conftest.$ac_objext"'
14335   { (eval echo "$as_me:14335: \"$ac_try\"") >&5
14336   (eval $ac_try) 2>&5
14337   ac_status=$?
14338   echo "$as_me:14338: \$? = $ac_status" >&5
14339   (exit "$ac_status"); }; }; then
14340   cf_cv_struct_dirent64=yes
14341 else
14342   echo "$as_me: failed program was:" >&5
14343 cat "conftest.$ac_ext" >&5
14344 cf_cv_struct_dirent64=no
14345 fi
14346 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14347
14348 fi
14349 echo "$as_me:14349: result: $cf_cv_struct_dirent64" >&5
14350 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14351         test "$cf_cv_struct_dirent64" = yes &&
14352 cat >>confdefs.h <<\EOF
14353 #define HAVE_STRUCT_DIRENT64 1
14354 EOF
14355
14356         fi
14357
14358 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14359 echo "$as_me:14359: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14360 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14361
14362 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14363 if test "${enable_tparm_varargs+set}" = set; then
14364   enableval="$enable_tparm_varargs"
14365   with_tparm_varargs=$enableval
14366 else
14367   with_tparm_varargs=yes
14368 fi;
14369 echo "$as_me:14369: result: $with_tparm_varargs" >&5
14370 echo "${ECHO_T}$with_tparm_varargs" >&6
14371 NCURSES_TPARM_VARARGS=0
14372 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14373
14374 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14375 if test "$with_ticlib" != no ; then
14376 echo "$as_me:14376: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14377 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14378
14379 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14380 if test "${enable_tic_depends+set}" = set; then
14381   enableval="$enable_tic_depends"
14382   with_tic_depends=$enableval
14383 else
14384   with_tic_depends=yes
14385 fi;
14386 echo "$as_me:14386: result: $with_tic_depends" >&5
14387 echo "${ECHO_T}$with_tic_depends" >&6
14388 else
14389         with_tic_depends=no
14390 fi
14391
14392 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14393 echo "$as_me:14393: checking if you want to enable wattr* macros" >&5
14394 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14395
14396 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14397 if test "${enable_wattr_macros+set}" = set; then
14398   enableval="$enable_wattr_macros"
14399   with_wattr_macros=$enableval
14400 else
14401   with_wattr_macros=no
14402 fi;
14403 if [ "x$with_wattr_macros" != xyes ]; then
14404         NCURSES_WATTR_MACROS=0
14405         echo "$as_me:14405: result: no" >&5
14406 echo "${ECHO_T}no" >&6
14407 else
14408         NCURSES_WATTR_MACROS=1
14409         echo "$as_me:14409: result: yes" >&5
14410 echo "${ECHO_T}yes" >&6
14411 fi
14412
14413 echo "$as_me:14413: checking for X11 rgb file" >&5
14414 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14415
14416 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14417 if test "${with_x11_rgb+set}" = set; then
14418   withval="$with_x11_rgb"
14419   RGB_PATH=$withval
14420 else
14421   RGB_PATH=auto
14422 fi;
14423
14424 if test "x$RGB_PATH" = xauto
14425 then
14426         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14427         for cf_path in \
14428                 /opt/local/share/X11/rgb.txt \
14429                 /opt/X11/share/X11/rgb.txt \
14430                 /usr/share/X11/rgb.txt \
14431                 /usr/X11/share/X11/rgb.txt \
14432                 /usr/X11/lib/X11/rgb.txt \
14433                 /usr/lib/X11/rgb.txt \
14434                 /etc/X11/rgb.txt \
14435                 /usr/pkg/lib/X11/rgb.txt \
14436                 /usr/X11R7/lib/X11/rgb.txt \
14437                 /usr/X11R6/lib/X11/rgb.txt \
14438                 /usr/X11R5/lib/X11/rgb.txt \
14439                 /usr/X11R4/lib/X11/rgb.txt \
14440                 /usr/local/lib/X11/rgb.txt \
14441                 /usr/local/share/X11/rgb.txt \
14442                 /usr/lib64/X11/rgb.txt
14443         do
14444                 if test -f "$cf_path" ; then
14445                         RGB_PATH="$cf_path"
14446                         break
14447                 fi
14448         done
14449 else
14450         cf_path=$RGB_PATH
14451
14452 if test "x$prefix" != xNONE; then
14453         cf_path_syntax="$prefix"
14454 else
14455         cf_path_syntax="$ac_default_prefix"
14456 fi
14457
14458 case ".$cf_path" in
14459 (.\$\(*\)*|.\'*\'*)
14460         ;;
14461 (..|./*|.\\*)
14462         ;;
14463 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14464         ;;
14465 (.\$\{*prefix\}*|.\$\{*dir\}*)
14466         eval cf_path="$cf_path"
14467         case ".$cf_path" in
14468         (.NONE/*)
14469                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14470                 ;;
14471         esac
14472         ;;
14473 (.no|.NONE/*)
14474         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14475         ;;
14476 (*)
14477         { { echo "$as_me:14477: error: expected a pathname, not \"$cf_path\"" >&5
14478 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14479    { (exit 1); exit 1; }; }
14480         ;;
14481 esac
14482
14483 fi
14484
14485 echo "$as_me:14485: result: $RGB_PATH" >&5
14486 echo "${ECHO_T}$RGB_PATH" >&6
14487
14488 cat >>confdefs.h <<EOF
14489 #define RGB_PATH "$cf_path"
14490 EOF
14491
14492 no_x11_rgb=
14493 if test "$RGB_PATH" = no
14494 then
14495         no_x11_rgb="#"
14496 fi
14497
14498 ###   use option --with-bool to override bool's type
14499 echo "$as_me:14499: checking for type of bool" >&5
14500 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14501
14502 # Check whether --with-bool or --without-bool was given.
14503 if test "${with_bool+set}" = set; then
14504   withval="$with_bool"
14505   NCURSES_BOOL="$withval"
14506 else
14507   NCURSES_BOOL=auto
14508 fi;
14509 echo "$as_me:14509: result: $NCURSES_BOOL" >&5
14510 echo "${ECHO_T}$NCURSES_BOOL" >&6
14511
14512 echo "$as_me:14512: checking for alternate terminal capabilities file" >&5
14513 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14514
14515 # Check whether --with-caps or --without-caps was given.
14516 if test "${with_caps+set}" = set; then
14517   withval="$with_caps"
14518   TERMINFO_CAPS=Caps.$withval
14519 else
14520   TERMINFO_CAPS=Caps
14521 fi;
14522 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14523 then
14524         { echo "$as_me:14524: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14525 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14526         TERMINFO_CAPS=Caps
14527 fi
14528 echo "$as_me:14528: result: $TERMINFO_CAPS" >&5
14529 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14530
14531 ###   use option --with-chtype to override chtype's type
14532 echo "$as_me:14532: checking for type of chtype" >&5
14533 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14534
14535 # Check whether --with-chtype or --without-chtype was given.
14536 if test "${with_chtype+set}" = set; then
14537   withval="$with_chtype"
14538   NCURSES_CHTYPE="$withval"
14539 else
14540   NCURSES_CHTYPE=$cf_dft_chtype
14541 fi;
14542 echo "$as_me:14542: result: $NCURSES_CHTYPE" >&5
14543 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14544
14545 ###   use option --with-ospeed to override ospeed's type
14546 echo "$as_me:14546: checking for type of ospeed" >&5
14547 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14548
14549 # Check whether --with-ospeed or --without-ospeed was given.
14550 if test "${with_ospeed+set}" = set; then
14551   withval="$with_ospeed"
14552   NCURSES_OSPEED="$withval"
14553 else
14554   NCURSES_OSPEED=short
14555 fi;
14556 echo "$as_me:14556: result: $NCURSES_OSPEED" >&5
14557 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14558
14559 ###   use option --with-mmask-t to override mmask_t's type
14560 echo "$as_me:14560: checking for type of mmask_t" >&5
14561 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14562
14563 # Check whether --with-mmask-t or --without-mmask-t was given.
14564 if test "${with_mmask_t+set}" = set; then
14565   withval="$with_mmask_t"
14566   NCURSES_MMASK_T="$withval"
14567 else
14568   NCURSES_MMASK_T=$cf_dft_mmask_t
14569 fi;
14570 echo "$as_me:14570: result: $NCURSES_MMASK_T" >&5
14571 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14572
14573 ###   use option --with-ccharw-max to override CCHARW_MAX size
14574 echo "$as_me:14574: checking for size CCHARW_MAX" >&5
14575 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14576
14577 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14578 if test "${with_ccharw_max+set}" = set; then
14579   withval="$with_ccharw_max"
14580   NCURSES_CCHARW_MAX="$withval"
14581 else
14582   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14583 fi;
14584 echo "$as_me:14584: result: $NCURSES_CCHARW_MAX" >&5
14585 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14586
14587 echo "$as_me:14587: checking for signed char" >&5
14588 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14589 if test "${ac_cv_type_signed_char+set}" = set; then
14590   echo $ECHO_N "(cached) $ECHO_C" >&6
14591 else
14592   cat >"conftest.$ac_ext" <<_ACEOF
14593 #line 14593 "configure"
14594 #include "confdefs.h"
14595 $ac_includes_default
14596 int
14597 main (void)
14598 {
14599 if ((signed char *) 0)
14600   return 0;
14601 if (sizeof (signed char))
14602   return 0;
14603   ;
14604   return 0;
14605 }
14606 _ACEOF
14607 rm -f "conftest.$ac_objext"
14608 if { (eval echo "$as_me:14608: \"$ac_compile\"") >&5
14609   (eval $ac_compile) 2>&5
14610   ac_status=$?
14611   echo "$as_me:14611: \$? = $ac_status" >&5
14612   (exit "$ac_status"); } &&
14613          { ac_try='test -s "conftest.$ac_objext"'
14614   { (eval echo "$as_me:14614: \"$ac_try\"") >&5
14615   (eval $ac_try) 2>&5
14616   ac_status=$?
14617   echo "$as_me:14617: \$? = $ac_status" >&5
14618   (exit "$ac_status"); }; }; then
14619   ac_cv_type_signed_char=yes
14620 else
14621   echo "$as_me: failed program was:" >&5
14622 cat "conftest.$ac_ext" >&5
14623 ac_cv_type_signed_char=no
14624 fi
14625 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14626 fi
14627 echo "$as_me:14627: result: $ac_cv_type_signed_char" >&5
14628 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14629
14630 echo "$as_me:14630: checking size of signed char" >&5
14631 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14632 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14633   echo $ECHO_N "(cached) $ECHO_C" >&6
14634 else
14635   if test "$ac_cv_type_signed_char" = yes; then
14636   if test "$cross_compiling" = yes; then
14637   # Depending upon the size, compute the lo and hi bounds.
14638 cat >"conftest.$ac_ext" <<_ACEOF
14639 #line 14639 "configure"
14640 #include "confdefs.h"
14641 $ac_includes_default
14642 int
14643 main (void)
14644 {
14645 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14646   ;
14647   return 0;
14648 }
14649 _ACEOF
14650 rm -f "conftest.$ac_objext"
14651 if { (eval echo "$as_me:14651: \"$ac_compile\"") >&5
14652   (eval $ac_compile) 2>&5
14653   ac_status=$?
14654   echo "$as_me:14654: \$? = $ac_status" >&5
14655   (exit "$ac_status"); } &&
14656          { ac_try='test -s "conftest.$ac_objext"'
14657   { (eval echo "$as_me:14657: \"$ac_try\"") >&5
14658   (eval $ac_try) 2>&5
14659   ac_status=$?
14660   echo "$as_me:14660: \$? = $ac_status" >&5
14661   (exit "$ac_status"); }; }; then
14662   ac_lo=0 ac_mid=0
14663   while :; do
14664     cat >"conftest.$ac_ext" <<_ACEOF
14665 #line 14665 "configure"
14666 #include "confdefs.h"
14667 $ac_includes_default
14668 int
14669 main (void)
14670 {
14671 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14672   ;
14673   return 0;
14674 }
14675 _ACEOF
14676 rm -f "conftest.$ac_objext"
14677 if { (eval echo "$as_me:14677: \"$ac_compile\"") >&5
14678   (eval $ac_compile) 2>&5
14679   ac_status=$?
14680   echo "$as_me:14680: \$? = $ac_status" >&5
14681   (exit "$ac_status"); } &&
14682          { ac_try='test -s "conftest.$ac_objext"'
14683   { (eval echo "$as_me:14683: \"$ac_try\"") >&5
14684   (eval $ac_try) 2>&5
14685   ac_status=$?
14686   echo "$as_me:14686: \$? = $ac_status" >&5
14687   (exit "$ac_status"); }; }; then
14688   ac_hi=$ac_mid; break
14689 else
14690   echo "$as_me: failed program was:" >&5
14691 cat "conftest.$ac_ext" >&5
14692 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14693 fi
14694 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14695   done
14696 else
14697   echo "$as_me: failed program was:" >&5
14698 cat "conftest.$ac_ext" >&5
14699 ac_hi=-1 ac_mid=-1
14700   while :; do
14701     cat >"conftest.$ac_ext" <<_ACEOF
14702 #line 14702 "configure"
14703 #include "confdefs.h"
14704 $ac_includes_default
14705 int
14706 main (void)
14707 {
14708 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14709   ;
14710   return 0;
14711 }
14712 _ACEOF
14713 rm -f "conftest.$ac_objext"
14714 if { (eval echo "$as_me:14714: \"$ac_compile\"") >&5
14715   (eval $ac_compile) 2>&5
14716   ac_status=$?
14717   echo "$as_me:14717: \$? = $ac_status" >&5
14718   (exit "$ac_status"); } &&
14719          { ac_try='test -s "conftest.$ac_objext"'
14720   { (eval echo "$as_me:14720: \"$ac_try\"") >&5
14721   (eval $ac_try) 2>&5
14722   ac_status=$?
14723   echo "$as_me:14723: \$? = $ac_status" >&5
14724   (exit "$ac_status"); }; }; then
14725   ac_lo=$ac_mid; break
14726 else
14727   echo "$as_me: failed program was:" >&5
14728 cat "conftest.$ac_ext" >&5
14729 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14730 fi
14731 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14732   done
14733 fi
14734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14735 # Binary search between lo and hi bounds.
14736 while test "x$ac_lo" != "x$ac_hi"; do
14737   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14738   cat >"conftest.$ac_ext" <<_ACEOF
14739 #line 14739 "configure"
14740 #include "confdefs.h"
14741 $ac_includes_default
14742 int
14743 main (void)
14744 {
14745 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14746   ;
14747   return 0;
14748 }
14749 _ACEOF
14750 rm -f "conftest.$ac_objext"
14751 if { (eval echo "$as_me:14751: \"$ac_compile\"") >&5
14752   (eval $ac_compile) 2>&5
14753   ac_status=$?
14754   echo "$as_me:14754: \$? = $ac_status" >&5
14755   (exit "$ac_status"); } &&
14756          { ac_try='test -s "conftest.$ac_objext"'
14757   { (eval echo "$as_me:14757: \"$ac_try\"") >&5
14758   (eval $ac_try) 2>&5
14759   ac_status=$?
14760   echo "$as_me:14760: \$? = $ac_status" >&5
14761   (exit "$ac_status"); }; }; then
14762   ac_hi=$ac_mid
14763 else
14764   echo "$as_me: failed program was:" >&5
14765 cat "conftest.$ac_ext" >&5
14766 ac_lo=`expr "$ac_mid" + 1`
14767 fi
14768 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14769 done
14770 ac_cv_sizeof_signed_char=$ac_lo
14771 else
14772   if test "$cross_compiling" = yes; then
14773   { { echo "$as_me:14773: error: cannot run test program while cross compiling" >&5
14774 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14775    { (exit 1); exit 1; }; }
14776 else
14777   cat >"conftest.$ac_ext" <<_ACEOF
14778 #line 14778 "configure"
14779 #include "confdefs.h"
14780 $ac_includes_default
14781 int
14782 main (void)
14783 {
14784 FILE *f = fopen ("conftest.val", "w");
14785 if (!f)
14786   $ac_main_return (1);
14787 fprintf (f, "%ld", (long)(sizeof (signed char)));
14788 fclose (f);
14789   ;
14790   return 0;
14791 }
14792 _ACEOF
14793 rm -f "conftest$ac_exeext"
14794 if { (eval echo "$as_me:14794: \"$ac_link\"") >&5
14795   (eval $ac_link) 2>&5
14796   ac_status=$?
14797   echo "$as_me:14797: \$? = $ac_status" >&5
14798   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14799   { (eval echo "$as_me:14799: \"$ac_try\"") >&5
14800   (eval $ac_try) 2>&5
14801   ac_status=$?
14802   echo "$as_me:14802: \$? = $ac_status" >&5
14803   (exit "$ac_status"); }; }; then
14804   ac_cv_sizeof_signed_char=`cat conftest.val`
14805 else
14806   echo "$as_me: program exited with status $ac_status" >&5
14807 echo "$as_me: failed program was:" >&5
14808 cat "conftest.$ac_ext" >&5
14809 fi
14810 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14811 fi
14812 fi
14813 rm -f conftest.val
14814 else
14815   ac_cv_sizeof_signed_char=0
14816 fi
14817 fi
14818 echo "$as_me:14818: result: $ac_cv_sizeof_signed_char" >&5
14819 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14820 cat >>confdefs.h <<EOF
14821 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14822 EOF
14823
14824 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14825         NCURSES_SBOOL="signed char"
14826 else
14827         NCURSES_SBOOL="char"
14828 fi
14829 echo "$as_me:14829: checking if you want to use signed Boolean array in term.h" >&5
14830 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14831
14832 # Check whether --enable-signed-char or --disable-signed-char was given.
14833 if test "${enable_signed_char+set}" = set; then
14834   enableval="$enable_signed_char"
14835   with_signed_char=$enableval
14836 else
14837   with_signed_char=$cf_dft_signed_char
14838 fi;
14839 echo "$as_me:14839: result: $with_signed_char" >&5
14840 echo "${ECHO_T}$with_signed_char" >&6
14841 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14842
14843 ###   use option --with-tparm-arg to override tparm's argument type
14844 echo "$as_me:14844: checking for type of tparm args" >&5
14845 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14846
14847 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14848 if test "${with_tparm_arg+set}" = set; then
14849   withval="$with_tparm_arg"
14850   NCURSES_TPARM_ARG="$withval"
14851 else
14852   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14853 fi;
14854 echo "$as_me:14854: result: $NCURSES_TPARM_ARG" >&5
14855 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14856
14857 ### Enable compiling-in rcs id's
14858 echo "$as_me:14858: checking if RCS identifiers should be compiled-in" >&5
14859 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14860
14861 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14862 if test "${with_rcs_ids+set}" = set; then
14863   withval="$with_rcs_ids"
14864   with_rcs_ids=$withval
14865 else
14866   with_rcs_ids=no
14867 fi;
14868 echo "$as_me:14868: result: $with_rcs_ids" >&5
14869 echo "${ECHO_T}$with_rcs_ids" >&6
14870 test "x$with_rcs_ids" = xyes &&
14871 cat >>confdefs.h <<\EOF
14872 #define USE_RCS_IDS 1
14873 EOF
14874
14875 ###############################################################################
14876
14877 echo "$as_me:14877: checking format of man-pages" >&5
14878 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14879
14880 # Check whether --with-manpage-format or --without-manpage-format was given.
14881 if test "${with_manpage_format+set}" = set; then
14882   withval="$with_manpage_format"
14883   MANPAGE_FORMAT=$withval
14884 else
14885   MANPAGE_FORMAT=unknown
14886 fi;
14887
14888 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14889 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14890
14891 cf_unknown=
14892
14893 case "$MANPAGE_FORMAT" in
14894 (unknown)
14895         if test -z "$MANPATH" ; then
14896                 MANPATH="/usr/man:/usr/share/man"
14897         fi
14898
14899         # look for the 'date' man-page (it is most likely to be installed!)
14900         MANPAGE_FORMAT=
14901         cf_preform="no"
14902         cf_catonly="yes"
14903         cf_example="date"
14904
14905         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14906         for cf_dir in $MANPATH; do
14907                 test -z "$cf_dir" && cf_dir=/usr/man
14908                 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
14909                 do
14910                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14911                         if test "x$cf_test" = "x$cf_name" ; then
14912
14913                                 case "$cf_name" in
14914                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14915                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14916                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14917                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14918                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14919                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14920                                 esac
14921
14922                                 case "$cf_name" in
14923                                 ($cf_dir/man*)
14924                                         cf_catonly=no
14925                                         ;;
14926                                 ($cf_dir/cat*)
14927                                         cf_preform=yes
14928                                         ;;
14929                                 esac
14930                                 break
14931                         fi
14932
14933                         # if we found a match in either man* or cat*, stop looking
14934                         if test -n "$MANPAGE_FORMAT" ; then
14935                                 cf_found=no
14936                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14937                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14938                                 case "$cf_name" in
14939                                 ($cf_dir/cat*)
14940                                         cf_found=yes
14941                                         ;;
14942                                 esac
14943                                 test "$cf_found" = yes && break
14944                         fi
14945                 done
14946                 # only check the first directory in $MANPATH where we find manpages
14947                 if test -n "$MANPAGE_FORMAT" ; then
14948                         break
14949                 fi
14950         done
14951         # if we did not find the example, just assume it is normal
14952         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14953         IFS="$ac_save_ifs"
14954         ;;
14955 (*)
14956         for cf_option in $MANPAGE_FORMAT; do
14957         case "$cf_option" in
14958         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14959                 ;;
14960         (*)
14961                 cf_unknown="$cf_unknown $cf_option"
14962                 ;;
14963         esac
14964         done
14965         ;;
14966 esac
14967
14968 echo "$as_me:14968: result: $MANPAGE_FORMAT" >&5
14969 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14970 if test -n "$cf_unknown" ; then
14971         { echo "$as_me:14971: WARNING: Unexpected manpage-format $cf_unknown" >&5
14972 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14973 fi
14974
14975 cf_manpage_format=no
14976 cf_manpage_inboth=no
14977 cf_manpage_so_strip=
14978 cf_manpage_compress=
14979
14980 for cf_item in $MANPAGE_FORMAT
14981 do
14982 case "$cf_item" in
14983 (catonly)
14984         cf_manpage_format=yes
14985         cf_manpage_inboth=no
14986         ;;
14987 (formatted)
14988         cf_manpage_format=yes
14989         cf_manpage_inboth=yes
14990         ;;
14991 (compress)
14992         cf_manpage_so_strip="Z"
14993         cf_manpage_compress=compress
14994         ;;
14995 (gzip)
14996         cf_manpage_so_strip="gz"
14997         cf_manpage_compress=gzip
14998         ;;
14999 (bzip2)
15000         cf_manpage_so_strip="bz2"
15001         cf_manpage_compress=bzip2
15002         ;;
15003 (xz)
15004         cf_manpage_so_strip="xz"
15005         cf_manpage_compress=xz
15006         ;;
15007 esac
15008 done
15009
15010 echo "$as_me:15010: checking for manpage renaming" >&5
15011 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15012
15013 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15014 if test "${with_manpage_renames+set}" = set; then
15015   withval="$with_manpage_renames"
15016   MANPAGE_RENAMES=$withval
15017 else
15018   MANPAGE_RENAMES=yes
15019 fi;
15020
15021 case ".$MANPAGE_RENAMES" in
15022 (.no)
15023         ;;
15024 (.|.yes)
15025         # Debian 'man' program?
15026         if test -f /etc/debian_version ; then
15027                 MANPAGE_RENAMES=man/man_db.renames
15028         else
15029                 MANPAGE_RENAMES=no
15030         fi
15031         ;;
15032 esac
15033
15034 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15035         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15036 elif test "$MANPAGE_RENAMES" = no ; then
15037         :
15038 elif test ! -f "$MANPAGE_RENAMES" ; then
15039         { { echo "$as_me:15039: error: not a filename: $MANPAGE_RENAMES" >&5
15040 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15041    { (exit 1); exit 1; }; }
15042 fi
15043
15044 echo "$as_me:15044: result: $MANPAGE_RENAMES" >&5
15045 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15046
15047 echo "$as_me:15047: checking if manpage aliases will be installed" >&5
15048 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15049
15050 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15051 if test "${with_manpage_aliases+set}" = set; then
15052   withval="$with_manpage_aliases"
15053   MANPAGE_ALIASES=$withval
15054 else
15055   MANPAGE_ALIASES=yes
15056 fi;
15057
15058 echo "$as_me:15058: result: $MANPAGE_ALIASES" >&5
15059 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15060
15061 case "x$LN_S" in
15062 (xln*)
15063         cf_use_symlinks=yes
15064         ;;
15065 (*)
15066         cf_use_symlinks=no
15067         ;;
15068 esac
15069
15070 MANPAGE_SYMLINKS=no
15071 if test "$MANPAGE_ALIASES" = yes ; then
15072 echo "$as_me:15072: checking if manpage symlinks should be used" >&5
15073 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15074
15075 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15076 if test "${with_manpage_symlinks+set}" = set; then
15077   withval="$with_manpage_symlinks"
15078   MANPAGE_SYMLINKS=$withval
15079 else
15080   MANPAGE_SYMLINKS=$cf_use_symlinks
15081 fi;
15082
15083 if test "$cf_use_symlinks" = no; then
15084 if test "$MANPAGE_SYMLINKS" = yes ; then
15085         { echo "$as_me:15085: WARNING: cannot make symlinks" >&5
15086 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15087         MANPAGE_SYMLINKS=no
15088 fi
15089 fi
15090
15091 echo "$as_me:15091: result: $MANPAGE_SYMLINKS" >&5
15092 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15093 fi
15094
15095 echo "$as_me:15095: checking for manpage tbl" >&5
15096 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15097
15098 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15099 if test "${with_manpage_tbl+set}" = set; then
15100   withval="$with_manpage_tbl"
15101   MANPAGE_TBL=$withval
15102 else
15103   MANPAGE_TBL=no
15104 fi;
15105
15106 echo "$as_me:15106: result: $MANPAGE_TBL" >&5
15107 echo "${ECHO_T}$MANPAGE_TBL" >&6
15108
15109 if test "$prefix" = "NONE" ; then
15110         cf_prefix="$ac_default_prefix"
15111 else
15112         cf_prefix="$prefix"
15113 fi
15114
15115 test ! -d man && mkdir man
15116
15117 cf_edit_man=./edit_man.sh
15118 cf_man_alias=`pwd`/man_alias.sed
15119
15120 cat >$cf_edit_man <<CF_EOF
15121 #! $SHELL
15122 # this script is generated by the configure-script CF_MAN_PAGES macro.
15123
15124 prefix="$cf_prefix"
15125 datarootdir="$datarootdir"
15126 datadir="$datadir"
15127
15128 NCURSES_MAJOR="$NCURSES_MAJOR"
15129 NCURSES_MINOR="$NCURSES_MINOR"
15130 NCURSES_PATCH="$NCURSES_PATCH"
15131
15132 NCURSES_OSPEED="$NCURSES_OSPEED"
15133 TERMINFO="$TERMINFO"
15134
15135 INSTALL="$INSTALL"
15136 INSTALL_DATA="$INSTALL_DATA"
15137
15138 transform="$program_transform_name"
15139
15140 TMP=\${TMPDIR:=/tmp}/man\$\$
15141 trap "rm -f \$TMP; exit 1" 1 2 3 15
15142 trap "rm -f \$TMP" 0
15143
15144 form=\$1
15145 shift || exit 1
15146
15147 verb=\$1
15148 shift || exit 1
15149
15150 mandir=\$1
15151 shift || exit 1
15152
15153 srcdir=\$1
15154 top_srcdir=\$srcdir/..
15155 shift || exit 1
15156
15157 if test "\$form" = normal ; then
15158         if test "$cf_manpage_format" = yes ; then
15159         if test "$cf_manpage_inboth" = no ; then
15160                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15161                 exit $?
15162         fi
15163         fi
15164         cf_subdir=\$mandir/man
15165         cf_tables=$MANPAGE_TBL
15166 else
15167         cf_subdir=\$mandir/cat
15168         cf_tables=yes
15169 fi
15170
15171 # process the list of source-files
15172 for i in "\$@" ; do
15173 case \$i in
15174 (*.orig|*.rej) ;;
15175 (*.[0-9]*)
15176         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15177         if test "\$verb" = installing ; then
15178         if test ! -d "\$cf_subdir\${section}" ; then
15179                 mkdir -p "\$cf_subdir\$section"
15180         fi
15181         fi
15182
15183         # replace variables in man page
15184         if test ! -f "$cf_man_alias" ; then
15185 cat >>$cf_man_alias <<-CF_EOF2
15186                 s,@DATADIR@,\$datadir,g
15187                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15188                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15189                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15190                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15191                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15192                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15193 CF_EOF
15194
15195         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15196         do
15197                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15198                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15199 cat >>$cf_edit_man <<-CF_EOF
15200                 s,@$cf_NAME@,$cf_name,g
15201 CF_EOF
15202         done
15203
15204 cat >>$cf_edit_man <<CF_EOF
15205 CF_EOF2
15206                 echo "...made $cf_man_alias"
15207         fi
15208
15209         aliases=
15210         cf_source=\`basename "\$i"\`
15211         cf_full_alias=\$cf_source
15212         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15213         if test ! -f "\$cf_full_alias" ; then
15214                 echo ".. skipped \$cf_source"
15215                 continue
15216         fi
15217 CF_EOF
15218
15219 if test "$MANPAGE_ALIASES" != no ; then
15220 cat >>$cf_edit_man <<CF_EOF
15221         nCurses=ignore.3x
15222         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15223         test "$with_curses_h" = yes && nCurses=ncurses.3x
15224         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\`
15225 CF_EOF
15226 fi
15227
15228 if test "$MANPAGE_RENAMES" = no ; then
15229 cat >>$cf_edit_man <<CF_EOF
15230         # perform program transformations for section 1 man pages
15231         if test \$section = 1 ; then
15232                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15233         else
15234                 cf_target=\$cf_subdir\${section}/\$cf_source
15235         fi
15236 CF_EOF
15237 else
15238 cat >>$cf_edit_man <<CF_EOF
15239         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15240         if test -z "\$cf_target" ; then
15241                 echo "? missing rename for \$cf_source"
15242                 cf_target="\$cf_source"
15243         fi
15244         cf_target="\$cf_subdir\${section}/\${cf_target}"
15245
15246 CF_EOF
15247 fi
15248
15249 cat >>$cf_edit_man <<CF_EOF
15250         sed     -f "$cf_man_alias" \\
15251 CF_EOF
15252
15253 if test "$MANPAGE_RENAMES" != no ; then
15254 cat >>$cf_edit_man <<CF_EOF
15255                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15256 CF_EOF
15257 else
15258 cat >>$cf_edit_man <<CF_EOF
15259                 < "\$i" >\$TMP
15260 CF_EOF
15261 fi
15262
15263 cat >>$cf_edit_man <<CF_EOF
15264 if test \$cf_tables = yes ; then
15265         tbl \$TMP >\$TMP.out
15266         mv \$TMP.out \$TMP
15267 fi
15268 CF_EOF
15269
15270 if test "$with_overwrite" != yes ; then
15271 cat >>$cf_edit_man <<CF_EOF
15272         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15273         mv \$TMP.out \$TMP
15274 CF_EOF
15275 fi
15276
15277 if test "$with_curses_h" != yes ; then
15278 cat >>$cf_edit_man <<CF_EOF
15279         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15280         mv \$TMP.out \$TMP
15281 CF_EOF
15282 fi
15283
15284 cat >>$cf_edit_man <<CF_EOF
15285         if test "\$form" = format ; then
15286                 nroff -man \$TMP >\$TMP.out
15287                 mv \$TMP.out \$TMP
15288         fi
15289 CF_EOF
15290
15291 if test -n "$cf_manpage_compress" ; then
15292 cat >>$cf_edit_man <<CF_EOF
15293         if test "\$verb" = installing ; then
15294         if ( "$cf_manpage_compress" -f \$TMP )
15295         then
15296                 mv \$TMP.$cf_manpage_so_strip \$TMP
15297         fi
15298         fi
15299         cf_target="\$cf_target.$cf_manpage_so_strip"
15300 CF_EOF
15301 fi
15302
15303 case "$MANPAGE_FORMAT" in
15304 (*BSDI*)
15305 cat >>$cf_edit_man <<CF_EOF
15306         if test "\$form" = format ; then
15307                 # BSDI installs only .0 suffixes in the cat directories
15308                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15309         fi
15310 CF_EOF
15311   ;;
15312 esac
15313
15314 cat >>$cf_edit_man <<CF_EOF
15315         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15316         extra_suffix=
15317         if test -n "$EXTRA_SUFFIX" ; then
15318                 case \$cf_target in
15319                 (*${EXTRA_SUFFIX}\$suffix)
15320                         extra_suffix="$EXTRA_SUFFIX"
15321                         ;;
15322                 esac
15323         fi
15324         if test "\$verb" = installing ; then
15325                 echo "\$verb \$cf_target"
15326                 \$INSTALL_DATA \$TMP "\$cf_target"
15327                 test -d "\$cf_subdir\${section}" &&
15328                 test -n "\$aliases" && (
15329                         cd "\$cf_subdir\${section}" && (
15330                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15331                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15332                                 cf_target=\`basename "\$cf_target"\`
15333                                 for cf_alias in \$aliases
15334                                 do
15335                                         if test "\$section" = 1 ; then
15336                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15337                                         fi
15338                                         cf_alias="\${cf_alias}\${extra_suffix}"
15339
15340                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15341                                                 if test -f "\$cf_alias\${suffix}" ; then
15342                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15343                                                         then
15344                                                                 continue
15345                                                         fi
15346                                                 fi
15347                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15348 CF_EOF
15349 case "x$LN_S" in
15350 (*-f)
15351 cat >>$cf_edit_man <<CF_EOF
15352                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15353 CF_EOF
15354         ;;
15355 (*)
15356 cat >>$cf_edit_man <<CF_EOF
15357                                                 rm -f "\$cf_alias\${suffix}"
15358                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15359 CF_EOF
15360         ;;
15361 esac
15362 cat >>$cf_edit_man <<CF_EOF
15363                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15364                                                 echo ".so \$cf_source" >\$TMP
15365 CF_EOF
15366 if test -n "$cf_manpage_compress" ; then
15367 cat >>$cf_edit_man <<CF_EOF
15368                                                 if test -n "$cf_manpage_so_strip" ; then
15369                                                         "$cf_manpage_compress" -f \$TMP
15370                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15371                                                 fi
15372 CF_EOF
15373 fi
15374 cat >>$cf_edit_man <<CF_EOF
15375                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15376                                                 rm -f "\$cf_alias\${suffix}"
15377                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15378                                         fi
15379                                 done
15380                         )
15381                 )
15382         elif test "\$verb" = removing ; then
15383                 test -f "\$cf_target" && (
15384                         echo "\$verb \$cf_target"
15385                         rm -f "\$cf_target"
15386                 )
15387                 test -d "\$cf_subdir\${section}" &&
15388                 test -n "\$aliases" && (
15389                         cd "\$cf_subdir\${section}" && (
15390                                 for cf_alias in \$aliases
15391                                 do
15392                                         if test "\$section" = 1 ; then
15393                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15394                                         fi
15395                                         cf_alias="\${cf_alias}\${extra_suffix}"
15396
15397                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15398                                         rm -f "\$cf_alias\${suffix}"
15399                                 done
15400                         )
15401                 )
15402         else
15403 #               echo ".hy 0"
15404                 cat \$TMP
15405         fi
15406         ;;
15407 esac
15408 done
15409
15410 if test "$cf_manpage_inboth" = yes ; then
15411 if test "\$form" != format ; then
15412         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15413 fi
15414 fi
15415
15416 exit 0
15417 CF_EOF
15418 chmod 755 "$cf_edit_man"
15419
15420 ###############################################################################
15421
15422 ### Note that some functions (such as const) are normally disabled anyway.
15423 echo "$as_me:15423: checking if you want to build with function extensions" >&5
15424 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15425
15426 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15427 if test "${enable_ext_funcs+set}" = set; then
15428   enableval="$enable_ext_funcs"
15429   with_ext_funcs=$enableval
15430 else
15431   with_ext_funcs=yes
15432 fi;
15433 echo "$as_me:15433: result: $with_ext_funcs" >&5
15434 echo "${ECHO_T}$with_ext_funcs" >&6
15435 if test "x$with_ext_funcs" = xyes ; then
15436         NCURSES_EXT_FUNCS=1
15437
15438 cat >>confdefs.h <<\EOF
15439 #define NCURSES_EXT_FUNCS 1
15440 EOF
15441
15442 cat >>confdefs.h <<\EOF
15443 #define HAVE_ASSUME_DEFAULT_COLORS 1
15444 EOF
15445
15446 cat >>confdefs.h <<\EOF
15447 #define HAVE_CURSES_VERSION 1
15448 EOF
15449
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_HAS_KEY 1
15452 EOF
15453
15454 cat >>confdefs.h <<\EOF
15455 #define HAVE_RESIZETERM 1
15456 EOF
15457
15458 cat >>confdefs.h <<\EOF
15459 #define HAVE_RESIZE_TERM 1
15460 EOF
15461
15462 cat >>confdefs.h <<\EOF
15463 #define HAVE_TERM_ENTRY_H 1
15464 EOF
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_USE_DEFAULT_COLORS 1
15468 EOF
15469
15470 cat >>confdefs.h <<\EOF
15471 #define HAVE_USE_SCREEN 1
15472 EOF
15473
15474 cat >>confdefs.h <<\EOF
15475 #define HAVE_USE_WINDOW 1
15476 EOF
15477
15478 cat >>confdefs.h <<\EOF
15479 #define HAVE_WRESIZE 1
15480 EOF
15481
15482         GENERATED_EXT_FUNCS=generated
15483         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15484 else
15485         NCURSES_EXT_FUNCS=0
15486         GENERATED_EXT_FUNCS=
15487 fi
15488
15489 echo "$as_me:15489: checking if you want to build with SCREEN extensions" >&5
15490 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15491
15492 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15493 if test "${enable_sp_funcs+set}" = set; then
15494   enableval="$enable_sp_funcs"
15495   with_sp_funcs=$enableval
15496 else
15497   with_sp_funcs=$cf_dft_ext_spfuncs
15498 fi;
15499 echo "$as_me:15499: result: $with_sp_funcs" >&5
15500 echo "${ECHO_T}$with_sp_funcs" >&6
15501 if test "x$with_sp_funcs" = xyes ; then
15502         NCURSES_SP_FUNCS=1
15503
15504 cat >>confdefs.h <<\EOF
15505 #define NCURSES_SP_FUNCS 1
15506 EOF
15507
15508 cat >>confdefs.h <<\EOF
15509 #define HAVE_TPUTS_SP 1
15510 EOF
15511
15512         GENERATED_SP_FUNCS=generated
15513 else
15514         NCURSES_SP_FUNCS=0
15515         GENERATED_SP_FUNCS=
15516 fi
15517
15518 echo "$as_me:15518: checking if you want to build with terminal-driver" >&5
15519 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15520
15521 # Check whether --enable-term-driver or --disable-term-driver was given.
15522 if test "${enable_term_driver+set}" = set; then
15523   enableval="$enable_term_driver"
15524   with_term_driver=$enableval
15525 else
15526   with_term_driver=no
15527 fi;
15528 echo "$as_me:15528: result: $with_term_driver" >&5
15529 echo "${ECHO_T}$with_term_driver" >&6
15530 if test "x$with_term_driver" = xyes ; then
15531
15532 cat >>confdefs.h <<\EOF
15533 #define USE_TERM_DRIVER 1
15534 EOF
15535
15536         if test "x$with_termlib" != xno ; then
15537                 { { echo "$as_me:15537: error: The term-driver option conflicts with the termlib option" >&5
15538 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15539    { (exit 1); exit 1; }; }
15540         fi
15541         if test "x$with_sp_funcs" != xyes ; then
15542                 { { echo "$as_me:15542: error: The term-driver option relies upon sp-funcs" >&5
15543 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15544    { (exit 1); exit 1; }; }
15545         fi
15546 fi
15547
15548 ###   use option --enable-const to turn on use of const beyond that in XSI.
15549 echo "$as_me:15549: checking for extended use of const keyword" >&5
15550 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15551
15552 # Check whether --enable-const or --disable-const was given.
15553 if test "${enable_const+set}" = set; then
15554   enableval="$enable_const"
15555   with_ext_const=$enableval
15556 else
15557   with_ext_const=$cf_dft_ext_const
15558 fi;
15559 echo "$as_me:15559: result: $with_ext_const" >&5
15560 echo "${ECHO_T}$with_ext_const" >&6
15561 NCURSES_CONST='/*nothing*/'
15562 if test "x$with_ext_const" = xyes ; then
15563         NCURSES_CONST=const
15564 fi
15565
15566 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15567 echo "$as_me:15567: checking if you want to use extended colors" >&5
15568 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15569
15570 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15571 if test "${enable_ext_colors+set}" = set; then
15572   enableval="$enable_ext_colors"
15573   with_ext_colors=$enableval
15574 else
15575   with_ext_colors=$cf_dft_ext_colors
15576 fi;
15577 echo "$as_me:15577: result: $with_ext_colors" >&5
15578 echo "${ECHO_T}$with_ext_colors" >&6
15579 NCURSES_EXT_COLORS=0
15580 if test "x$with_ext_colors" = xyes ; then
15581         if test "x$with_widec" != xyes ; then
15582                 { echo "$as_me:15582: WARNING: This option applies only to wide-character library" >&5
15583 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15584         else
15585                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15586
15587 if test "${with_abi_version+set}" != set; then
15588         case "$cf_cv_rel_version" in
15589         (5.*)
15590                 cf_cv_rel_version=6.0
15591                 cf_cv_abi_version=6
15592                 cf_cv_abi_default=6
15593                 { echo "$as_me:15593: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15594 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15595                 ;;
15596         esac
15597 fi
15598
15599                 NCURSES_EXT_COLORS=1
15600
15601 cat >>confdefs.h <<\EOF
15602 #define NCURSES_EXT_COLORS 1
15603 EOF
15604
15605 cat >>confdefs.h <<\EOF
15606 #define HAVE_ALLOC_PAIR 1
15607 EOF
15608
15609 cat >>confdefs.h <<\EOF
15610 #define HAVE_INIT_EXTENDED_COLOR 1
15611 EOF
15612
15613 cat >>confdefs.h <<\EOF
15614 #define HAVE_RESET_COLOR_PAIRS 1
15615 EOF
15616
15617         fi
15618 fi
15619
15620 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15621 echo "$as_me:15621: checking if you want to use extended mouse encoding" >&5
15622 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15623
15624 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15625 if test "${enable_ext_mouse+set}" = set; then
15626   enableval="$enable_ext_mouse"
15627   with_ext_mouse=$enableval
15628 else
15629   with_ext_mouse=$cf_dft_ext_mouse
15630 fi;
15631 echo "$as_me:15631: result: $with_ext_mouse" >&5
15632 echo "${ECHO_T}$with_ext_mouse" >&6
15633 if test "x$with_ext_mouse" = xyes ; then
15634
15635 if test "${with_abi_version+set}" != set; then
15636         case "$cf_cv_rel_version" in
15637         (5.*)
15638                 cf_cv_rel_version=6.0
15639                 cf_cv_abi_version=6
15640                 cf_cv_abi_default=6
15641                 { echo "$as_me:15641: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15642 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15643                 ;;
15644         esac
15645 fi
15646
15647 fi
15648
15649 if test $cf_cv_abi_default -le 5 ; then
15650         NCURSES_MOUSE_VERSION=1
15651 elif test $cf_cv_abi_default -le 6 ; then
15652         NCURSES_MOUSE_VERSION=2
15653 else
15654         NCURSES_MOUSE_VERSION=3
15655 fi
15656
15657 ###   use option --enable-ext-putwin to turn on extended screendumps
15658 echo "$as_me:15658: checking if you want to use extended putwin/screendump" >&5
15659 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15660
15661 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15662 if test "${enable_ext_putwin+set}" = set; then
15663   enableval="$enable_ext_putwin"
15664   with_ext_putwin=$enableval
15665 else
15666   with_ext_putwin=$cf_dft_ext_putwin
15667 fi;
15668 echo "$as_me:15668: result: $with_ext_putwin" >&5
15669 echo "${ECHO_T}$with_ext_putwin" >&6
15670 if test "x$with_ext_putwin" = xyes ; then
15671
15672 cat >>confdefs.h <<\EOF
15673 #define NCURSES_EXT_PUTWIN 1
15674 EOF
15675
15676 fi
15677
15678 echo "$as_me:15678: checking if you want \$NCURSES_NO_PADDING code" >&5
15679 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15680
15681 # Check whether --enable-no-padding or --disable-no-padding was given.
15682 if test "${enable_no_padding+set}" = set; then
15683   enableval="$enable_no_padding"
15684   with_no_padding=$enableval
15685 else
15686   with_no_padding=$with_ext_funcs
15687 fi;
15688 echo "$as_me:15688: result: $with_no_padding" >&5
15689 echo "${ECHO_T}$with_no_padding" >&6
15690 test "x$with_no_padding" = xyes &&
15691 cat >>confdefs.h <<\EOF
15692 #define NCURSES_NO_PADDING 1
15693 EOF
15694
15695 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15696 echo "$as_me:15696: checking if you want SIGWINCH handler" >&5
15697 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15698
15699 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15700 if test "${enable_sigwinch+set}" = set; then
15701   enableval="$enable_sigwinch"
15702   with_sigwinch=$enableval
15703 else
15704   with_sigwinch=$with_ext_funcs
15705 fi;
15706 echo "$as_me:15706: result: $with_sigwinch" >&5
15707 echo "${ECHO_T}$with_sigwinch" >&6
15708 test "x$with_sigwinch" = xyes &&
15709 cat >>confdefs.h <<\EOF
15710 #define USE_SIGWINCH 1
15711 EOF
15712
15713 ###   use option --enable-tcap-names to allow user to define new capabilities
15714 echo "$as_me:15714: checking if you want user-definable terminal capabilities like termcap" >&5
15715 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15716
15717 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15718 if test "${enable_tcap_names+set}" = set; then
15719   enableval="$enable_tcap_names"
15720   with_tcap_names=$enableval
15721 else
15722   with_tcap_names=$with_ext_funcs
15723 fi;
15724 echo "$as_me:15724: result: $with_tcap_names" >&5
15725 echo "${ECHO_T}$with_tcap_names" >&6
15726 NCURSES_XNAMES=0
15727 if test "x$with_tcap_names" = xyes; then
15728         NCURSES_XNAMES=1
15729
15730 cat >>confdefs.h <<\EOF
15731 #define NCURSES_XNAMES 1
15732 EOF
15733
15734 fi
15735
15736 ##############################################################################
15737
15738 echo "$as_me:15738: checking if you want to link with the pthread library" >&5
15739 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15740
15741 # Check whether --with-pthread or --without-pthread was given.
15742 if test "${with_pthread+set}" = set; then
15743   withval="$with_pthread"
15744   with_pthread=$withval
15745 else
15746   with_pthread=no
15747 fi;
15748 echo "$as_me:15748: result: $with_pthread" >&5
15749 echo "${ECHO_T}$with_pthread" >&6
15750
15751 if test "$with_pthread" != no ; then
15752         echo "$as_me:15752: checking for pthread.h" >&5
15753 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15754 if test "${ac_cv_header_pthread_h+set}" = set; then
15755   echo $ECHO_N "(cached) $ECHO_C" >&6
15756 else
15757   cat >"conftest.$ac_ext" <<_ACEOF
15758 #line 15758 "configure"
15759 #include "confdefs.h"
15760 #include <pthread.h>
15761 _ACEOF
15762 if { (eval echo "$as_me:15762: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15763   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15764   ac_status=$?
15765   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15766   rm -f conftest.er1
15767   cat conftest.err >&5
15768   echo "$as_me:15768: \$? = $ac_status" >&5
15769   (exit "$ac_status"); } >/dev/null; then
15770   if test -s conftest.err; then
15771     ac_cpp_err=$ac_c_preproc_warn_flag
15772   else
15773     ac_cpp_err=
15774   fi
15775 else
15776   ac_cpp_err=yes
15777 fi
15778 if test -z "$ac_cpp_err"; then
15779   ac_cv_header_pthread_h=yes
15780 else
15781   echo "$as_me: failed program was:" >&5
15782   cat "conftest.$ac_ext" >&5
15783   ac_cv_header_pthread_h=no
15784 fi
15785 rm -f conftest.err "conftest.$ac_ext"
15786 fi
15787 echo "$as_me:15787: result: $ac_cv_header_pthread_h" >&5
15788 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15789 if test "$ac_cv_header_pthread_h" = yes; then
15790
15791 cat >>confdefs.h <<\EOF
15792 #define HAVE_PTHREADS_H 1
15793 EOF
15794
15795         for cf_lib_pthread in pthread c_r
15796         do
15797             echo "$as_me:15797: checking if we can link with the $cf_lib_pthread library" >&5
15798 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15799             cf_save_LIBS="$LIBS"
15800
15801 cf_add_libs="$LIBS"
15802 # reverse order
15803 cf_add_0lib=
15804 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15805 # filter duplicates
15806 for cf_add_1lib in $cf_add_0lib; do
15807         for cf_add_2lib in $cf_add_libs; do
15808                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15809                         cf_add_1lib=
15810                         break
15811                 fi
15812         done
15813         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15814 done
15815 LIBS="$cf_add_libs"
15816
15817             cat >"conftest.$ac_ext" <<_ACEOF
15818 #line 15818 "configure"
15819 #include "confdefs.h"
15820
15821 #include <pthread.h>
15822
15823 int
15824 main (void)
15825 {
15826
15827                 int rc = pthread_create(0,0,0,0);
15828                 int r2 = pthread_mutexattr_settype(0, 0);
15829
15830   ;
15831   return 0;
15832 }
15833 _ACEOF
15834 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15835 if { (eval echo "$as_me:15835: \"$ac_link\"") >&5
15836   (eval $ac_link) 2>&5
15837   ac_status=$?
15838   echo "$as_me:15838: \$? = $ac_status" >&5
15839   (exit "$ac_status"); } &&
15840          { ac_try='test -s "conftest$ac_exeext"'
15841   { (eval echo "$as_me:15841: \"$ac_try\"") >&5
15842   (eval $ac_try) 2>&5
15843   ac_status=$?
15844   echo "$as_me:15844: \$? = $ac_status" >&5
15845   (exit "$ac_status"); }; }; then
15846   with_pthread=yes
15847 else
15848   echo "$as_me: failed program was:" >&5
15849 cat "conftest.$ac_ext" >&5
15850 with_pthread=no
15851 fi
15852 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15853             LIBS="$cf_save_LIBS"
15854             echo "$as_me:15854: result: $with_pthread" >&5
15855 echo "${ECHO_T}$with_pthread" >&6
15856             test "$with_pthread" = yes && break
15857         done
15858
15859         if test "$with_pthread" = yes ; then
15860
15861 cf_add_libs="$LIBS"
15862 # reverse order
15863 cf_add_0lib=
15864 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15865 # filter duplicates
15866 for cf_add_1lib in $cf_add_0lib; do
15867         for cf_add_2lib in $cf_add_libs; do
15868                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15869                         cf_add_1lib=
15870                         break
15871                 fi
15872         done
15873         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15874 done
15875 LIBS="$cf_add_libs"
15876
15877 cat >>confdefs.h <<\EOF
15878 #define HAVE_LIBPTHREADS 1
15879 EOF
15880
15881         else
15882             { { echo "$as_me:15882: error: Cannot link with pthread library" >&5
15883 echo "$as_me: error: Cannot link with pthread library" >&2;}
15884    { (exit 1); exit 1; }; }
15885         fi
15886
15887 fi
15888
15889 fi
15890
15891 if test "x$with_pthread" != xno; then
15892         echo "$as_me:15892: checking for pthread_kill" >&5
15893 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15894 if test "${ac_cv_func_pthread_kill+set}" = set; then
15895   echo $ECHO_N "(cached) $ECHO_C" >&6
15896 else
15897   cat >"conftest.$ac_ext" <<_ACEOF
15898 #line 15898 "configure"
15899 #include "confdefs.h"
15900 #define pthread_kill autoconf_temporary
15901 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15902 #undef pthread_kill
15903
15904 #ifdef __cplusplus
15905 extern "C"
15906 #endif
15907
15908 /* We use char because int might match the return type of a gcc2
15909    builtin and then its argument prototype would still apply.  */
15910 char pthread_kill (void);
15911
15912 int
15913 main (void)
15914 {
15915
15916 /* The GNU C library defines stubs for functions which it implements
15917     to always fail with ENOSYS.  Some functions are actually named
15918     something starting with __ and the normal name is an alias.  */
15919 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15920 #error found stub for pthread_kill
15921 #endif
15922
15923         return pthread_kill ();
15924   ;
15925   return 0;
15926 }
15927 _ACEOF
15928 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15929 if { (eval echo "$as_me:15929: \"$ac_link\"") >&5
15930   (eval $ac_link) 2>&5
15931   ac_status=$?
15932   echo "$as_me:15932: \$? = $ac_status" >&5
15933   (exit "$ac_status"); } &&
15934          { ac_try='test -s "conftest$ac_exeext"'
15935   { (eval echo "$as_me:15935: \"$ac_try\"") >&5
15936   (eval $ac_try) 2>&5
15937   ac_status=$?
15938   echo "$as_me:15938: \$? = $ac_status" >&5
15939   (exit "$ac_status"); }; }; then
15940   ac_cv_func_pthread_kill=yes
15941 else
15942   echo "$as_me: failed program was:" >&5
15943 cat "conftest.$ac_ext" >&5
15944 ac_cv_func_pthread_kill=no
15945 fi
15946 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15947 fi
15948 echo "$as_me:15948: result: $ac_cv_func_pthread_kill" >&5
15949 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15950 if test "$ac_cv_func_pthread_kill" = yes; then
15951
15952                 echo "$as_me:15952: checking if you want to allow EINTR in wgetch with pthreads" >&5
15953 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15954
15955 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15956 if test "${enable_pthreads_eintr+set}" = set; then
15957   enableval="$enable_pthreads_eintr"
15958   use_pthreads_eintr=$enableval
15959 else
15960   use_pthreads_eintr=no
15961 fi;
15962                 echo "$as_me:15962: result: $use_pthreads_eintr" >&5
15963 echo "${ECHO_T}$use_pthreads_eintr" >&6
15964                 if test "x$use_pthreads_eintr" = xyes ; then
15965
15966 cat >>confdefs.h <<\EOF
15967 #define USE_PTHREADS_EINTR 1
15968 EOF
15969
15970                 fi
15971 fi
15972
15973         echo "$as_me:15973: checking if you want to use weak-symbols for pthreads" >&5
15974 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15975
15976 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15977 if test "${enable_weak_symbols+set}" = set; then
15978   enableval="$enable_weak_symbols"
15979   use_weak_symbols=$enableval
15980 else
15981   use_weak_symbols=no
15982 fi;
15983         echo "$as_me:15983: result: $use_weak_symbols" >&5
15984 echo "${ECHO_T}$use_weak_symbols" >&6
15985         if test "x$use_weak_symbols" = xyes ; then
15986
15987 echo "$as_me:15987: checking if $CC supports weak symbols" >&5
15988 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15989 if test "${cf_cv_weak_symbols+set}" = set; then
15990   echo $ECHO_N "(cached) $ECHO_C" >&6
15991 else
15992
15993 cat >"conftest.$ac_ext" <<_ACEOF
15994 #line 15994 "configure"
15995 #include "confdefs.h"
15996
15997 #include <stdio.h>
15998 int
15999 main (void)
16000 {
16001
16002 #if defined(__GNUC__)
16003 #  if defined __USE_ISOC99
16004 #    define _cat_pragma(exp)    _Pragma(#exp)
16005 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16006 #  else
16007 #    define _weak_pragma(exp)
16008 #  endif
16009 #  define _declare(name)        __extension__ extern __typeof__(name) name
16010 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16011 #endif
16012
16013 weak_symbol(fopen);
16014
16015   ;
16016   return 0;
16017 }
16018 _ACEOF
16019 rm -f "conftest.$ac_objext"
16020 if { (eval echo "$as_me:16020: \"$ac_compile\"") >&5
16021   (eval $ac_compile) 2>&5
16022   ac_status=$?
16023   echo "$as_me:16023: \$? = $ac_status" >&5
16024   (exit "$ac_status"); } &&
16025          { ac_try='test -s "conftest.$ac_objext"'
16026   { (eval echo "$as_me:16026: \"$ac_try\"") >&5
16027   (eval $ac_try) 2>&5
16028   ac_status=$?
16029   echo "$as_me:16029: \$? = $ac_status" >&5
16030   (exit "$ac_status"); }; }; then
16031   cf_cv_weak_symbols=yes
16032 else
16033   echo "$as_me: failed program was:" >&5
16034 cat "conftest.$ac_ext" >&5
16035 cf_cv_weak_symbols=no
16036 fi
16037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16038
16039 fi
16040 echo "$as_me:16040: result: $cf_cv_weak_symbols" >&5
16041 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16042
16043         else
16044                 cf_cv_weak_symbols=no
16045         fi
16046
16047         if test "x$cf_cv_weak_symbols" = xyes ; then
16048
16049 cat >>confdefs.h <<\EOF
16050 #define USE_WEAK_SYMBOLS 1
16051 EOF
16052
16053         fi
16054 fi
16055
16056 PTHREAD=
16057 if test "x$with_pthread" = "xyes" ; then
16058
16059 cat >>confdefs.h <<\EOF
16060 #define USE_PTHREADS 1
16061 EOF
16062
16063         enable_reentrant=yes
16064         if test "x$cf_cv_weak_symbols" = xyes ; then
16065                 PTHREAD=-lpthread
16066
16067 cf_add_libs="$PRIVATE_LIBS"
16068 # reverse order
16069 cf_add_0lib=
16070 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16071 # filter duplicates
16072 for cf_add_1lib in $cf_add_0lib; do
16073         for cf_add_2lib in $cf_add_libs; do
16074                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16075                         cf_add_1lib=
16076                         break
16077                 fi
16078         done
16079         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16080 done
16081 PRIVATE_LIBS="$cf_add_libs"
16082
16083         fi
16084 fi
16085
16086 # Reentrant code has to be opaque; there's little advantage to making ncurses
16087 # opaque outside of that, so there is no --enable-opaque option.  We can use
16088 # this option without --with-pthreads, but this will be always set for
16089 # pthreads.
16090 echo "$as_me:16090: checking if you want reentrant code" >&5
16091 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16092
16093 # Check whether --enable-reentrant or --disable-reentrant was given.
16094 if test "${enable_reentrant+set}" = set; then
16095   enableval="$enable_reentrant"
16096   with_reentrant=$enableval
16097 else
16098   with_reentrant=no
16099 fi;
16100 echo "$as_me:16100: result: $with_reentrant" >&5
16101 echo "${ECHO_T}$with_reentrant" >&6
16102 if test "x$with_reentrant" = xyes ; then
16103         cf_cv_enable_reentrant=1
16104         cf_cv_enable_opaque="NCURSES_INTERNALS"
16105         NCURSES_SIZE_T=int
16106         if test "x$cf_cv_weak_symbols" = xyes ; then
16107
16108 # remove pthread library from $LIBS
16109 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16110
16111 cf_add_libs="$TEST_LIBS"
16112 # reverse order
16113 cf_add_0lib=
16114 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16115 # filter duplicates
16116 for cf_add_1lib in $cf_add_0lib; do
16117         for cf_add_2lib in $cf_add_libs; do
16118                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16119                         cf_add_1lib=
16120                         break
16121                 fi
16122         done
16123         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16124 done
16125 TEST_LIBS="$cf_add_libs"
16126
16127 cf_add_libs="$TEST_LIBS2"
16128 # reverse order
16129 cf_add_0lib=
16130 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16131 # filter duplicates
16132 for cf_add_1lib in $cf_add_0lib; do
16133         for cf_add_2lib in $cf_add_libs; do
16134                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16135                         cf_add_1lib=
16136                         break
16137                 fi
16138         done
16139         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16140 done
16141 TEST_LIBS2="$cf_add_libs"
16142
16143 cf_add_libs="$PRIVATE_LIBS"
16144 # reverse order
16145 cf_add_0lib=
16146 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16147 # filter duplicates
16148 for cf_add_1lib in $cf_add_0lib; do
16149         for cf_add_2lib in $cf_add_libs; do
16150                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16151                         cf_add_1lib=
16152                         break
16153                 fi
16154         done
16155         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16156 done
16157 PRIVATE_LIBS="$cf_add_libs"
16158
16159         else
16160                 # when not using weak symbols but with_reentrant,
16161                 # add 't' to the library suffix on all platforms
16162                 # except cygwin, where we only do that if ALSO
16163                 # compiling with full thread support.
16164                 case "$host" in
16165                 (*cygwin* | *msys*)
16166                         if test "$with_pthread" = "yes" ; then
16167                                 if test "x$disable_lib_suffixes" = "xno" ; then
16168                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16169                                 fi
16170                         fi ;;
16171                 (*)
16172                         if test "x$disable_lib_suffixes" = "xno" ; then
16173                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16174                         fi
16175                         ;;
16176                 esac
16177         fi
16178
16179 cat >>confdefs.h <<\EOF
16180 #define USE_REENTRANT 1
16181 EOF
16182
16183 if test "${with_abi_version+set}" != set; then
16184         case "$cf_cv_rel_version" in
16185         (5.*)
16186                 cf_cv_rel_version=6.0
16187                 cf_cv_abi_version=6
16188                 cf_cv_abi_default=6
16189                 { echo "$as_me:16189: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16190 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16191                 ;;
16192         esac
16193 fi
16194
16195 else
16196         cf_cv_enable_reentrant=0
16197         cf_cv_enable_opaque="NCURSES_OPAQUE"
16198         NCURSES_SIZE_T=$cf_dft_ordinate_type
16199 fi
16200
16201 echo "$as_me:16201: checking if you want opaque curses-library structures" >&5
16202 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16203
16204 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16205 if test "${enable_opaque_curses+set}" = set; then
16206   enableval="$enable_opaque_curses"
16207   test "$enableval" != yes && enableval=no
16208         if test "$enableval" != "no" ; then
16209     enable_opaque_curses=yes
16210         else
16211
16212          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16213          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16214
16215         fi
16216 else
16217   enableval=no
16218
16219          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16220          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16221
16222 fi;
16223 echo "$as_me:16223: result: $enable_opaque_curses" >&5
16224 echo "${ECHO_T}$enable_opaque_curses" >&6
16225
16226 test "$cf_cv_enable_reentrant" = 1 && \
16227 test "$enable_opaque_curses" = no && \
16228 { { echo "$as_me:16228: error: reentrant configuration requires opaque library" >&5
16229 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16230    { (exit 1); exit 1; }; }
16231
16232 echo "$as_me:16232: checking if you want opaque form-library structures" >&5
16233 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16234
16235 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16236 if test "${enable_opaque_form+set}" = set; then
16237   enableval="$enable_opaque_form"
16238   enable_opaque_form=yes
16239 else
16240   enable_opaque_form=no
16241 fi;
16242 echo "$as_me:16242: result: $enable_opaque_form" >&5
16243 echo "${ECHO_T}$enable_opaque_form" >&6
16244
16245 echo "$as_me:16245: checking if you want opaque menu-library structures" >&5
16246 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16247
16248 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16249 if test "${enable_opaque_menu+set}" = set; then
16250   enableval="$enable_opaque_menu"
16251   enable_opaque_menu=yes
16252 else
16253   enable_opaque_menu=no
16254 fi;
16255 echo "$as_me:16255: result: $enable_opaque_menu" >&5
16256 echo "${ECHO_T}$enable_opaque_menu" >&6
16257
16258 echo "$as_me:16258: checking if you want opaque panel-library structures" >&5
16259 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16260
16261 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16262 if test "${enable_opaque_panel+set}" = set; then
16263   enableval="$enable_opaque_panel"
16264   enable_opaque_panel=yes
16265 else
16266   enable_opaque_panel=no
16267 fi;
16268 echo "$as_me:16268: result: $enable_opaque_panel" >&5
16269 echo "${ECHO_T}$enable_opaque_panel" >&6
16270
16271 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16272 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16273 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16274 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16275
16276 ### Allow using a different wrap-prefix
16277 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16278         echo "$as_me:16278: checking for prefix used to wrap public variables" >&5
16279 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16280
16281 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16282 if test "${with_wrap_prefix+set}" = set; then
16283   withval="$with_wrap_prefix"
16284   NCURSES_WRAP_PREFIX=$withval
16285 else
16286   NCURSES_WRAP_PREFIX=_nc_
16287 fi;
16288         echo "$as_me:16288: result: $NCURSES_WRAP_PREFIX" >&5
16289 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16290 else
16291         NCURSES_WRAP_PREFIX=_nc_
16292 fi
16293
16294 cat >>confdefs.h <<EOF
16295 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16296 EOF
16297
16298 ###############################################################################
16299 # These options are relatively safe to experiment with.
16300
16301 echo "$as_me:16301: checking if you want all development code" >&5
16302 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16303
16304 # Check whether --with-develop or --without-develop was given.
16305 if test "${with_develop+set}" = set; then
16306   withval="$with_develop"
16307   with_develop=$withval
16308 else
16309   with_develop=no
16310 fi;
16311 echo "$as_me:16311: result: $with_develop" >&5
16312 echo "${ECHO_T}$with_develop" >&6
16313
16314 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16315 echo "$as_me:16315: checking if you want hard-tabs code" >&5
16316 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16317
16318 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16319 if test "${enable_hard_tabs+set}" = set; then
16320   enableval="$enable_hard_tabs"
16321
16322 else
16323   enable_hard_tabs=$with_develop
16324 fi;
16325 echo "$as_me:16325: result: $enable_hard_tabs" >&5
16326 echo "${ECHO_T}$enable_hard_tabs" >&6
16327 test "x$enable_hard_tabs" = xyes &&
16328 cat >>confdefs.h <<\EOF
16329 #define USE_HARD_TABS 1
16330 EOF
16331
16332 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16333 echo "$as_me:16333: checking if you want limited support for xmc" >&5
16334 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16335
16336 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16337 if test "${enable_xmc_glitch+set}" = set; then
16338   enableval="$enable_xmc_glitch"
16339
16340 else
16341   enable_xmc_glitch=$with_develop
16342 fi;
16343 echo "$as_me:16343: result: $enable_xmc_glitch" >&5
16344 echo "${ECHO_T}$enable_xmc_glitch" >&6
16345 test "x$enable_xmc_glitch" = xyes &&
16346 cat >>confdefs.h <<\EOF
16347 #define USE_XMC_SUPPORT 1
16348 EOF
16349
16350 ###############################################################################
16351 # These are just experimental, probably should not be in a package:
16352
16353 echo "$as_me:16353: checking if you do not want to assume colors are white-on-black" >&5
16354 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16355
16356 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16357 if test "${enable_assumed_color+set}" = set; then
16358   enableval="$enable_assumed_color"
16359   with_assumed_color=$enableval
16360 else
16361   with_assumed_color=yes
16362 fi;
16363 echo "$as_me:16363: result: $with_assumed_color" >&5
16364 echo "${ECHO_T}$with_assumed_color" >&6
16365 test "x$with_assumed_color" = xyes &&
16366 cat >>confdefs.h <<\EOF
16367 #define USE_ASSUMED_COLOR 1
16368 EOF
16369
16370 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16371 echo "$as_me:16371: checking if you want hashmap scrolling-optimization code" >&5
16372 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16373
16374 # Check whether --enable-hashmap or --disable-hashmap was given.
16375 if test "${enable_hashmap+set}" = set; then
16376   enableval="$enable_hashmap"
16377   with_hashmap=$enableval
16378 else
16379   with_hashmap=yes
16380 fi;
16381 echo "$as_me:16381: result: $with_hashmap" >&5
16382 echo "${ECHO_T}$with_hashmap" >&6
16383 test "x$with_hashmap" = xyes &&
16384 cat >>confdefs.h <<\EOF
16385 #define USE_HASHMAP 1
16386 EOF
16387
16388 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16389 echo "$as_me:16389: checking if you want colorfgbg code" >&5
16390 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16391
16392 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16393 if test "${enable_colorfgbg+set}" = set; then
16394   enableval="$enable_colorfgbg"
16395   with_colorfgbg=$enableval
16396 else
16397   with_colorfgbg=no
16398 fi;
16399 echo "$as_me:16399: result: $with_colorfgbg" >&5
16400 echo "${ECHO_T}$with_colorfgbg" >&6
16401 test "x$with_colorfgbg" = xyes &&
16402 cat >>confdefs.h <<\EOF
16403 #define USE_COLORFGBG 1
16404 EOF
16405
16406 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16407 echo "$as_me:16407: checking if you want to use gcc -fvisibility option" >&5
16408 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16409
16410 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16411 if test "${enable_fvisibility+set}" = set; then
16412   enableval="$enable_fvisibility"
16413   cf_with_fvisibility=$enableval
16414 else
16415   cf_with_fvisibility=no
16416 fi;
16417 echo "$as_me:16417: result: $cf_with_fvisibility" >&5
16418 echo "${ECHO_T}$cf_with_fvisibility" >&6
16419
16420 NCURSES_IMPEXP=
16421 NCURSES_CXX_IMPEXP=
16422 if test "x$cf_with_fvisibility" = xyes; then
16423
16424 echo "$as_me:16424: checking if $CC -fvisibility=hidden option works" >&5
16425 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16426 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16427   echo $ECHO_N "(cached) $ECHO_C" >&6
16428 else
16429
16430     cf_save_cflags="$CFLAGS"
16431     CFLAGS="$CFLAGS -fvisibility=hidden"
16432     cat >"conftest.$ac_ext" <<_ACEOF
16433 #line 16433 "configure"
16434 #include "confdefs.h"
16435
16436 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16437
16438 int
16439 main (void)
16440 {
16441
16442         if (somefunc()) return 1;
16443
16444   ;
16445   return 0;
16446 }
16447 _ACEOF
16448 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16449 if { (eval echo "$as_me:16449: \"$ac_link\"") >&5
16450   (eval $ac_link) 2>&5
16451   ac_status=$?
16452   echo "$as_me:16452: \$? = $ac_status" >&5
16453   (exit "$ac_status"); } &&
16454          { ac_try='test -s "conftest$ac_exeext"'
16455   { (eval echo "$as_me:16455: \"$ac_try\"") >&5
16456   (eval $ac_try) 2>&5
16457   ac_status=$?
16458   echo "$as_me:16458: \$? = $ac_status" >&5
16459   (exit "$ac_status"); }; }; then
16460   cf_cv_fvisibility_hidden=yes
16461 else
16462   echo "$as_me: failed program was:" >&5
16463 cat "conftest.$ac_ext" >&5
16464 cf_cv_fvisibility_hidden=no
16465 fi
16466 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16467     CFLAGS=$cf_save_cflags
16468
16469 fi
16470 echo "$as_me:16470: result: $cf_cv_fvisibility_hidden" >&5
16471 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16472
16473         if test "x$cf_cv_fvisibility_hidden" = xyes
16474         then
16475
16476 cf_fix_cppflags=no
16477 cf_new_cflags=
16478 cf_new_cppflags=
16479 cf_new_extra_cppflags=
16480
16481 for cf_add_cflags in -fvisibility=hidden
16482 do
16483 case "$cf_fix_cppflags" in
16484 (no)
16485         case "$cf_add_cflags" in
16486         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16487                 case "$cf_add_cflags" in
16488                 (-D*)
16489                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16490
16491                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16492                                 && test -z "${cf_tst_cflags}" \
16493                                 && cf_fix_cppflags=yes
16494
16495                         if test "$cf_fix_cppflags" = yes ; then
16496
16497         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16498         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16499
16500                                 continue
16501                         elif test "${cf_tst_cflags}" = "\"'" ; then
16502
16503         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16504         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16505
16506                                 continue
16507                         fi
16508                         ;;
16509                 esac
16510                 case "$CPPFLAGS" in
16511                 (*$cf_add_cflags)
16512                         ;;
16513                 (*)
16514                         case "$cf_add_cflags" in
16515                         (-D*)
16516                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16517
16518 CPPFLAGS=`echo "$CPPFLAGS" | \
16519         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16520                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16521
16522                                 ;;
16523                         esac
16524
16525         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16526         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16527
16528                         ;;
16529                 esac
16530                 ;;
16531         (*)
16532
16533         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16534         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16535
16536                 ;;
16537         esac
16538         ;;
16539 (yes)
16540
16541         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16542         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16543
16544         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16545
16546         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16547                 && test -z "${cf_tst_cflags}" \
16548                 && cf_fix_cppflags=no
16549         ;;
16550 esac
16551 done
16552
16553 if test -n "$cf_new_cflags" ; then
16554
16555         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16556         CFLAGS="${CFLAGS}$cf_new_cflags"
16557
16558 fi
16559
16560 if test -n "$cf_new_cppflags" ; then
16561
16562         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16563         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16564
16565 fi
16566
16567 if test -n "$cf_new_extra_cppflags" ; then
16568
16569         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16570         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16571
16572 fi
16573
16574                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16575         fi
16576         if test -n "$CXX"
16577         then
16578                 ac_ext=cc
16579 ac_cpp='$CXXCPP $CPPFLAGS'
16580 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16581 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16582 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16583 ac_main_return="return"
16584
16585 echo "$as_me:16585: checking if $CXX -fvisibility=hidden option works" >&5
16586 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16587 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16588   echo $ECHO_N "(cached) $ECHO_C" >&6
16589 else
16590
16591     cf_save_cflags="$CXXFLAGS"
16592     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16593     cat >"conftest.$ac_ext" <<_ACEOF
16594 #line 16594 "configure"
16595 #include "confdefs.h"
16596
16597 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16598
16599 int
16600 main (void)
16601 {
16602
16603         if (somefunc()) return 1;
16604
16605   ;
16606   return 0;
16607 }
16608 _ACEOF
16609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16610 if { (eval echo "$as_me:16610: \"$ac_link\"") >&5
16611   (eval $ac_link) 2>&5
16612   ac_status=$?
16613   echo "$as_me:16613: \$? = $ac_status" >&5
16614   (exit "$ac_status"); } &&
16615          { ac_try='test -s "conftest$ac_exeext"'
16616   { (eval echo "$as_me:16616: \"$ac_try\"") >&5
16617   (eval $ac_try) 2>&5
16618   ac_status=$?
16619   echo "$as_me:16619: \$? = $ac_status" >&5
16620   (exit "$ac_status"); }; }; then
16621   cf_cv_fvisibility_hidden2=yes
16622 else
16623   echo "$as_me: failed program was:" >&5
16624 cat "conftest.$ac_ext" >&5
16625 cf_cv_fvisibility_hidden2=no
16626 fi
16627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16628     CXXFLAGS=$cf_save_cflags
16629
16630 fi
16631 echo "$as_me:16631: result: $cf_cv_fvisibility_hidden2" >&5
16632 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16633
16634                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16635                 then
16636
16637 cf_save_CXXFLAGS="$CFLAGS"
16638 CFLAGS="$CXXFLAGS"
16639
16640 cf_fix_cppflags=no
16641 cf_new_cflags=
16642 cf_new_cppflags=
16643 cf_new_extra_cppflags=
16644
16645 for cf_add_cflags in -fvisibility=hidden
16646 do
16647 case "$cf_fix_cppflags" in
16648 (no)
16649         case "$cf_add_cflags" in
16650         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16651                 case "$cf_add_cflags" in
16652                 (-D*)
16653                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16654
16655                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16656                                 && test -z "${cf_tst_cflags}" \
16657                                 && cf_fix_cppflags=yes
16658
16659                         if test "$cf_fix_cppflags" = yes ; then
16660
16661         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16662         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16663
16664                                 continue
16665                         elif test "${cf_tst_cflags}" = "\"'" ; then
16666
16667         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16668         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16669
16670                                 continue
16671                         fi
16672                         ;;
16673                 esac
16674                 case "$CPPFLAGS" in
16675                 (*$cf_add_cflags)
16676                         ;;
16677                 (*)
16678                         case "$cf_add_cflags" in
16679                         (-D*)
16680                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16681
16682 CPPFLAGS=`echo "$CPPFLAGS" | \
16683         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16684                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16685
16686                                 ;;
16687                         esac
16688
16689         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16690         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16691
16692                         ;;
16693                 esac
16694                 ;;
16695         (*)
16696
16697         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16698         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16699
16700                 ;;
16701         esac
16702         ;;
16703 (yes)
16704
16705         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16706         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16707
16708         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16709
16710         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16711                 && test -z "${cf_tst_cflags}" \
16712                 && cf_fix_cppflags=no
16713         ;;
16714 esac
16715 done
16716
16717 if test -n "$cf_new_cflags" ; then
16718
16719         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16720         CFLAGS="${CFLAGS}$cf_new_cflags"
16721
16722 fi
16723
16724 if test -n "$cf_new_cppflags" ; then
16725
16726         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16727         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16728
16729 fi
16730
16731 if test -n "$cf_new_extra_cppflags" ; then
16732
16733         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16734         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16735
16736 fi
16737
16738 CXXFLAGS="$CFLAGS"
16739 CFLAGS="$cf_save_CXXFLAGS"
16740
16741                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16742                 fi
16743                 ac_ext=c
16744 ac_cpp='$CPP $CPPFLAGS'
16745 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16746 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16747 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16748 ac_main_return="return"
16749
16750         fi
16751 fi
16752
16753 ###   use option --enable-interop to turn on use of bindings used for interop
16754 echo "$as_me:16754: checking if you want interop bindings" >&5
16755 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16756
16757 # Check whether --enable-interop or --disable-interop was given.
16758 if test "${enable_interop+set}" = set; then
16759   enableval="$enable_interop"
16760   with_exp_interop=$enableval
16761 else
16762   with_exp_interop=$cf_dft_interop
16763 fi;
16764 echo "$as_me:16764: result: $with_exp_interop" >&5
16765 echo "${ECHO_T}$with_exp_interop" >&6
16766
16767 NCURSES_INTEROP_FUNCS=0
16768 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16769
16770 echo "$as_me:16770: checking if you want experimental safe-sprintf code" >&5
16771 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16772
16773 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16774 if test "${enable_safe_sprintf+set}" = set; then
16775   enableval="$enable_safe_sprintf"
16776   with_safe_sprintf=$enableval
16777 else
16778   with_safe_sprintf=no
16779 fi;
16780 echo "$as_me:16780: result: $with_safe_sprintf" >&5
16781 echo "${ECHO_T}$with_safe_sprintf" >&6
16782
16783 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16784 # when hashmap is used scroll hints are useless
16785 if test "$with_hashmap" = no ; then
16786 echo "$as_me:16786: checking if you want to experiment without scrolling-hints code" >&5
16787 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16788
16789 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16790 if test "${enable_scroll_hints+set}" = set; then
16791   enableval="$enable_scroll_hints"
16792   with_scroll_hints=$enableval
16793 else
16794   with_scroll_hints=yes
16795 fi;
16796 echo "$as_me:16796: result: $with_scroll_hints" >&5
16797 echo "${ECHO_T}$with_scroll_hints" >&6
16798 test "x$with_scroll_hints" = xyes &&
16799 cat >>confdefs.h <<\EOF
16800 #define USE_SCROLL_HINTS 1
16801 EOF
16802
16803 fi
16804
16805 echo "$as_me:16805: checking if you want wgetch-events code" >&5
16806 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16807
16808 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16809 if test "${enable_wgetch_events+set}" = set; then
16810   enableval="$enable_wgetch_events"
16811   with_wgetch_events=$enableval
16812 else
16813   with_wgetch_events=no
16814 fi;
16815 echo "$as_me:16815: result: $with_wgetch_events" >&5
16816 echo "${ECHO_T}$with_wgetch_events" >&6
16817 if test "x$with_wgetch_events" = xyes ; then
16818
16819 cat >>confdefs.h <<\EOF
16820 #define NCURSES_WGETCH_EVENTS 1
16821 EOF
16822
16823         NCURSES_WGETCH_EVENTS=1
16824 else
16825         NCURSES_WGETCH_EVENTS=0
16826 fi
16827
16828 case "$cf_cv_system_name" in
16829 (*mingw32*|*mingw64*|*-msvc*)
16830         echo "$as_me:16830: checking if you want experimental-Windows driver" >&5
16831 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16832
16833 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16834 if test "${enable_exp_win32+set}" = set; then
16835   enableval="$enable_exp_win32"
16836   with_exp_win32=$enableval
16837 else
16838   with_exp_win32=no
16839 fi;
16840         echo "$as_me:16840: result: $with_exp_win32" >&5
16841 echo "${ECHO_T}$with_exp_win32" >&6
16842         if test "x$with_exp_win32" = xyes
16843         then
16844
16845 cat >>confdefs.h <<\EOF
16846 #define EXP_WIN32_DRIVER 1
16847 EOF
16848
16849                 EXP_WIN32_DRIVER=1
16850                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16851         else
16852                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16853                 EXP_WIN32_DRIVER=0
16854         fi
16855         ;;
16856 (*)
16857         EXP_WIN32_DRIVER=0
16858         INTERNALS_HDR=
16859         ;;
16860 esac
16861
16862 ###############################################################################
16863
16864 ###     use option --disable-echo to suppress full display compiling commands
16865
16866 echo "$as_me:16866: checking if you want to see long compiling messages" >&5
16867 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16868
16869 # Check whether --enable-echo or --disable-echo was given.
16870 if test "${enable_echo+set}" = set; then
16871   enableval="$enable_echo"
16872   test "$enableval" != no && enableval=yes
16873         if test "$enableval" != "yes" ; then
16874
16875         ECHO_LT='--silent'
16876         ECHO_LD='@echo linking $@;'
16877         RULE_CC='@echo compiling $<'
16878         SHOW_CC='@echo compiling $@'
16879         ECHO_CC='@'
16880
16881         else
16882
16883         ECHO_LT=''
16884         ECHO_LD=''
16885         RULE_CC=''
16886         SHOW_CC=''
16887         ECHO_CC=''
16888
16889         fi
16890 else
16891   enableval=yes
16892
16893         ECHO_LT=''
16894         ECHO_LD=''
16895         RULE_CC=''
16896         SHOW_CC=''
16897         ECHO_CC=''
16898
16899 fi;
16900 echo "$as_me:16900: result: $enableval" >&5
16901 echo "${ECHO_T}$enableval" >&6
16902
16903 if test "x$enable_echo" = xyes; then
16904         ECHO_LINK=
16905 else
16906         ECHO_LINK='@ echo linking $@ ... ;'
16907         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16908         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16909 fi
16910
16911 # --disable-stripping is used for debugging
16912
16913 echo "$as_me:16913: checking if you want to install stripped executables" >&5
16914 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16915
16916 # Check whether --enable-stripping or --disable-stripping was given.
16917 if test "${enable_stripping+set}" = set; then
16918   enableval="$enable_stripping"
16919   test "$enableval" != no && enableval=yes
16920         if test "$enableval" != "yes" ; then
16921     enable_stripping=no
16922         else
16923                 enable_stripping=yes
16924         fi
16925 else
16926   enableval=yes
16927         enable_stripping=yes
16928
16929 fi;
16930 echo "$as_me:16930: result: $enable_stripping" >&5
16931 echo "${ECHO_T}$enable_stripping" >&6
16932
16933 if test "$enable_stripping" = yes
16934 then
16935         INSTALL_OPT_S="-s"
16936 else
16937         INSTALL_OPT_S=
16938 fi
16939
16940 : "${INSTALL:=install}"
16941 echo "$as_me:16941: checking if install accepts -p option" >&5
16942 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16943 if test "${cf_cv_install_p+set}" = set; then
16944   echo $ECHO_N "(cached) $ECHO_C" >&6
16945 else
16946
16947         rm -rf ./conftest*
16948         date >conftest.in
16949         mkdir conftest.out
16950         sleep 3
16951         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16952         then
16953                 if test -f conftest.out/conftest.in
16954                 then
16955                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16956                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16957                         if test -s conftest.err
16958                         then
16959                                 cf_cv_install_p=no
16960                         else
16961                                 cf_cv_install_p=yes
16962                         fi
16963                 else
16964                         cf_cv_install_p=no
16965                 fi
16966         else
16967                 cf_cv_install_p=no
16968         fi
16969         rm -rf ./conftest*
16970
16971 fi
16972 echo "$as_me:16972: result: $cf_cv_install_p" >&5
16973 echo "${ECHO_T}$cf_cv_install_p" >&6
16974
16975 echo "$as_me:16975: checking if install needs to be told about ownership" >&5
16976 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16977 case `$ac_config_guess` in
16978 (*minix)
16979         with_install_o=yes
16980         ;;
16981 (*)
16982         with_install_o=no
16983         ;;
16984 esac
16985
16986 echo "$as_me:16986: result: $with_install_o" >&5
16987 echo "${ECHO_T}$with_install_o" >&6
16988 if test "x$with_install_o" = xyes
16989 then
16990         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'`"
16991 else
16992         INSTALL_OPT_O=
16993 fi
16994
16995 if test -n "$INSTALL_OPT_S"
16996 then
16997         echo "$as_me:16997: checking if you want to specify strip-program" >&5
16998 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
16999
17000 # Check whether --with-strip-program or --without-strip-program was given.
17001 if test "${with_strip_program+set}" = set; then
17002   withval="$with_strip_program"
17003   with_strip_program=$withval
17004 else
17005   with_strip_program=no
17006 fi;
17007         echo "$as_me:17007: result: $with_strip_program" >&5
17008 echo "${ECHO_T}$with_strip_program" >&6
17009         if test "$with_strip_program" != no
17010         then
17011                 echo "$as_me:17011: checking if strip-program is supported with this installer" >&5
17012 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17013                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17014                 check_install_strip=no
17015                 if test -f "$cf_install_program"
17016                 then
17017                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17018                         if test -n "$check_install_version"
17019                         then
17020                                 check_install_strip="option"
17021                         else
17022                                 for check_strip_variable in STRIPBIN STRIP
17023                                 do
17024                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17025                                         then
17026                                                 check_install_strip="environ"
17027                                                 break
17028                                         fi
17029                                 done
17030                         fi
17031                 fi
17032                 echo "$as_me:17032: result: $check_install_strip" >&5
17033 echo "${ECHO_T}$check_install_strip" >&6
17034                 case "$check_install_strip" in
17035                 (no)
17036                         { echo "$as_me:17036: WARNING: $cf_install_program does not support strip program option" >&5
17037 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17038                         with_strip_program=no
17039                         ;;
17040                 (environ)
17041                         cat >install.tmp <<-CF_EOF
17042                         #! $SHELL
17043                         STRIPBIN="$with_strip_program" \\
17044                         STRIP="$with_strip_program" \\
17045                         $INSTALL "$@"
17046                         CF_EOF
17047                         INSTALL="`pwd`/install.tmp"
17048                         chmod +x "$INSTALL"
17049                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17050
17051 echo "${as_me:-configure}:17051: testing created $INSTALL ..." 1>&5
17052
17053                         ;;
17054                 (option)
17055                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17056                         ;;
17057                 esac
17058         fi
17059 fi
17060
17061 # If we're avoiding relinking of shared libraries during install, that is to
17062 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17063 # the install program has "-p" (for preserving timestamps).
17064 cf_cv_do_reranlib=yes
17065 if test "x$cf_cv_install_p" = xyes
17066 then
17067         if test "x$cf_cv_do_relink" != xyes
17068         then
17069                 cf_cv_do_reranlib=no
17070                 INSTALL_OPT_P="-p"
17071                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17072         fi
17073 fi
17074
17075 ###     use option --enable-warnings to turn on all gcc warnings
17076
17077 echo "$as_me:17077: checking if you want to use C11 _Noreturn feature" >&5
17078 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17079
17080 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17081 if test "${enable_stdnoreturn+set}" = set; then
17082   enableval="$enable_stdnoreturn"
17083   test "$enableval" != yes && enableval=no
17084         if test "$enableval" != "no" ; then
17085     enable_stdnoreturn=yes
17086         else
17087                 enable_stdnoreturn=no
17088         fi
17089 else
17090   enableval=no
17091         enable_stdnoreturn=no
17092
17093 fi;
17094 echo "$as_me:17094: result: $enable_stdnoreturn" >&5
17095 echo "${ECHO_T}$enable_stdnoreturn" >&6
17096
17097 if test $enable_stdnoreturn = yes; then
17098 echo "$as_me:17098: checking for C11 _Noreturn feature" >&5
17099 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17100 if test "${cf_cv_c11_noreturn+set}" = set; then
17101   echo $ECHO_N "(cached) $ECHO_C" >&6
17102 else
17103   cat >"conftest.$ac_ext" <<_ACEOF
17104 #line 17104 "configure"
17105 #include "confdefs.h"
17106
17107 $ac_includes_default
17108 #include <stdnoreturn.h>
17109 static _Noreturn void giveup(void) { exit(0); }
17110
17111 int
17112 main (void)
17113 {
17114 if (feof(stdin)) giveup()
17115   ;
17116   return 0;
17117 }
17118 _ACEOF
17119 rm -f "conftest.$ac_objext"
17120 if { (eval echo "$as_me:17120: \"$ac_compile\"") >&5
17121   (eval $ac_compile) 2>&5
17122   ac_status=$?
17123   echo "$as_me:17123: \$? = $ac_status" >&5
17124   (exit "$ac_status"); } &&
17125          { ac_try='test -s "conftest.$ac_objext"'
17126   { (eval echo "$as_me:17126: \"$ac_try\"") >&5
17127   (eval $ac_try) 2>&5
17128   ac_status=$?
17129   echo "$as_me:17129: \$? = $ac_status" >&5
17130   (exit "$ac_status"); }; }; then
17131   cf_cv_c11_noreturn=yes
17132 else
17133   echo "$as_me: failed program was:" >&5
17134 cat "conftest.$ac_ext" >&5
17135 cf_cv_c11_noreturn=no
17136 fi
17137 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17138
17139 fi
17140 echo "$as_me:17140: result: $cf_cv_c11_noreturn" >&5
17141 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17142 else
17143         cf_cv_c11_noreturn=no,
17144 fi
17145
17146 if test "$cf_cv_c11_noreturn" = yes; then
17147
17148 cat >>confdefs.h <<\EOF
17149 #define HAVE_STDNORETURN_H 1
17150 EOF
17151
17152 cat >>confdefs.h <<EOF
17153 #define STDC_NORETURN _Noreturn
17154 EOF
17155
17156         HAVE_STDNORETURN_H=1
17157 else
17158         HAVE_STDNORETURN_H=0
17159 fi
17160
17161 if test "$GCC" = yes || test "$GXX" = yes
17162 then
17163
17164 if test "$GCC" = yes || test "$GXX" = yes
17165 then
17166         case $CFLAGS in
17167         (*-Werror=*)
17168                 cf_temp_flags=
17169                 for cf_temp_scan in $CFLAGS
17170                 do
17171                         case "x$cf_temp_scan" in
17172                         (x-Werror=format*)
17173
17174         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17175         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17176
17177                                 ;;
17178                         (x-Werror=*)
17179
17180         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17181         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17182
17183                                 ;;
17184                         (*)
17185
17186         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17187         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17188
17189                                 ;;
17190                         esac
17191                 done
17192                 if test "x$CFLAGS" != "x$cf_temp_flags"
17193                 then
17194                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17195
17196 echo "${as_me:-configure}:17196: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17197
17198                         CFLAGS="$cf_temp_flags"
17199                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17200
17201 echo "${as_me:-configure}:17201: testing ... fixed $CFLAGS ..." 1>&5
17202
17203                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17204
17205 echo "${as_me:-configure}:17205: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17206
17207                 fi
17208                 ;;
17209         esac
17210 fi
17211
17212 if test "$GCC" = yes || test "$GXX" = yes
17213 then
17214         case $CPPFLAGS in
17215         (*-Werror=*)
17216                 cf_temp_flags=
17217                 for cf_temp_scan in $CPPFLAGS
17218                 do
17219                         case "x$cf_temp_scan" in
17220                         (x-Werror=format*)
17221
17222         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17223         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17224
17225                                 ;;
17226                         (x-Werror=*)
17227
17228         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17229         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17230
17231                                 ;;
17232                         (*)
17233
17234         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17235         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17236
17237                                 ;;
17238                         esac
17239                 done
17240                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17241                 then
17242                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17243
17244 echo "${as_me:-configure}:17244: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17245
17246                         CPPFLAGS="$cf_temp_flags"
17247                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17248
17249 echo "${as_me:-configure}:17249: testing ... fixed $CPPFLAGS ..." 1>&5
17250
17251                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17252
17253 echo "${as_me:-configure}:17253: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17254
17255                 fi
17256                 ;;
17257         esac
17258 fi
17259
17260 if test "$GCC" = yes || test "$GXX" = yes
17261 then
17262         case $LDFLAGS in
17263         (*-Werror=*)
17264                 cf_temp_flags=
17265                 for cf_temp_scan in $LDFLAGS
17266                 do
17267                         case "x$cf_temp_scan" in
17268                         (x-Werror=format*)
17269
17270         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17271         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17272
17273                                 ;;
17274                         (x-Werror=*)
17275
17276         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17277         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17278
17279                                 ;;
17280                         (*)
17281
17282         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17283         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17284
17285                                 ;;
17286                         esac
17287                 done
17288                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17289                 then
17290                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17291
17292 echo "${as_me:-configure}:17292: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17293
17294                         LDFLAGS="$cf_temp_flags"
17295                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17296
17297 echo "${as_me:-configure}:17297: testing ... fixed $LDFLAGS ..." 1>&5
17298
17299                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17300
17301 echo "${as_me:-configure}:17301: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17302
17303                 fi
17304                 ;;
17305         esac
17306 fi
17307
17308 echo "$as_me:17308: checking if you want to turn on gcc warnings" >&5
17309 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17310
17311 # Check whether --enable-warnings or --disable-warnings was given.
17312 if test "${enable_warnings+set}" = set; then
17313   enableval="$enable_warnings"
17314   test "$enableval" != yes && enableval=no
17315         if test "$enableval" != "no" ; then
17316     enable_warnings=yes
17317         else
17318                 enable_warnings=no
17319         fi
17320 else
17321   enableval=no
17322         enable_warnings=no
17323
17324 fi;
17325 echo "$as_me:17325: result: $enable_warnings" >&5
17326 echo "${ECHO_T}$enable_warnings" >&6
17327 if test "$enable_warnings" = "yes"
17328 then
17329
17330 if test "x$have_x" = xyes; then
17331
17332 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17333 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17334 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17335 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17336 for cf_X_CFLAGS in $X_CFLAGS
17337 do
17338         case "x$cf_X_CFLAGS" in
17339         x-[IUD]*)
17340                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17341                 ;;
17342         *)
17343                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17344                 ;;
17345         esac
17346 done
17347
17348 cat >"conftest.$ac_ext" <<_ACEOF
17349 #line 17349 "configure"
17350 #include "confdefs.h"
17351
17352 #include <stdlib.h>
17353 #include <X11/Intrinsic.h>
17354
17355 int
17356 main (void)
17357 {
17358 String foo = malloc(1); free((void*)foo)
17359   ;
17360   return 0;
17361 }
17362 _ACEOF
17363 rm -f "conftest.$ac_objext"
17364 if { (eval echo "$as_me:17364: \"$ac_compile\"") >&5
17365   (eval $ac_compile) 2>&5
17366   ac_status=$?
17367   echo "$as_me:17367: \$? = $ac_status" >&5
17368   (exit "$ac_status"); } &&
17369          { ac_try='test -s "conftest.$ac_objext"'
17370   { (eval echo "$as_me:17370: \"$ac_try\"") >&5
17371   (eval $ac_try) 2>&5
17372   ac_status=$?
17373   echo "$as_me:17373: \$? = $ac_status" >&5
17374   (exit "$ac_status"); }; }; then
17375
17376 echo "$as_me:17376: checking for X11/Xt const-feature" >&5
17377 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17378 if test "${cf_cv_const_x_string+set}" = set; then
17379   echo $ECHO_N "(cached) $ECHO_C" >&6
17380 else
17381
17382         cat >"conftest.$ac_ext" <<_ACEOF
17383 #line 17383 "configure"
17384 #include "confdefs.h"
17385
17386 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17387 #undef  XTSTRINGDEFINES /* X11R5 and later */
17388 #include <stdlib.h>
17389 #include <X11/Intrinsic.h>
17390
17391 int
17392 main (void)
17393 {
17394 String foo = malloc(1); *foo = 0
17395   ;
17396   return 0;
17397 }
17398 _ACEOF
17399 rm -f "conftest.$ac_objext"
17400 if { (eval echo "$as_me:17400: \"$ac_compile\"") >&5
17401   (eval $ac_compile) 2>&5
17402   ac_status=$?
17403   echo "$as_me:17403: \$? = $ac_status" >&5
17404   (exit "$ac_status"); } &&
17405          { ac_try='test -s "conftest.$ac_objext"'
17406   { (eval echo "$as_me:17406: \"$ac_try\"") >&5
17407   (eval $ac_try) 2>&5
17408   ac_status=$?
17409   echo "$as_me:17409: \$? = $ac_status" >&5
17410   (exit "$ac_status"); }; }; then
17411
17412                         cf_cv_const_x_string=no
17413
17414 else
17415   echo "$as_me: failed program was:" >&5
17416 cat "conftest.$ac_ext" >&5
17417
17418                         cf_cv_const_x_string=yes
17419
17420 fi
17421 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17422
17423 fi
17424 echo "$as_me:17424: result: $cf_cv_const_x_string" >&5
17425 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17426
17427 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17428 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17429 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17430
17431 case "$cf_cv_const_x_string" in
17432 (no)
17433
17434         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17435         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17436
17437         ;;
17438 (*)
17439
17440         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17441         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17442
17443         ;;
17444 esac
17445
17446 else
17447   echo "$as_me: failed program was:" >&5
17448 cat "conftest.$ac_ext" >&5
17449 fi
17450 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17451  fi
17452 cat > "conftest.$ac_ext" <<EOF
17453 #line 17453 "${as_me:-configure}"
17454 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17455 EOF
17456 if test "$INTEL_COMPILER" = yes
17457 then
17458 # The "-wdXXX" options suppress warnings:
17459 # remark #1419: external declaration in primary source file
17460 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17461 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17462 # remark #193: zero used for undefined preprocessing identifier
17463 # remark #593: variable "curs_sb_left_arrow" was set but never used
17464 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17465 # remark #869: parameter "tw" was never referenced
17466 # remark #981: operands are evaluated in unspecified order
17467 # warning #279: controlling expression is constant
17468
17469         { echo "$as_me:17469: checking for $CC warning options..." >&5
17470 echo "$as_me: checking for $CC warning options..." >&6;}
17471         cf_save_CFLAGS="$CFLAGS"
17472         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17473         for cf_opt in \
17474                 wd1419 \
17475                 wd1683 \
17476                 wd1684 \
17477                 wd193 \
17478                 wd593 \
17479                 wd279 \
17480                 wd810 \
17481                 wd869 \
17482                 wd981
17483         do
17484                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17485                 if { (eval echo "$as_me:17485: \"$ac_compile\"") >&5
17486   (eval $ac_compile) 2>&5
17487   ac_status=$?
17488   echo "$as_me:17488: \$? = $ac_status" >&5
17489   (exit "$ac_status"); }; then
17490                         test -n "$verbose" && echo "$as_me:17490: result: ... -$cf_opt" >&5
17491 echo "${ECHO_T}... -$cf_opt" >&6
17492                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17493                 fi
17494         done
17495         CFLAGS="$cf_save_CFLAGS"
17496 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17497 then
17498         { echo "$as_me:17498: checking for $CC warning options..." >&5
17499 echo "$as_me: checking for $CC warning options..." >&6;}
17500         cf_save_CFLAGS="$CFLAGS"
17501         cf_warn_CONST=""
17502         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17503         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17504         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17505         for cf_opt in W Wall \
17506                 Wbad-function-cast \
17507                 Wcast-align \
17508                 Wcast-qual \
17509                 Wdeclaration-after-statement \
17510                 Wextra \
17511                 Winline \
17512                 Wmissing-declarations \
17513                 Wmissing-prototypes \
17514                 Wnested-externs \
17515                 Wpointer-arith \
17516                 Wshadow \
17517                 Wstrict-prototypes \
17518                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17519         do
17520                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17521                 if { (eval echo "$as_me:17521: \"$ac_compile\"") >&5
17522   (eval $ac_compile) 2>&5
17523   ac_status=$?
17524   echo "$as_me:17524: \$? = $ac_status" >&5
17525   (exit "$ac_status"); }; then
17526                         test -n "$verbose" && echo "$as_me:17526: result: ... -$cf_opt" >&5
17527 echo "${ECHO_T}... -$cf_opt" >&6
17528                         case "$cf_opt" in
17529                         (Winline)
17530                                 case "$GCC_VERSION" in
17531                                 ([34].*)
17532                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17533
17534 echo "${as_me:-configure}:17534: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17535
17536                                         continue;;
17537                                 esac
17538                                 ;;
17539                         (Wpointer-arith)
17540                                 case "$GCC_VERSION" in
17541                                 ([12].*)
17542                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17543
17544 echo "${as_me:-configure}:17544: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17545
17546                                         continue;;
17547                                 esac
17548                                 ;;
17549                         esac
17550                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17551                 fi
17552         done
17553         CFLAGS="$cf_save_CFLAGS"
17554 fi
17555 rm -rf ./conftest*
17556
17557 fi
17558
17559 if test "$GCC" = yes || test "$GXX" = yes
17560 then
17561 cat > conftest.i <<EOF
17562 #ifndef GCC_PRINTF
17563 #define GCC_PRINTF 0
17564 #endif
17565 #ifndef GCC_SCANF
17566 #define GCC_SCANF 0
17567 #endif
17568 #ifndef GCC_NORETURN
17569 #define GCC_NORETURN /* nothing */
17570 #endif
17571 #ifndef GCC_UNUSED
17572 #define GCC_UNUSED /* nothing */
17573 #endif
17574 EOF
17575 if test "$GCC" = yes
17576 then
17577         { echo "$as_me:17577: checking for $CC __attribute__ directives..." >&5
17578 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17579 cat > "conftest.$ac_ext" <<EOF
17580 #line 17580 "${as_me:-configure}"
17581 #include <stdio.h>
17582 #include "confdefs.h"
17583 #include "conftest.h"
17584 #include "conftest.i"
17585 #if     GCC_PRINTF
17586 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17587 #else
17588 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17589 #endif
17590 #if     GCC_SCANF
17591 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17592 #else
17593 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17594 #endif
17595 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17596 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17597 extern GCC_NORETURN void foo(void);
17598 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17599 EOF
17600         cf_printf_attribute=no
17601         cf_scanf_attribute=no
17602         for cf_attribute in scanf printf unused noreturn
17603         do
17604
17605 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17606
17607                 cf_directive="__attribute__(($cf_attribute))"
17608                 echo "checking for $CC $cf_directive" 1>&5
17609
17610                 case "$cf_attribute" in
17611                 (printf)
17612                         cf_printf_attribute=yes
17613                         cat >conftest.h <<EOF
17614 #define GCC_$cf_ATTRIBUTE 1
17615 EOF
17616                         ;;
17617                 (scanf)
17618                         cf_scanf_attribute=yes
17619                         cat >conftest.h <<EOF
17620 #define GCC_$cf_ATTRIBUTE 1
17621 EOF
17622                         ;;
17623                 (*)
17624                         cat >conftest.h <<EOF
17625 #define GCC_$cf_ATTRIBUTE $cf_directive
17626 EOF
17627                         ;;
17628                 esac
17629
17630                 if { (eval echo "$as_me:17630: \"$ac_compile\"") >&5
17631   (eval $ac_compile) 2>&5
17632   ac_status=$?
17633   echo "$as_me:17633: \$? = $ac_status" >&5
17634   (exit "$ac_status"); }; then
17635                         test -n "$verbose" && echo "$as_me:17635: result: ... $cf_attribute" >&5
17636 echo "${ECHO_T}... $cf_attribute" >&6
17637                         cat conftest.h >>confdefs.h
17638                         case "$cf_attribute" in
17639                         (noreturn)
17640
17641 cat >>confdefs.h <<EOF
17642 #define GCC_NORETURN $cf_directive
17643 EOF
17644
17645                                 ;;
17646                         (printf)
17647                                 cf_value='/* nothing */'
17648                                 if test "$cf_printf_attribute" != no ; then
17649                                         cf_value='__attribute__((format(printf,fmt,var)))'
17650
17651 cat >>confdefs.h <<\EOF
17652 #define GCC_PRINTF 1
17653 EOF
17654
17655                                 fi
17656
17657 cat >>confdefs.h <<EOF
17658 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17659 EOF
17660
17661                                 ;;
17662                         (scanf)
17663                                 cf_value='/* nothing */'
17664                                 if test "$cf_scanf_attribute" != no ; then
17665                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17666
17667 cat >>confdefs.h <<\EOF
17668 #define GCC_SCANF 1
17669 EOF
17670
17671                                 fi
17672
17673 cat >>confdefs.h <<EOF
17674 #define GCC_SCANFLIKE(fmt,var) $cf_value
17675 EOF
17676
17677                                 ;;
17678                         (unused)
17679
17680 cat >>confdefs.h <<EOF
17681 #define GCC_UNUSED $cf_directive
17682 EOF
17683
17684                                 ;;
17685                         esac
17686                 fi
17687         done
17688 else
17689         ${FGREP-fgrep} define conftest.i >>confdefs.h
17690 fi
17691 rm -rf ./conftest*
17692 fi
17693
17694 fi
17695
17696 if test "x$enable_warnings" = "xyes"; then
17697
17698         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17699
17700         if test "x$cf_with_cxx" = xyes ; then
17701
17702 INTEL_CPLUSPLUS=no
17703
17704 if test "$GCC" = yes ; then
17705         case "$host_os" in
17706         (linux*|gnu*)
17707                 echo "$as_me:17707: checking if this is really Intel C++ compiler" >&5
17708 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17709                 cf_save_CFLAGS="$CXXFLAGS"
17710                 CXXFLAGS="$CXXFLAGS -no-gcc"
17711                 cat >"conftest.$ac_ext" <<_ACEOF
17712 #line 17712 "configure"
17713 #include "confdefs.h"
17714
17715 int
17716 main (void)
17717 {
17718
17719 #ifdef __INTEL_COMPILER
17720 #else
17721 #error __INTEL_COMPILER is not defined
17722 #endif
17723
17724   ;
17725   return 0;
17726 }
17727 _ACEOF
17728 rm -f "conftest.$ac_objext"
17729 if { (eval echo "$as_me:17729: \"$ac_compile\"") >&5
17730   (eval $ac_compile) 2>&5
17731   ac_status=$?
17732   echo "$as_me:17732: \$? = $ac_status" >&5
17733   (exit "$ac_status"); } &&
17734          { ac_try='test -s "conftest.$ac_objext"'
17735   { (eval echo "$as_me:17735: \"$ac_try\"") >&5
17736   (eval $ac_try) 2>&5
17737   ac_status=$?
17738   echo "$as_me:17738: \$? = $ac_status" >&5
17739   (exit "$ac_status"); }; }; then
17740   INTEL_CPLUSPLUS=yes
17741 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17742
17743 else
17744   echo "$as_me: failed program was:" >&5
17745 cat "conftest.$ac_ext" >&5
17746 fi
17747 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17748                 CXXFLAGS="$cf_save_CFLAGS"
17749                 echo "$as_me:17749: result: $INTEL_CPLUSPLUS" >&5
17750 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17751                 ;;
17752         esac
17753 fi
17754
17755 CLANG_CPLUSPLUS=no
17756
17757 if test "$GCC" = yes ; then
17758         echo "$as_me:17758: checking if this is really Clang C++ compiler" >&5
17759 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17760         cf_save_CFLAGS="$CXXFLAGS"
17761         cat >"conftest.$ac_ext" <<_ACEOF
17762 #line 17762 "configure"
17763 #include "confdefs.h"
17764
17765 int
17766 main (void)
17767 {
17768
17769 #ifdef __clang__
17770 #else
17771 #error __clang__ is not defined
17772 #endif
17773
17774   ;
17775   return 0;
17776 }
17777 _ACEOF
17778 rm -f "conftest.$ac_objext"
17779 if { (eval echo "$as_me:17779: \"$ac_compile\"") >&5
17780   (eval $ac_compile) 2>&5
17781   ac_status=$?
17782   echo "$as_me:17782: \$? = $ac_status" >&5
17783   (exit "$ac_status"); } &&
17784          { ac_try='test -s "conftest.$ac_objext"'
17785   { (eval echo "$as_me:17785: \"$ac_try\"") >&5
17786   (eval $ac_try) 2>&5
17787   ac_status=$?
17788   echo "$as_me:17788: \$? = $ac_status" >&5
17789   (exit "$ac_status"); }; }; then
17790   CLANG_CPLUSPLUS=yes
17791
17792 else
17793   echo "$as_me: failed program was:" >&5
17794 cat "conftest.$ac_ext" >&5
17795 fi
17796 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17797         CXXFLAGS="$cf_save_CFLAGS"
17798         echo "$as_me:17798: result: $CLANG_CPLUSPLUS" >&5
17799 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17800 fi
17801
17802 CLANG_VERSION=none
17803
17804 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17805         case "$CC" in
17806         (c[1-9][0-9]|*/c[1-9][0-9])
17807                 { echo "$as_me:17807: WARNING: replacing broken compiler alias $CC" >&5
17808 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17809                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17810                 CC=clang
17811                 ;;
17812         esac
17813
17814         echo "$as_me:17814: checking version of $CC" >&5
17815 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17816         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.].*//'`"
17817         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17818         echo "$as_me:17818: result: $CLANG_VERSION" >&5
17819 echo "${ECHO_T}$CLANG_VERSION" >&6
17820
17821         for cf_clang_opt in \
17822                 -Qunused-arguments \
17823                 -Wno-error=implicit-function-declaration
17824         do
17825                 echo "$as_me:17825: checking if option $cf_clang_opt works" >&5
17826 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17827                 cf_save_CFLAGS="$CFLAGS"
17828                 CFLAGS="$CFLAGS $cf_clang_opt"
17829                 cat >"conftest.$ac_ext" <<_ACEOF
17830 #line 17830 "configure"
17831 #include "confdefs.h"
17832
17833                         #include <stdio.h>
17834 int
17835 main (void)
17836 {
17837
17838                         printf("hello!\\n");
17839   ;
17840   return 0;
17841 }
17842 _ACEOF
17843 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17844 if { (eval echo "$as_me:17844: \"$ac_link\"") >&5
17845   (eval $ac_link) 2>&5
17846   ac_status=$?
17847   echo "$as_me:17847: \$? = $ac_status" >&5
17848   (exit "$ac_status"); } &&
17849          { ac_try='test -s "conftest$ac_exeext"'
17850   { (eval echo "$as_me:17850: \"$ac_try\"") >&5
17851   (eval $ac_try) 2>&5
17852   ac_status=$?
17853   echo "$as_me:17853: \$? = $ac_status" >&5
17854   (exit "$ac_status"); }; }; then
17855
17856                         cf_clang_optok=yes
17857 else
17858   echo "$as_me: failed program was:" >&5
17859 cat "conftest.$ac_ext" >&5
17860
17861                         cf_clang_optok=no
17862 fi
17863 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17864                 echo "$as_me:17864: result: $cf_clang_optok" >&5
17865 echo "${ECHO_T}$cf_clang_optok" >&6
17866                 CFLAGS="$cf_save_CFLAGS"
17867                 if test "$cf_clang_optok" = yes; then
17868                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17869
17870 echo "${as_me:-configure}:17870: testing adding option $cf_clang_opt ..." 1>&5
17871
17872         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17873         CFLAGS="${CFLAGS}$cf_clang_opt"
17874
17875                 fi
17876         done
17877 fi
17878
17879 ac_ext=cc
17880 ac_cpp='$CXXCPP $CPPFLAGS'
17881 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17882 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17883 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17884 ac_main_return="return"
17885
17886 cat > conftest.$ac_ext <<EOF
17887 #line 17887 "configure"
17888 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17889 EOF
17890
17891 if test "$INTEL_CPLUSPLUS" = yes
17892 then
17893 # The "-wdXXX" options suppress warnings:
17894 # remark #1419: external declaration in primary source file
17895 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17896 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17897 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17898 # remark #193: zero used for undefined preprocessing identifier
17899 # remark #593: variable "curs_sb_left_arrow" was set but never used
17900 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17901 # remark #869: parameter "tw" was never referenced
17902 # remark #981: operands are evaluated in unspecified order
17903 # warning #269: invalid format string conversion
17904
17905         { echo "$as_me:17905: checking for $CC warning options..." >&5
17906 echo "$as_me: checking for $CC warning options..." >&6;}
17907         cf_save_CXXFLAGS="$CXXFLAGS"
17908         EXTRA_CXXFLAGS="-Wall"
17909         for cf_opt in \
17910                 wd1419 \
17911                 wd1682 \
17912                 wd1683 \
17913                 wd1684 \
17914                 wd193 \
17915                 wd279 \
17916                 wd593 \
17917                 wd810 \
17918                 wd869 \
17919                 wd981
17920         do
17921                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17922                 if { (eval echo "$as_me:17922: \"$ac_compile\"") >&5
17923   (eval $ac_compile) 2>&5
17924   ac_status=$?
17925   echo "$as_me:17925: \$? = $ac_status" >&5
17926   (exit "$ac_status"); }; then
17927                         test -n "$verbose" && echo "$as_me:17927: result: ... -$cf_opt" >&5
17928 echo "${ECHO_T}... -$cf_opt" >&6
17929                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17930                 fi
17931         done
17932         CXXFLAGS="$cf_save_CXXFLAGS"
17933
17934 elif test "$GXX" = yes
17935 then
17936         { echo "$as_me:17936: checking for $CXX warning options..." >&5
17937 echo "$as_me: checking for $CXX warning options..." >&6;}
17938         cf_save_CXXFLAGS="$CXXFLAGS"
17939         EXTRA_CXXFLAGS="-W -Wall"
17940         cf_gxx_extra_warnings=""
17941         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17942         case "$GXX_VERSION" in
17943         ([1-2].*)
17944                 ;;
17945         (*)
17946                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17947                 ;;
17948         esac
17949         for cf_opt in \
17950                 Wabi \
17951                 fabi-version=0 \
17952                 Wextra \
17953                 Wignored-qualifiers \
17954                 Wlogical-op \
17955                 Woverloaded-virtual \
17956                 Wsign-promo \
17957                 Wsynth \
17958                 Wold-style-cast \
17959                 Wcast-align \
17960                 Wcast-qual \
17961                 Wpointer-arith \
17962                 Wshadow \
17963                 Wundef $cf_gxx_extra_warnings Wno-unused
17964         do
17965                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17966                 if { (eval echo "$as_me:17966: \"$ac_compile\"") >&5
17967   (eval $ac_compile) 2>&5
17968   ac_status=$?
17969   echo "$as_me:17969: \$? = $ac_status" >&5
17970   (exit "$ac_status"); }; then
17971                         test -n "$verbose" && echo "$as_me:17971: result: ... -$cf_opt" >&5
17972 echo "${ECHO_T}... -$cf_opt" >&6
17973                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17974                 else
17975                         test -n "$verbose" && echo "$as_me:17975: result: ... no -$cf_opt" >&5
17976 echo "${ECHO_T}... no -$cf_opt" >&6
17977                 fi
17978         done
17979         CXXFLAGS="$cf_save_CXXFLAGS"
17980 fi
17981
17982 rm -rf ./conftest*
17983 ac_ext=c
17984 ac_cpp='$CPP $CPPFLAGS'
17985 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17986 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17987 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17988 ac_main_return="return"
17989
17990         fi
17991 fi
17992
17993 echo "$as_me:17993: checking if you want to work around bogus compiler/loader warnings" >&5
17994 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17995
17996 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17997 if test "${enable_string_hacks+set}" = set; then
17998   enableval="$enable_string_hacks"
17999   enable_string_hacks=$enableval
18000 else
18001   enable_string_hacks=no
18002 fi;
18003 echo "$as_me:18003: result: $enable_string_hacks" >&5
18004 echo "${ECHO_T}$enable_string_hacks" >&6
18005
18006 if test "x$enable_string_hacks" = "xyes"; then
18007
18008 cat >>confdefs.h <<\EOF
18009 #define USE_STRING_HACKS 1
18010 EOF
18011
18012         { echo "$as_me:18012: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18013 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18014         echo "$as_me:18014: checking for strlcat" >&5
18015 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18016 if test "${ac_cv_func_strlcat+set}" = set; then
18017   echo $ECHO_N "(cached) $ECHO_C" >&6
18018 else
18019   cat >"conftest.$ac_ext" <<_ACEOF
18020 #line 18020 "configure"
18021 #include "confdefs.h"
18022 #define strlcat autoconf_temporary
18023 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18024 #undef strlcat
18025
18026 #ifdef __cplusplus
18027 extern "C"
18028 #endif
18029
18030 /* We use char because int might match the return type of a gcc2
18031    builtin and then its argument prototype would still apply.  */
18032 char strlcat (void);
18033
18034 int
18035 main (void)
18036 {
18037
18038 /* The GNU C library defines stubs for functions which it implements
18039     to always fail with ENOSYS.  Some functions are actually named
18040     something starting with __ and the normal name is an alias.  */
18041 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18042 #error found stub for strlcat
18043 #endif
18044
18045         return strlcat ();
18046   ;
18047   return 0;
18048 }
18049 _ACEOF
18050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18051 if { (eval echo "$as_me:18051: \"$ac_link\"") >&5
18052   (eval $ac_link) 2>&5
18053   ac_status=$?
18054   echo "$as_me:18054: \$? = $ac_status" >&5
18055   (exit "$ac_status"); } &&
18056          { ac_try='test -s "conftest$ac_exeext"'
18057   { (eval echo "$as_me:18057: \"$ac_try\"") >&5
18058   (eval $ac_try) 2>&5
18059   ac_status=$?
18060   echo "$as_me:18060: \$? = $ac_status" >&5
18061   (exit "$ac_status"); }; }; then
18062   ac_cv_func_strlcat=yes
18063 else
18064   echo "$as_me: failed program was:" >&5
18065 cat "conftest.$ac_ext" >&5
18066 ac_cv_func_strlcat=no
18067 fi
18068 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18069 fi
18070 echo "$as_me:18070: result: $ac_cv_func_strlcat" >&5
18071 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18072 if test "$ac_cv_func_strlcat" = yes; then
18073
18074 cat >>confdefs.h <<\EOF
18075 #define HAVE_STRLCAT 1
18076 EOF
18077
18078 else
18079
18080                 echo "$as_me:18080: checking for strlcat in -lbsd" >&5
18081 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18082 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18083   echo $ECHO_N "(cached) $ECHO_C" >&6
18084 else
18085   ac_check_lib_save_LIBS=$LIBS
18086 LIBS="-lbsd  $LIBS"
18087 cat >"conftest.$ac_ext" <<_ACEOF
18088 #line 18088 "configure"
18089 #include "confdefs.h"
18090
18091 /* Override any gcc2 internal prototype to avoid an error.  */
18092 #ifdef __cplusplus
18093 extern "C"
18094 #endif
18095 /* We use char because int might match the return type of a gcc2
18096    builtin and then its argument prototype would still apply.  */
18097 char strlcat ();
18098 int
18099 main (void)
18100 {
18101 strlcat ();
18102   ;
18103   return 0;
18104 }
18105 _ACEOF
18106 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18107 if { (eval echo "$as_me:18107: \"$ac_link\"") >&5
18108   (eval $ac_link) 2>&5
18109   ac_status=$?
18110   echo "$as_me:18110: \$? = $ac_status" >&5
18111   (exit "$ac_status"); } &&
18112          { ac_try='test -s "conftest$ac_exeext"'
18113   { (eval echo "$as_me:18113: \"$ac_try\"") >&5
18114   (eval $ac_try) 2>&5
18115   ac_status=$?
18116   echo "$as_me:18116: \$? = $ac_status" >&5
18117   (exit "$ac_status"); }; }; then
18118   ac_cv_lib_bsd_strlcat=yes
18119 else
18120   echo "$as_me: failed program was:" >&5
18121 cat "conftest.$ac_ext" >&5
18122 ac_cv_lib_bsd_strlcat=no
18123 fi
18124 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18125 LIBS=$ac_check_lib_save_LIBS
18126 fi
18127 echo "$as_me:18127: result: $ac_cv_lib_bsd_strlcat" >&5
18128 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18129 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18130
18131 cf_add_libs="$LIBS"
18132 # reverse order
18133 cf_add_0lib=
18134 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18135 # filter duplicates
18136 for cf_add_1lib in $cf_add_0lib; do
18137         for cf_add_2lib in $cf_add_libs; do
18138                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18139                         cf_add_1lib=
18140                         break
18141                 fi
18142         done
18143         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18144 done
18145 LIBS="$cf_add_libs"
18146
18147 for ac_header in bsd/string.h
18148 do
18149 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18150 echo "$as_me:18150: checking for $ac_header" >&5
18151 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18152 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18153   echo $ECHO_N "(cached) $ECHO_C" >&6
18154 else
18155   cat >"conftest.$ac_ext" <<_ACEOF
18156 #line 18156 "configure"
18157 #include "confdefs.h"
18158 #include <$ac_header>
18159 _ACEOF
18160 if { (eval echo "$as_me:18160: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18161   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18162   ac_status=$?
18163   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18164   rm -f conftest.er1
18165   cat conftest.err >&5
18166   echo "$as_me:18166: \$? = $ac_status" >&5
18167   (exit "$ac_status"); } >/dev/null; then
18168   if test -s conftest.err; then
18169     ac_cpp_err=$ac_c_preproc_warn_flag
18170   else
18171     ac_cpp_err=
18172   fi
18173 else
18174   ac_cpp_err=yes
18175 fi
18176 if test -z "$ac_cpp_err"; then
18177   eval "$as_ac_Header=yes"
18178 else
18179   echo "$as_me: failed program was:" >&5
18180   cat "conftest.$ac_ext" >&5
18181   eval "$as_ac_Header=no"
18182 fi
18183 rm -f conftest.err "conftest.$ac_ext"
18184 fi
18185 echo "$as_me:18185: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18186 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18187 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18188   cat >>confdefs.h <<EOF
18189 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18190 EOF
18191
18192 fi
18193 done
18194
18195 cat >>confdefs.h <<\EOF
18196 #define HAVE_STRLCAT 1
18197 EOF
18198
18199 fi
18200
18201 fi
18202
18203 for ac_func in strlcpy snprintf
18204 do
18205 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18206 echo "$as_me:18206: checking for $ac_func" >&5
18207 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18208 if eval "test \"\${$as_ac_var+set}\" = set"; then
18209   echo $ECHO_N "(cached) $ECHO_C" >&6
18210 else
18211   cat >"conftest.$ac_ext" <<_ACEOF
18212 #line 18212 "configure"
18213 #include "confdefs.h"
18214 #define $ac_func autoconf_temporary
18215 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18216 #undef $ac_func
18217
18218 #ifdef __cplusplus
18219 extern "C"
18220 #endif
18221
18222 /* We use char because int might match the return type of a gcc2
18223    builtin and then its argument prototype would still apply.  */
18224 char $ac_func (void);
18225
18226 int
18227 main (void)
18228 {
18229
18230 /* The GNU C library defines stubs for functions which it implements
18231     to always fail with ENOSYS.  Some functions are actually named
18232     something starting with __ and the normal name is an alias.  */
18233 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18234 #error found stub for $ac_func
18235 #endif
18236
18237         return $ac_func ();
18238   ;
18239   return 0;
18240 }
18241 _ACEOF
18242 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18243 if { (eval echo "$as_me:18243: \"$ac_link\"") >&5
18244   (eval $ac_link) 2>&5
18245   ac_status=$?
18246   echo "$as_me:18246: \$? = $ac_status" >&5
18247   (exit "$ac_status"); } &&
18248          { ac_try='test -s "conftest$ac_exeext"'
18249   { (eval echo "$as_me:18249: \"$ac_try\"") >&5
18250   (eval $ac_try) 2>&5
18251   ac_status=$?
18252   echo "$as_me:18252: \$? = $ac_status" >&5
18253   (exit "$ac_status"); }; }; then
18254   eval "$as_ac_var=yes"
18255 else
18256   echo "$as_me: failed program was:" >&5
18257 cat "conftest.$ac_ext" >&5
18258 eval "$as_ac_var=no"
18259 fi
18260 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18261 fi
18262 echo "$as_me:18262: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18263 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18264 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18265   cat >>confdefs.h <<EOF
18266 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18267 EOF
18268
18269 fi
18270 done
18271
18272 fi
18273
18274 ###     use option --enable-assertions to turn on generation of assertion code
18275 echo "$as_me:18275: checking if you want to enable runtime assertions" >&5
18276 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18277
18278 # Check whether --enable-assertions or --disable-assertions was given.
18279 if test "${enable_assertions+set}" = set; then
18280   enableval="$enable_assertions"
18281   with_assertions=$enableval
18282 else
18283   with_assertions=no
18284 fi;
18285 echo "$as_me:18285: result: $with_assertions" >&5
18286 echo "${ECHO_T}$with_assertions" >&6
18287 if test -n "$GCC"
18288 then
18289         if test "$with_assertions" = no
18290         then
18291                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18292         else
18293
18294         ADAFLAGS="$ADAFLAGS -gnata"
18295
18296         fi
18297 fi
18298
18299 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18300
18301 echo "$as_me:18301: checking if you want to use dmalloc for testing" >&5
18302 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18303
18304 # Check whether --with-dmalloc or --without-dmalloc was given.
18305 if test "${with_dmalloc+set}" = set; then
18306   withval="$with_dmalloc"
18307   case "x$withval" in
18308         (x|xno) ;;
18309         (*)
18310                 : "${with_cflags:=-g}"
18311                 : "${enable_leaks:=no}"
18312                 with_dmalloc=yes
18313
18314 cat >>confdefs.h <<EOF
18315 #define USE_DMALLOC 1
18316 EOF
18317
18318                 ;;
18319         esac
18320 else
18321   with_dmalloc=
18322 fi;
18323 echo "$as_me:18323: result: ${with_dmalloc:-no}" >&5
18324 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18325
18326 case ".$with_cflags" in
18327 (.*-g*)
18328         case .$CFLAGS in
18329         (.*-g*)
18330                 ;;
18331         (*)
18332
18333 cf_fix_cppflags=no
18334 cf_new_cflags=
18335 cf_new_cppflags=
18336 cf_new_extra_cppflags=
18337
18338 for cf_add_cflags in -g
18339 do
18340 case "$cf_fix_cppflags" in
18341 (no)
18342         case "$cf_add_cflags" in
18343         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18344                 case "$cf_add_cflags" in
18345                 (-D*)
18346                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18347
18348                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18349                                 && test -z "${cf_tst_cflags}" \
18350                                 && cf_fix_cppflags=yes
18351
18352                         if test "$cf_fix_cppflags" = yes ; then
18353
18354         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18355         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18356
18357                                 continue
18358                         elif test "${cf_tst_cflags}" = "\"'" ; then
18359
18360         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18361         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18362
18363                                 continue
18364                         fi
18365                         ;;
18366                 esac
18367                 case "$CPPFLAGS" in
18368                 (*$cf_add_cflags)
18369                         ;;
18370                 (*)
18371                         case "$cf_add_cflags" in
18372                         (-D*)
18373                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18374
18375 CPPFLAGS=`echo "$CPPFLAGS" | \
18376         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18377                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18378
18379                                 ;;
18380                         esac
18381
18382         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18383         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18384
18385                         ;;
18386                 esac
18387                 ;;
18388         (*)
18389
18390         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18391         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18392
18393                 ;;
18394         esac
18395         ;;
18396 (yes)
18397
18398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18400
18401         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18402
18403         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18404                 && test -z "${cf_tst_cflags}" \
18405                 && cf_fix_cppflags=no
18406         ;;
18407 esac
18408 done
18409
18410 if test -n "$cf_new_cflags" ; then
18411
18412         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18413         CFLAGS="${CFLAGS}$cf_new_cflags"
18414
18415 fi
18416
18417 if test -n "$cf_new_cppflags" ; then
18418
18419         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18420         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18421
18422 fi
18423
18424 if test -n "$cf_new_extra_cppflags" ; then
18425
18426         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18427         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18428
18429 fi
18430
18431                 ;;
18432         esac
18433         ;;
18434 esac
18435
18436 if test "$with_dmalloc" = yes ; then
18437         echo "$as_me:18437: checking for dmalloc.h" >&5
18438 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18439 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18440   echo $ECHO_N "(cached) $ECHO_C" >&6
18441 else
18442   cat >"conftest.$ac_ext" <<_ACEOF
18443 #line 18443 "configure"
18444 #include "confdefs.h"
18445 #include <dmalloc.h>
18446 _ACEOF
18447 if { (eval echo "$as_me:18447: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18448   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18449   ac_status=$?
18450   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18451   rm -f conftest.er1
18452   cat conftest.err >&5
18453   echo "$as_me:18453: \$? = $ac_status" >&5
18454   (exit "$ac_status"); } >/dev/null; then
18455   if test -s conftest.err; then
18456     ac_cpp_err=$ac_c_preproc_warn_flag
18457   else
18458     ac_cpp_err=
18459   fi
18460 else
18461   ac_cpp_err=yes
18462 fi
18463 if test -z "$ac_cpp_err"; then
18464   ac_cv_header_dmalloc_h=yes
18465 else
18466   echo "$as_me: failed program was:" >&5
18467   cat "conftest.$ac_ext" >&5
18468   ac_cv_header_dmalloc_h=no
18469 fi
18470 rm -f conftest.err "conftest.$ac_ext"
18471 fi
18472 echo "$as_me:18472: result: $ac_cv_header_dmalloc_h" >&5
18473 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18474 if test "$ac_cv_header_dmalloc_h" = yes; then
18475
18476 echo "$as_me:18476: checking for dmalloc_debug in -ldmalloc" >&5
18477 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18478 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18479   echo $ECHO_N "(cached) $ECHO_C" >&6
18480 else
18481   ac_check_lib_save_LIBS=$LIBS
18482 LIBS="-ldmalloc  $LIBS"
18483 cat >"conftest.$ac_ext" <<_ACEOF
18484 #line 18484 "configure"
18485 #include "confdefs.h"
18486
18487 /* Override any gcc2 internal prototype to avoid an error.  */
18488 #ifdef __cplusplus
18489 extern "C"
18490 #endif
18491 /* We use char because int might match the return type of a gcc2
18492    builtin and then its argument prototype would still apply.  */
18493 char dmalloc_debug ();
18494 int
18495 main (void)
18496 {
18497 dmalloc_debug ();
18498   ;
18499   return 0;
18500 }
18501 _ACEOF
18502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18503 if { (eval echo "$as_me:18503: \"$ac_link\"") >&5
18504   (eval $ac_link) 2>&5
18505   ac_status=$?
18506   echo "$as_me:18506: \$? = $ac_status" >&5
18507   (exit "$ac_status"); } &&
18508          { ac_try='test -s "conftest$ac_exeext"'
18509   { (eval echo "$as_me:18509: \"$ac_try\"") >&5
18510   (eval $ac_try) 2>&5
18511   ac_status=$?
18512   echo "$as_me:18512: \$? = $ac_status" >&5
18513   (exit "$ac_status"); }; }; then
18514   ac_cv_lib_dmalloc_dmalloc_debug=yes
18515 else
18516   echo "$as_me: failed program was:" >&5
18517 cat "conftest.$ac_ext" >&5
18518 ac_cv_lib_dmalloc_dmalloc_debug=no
18519 fi
18520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18521 LIBS=$ac_check_lib_save_LIBS
18522 fi
18523 echo "$as_me:18523: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18524 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18525 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18526   cat >>confdefs.h <<EOF
18527 #define HAVE_LIBDMALLOC 1
18528 EOF
18529
18530   LIBS="-ldmalloc $LIBS"
18531
18532 fi
18533
18534 fi
18535
18536 fi
18537
18538 echo "$as_me:18538: checking if you want to use dbmalloc for testing" >&5
18539 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18540
18541 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18542 if test "${with_dbmalloc+set}" = set; then
18543   withval="$with_dbmalloc"
18544   case "x$withval" in
18545         (x|xno) ;;
18546         (*)
18547                 : "${with_cflags:=-g}"
18548                 : "${enable_leaks:=no}"
18549                 with_dbmalloc=yes
18550
18551 cat >>confdefs.h <<EOF
18552 #define USE_DBMALLOC 1
18553 EOF
18554
18555                 ;;
18556         esac
18557 else
18558   with_dbmalloc=
18559 fi;
18560 echo "$as_me:18560: result: ${with_dbmalloc:-no}" >&5
18561 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18562
18563 case ".$with_cflags" in
18564 (.*-g*)
18565         case .$CFLAGS in
18566         (.*-g*)
18567                 ;;
18568         (*)
18569
18570 cf_fix_cppflags=no
18571 cf_new_cflags=
18572 cf_new_cppflags=
18573 cf_new_extra_cppflags=
18574
18575 for cf_add_cflags in -g
18576 do
18577 case "$cf_fix_cppflags" in
18578 (no)
18579         case "$cf_add_cflags" in
18580         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18581                 case "$cf_add_cflags" in
18582                 (-D*)
18583                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18584
18585                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18586                                 && test -z "${cf_tst_cflags}" \
18587                                 && cf_fix_cppflags=yes
18588
18589                         if test "$cf_fix_cppflags" = yes ; then
18590
18591         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18592         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18593
18594                                 continue
18595                         elif test "${cf_tst_cflags}" = "\"'" ; then
18596
18597         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18598         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18599
18600                                 continue
18601                         fi
18602                         ;;
18603                 esac
18604                 case "$CPPFLAGS" in
18605                 (*$cf_add_cflags)
18606                         ;;
18607                 (*)
18608                         case "$cf_add_cflags" in
18609                         (-D*)
18610                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18611
18612 CPPFLAGS=`echo "$CPPFLAGS" | \
18613         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18614                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18615
18616                                 ;;
18617                         esac
18618
18619         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18620         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18621
18622                         ;;
18623                 esac
18624                 ;;
18625         (*)
18626
18627         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18628         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18629
18630                 ;;
18631         esac
18632         ;;
18633 (yes)
18634
18635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18637
18638         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18639
18640         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18641                 && test -z "${cf_tst_cflags}" \
18642                 && cf_fix_cppflags=no
18643         ;;
18644 esac
18645 done
18646
18647 if test -n "$cf_new_cflags" ; then
18648
18649         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18650         CFLAGS="${CFLAGS}$cf_new_cflags"
18651
18652 fi
18653
18654 if test -n "$cf_new_cppflags" ; then
18655
18656         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18657         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18658
18659 fi
18660
18661 if test -n "$cf_new_extra_cppflags" ; then
18662
18663         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18664         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18665
18666 fi
18667
18668                 ;;
18669         esac
18670         ;;
18671 esac
18672
18673 if test "$with_dbmalloc" = yes ; then
18674         echo "$as_me:18674: checking for dbmalloc.h" >&5
18675 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18676 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18677   echo $ECHO_N "(cached) $ECHO_C" >&6
18678 else
18679   cat >"conftest.$ac_ext" <<_ACEOF
18680 #line 18680 "configure"
18681 #include "confdefs.h"
18682 #include <dbmalloc.h>
18683 _ACEOF
18684 if { (eval echo "$as_me:18684: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18685   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18686   ac_status=$?
18687   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18688   rm -f conftest.er1
18689   cat conftest.err >&5
18690   echo "$as_me:18690: \$? = $ac_status" >&5
18691   (exit "$ac_status"); } >/dev/null; then
18692   if test -s conftest.err; then
18693     ac_cpp_err=$ac_c_preproc_warn_flag
18694   else
18695     ac_cpp_err=
18696   fi
18697 else
18698   ac_cpp_err=yes
18699 fi
18700 if test -z "$ac_cpp_err"; then
18701   ac_cv_header_dbmalloc_h=yes
18702 else
18703   echo "$as_me: failed program was:" >&5
18704   cat "conftest.$ac_ext" >&5
18705   ac_cv_header_dbmalloc_h=no
18706 fi
18707 rm -f conftest.err "conftest.$ac_ext"
18708 fi
18709 echo "$as_me:18709: result: $ac_cv_header_dbmalloc_h" >&5
18710 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18711 if test "$ac_cv_header_dbmalloc_h" = yes; then
18712
18713 echo "$as_me:18713: checking for debug_malloc in -ldbmalloc" >&5
18714 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18715 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18716   echo $ECHO_N "(cached) $ECHO_C" >&6
18717 else
18718   ac_check_lib_save_LIBS=$LIBS
18719 LIBS="-ldbmalloc  $LIBS"
18720 cat >"conftest.$ac_ext" <<_ACEOF
18721 #line 18721 "configure"
18722 #include "confdefs.h"
18723
18724 /* Override any gcc2 internal prototype to avoid an error.  */
18725 #ifdef __cplusplus
18726 extern "C"
18727 #endif
18728 /* We use char because int might match the return type of a gcc2
18729    builtin and then its argument prototype would still apply.  */
18730 char debug_malloc ();
18731 int
18732 main (void)
18733 {
18734 debug_malloc ();
18735   ;
18736   return 0;
18737 }
18738 _ACEOF
18739 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18740 if { (eval echo "$as_me:18740: \"$ac_link\"") >&5
18741   (eval $ac_link) 2>&5
18742   ac_status=$?
18743   echo "$as_me:18743: \$? = $ac_status" >&5
18744   (exit "$ac_status"); } &&
18745          { ac_try='test -s "conftest$ac_exeext"'
18746   { (eval echo "$as_me:18746: \"$ac_try\"") >&5
18747   (eval $ac_try) 2>&5
18748   ac_status=$?
18749   echo "$as_me:18749: \$? = $ac_status" >&5
18750   (exit "$ac_status"); }; }; then
18751   ac_cv_lib_dbmalloc_debug_malloc=yes
18752 else
18753   echo "$as_me: failed program was:" >&5
18754 cat "conftest.$ac_ext" >&5
18755 ac_cv_lib_dbmalloc_debug_malloc=no
18756 fi
18757 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18758 LIBS=$ac_check_lib_save_LIBS
18759 fi
18760 echo "$as_me:18760: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18761 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18762 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18763   cat >>confdefs.h <<EOF
18764 #define HAVE_LIBDBMALLOC 1
18765 EOF
18766
18767   LIBS="-ldbmalloc $LIBS"
18768
18769 fi
18770
18771 fi
18772
18773 fi
18774
18775 echo "$as_me:18775: checking if you want to use valgrind for testing" >&5
18776 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18777
18778 # Check whether --with-valgrind or --without-valgrind was given.
18779 if test "${with_valgrind+set}" = set; then
18780   withval="$with_valgrind"
18781   case "x$withval" in
18782         (x|xno) ;;
18783         (*)
18784                 : "${with_cflags:=-g}"
18785                 : "${enable_leaks:=no}"
18786                 with_valgrind=yes
18787
18788 cat >>confdefs.h <<EOF
18789 #define USE_VALGRIND 1
18790 EOF
18791
18792                 ;;
18793         esac
18794 else
18795   with_valgrind=
18796 fi;
18797 echo "$as_me:18797: result: ${with_valgrind:-no}" >&5
18798 echo "${ECHO_T}${with_valgrind:-no}" >&6
18799
18800 case ".$with_cflags" in
18801 (.*-g*)
18802         case .$CFLAGS in
18803         (.*-g*)
18804                 ;;
18805         (*)
18806
18807 cf_fix_cppflags=no
18808 cf_new_cflags=
18809 cf_new_cppflags=
18810 cf_new_extra_cppflags=
18811
18812 for cf_add_cflags in -g
18813 do
18814 case "$cf_fix_cppflags" in
18815 (no)
18816         case "$cf_add_cflags" in
18817         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18818                 case "$cf_add_cflags" in
18819                 (-D*)
18820                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18821
18822                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18823                                 && test -z "${cf_tst_cflags}" \
18824                                 && cf_fix_cppflags=yes
18825
18826                         if test "$cf_fix_cppflags" = yes ; then
18827
18828         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18829         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18830
18831                                 continue
18832                         elif test "${cf_tst_cflags}" = "\"'" ; then
18833
18834         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18835         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18836
18837                                 continue
18838                         fi
18839                         ;;
18840                 esac
18841                 case "$CPPFLAGS" in
18842                 (*$cf_add_cflags)
18843                         ;;
18844                 (*)
18845                         case "$cf_add_cflags" in
18846                         (-D*)
18847                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18848
18849 CPPFLAGS=`echo "$CPPFLAGS" | \
18850         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18851                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18852
18853                                 ;;
18854                         esac
18855
18856         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18857         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18858
18859                         ;;
18860                 esac
18861                 ;;
18862         (*)
18863
18864         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18865         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18866
18867                 ;;
18868         esac
18869         ;;
18870 (yes)
18871
18872         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18873         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18874
18875         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18876
18877         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18878                 && test -z "${cf_tst_cflags}" \
18879                 && cf_fix_cppflags=no
18880         ;;
18881 esac
18882 done
18883
18884 if test -n "$cf_new_cflags" ; then
18885
18886         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18887         CFLAGS="${CFLAGS}$cf_new_cflags"
18888
18889 fi
18890
18891 if test -n "$cf_new_cppflags" ; then
18892
18893         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18894         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18895
18896 fi
18897
18898 if test -n "$cf_new_extra_cppflags" ; then
18899
18900         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18901         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18902
18903 fi
18904
18905                 ;;
18906         esac
18907         ;;
18908 esac
18909
18910 echo "$as_me:18910: checking if you want to perform memory-leak testing" >&5
18911 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18912
18913 # Check whether --enable-leaks or --disable-leaks was given.
18914 if test "${enable_leaks+set}" = set; then
18915   enableval="$enable_leaks"
18916   enable_leaks=$enableval
18917 else
18918   enable_leaks=yes
18919 fi;
18920 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18921 echo "$as_me:18921: result: $with_no_leaks" >&5
18922 echo "${ECHO_T}$with_no_leaks" >&6
18923
18924 if test "$enable_leaks" = no ; then
18925
18926 cat >>confdefs.h <<\EOF
18927 #define NO_LEAKS 1
18928 EOF
18929
18930 cat >>confdefs.h <<\EOF
18931 #define YY_NO_LEAKS 1
18932 EOF
18933
18934 fi
18935
18936 cat >>confdefs.h <<\EOF
18937 #define HAVE_NC_ALLOC_H 1
18938 EOF
18939
18940 ###     use option --enable-expanded to generate certain macros as functions
18941
18942 # Check whether --enable-expanded or --disable-expanded was given.
18943 if test "${enable_expanded+set}" = set; then
18944   enableval="$enable_expanded"
18945   test "x$enableval" = xyes &&
18946 cat >>confdefs.h <<\EOF
18947 #define NCURSES_EXPANDED 1
18948 EOF
18949
18950 fi;
18951
18952 ###     use option --disable-macros to suppress macros in favor of functions
18953
18954 # Check whether --enable-macros or --disable-macros was given.
18955 if test "${enable_macros+set}" = set; then
18956   enableval="$enable_macros"
18957   test "$enableval" = no &&
18958 cat >>confdefs.h <<\EOF
18959 #define NCURSES_NOMACROS 1
18960 EOF
18961
18962 fi;
18963
18964 # Normally we only add trace() to the debug-library.  Allow this to be
18965 # extended to all models of the ncurses library:
18966 cf_all_traces=no
18967 case "$CFLAGS $CPPFLAGS" in
18968 (*-DTRACE*)
18969         cf_all_traces=yes
18970         ;;
18971 esac
18972
18973 echo "$as_me:18973: checking whether to add trace feature to all models" >&5
18974 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18975
18976 # Check whether --with-trace or --without-trace was given.
18977 if test "${with_trace+set}" = set; then
18978   withval="$with_trace"
18979   cf_with_trace=$withval
18980 else
18981   cf_with_trace=$cf_all_traces
18982 fi;
18983 echo "$as_me:18983: result: $cf_with_trace" >&5
18984 echo "${ECHO_T}$cf_with_trace" >&6
18985
18986 if test "x$cf_with_trace" = xyes ; then
18987         LIB_TRACING=all
18988         ADA_TRACE=TRUE
18989
18990 cf_fix_cppflags=no
18991 cf_new_cflags=
18992 cf_new_cppflags=
18993 cf_new_extra_cppflags=
18994
18995 for cf_add_cflags in -DTRACE
18996 do
18997 case "$cf_fix_cppflags" in
18998 (no)
18999         case "$cf_add_cflags" in
19000         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19001                 case "$cf_add_cflags" in
19002                 (-D*)
19003                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19004
19005                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19006                                 && test -z "${cf_tst_cflags}" \
19007                                 && cf_fix_cppflags=yes
19008
19009                         if test "$cf_fix_cppflags" = yes ; then
19010
19011         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19012         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19013
19014                                 continue
19015                         elif test "${cf_tst_cflags}" = "\"'" ; then
19016
19017         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19018         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19019
19020                                 continue
19021                         fi
19022                         ;;
19023                 esac
19024                 case "$CPPFLAGS" in
19025                 (*$cf_add_cflags)
19026                         ;;
19027                 (*)
19028                         case "$cf_add_cflags" in
19029                         (-D*)
19030                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19031
19032 CPPFLAGS=`echo "$CPPFLAGS" | \
19033         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19034                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19035
19036                                 ;;
19037                         esac
19038
19039         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19040         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19041
19042                         ;;
19043                 esac
19044                 ;;
19045         (*)
19046
19047         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19048         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19049
19050                 ;;
19051         esac
19052         ;;
19053 (yes)
19054
19055         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19056         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19057
19058         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19059
19060         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19061                 && test -z "${cf_tst_cflags}" \
19062                 && cf_fix_cppflags=no
19063         ;;
19064 esac
19065 done
19066
19067 if test -n "$cf_new_cflags" ; then
19068
19069         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19070         CFLAGS="${CFLAGS}$cf_new_cflags"
19071
19072 fi
19073
19074 if test -n "$cf_new_cppflags" ; then
19075
19076         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19077         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19078
19079 fi
19080
19081 if test -n "$cf_new_extra_cppflags" ; then
19082
19083         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19084         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19085
19086 fi
19087
19088 cat >>confdefs.h <<\EOF
19089 #define HAVE__TRACEF 1
19090 EOF
19091
19092 else
19093         LIB_TRACING=DEBUG
19094         ADA_TRACE=FALSE
19095 fi
19096
19097 echo "$as_me:19097: checking if we want to use GNAT projects" >&5
19098 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19099
19100 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19101 if test "${enable_gnat_projects+set}" = set; then
19102   enableval="$enable_gnat_projects"
19103   test "$enableval" != no && enableval=yes
19104         if test "$enableval" != "yes" ; then
19105     enable_gnat_projects=no
19106         else
19107                 enable_gnat_projects=yes
19108         fi
19109 else
19110   enableval=yes
19111         enable_gnat_projects=yes
19112
19113 fi;
19114 echo "$as_me:19114: result: $enable_gnat_projects" >&5
19115 echo "${ECHO_T}$enable_gnat_projects" >&6
19116
19117 ###     Checks for libraries.
19118 case "$cf_cv_system_name" in
19119 (*mingw32*|*mingw64*)
19120         # Note: WINVER may be a problem with Windows 10
19121         if test "x$with_exp_win32" = xyes ; then
19122                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19123         else
19124                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19125         fi
19126
19127 echo "$as_me:19127: checking if ssp library is needed" >&5
19128 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19129 if test "${cf_cv_need_libssp+set}" = set; then
19130   echo $ECHO_N "(cached) $ECHO_C" >&6
19131 else
19132
19133 cat >"conftest.$ac_ext" <<_ACEOF
19134 #line 19134 "configure"
19135 #include "confdefs.h"
19136
19137 #include <sys/types.h>
19138 #include <dirent.h>
19139
19140 int
19141 main (void)
19142 {
19143
19144        DIR *dp = opendir(".");
19145
19146   ;
19147   return 0;
19148 }
19149 _ACEOF
19150 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19151 if { (eval echo "$as_me:19151: \"$ac_link\"") >&5
19152   (eval $ac_link) 2>&5
19153   ac_status=$?
19154   echo "$as_me:19154: \$? = $ac_status" >&5
19155   (exit "$ac_status"); } &&
19156          { ac_try='test -s "conftest$ac_exeext"'
19157   { (eval echo "$as_me:19157: \"$ac_try\"") >&5
19158   (eval $ac_try) 2>&5
19159   ac_status=$?
19160   echo "$as_me:19160: \$? = $ac_status" >&5
19161   (exit "$ac_status"); }; }; then
19162   cf_cv_need_libssp=no
19163 else
19164   echo "$as_me: failed program was:" >&5
19165 cat "conftest.$ac_ext" >&5
19166
19167         cf_save_LIBS="$LIBS"
19168         LIBS="$LIBS -lssp"
19169         cat >"conftest.$ac_ext" <<_ACEOF
19170 #line 19170 "configure"
19171 #include "confdefs.h"
19172
19173 #include <sys/types.h>
19174 #include <dirent.h>
19175
19176 int
19177 main (void)
19178 {
19179
19180                    DIR *dp = opendir(".");
19181
19182   ;
19183   return 0;
19184 }
19185 _ACEOF
19186 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19187 if { (eval echo "$as_me:19187: \"$ac_link\"") >&5
19188   (eval $ac_link) 2>&5
19189   ac_status=$?
19190   echo "$as_me:19190: \$? = $ac_status" >&5
19191   (exit "$ac_status"); } &&
19192          { ac_try='test -s "conftest$ac_exeext"'
19193   { (eval echo "$as_me:19193: \"$ac_try\"") >&5
19194   (eval $ac_try) 2>&5
19195   ac_status=$?
19196   echo "$as_me:19196: \$? = $ac_status" >&5
19197   (exit "$ac_status"); }; }; then
19198   cf_cv_need_libssp=yes
19199 else
19200   echo "$as_me: failed program was:" >&5
19201 cat "conftest.$ac_ext" >&5
19202 cf_cv_need_libssp=maybe
19203 fi
19204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19205         LIBS="$cf_save_LIBS"
19206
19207 fi
19208 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19209 fi
19210 echo "$as_me:19210: result: $cf_cv_need_libssp" >&5
19211 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19212
19213 if test "x$cf_cv_need_libssp" = xyes
19214 then
19215
19216 cf_add_libs="$LIBS"
19217 # reverse order
19218 cf_add_0lib=
19219 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19220 # filter duplicates
19221 for cf_add_1lib in $cf_add_0lib; do
19222         for cf_add_2lib in $cf_add_libs; do
19223                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19224                         cf_add_1lib=
19225                         break
19226                 fi
19227         done
19228         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19229 done
19230 LIBS="$cf_add_libs"
19231
19232 fi
19233
19234         ;;
19235 (*)
19236         ;;
19237 esac
19238
19239 echo "$as_me:19239: checking if -lm needed for math functions" >&5
19240 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19241 if test "${cf_cv_need_libm+set}" = set; then
19242   echo $ECHO_N "(cached) $ECHO_C" >&6
19243 else
19244
19245         cat >"conftest.$ac_ext" <<_ACEOF
19246 #line 19246 "configure"
19247 #include "confdefs.h"
19248
19249                 #include <stdio.h>
19250                 #include <stdlib.h>
19251                 #include <math.h>
19252
19253 int
19254 main (void)
19255 {
19256 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19257   ;
19258   return 0;
19259 }
19260 _ACEOF
19261 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19262 if { (eval echo "$as_me:19262: \"$ac_link\"") >&5
19263   (eval $ac_link) 2>&5
19264   ac_status=$?
19265   echo "$as_me:19265: \$? = $ac_status" >&5
19266   (exit "$ac_status"); } &&
19267          { ac_try='test -s "conftest$ac_exeext"'
19268   { (eval echo "$as_me:19268: \"$ac_try\"") >&5
19269   (eval $ac_try) 2>&5
19270   ac_status=$?
19271   echo "$as_me:19271: \$? = $ac_status" >&5
19272   (exit "$ac_status"); }; }; then
19273   cf_cv_need_libm=no
19274 else
19275   echo "$as_me: failed program was:" >&5
19276 cat "conftest.$ac_ext" >&5
19277 cf_cv_need_libm=yes
19278 fi
19279 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19280 fi
19281 echo "$as_me:19281: result: $cf_cv_need_libm" >&5
19282 echo "${ECHO_T}$cf_cv_need_libm" >&6
19283
19284 if test "$cf_cv_need_libm" = yes
19285 then
19286
19287         cf_save_LIBS="$LIBS"
19288         LIBS="$LIBS -lm"
19289         echo "$as_me:19289: checking if -lm is available for math functions" >&5
19290 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19291 if test "${cf_cv_have_libm+set}" = set; then
19292   echo $ECHO_N "(cached) $ECHO_C" >&6
19293 else
19294
19295         cat >"conftest.$ac_ext" <<_ACEOF
19296 #line 19296 "configure"
19297 #include "confdefs.h"
19298
19299                 #include <stdio.h>
19300                 #include <stdlib.h>
19301                 #include <math.h>
19302
19303 int
19304 main (void)
19305 {
19306 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19307   ;
19308   return 0;
19309 }
19310 _ACEOF
19311 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19312 if { (eval echo "$as_me:19312: \"$ac_link\"") >&5
19313   (eval $ac_link) 2>&5
19314   ac_status=$?
19315   echo "$as_me:19315: \$? = $ac_status" >&5
19316   (exit "$ac_status"); } &&
19317          { ac_try='test -s "conftest$ac_exeext"'
19318   { (eval echo "$as_me:19318: \"$ac_try\"") >&5
19319   (eval $ac_try) 2>&5
19320   ac_status=$?
19321   echo "$as_me:19321: \$? = $ac_status" >&5
19322   (exit "$ac_status"); }; }; then
19323   cf_cv_have_libm=yes
19324 else
19325   echo "$as_me: failed program was:" >&5
19326 cat "conftest.$ac_ext" >&5
19327 cf_cv_have_libm=no
19328 fi
19329 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19330 fi
19331 echo "$as_me:19331: result: $cf_cv_have_libm" >&5
19332 echo "${ECHO_T}$cf_cv_have_libm" >&6
19333         LIBS="$cf_save_LIBS"
19334
19335         if test "$cf_cv_have_libm" = yes
19336         then
19337                 MATH_LIB=-lm
19338         fi
19339 else
19340         cf_cv_have_libm=yes
19341 fi
19342
19343 if test "$cf_cv_have_libm" = yes
19344 then
19345
19346 cat >>confdefs.h <<\EOF
19347 #define HAVE_MATH_FUNCS 1
19348 EOF
19349
19350 fi
19351
19352 ###     Checks for header files.
19353 echo "$as_me:19353: checking whether time.h and sys/time.h may both be included" >&5
19354 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19355 if test "${ac_cv_header_time+set}" = set; then
19356   echo $ECHO_N "(cached) $ECHO_C" >&6
19357 else
19358   cat >"conftest.$ac_ext" <<_ACEOF
19359 #line 19359 "configure"
19360 #include "confdefs.h"
19361 #include <sys/types.h>
19362 #include <sys/time.h>
19363 #include <time.h>
19364
19365 int
19366 main (void)
19367 {
19368 if ((struct tm *) 0)
19369 return 0;
19370   ;
19371   return 0;
19372 }
19373 _ACEOF
19374 rm -f "conftest.$ac_objext"
19375 if { (eval echo "$as_me:19375: \"$ac_compile\"") >&5
19376   (eval $ac_compile) 2>&5
19377   ac_status=$?
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit "$ac_status"); } &&
19380          { ac_try='test -s "conftest.$ac_objext"'
19381   { (eval echo "$as_me:19381: \"$ac_try\"") >&5
19382   (eval $ac_try) 2>&5
19383   ac_status=$?
19384   echo "$as_me:19384: \$? = $ac_status" >&5
19385   (exit "$ac_status"); }; }; then
19386   ac_cv_header_time=yes
19387 else
19388   echo "$as_me: failed program was:" >&5
19389 cat "conftest.$ac_ext" >&5
19390 ac_cv_header_time=no
19391 fi
19392 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19393 fi
19394 echo "$as_me:19394: result: $ac_cv_header_time" >&5
19395 echo "${ECHO_T}$ac_cv_header_time" >&6
19396 if test $ac_cv_header_time = yes; then
19397
19398 cat >>confdefs.h <<\EOF
19399 #define TIME_WITH_SYS_TIME 1
19400 EOF
19401
19402 fi
19403
19404 cf_regex_func=no
19405 cf_regex_libs=
19406 case "$host_os" in
19407 (mingw*)
19408         # -lsystre -ltre -lintl -liconv
19409         echo "$as_me:19409: checking for regcomp in -lsystre" >&5
19410 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19411 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19412   echo $ECHO_N "(cached) $ECHO_C" >&6
19413 else
19414   ac_check_lib_save_LIBS=$LIBS
19415 LIBS="-lsystre  $LIBS"
19416 cat >"conftest.$ac_ext" <<_ACEOF
19417 #line 19417 "configure"
19418 #include "confdefs.h"
19419
19420 /* Override any gcc2 internal prototype to avoid an error.  */
19421 #ifdef __cplusplus
19422 extern "C"
19423 #endif
19424 /* We use char because int might match the return type of a gcc2
19425    builtin and then its argument prototype would still apply.  */
19426 char regcomp ();
19427 int
19428 main (void)
19429 {
19430 regcomp ();
19431   ;
19432   return 0;
19433 }
19434 _ACEOF
19435 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19436 if { (eval echo "$as_me:19436: \"$ac_link\"") >&5
19437   (eval $ac_link) 2>&5
19438   ac_status=$?
19439   echo "$as_me:19439: \$? = $ac_status" >&5
19440   (exit "$ac_status"); } &&
19441          { ac_try='test -s "conftest$ac_exeext"'
19442   { (eval echo "$as_me:19442: \"$ac_try\"") >&5
19443   (eval $ac_try) 2>&5
19444   ac_status=$?
19445   echo "$as_me:19445: \$? = $ac_status" >&5
19446   (exit "$ac_status"); }; }; then
19447   ac_cv_lib_systre_regcomp=yes
19448 else
19449   echo "$as_me: failed program was:" >&5
19450 cat "conftest.$ac_ext" >&5
19451 ac_cv_lib_systre_regcomp=no
19452 fi
19453 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19454 LIBS=$ac_check_lib_save_LIBS
19455 fi
19456 echo "$as_me:19456: result: $ac_cv_lib_systre_regcomp" >&5
19457 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19458 if test "$ac_cv_lib_systre_regcomp" = yes; then
19459
19460                 echo "$as_me:19460: checking for libiconv_open in -liconv" >&5
19461 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19462 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19463   echo $ECHO_N "(cached) $ECHO_C" >&6
19464 else
19465   ac_check_lib_save_LIBS=$LIBS
19466 LIBS="-liconv  $LIBS"
19467 cat >"conftest.$ac_ext" <<_ACEOF
19468 #line 19468 "configure"
19469 #include "confdefs.h"
19470
19471 /* Override any gcc2 internal prototype to avoid an error.  */
19472 #ifdef __cplusplus
19473 extern "C"
19474 #endif
19475 /* We use char because int might match the return type of a gcc2
19476    builtin and then its argument prototype would still apply.  */
19477 char libiconv_open ();
19478 int
19479 main (void)
19480 {
19481 libiconv_open ();
19482   ;
19483   return 0;
19484 }
19485 _ACEOF
19486 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19487 if { (eval echo "$as_me:19487: \"$ac_link\"") >&5
19488   (eval $ac_link) 2>&5
19489   ac_status=$?
19490   echo "$as_me:19490: \$? = $ac_status" >&5
19491   (exit "$ac_status"); } &&
19492          { ac_try='test -s "conftest$ac_exeext"'
19493   { (eval echo "$as_me:19493: \"$ac_try\"") >&5
19494   (eval $ac_try) 2>&5
19495   ac_status=$?
19496   echo "$as_me:19496: \$? = $ac_status" >&5
19497   (exit "$ac_status"); }; }; then
19498   ac_cv_lib_iconv_libiconv_open=yes
19499 else
19500   echo "$as_me: failed program was:" >&5
19501 cat "conftest.$ac_ext" >&5
19502 ac_cv_lib_iconv_libiconv_open=no
19503 fi
19504 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19505 LIBS=$ac_check_lib_save_LIBS
19506 fi
19507 echo "$as_me:19507: result: $ac_cv_lib_iconv_libiconv_open" >&5
19508 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19509 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19510
19511 cf_add_libs="$LIBS"
19512 # reverse order
19513 cf_add_0lib=
19514 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19515 # filter duplicates
19516 for cf_add_1lib in $cf_add_0lib; do
19517         for cf_add_2lib in $cf_add_libs; do
19518                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19519                         cf_add_1lib=
19520                         break
19521                 fi
19522         done
19523         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19524 done
19525 LIBS="$cf_add_libs"
19526
19527 fi
19528
19529                 echo "$as_me:19529: checking for libintl_gettext in -lintl" >&5
19530 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19531 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19532   echo $ECHO_N "(cached) $ECHO_C" >&6
19533 else
19534   ac_check_lib_save_LIBS=$LIBS
19535 LIBS="-lintl  $LIBS"
19536 cat >"conftest.$ac_ext" <<_ACEOF
19537 #line 19537 "configure"
19538 #include "confdefs.h"
19539
19540 /* Override any gcc2 internal prototype to avoid an error.  */
19541 #ifdef __cplusplus
19542 extern "C"
19543 #endif
19544 /* We use char because int might match the return type of a gcc2
19545    builtin and then its argument prototype would still apply.  */
19546 char libintl_gettext ();
19547 int
19548 main (void)
19549 {
19550 libintl_gettext ();
19551   ;
19552   return 0;
19553 }
19554 _ACEOF
19555 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19556 if { (eval echo "$as_me:19556: \"$ac_link\"") >&5
19557   (eval $ac_link) 2>&5
19558   ac_status=$?
19559   echo "$as_me:19559: \$? = $ac_status" >&5
19560   (exit "$ac_status"); } &&
19561          { ac_try='test -s "conftest$ac_exeext"'
19562   { (eval echo "$as_me:19562: \"$ac_try\"") >&5
19563   (eval $ac_try) 2>&5
19564   ac_status=$?
19565   echo "$as_me:19565: \$? = $ac_status" >&5
19566   (exit "$ac_status"); }; }; then
19567   ac_cv_lib_intl_libintl_gettext=yes
19568 else
19569   echo "$as_me: failed program was:" >&5
19570 cat "conftest.$ac_ext" >&5
19571 ac_cv_lib_intl_libintl_gettext=no
19572 fi
19573 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19574 LIBS=$ac_check_lib_save_LIBS
19575 fi
19576 echo "$as_me:19576: result: $ac_cv_lib_intl_libintl_gettext" >&5
19577 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19578 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19579
19580 cf_add_libs="$LIBS"
19581 # reverse order
19582 cf_add_0lib=
19583 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19584 # filter duplicates
19585 for cf_add_1lib in $cf_add_0lib; do
19586         for cf_add_2lib in $cf_add_libs; do
19587                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19588                         cf_add_1lib=
19589                         break
19590                 fi
19591         done
19592         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19593 done
19594 LIBS="$cf_add_libs"
19595
19596 fi
19597
19598                 echo "$as_me:19598: checking for tre_regcomp in -ltre" >&5
19599 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19600 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19601   echo $ECHO_N "(cached) $ECHO_C" >&6
19602 else
19603   ac_check_lib_save_LIBS=$LIBS
19604 LIBS="-ltre  $LIBS"
19605 cat >"conftest.$ac_ext" <<_ACEOF
19606 #line 19606 "configure"
19607 #include "confdefs.h"
19608
19609 /* Override any gcc2 internal prototype to avoid an error.  */
19610 #ifdef __cplusplus
19611 extern "C"
19612 #endif
19613 /* We use char because int might match the return type of a gcc2
19614    builtin and then its argument prototype would still apply.  */
19615 char tre_regcomp ();
19616 int
19617 main (void)
19618 {
19619 tre_regcomp ();
19620   ;
19621   return 0;
19622 }
19623 _ACEOF
19624 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19625 if { (eval echo "$as_me:19625: \"$ac_link\"") >&5
19626   (eval $ac_link) 2>&5
19627   ac_status=$?
19628   echo "$as_me:19628: \$? = $ac_status" >&5
19629   (exit "$ac_status"); } &&
19630          { ac_try='test -s "conftest$ac_exeext"'
19631   { (eval echo "$as_me:19631: \"$ac_try\"") >&5
19632   (eval $ac_try) 2>&5
19633   ac_status=$?
19634   echo "$as_me:19634: \$? = $ac_status" >&5
19635   (exit "$ac_status"); }; }; then
19636   ac_cv_lib_tre_tre_regcomp=yes
19637 else
19638   echo "$as_me: failed program was:" >&5
19639 cat "conftest.$ac_ext" >&5
19640 ac_cv_lib_tre_tre_regcomp=no
19641 fi
19642 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19643 LIBS=$ac_check_lib_save_LIBS
19644 fi
19645 echo "$as_me:19645: result: $ac_cv_lib_tre_tre_regcomp" >&5
19646 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19647 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19648
19649 cf_add_libs="$LIBS"
19650 # reverse order
19651 cf_add_0lib=
19652 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19653 # filter duplicates
19654 for cf_add_1lib in $cf_add_0lib; do
19655         for cf_add_2lib in $cf_add_libs; do
19656                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19657                         cf_add_1lib=
19658                         break
19659                 fi
19660         done
19661         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19662 done
19663 LIBS="$cf_add_libs"
19664
19665 fi
19666
19667 cf_add_libs="$LIBS"
19668 # reverse order
19669 cf_add_0lib=
19670 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19671 # filter duplicates
19672 for cf_add_1lib in $cf_add_0lib; do
19673         for cf_add_2lib in $cf_add_libs; do
19674                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19675                         cf_add_1lib=
19676                         break
19677                 fi
19678         done
19679         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19680 done
19681 LIBS="$cf_add_libs"
19682
19683                 cf_regex_func=regcomp
19684
19685 else
19686
19687                 echo "$as_me:19687: checking for regcomp in -lgnurx" >&5
19688 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19689 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19690   echo $ECHO_N "(cached) $ECHO_C" >&6
19691 else
19692   ac_check_lib_save_LIBS=$LIBS
19693 LIBS="-lgnurx  $LIBS"
19694 cat >"conftest.$ac_ext" <<_ACEOF
19695 #line 19695 "configure"
19696 #include "confdefs.h"
19697
19698 /* Override any gcc2 internal prototype to avoid an error.  */
19699 #ifdef __cplusplus
19700 extern "C"
19701 #endif
19702 /* We use char because int might match the return type of a gcc2
19703    builtin and then its argument prototype would still apply.  */
19704 char regcomp ();
19705 int
19706 main (void)
19707 {
19708 regcomp ();
19709   ;
19710   return 0;
19711 }
19712 _ACEOF
19713 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19714 if { (eval echo "$as_me:19714: \"$ac_link\"") >&5
19715   (eval $ac_link) 2>&5
19716   ac_status=$?
19717   echo "$as_me:19717: \$? = $ac_status" >&5
19718   (exit "$ac_status"); } &&
19719          { ac_try='test -s "conftest$ac_exeext"'
19720   { (eval echo "$as_me:19720: \"$ac_try\"") >&5
19721   (eval $ac_try) 2>&5
19722   ac_status=$?
19723   echo "$as_me:19723: \$? = $ac_status" >&5
19724   (exit "$ac_status"); }; }; then
19725   ac_cv_lib_gnurx_regcomp=yes
19726 else
19727   echo "$as_me: failed program was:" >&5
19728 cat "conftest.$ac_ext" >&5
19729 ac_cv_lib_gnurx_regcomp=no
19730 fi
19731 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19732 LIBS=$ac_check_lib_save_LIBS
19733 fi
19734 echo "$as_me:19734: result: $ac_cv_lib_gnurx_regcomp" >&5
19735 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19736 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19737
19738 cf_add_libs="$LIBS"
19739 # reverse order
19740 cf_add_0lib=
19741 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19742 # filter duplicates
19743 for cf_add_1lib in $cf_add_0lib; do
19744         for cf_add_2lib in $cf_add_libs; do
19745                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19746                         cf_add_1lib=
19747                         break
19748                 fi
19749         done
19750         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19751 done
19752 LIBS="$cf_add_libs"
19753
19754                         cf_regex_func=regcomp
19755 fi
19756
19757 fi
19758
19759         ;;
19760 (*)
19761         cf_regex_libs="regex re"
19762         echo "$as_me:19762: checking for regcomp" >&5
19763 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19764 if test "${ac_cv_func_regcomp+set}" = set; then
19765   echo $ECHO_N "(cached) $ECHO_C" >&6
19766 else
19767   cat >"conftest.$ac_ext" <<_ACEOF
19768 #line 19768 "configure"
19769 #include "confdefs.h"
19770 #define regcomp autoconf_temporary
19771 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19772 #undef regcomp
19773
19774 #ifdef __cplusplus
19775 extern "C"
19776 #endif
19777
19778 /* We use char because int might match the return type of a gcc2
19779    builtin and then its argument prototype would still apply.  */
19780 char regcomp (void);
19781
19782 int
19783 main (void)
19784 {
19785
19786 /* The GNU C library defines stubs for functions which it implements
19787     to always fail with ENOSYS.  Some functions are actually named
19788     something starting with __ and the normal name is an alias.  */
19789 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19790 #error found stub for regcomp
19791 #endif
19792
19793         return regcomp ();
19794   ;
19795   return 0;
19796 }
19797 _ACEOF
19798 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19799 if { (eval echo "$as_me:19799: \"$ac_link\"") >&5
19800   (eval $ac_link) 2>&5
19801   ac_status=$?
19802   echo "$as_me:19802: \$? = $ac_status" >&5
19803   (exit "$ac_status"); } &&
19804          { ac_try='test -s "conftest$ac_exeext"'
19805   { (eval echo "$as_me:19805: \"$ac_try\"") >&5
19806   (eval $ac_try) 2>&5
19807   ac_status=$?
19808   echo "$as_me:19808: \$? = $ac_status" >&5
19809   (exit "$ac_status"); }; }; then
19810   ac_cv_func_regcomp=yes
19811 else
19812   echo "$as_me: failed program was:" >&5
19813 cat "conftest.$ac_ext" >&5
19814 ac_cv_func_regcomp=no
19815 fi
19816 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19817 fi
19818 echo "$as_me:19818: result: $ac_cv_func_regcomp" >&5
19819 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19820 if test "$ac_cv_func_regcomp" = yes; then
19821   cf_regex_func=regcomp
19822 else
19823
19824                 for cf_regex_lib in $cf_regex_libs
19825                 do
19826                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19827 echo "$as_me:19827: checking for regcomp in -l$cf_regex_lib" >&5
19828 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19829 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19830   echo $ECHO_N "(cached) $ECHO_C" >&6
19831 else
19832   ac_check_lib_save_LIBS=$LIBS
19833 LIBS="-l$cf_regex_lib  $LIBS"
19834 cat >"conftest.$ac_ext" <<_ACEOF
19835 #line 19835 "configure"
19836 #include "confdefs.h"
19837
19838 /* Override any gcc2 internal prototype to avoid an error.  */
19839 #ifdef __cplusplus
19840 extern "C"
19841 #endif
19842 /* We use char because int might match the return type of a gcc2
19843    builtin and then its argument prototype would still apply.  */
19844 char regcomp ();
19845 int
19846 main (void)
19847 {
19848 regcomp ();
19849   ;
19850   return 0;
19851 }
19852 _ACEOF
19853 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19854 if { (eval echo "$as_me:19854: \"$ac_link\"") >&5
19855   (eval $ac_link) 2>&5
19856   ac_status=$?
19857   echo "$as_me:19857: \$? = $ac_status" >&5
19858   (exit "$ac_status"); } &&
19859          { ac_try='test -s "conftest$ac_exeext"'
19860   { (eval echo "$as_me:19860: \"$ac_try\"") >&5
19861   (eval $ac_try) 2>&5
19862   ac_status=$?
19863   echo "$as_me:19863: \$? = $ac_status" >&5
19864   (exit "$ac_status"); }; }; then
19865   eval "$as_ac_Lib=yes"
19866 else
19867   echo "$as_me: failed program was:" >&5
19868 cat "conftest.$ac_ext" >&5
19869 eval "$as_ac_Lib=no"
19870 fi
19871 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19872 LIBS=$ac_check_lib_save_LIBS
19873 fi
19874 echo "$as_me:19874: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19875 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19876 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19877
19878 cf_add_libs="$LIBS"
19879 # reverse order
19880 cf_add_0lib=
19881 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19882 # filter duplicates
19883 for cf_add_1lib in $cf_add_0lib; do
19884         for cf_add_2lib in $cf_add_libs; do
19885                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19886                         cf_add_1lib=
19887                         break
19888                 fi
19889         done
19890         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19891 done
19892 LIBS="$cf_add_libs"
19893
19894                                         cf_regex_func=regcomp
19895                                         break
19896 fi
19897
19898                 done
19899
19900 fi
19901
19902         ;;
19903 esac
19904
19905 if test "$cf_regex_func" = no ; then
19906         echo "$as_me:19906: checking for compile" >&5
19907 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19908 if test "${ac_cv_func_compile+set}" = set; then
19909   echo $ECHO_N "(cached) $ECHO_C" >&6
19910 else
19911   cat >"conftest.$ac_ext" <<_ACEOF
19912 #line 19912 "configure"
19913 #include "confdefs.h"
19914 #define compile autoconf_temporary
19915 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19916 #undef compile
19917
19918 #ifdef __cplusplus
19919 extern "C"
19920 #endif
19921
19922 /* We use char because int might match the return type of a gcc2
19923    builtin and then its argument prototype would still apply.  */
19924 char compile (void);
19925
19926 int
19927 main (void)
19928 {
19929
19930 /* The GNU C library defines stubs for functions which it implements
19931     to always fail with ENOSYS.  Some functions are actually named
19932     something starting with __ and the normal name is an alias.  */
19933 #if defined (__stub_compile) || defined (__stub___compile)
19934 #error found stub for compile
19935 #endif
19936
19937         return compile ();
19938   ;
19939   return 0;
19940 }
19941 _ACEOF
19942 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19943 if { (eval echo "$as_me:19943: \"$ac_link\"") >&5
19944   (eval $ac_link) 2>&5
19945   ac_status=$?
19946   echo "$as_me:19946: \$? = $ac_status" >&5
19947   (exit "$ac_status"); } &&
19948          { ac_try='test -s "conftest$ac_exeext"'
19949   { (eval echo "$as_me:19949: \"$ac_try\"") >&5
19950   (eval $ac_try) 2>&5
19951   ac_status=$?
19952   echo "$as_me:19952: \$? = $ac_status" >&5
19953   (exit "$ac_status"); }; }; then
19954   ac_cv_func_compile=yes
19955 else
19956   echo "$as_me: failed program was:" >&5
19957 cat "conftest.$ac_ext" >&5
19958 ac_cv_func_compile=no
19959 fi
19960 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19961 fi
19962 echo "$as_me:19962: result: $ac_cv_func_compile" >&5
19963 echo "${ECHO_T}$ac_cv_func_compile" >&6
19964 if test "$ac_cv_func_compile" = yes; then
19965   cf_regex_func=compile
19966 else
19967
19968                 echo "$as_me:19968: checking for compile in -lgen" >&5
19969 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19970 if test "${ac_cv_lib_gen_compile+set}" = set; then
19971   echo $ECHO_N "(cached) $ECHO_C" >&6
19972 else
19973   ac_check_lib_save_LIBS=$LIBS
19974 LIBS="-lgen  $LIBS"
19975 cat >"conftest.$ac_ext" <<_ACEOF
19976 #line 19976 "configure"
19977 #include "confdefs.h"
19978
19979 /* Override any gcc2 internal prototype to avoid an error.  */
19980 #ifdef __cplusplus
19981 extern "C"
19982 #endif
19983 /* We use char because int might match the return type of a gcc2
19984    builtin and then its argument prototype would still apply.  */
19985 char compile ();
19986 int
19987 main (void)
19988 {
19989 compile ();
19990   ;
19991   return 0;
19992 }
19993 _ACEOF
19994 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19995 if { (eval echo "$as_me:19995: \"$ac_link\"") >&5
19996   (eval $ac_link) 2>&5
19997   ac_status=$?
19998   echo "$as_me:19998: \$? = $ac_status" >&5
19999   (exit "$ac_status"); } &&
20000          { ac_try='test -s "conftest$ac_exeext"'
20001   { (eval echo "$as_me:20001: \"$ac_try\"") >&5
20002   (eval $ac_try) 2>&5
20003   ac_status=$?
20004   echo "$as_me:20004: \$? = $ac_status" >&5
20005   (exit "$ac_status"); }; }; then
20006   ac_cv_lib_gen_compile=yes
20007 else
20008   echo "$as_me: failed program was:" >&5
20009 cat "conftest.$ac_ext" >&5
20010 ac_cv_lib_gen_compile=no
20011 fi
20012 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20013 LIBS=$ac_check_lib_save_LIBS
20014 fi
20015 echo "$as_me:20015: result: $ac_cv_lib_gen_compile" >&5
20016 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20017 if test "$ac_cv_lib_gen_compile" = yes; then
20018
20019 cf_add_libs="$LIBS"
20020 # reverse order
20021 cf_add_0lib=
20022 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20023 # filter duplicates
20024 for cf_add_1lib in $cf_add_0lib; do
20025         for cf_add_2lib in $cf_add_libs; do
20026                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20027                         cf_add_1lib=
20028                         break
20029                 fi
20030         done
20031         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20032 done
20033 LIBS="$cf_add_libs"
20034
20035                                 cf_regex_func=compile
20036 fi
20037
20038 fi
20039
20040 fi
20041
20042 if test "$cf_regex_func" = no ; then
20043         { echo "$as_me:20043: WARNING: cannot find regular expression library" >&5
20044 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20045 fi
20046
20047 echo "$as_me:20047: checking for regular-expression headers" >&5
20048 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20049 if test "${cf_cv_regex_hdrs+set}" = set; then
20050   echo $ECHO_N "(cached) $ECHO_C" >&6
20051 else
20052
20053 cf_cv_regex_hdrs=no
20054 case "$cf_regex_func" in
20055 (compile)
20056         for cf_regex_hdr in regexp.h regexpr.h
20057         do
20058                 cat >"conftest.$ac_ext" <<_ACEOF
20059 #line 20059 "configure"
20060 #include "confdefs.h"
20061 #include <$cf_regex_hdr>
20062 int
20063 main (void)
20064 {
20065
20066                         char *p = compile("", "", "", 0);
20067                         int x = step("", "");
20068                         (void)p;
20069                         (void)x;
20070
20071   ;
20072   return 0;
20073 }
20074 _ACEOF
20075 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20076 if { (eval echo "$as_me:20076: \"$ac_link\"") >&5
20077   (eval $ac_link) 2>&5
20078   ac_status=$?
20079   echo "$as_me:20079: \$? = $ac_status" >&5
20080   (exit "$ac_status"); } &&
20081          { ac_try='test -s "conftest$ac_exeext"'
20082   { (eval echo "$as_me:20082: \"$ac_try\"") >&5
20083   (eval $ac_try) 2>&5
20084   ac_status=$?
20085   echo "$as_me:20085: \$? = $ac_status" >&5
20086   (exit "$ac_status"); }; }; then
20087
20088                         cf_cv_regex_hdrs=$cf_regex_hdr
20089                         break
20090
20091 else
20092   echo "$as_me: failed program was:" >&5
20093 cat "conftest.$ac_ext" >&5
20094 fi
20095 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20096         done
20097         ;;
20098 (*)
20099         for cf_regex_hdr in regex.h
20100         do
20101                 cat >"conftest.$ac_ext" <<_ACEOF
20102 #line 20102 "configure"
20103 #include "confdefs.h"
20104 #include <sys/types.h>
20105 #include <$cf_regex_hdr>
20106 int
20107 main (void)
20108 {
20109
20110                         regex_t *p = 0;
20111                         int x = regcomp(p, "", 0);
20112                         int y = regexec(p, "", 0, 0, 0);
20113                         (void)x;
20114                         (void)y;
20115                         regfree(p);
20116
20117   ;
20118   return 0;
20119 }
20120 _ACEOF
20121 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20122 if { (eval echo "$as_me:20122: \"$ac_link\"") >&5
20123   (eval $ac_link) 2>&5
20124   ac_status=$?
20125   echo "$as_me:20125: \$? = $ac_status" >&5
20126   (exit "$ac_status"); } &&
20127          { ac_try='test -s "conftest$ac_exeext"'
20128   { (eval echo "$as_me:20128: \"$ac_try\"") >&5
20129   (eval $ac_try) 2>&5
20130   ac_status=$?
20131   echo "$as_me:20131: \$? = $ac_status" >&5
20132   (exit "$ac_status"); }; }; then
20133
20134                         cf_cv_regex_hdrs=$cf_regex_hdr
20135                         break
20136
20137 else
20138   echo "$as_me: failed program was:" >&5
20139 cat "conftest.$ac_ext" >&5
20140 fi
20141 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20142         done
20143         ;;
20144 esac
20145
20146 fi
20147 echo "$as_me:20147: result: $cf_cv_regex_hdrs" >&5
20148 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20149
20150 case "$cf_cv_regex_hdrs" in
20151         (no)            { echo "$as_me:20151: WARNING: no regular expression header found" >&5
20152 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20153         (regex.h)
20154 cat >>confdefs.h <<\EOF
20155 #define HAVE_REGEX_H_FUNCS 1
20156 EOF
20157  ;;
20158         (regexp.h)
20159 cat >>confdefs.h <<\EOF
20160 #define HAVE_REGEXP_H_FUNCS 1
20161 EOF
20162  ;;
20163         (regexpr.h)
20164 cat >>confdefs.h <<\EOF
20165 #define HAVE_REGEXPR_H_FUNCS 1
20166 EOF
20167  ;;
20168 esac
20169
20170 for ac_header in \
20171 fcntl.h \
20172 getopt.h \
20173 limits.h \
20174 locale.h \
20175 math.h \
20176 poll.h \
20177 sys/auxv.h \
20178 sys/ioctl.h \
20179 sys/param.h \
20180 sys/poll.h \
20181 sys/select.h \
20182 sys/time.h \
20183 sys/times.h \
20184 unistd.h \
20185 wctype.h \
20186
20187 do
20188 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20189 echo "$as_me:20189: checking for $ac_header" >&5
20190 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20191 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20192   echo $ECHO_N "(cached) $ECHO_C" >&6
20193 else
20194   cat >"conftest.$ac_ext" <<_ACEOF
20195 #line 20195 "configure"
20196 #include "confdefs.h"
20197 #include <$ac_header>
20198 _ACEOF
20199 if { (eval echo "$as_me:20199: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20200   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20201   ac_status=$?
20202   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20203   rm -f conftest.er1
20204   cat conftest.err >&5
20205   echo "$as_me:20205: \$? = $ac_status" >&5
20206   (exit "$ac_status"); } >/dev/null; then
20207   if test -s conftest.err; then
20208     ac_cpp_err=$ac_c_preproc_warn_flag
20209   else
20210     ac_cpp_err=
20211   fi
20212 else
20213   ac_cpp_err=yes
20214 fi
20215 if test -z "$ac_cpp_err"; then
20216   eval "$as_ac_Header=yes"
20217 else
20218   echo "$as_me: failed program was:" >&5
20219   cat "conftest.$ac_ext" >&5
20220   eval "$as_ac_Header=no"
20221 fi
20222 rm -f conftest.err "conftest.$ac_ext"
20223 fi
20224 echo "$as_me:20224: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20225 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20226 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20227   cat >>confdefs.h <<EOF
20228 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20229 EOF
20230
20231 fi
20232 done
20233
20234 for ac_header in unistd.h getopt.h
20235 do
20236 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20237 echo "$as_me:20237: checking for $ac_header" >&5
20238 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20239 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20240   echo $ECHO_N "(cached) $ECHO_C" >&6
20241 else
20242   cat >"conftest.$ac_ext" <<_ACEOF
20243 #line 20243 "configure"
20244 #include "confdefs.h"
20245 #include <$ac_header>
20246 _ACEOF
20247 if { (eval echo "$as_me:20247: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20248   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20249   ac_status=$?
20250   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20251   rm -f conftest.er1
20252   cat conftest.err >&5
20253   echo "$as_me:20253: \$? = $ac_status" >&5
20254   (exit "$ac_status"); } >/dev/null; then
20255   if test -s conftest.err; then
20256     ac_cpp_err=$ac_c_preproc_warn_flag
20257   else
20258     ac_cpp_err=
20259   fi
20260 else
20261   ac_cpp_err=yes
20262 fi
20263 if test -z "$ac_cpp_err"; then
20264   eval "$as_ac_Header=yes"
20265 else
20266   echo "$as_me: failed program was:" >&5
20267   cat "conftest.$ac_ext" >&5
20268   eval "$as_ac_Header=no"
20269 fi
20270 rm -f conftest.err "conftest.$ac_ext"
20271 fi
20272 echo "$as_me:20272: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20273 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20274 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20275   cat >>confdefs.h <<EOF
20276 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20277 EOF
20278
20279 fi
20280 done
20281
20282 echo "$as_me:20282: checking for header declaring getopt variables" >&5
20283 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20284 if test "${cf_cv_getopt_header+set}" = set; then
20285   echo $ECHO_N "(cached) $ECHO_C" >&6
20286 else
20287
20288 cf_cv_getopt_header=none
20289 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20290 do
20291 cat >"conftest.$ac_ext" <<_ACEOF
20292 #line 20292 "configure"
20293 #include "confdefs.h"
20294
20295 #include <$cf_header>
20296 int
20297 main (void)
20298 {
20299 int x = optind; char *y = optarg; (void)x; (void)y
20300   ;
20301   return 0;
20302 }
20303 _ACEOF
20304 rm -f "conftest.$ac_objext"
20305 if { (eval echo "$as_me:20305: \"$ac_compile\"") >&5
20306   (eval $ac_compile) 2>&5
20307   ac_status=$?
20308   echo "$as_me:20308: \$? = $ac_status" >&5
20309   (exit "$ac_status"); } &&
20310          { ac_try='test -s "conftest.$ac_objext"'
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   cf_cv_getopt_header=$cf_header
20317  break
20318 else
20319   echo "$as_me: failed program was:" >&5
20320 cat "conftest.$ac_ext" >&5
20321 fi
20322 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20323 done
20324
20325 fi
20326 echo "$as_me:20326: result: $cf_cv_getopt_header" >&5
20327 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20328 if test "$cf_cv_getopt_header" != none ; then
20329
20330 cat >>confdefs.h <<\EOF
20331 #define HAVE_GETOPT_HEADER 1
20332 EOF
20333
20334 fi
20335 if test "$cf_cv_getopt_header" = getopt.h ; then
20336
20337 cat >>confdefs.h <<\EOF
20338 #define NEED_GETOPT_H 1
20339 EOF
20340
20341 fi
20342
20343 echo "$as_me:20343: checking if external environ is declared" >&5
20344 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20345 if test "${cf_cv_dcl_environ+set}" = set; then
20346   echo $ECHO_N "(cached) $ECHO_C" >&6
20347 else
20348
20349     cat >"conftest.$ac_ext" <<_ACEOF
20350 #line 20350 "configure"
20351 #include "confdefs.h"
20352
20353 $ac_includes_default
20354 int
20355 main (void)
20356 {
20357 void* x = (void*) environ; (void)x
20358   ;
20359   return 0;
20360 }
20361 _ACEOF
20362 rm -f "conftest.$ac_objext"
20363 if { (eval echo "$as_me:20363: \"$ac_compile\"") >&5
20364   (eval $ac_compile) 2>&5
20365   ac_status=$?
20366   echo "$as_me:20366: \$? = $ac_status" >&5
20367   (exit "$ac_status"); } &&
20368          { ac_try='test -s "conftest.$ac_objext"'
20369   { (eval echo "$as_me:20369: \"$ac_try\"") >&5
20370   (eval $ac_try) 2>&5
20371   ac_status=$?
20372   echo "$as_me:20372: \$? = $ac_status" >&5
20373   (exit "$ac_status"); }; }; then
20374   cf_cv_dcl_environ=yes
20375 else
20376   echo "$as_me: failed program was:" >&5
20377 cat "conftest.$ac_ext" >&5
20378 cf_cv_dcl_environ=no
20379 fi
20380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20381
20382 fi
20383 echo "$as_me:20383: result: $cf_cv_dcl_environ" >&5
20384 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20385
20386 if test "$cf_cv_dcl_environ" = no ; then
20387
20388 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20389
20390     cat >>confdefs.h <<EOF
20391 #define $cf_result 1
20392 EOF
20393
20394 fi
20395
20396 # It's possible (for near-UNIX clones) that the data doesn't exist
20397
20398 echo "$as_me:20398: checking if external environ exists" >&5
20399 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20400 if test "${cf_cv_have_environ+set}" = set; then
20401   echo $ECHO_N "(cached) $ECHO_C" >&6
20402 else
20403
20404         cat >"conftest.$ac_ext" <<_ACEOF
20405 #line 20405 "configure"
20406 #include "confdefs.h"
20407
20408 #undef environ
20409 extern int environ;
20410
20411 int
20412 main (void)
20413 {
20414 environ = 2
20415   ;
20416   return 0;
20417 }
20418 _ACEOF
20419 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20420 if { (eval echo "$as_me:20420: \"$ac_link\"") >&5
20421   (eval $ac_link) 2>&5
20422   ac_status=$?
20423   echo "$as_me:20423: \$? = $ac_status" >&5
20424   (exit "$ac_status"); } &&
20425          { ac_try='test -s "conftest$ac_exeext"'
20426   { (eval echo "$as_me:20426: \"$ac_try\"") >&5
20427   (eval $ac_try) 2>&5
20428   ac_status=$?
20429   echo "$as_me:20429: \$? = $ac_status" >&5
20430   (exit "$ac_status"); }; }; then
20431   cf_cv_have_environ=yes
20432 else
20433   echo "$as_me: failed program was:" >&5
20434 cat "conftest.$ac_ext" >&5
20435 cf_cv_have_environ=no
20436 fi
20437 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20438
20439 fi
20440 echo "$as_me:20440: result: $cf_cv_have_environ" >&5
20441 echo "${ECHO_T}$cf_cv_have_environ" >&6
20442
20443 if test "$cf_cv_have_environ" = yes ; then
20444
20445 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20446
20447         cat >>confdefs.h <<EOF
20448 #define $cf_result 1
20449 EOF
20450
20451 fi
20452
20453 echo "$as_me:20453: checking for getenv" >&5
20454 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20455 if test "${ac_cv_func_getenv+set}" = set; then
20456   echo $ECHO_N "(cached) $ECHO_C" >&6
20457 else
20458   cat >"conftest.$ac_ext" <<_ACEOF
20459 #line 20459 "configure"
20460 #include "confdefs.h"
20461 #define getenv autoconf_temporary
20462 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20463 #undef getenv
20464
20465 #ifdef __cplusplus
20466 extern "C"
20467 #endif
20468
20469 /* We use char because int might match the return type of a gcc2
20470    builtin and then its argument prototype would still apply.  */
20471 char getenv (void);
20472
20473 int
20474 main (void)
20475 {
20476
20477 /* The GNU C library defines stubs for functions which it implements
20478     to always fail with ENOSYS.  Some functions are actually named
20479     something starting with __ and the normal name is an alias.  */
20480 #if defined (__stub_getenv) || defined (__stub___getenv)
20481 #error found stub for getenv
20482 #endif
20483
20484         return getenv ();
20485   ;
20486   return 0;
20487 }
20488 _ACEOF
20489 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20490 if { (eval echo "$as_me:20490: \"$ac_link\"") >&5
20491   (eval $ac_link) 2>&5
20492   ac_status=$?
20493   echo "$as_me:20493: \$? = $ac_status" >&5
20494   (exit "$ac_status"); } &&
20495          { ac_try='test -s "conftest$ac_exeext"'
20496   { (eval echo "$as_me:20496: \"$ac_try\"") >&5
20497   (eval $ac_try) 2>&5
20498   ac_status=$?
20499   echo "$as_me:20499: \$? = $ac_status" >&5
20500   (exit "$ac_status"); }; }; then
20501   ac_cv_func_getenv=yes
20502 else
20503   echo "$as_me: failed program was:" >&5
20504 cat "conftest.$ac_ext" >&5
20505 ac_cv_func_getenv=no
20506 fi
20507 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20508 fi
20509 echo "$as_me:20509: result: $ac_cv_func_getenv" >&5
20510 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20511
20512 for ac_func in putenv setenv strdup
20513 do
20514 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20515 echo "$as_me:20515: checking for $ac_func" >&5
20516 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20517 if eval "test \"\${$as_ac_var+set}\" = set"; then
20518   echo $ECHO_N "(cached) $ECHO_C" >&6
20519 else
20520   cat >"conftest.$ac_ext" <<_ACEOF
20521 #line 20521 "configure"
20522 #include "confdefs.h"
20523 #define $ac_func autoconf_temporary
20524 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20525 #undef $ac_func
20526
20527 #ifdef __cplusplus
20528 extern "C"
20529 #endif
20530
20531 /* We use char because int might match the return type of a gcc2
20532    builtin and then its argument prototype would still apply.  */
20533 char $ac_func (void);
20534
20535 int
20536 main (void)
20537 {
20538
20539 /* The GNU C library defines stubs for functions which it implements
20540     to always fail with ENOSYS.  Some functions are actually named
20541     something starting with __ and the normal name is an alias.  */
20542 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20543 #error found stub for $ac_func
20544 #endif
20545
20546         return $ac_func ();
20547   ;
20548   return 0;
20549 }
20550 _ACEOF
20551 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20552 if { (eval echo "$as_me:20552: \"$ac_link\"") >&5
20553   (eval $ac_link) 2>&5
20554   ac_status=$?
20555   echo "$as_me:20555: \$? = $ac_status" >&5
20556   (exit "$ac_status"); } &&
20557          { ac_try='test -s "conftest$ac_exeext"'
20558   { (eval echo "$as_me:20558: \"$ac_try\"") >&5
20559   (eval $ac_try) 2>&5
20560   ac_status=$?
20561   echo "$as_me:20561: \$? = $ac_status" >&5
20562   (exit "$ac_status"); }; }; then
20563   eval "$as_ac_var=yes"
20564 else
20565   echo "$as_me: failed program was:" >&5
20566 cat "conftest.$ac_ext" >&5
20567 eval "$as_ac_var=no"
20568 fi
20569 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20570 fi
20571 echo "$as_me:20571: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20572 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20573 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20574   cat >>confdefs.h <<EOF
20575 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20576 EOF
20577
20578 fi
20579 done
20580
20581 echo "$as_me:20581: checking if getenv returns consistent values" >&5
20582 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20583 if test "${cf_cv_consistent_getenv+set}" = set; then
20584   echo $ECHO_N "(cached) $ECHO_C" >&6
20585 else
20586
20587 if test "$cross_compiling" = yes; then
20588   cf_cv_consistent_getenv=unknown
20589 else
20590   cat >"conftest.$ac_ext" <<_ACEOF
20591 #line 20591 "configure"
20592 #include "confdefs.h"
20593
20594 $ac_includes_default
20595
20596 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20597 extern char **environ;  /* POSIX, but some systems are not... */
20598 #endif
20599
20600 #if defined(HAVE_STRDUP)
20601 #define str_alloc(s) strdup(s)
20602 #else
20603 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20604 #endif
20605
20606 static void set_value(const char *name, const char *value)
20607 {
20608 #if defined(HAVE_SETENV)
20609         setenv(name, value, 1);
20610 #elif defined(HAVE_PUTENV)
20611         char buffer[1024];
20612         sprintf(buffer, "%s=%s", name, value);
20613         putenv(str_alloc(buffer));
20614 #else
20615 #error neither putenv/setenv found
20616 #endif
20617 }
20618 int main(void)
20619 {
20620         int pass;
20621         size_t numenv, limit, j;
20622         char **mynames;
20623         char **myvalues;
20624         char **mypointer;
20625         char *equals;
20626         for (numenv = 0; environ[numenv]; ++numenv) ;
20627         limit = numenv + 10;
20628         mynames = (char **) calloc(limit + 1, sizeof(char *));
20629         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20630         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20631 #if defined(HAVE_ENVIRON)
20632         for (j = 0; environ[j]; ++j) {
20633                 mynames[j] = str_alloc(environ[j]);
20634                 equals = strchr(mynames[j], '=');
20635                 if (equals != 0) {
20636                         *equals++ = '\\0';
20637                         myvalues[j] = str_alloc(equals);
20638                 } else {
20639                         myvalues[j] = str_alloc("");
20640                 }
20641         }
20642 #endif
20643         for (j = numenv; j < limit; ++j) {
20644                 char name[80];
20645                 char value[80];
20646                 size_t found;
20647                 size_t k = 0;
20648                 do {
20649                         size_t jk;
20650                         found = 0;
20651                         sprintf(name, "TERM%lu", (unsigned long) k);
20652                         for (jk = 0; jk < j; ++jk) {
20653                                 if (!strcmp(name, mynames[jk])) {
20654                                         found = 1;
20655                                         ++k;
20656                                         break;
20657                                 }
20658                         }
20659                 } while (found);
20660                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20661                 set_value(name, value);
20662                 mynames[j] = str_alloc(name);
20663                 myvalues[j] = str_alloc(value);
20664         }
20665         for (pass = 0; pass < 3; ++pass) {
20666                 for (j = 0; j < limit; ++j) {
20667                         char *value = getenv(mynames[j]);
20668                         if (pass) {
20669                                 if (value == 0) {
20670                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20671                                         ${cf_cv_main_return:-return}(1);
20672                                 } else if (value != mypointer[j]) {
20673                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20674                                         ${cf_cv_main_return:-return}(1);
20675                                 } else if (strcmp(value, myvalues[j])) {
20676                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20677                                         ${cf_cv_main_return:-return}(1);
20678                                 }
20679                         } else {
20680                                 size_t k;
20681                                 mypointer[j] = value;
20682                                 for (k = 0; k < j; ++k) {
20683                                         if (mypointer[j] == mypointer[k]) {
20684                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20685                                                 ${cf_cv_main_return:-return}(1);
20686                                         }
20687                                 }
20688                         }
20689                 }
20690         }
20691         ${cf_cv_main_return:-return}(0);
20692 }
20693
20694 _ACEOF
20695 rm -f "conftest$ac_exeext"
20696 if { (eval echo "$as_me:20696: \"$ac_link\"") >&5
20697   (eval $ac_link) 2>&5
20698   ac_status=$?
20699   echo "$as_me:20699: \$? = $ac_status" >&5
20700   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20701   { (eval echo "$as_me:20701: \"$ac_try\"") >&5
20702   (eval $ac_try) 2>&5
20703   ac_status=$?
20704   echo "$as_me:20704: \$? = $ac_status" >&5
20705   (exit "$ac_status"); }; }; then
20706   cf_cv_consistent_getenv=yes
20707 else
20708   echo "$as_me: program exited with status $ac_status" >&5
20709 echo "$as_me: failed program was:" >&5
20710 cat "conftest.$ac_ext" >&5
20711 cf_cv_consistent_getenv=no
20712 fi
20713 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20714 fi
20715
20716 fi
20717 echo "$as_me:20717: result: $cf_cv_consistent_getenv" >&5
20718 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20719
20720 if test "x$cf_cv_consistent_getenv" = xno
20721 then
20722
20723 cat >>confdefs.h <<\EOF
20724 #define HAVE_CONSISTENT_GETENV 1
20725 EOF
20726
20727 fi
20728
20729 if test "x$cf_cv_consistent_getenv" = xno && \
20730         test "x$cf_with_trace" = xyes
20731 then
20732         { echo "$as_me:20732: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20733 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20734 fi
20735
20736 echo "$as_me:20736: checking if sys/time.h works with sys/select.h" >&5
20737 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20738 if test "${cf_cv_sys_time_select+set}" = set; then
20739   echo $ECHO_N "(cached) $ECHO_C" >&6
20740 else
20741
20742 cat >"conftest.$ac_ext" <<_ACEOF
20743 #line 20743 "configure"
20744 #include "confdefs.h"
20745
20746 #include <sys/types.h>
20747 #ifdef HAVE_SYS_TIME_H
20748 #include <sys/time.h>
20749 #endif
20750 #ifdef HAVE_SYS_SELECT_H
20751 #include <sys/select.h>
20752 #endif
20753
20754 int
20755 main (void)
20756 {
20757
20758   ;
20759   return 0;
20760 }
20761 _ACEOF
20762 rm -f "conftest.$ac_objext"
20763 if { (eval echo "$as_me:20763: \"$ac_compile\"") >&5
20764   (eval $ac_compile) 2>&5
20765   ac_status=$?
20766   echo "$as_me:20766: \$? = $ac_status" >&5
20767   (exit "$ac_status"); } &&
20768          { ac_try='test -s "conftest.$ac_objext"'
20769   { (eval echo "$as_me:20769: \"$ac_try\"") >&5
20770   (eval $ac_try) 2>&5
20771   ac_status=$?
20772   echo "$as_me:20772: \$? = $ac_status" >&5
20773   (exit "$ac_status"); }; }; then
20774   cf_cv_sys_time_select=yes
20775 else
20776   echo "$as_me: failed program was:" >&5
20777 cat "conftest.$ac_ext" >&5
20778 cf_cv_sys_time_select=no
20779 fi
20780 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20781
20782 fi
20783
20784 echo "$as_me:20784: result: $cf_cv_sys_time_select" >&5
20785 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20786 test "$cf_cv_sys_time_select" = yes &&
20787 cat >>confdefs.h <<\EOF
20788 #define HAVE_SYS_TIME_SELECT 1
20789 EOF
20790
20791 ###     checks for compiler characteristics
20792 ac_ext=c
20793 ac_cpp='$CPP $CPPFLAGS'
20794 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20795 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20796 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20797 ac_main_return="return"
20798
20799 echo "$as_me:20799: checking for an ANSI C-conforming const" >&5
20800 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20801 if test "${ac_cv_c_const+set}" = set; then
20802   echo $ECHO_N "(cached) $ECHO_C" >&6
20803 else
20804   cat >"conftest.$ac_ext" <<_ACEOF
20805 #line 20805 "configure"
20806 #include "confdefs.h"
20807
20808 int
20809 main (void)
20810 {
20811 /* FIXME: Include the comments suggested by Paul. */
20812 #ifndef __cplusplus
20813   /* Ultrix mips cc rejects this.  */
20814   typedef int charset[2];
20815   const charset x;
20816   /* SunOS 4.1.1 cc rejects this.  */
20817   char const *const *ccp;
20818   char **p;
20819   /* NEC SVR4.0.2 mips cc rejects this.  */
20820   struct point {int x, y;};
20821   static struct point const zero = {0,0};
20822   /* AIX XL C 1.02.0.0 rejects this.
20823      It does not let you subtract one const X* pointer from another in
20824      an arm of an if-expression whose if-part is not a constant
20825      expression */
20826   const char *g = "string";
20827   ccp = &g + (g ? g-g : 0);
20828   /* HPUX 7.0 cc rejects these. */
20829   ++ccp;
20830   p = (char**) ccp;
20831   ccp = (char const *const *) p;
20832   { /* SCO 3.2v4 cc rejects this.  */
20833     char *t;
20834     char const *s = 0 ? (char *) 0 : (char const *) 0;
20835
20836     *t++ = 0;
20837   }
20838   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20839     int x[] = {25, 17};
20840     const int *foo = &x[0];
20841     ++foo;
20842   }
20843   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20844     typedef const int *iptr;
20845     iptr p = 0;
20846     ++p;
20847   }
20848   { /* AIX XL C 1.02.0.0 rejects this saying
20849        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20850     struct s { int j; const int *ap[3]; };
20851     struct s *b; b->j = 5;
20852   }
20853   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20854     const int foo = 10;
20855   }
20856 #endif
20857
20858   ;
20859   return 0;
20860 }
20861 _ACEOF
20862 rm -f "conftest.$ac_objext"
20863 if { (eval echo "$as_me:20863: \"$ac_compile\"") >&5
20864   (eval $ac_compile) 2>&5
20865   ac_status=$?
20866   echo "$as_me:20866: \$? = $ac_status" >&5
20867   (exit "$ac_status"); } &&
20868          { ac_try='test -s "conftest.$ac_objext"'
20869   { (eval echo "$as_me:20869: \"$ac_try\"") >&5
20870   (eval $ac_try) 2>&5
20871   ac_status=$?
20872   echo "$as_me:20872: \$? = $ac_status" >&5
20873   (exit "$ac_status"); }; }; then
20874   ac_cv_c_const=yes
20875 else
20876   echo "$as_me: failed program was:" >&5
20877 cat "conftest.$ac_ext" >&5
20878 ac_cv_c_const=no
20879 fi
20880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20881 fi
20882 echo "$as_me:20882: result: $ac_cv_c_const" >&5
20883 echo "${ECHO_T}$ac_cv_c_const" >&6
20884 if test $ac_cv_c_const = no; then
20885
20886 cat >>confdefs.h <<\EOF
20887 #define const
20888 EOF
20889
20890 fi
20891
20892 echo "$as_me:20892: checking for inline" >&5
20893 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20894 if test "${ac_cv_c_inline+set}" = set; then
20895   echo $ECHO_N "(cached) $ECHO_C" >&6
20896 else
20897   ac_cv_c_inline=no
20898 for ac_kw in inline __inline__ __inline; do
20899   cat >"conftest.$ac_ext" <<_ACEOF
20900 #line 20900 "configure"
20901 #include "confdefs.h"
20902 #ifndef __cplusplus
20903 static $ac_kw int static_foo () {return 0; }
20904 $ac_kw int foo () {return 0; }
20905 #endif
20906
20907 _ACEOF
20908 rm -f "conftest.$ac_objext"
20909 if { (eval echo "$as_me:20909: \"$ac_compile\"") >&5
20910   (eval $ac_compile) 2>&5
20911   ac_status=$?
20912   echo "$as_me:20912: \$? = $ac_status" >&5
20913   (exit "$ac_status"); } &&
20914          { ac_try='test -s "conftest.$ac_objext"'
20915   { (eval echo "$as_me:20915: \"$ac_try\"") >&5
20916   (eval $ac_try) 2>&5
20917   ac_status=$?
20918   echo "$as_me:20918: \$? = $ac_status" >&5
20919   (exit "$ac_status"); }; }; then
20920   ac_cv_c_inline=$ac_kw; break
20921 else
20922   echo "$as_me: failed program was:" >&5
20923 cat "conftest.$ac_ext" >&5
20924 fi
20925 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20926 done
20927
20928 fi
20929 echo "$as_me:20929: result: $ac_cv_c_inline" >&5
20930 echo "${ECHO_T}$ac_cv_c_inline" >&6
20931 case $ac_cv_c_inline in
20932   inline | yes) ;;
20933   no)
20934 cat >>confdefs.h <<\EOF
20935 #define inline
20936 EOF
20937  ;;
20938   *)  cat >>confdefs.h <<EOF
20939 #define inline $ac_cv_c_inline
20940 EOF
20941  ;;
20942 esac
20943
20944 NCURSES_INLINE=
20945 if test "$ac_cv_c_inline" != no ; then
20946         NCURSES_INLINE=inline
20947         if test "$INTEL_COMPILER" = yes
20948         then
20949                 :
20950         elif test "$CLANG_COMPILER" = yes
20951         then
20952                 :
20953         elif test "$GCC" = yes
20954         then
20955                 echo "$as_me:20955: checking if $CC supports options to tune inlining" >&5
20956 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20957 if test "${cf_cv_gcc_inline+set}" = set; then
20958   echo $ECHO_N "(cached) $ECHO_C" >&6
20959 else
20960
20961                 cf_save_CFLAGS=$CFLAGS
20962                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20963                 cat >"conftest.$ac_ext" <<_ACEOF
20964 #line 20964 "configure"
20965 #include "confdefs.h"
20966 inline int foo(void) { return 1; }
20967 int
20968 main (void)
20969 {
20970 ${cf_cv_main_return:-return} foo()
20971   ;
20972   return 0;
20973 }
20974 _ACEOF
20975 rm -f "conftest.$ac_objext"
20976 if { (eval echo "$as_me:20976: \"$ac_compile\"") >&5
20977   (eval $ac_compile) 2>&5
20978   ac_status=$?
20979   echo "$as_me:20979: \$? = $ac_status" >&5
20980   (exit "$ac_status"); } &&
20981          { ac_try='test -s "conftest.$ac_objext"'
20982   { (eval echo "$as_me:20982: \"$ac_try\"") >&5
20983   (eval $ac_try) 2>&5
20984   ac_status=$?
20985   echo "$as_me:20985: \$? = $ac_status" >&5
20986   (exit "$ac_status"); }; }; then
20987   cf_cv_gcc_inline=yes
20988 else
20989   echo "$as_me: failed program was:" >&5
20990 cat "conftest.$ac_ext" >&5
20991 cf_cv_gcc_inline=no
20992 fi
20993 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20994                 CFLAGS=$cf_save_CFLAGS
20995
20996 fi
20997 echo "$as_me:20997: result: $cf_cv_gcc_inline" >&5
20998 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20999                 if test "$cf_cv_gcc_inline" = yes ; then
21000
21001 cf_fix_cppflags=no
21002 cf_new_cflags=
21003 cf_new_cppflags=
21004 cf_new_extra_cppflags=
21005
21006 for cf_add_cflags in --param max-inline-insns-single=1200
21007 do
21008 case "$cf_fix_cppflags" in
21009 (no)
21010         case "$cf_add_cflags" in
21011         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21012                 case "$cf_add_cflags" in
21013                 (-D*)
21014                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21015
21016                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21017                                 && test -z "${cf_tst_cflags}" \
21018                                 && cf_fix_cppflags=yes
21019
21020                         if test "$cf_fix_cppflags" = yes ; then
21021
21022         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21023         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21024
21025                                 continue
21026                         elif test "${cf_tst_cflags}" = "\"'" ; then
21027
21028         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21029         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21030
21031                                 continue
21032                         fi
21033                         ;;
21034                 esac
21035                 case "$CPPFLAGS" in
21036                 (*$cf_add_cflags)
21037                         ;;
21038                 (*)
21039                         case "$cf_add_cflags" in
21040                         (-D*)
21041                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21042
21043 CPPFLAGS=`echo "$CPPFLAGS" | \
21044         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21045                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21046
21047                                 ;;
21048                         esac
21049
21050         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21051         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21052
21053                         ;;
21054                 esac
21055                 ;;
21056         (*)
21057
21058         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21059         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21060
21061                 ;;
21062         esac
21063         ;;
21064 (yes)
21065
21066         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21067         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21068
21069         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21070
21071         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21072                 && test -z "${cf_tst_cflags}" \
21073                 && cf_fix_cppflags=no
21074         ;;
21075 esac
21076 done
21077
21078 if test -n "$cf_new_cflags" ; then
21079
21080         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21081         CFLAGS="${CFLAGS}$cf_new_cflags"
21082
21083 fi
21084
21085 if test -n "$cf_new_cppflags" ; then
21086
21087         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21088         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21089
21090 fi
21091
21092 if test -n "$cf_new_extra_cppflags" ; then
21093
21094         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21095         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21096
21097 fi
21098
21099                 fi
21100         fi
21101 fi
21102
21103 echo "$as_me:21103: checking for signal global datatype" >&5
21104 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21105 if test "${cf_cv_sig_atomic_t+set}" = set; then
21106   echo $ECHO_N "(cached) $ECHO_C" >&6
21107 else
21108
21109         for cf_type in \
21110                 "volatile sig_atomic_t" \
21111                 "sig_atomic_t" \
21112                 "int"
21113         do
21114         cat >"conftest.$ac_ext" <<_ACEOF
21115 #line 21115 "configure"
21116 #include "confdefs.h"
21117
21118 #include <sys/types.h>
21119 #include <signal.h>
21120 #include <stdio.h>
21121
21122 extern $cf_type x;
21123 $cf_type x;
21124 static void handler(int sig)
21125 {
21126         (void)sig;
21127         x = 5;
21128 }
21129 int
21130 main (void)
21131 {
21132 signal(SIGINT, handler);
21133                  x = 1
21134   ;
21135   return 0;
21136 }
21137 _ACEOF
21138 rm -f "conftest.$ac_objext"
21139 if { (eval echo "$as_me:21139: \"$ac_compile\"") >&5
21140   (eval $ac_compile) 2>&5
21141   ac_status=$?
21142   echo "$as_me:21142: \$? = $ac_status" >&5
21143   (exit "$ac_status"); } &&
21144          { ac_try='test -s "conftest.$ac_objext"'
21145   { (eval echo "$as_me:21145: \"$ac_try\"") >&5
21146   (eval $ac_try) 2>&5
21147   ac_status=$?
21148   echo "$as_me:21148: \$? = $ac_status" >&5
21149   (exit "$ac_status"); }; }; then
21150   cf_cv_sig_atomic_t=$cf_type
21151 else
21152   echo "$as_me: failed program was:" >&5
21153 cat "conftest.$ac_ext" >&5
21154 cf_cv_sig_atomic_t=no
21155 fi
21156 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21157                 test "$cf_cv_sig_atomic_t" != no && break
21158         done
21159
21160 fi
21161
21162 echo "$as_me:21162: result: $cf_cv_sig_atomic_t" >&5
21163 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21164 test "$cf_cv_sig_atomic_t" != no &&
21165 cat >>confdefs.h <<EOF
21166 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21167 EOF
21168
21169 if test "$NCURSES_CHTYPE" = auto ; then
21170
21171 echo "$as_me:21171: checking for type of chtype" >&5
21172 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21173 if test "${cf_cv_typeof_chtype+set}" = set; then
21174   echo $ECHO_N "(cached) $ECHO_C" >&6
21175 else
21176
21177                 if test "$cross_compiling" = yes; then
21178   cf_cv_typeof_chtype=long
21179 else
21180   cat >"conftest.$ac_ext" <<_ACEOF
21181 #line 21181 "configure"
21182 #include "confdefs.h"
21183
21184 $ac_includes_default
21185 #define WANT_BITS 31
21186 int main(void)
21187 {
21188         FILE *fp = fopen("cf_test.out", "w");
21189         if (fp != 0) {
21190                 char *result = "long";
21191                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21192                         int n;
21193                         unsigned int x, y;
21194                         for (n = 0; n < WANT_BITS; n++) {
21195                                 x = (1 << n);
21196                                 y = (x >> n);
21197                                 if (y != 1 || x == 0) {
21198                                         x = 0;
21199                                         break;
21200                                 }
21201                         }
21202                         /*
21203                          * If x is nonzero, an int is big enough for the bits
21204                          * that we want.
21205                          */
21206                         result = (x != 0) ? "int" : "long";
21207                 }
21208                 fputs(result, fp);
21209                 fclose(fp);
21210         }
21211         ${cf_cv_main_return:-return}(0);
21212 }
21213
21214 _ACEOF
21215 rm -f "conftest$ac_exeext"
21216 if { (eval echo "$as_me:21216: \"$ac_link\"") >&5
21217   (eval $ac_link) 2>&5
21218   ac_status=$?
21219   echo "$as_me:21219: \$? = $ac_status" >&5
21220   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21221   { (eval echo "$as_me:21221: \"$ac_try\"") >&5
21222   (eval $ac_try) 2>&5
21223   ac_status=$?
21224   echo "$as_me:21224: \$? = $ac_status" >&5
21225   (exit "$ac_status"); }; }; then
21226   cf_cv_typeof_chtype=`cat cf_test.out`
21227 else
21228   echo "$as_me: program exited with status $ac_status" >&5
21229 echo "$as_me: failed program was:" >&5
21230 cat "conftest.$ac_ext" >&5
21231 cf_cv_typeof_chtype=long
21232 fi
21233 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21234 fi
21235                 rm -f cf_test.out
21236
21237 fi
21238
21239 echo "$as_me:21239: result: $cf_cv_typeof_chtype" >&5
21240 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21241
21242 cat >>confdefs.h <<EOF
21243 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21244 EOF
21245
21246 else
21247         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21248 fi
21249 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21250
21251 echo "$as_me:21251: checking if unsigned literals are legal" >&5
21252 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21253 if test "${cf_cv_unsigned_literals+set}" = set; then
21254   echo $ECHO_N "(cached) $ECHO_C" >&6
21255 else
21256
21257         cat >"conftest.$ac_ext" <<_ACEOF
21258 #line 21258 "configure"
21259 #include "confdefs.h"
21260
21261 int
21262 main (void)
21263 {
21264 long x = 1L + 1UL + 1U + 1
21265   ;
21266   return 0;
21267 }
21268 _ACEOF
21269 rm -f "conftest.$ac_objext"
21270 if { (eval echo "$as_me:21270: \"$ac_compile\"") >&5
21271   (eval $ac_compile) 2>&5
21272   ac_status=$?
21273   echo "$as_me:21273: \$? = $ac_status" >&5
21274   (exit "$ac_status"); } &&
21275          { ac_try='test -s "conftest.$ac_objext"'
21276   { (eval echo "$as_me:21276: \"$ac_try\"") >&5
21277   (eval $ac_try) 2>&5
21278   ac_status=$?
21279   echo "$as_me:21279: \$? = $ac_status" >&5
21280   (exit "$ac_status"); }; }; then
21281   cf_cv_unsigned_literals=yes
21282 else
21283   echo "$as_me: failed program was:" >&5
21284 cat "conftest.$ac_ext" >&5
21285 cf_cv_unsigned_literals=no
21286 fi
21287 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21288
21289 fi
21290
21291 echo "$as_me:21291: result: $cf_cv_unsigned_literals" >&5
21292 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21293
21294 cf_cv_1UL="1"
21295 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21296 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21297
21298 if test "$NCURSES_MMASK_T" = auto ; then
21299         cf_cv_typeof_mmask_t=long
21300 else
21301         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21302 fi
21303 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21304
21305 ###     Checks for external-data
21306
21307 echo "$as_me:21307: checking if external errno is declared" >&5
21308 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21309 if test "${cf_cv_dcl_errno+set}" = set; then
21310   echo $ECHO_N "(cached) $ECHO_C" >&6
21311 else
21312
21313         cat >"conftest.$ac_ext" <<_ACEOF
21314 #line 21314 "configure"
21315 #include "confdefs.h"
21316
21317 $ac_includes_default
21318 #include <errno.h>
21319 int
21320 main (void)
21321 {
21322 int x = (int) errno; (void)x
21323   ;
21324   return 0;
21325 }
21326 _ACEOF
21327 rm -f "conftest.$ac_objext"
21328 if { (eval echo "$as_me:21328: \"$ac_compile\"") >&5
21329   (eval $ac_compile) 2>&5
21330   ac_status=$?
21331   echo "$as_me:21331: \$? = $ac_status" >&5
21332   (exit "$ac_status"); } &&
21333          { ac_try='test -s "conftest.$ac_objext"'
21334   { (eval echo "$as_me:21334: \"$ac_try\"") >&5
21335   (eval $ac_try) 2>&5
21336   ac_status=$?
21337   echo "$as_me:21337: \$? = $ac_status" >&5
21338   (exit "$ac_status"); }; }; then
21339   cf_cv_dcl_errno=yes
21340 else
21341   echo "$as_me: failed program was:" >&5
21342 cat "conftest.$ac_ext" >&5
21343 cf_cv_dcl_errno=no
21344 fi
21345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21346
21347 fi
21348 echo "$as_me:21348: result: $cf_cv_dcl_errno" >&5
21349 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21350
21351 if test "$cf_cv_dcl_errno" = no ; then
21352
21353 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21354
21355         cat >>confdefs.h <<EOF
21356 #define $cf_result 1
21357 EOF
21358
21359 fi
21360
21361 # It's possible (for near-UNIX clones) that the data doesn't exist
21362
21363 echo "$as_me:21363: checking if external errno exists" >&5
21364 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21365 if test "${cf_cv_have_errno+set}" = set; then
21366   echo $ECHO_N "(cached) $ECHO_C" >&6
21367 else
21368
21369         cat >"conftest.$ac_ext" <<_ACEOF
21370 #line 21370 "configure"
21371 #include "confdefs.h"
21372
21373 #undef errno
21374 extern int errno;
21375
21376 int
21377 main (void)
21378 {
21379 errno = 2
21380   ;
21381   return 0;
21382 }
21383 _ACEOF
21384 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21385 if { (eval echo "$as_me:21385: \"$ac_link\"") >&5
21386   (eval $ac_link) 2>&5
21387   ac_status=$?
21388   echo "$as_me:21388: \$? = $ac_status" >&5
21389   (exit "$ac_status"); } &&
21390          { ac_try='test -s "conftest$ac_exeext"'
21391   { (eval echo "$as_me:21391: \"$ac_try\"") >&5
21392   (eval $ac_try) 2>&5
21393   ac_status=$?
21394   echo "$as_me:21394: \$? = $ac_status" >&5
21395   (exit "$ac_status"); }; }; then
21396   cf_cv_have_errno=yes
21397 else
21398   echo "$as_me: failed program was:" >&5
21399 cat "conftest.$ac_ext" >&5
21400 cf_cv_have_errno=no
21401 fi
21402 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21403
21404 fi
21405 echo "$as_me:21405: result: $cf_cv_have_errno" >&5
21406 echo "${ECHO_T}$cf_cv_have_errno" >&6
21407
21408 if test "$cf_cv_have_errno" = yes ; then
21409
21410 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21411
21412         cat >>confdefs.h <<EOF
21413 #define $cf_result 1
21414 EOF
21415
21416 fi
21417
21418 echo "$as_me:21418: checking if data-only library module links" >&5
21419 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21420 if test "${cf_cv_link_dataonly+set}" = set; then
21421   echo $ECHO_N "(cached) $ECHO_C" >&6
21422 else
21423
21424         rm -f conftest.a
21425         cat >conftest.$ac_ext <<EOF
21426 #line 21426 "configure"
21427 int     testdata[3] = { 123, 456, 789 };
21428 EOF
21429         if { (eval echo "$as_me:21429: \"$ac_compile\"") >&5
21430   (eval $ac_compile) 2>&5
21431   ac_status=$?
21432   echo "$as_me:21432: \$? = $ac_status" >&5
21433   (exit "$ac_status"); } ; then
21434                 mv conftest.o data.o && \
21435                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21436         fi
21437         rm -f conftest.$ac_ext data.o
21438         cat >conftest.$ac_ext <<EOF
21439 #line 21439 "configure"
21440 int     testfunc(void)
21441 {
21442 #if defined(NeXT)
21443         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21444 #else
21445         extern int testdata[3];
21446         return testdata[0] == 123
21447            &&  testdata[1] == 456
21448            &&  testdata[2] == 789;
21449 #endif
21450 }
21451 EOF
21452         if { (eval echo "$as_me:21452: \"$ac_compile\"") >&5
21453   (eval $ac_compile) 2>&5
21454   ac_status=$?
21455   echo "$as_me:21455: \$? = $ac_status" >&5
21456   (exit "$ac_status"); }; then
21457                 mv conftest.o func.o && \
21458                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21459         fi
21460         rm -f conftest.$ac_ext func.o
21461         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21462         cf_saveLIBS="$LIBS"
21463         LIBS="conftest.a $LIBS"
21464         if test "$cross_compiling" = yes; then
21465   cf_cv_link_dataonly=unknown
21466 else
21467   cat >"conftest.$ac_ext" <<_ACEOF
21468 #line 21468 "configure"
21469 #include "confdefs.h"
21470
21471         int main(void)
21472         {
21473                 extern int testfunc();
21474                 ${cf_cv_main_return:-return} (!testfunc());
21475         }
21476
21477 _ACEOF
21478 rm -f "conftest$ac_exeext"
21479 if { (eval echo "$as_me:21479: \"$ac_link\"") >&5
21480   (eval $ac_link) 2>&5
21481   ac_status=$?
21482   echo "$as_me:21482: \$? = $ac_status" >&5
21483   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21484   { (eval echo "$as_me:21484: \"$ac_try\"") >&5
21485   (eval $ac_try) 2>&5
21486   ac_status=$?
21487   echo "$as_me:21487: \$? = $ac_status" >&5
21488   (exit "$ac_status"); }; }; then
21489   cf_cv_link_dataonly=yes
21490 else
21491   echo "$as_me: program exited with status $ac_status" >&5
21492 echo "$as_me: failed program was:" >&5
21493 cat "conftest.$ac_ext" >&5
21494 cf_cv_link_dataonly=no
21495 fi
21496 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21497 fi
21498         LIBS="$cf_saveLIBS"
21499
21500 fi
21501
21502 echo "$as_me:21502: result: $cf_cv_link_dataonly" >&5
21503 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21504
21505 if test "$cf_cv_link_dataonly" = no ; then
21506
21507 cat >>confdefs.h <<\EOF
21508 #define BROKEN_LINKER 1
21509 EOF
21510
21511         BROKEN_LINKER=1
21512 fi
21513
21514 ###     Checks for library functions.
21515
21516 echo "$as_me:21516: checking for clock_gettime" >&5
21517 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21518 if test "${cf_cv_func_clock_gettime+set}" = set; then
21519   echo $ECHO_N "(cached) $ECHO_C" >&6
21520 else
21521
21522                 cat >"conftest.$ac_ext" <<_ACEOF
21523 #line 21523 "configure"
21524 #include "confdefs.h"
21525 #include <time.h>
21526 int
21527 main (void)
21528 {
21529 struct timespec ts;
21530                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21531   ;
21532   return 0;
21533 }
21534 _ACEOF
21535 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21536 if { (eval echo "$as_me:21536: \"$ac_link\"") >&5
21537   (eval $ac_link) 2>&5
21538   ac_status=$?
21539   echo "$as_me:21539: \$? = $ac_status" >&5
21540   (exit "$ac_status"); } &&
21541          { ac_try='test -s "conftest$ac_exeext"'
21542   { (eval echo "$as_me:21542: \"$ac_try\"") >&5
21543   (eval $ac_try) 2>&5
21544   ac_status=$?
21545   echo "$as_me:21545: \$? = $ac_status" >&5
21546   (exit "$ac_status"); }; }; then
21547   cf_cv_func_clock_gettime=yes
21548 else
21549   echo "$as_me: failed program was:" >&5
21550 cat "conftest.$ac_ext" >&5
21551 cf_cv_func_clock_gettime=no
21552 fi
21553 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21554
21555 fi
21556 echo "$as_me:21556: result: $cf_cv_func_clock_gettime" >&5
21557 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21558
21559 if test "$cf_cv_func_clock_gettime" = yes
21560 then
21561
21562 cat >>confdefs.h <<\EOF
21563 #define HAVE_CLOCK_GETTIME 1
21564 EOF
21565
21566 else
21567 echo "$as_me:21567: checking for gettimeofday" >&5
21568 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21569 if test "${ac_cv_func_gettimeofday+set}" = set; then
21570   echo $ECHO_N "(cached) $ECHO_C" >&6
21571 else
21572   cat >"conftest.$ac_ext" <<_ACEOF
21573 #line 21573 "configure"
21574 #include "confdefs.h"
21575 #define gettimeofday autoconf_temporary
21576 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21577 #undef gettimeofday
21578
21579 #ifdef __cplusplus
21580 extern "C"
21581 #endif
21582
21583 /* We use char because int might match the return type of a gcc2
21584    builtin and then its argument prototype would still apply.  */
21585 char gettimeofday (void);
21586
21587 int
21588 main (void)
21589 {
21590
21591 /* The GNU C library defines stubs for functions which it implements
21592     to always fail with ENOSYS.  Some functions are actually named
21593     something starting with __ and the normal name is an alias.  */
21594 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21595 #error found stub for gettimeofday
21596 #endif
21597
21598         return gettimeofday ();
21599   ;
21600   return 0;
21601 }
21602 _ACEOF
21603 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21604 if { (eval echo "$as_me:21604: \"$ac_link\"") >&5
21605   (eval $ac_link) 2>&5
21606   ac_status=$?
21607   echo "$as_me:21607: \$? = $ac_status" >&5
21608   (exit "$ac_status"); } &&
21609          { ac_try='test -s "conftest$ac_exeext"'
21610   { (eval echo "$as_me:21610: \"$ac_try\"") >&5
21611   (eval $ac_try) 2>&5
21612   ac_status=$?
21613   echo "$as_me:21613: \$? = $ac_status" >&5
21614   (exit "$ac_status"); }; }; then
21615   ac_cv_func_gettimeofday=yes
21616 else
21617   echo "$as_me: failed program was:" >&5
21618 cat "conftest.$ac_ext" >&5
21619 ac_cv_func_gettimeofday=no
21620 fi
21621 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21622 fi
21623 echo "$as_me:21623: result: $ac_cv_func_gettimeofday" >&5
21624 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21625 if test "$ac_cv_func_gettimeofday" = yes; then
21626
21627 cat >>confdefs.h <<\EOF
21628 #define HAVE_GETTIMEOFDAY 1
21629 EOF
21630
21631 else
21632
21633 echo "$as_me:21633: checking for gettimeofday in -lbsd" >&5
21634 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21635 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21636   echo $ECHO_N "(cached) $ECHO_C" >&6
21637 else
21638   ac_check_lib_save_LIBS=$LIBS
21639 LIBS="-lbsd  $LIBS"
21640 cat >"conftest.$ac_ext" <<_ACEOF
21641 #line 21641 "configure"
21642 #include "confdefs.h"
21643
21644 /* Override any gcc2 internal prototype to avoid an error.  */
21645 #ifdef __cplusplus
21646 extern "C"
21647 #endif
21648 /* We use char because int might match the return type of a gcc2
21649    builtin and then its argument prototype would still apply.  */
21650 char gettimeofday ();
21651 int
21652 main (void)
21653 {
21654 gettimeofday ();
21655   ;
21656   return 0;
21657 }
21658 _ACEOF
21659 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21660 if { (eval echo "$as_me:21660: \"$ac_link\"") >&5
21661   (eval $ac_link) 2>&5
21662   ac_status=$?
21663   echo "$as_me:21663: \$? = $ac_status" >&5
21664   (exit "$ac_status"); } &&
21665          { ac_try='test -s "conftest$ac_exeext"'
21666   { (eval echo "$as_me:21666: \"$ac_try\"") >&5
21667   (eval $ac_try) 2>&5
21668   ac_status=$?
21669   echo "$as_me:21669: \$? = $ac_status" >&5
21670   (exit "$ac_status"); }; }; then
21671   ac_cv_lib_bsd_gettimeofday=yes
21672 else
21673   echo "$as_me: failed program was:" >&5
21674 cat "conftest.$ac_ext" >&5
21675 ac_cv_lib_bsd_gettimeofday=no
21676 fi
21677 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21678 LIBS=$ac_check_lib_save_LIBS
21679 fi
21680 echo "$as_me:21680: result: $ac_cv_lib_bsd_gettimeofday" >&5
21681 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21682 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21683
21684 cat >>confdefs.h <<\EOF
21685 #define HAVE_GETTIMEOFDAY 1
21686 EOF
21687
21688 cf_add_libs="$LIBS"
21689 # reverse order
21690 cf_add_0lib=
21691 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21692 # filter duplicates
21693 for cf_add_1lib in $cf_add_0lib; do
21694         for cf_add_2lib in $cf_add_libs; do
21695                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21696                         cf_add_1lib=
21697                         break
21698                 fi
21699         done
21700         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21701 done
21702 LIBS="$cf_add_libs"
21703
21704 fi
21705
21706 fi
21707 fi
21708
21709 for ac_func in \
21710 fpathconf \
21711 getcwd \
21712 getauxval \
21713 getegid \
21714 geteuid \
21715 getopt \
21716 getuid \
21717 issetugid \
21718 localeconv \
21719 poll \
21720 putenv \
21721 remove \
21722 select \
21723 setbuf \
21724 setbuffer \
21725 setenv \
21726 setfsuid \
21727 setvbuf \
21728 sigaction \
21729 sigvec \
21730 snprintf \
21731 strdup \
21732 strstr \
21733 sysconf \
21734 tcgetpgrp \
21735 times \
21736 tsearch \
21737 vsnprintf \
21738
21739 do
21740 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21741 echo "$as_me:21741: checking for $ac_func" >&5
21742 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21743 if eval "test \"\${$as_ac_var+set}\" = set"; then
21744   echo $ECHO_N "(cached) $ECHO_C" >&6
21745 else
21746   cat >"conftest.$ac_ext" <<_ACEOF
21747 #line 21747 "configure"
21748 #include "confdefs.h"
21749 #define $ac_func autoconf_temporary
21750 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21751 #undef $ac_func
21752
21753 #ifdef __cplusplus
21754 extern "C"
21755 #endif
21756
21757 /* We use char because int might match the return type of a gcc2
21758    builtin and then its argument prototype would still apply.  */
21759 char $ac_func (void);
21760
21761 int
21762 main (void)
21763 {
21764
21765 /* The GNU C library defines stubs for functions which it implements
21766     to always fail with ENOSYS.  Some functions are actually named
21767     something starting with __ and the normal name is an alias.  */
21768 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21769 #error found stub for $ac_func
21770 #endif
21771
21772         return $ac_func ();
21773   ;
21774   return 0;
21775 }
21776 _ACEOF
21777 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21778 if { (eval echo "$as_me:21778: \"$ac_link\"") >&5
21779   (eval $ac_link) 2>&5
21780   ac_status=$?
21781   echo "$as_me:21781: \$? = $ac_status" >&5
21782   (exit "$ac_status"); } &&
21783          { ac_try='test -s "conftest$ac_exeext"'
21784   { (eval echo "$as_me:21784: \"$ac_try\"") >&5
21785   (eval $ac_try) 2>&5
21786   ac_status=$?
21787   echo "$as_me:21787: \$? = $ac_status" >&5
21788   (exit "$ac_status"); }; }; then
21789   eval "$as_ac_var=yes"
21790 else
21791   echo "$as_me: failed program was:" >&5
21792 cat "conftest.$ac_ext" >&5
21793 eval "$as_ac_var=no"
21794 fi
21795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21796 fi
21797 echo "$as_me:21797: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21798 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21799 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21800   cat >>confdefs.h <<EOF
21801 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21802 EOF
21803
21804 fi
21805 done
21806
21807 echo "$as_me:21807: checking if _PATH_TTYS is defined in ttyent.h" >&5
21808 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21809 if test "${cf_cv_PATH_TTYS+set}" = set; then
21810   echo $ECHO_N "(cached) $ECHO_C" >&6
21811 else
21812
21813 cat >"conftest.$ac_ext" <<_ACEOF
21814 #line 21814 "configure"
21815 #include "confdefs.h"
21816
21817 #include <stdio.h>
21818 #include <ttyent.h>
21819 int
21820 main (void)
21821 {
21822
21823 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21824   ;
21825   return 0;
21826 }
21827 _ACEOF
21828 rm -f "conftest.$ac_objext"
21829 if { (eval echo "$as_me:21829: \"$ac_compile\"") >&5
21830   (eval $ac_compile) 2>&5
21831   ac_status=$?
21832   echo "$as_me:21832: \$? = $ac_status" >&5
21833   (exit "$ac_status"); } &&
21834          { ac_try='test -s "conftest.$ac_objext"'
21835   { (eval echo "$as_me:21835: \"$ac_try\"") >&5
21836   (eval $ac_try) 2>&5
21837   ac_status=$?
21838   echo "$as_me:21838: \$? = $ac_status" >&5
21839   (exit "$ac_status"); }; }; then
21840   cf_cv_PATH_TTYS=yes
21841 else
21842   echo "$as_me: failed program was:" >&5
21843 cat "conftest.$ac_ext" >&5
21844 cf_cv_PATH_TTYS=no
21845 fi
21846 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21847 fi
21848 echo "$as_me:21848: result: $cf_cv_PATH_TTYS" >&5
21849 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21850
21851 if test $cf_cv_PATH_TTYS = no
21852 then
21853         for cf_ttys in /etc/ttytype /etc/ttys
21854         do
21855                 if test -f $cf_ttys
21856                 then
21857                         cf_cv_PATH_TTYS=maybe
21858
21859 cat >>confdefs.h <<\EOF
21860 #define _PATH_TTYS $cf_ttys
21861 EOF
21862
21863                         break
21864                 fi
21865         done
21866 fi
21867
21868 if test $cf_cv_PATH_TTYS != no
21869 then
21870         echo "$as_me:21870: checking if _PATH_TTYS file exists" >&5
21871 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21872 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21873   echo $ECHO_N "(cached) $ECHO_C" >&6
21874 else
21875
21876                 if test "$cross_compiling" = yes; then
21877   cf_cv_have_PATH_TTYS=unknown
21878 else
21879   cat >"conftest.$ac_ext" <<_ACEOF
21880 #line 21880 "configure"
21881 #include "confdefs.h"
21882
21883 $ac_includes_default
21884
21885 #include <ttyent.h>
21886
21887 int main(void) {
21888         FILE *fp = fopen(_PATH_TTYS, "r");
21889         ${cf_cv_main_return:-return} (fp == 0);
21890 }
21891 _ACEOF
21892 rm -f "conftest$ac_exeext"
21893 if { (eval echo "$as_me:21893: \"$ac_link\"") >&5
21894   (eval $ac_link) 2>&5
21895   ac_status=$?
21896   echo "$as_me:21896: \$? = $ac_status" >&5
21897   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21898   { (eval echo "$as_me:21898: \"$ac_try\"") >&5
21899   (eval $ac_try) 2>&5
21900   ac_status=$?
21901   echo "$as_me:21901: \$? = $ac_status" >&5
21902   (exit "$ac_status"); }; }; then
21903   cf_cv_have_PATH_TTYS=yes
21904 else
21905   echo "$as_me: program exited with status $ac_status" >&5
21906 echo "$as_me: failed program was:" >&5
21907 cat "conftest.$ac_ext" >&5
21908 cf_cv_have_PATH_TTYS=no
21909 fi
21910 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21911 fi
21912 fi
21913 echo "$as_me:21913: result: $cf_cv_have_PATH_TTYS" >&5
21914 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21915         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21916 fi
21917
21918 if test $cf_cv_PATH_TTYS != no
21919 then
21920
21921 cat >>confdefs.h <<\EOF
21922 #define HAVE_PATH_TTYS 1
21923 EOF
21924
21925         echo "$as_me:21925: checking for getttynam" >&5
21926 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21927 if test "${cf_cv_func_getttynam+set}" = set; then
21928   echo $ECHO_N "(cached) $ECHO_C" >&6
21929 else
21930
21931                 cat >"conftest.$ac_ext" <<_ACEOF
21932 #line 21932 "configure"
21933 #include "confdefs.h"
21934 #include <ttyent.h>
21935 int
21936 main (void)
21937 {
21938 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21939   ;
21940   return 0;
21941 }
21942 _ACEOF
21943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21944 if { (eval echo "$as_me:21944: \"$ac_link\"") >&5
21945   (eval $ac_link) 2>&5
21946   ac_status=$?
21947   echo "$as_me:21947: \$? = $ac_status" >&5
21948   (exit "$ac_status"); } &&
21949          { ac_try='test -s "conftest$ac_exeext"'
21950   { (eval echo "$as_me:21950: \"$ac_try\"") >&5
21951   (eval $ac_try) 2>&5
21952   ac_status=$?
21953   echo "$as_me:21953: \$? = $ac_status" >&5
21954   (exit "$ac_status"); }; }; then
21955   cf_cv_func_getttynam=yes
21956 else
21957   echo "$as_me: failed program was:" >&5
21958 cat "conftest.$ac_ext" >&5
21959 cf_cv_func_getttynam=no
21960 fi
21961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21962 fi
21963 echo "$as_me:21963: result: $cf_cv_func_getttynam" >&5
21964 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21965         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21966 #define HAVE_GETTTYNAM 1
21967 EOF
21968
21969 fi
21970
21971 if test "x$ac_cv_func_getopt" = xno && \
21972    test "x$cf_with_progs$cf_with_tests" != xnono; then
21973         { { echo "$as_me:21973: error: getopt is required for building programs" >&5
21974 echo "$as_me: error: getopt is required for building programs" >&2;}
21975    { (exit 1); exit 1; }; }
21976 fi
21977
21978 if test "x$with_safe_sprintf" = xyes
21979 then
21980         if test "x$ac_cv_func_vsnprintf" = xyes
21981         then
21982                 { echo "$as_me:21982: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21983 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21984         else
21985
21986 cat >>confdefs.h <<\EOF
21987 #define USE_SAFE_SPRINTF 1
21988 EOF
21989
21990         fi
21991 fi
21992
21993 if test "x$with_getcap" = "xyes" ; then
21994
21995 echo "$as_me:21995: checking for terminal-capability database functions" >&5
21996 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21997 if test "${cf_cv_cgetent+set}" = set; then
21998   echo $ECHO_N "(cached) $ECHO_C" >&6
21999 else
22000
22001 cat >"conftest.$ac_ext" <<_ACEOF
22002 #line 22002 "configure"
22003 #include "confdefs.h"
22004
22005 $ac_includes_default
22006 int
22007 main (void)
22008 {
22009
22010         char temp[128];
22011         char *buf = temp;
22012         char *db_array = temp;
22013         cgetent(&buf, &db_array, "vt100");
22014         cgetcap(buf, "tc", '=');
22015         cgetmatch(buf, "tc");
22016
22017   ;
22018   return 0;
22019 }
22020 _ACEOF
22021 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22022 if { (eval echo "$as_me:22022: \"$ac_link\"") >&5
22023   (eval $ac_link) 2>&5
22024   ac_status=$?
22025   echo "$as_me:22025: \$? = $ac_status" >&5
22026   (exit "$ac_status"); } &&
22027          { ac_try='test -s "conftest$ac_exeext"'
22028   { (eval echo "$as_me:22028: \"$ac_try\"") >&5
22029   (eval $ac_try) 2>&5
22030   ac_status=$?
22031   echo "$as_me:22031: \$? = $ac_status" >&5
22032   (exit "$ac_status"); }; }; then
22033   cf_cv_cgetent=yes
22034 else
22035   echo "$as_me: failed program was:" >&5
22036 cat "conftest.$ac_ext" >&5
22037 cf_cv_cgetent=no
22038 fi
22039 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22040
22041 fi
22042 echo "$as_me:22042: result: $cf_cv_cgetent" >&5
22043 echo "${ECHO_T}$cf_cv_cgetent" >&6
22044
22045 if test "$cf_cv_cgetent" = yes
22046 then
22047
22048 cat >>confdefs.h <<\EOF
22049 #define HAVE_BSD_CGETENT 1
22050 EOF
22051
22052 echo "$as_me:22052: checking if cgetent uses const parameter" >&5
22053 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22054 if test "${cf_cv_cgetent_const+set}" = set; then
22055   echo $ECHO_N "(cached) $ECHO_C" >&6
22056 else
22057
22058 cat >"conftest.$ac_ext" <<_ACEOF
22059 #line 22059 "configure"
22060 #include "confdefs.h"
22061
22062 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22063 $ac_includes_default
22064 int
22065 main (void)
22066 {
22067
22068         char temp[128];
22069         char *buf = temp;
22070 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22071         const char *db_array = temp;
22072         cgetent(&buf, &db_array, "vt100");
22073 #endif
22074         cgetcap(buf, "tc", '=');
22075         cgetmatch(buf, "tc");
22076
22077   ;
22078   return 0;
22079 }
22080 _ACEOF
22081 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22082 if { (eval echo "$as_me:22082: \"$ac_link\"") >&5
22083   (eval $ac_link) 2>&5
22084   ac_status=$?
22085   echo "$as_me:22085: \$? = $ac_status" >&5
22086   (exit "$ac_status"); } &&
22087          { ac_try='test -s "conftest$ac_exeext"'
22088   { (eval echo "$as_me:22088: \"$ac_try\"") >&5
22089   (eval $ac_try) 2>&5
22090   ac_status=$?
22091   echo "$as_me:22091: \$? = $ac_status" >&5
22092   (exit "$ac_status"); }; }; then
22093   cf_cv_cgetent_const=yes
22094 else
22095   echo "$as_me: failed program was:" >&5
22096 cat "conftest.$ac_ext" >&5
22097 cf_cv_cgetent_const=no
22098 fi
22099 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22100
22101 fi
22102 echo "$as_me:22102: result: $cf_cv_cgetent_const" >&5
22103 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22104         if test "$cf_cv_cgetent_const" = yes
22105         then
22106
22107 cat >>confdefs.h <<EOF
22108 #define CGETENT_CONST const
22109 EOF
22110
22111         fi
22112 fi
22113
22114 fi
22115
22116 echo "$as_me:22116: checking for isascii" >&5
22117 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22118 if test "${cf_cv_have_isascii+set}" = set; then
22119   echo $ECHO_N "(cached) $ECHO_C" >&6
22120 else
22121
22122         cat >"conftest.$ac_ext" <<_ACEOF
22123 #line 22123 "configure"
22124 #include "confdefs.h"
22125 #include <ctype.h>
22126 int
22127 main (void)
22128 {
22129 int x = isascii(' ')
22130   ;
22131   return 0;
22132 }
22133 _ACEOF
22134 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22135 if { (eval echo "$as_me:22135: \"$ac_link\"") >&5
22136   (eval $ac_link) 2>&5
22137   ac_status=$?
22138   echo "$as_me:22138: \$? = $ac_status" >&5
22139   (exit "$ac_status"); } &&
22140          { ac_try='test -s "conftest$ac_exeext"'
22141   { (eval echo "$as_me:22141: \"$ac_try\"") >&5
22142   (eval $ac_try) 2>&5
22143   ac_status=$?
22144   echo "$as_me:22144: \$? = $ac_status" >&5
22145   (exit "$ac_status"); }; }; then
22146   cf_cv_have_isascii=yes
22147 else
22148   echo "$as_me: failed program was:" >&5
22149 cat "conftest.$ac_ext" >&5
22150 cf_cv_have_isascii=no
22151 fi
22152 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22153
22154 fi
22155 echo "$as_me:22155: result: $cf_cv_have_isascii" >&5
22156 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22157 test "$cf_cv_have_isascii" = yes &&
22158 cat >>confdefs.h <<\EOF
22159 #define HAVE_ISASCII 1
22160 EOF
22161
22162 if test "$ac_cv_func_sigaction" = yes; then
22163 echo "$as_me:22163: checking whether sigaction needs _POSIX_SOURCE" >&5
22164 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22165 cat >"conftest.$ac_ext" <<_ACEOF
22166 #line 22166 "configure"
22167 #include "confdefs.h"
22168
22169 #include <sys/types.h>
22170 #include <signal.h>
22171 int
22172 main (void)
22173 {
22174 struct sigaction act
22175   ;
22176   return 0;
22177 }
22178 _ACEOF
22179 rm -f "conftest.$ac_objext"
22180 if { (eval echo "$as_me:22180: \"$ac_compile\"") >&5
22181   (eval $ac_compile) 2>&5
22182   ac_status=$?
22183   echo "$as_me:22183: \$? = $ac_status" >&5
22184   (exit "$ac_status"); } &&
22185          { ac_try='test -s "conftest.$ac_objext"'
22186   { (eval echo "$as_me:22186: \"$ac_try\"") >&5
22187   (eval $ac_try) 2>&5
22188   ac_status=$?
22189   echo "$as_me:22189: \$? = $ac_status" >&5
22190   (exit "$ac_status"); }; }; then
22191   sigact_bad=no
22192 else
22193   echo "$as_me: failed program was:" >&5
22194 cat "conftest.$ac_ext" >&5
22195
22196 cat >"conftest.$ac_ext" <<_ACEOF
22197 #line 22197 "configure"
22198 #include "confdefs.h"
22199
22200 #define _POSIX_SOURCE
22201 #include <sys/types.h>
22202 #include <signal.h>
22203 int
22204 main (void)
22205 {
22206 struct sigaction act
22207   ;
22208   return 0;
22209 }
22210 _ACEOF
22211 rm -f "conftest.$ac_objext"
22212 if { (eval echo "$as_me:22212: \"$ac_compile\"") >&5
22213   (eval $ac_compile) 2>&5
22214   ac_status=$?
22215   echo "$as_me:22215: \$? = $ac_status" >&5
22216   (exit "$ac_status"); } &&
22217          { ac_try='test -s "conftest.$ac_objext"'
22218   { (eval echo "$as_me:22218: \"$ac_try\"") >&5
22219   (eval $ac_try) 2>&5
22220   ac_status=$?
22221   echo "$as_me:22221: \$? = $ac_status" >&5
22222   (exit "$ac_status"); }; }; then
22223   sigact_bad=yes
22224
22225 cat >>confdefs.h <<\EOF
22226 #define _POSIX_SOURCE 1
22227 EOF
22228
22229 else
22230   echo "$as_me: failed program was:" >&5
22231 cat "conftest.$ac_ext" >&5
22232 sigact_bad=unknown
22233 fi
22234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22235 fi
22236 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22237 echo "$as_me:22237: result: $sigact_bad" >&5
22238 echo "${ECHO_T}$sigact_bad" >&6
22239 fi
22240
22241 echo "$as_me:22241: checking if nanosleep really works" >&5
22242 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22243 if test "${cf_cv_func_nanosleep+set}" = set; then
22244   echo $ECHO_N "(cached) $ECHO_C" >&6
22245 else
22246
22247 if test "$cross_compiling" = yes; then
22248   cf_cv_func_nanosleep=unknown
22249 else
22250   cat >"conftest.$ac_ext" <<_ACEOF
22251 #line 22251 "configure"
22252 #include "confdefs.h"
22253
22254 $ac_includes_default
22255
22256 #include <errno.h>
22257 #include <time.h>
22258
22259 #ifdef HAVE_SYS_TIME_H
22260 #include <sys/time.h>
22261 #endif
22262
22263 int main(void) {
22264         struct timespec ts1, ts2;
22265         int code;
22266         ts1.tv_sec  = 0;
22267         ts1.tv_nsec = 750000000;
22268         ts2.tv_sec  = 0;
22269         ts2.tv_nsec = 0;
22270         errno = 0;
22271         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22272         ${cf_cv_main_return:-return}(code != 0);
22273 }
22274
22275 _ACEOF
22276 rm -f "conftest$ac_exeext"
22277 if { (eval echo "$as_me:22277: \"$ac_link\"") >&5
22278   (eval $ac_link) 2>&5
22279   ac_status=$?
22280   echo "$as_me:22280: \$? = $ac_status" >&5
22281   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22282   { (eval echo "$as_me:22282: \"$ac_try\"") >&5
22283   (eval $ac_try) 2>&5
22284   ac_status=$?
22285   echo "$as_me:22285: \$? = $ac_status" >&5
22286   (exit "$ac_status"); }; }; then
22287   cf_cv_func_nanosleep=yes
22288 else
22289   echo "$as_me: program exited with status $ac_status" >&5
22290 echo "$as_me: failed program was:" >&5
22291 cat "conftest.$ac_ext" >&5
22292 cf_cv_func_nanosleep=no
22293 fi
22294 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22295 fi
22296 fi
22297 echo "$as_me:22297: result: $cf_cv_func_nanosleep" >&5
22298 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22299
22300 test "$cf_cv_func_nanosleep" = "yes" &&
22301 cat >>confdefs.h <<\EOF
22302 #define HAVE_NANOSLEEP 1
22303 EOF
22304
22305 for ac_header in \
22306 termio.h \
22307 termios.h \
22308 unistd.h \
22309 sys/ioctl.h \
22310 sys/termio.h \
22311
22312 do
22313 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22314 echo "$as_me:22314: checking for $ac_header" >&5
22315 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22316 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22317   echo $ECHO_N "(cached) $ECHO_C" >&6
22318 else
22319   cat >"conftest.$ac_ext" <<_ACEOF
22320 #line 22320 "configure"
22321 #include "confdefs.h"
22322 #include <$ac_header>
22323 _ACEOF
22324 if { (eval echo "$as_me:22324: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22325   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22326   ac_status=$?
22327   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22328   rm -f conftest.er1
22329   cat conftest.err >&5
22330   echo "$as_me:22330: \$? = $ac_status" >&5
22331   (exit "$ac_status"); } >/dev/null; then
22332   if test -s conftest.err; then
22333     ac_cpp_err=$ac_c_preproc_warn_flag
22334   else
22335     ac_cpp_err=
22336   fi
22337 else
22338   ac_cpp_err=yes
22339 fi
22340 if test -z "$ac_cpp_err"; then
22341   eval "$as_ac_Header=yes"
22342 else
22343   echo "$as_me: failed program was:" >&5
22344   cat "conftest.$ac_ext" >&5
22345   eval "$as_ac_Header=no"
22346 fi
22347 rm -f conftest.err "conftest.$ac_ext"
22348 fi
22349 echo "$as_me:22349: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22350 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22351 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22352   cat >>confdefs.h <<EOF
22353 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22354 EOF
22355
22356 fi
22357 done
22358
22359 if test "$ac_cv_header_termios_h" = yes ; then
22360         case "$CFLAGS $CPPFLAGS" in
22361         (*-D_POSIX_SOURCE*)
22362                 termios_bad=dunno ;;
22363         (*)     termios_bad=maybe ;;
22364         esac
22365         if test "$termios_bad" = maybe ; then
22366         echo "$as_me:22366: checking whether termios.h needs _POSIX_SOURCE" >&5
22367 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22368         cat >"conftest.$ac_ext" <<_ACEOF
22369 #line 22369 "configure"
22370 #include "confdefs.h"
22371 #include <termios.h>
22372 int
22373 main (void)
22374 {
22375 struct termios foo; int x = foo.c_iflag = 1; (void)x
22376   ;
22377   return 0;
22378 }
22379 _ACEOF
22380 rm -f "conftest.$ac_objext"
22381 if { (eval echo "$as_me:22381: \"$ac_compile\"") >&5
22382   (eval $ac_compile) 2>&5
22383   ac_status=$?
22384   echo "$as_me:22384: \$? = $ac_status" >&5
22385   (exit "$ac_status"); } &&
22386          { ac_try='test -s "conftest.$ac_objext"'
22387   { (eval echo "$as_me:22387: \"$ac_try\"") >&5
22388   (eval $ac_try) 2>&5
22389   ac_status=$?
22390   echo "$as_me:22390: \$? = $ac_status" >&5
22391   (exit "$ac_status"); }; }; then
22392   termios_bad=no
22393 else
22394   echo "$as_me: failed program was:" >&5
22395 cat "conftest.$ac_ext" >&5
22396
22397                 cat >"conftest.$ac_ext" <<_ACEOF
22398 #line 22398 "configure"
22399 #include "confdefs.h"
22400
22401 #define _POSIX_SOURCE
22402 #include <termios.h>
22403 int
22404 main (void)
22405 {
22406 struct termios foo; int x = foo.c_iflag = 2; (void)x
22407   ;
22408   return 0;
22409 }
22410 _ACEOF
22411 rm -f "conftest.$ac_objext"
22412 if { (eval echo "$as_me:22412: \"$ac_compile\"") >&5
22413   (eval $ac_compile) 2>&5
22414   ac_status=$?
22415   echo "$as_me:22415: \$? = $ac_status" >&5
22416   (exit "$ac_status"); } &&
22417          { ac_try='test -s "conftest.$ac_objext"'
22418   { (eval echo "$as_me:22418: \"$ac_try\"") >&5
22419   (eval $ac_try) 2>&5
22420   ac_status=$?
22421   echo "$as_me:22421: \$? = $ac_status" >&5
22422   (exit "$ac_status"); }; }; then
22423   termios_bad=unknown
22424 else
22425   echo "$as_me: failed program was:" >&5
22426 cat "conftest.$ac_ext" >&5
22427 termios_bad=yes
22428 cat >>confdefs.h <<\EOF
22429 #define _POSIX_SOURCE 1
22430 EOF
22431
22432 fi
22433 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22434
22435 fi
22436 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22437         echo "$as_me:22437: result: $termios_bad" >&5
22438 echo "${ECHO_T}$termios_bad" >&6
22439         fi
22440 fi
22441
22442 echo "$as_me:22442: checking for tcgetattr" >&5
22443 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22444 if test "${cf_cv_have_tcgetattr+set}" = set; then
22445   echo $ECHO_N "(cached) $ECHO_C" >&6
22446 else
22447
22448 cat >"conftest.$ac_ext" <<_ACEOF
22449 #line 22449 "configure"
22450 #include "confdefs.h"
22451
22452 #include <sys/types.h>
22453 #ifdef HAVE_UNISTD_H
22454 #include <unistd.h>
22455 #endif
22456 #ifdef HAVE_TERMIOS_H
22457 #include <termios.h>
22458 #define TTY struct termios
22459 #else
22460 #ifdef HAVE_TERMIO_H
22461 #include <termio.h>
22462 #define TTY struct termio
22463 #endif
22464 #endif
22465
22466 int
22467 main (void)
22468 {
22469
22470 TTY foo;
22471 tcgetattr(1, &foo);
22472   ;
22473   return 0;
22474 }
22475 _ACEOF
22476 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22477 if { (eval echo "$as_me:22477: \"$ac_link\"") >&5
22478   (eval $ac_link) 2>&5
22479   ac_status=$?
22480   echo "$as_me:22480: \$? = $ac_status" >&5
22481   (exit "$ac_status"); } &&
22482          { ac_try='test -s "conftest$ac_exeext"'
22483   { (eval echo "$as_me:22483: \"$ac_try\"") >&5
22484   (eval $ac_try) 2>&5
22485   ac_status=$?
22486   echo "$as_me:22486: \$? = $ac_status" >&5
22487   (exit "$ac_status"); }; }; then
22488   cf_cv_have_tcgetattr=yes
22489 else
22490   echo "$as_me: failed program was:" >&5
22491 cat "conftest.$ac_ext" >&5
22492 cf_cv_have_tcgetattr=no
22493 fi
22494 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22495 fi
22496 echo "$as_me:22496: result: $cf_cv_have_tcgetattr" >&5
22497 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22498 test "$cf_cv_have_tcgetattr" = yes &&
22499 cat >>confdefs.h <<\EOF
22500 #define HAVE_TCGETATTR 1
22501 EOF
22502
22503 echo "$as_me:22503: checking for vsscanf function or workaround" >&5
22504 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22505 if test "${cf_cv_func_vsscanf+set}" = set; then
22506   echo $ECHO_N "(cached) $ECHO_C" >&6
22507 else
22508
22509 cat >"conftest.$ac_ext" <<_ACEOF
22510 #line 22510 "configure"
22511 #include "confdefs.h"
22512
22513 #include <stdarg.h>
22514 #include <stdio.h>
22515 int
22516 main (void)
22517 {
22518
22519         va_list ap;
22520         vsscanf("from", "%d", ap)
22521   ;
22522   return 0;
22523 }
22524 _ACEOF
22525 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22526 if { (eval echo "$as_me:22526: \"$ac_link\"") >&5
22527   (eval $ac_link) 2>&5
22528   ac_status=$?
22529   echo "$as_me:22529: \$? = $ac_status" >&5
22530   (exit "$ac_status"); } &&
22531          { ac_try='test -s "conftest$ac_exeext"'
22532   { (eval echo "$as_me:22532: \"$ac_try\"") >&5
22533   (eval $ac_try) 2>&5
22534   ac_status=$?
22535   echo "$as_me:22535: \$? = $ac_status" >&5
22536   (exit "$ac_status"); }; }; then
22537   cf_cv_func_vsscanf=vsscanf
22538 else
22539   echo "$as_me: failed program was:" >&5
22540 cat "conftest.$ac_ext" >&5
22541
22542 cat >"conftest.$ac_ext" <<_ACEOF
22543 #line 22543 "configure"
22544 #include "confdefs.h"
22545
22546 #include <stdarg.h>
22547 #include <stdio.h>
22548 int
22549 main (void)
22550 {
22551
22552         FILE strbuf;
22553         char *str = "from";
22554
22555         strbuf._flag = _IOREAD;
22556         strbuf._ptr = strbuf._base = (unsigned char *) str;
22557         strbuf._cnt = strlen(str);
22558         strbuf._file = _NFILE;
22559         return (vfscanf(&strbuf, "%d", ap))
22560   ;
22561   return 0;
22562 }
22563 _ACEOF
22564 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22565 if { (eval echo "$as_me:22565: \"$ac_link\"") >&5
22566   (eval $ac_link) 2>&5
22567   ac_status=$?
22568   echo "$as_me:22568: \$? = $ac_status" >&5
22569   (exit "$ac_status"); } &&
22570          { ac_try='test -s "conftest$ac_exeext"'
22571   { (eval echo "$as_me:22571: \"$ac_try\"") >&5
22572   (eval $ac_try) 2>&5
22573   ac_status=$?
22574   echo "$as_me:22574: \$? = $ac_status" >&5
22575   (exit "$ac_status"); }; }; then
22576   cf_cv_func_vsscanf=vfscanf
22577 else
22578   echo "$as_me: failed program was:" >&5
22579 cat "conftest.$ac_ext" >&5
22580
22581 cat >"conftest.$ac_ext" <<_ACEOF
22582 #line 22582 "configure"
22583 #include "confdefs.h"
22584
22585 #include <stdarg.h>
22586 #include <stdio.h>
22587 int
22588 main (void)
22589 {
22590
22591         FILE strbuf;
22592         char *str = "from";
22593
22594         strbuf._flag = _IOREAD;
22595         strbuf._ptr = strbuf._base = (unsigned char *) str;
22596         strbuf._cnt = strlen(str);
22597         strbuf._file = _NFILE;
22598         return (_doscan(&strbuf, "%d", ap))
22599   ;
22600   return 0;
22601 }
22602 _ACEOF
22603 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22604 if { (eval echo "$as_me:22604: \"$ac_link\"") >&5
22605   (eval $ac_link) 2>&5
22606   ac_status=$?
22607   echo "$as_me:22607: \$? = $ac_status" >&5
22608   (exit "$ac_status"); } &&
22609          { ac_try='test -s "conftest$ac_exeext"'
22610   { (eval echo "$as_me:22610: \"$ac_try\"") >&5
22611   (eval $ac_try) 2>&5
22612   ac_status=$?
22613   echo "$as_me:22613: \$? = $ac_status" >&5
22614   (exit "$ac_status"); }; }; then
22615   cf_cv_func_vsscanf=_doscan
22616 else
22617   echo "$as_me: failed program was:" >&5
22618 cat "conftest.$ac_ext" >&5
22619
22620 cf_cv_func_vsscanf=no
22621 fi
22622 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22623 fi
22624 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22625 fi
22626 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22627 fi
22628 echo "$as_me:22628: result: $cf_cv_func_vsscanf" >&5
22629 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22630
22631 case "$cf_cv_func_vsscanf" in
22632 (vsscanf)
22633 cat >>confdefs.h <<\EOF
22634 #define HAVE_VSSCANF 1
22635 EOF
22636 ;;
22637 (vfscanf)
22638 cat >>confdefs.h <<\EOF
22639 #define HAVE_VFSCANF 1
22640 EOF
22641 ;;
22642 (_doscan)
22643 cat >>confdefs.h <<\EOF
22644 #define HAVE__DOSCAN 1
22645 EOF
22646 ;;
22647 esac
22648
22649 for ac_header in \
22650 unistd.h \
22651
22652 do
22653 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22654 echo "$as_me:22654: checking for $ac_header" >&5
22655 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22656 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22657   echo $ECHO_N "(cached) $ECHO_C" >&6
22658 else
22659   cat >"conftest.$ac_ext" <<_ACEOF
22660 #line 22660 "configure"
22661 #include "confdefs.h"
22662 #include <$ac_header>
22663 _ACEOF
22664 if { (eval echo "$as_me:22664: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22665   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22666   ac_status=$?
22667   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22668   rm -f conftest.er1
22669   cat conftest.err >&5
22670   echo "$as_me:22670: \$? = $ac_status" >&5
22671   (exit "$ac_status"); } >/dev/null; then
22672   if test -s conftest.err; then
22673     ac_cpp_err=$ac_c_preproc_warn_flag
22674   else
22675     ac_cpp_err=
22676   fi
22677 else
22678   ac_cpp_err=yes
22679 fi
22680 if test -z "$ac_cpp_err"; then
22681   eval "$as_ac_Header=yes"
22682 else
22683   echo "$as_me: failed program was:" >&5
22684   cat "conftest.$ac_ext" >&5
22685   eval "$as_ac_Header=no"
22686 fi
22687 rm -f conftest.err "conftest.$ac_ext"
22688 fi
22689 echo "$as_me:22689: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22690 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22691 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22692   cat >>confdefs.h <<EOF
22693 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22694 EOF
22695
22696 fi
22697 done
22698
22699 echo "$as_me:22699: checking for working mkstemp" >&5
22700 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22701 if test "${cf_cv_func_mkstemp+set}" = set; then
22702   echo $ECHO_N "(cached) $ECHO_C" >&6
22703 else
22704
22705 rm -rf ./conftest*
22706 if test "$cross_compiling" = yes; then
22707   cf_cv_func_mkstemp=maybe
22708 else
22709   cat >"conftest.$ac_ext" <<_ACEOF
22710 #line 22710 "configure"
22711 #include "confdefs.h"
22712
22713 $ac_includes_default
22714
22715 int main(void)
22716 {
22717         char *tmpl = "conftestXXXXXX";
22718         char name[2][80];
22719         int n;
22720         int result = 0;
22721         int fd;
22722         struct stat sb;
22723
22724         umask(077);
22725         for (n = 0; n < 2; ++n) {
22726                 strcpy(name[n], tmpl);
22727                 if ((fd = mkstemp(name[n])) >= 0) {
22728                         if (!strcmp(name[n], tmpl)
22729                          || stat(name[n], &sb) != 0
22730                          || (sb.st_mode & S_IFMT) != S_IFREG
22731                          || (sb.st_mode & 077) != 0) {
22732                                 result = 1;
22733                         }
22734                         close(fd);
22735                 }
22736         }
22737         if (result == 0
22738          && !strcmp(name[0], name[1]))
22739                 result = 1;
22740         ${cf_cv_main_return:-return}(result);
22741 }
22742
22743 _ACEOF
22744 rm -f "conftest$ac_exeext"
22745 if { (eval echo "$as_me:22745: \"$ac_link\"") >&5
22746   (eval $ac_link) 2>&5
22747   ac_status=$?
22748   echo "$as_me:22748: \$? = $ac_status" >&5
22749   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22750   { (eval echo "$as_me:22750: \"$ac_try\"") >&5
22751   (eval $ac_try) 2>&5
22752   ac_status=$?
22753   echo "$as_me:22753: \$? = $ac_status" >&5
22754   (exit "$ac_status"); }; }; then
22755   cf_cv_func_mkstemp=yes
22756
22757 else
22758   echo "$as_me: program exited with status $ac_status" >&5
22759 echo "$as_me: failed program was:" >&5
22760 cat "conftest.$ac_ext" >&5
22761 cf_cv_func_mkstemp=no
22762
22763 fi
22764 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22765 fi
22766
22767 fi
22768 echo "$as_me:22768: result: $cf_cv_func_mkstemp" >&5
22769 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22770 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22771         echo "$as_me:22771: checking for mkstemp" >&5
22772 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22773 if test "${ac_cv_func_mkstemp+set}" = set; then
22774   echo $ECHO_N "(cached) $ECHO_C" >&6
22775 else
22776   cat >"conftest.$ac_ext" <<_ACEOF
22777 #line 22777 "configure"
22778 #include "confdefs.h"
22779 #define mkstemp autoconf_temporary
22780 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22781 #undef mkstemp
22782
22783 #ifdef __cplusplus
22784 extern "C"
22785 #endif
22786
22787 /* We use char because int might match the return type of a gcc2
22788    builtin and then its argument prototype would still apply.  */
22789 char mkstemp (void);
22790
22791 int
22792 main (void)
22793 {
22794
22795 /* The GNU C library defines stubs for functions which it implements
22796     to always fail with ENOSYS.  Some functions are actually named
22797     something starting with __ and the normal name is an alias.  */
22798 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22799 #error found stub for mkstemp
22800 #endif
22801
22802         return mkstemp ();
22803   ;
22804   return 0;
22805 }
22806 _ACEOF
22807 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22808 if { (eval echo "$as_me:22808: \"$ac_link\"") >&5
22809   (eval $ac_link) 2>&5
22810   ac_status=$?
22811   echo "$as_me:22811: \$? = $ac_status" >&5
22812   (exit "$ac_status"); } &&
22813          { ac_try='test -s "conftest$ac_exeext"'
22814   { (eval echo "$as_me:22814: \"$ac_try\"") >&5
22815   (eval $ac_try) 2>&5
22816   ac_status=$?
22817   echo "$as_me:22817: \$? = $ac_status" >&5
22818   (exit "$ac_status"); }; }; then
22819   ac_cv_func_mkstemp=yes
22820 else
22821   echo "$as_me: failed program was:" >&5
22822 cat "conftest.$ac_ext" >&5
22823 ac_cv_func_mkstemp=no
22824 fi
22825 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22826 fi
22827 echo "$as_me:22827: result: $ac_cv_func_mkstemp" >&5
22828 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22829
22830 fi
22831 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22832
22833 cat >>confdefs.h <<\EOF
22834 #define HAVE_MKSTEMP 1
22835 EOF
22836
22837 fi
22838
22839 # setup for prototype of fallback for vsscanf()
22840
22841 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22842         HAVE_VSSCANF=1
22843 else
22844         HAVE_VSSCANF=0
22845 fi
22846
22847 if test "x$cross_compiling" = xyes ; then
22848         { echo "$as_me:22848: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22849 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22850 else
22851         echo "$as_me:22851: checking whether setvbuf arguments are reversed" >&5
22852 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22853 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22854   echo $ECHO_N "(cached) $ECHO_C" >&6
22855 else
22856   if test "$cross_compiling" = yes; then
22857   { { echo "$as_me:22857: error: cannot run test program while cross compiling" >&5
22858 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22859    { (exit 1); exit 1; }; }
22860 else
22861   cat >"conftest.$ac_ext" <<_ACEOF
22862 #line 22862 "configure"
22863 #include "confdefs.h"
22864 #include <stdio.h>
22865 /* If setvbuf has the reversed format, exit 0. */
22866 int
22867 main (void)
22868 {
22869   /* This call has the arguments reversed.
22870      A reversed system may check and see that the address of main
22871      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22872   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22873     $ac_main_return(1);
22874   putc('\r', stdout);
22875   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22876 }
22877 _ACEOF
22878 rm -f "conftest$ac_exeext"
22879 if { (eval echo "$as_me:22879: \"$ac_link\"") >&5
22880   (eval $ac_link) 2>&5
22881   ac_status=$?
22882   echo "$as_me:22882: \$? = $ac_status" >&5
22883   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22884   { (eval echo "$as_me:22884: \"$ac_try\"") >&5
22885   (eval $ac_try) 2>&5
22886   ac_status=$?
22887   echo "$as_me:22887: \$? = $ac_status" >&5
22888   (exit "$ac_status"); }; }; then
22889   ac_cv_func_setvbuf_reversed=yes
22890 else
22891   echo "$as_me: program exited with status $ac_status" >&5
22892 echo "$as_me: failed program was:" >&5
22893 cat "conftest.$ac_ext" >&5
22894 ac_cv_func_setvbuf_reversed=no
22895 fi
22896 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22897 fi
22898 rm -f core ./core.* ./*.core
22899 fi
22900 echo "$as_me:22900: result: $ac_cv_func_setvbuf_reversed" >&5
22901 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22902 if test $ac_cv_func_setvbuf_reversed = yes; then
22903
22904 cat >>confdefs.h <<\EOF
22905 #define SETVBUF_REVERSED 1
22906 EOF
22907
22908 fi
22909
22910 fi
22911 echo "$as_me:22911: checking for intptr_t" >&5
22912 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22913 if test "${ac_cv_type_intptr_t+set}" = set; then
22914   echo $ECHO_N "(cached) $ECHO_C" >&6
22915 else
22916   cat >"conftest.$ac_ext" <<_ACEOF
22917 #line 22917 "configure"
22918 #include "confdefs.h"
22919 $ac_includes_default
22920 int
22921 main (void)
22922 {
22923 if ((intptr_t *) 0)
22924   return 0;
22925 if (sizeof (intptr_t))
22926   return 0;
22927   ;
22928   return 0;
22929 }
22930 _ACEOF
22931 rm -f "conftest.$ac_objext"
22932 if { (eval echo "$as_me:22932: \"$ac_compile\"") >&5
22933   (eval $ac_compile) 2>&5
22934   ac_status=$?
22935   echo "$as_me:22935: \$? = $ac_status" >&5
22936   (exit "$ac_status"); } &&
22937          { ac_try='test -s "conftest.$ac_objext"'
22938   { (eval echo "$as_me:22938: \"$ac_try\"") >&5
22939   (eval $ac_try) 2>&5
22940   ac_status=$?
22941   echo "$as_me:22941: \$? = $ac_status" >&5
22942   (exit "$ac_status"); }; }; then
22943   ac_cv_type_intptr_t=yes
22944 else
22945   echo "$as_me: failed program was:" >&5
22946 cat "conftest.$ac_ext" >&5
22947 ac_cv_type_intptr_t=no
22948 fi
22949 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22950 fi
22951 echo "$as_me:22951: result: $ac_cv_type_intptr_t" >&5
22952 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22953 if test "$ac_cv_type_intptr_t" = yes; then
22954   :
22955 else
22956
22957 cat >>confdefs.h <<EOF
22958 #define intptr_t long
22959 EOF
22960
22961 fi
22962
22963 echo "$as_me:22963: checking for ssize_t" >&5
22964 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22965 if test "${ac_cv_type_ssize_t+set}" = set; then
22966   echo $ECHO_N "(cached) $ECHO_C" >&6
22967 else
22968   cat >"conftest.$ac_ext" <<_ACEOF
22969 #line 22969 "configure"
22970 #include "confdefs.h"
22971 $ac_includes_default
22972 int
22973 main (void)
22974 {
22975 if ((ssize_t *) 0)
22976   return 0;
22977 if (sizeof (ssize_t))
22978   return 0;
22979   ;
22980   return 0;
22981 }
22982 _ACEOF
22983 rm -f "conftest.$ac_objext"
22984 if { (eval echo "$as_me:22984: \"$ac_compile\"") >&5
22985   (eval $ac_compile) 2>&5
22986   ac_status=$?
22987   echo "$as_me:22987: \$? = $ac_status" >&5
22988   (exit "$ac_status"); } &&
22989          { ac_try='test -s "conftest.$ac_objext"'
22990   { (eval echo "$as_me:22990: \"$ac_try\"") >&5
22991   (eval $ac_try) 2>&5
22992   ac_status=$?
22993   echo "$as_me:22993: \$? = $ac_status" >&5
22994   (exit "$ac_status"); }; }; then
22995   ac_cv_type_ssize_t=yes
22996 else
22997   echo "$as_me: failed program was:" >&5
22998 cat "conftest.$ac_ext" >&5
22999 ac_cv_type_ssize_t=no
23000 fi
23001 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23002 fi
23003 echo "$as_me:23003: result: $ac_cv_type_ssize_t" >&5
23004 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23005 if test "$ac_cv_type_ssize_t" = yes; then
23006   :
23007 else
23008
23009 cat >>confdefs.h <<EOF
23010 #define ssize_t int
23011 EOF
23012
23013 fi
23014
23015 echo "$as_me:23015: checking for type sigaction_t" >&5
23016 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23017 if test "${cf_cv_type_sigaction+set}" = set; then
23018   echo $ECHO_N "(cached) $ECHO_C" >&6
23019 else
23020
23021         cat >"conftest.$ac_ext" <<_ACEOF
23022 #line 23022 "configure"
23023 #include "confdefs.h"
23024
23025 #include <signal.h>
23026 int
23027 main (void)
23028 {
23029 sigaction_t x
23030   ;
23031   return 0;
23032 }
23033 _ACEOF
23034 rm -f "conftest.$ac_objext"
23035 if { (eval echo "$as_me:23035: \"$ac_compile\"") >&5
23036   (eval $ac_compile) 2>&5
23037   ac_status=$?
23038   echo "$as_me:23038: \$? = $ac_status" >&5
23039   (exit "$ac_status"); } &&
23040          { ac_try='test -s "conftest.$ac_objext"'
23041   { (eval echo "$as_me:23041: \"$ac_try\"") >&5
23042   (eval $ac_try) 2>&5
23043   ac_status=$?
23044   echo "$as_me:23044: \$? = $ac_status" >&5
23045   (exit "$ac_status"); }; }; then
23046   cf_cv_type_sigaction=yes
23047 else
23048   echo "$as_me: failed program was:" >&5
23049 cat "conftest.$ac_ext" >&5
23050 cf_cv_type_sigaction=no
23051 fi
23052 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23053 fi
23054
23055 echo "$as_me:23055: result: $cf_cv_type_sigaction" >&5
23056 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23057 test "$cf_cv_type_sigaction" = yes &&
23058 cat >>confdefs.h <<\EOF
23059 #define HAVE_TYPE_SIGACTION 1
23060 EOF
23061
23062 echo "$as_me:23062: checking declaration of size-change" >&5
23063 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23064 if test "${cf_cv_sizechange+set}" = set; then
23065   echo $ECHO_N "(cached) $ECHO_C" >&6
23066 else
23067
23068         cf_cv_sizechange=unknown
23069         cf_save_CPPFLAGS="$CPPFLAGS"
23070
23071 for cf_opts in "" "NEED_PTEM_H"
23072 do
23073
23074         CPPFLAGS="$cf_save_CPPFLAGS"
23075         if test -n "$cf_opts"
23076         then
23077
23078         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23079         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23080
23081         fi
23082         cat >"conftest.$ac_ext" <<_ACEOF
23083 #line 23083 "configure"
23084 #include "confdefs.h"
23085 #include <sys/types.h>
23086 #ifdef HAVE_TERMIOS_H
23087 #include <termios.h>
23088 #else
23089 #ifdef HAVE_TERMIO_H
23090 #include <termio.h>
23091 #endif
23092 #endif
23093
23094 #ifdef NEED_PTEM_H
23095 /* This is a workaround for SCO:  they neglected to define struct winsize in
23096  * termios.h -- it is only in termio.h and ptem.h
23097  */
23098 #include <sys/stream.h>
23099 #include <sys/ptem.h>
23100 #endif
23101
23102 #ifdef HAVE_SYS_IOCTL_H
23103 #include <sys/ioctl.h>
23104 #endif
23105
23106 int
23107 main (void)
23108 {
23109
23110 #ifdef TIOCGSIZE
23111         struct ttysize win;     /* SunOS 3.0... */
23112         int y = win.ts_lines = 2;
23113         int x = win.ts_cols = 1;
23114         (void)y;
23115         (void)x;
23116 #else
23117 #ifdef TIOCGWINSZ
23118         struct winsize win;     /* everything else */
23119         int y = win.ws_row = 2;
23120         int x = win.ws_col = 1;
23121         (void)y;
23122         (void)x;
23123 #else
23124         no TIOCGSIZE or TIOCGWINSZ
23125 #endif /* TIOCGWINSZ */
23126 #endif /* TIOCGSIZE */
23127
23128   ;
23129   return 0;
23130 }
23131 _ACEOF
23132 rm -f "conftest.$ac_objext"
23133 if { (eval echo "$as_me:23133: \"$ac_compile\"") >&5
23134   (eval $ac_compile) 2>&5
23135   ac_status=$?
23136   echo "$as_me:23136: \$? = $ac_status" >&5
23137   (exit "$ac_status"); } &&
23138          { ac_try='test -s "conftest.$ac_objext"'
23139   { (eval echo "$as_me:23139: \"$ac_try\"") >&5
23140   (eval $ac_try) 2>&5
23141   ac_status=$?
23142   echo "$as_me:23142: \$? = $ac_status" >&5
23143   (exit "$ac_status"); }; }; then
23144   cf_cv_sizechange=yes
23145 else
23146   echo "$as_me: failed program was:" >&5
23147 cat "conftest.$ac_ext" >&5
23148 cf_cv_sizechange=no
23149 fi
23150 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23151
23152         CPPFLAGS="$cf_save_CPPFLAGS"
23153         if test "$cf_cv_sizechange" = yes ; then
23154                 echo "size-change succeeded ($cf_opts)" >&5
23155                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23156                 break
23157         fi
23158 done
23159
23160 fi
23161 echo "$as_me:23161: result: $cf_cv_sizechange" >&5
23162 echo "${ECHO_T}$cf_cv_sizechange" >&6
23163 if test "$cf_cv_sizechange" != no ; then
23164
23165 cat >>confdefs.h <<\EOF
23166 #define HAVE_SIZECHANGE 1
23167 EOF
23168
23169         case "$cf_cv_sizechange" in
23170         (NEED*)
23171                 cat >>confdefs.h <<EOF
23172 #define $cf_cv_sizechange  1
23173 EOF
23174
23175                 ;;
23176         esac
23177 fi
23178
23179 echo "$as_me:23179: checking for memmove" >&5
23180 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23181 if test "${ac_cv_func_memmove+set}" = set; then
23182   echo $ECHO_N "(cached) $ECHO_C" >&6
23183 else
23184   cat >"conftest.$ac_ext" <<_ACEOF
23185 #line 23185 "configure"
23186 #include "confdefs.h"
23187 #define memmove autoconf_temporary
23188 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23189 #undef memmove
23190
23191 #ifdef __cplusplus
23192 extern "C"
23193 #endif
23194
23195 /* We use char because int might match the return type of a gcc2
23196    builtin and then its argument prototype would still apply.  */
23197 char memmove (void);
23198
23199 int
23200 main (void)
23201 {
23202
23203 /* The GNU C library defines stubs for functions which it implements
23204     to always fail with ENOSYS.  Some functions are actually named
23205     something starting with __ and the normal name is an alias.  */
23206 #if defined (__stub_memmove) || defined (__stub___memmove)
23207 #error found stub for memmove
23208 #endif
23209
23210         return memmove ();
23211   ;
23212   return 0;
23213 }
23214 _ACEOF
23215 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23216 if { (eval echo "$as_me:23216: \"$ac_link\"") >&5
23217   (eval $ac_link) 2>&5
23218   ac_status=$?
23219   echo "$as_me:23219: \$? = $ac_status" >&5
23220   (exit "$ac_status"); } &&
23221          { ac_try='test -s "conftest$ac_exeext"'
23222   { (eval echo "$as_me:23222: \"$ac_try\"") >&5
23223   (eval $ac_try) 2>&5
23224   ac_status=$?
23225   echo "$as_me:23225: \$? = $ac_status" >&5
23226   (exit "$ac_status"); }; }; then
23227   ac_cv_func_memmove=yes
23228 else
23229   echo "$as_me: failed program was:" >&5
23230 cat "conftest.$ac_ext" >&5
23231 ac_cv_func_memmove=no
23232 fi
23233 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23234 fi
23235 echo "$as_me:23235: result: $ac_cv_func_memmove" >&5
23236 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23237 if test "$ac_cv_func_memmove" = yes; then
23238   :
23239 else
23240
23241 echo "$as_me:23241: checking for bcopy" >&5
23242 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23243 if test "${ac_cv_func_bcopy+set}" = set; then
23244   echo $ECHO_N "(cached) $ECHO_C" >&6
23245 else
23246   cat >"conftest.$ac_ext" <<_ACEOF
23247 #line 23247 "configure"
23248 #include "confdefs.h"
23249 #define bcopy autoconf_temporary
23250 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23251 #undef bcopy
23252
23253 #ifdef __cplusplus
23254 extern "C"
23255 #endif
23256
23257 /* We use char because int might match the return type of a gcc2
23258    builtin and then its argument prototype would still apply.  */
23259 char bcopy (void);
23260
23261 int
23262 main (void)
23263 {
23264
23265 /* The GNU C library defines stubs for functions which it implements
23266     to always fail with ENOSYS.  Some functions are actually named
23267     something starting with __ and the normal name is an alias.  */
23268 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23269 #error found stub for bcopy
23270 #endif
23271
23272         return bcopy ();
23273   ;
23274   return 0;
23275 }
23276 _ACEOF
23277 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23278 if { (eval echo "$as_me:23278: \"$ac_link\"") >&5
23279   (eval $ac_link) 2>&5
23280   ac_status=$?
23281   echo "$as_me:23281: \$? = $ac_status" >&5
23282   (exit "$ac_status"); } &&
23283          { ac_try='test -s "conftest$ac_exeext"'
23284   { (eval echo "$as_me:23284: \"$ac_try\"") >&5
23285   (eval $ac_try) 2>&5
23286   ac_status=$?
23287   echo "$as_me:23287: \$? = $ac_status" >&5
23288   (exit "$ac_status"); }; }; then
23289   ac_cv_func_bcopy=yes
23290 else
23291   echo "$as_me: failed program was:" >&5
23292 cat "conftest.$ac_ext" >&5
23293 ac_cv_func_bcopy=no
23294 fi
23295 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23296 fi
23297 echo "$as_me:23297: result: $ac_cv_func_bcopy" >&5
23298 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23299 if test "$ac_cv_func_bcopy" = yes; then
23300
23301         echo "$as_me:23301: checking if bcopy does overlapping moves" >&5
23302 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23303 if test "${cf_cv_good_bcopy+set}" = set; then
23304   echo $ECHO_N "(cached) $ECHO_C" >&6
23305 else
23306
23307                 if test "$cross_compiling" = yes; then
23308   cf_cv_good_bcopy=unknown
23309 else
23310   cat >"conftest.$ac_ext" <<_ACEOF
23311 #line 23311 "configure"
23312 #include "confdefs.h"
23313
23314 $ac_includes_default
23315
23316 int main(void) {
23317         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23318         char temp[40];
23319         bcopy(data, temp, sizeof(data));
23320         bcopy(temp+10, temp, 15);
23321         bcopy(temp+5, temp+15, 10);
23322         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23323 }
23324
23325 _ACEOF
23326 rm -f "conftest$ac_exeext"
23327 if { (eval echo "$as_me:23327: \"$ac_link\"") >&5
23328   (eval $ac_link) 2>&5
23329   ac_status=$?
23330   echo "$as_me:23330: \$? = $ac_status" >&5
23331   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23332   { (eval echo "$as_me:23332: \"$ac_try\"") >&5
23333   (eval $ac_try) 2>&5
23334   ac_status=$?
23335   echo "$as_me:23335: \$? = $ac_status" >&5
23336   (exit "$ac_status"); }; }; then
23337   cf_cv_good_bcopy=yes
23338 else
23339   echo "$as_me: program exited with status $ac_status" >&5
23340 echo "$as_me: failed program was:" >&5
23341 cat "conftest.$ac_ext" >&5
23342 cf_cv_good_bcopy=no
23343 fi
23344 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23345 fi
23346
23347 fi
23348 echo "$as_me:23348: result: $cf_cv_good_bcopy" >&5
23349 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23350
23351 else
23352   cf_cv_good_bcopy=no
23353 fi
23354
23355         if test "$cf_cv_good_bcopy" = yes ; then
23356
23357 cat >>confdefs.h <<\EOF
23358 #define USE_OK_BCOPY 1
23359 EOF
23360
23361         else
23362
23363 cat >>confdefs.h <<\EOF
23364 #define USE_MY_MEMMOVE 1
23365 EOF
23366
23367         fi
23368
23369 fi
23370
23371 tty >/dev/null 2>&1 || {
23372 for ac_func in posix_openpt
23373 do
23374 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23375 echo "$as_me:23375: checking for $ac_func" >&5
23376 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23377 if eval "test \"\${$as_ac_var+set}\" = set"; then
23378   echo $ECHO_N "(cached) $ECHO_C" >&6
23379 else
23380   cat >"conftest.$ac_ext" <<_ACEOF
23381 #line 23381 "configure"
23382 #include "confdefs.h"
23383 #define $ac_func autoconf_temporary
23384 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23385 #undef $ac_func
23386
23387 #ifdef __cplusplus
23388 extern "C"
23389 #endif
23390
23391 /* We use char because int might match the return type of a gcc2
23392    builtin and then its argument prototype would still apply.  */
23393 char $ac_func (void);
23394
23395 int
23396 main (void)
23397 {
23398
23399 /* The GNU C library defines stubs for functions which it implements
23400     to always fail with ENOSYS.  Some functions are actually named
23401     something starting with __ and the normal name is an alias.  */
23402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23403 #error found stub for $ac_func
23404 #endif
23405
23406         return $ac_func ();
23407   ;
23408   return 0;
23409 }
23410 _ACEOF
23411 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23412 if { (eval echo "$as_me:23412: \"$ac_link\"") >&5
23413   (eval $ac_link) 2>&5
23414   ac_status=$?
23415   echo "$as_me:23415: \$? = $ac_status" >&5
23416   (exit "$ac_status"); } &&
23417          { ac_try='test -s "conftest$ac_exeext"'
23418   { (eval echo "$as_me:23418: \"$ac_try\"") >&5
23419   (eval $ac_try) 2>&5
23420   ac_status=$?
23421   echo "$as_me:23421: \$? = $ac_status" >&5
23422   (exit "$ac_status"); }; }; then
23423   eval "$as_ac_var=yes"
23424 else
23425   echo "$as_me: failed program was:" >&5
23426 cat "conftest.$ac_ext" >&5
23427 eval "$as_ac_var=no"
23428 fi
23429 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23430 fi
23431 echo "$as_me:23431: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23432 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23433 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23434   cat >>confdefs.h <<EOF
23435 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23436 EOF
23437
23438 fi
23439 done
23440  }
23441 echo "$as_me:23441: checking if poll really works" >&5
23442 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23443 if test "${cf_cv_working_poll+set}" = set; then
23444   echo $ECHO_N "(cached) $ECHO_C" >&6
23445 else
23446
23447 if test "$cross_compiling" = yes; then
23448   cf_cv_working_poll=unknown
23449 else
23450   cat >"conftest.$ac_ext" <<_ACEOF
23451 #line 23451 "configure"
23452 #include "confdefs.h"
23453
23454 $ac_includes_default
23455
23456 #include <fcntl.h>
23457
23458 #ifdef HAVE_POLL_H
23459 #include <poll.h>
23460 #else
23461 #include <sys/poll.h>
23462 #endif
23463
23464 int main(void) {
23465         struct pollfd myfds;
23466         int ret;
23467
23468         /* check for Darwin bug with respect to "devices" */
23469         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23470         if (myfds.fd < 0)
23471                 myfds.fd = 0;
23472         myfds.events = POLLIN;
23473         myfds.revents = 0;
23474
23475         ret = poll(&myfds, 1, 100);
23476
23477         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23478                 ret = -1;
23479         } else {
23480                 int fd = 0;
23481                 if (!isatty(fd)) {
23482                         fd = open("/dev/tty", 2);       /* O_RDWR */
23483                 }
23484 #ifdef HAVE_POSIX_OPENPT
23485                 if (fd < 0) {
23486                         fd = posix_openpt(O_RDWR);
23487                 }
23488 #endif
23489
23490                 if (fd >= 0) {
23491                         /* also check with standard input */
23492                         myfds.fd = fd;
23493                         myfds.events = POLLIN;
23494                         myfds.revents = 0;
23495                         ret = poll(&myfds, 1, 100);
23496                 } else {
23497                         ret = -1;
23498                 }
23499         }
23500         ${cf_cv_main_return:-return}(ret < 0);
23501 }
23502 _ACEOF
23503 rm -f "conftest$ac_exeext"
23504 if { (eval echo "$as_me:23504: \"$ac_link\"") >&5
23505   (eval $ac_link) 2>&5
23506   ac_status=$?
23507   echo "$as_me:23507: \$? = $ac_status" >&5
23508   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23509   { (eval echo "$as_me:23509: \"$ac_try\"") >&5
23510   (eval $ac_try) 2>&5
23511   ac_status=$?
23512   echo "$as_me:23512: \$? = $ac_status" >&5
23513   (exit "$ac_status"); }; }; then
23514   cf_cv_working_poll=yes
23515 else
23516   echo "$as_me: program exited with status $ac_status" >&5
23517 echo "$as_me: failed program was:" >&5
23518 cat "conftest.$ac_ext" >&5
23519 cf_cv_working_poll=no
23520 fi
23521 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23522 fi
23523 fi
23524 echo "$as_me:23524: result: $cf_cv_working_poll" >&5
23525 echo "${ECHO_T}$cf_cv_working_poll" >&6
23526 test "$cf_cv_working_poll" = "yes" &&
23527 cat >>confdefs.h <<\EOF
23528 #define HAVE_WORKING_POLL 1
23529 EOF
23530
23531 echo "$as_me:23531: checking for va_copy" >&5
23532 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23533 if test "${cf_cv_have_va_copy+set}" = set; then
23534   echo $ECHO_N "(cached) $ECHO_C" >&6
23535 else
23536
23537 cat >"conftest.$ac_ext" <<_ACEOF
23538 #line 23538 "configure"
23539 #include "confdefs.h"
23540
23541 #include <stdarg.h>
23542
23543 int
23544 main (void)
23545 {
23546
23547         static va_list dst;
23548         static va_list src;
23549         va_copy(dst, src)
23550   ;
23551   return 0;
23552 }
23553 _ACEOF
23554 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23555 if { (eval echo "$as_me:23555: \"$ac_link\"") >&5
23556   (eval $ac_link) 2>&5
23557   ac_status=$?
23558   echo "$as_me:23558: \$? = $ac_status" >&5
23559   (exit "$ac_status"); } &&
23560          { ac_try='test -s "conftest$ac_exeext"'
23561   { (eval echo "$as_me:23561: \"$ac_try\"") >&5
23562   (eval $ac_try) 2>&5
23563   ac_status=$?
23564   echo "$as_me:23564: \$? = $ac_status" >&5
23565   (exit "$ac_status"); }; }; then
23566   cf_cv_have_va_copy=yes
23567 else
23568   echo "$as_me: failed program was:" >&5
23569 cat "conftest.$ac_ext" >&5
23570 cf_cv_have_va_copy=no
23571 fi
23572 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23573 fi
23574 echo "$as_me:23574: result: $cf_cv_have_va_copy" >&5
23575 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23576
23577 if test "$cf_cv_have_va_copy" = yes;
23578 then
23579
23580 cat >>confdefs.h <<\EOF
23581 #define HAVE_VA_COPY 1
23582 EOF
23583
23584 else # !cf_cv_have_va_copy
23585
23586 echo "$as_me:23586: checking for __va_copy" >&5
23587 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23588 if test "${cf_cv_have___va_copy+set}" = set; then
23589   echo $ECHO_N "(cached) $ECHO_C" >&6
23590 else
23591
23592 cat >"conftest.$ac_ext" <<_ACEOF
23593 #line 23593 "configure"
23594 #include "confdefs.h"
23595
23596 #include <stdarg.h>
23597
23598 int
23599 main (void)
23600 {
23601
23602         static va_list dst;
23603         static va_list src;
23604         __va_copy(dst, src)
23605   ;
23606   return 0;
23607 }
23608 _ACEOF
23609 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23610 if { (eval echo "$as_me:23610: \"$ac_link\"") >&5
23611   (eval $ac_link) 2>&5
23612   ac_status=$?
23613   echo "$as_me:23613: \$? = $ac_status" >&5
23614   (exit "$ac_status"); } &&
23615          { ac_try='test -s "conftest$ac_exeext"'
23616   { (eval echo "$as_me:23616: \"$ac_try\"") >&5
23617   (eval $ac_try) 2>&5
23618   ac_status=$?
23619   echo "$as_me:23619: \$? = $ac_status" >&5
23620   (exit "$ac_status"); }; }; then
23621   cf_cv_have___va_copy=yes
23622 else
23623   echo "$as_me: failed program was:" >&5
23624 cat "conftest.$ac_ext" >&5
23625 cf_cv_have___va_copy=no
23626 fi
23627 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23628 fi
23629 echo "$as_me:23629: result: $cf_cv_have___va_copy" >&5
23630 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23631
23632 if test "$cf_cv_have___va_copy" = yes
23633 then
23634
23635 cat >>confdefs.h <<\EOF
23636 #define HAVE___VA_COPY 1
23637 EOF
23638
23639 else # !cf_cv_have___va_copy
23640
23641 echo "$as_me:23641: checking for __builtin_va_copy" >&5
23642 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23643 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23644   echo $ECHO_N "(cached) $ECHO_C" >&6
23645 else
23646
23647 cat >"conftest.$ac_ext" <<_ACEOF
23648 #line 23648 "configure"
23649 #include "confdefs.h"
23650
23651 #include <stdarg.h>
23652
23653 int
23654 main (void)
23655 {
23656
23657         static va_list dst;
23658         static va_list src;
23659         __builtin_va_copy(dst, src)
23660   ;
23661   return 0;
23662 }
23663 _ACEOF
23664 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23665 if { (eval echo "$as_me:23665: \"$ac_link\"") >&5
23666   (eval $ac_link) 2>&5
23667   ac_status=$?
23668   echo "$as_me:23668: \$? = $ac_status" >&5
23669   (exit "$ac_status"); } &&
23670          { ac_try='test -s "conftest$ac_exeext"'
23671   { (eval echo "$as_me:23671: \"$ac_try\"") >&5
23672   (eval $ac_try) 2>&5
23673   ac_status=$?
23674   echo "$as_me:23674: \$? = $ac_status" >&5
23675   (exit "$ac_status"); }; }; then
23676   cf_cv_have___builtin_va_copy=yes
23677 else
23678   echo "$as_me: failed program was:" >&5
23679 cat "conftest.$ac_ext" >&5
23680 cf_cv_have___builtin_va_copy=no
23681 fi
23682 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23683 fi
23684 echo "$as_me:23684: result: $cf_cv_have___builtin_va_copy" >&5
23685 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23686
23687 test "$cf_cv_have___builtin_va_copy" = yes &&
23688
23689 cat >>confdefs.h <<\EOF
23690 #define HAVE___BUILTIN_VA_COPY 1
23691 EOF
23692
23693 fi # cf_cv_have___va_copy
23694
23695 fi # cf_cv_have_va_copy
23696
23697 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23698 (*yes*)
23699         ;;
23700
23701 (*)
23702         echo "$as_me:23702: checking if we can simply copy va_list" >&5
23703 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23704 if test "${cf_cv_pointer_va_list+set}" = set; then
23705   echo $ECHO_N "(cached) $ECHO_C" >&6
23706 else
23707
23708 cat >"conftest.$ac_ext" <<_ACEOF
23709 #line 23709 "configure"
23710 #include "confdefs.h"
23711
23712 #include <stdarg.h>
23713
23714 int
23715 main (void)
23716 {
23717
23718         va_list dst;
23719         va_list src;
23720         dst = src
23721   ;
23722   return 0;
23723 }
23724 _ACEOF
23725 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23726 if { (eval echo "$as_me:23726: \"$ac_link\"") >&5
23727   (eval $ac_link) 2>&5
23728   ac_status=$?
23729   echo "$as_me:23729: \$? = $ac_status" >&5
23730   (exit "$ac_status"); } &&
23731          { ac_try='test -s "conftest$ac_exeext"'
23732   { (eval echo "$as_me:23732: \"$ac_try\"") >&5
23733   (eval $ac_try) 2>&5
23734   ac_status=$?
23735   echo "$as_me:23735: \$? = $ac_status" >&5
23736   (exit "$ac_status"); }; }; then
23737   cf_cv_pointer_va_list=yes
23738 else
23739   echo "$as_me: failed program was:" >&5
23740 cat "conftest.$ac_ext" >&5
23741 cf_cv_pointer_va_list=no
23742 fi
23743 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23744 fi
23745 echo "$as_me:23745: result: $cf_cv_pointer_va_list" >&5
23746 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23747
23748         if test "$cf_cv_pointer_va_list" = no
23749         then
23750                 echo "$as_me:23750: checking if we can copy va_list indirectly" >&5
23751 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23752 if test "${cf_cv_array_va_list+set}" = set; then
23753   echo $ECHO_N "(cached) $ECHO_C" >&6
23754 else
23755
23756 cat >"conftest.$ac_ext" <<_ACEOF
23757 #line 23757 "configure"
23758 #include "confdefs.h"
23759
23760 #include <stdarg.h>
23761
23762 int
23763 main (void)
23764 {
23765
23766         va_list dst;
23767         va_list src;
23768         *dst = *src
23769   ;
23770   return 0;
23771 }
23772 _ACEOF
23773 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23774 if { (eval echo "$as_me:23774: \"$ac_link\"") >&5
23775   (eval $ac_link) 2>&5
23776   ac_status=$?
23777   echo "$as_me:23777: \$? = $ac_status" >&5
23778   (exit "$ac_status"); } &&
23779          { ac_try='test -s "conftest$ac_exeext"'
23780   { (eval echo "$as_me:23780: \"$ac_try\"") >&5
23781   (eval $ac_try) 2>&5
23782   ac_status=$?
23783   echo "$as_me:23783: \$? = $ac_status" >&5
23784   (exit "$ac_status"); }; }; then
23785   cf_cv_array_va_list=yes
23786 else
23787   echo "$as_me: failed program was:" >&5
23788 cat "conftest.$ac_ext" >&5
23789 cf_cv_array_va_list=no
23790 fi
23791 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23792 fi
23793 echo "$as_me:23793: result: $cf_cv_array_va_list" >&5
23794 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23795                 test "$cf_cv_array_va_list" = yes &&
23796 cat >>confdefs.h <<\EOF
23797 #define ARRAY_VA_LIST 1
23798 EOF
23799
23800         fi
23801         ;;
23802 esac
23803
23804 echo "$as_me:23804: checking for pid_t" >&5
23805 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23806 if test "${ac_cv_type_pid_t+set}" = set; then
23807   echo $ECHO_N "(cached) $ECHO_C" >&6
23808 else
23809   cat >"conftest.$ac_ext" <<_ACEOF
23810 #line 23810 "configure"
23811 #include "confdefs.h"
23812 $ac_includes_default
23813 int
23814 main (void)
23815 {
23816 if ((pid_t *) 0)
23817   return 0;
23818 if (sizeof (pid_t))
23819   return 0;
23820   ;
23821   return 0;
23822 }
23823 _ACEOF
23824 rm -f "conftest.$ac_objext"
23825 if { (eval echo "$as_me:23825: \"$ac_compile\"") >&5
23826   (eval $ac_compile) 2>&5
23827   ac_status=$?
23828   echo "$as_me:23828: \$? = $ac_status" >&5
23829   (exit "$ac_status"); } &&
23830          { ac_try='test -s "conftest.$ac_objext"'
23831   { (eval echo "$as_me:23831: \"$ac_try\"") >&5
23832   (eval $ac_try) 2>&5
23833   ac_status=$?
23834   echo "$as_me:23834: \$? = $ac_status" >&5
23835   (exit "$ac_status"); }; }; then
23836   ac_cv_type_pid_t=yes
23837 else
23838   echo "$as_me: failed program was:" >&5
23839 cat "conftest.$ac_ext" >&5
23840 ac_cv_type_pid_t=no
23841 fi
23842 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23843 fi
23844 echo "$as_me:23844: result: $ac_cv_type_pid_t" >&5
23845 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23846 if test "$ac_cv_type_pid_t" = yes; then
23847   :
23848 else
23849
23850 cat >>confdefs.h <<EOF
23851 #define pid_t int
23852 EOF
23853
23854 fi
23855
23856 for ac_header in unistd.h vfork.h
23857 do
23858 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23859 echo "$as_me:23859: checking for $ac_header" >&5
23860 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23861 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23862   echo $ECHO_N "(cached) $ECHO_C" >&6
23863 else
23864   cat >"conftest.$ac_ext" <<_ACEOF
23865 #line 23865 "configure"
23866 #include "confdefs.h"
23867 #include <$ac_header>
23868 _ACEOF
23869 if { (eval echo "$as_me:23869: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23870   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23871   ac_status=$?
23872   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23873   rm -f conftest.er1
23874   cat conftest.err >&5
23875   echo "$as_me:23875: \$? = $ac_status" >&5
23876   (exit "$ac_status"); } >/dev/null; then
23877   if test -s conftest.err; then
23878     ac_cpp_err=$ac_c_preproc_warn_flag
23879   else
23880     ac_cpp_err=
23881   fi
23882 else
23883   ac_cpp_err=yes
23884 fi
23885 if test -z "$ac_cpp_err"; then
23886   eval "$as_ac_Header=yes"
23887 else
23888   echo "$as_me: failed program was:" >&5
23889   cat "conftest.$ac_ext" >&5
23890   eval "$as_ac_Header=no"
23891 fi
23892 rm -f conftest.err "conftest.$ac_ext"
23893 fi
23894 echo "$as_me:23894: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23895 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23896 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23897   cat >>confdefs.h <<EOF
23898 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23899 EOF
23900
23901 fi
23902 done
23903
23904 for ac_func in fork vfork
23905 do
23906 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23907 echo "$as_me:23907: checking for $ac_func" >&5
23908 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23909 if eval "test \"\${$as_ac_var+set}\" = set"; then
23910   echo $ECHO_N "(cached) $ECHO_C" >&6
23911 else
23912   cat >"conftest.$ac_ext" <<_ACEOF
23913 #line 23913 "configure"
23914 #include "confdefs.h"
23915 #define $ac_func autoconf_temporary
23916 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23917 #undef $ac_func
23918
23919 #ifdef __cplusplus
23920 extern "C"
23921 #endif
23922
23923 /* We use char because int might match the return type of a gcc2
23924    builtin and then its argument prototype would still apply.  */
23925 char $ac_func (void);
23926
23927 int
23928 main (void)
23929 {
23930
23931 /* The GNU C library defines stubs for functions which it implements
23932     to always fail with ENOSYS.  Some functions are actually named
23933     something starting with __ and the normal name is an alias.  */
23934 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23935 #error found stub for $ac_func
23936 #endif
23937
23938         return $ac_func ();
23939   ;
23940   return 0;
23941 }
23942 _ACEOF
23943 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23944 if { (eval echo "$as_me:23944: \"$ac_link\"") >&5
23945   (eval $ac_link) 2>&5
23946   ac_status=$?
23947   echo "$as_me:23947: \$? = $ac_status" >&5
23948   (exit "$ac_status"); } &&
23949          { ac_try='test -s "conftest$ac_exeext"'
23950   { (eval echo "$as_me:23950: \"$ac_try\"") >&5
23951   (eval $ac_try) 2>&5
23952   ac_status=$?
23953   echo "$as_me:23953: \$? = $ac_status" >&5
23954   (exit "$ac_status"); }; }; then
23955   eval "$as_ac_var=yes"
23956 else
23957   echo "$as_me: failed program was:" >&5
23958 cat "conftest.$ac_ext" >&5
23959 eval "$as_ac_var=no"
23960 fi
23961 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23962 fi
23963 echo "$as_me:23963: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23964 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23965 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23966   cat >>confdefs.h <<EOF
23967 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23968 EOF
23969
23970 fi
23971 done
23972
23973 ac_cv_func_fork_works=$ac_cv_func_fork
23974 if test "x$ac_cv_func_fork" = xyes; then
23975   echo "$as_me:23975: checking for working fork" >&5
23976 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23977 if test "${ac_cv_func_fork_works+set}" = set; then
23978   echo $ECHO_N "(cached) $ECHO_C" >&6
23979 else
23980   if test "$cross_compiling" = yes; then
23981   ac_cv_func_fork_works=cross
23982 else
23983   cat >"conftest.$ac_ext" <<_ACEOF
23984 /* By Rüdiger Kuhlmann. */
23985       #include <sys/types.h>
23986       #if HAVE_UNISTD_H
23987       # include <unistd.h>
23988       #endif
23989       /* Some systems only have a dummy stub for fork() */
23990       int main (void)
23991       {
23992         if (fork() < 0)
23993           $ac_main_return (1);
23994         $ac_main_return (0);
23995       }
23996 _ACEOF
23997 rm -f "conftest$ac_exeext"
23998 if { (eval echo "$as_me:23998: \"$ac_link\"") >&5
23999   (eval $ac_link) 2>&5
24000   ac_status=$?
24001   echo "$as_me:24001: \$? = $ac_status" >&5
24002   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24003   { (eval echo "$as_me:24003: \"$ac_try\"") >&5
24004   (eval $ac_try) 2>&5
24005   ac_status=$?
24006   echo "$as_me:24006: \$? = $ac_status" >&5
24007   (exit "$ac_status"); }; }; then
24008   ac_cv_func_fork_works=yes
24009 else
24010   echo "$as_me: program exited with status $ac_status" >&5
24011 echo "$as_me: failed program was:" >&5
24012 cat "conftest.$ac_ext" >&5
24013 ac_cv_func_fork_works=no
24014 fi
24015 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24016 fi
24017 fi
24018 echo "$as_me:24018: result: $ac_cv_func_fork_works" >&5
24019 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24020
24021 fi
24022 if test "x$ac_cv_func_fork_works" = xcross; then
24023   case $host in
24024     *-*-amigaos* | *-*-msdosdjgpp*)
24025       # Override, as these systems have only a dummy fork() stub
24026       ac_cv_func_fork_works=no
24027       ;;
24028     *)
24029       ac_cv_func_fork_works=yes
24030       ;;
24031   esac
24032   { echo "$as_me:24032: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24033 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24034 fi
24035 ac_cv_func_vfork_works=$ac_cv_func_vfork
24036 if test "x$ac_cv_func_vfork" = xyes; then
24037   echo "$as_me:24037: checking for working vfork" >&5
24038 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24039 if test "${ac_cv_func_vfork_works+set}" = set; then
24040   echo $ECHO_N "(cached) $ECHO_C" >&6
24041 else
24042   if test "$cross_compiling" = yes; then
24043   ac_cv_func_vfork_works=cross
24044 else
24045   cat >"conftest.$ac_ext" <<_ACEOF
24046 #line 24046 "configure"
24047 #include "confdefs.h"
24048 /* Thanks to Paul Eggert for this test.  */
24049 #include <stdio.h>
24050 #include <sys/types.h>
24051 #include <sys/stat.h>
24052 #if HAVE_UNISTD_H
24053 # include <unistd.h>
24054 #endif
24055 #if HAVE_VFORK_H
24056 # include <vfork.h>
24057 #endif
24058 /* On some sparc systems, changes by the child to local and incoming
24059    argument registers are propagated back to the parent.  The compiler
24060    is told about this with #include <vfork.h>, but some compilers
24061    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24062    static variable whose address is put into a register that is
24063    clobbered by the vfork.  */
24064 static
24065 #ifdef __cplusplus
24066 sparc_address_test (int arg)
24067 # else
24068 sparc_address_test (arg) int arg;
24069 #endif
24070 {
24071   static pid_t child;
24072   if (!child) {
24073     child = vfork ();
24074     if (child < 0) {
24075       perror ("vfork");
24076       _exit(2);
24077     }
24078     if (!child) {
24079       arg = getpid();
24080       write(-1, "", 0);
24081       _exit (arg);
24082     }
24083   }
24084 }
24085
24086 int
24087 main (void)
24088 {
24089   pid_t parent = getpid ();
24090   pid_t child;
24091
24092   sparc_address_test ();
24093
24094   child = vfork ();
24095
24096   if (child == 0) {
24097     /* Here is another test for sparc vfork register problems.  This
24098        test uses lots of local variables, at least as many local
24099        variables as main has allocated so far including compiler
24100        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24101        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24102        reuse the register of parent for one of the local variables,
24103        since it will think that parent can't possibly be used any more
24104        in this routine.  Assigning to the local variable will thus
24105        munge parent in the parent process.  */
24106     pid_t
24107       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24108       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24109     /* Convince the compiler that p..p7 are live; otherwise, it might
24110        use the same hardware register for all 8 local variables.  */
24111     if (p != p1 || p != p2 || p != p3 || p != p4
24112         || p != p5 || p != p6 || p != p7)
24113       _exit(1);
24114
24115     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24116        from child file descriptors.  If the child closes a descriptor
24117        before it execs or exits, this munges the parent's descriptor
24118        as well.  Test for this by closing stdout in the child.  */
24119     _exit(close(fileno(stdout)) != 0);
24120   } else {
24121     int status;
24122     struct stat st;
24123
24124     while (wait(&status) != child)
24125       ;
24126     $ac_main_return(
24127          /* Was there some problem with vforking?  */
24128          child < 0
24129
24130          /* Did the child fail?  (This shouldn't happen.)  */
24131          || status
24132
24133          /* Did the vfork/compiler bug occur?  */
24134          || parent != getpid()
24135
24136          /* Did the file descriptor bug occur?  */
24137          || fstat(fileno(stdout), &st) != 0
24138          );
24139   }
24140 }
24141 _ACEOF
24142 rm -f "conftest$ac_exeext"
24143 if { (eval echo "$as_me:24143: \"$ac_link\"") >&5
24144   (eval $ac_link) 2>&5
24145   ac_status=$?
24146   echo "$as_me:24146: \$? = $ac_status" >&5
24147   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24148   { (eval echo "$as_me:24148: \"$ac_try\"") >&5
24149   (eval $ac_try) 2>&5
24150   ac_status=$?
24151   echo "$as_me:24151: \$? = $ac_status" >&5
24152   (exit "$ac_status"); }; }; then
24153   ac_cv_func_vfork_works=yes
24154 else
24155   echo "$as_me: program exited with status $ac_status" >&5
24156 echo "$as_me: failed program was:" >&5
24157 cat "conftest.$ac_ext" >&5
24158 ac_cv_func_vfork_works=no
24159 fi
24160 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24161 fi
24162 fi
24163 echo "$as_me:24163: result: $ac_cv_func_vfork_works" >&5
24164 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24165
24166 fi;
24167 if test "x$ac_cv_func_fork_works" = xcross; then
24168   ac_cv_func_vfork_works=ac_cv_func_vfork
24169   { echo "$as_me:24169: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24170 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24171 fi
24172
24173 if test "x$ac_cv_func_vfork_works" = xyes; then
24174
24175 cat >>confdefs.h <<\EOF
24176 #define HAVE_WORKING_VFORK 1
24177 EOF
24178
24179 else
24180
24181 cat >>confdefs.h <<\EOF
24182 #define vfork fork
24183 EOF
24184
24185 fi
24186 if test "x$ac_cv_func_fork_works" = xyes; then
24187
24188 cat >>confdefs.h <<\EOF
24189 #define HAVE_WORKING_FORK 1
24190 EOF
24191
24192 fi
24193
24194 echo "$as_me:24194: checking if fopen accepts explicit binary mode" >&5
24195 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24196 if test "${cf_cv_fopen_bin_r+set}" = set; then
24197   echo $ECHO_N "(cached) $ECHO_C" >&6
24198 else
24199
24200         if test "$cross_compiling" = yes; then
24201   cf_cv_fopen_bin_r=unknown
24202 else
24203   cat >"conftest.$ac_ext" <<_ACEOF
24204 #line 24204 "configure"
24205 #include "confdefs.h"
24206
24207 $ac_includes_default
24208
24209 int main(void)
24210 {
24211         FILE *fp = fopen("conftest.tmp", "wb");
24212         int rc = 0;
24213         if (fp != 0) {
24214                 int p, q;
24215                 for (p = 0; p < 256; ++p) {
24216                         fputc(p, fp);
24217                 }
24218                 fclose(fp);
24219                 fp = fopen("conftest.tmp", "rb");
24220                 if (fp != 0) {
24221                         for (p = 0; p < 256; ++p) {
24222                                 q = fgetc(fp);
24223                                 if (q != p) {
24224                                         rc = 1;
24225                                         break;
24226                                 }
24227                         }
24228                 } else {
24229                         rc = 1;
24230                 }
24231         } else {
24232                 rc = 1;
24233         }
24234         ${cf_cv_main_return:-return} (rc);
24235 }
24236
24237 _ACEOF
24238 rm -f "conftest$ac_exeext"
24239 if { (eval echo "$as_me:24239: \"$ac_link\"") >&5
24240   (eval $ac_link) 2>&5
24241   ac_status=$?
24242   echo "$as_me:24242: \$? = $ac_status" >&5
24243   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24244   { (eval echo "$as_me:24244: \"$ac_try\"") >&5
24245   (eval $ac_try) 2>&5
24246   ac_status=$?
24247   echo "$as_me:24247: \$? = $ac_status" >&5
24248   (exit "$ac_status"); }; }; then
24249   cf_cv_fopen_bin_r=yes
24250 else
24251   echo "$as_me: program exited with status $ac_status" >&5
24252 echo "$as_me: failed program was:" >&5
24253 cat "conftest.$ac_ext" >&5
24254 cf_cv_fopen_bin_r=no
24255 fi
24256 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24257 fi
24258
24259 fi
24260 echo "$as_me:24260: result: $cf_cv_fopen_bin_r" >&5
24261 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24262 test "x$cf_cv_fopen_bin_r" != xno &&
24263 cat >>confdefs.h <<\EOF
24264 #define USE_FOPEN_BIN_R 1
24265 EOF
24266
24267 # special check for test/ditto.c
24268
24269 echo "$as_me:24269: checking for openpty in -lutil" >&5
24270 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24271 if test "${ac_cv_lib_util_openpty+set}" = set; then
24272   echo $ECHO_N "(cached) $ECHO_C" >&6
24273 else
24274   ac_check_lib_save_LIBS=$LIBS
24275 LIBS="-lutil  $LIBS"
24276 cat >"conftest.$ac_ext" <<_ACEOF
24277 #line 24277 "configure"
24278 #include "confdefs.h"
24279
24280 /* Override any gcc2 internal prototype to avoid an error.  */
24281 #ifdef __cplusplus
24282 extern "C"
24283 #endif
24284 /* We use char because int might match the return type of a gcc2
24285    builtin and then its argument prototype would still apply.  */
24286 char openpty ();
24287 int
24288 main (void)
24289 {
24290 openpty ();
24291   ;
24292   return 0;
24293 }
24294 _ACEOF
24295 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24296 if { (eval echo "$as_me:24296: \"$ac_link\"") >&5
24297   (eval $ac_link) 2>&5
24298   ac_status=$?
24299   echo "$as_me:24299: \$? = $ac_status" >&5
24300   (exit "$ac_status"); } &&
24301          { ac_try='test -s "conftest$ac_exeext"'
24302   { (eval echo "$as_me:24302: \"$ac_try\"") >&5
24303   (eval $ac_try) 2>&5
24304   ac_status=$?
24305   echo "$as_me:24305: \$? = $ac_status" >&5
24306   (exit "$ac_status"); }; }; then
24307   ac_cv_lib_util_openpty=yes
24308 else
24309   echo "$as_me: failed program was:" >&5
24310 cat "conftest.$ac_ext" >&5
24311 ac_cv_lib_util_openpty=no
24312 fi
24313 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24314 LIBS=$ac_check_lib_save_LIBS
24315 fi
24316 echo "$as_me:24316: result: $ac_cv_lib_util_openpty" >&5
24317 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24318 if test "$ac_cv_lib_util_openpty" = yes; then
24319   cf_cv_lib_util=yes
24320 else
24321   cf_cv_lib_util=no
24322 fi
24323
24324 echo "$as_me:24324: checking for openpty header" >&5
24325 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24326 if test "${cf_cv_func_openpty+set}" = set; then
24327   echo $ECHO_N "(cached) $ECHO_C" >&6
24328 else
24329
24330         cf_save_LIBS="$LIBS"
24331         test "$cf_cv_lib_util" = yes && {
24332 cf_add_libs="$LIBS"
24333 # reverse order
24334 cf_add_0lib=
24335 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24336 # filter duplicates
24337 for cf_add_1lib in $cf_add_0lib; do
24338         for cf_add_2lib in $cf_add_libs; do
24339                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24340                         cf_add_1lib=
24341                         break
24342                 fi
24343         done
24344         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24345 done
24346 LIBS="$cf_add_libs"
24347  }
24348         for cf_header in pty.h libutil.h util.h
24349         do
24350         cat >"conftest.$ac_ext" <<_ACEOF
24351 #line 24351 "configure"
24352 #include "confdefs.h"
24353
24354 #include <$cf_header>
24355
24356 int
24357 main (void)
24358 {
24359
24360         int x = openpty((int *)0, (int *)0, (char *)0,
24361                                    (struct termios *)0, (struct winsize *)0);
24362
24363   ;
24364   return 0;
24365 }
24366 _ACEOF
24367 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24368 if { (eval echo "$as_me:24368: \"$ac_link\"") >&5
24369   (eval $ac_link) 2>&5
24370   ac_status=$?
24371   echo "$as_me:24371: \$? = $ac_status" >&5
24372   (exit "$ac_status"); } &&
24373          { ac_try='test -s "conftest$ac_exeext"'
24374   { (eval echo "$as_me:24374: \"$ac_try\"") >&5
24375   (eval $ac_try) 2>&5
24376   ac_status=$?
24377   echo "$as_me:24377: \$? = $ac_status" >&5
24378   (exit "$ac_status"); }; }; then
24379
24380                 cf_cv_func_openpty=$cf_header
24381                 break
24382
24383 else
24384   echo "$as_me: failed program was:" >&5
24385 cat "conftest.$ac_ext" >&5
24386
24387                 cf_cv_func_openpty=no
24388
24389 fi
24390 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24391         done
24392         LIBS="$cf_save_LIBS"
24393
24394 fi
24395 echo "$as_me:24395: result: $cf_cv_func_openpty" >&5
24396 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24397
24398 if test "$cf_cv_func_openpty" != no ; then
24399
24400 cat >>confdefs.h <<EOF
24401 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24402 EOF
24403
24404 cat >>confdefs.h <<\EOF
24405 #define USE_XTERM_PTY 1
24406 EOF
24407
24408         if test "x$cf_cv_lib_util" = xyes ; then
24409
24410 cf_add_libs="$TEST_LIBS"
24411 # reverse order
24412 cf_add_0lib=
24413 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24414 # filter duplicates
24415 for cf_add_1lib in $cf_add_0lib; do
24416         for cf_add_2lib in $cf_add_libs; do
24417                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24418                         cf_add_1lib=
24419                         break
24420                 fi
24421         done
24422         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24423 done
24424 TEST_LIBS="$cf_add_libs"
24425
24426         fi
24427 fi
24428
24429 if test "$with_hashed_db" != no ; then
24430
24431 cat >>confdefs.h <<\EOF
24432 #define USE_HASHED_DB 1
24433 EOF
24434
24435 case $with_hashed_db in
24436 (yes|*able*)
24437         ;;
24438 (*)
24439         if test -d "$with_hashed_db" ; then
24440
24441 if test -n "$with_hashed_db/include" ; then
24442   for cf_add_incdir in $with_hashed_db/include
24443   do
24444         while test "$cf_add_incdir" != /usr/include
24445         do
24446           if test -d "$cf_add_incdir"
24447           then
24448                 cf_have_incdir=no
24449                 if test -n "$CFLAGS$CPPFLAGS" ; then
24450                   # a loop is needed to ensure we can add subdirs of existing dirs
24451                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24452                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24453                           cf_have_incdir=yes; break
24454                         fi
24455                   done
24456                 fi
24457
24458                 if test "$cf_have_incdir" = no ; then
24459                   if test "$cf_add_incdir" = /usr/local/include ; then
24460                         if test "$GCC" = yes
24461                         then
24462                           cf_save_CPPFLAGS=$CPPFLAGS
24463
24464         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24465         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24466
24467                           cat >"conftest.$ac_ext" <<_ACEOF
24468 #line 24468 "configure"
24469 #include "confdefs.h"
24470 #include <stdio.h>
24471 int
24472 main (void)
24473 {
24474 printf("Hello")
24475   ;
24476   return 0;
24477 }
24478 _ACEOF
24479 rm -f "conftest.$ac_objext"
24480 if { (eval echo "$as_me:24480: \"$ac_compile\"") >&5
24481   (eval $ac_compile) 2>&5
24482   ac_status=$?
24483   echo "$as_me:24483: \$? = $ac_status" >&5
24484   (exit "$ac_status"); } &&
24485          { ac_try='test -s "conftest.$ac_objext"'
24486   { (eval echo "$as_me:24486: \"$ac_try\"") >&5
24487   (eval $ac_try) 2>&5
24488   ac_status=$?
24489   echo "$as_me:24489: \$? = $ac_status" >&5
24490   (exit "$ac_status"); }; }; then
24491   :
24492 else
24493   echo "$as_me: failed program was:" >&5
24494 cat "conftest.$ac_ext" >&5
24495 cf_have_incdir=yes
24496 fi
24497 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24498                           CPPFLAGS=$cf_save_CPPFLAGS
24499                         fi
24500                   fi
24501                 fi
24502
24503                 if test "$cf_have_incdir" = no ; then
24504                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24505
24506 echo "${as_me:-configure}:24506: testing adding $cf_add_incdir to include-path ..." 1>&5
24507
24508                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24509
24510                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24511                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24512                   cf_add_incdir="$cf_top_incdir"
24513                 else
24514                   break
24515                 fi
24516           else
24517                 break
24518           fi
24519         done
24520   done
24521 fi
24522
24523 if test -n "$with_hashed_db/lib" ; then
24524         for cf_add_libdir in $with_hashed_db/lib
24525         do
24526                 if test "$cf_add_libdir" = /usr/lib ; then
24527                         :
24528                 elif test -d "$cf_add_libdir"
24529                 then
24530                         cf_have_libdir=no
24531                         if test -n "$LDFLAGS$LIBS" ; then
24532                                 # a loop is needed to ensure we can add subdirs of existing dirs
24533                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24534                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24535                                                 cf_have_libdir=yes; break
24536                                         fi
24537                                 done
24538                         fi
24539                         if test "$cf_have_libdir" = no ; then
24540                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24541
24542 echo "${as_me:-configure}:24542: testing adding $cf_add_libdir to library-path ..." 1>&5
24543
24544                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24545                         fi
24546                 fi
24547         done
24548 fi
24549
24550         else
24551                 case "$with_hashed_db" in
24552                 (./*|../*|/*)
24553                         { echo "$as_me:24553: WARNING: no such directory $with_hashed_db" >&5
24554 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24555                         ;;
24556                 (*)
24557
24558 cf_search=
24559
24560 test "x$prefix" != "xNONE" && \
24561 test -d "$prefix" && \
24562  {
24563         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24564         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24565         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24566         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24567         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24568         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24569 }
24570
24571 for cf_subdir_prefix in \
24572         /usr \
24573         /usr/local \
24574         /usr/pkg \
24575         /opt \
24576         /opt/local \
24577         $HOME
24578 do
24579
24580 test "x$cf_subdir_prefix" != "x$prefix" && \
24581 test -d "$cf_subdir_prefix" && \
24582 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24583         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24584         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24585         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24586         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24587         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24588         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"
24589 }
24590
24591 done
24592
24593         for cf_item in $cf_search
24594         do
24595                 case "$cf_item" in
24596                 (*/$with_hashed_db)
24597
24598 if test -n "$cf_item" ; then
24599   for cf_add_incdir in $cf_item
24600   do
24601         while test "$cf_add_incdir" != /usr/include
24602         do
24603           if test -d "$cf_add_incdir"
24604           then
24605                 cf_have_incdir=no
24606                 if test -n "$CFLAGS$CPPFLAGS" ; then
24607                   # a loop is needed to ensure we can add subdirs of existing dirs
24608                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24609                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24610                           cf_have_incdir=yes; break
24611                         fi
24612                   done
24613                 fi
24614
24615                 if test "$cf_have_incdir" = no ; then
24616                   if test "$cf_add_incdir" = /usr/local/include ; then
24617                         if test "$GCC" = yes
24618                         then
24619                           cf_save_CPPFLAGS=$CPPFLAGS
24620
24621         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24622         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24623
24624                           cat >"conftest.$ac_ext" <<_ACEOF
24625 #line 24625 "configure"
24626 #include "confdefs.h"
24627 #include <stdio.h>
24628 int
24629 main (void)
24630 {
24631 printf("Hello")
24632   ;
24633   return 0;
24634 }
24635 _ACEOF
24636 rm -f "conftest.$ac_objext"
24637 if { (eval echo "$as_me:24637: \"$ac_compile\"") >&5
24638   (eval $ac_compile) 2>&5
24639   ac_status=$?
24640   echo "$as_me:24640: \$? = $ac_status" >&5
24641   (exit "$ac_status"); } &&
24642          { ac_try='test -s "conftest.$ac_objext"'
24643   { (eval echo "$as_me:24643: \"$ac_try\"") >&5
24644   (eval $ac_try) 2>&5
24645   ac_status=$?
24646   echo "$as_me:24646: \$? = $ac_status" >&5
24647   (exit "$ac_status"); }; }; then
24648   :
24649 else
24650   echo "$as_me: failed program was:" >&5
24651 cat "conftest.$ac_ext" >&5
24652 cf_have_incdir=yes
24653 fi
24654 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24655                           CPPFLAGS=$cf_save_CPPFLAGS
24656                         fi
24657                   fi
24658                 fi
24659
24660                 if test "$cf_have_incdir" = no ; then
24661                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24662
24663 echo "${as_me:-configure}:24663: testing adding $cf_add_incdir to include-path ..." 1>&5
24664
24665                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24666
24667                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24668                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24669                   cf_add_incdir="$cf_top_incdir"
24670                 else
24671                   break
24672                 fi
24673           else
24674                 break
24675           fi
24676         done
24677   done
24678 fi
24679
24680                         ;;
24681                 esac
24682         done
24683
24684 cf_search=
24685
24686 test "x$prefix" != "xNONE" && \
24687 test -d "$prefix" && \
24688  {
24689         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24690         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24691         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24692         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24693         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24694         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24695 }
24696
24697 for cf_subdir_prefix in \
24698         /usr \
24699         /usr/local \
24700         /usr/pkg \
24701         /opt \
24702         /opt/local \
24703         $HOME
24704 do
24705
24706 test "x$cf_subdir_prefix" != "x$prefix" && \
24707 test -d "$cf_subdir_prefix" && \
24708 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24709         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24710         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24711         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24712         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24713         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24714         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"
24715 }
24716
24717 done
24718
24719         for cf_item in $cf_search
24720         do
24721                 case "$cf_item" in
24722                 (*/$with_hashed_db)
24723
24724 if test -n "$cf_item" ; then
24725         for cf_add_libdir in $cf_item
24726         do
24727                 if test "$cf_add_libdir" = /usr/lib ; then
24728                         :
24729                 elif test -d "$cf_add_libdir"
24730                 then
24731                         cf_have_libdir=no
24732                         if test -n "$LDFLAGS$LIBS" ; then
24733                                 # a loop is needed to ensure we can add subdirs of existing dirs
24734                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24735                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24736                                                 cf_have_libdir=yes; break
24737                                         fi
24738                                 done
24739                         fi
24740                         if test "$cf_have_libdir" = no ; then
24741                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24742
24743 echo "${as_me:-configure}:24743: testing adding $cf_add_libdir to library-path ..." 1>&5
24744
24745                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24746                         fi
24747                 fi
24748         done
24749 fi
24750
24751                         ;;
24752                 esac
24753         done
24754
24755                         ;;
24756                 esac
24757         fi
24758 esac
24759
24760 echo "$as_me:24760: checking for db.h" >&5
24761 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24762 if test "${ac_cv_header_db_h+set}" = set; then
24763   echo $ECHO_N "(cached) $ECHO_C" >&6
24764 else
24765   cat >"conftest.$ac_ext" <<_ACEOF
24766 #line 24766 "configure"
24767 #include "confdefs.h"
24768 #include <db.h>
24769 _ACEOF
24770 if { (eval echo "$as_me:24770: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24771   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24772   ac_status=$?
24773   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24774   rm -f conftest.er1
24775   cat conftest.err >&5
24776   echo "$as_me:24776: \$? = $ac_status" >&5
24777   (exit "$ac_status"); } >/dev/null; then
24778   if test -s conftest.err; then
24779     ac_cpp_err=$ac_c_preproc_warn_flag
24780   else
24781     ac_cpp_err=
24782   fi
24783 else
24784   ac_cpp_err=yes
24785 fi
24786 if test -z "$ac_cpp_err"; then
24787   ac_cv_header_db_h=yes
24788 else
24789   echo "$as_me: failed program was:" >&5
24790   cat "conftest.$ac_ext" >&5
24791   ac_cv_header_db_h=no
24792 fi
24793 rm -f conftest.err "conftest.$ac_ext"
24794 fi
24795 echo "$as_me:24795: result: $ac_cv_header_db_h" >&5
24796 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24797 if test "$ac_cv_header_db_h" = yes; then
24798
24799 echo "$as_me:24799: checking for version of db" >&5
24800 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24801 if test "${cf_cv_hashed_db_version+set}" = set; then
24802   echo $ECHO_N "(cached) $ECHO_C" >&6
24803 else
24804
24805 cf_cv_hashed_db_version=unknown
24806
24807 for cf_db_version in 1 2 3 4 5 6
24808 do
24809
24810 echo "${as_me:-configure}:24810: testing checking for db version $cf_db_version ..." 1>&5
24811
24812         cat >"conftest.$ac_ext" <<_ACEOF
24813 #line 24813 "configure"
24814 #include "confdefs.h"
24815
24816 $ac_includes_default
24817 #include <db.h>
24818
24819 #ifdef DB_VERSION_MAJOR
24820         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24821 #if $cf_db_version == DB_VERSION_MAJOR
24822         /* ok */
24823 #else
24824         #error $cf_db_version is not DB_VERSION_MAJOR
24825 #endif
24826 #else
24827 #if $cf_db_version == 1
24828         /* ok: assuming this is DB 1.8.5 */
24829 #else
24830         #error $cf_db_version is not 1
24831 #endif
24832 #endif
24833
24834 int
24835 main (void)
24836 {
24837 DBT *foo = 0
24838   ;
24839   return 0;
24840 }
24841 _ACEOF
24842 rm -f "conftest.$ac_objext"
24843 if { (eval echo "$as_me:24843: \"$ac_compile\"") >&5
24844   (eval $ac_compile) 2>&5
24845   ac_status=$?
24846   echo "$as_me:24846: \$? = $ac_status" >&5
24847   (exit "$ac_status"); } &&
24848          { ac_try='test -s "conftest.$ac_objext"'
24849   { (eval echo "$as_me:24849: \"$ac_try\"") >&5
24850   (eval $ac_try) 2>&5
24851   ac_status=$?
24852   echo "$as_me:24852: \$? = $ac_status" >&5
24853   (exit "$ac_status"); }; }; then
24854
24855         cf_cv_hashed_db_version=$cf_db_version
24856         break
24857
24858 else
24859   echo "$as_me: failed program was:" >&5
24860 cat "conftest.$ac_ext" >&5
24861 fi
24862 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24863 done
24864
24865 fi
24866 echo "$as_me:24866: result: $cf_cv_hashed_db_version" >&5
24867 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24868
24869 if test "$cf_cv_hashed_db_version" = unknown ; then
24870         { { echo "$as_me:24870: error: Cannot determine version of db" >&5
24871 echo "$as_me: error: Cannot determine version of db" >&2;}
24872    { (exit 1); exit 1; }; }
24873 else
24874
24875 echo "$as_me:24875: checking for db libraries" >&5
24876 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24877 if test "${cf_cv_hashed_db_libs+set}" = set; then
24878   echo $ECHO_N "(cached) $ECHO_C" >&6
24879 else
24880
24881 cf_cv_hashed_db_libs=unknown
24882 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24883 do
24884         cf_save_libs="$LIBS"
24885         if test -n "$cf_db_libs"; then
24886
24887 cf_add_libs="$LIBS"
24888 # reverse order
24889 cf_add_0lib=
24890 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24891 # filter duplicates
24892 for cf_add_1lib in $cf_add_0lib; do
24893         for cf_add_2lib in $cf_add_libs; do
24894                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24895                         cf_add_1lib=
24896                         break
24897                 fi
24898         done
24899         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24900 done
24901 LIBS="$cf_add_libs"
24902
24903         fi
24904
24905 echo "${as_me:-configure}:24905: testing checking for library $cf_db_libs ..." 1>&5
24906
24907         cat >"conftest.$ac_ext" <<_ACEOF
24908 #line 24908 "configure"
24909 #include "confdefs.h"
24910
24911 $ac_includes_default
24912 #include <db.h>
24913
24914 int
24915 main (void)
24916 {
24917
24918         char *path = "/tmp/foo";
24919 #ifdef DB_VERSION_MAJOR
24920 #if DB_VERSION_MAJOR >= 4
24921         DB *result = 0;
24922         db_create(&result, NULL, 0);
24923         result->open(result,
24924                 NULL,
24925                 path,
24926                 path,
24927                 DB_HASH,
24928                 DB_CREATE,
24929                 0644);
24930 #elif DB_VERSION_MAJOR >= 3
24931         DB *result = 0;
24932         db_create(&result, NULL, 0);
24933         result->open(result,
24934                 path,
24935                 path,
24936                 DB_HASH,
24937                 DB_CREATE,
24938                 0644);
24939 #elif DB_VERSION_MAJOR >= 2
24940         DB *result = 0;
24941         db_open(path,
24942                 DB_HASH,
24943                 DB_CREATE,
24944                 0644,
24945                 (DB_ENV *) 0,
24946                 (DB_INFO *) 0,
24947                 &result);
24948 #endif /* DB_VERSION_MAJOR */
24949 #else
24950         DB *result = dbopen(path,
24951                      2,
24952                      0644,
24953                      DB_HASH,
24954                      0);
24955 #endif
24956         ${cf_cv_main_return:-return}(result != 0)
24957
24958   ;
24959   return 0;
24960 }
24961 _ACEOF
24962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24963 if { (eval echo "$as_me:24963: \"$ac_link\"") >&5
24964   (eval $ac_link) 2>&5
24965   ac_status=$?
24966   echo "$as_me:24966: \$? = $ac_status" >&5
24967   (exit "$ac_status"); } &&
24968          { ac_try='test -s "conftest$ac_exeext"'
24969   { (eval echo "$as_me:24969: \"$ac_try\"") >&5
24970   (eval $ac_try) 2>&5
24971   ac_status=$?
24972   echo "$as_me:24972: \$? = $ac_status" >&5
24973   (exit "$ac_status"); }; }; then
24974
24975         if test -n "$cf_db_libs" ; then
24976                 cf_cv_hashed_db_libs=$cf_db_libs
24977         else
24978                 cf_cv_hashed_db_libs=default
24979         fi
24980         LIBS="$cf_save_libs"
24981         break
24982
24983 else
24984   echo "$as_me: failed program was:" >&5
24985 cat "conftest.$ac_ext" >&5
24986 fi
24987 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24988         LIBS="$cf_save_libs"
24989 done
24990
24991 fi
24992 echo "$as_me:24992: result: $cf_cv_hashed_db_libs" >&5
24993 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24994
24995         if test "$cf_cv_hashed_db_libs" = unknown ; then
24996                 { { echo "$as_me:24996: error: Cannot determine library for db" >&5
24997 echo "$as_me: error: Cannot determine library for db" >&2;}
24998    { (exit 1); exit 1; }; }
24999         elif test "$cf_cv_hashed_db_libs" != default ; then
25000
25001 cf_add_libs="$LIBS"
25002 # reverse order
25003 cf_add_0lib=
25004 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25005 # filter duplicates
25006 for cf_add_1lib in $cf_add_0lib; do
25007         for cf_add_2lib in $cf_add_libs; do
25008                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25009                         cf_add_1lib=
25010                         break
25011                 fi
25012         done
25013         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25014 done
25015 LIBS="$cf_add_libs"
25016
25017         fi
25018 fi
25019
25020 else
25021
25022         { { echo "$as_me:25022: error: Cannot find db.h" >&5
25023 echo "$as_me: error: Cannot find db.h" >&2;}
25024    { (exit 1); exit 1; }; }
25025
25026 fi
25027
25028 fi
25029
25030 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25031         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25032         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25033 fi
25034
25035 # Just in case, check if the C compiler has a bool type.
25036
25037 echo "$as_me:25037: checking if we should include stdbool.h" >&5
25038 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25039
25040 if test "${cf_cv_header_stdbool_h+set}" = set; then
25041   echo $ECHO_N "(cached) $ECHO_C" >&6
25042 else
25043
25044         cat >"conftest.$ac_ext" <<_ACEOF
25045 #line 25045 "configure"
25046 #include "confdefs.h"
25047
25048 int
25049 main (void)
25050 {
25051 bool foo = false
25052   ;
25053   return 0;
25054 }
25055 _ACEOF
25056 rm -f "conftest.$ac_objext"
25057 if { (eval echo "$as_me:25057: \"$ac_compile\"") >&5
25058   (eval $ac_compile) 2>&5
25059   ac_status=$?
25060   echo "$as_me:25060: \$? = $ac_status" >&5
25061   (exit "$ac_status"); } &&
25062          { ac_try='test -s "conftest.$ac_objext"'
25063   { (eval echo "$as_me:25063: \"$ac_try\"") >&5
25064   (eval $ac_try) 2>&5
25065   ac_status=$?
25066   echo "$as_me:25066: \$? = $ac_status" >&5
25067   (exit "$ac_status"); }; }; then
25068   cf_cv_header_stdbool_h=0
25069 else
25070   echo "$as_me: failed program was:" >&5
25071 cat "conftest.$ac_ext" >&5
25072 cat >"conftest.$ac_ext" <<_ACEOF
25073 #line 25073 "configure"
25074 #include "confdefs.h"
25075
25076 #ifndef __BEOS__
25077 #include <stdbool.h>
25078 #endif
25079
25080 int
25081 main (void)
25082 {
25083 bool foo = false
25084   ;
25085   return 0;
25086 }
25087 _ACEOF
25088 rm -f "conftest.$ac_objext"
25089 if { (eval echo "$as_me:25089: \"$ac_compile\"") >&5
25090   (eval $ac_compile) 2>&5
25091   ac_status=$?
25092   echo "$as_me:25092: \$? = $ac_status" >&5
25093   (exit "$ac_status"); } &&
25094          { ac_try='test -s "conftest.$ac_objext"'
25095   { (eval echo "$as_me:25095: \"$ac_try\"") >&5
25096   (eval $ac_try) 2>&5
25097   ac_status=$?
25098   echo "$as_me:25098: \$? = $ac_status" >&5
25099   (exit "$ac_status"); }; }; then
25100   cf_cv_header_stdbool_h=1
25101 else
25102   echo "$as_me: failed program was:" >&5
25103 cat "conftest.$ac_ext" >&5
25104 cf_cv_header_stdbool_h=0
25105 fi
25106 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25107 fi
25108 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25109 fi
25110
25111 if test "$cf_cv_header_stdbool_h" = 1
25112 then    echo "$as_me:25112: result: yes" >&5
25113 echo "${ECHO_T}yes" >&6
25114 else    echo "$as_me:25114: result: no" >&5
25115 echo "${ECHO_T}no" >&6
25116 fi
25117
25118 echo "$as_me:25118: checking for builtin bool type" >&5
25119 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25120
25121 if test "${cf_cv_cc_bool_type+set}" = set; then
25122   echo $ECHO_N "(cached) $ECHO_C" >&6
25123 else
25124
25125         cat >"conftest.$ac_ext" <<_ACEOF
25126 #line 25126 "configure"
25127 #include "confdefs.h"
25128
25129 #include <stdio.h>
25130 #include <sys/types.h>
25131
25132 int
25133 main (void)
25134 {
25135 bool x = false
25136   ;
25137   return 0;
25138 }
25139 _ACEOF
25140 rm -f "conftest.$ac_objext"
25141 if { (eval echo "$as_me:25141: \"$ac_compile\"") >&5
25142   (eval $ac_compile) 2>&5
25143   ac_status=$?
25144   echo "$as_me:25144: \$? = $ac_status" >&5
25145   (exit "$ac_status"); } &&
25146          { ac_try='test -s "conftest.$ac_objext"'
25147   { (eval echo "$as_me:25147: \"$ac_try\"") >&5
25148   (eval $ac_try) 2>&5
25149   ac_status=$?
25150   echo "$as_me:25150: \$? = $ac_status" >&5
25151   (exit "$ac_status"); }; }; then
25152   cf_cv_cc_bool_type=1
25153 else
25154   echo "$as_me: failed program was:" >&5
25155 cat "conftest.$ac_ext" >&5
25156 cf_cv_cc_bool_type=0
25157 fi
25158 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25159
25160 fi
25161
25162 if test "$cf_cv_cc_bool_type" = 1
25163 then    echo "$as_me:25163: result: yes" >&5
25164 echo "${ECHO_T}yes" >&6
25165 else    echo "$as_me:25165: result: no" >&5
25166 echo "${ECHO_T}no" >&6
25167 fi
25168
25169 # Check for C++ compiler characteristics (and ensure that it's there!)
25170 if test -n "$CXX" ; then
25171         ac_ext=cc
25172 ac_cpp='$CXXCPP $CPPFLAGS'
25173 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25174 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25175 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25176 ac_main_return="return"
25177
25178 if test -n "$GXX" ; then
25179
25180         cf_save="$LIBS"
25181         LIBS="$LIBS $CXXLIBS"
25182         echo "$as_me:25182: checking if we already have C++ library" >&5
25183 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25184         cat >"conftest.$ac_ext" <<_ACEOF
25185 #line 25185 "configure"
25186 #include "confdefs.h"
25187
25188                         #include <iostream>
25189 int
25190 main (void)
25191 {
25192
25193                         std::cout << "Hello World!" << std::endl;
25194   ;
25195   return 0;
25196 }
25197 _ACEOF
25198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25199 if { (eval echo "$as_me:25199: \"$ac_link\"") >&5
25200   (eval $ac_link) 2>&5
25201   ac_status=$?
25202   echo "$as_me:25202: \$? = $ac_status" >&5
25203   (exit "$ac_status"); } &&
25204          { ac_try='test -s "conftest$ac_exeext"'
25205   { (eval echo "$as_me:25205: \"$ac_try\"") >&5
25206   (eval $ac_try) 2>&5
25207   ac_status=$?
25208   echo "$as_me:25208: \$? = $ac_status" >&5
25209   (exit "$ac_status"); }; }; then
25210   cf_have_libstdcpp=yes
25211 else
25212   echo "$as_me: failed program was:" >&5
25213 cat "conftest.$ac_ext" >&5
25214 cf_have_libstdcpp=no
25215 fi
25216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25217         echo "$as_me:25217: result: $cf_have_libstdcpp" >&5
25218 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25219         LIBS="$cf_save"
25220
25221         if test "$cf_have_libstdcpp" != yes
25222         then
25223                 case "$cf_cv_system_name" in
25224                 (os2*)
25225                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25226                                 cf_stdcpp_libname=stdcpp
25227                         else
25228                                 cf_stdcpp_libname=stdc++
25229                         fi
25230                         ;;
25231                 (*)
25232                         cf_stdcpp_libname=stdc++
25233                         ;;
25234                 esac
25235
25236                 echo "$as_me:25236: checking for library $cf_stdcpp_libname" >&5
25237 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25238 if test "${cf_cv_libstdcpp+set}" = set; then
25239   echo $ECHO_N "(cached) $ECHO_C" >&6
25240 else
25241
25242                         cf_save="$LIBS"
25243                         LIBS="$LIBS $CXXLIBS"
25244
25245 cf_add_libs="$LIBS"
25246 # reverse order
25247 cf_add_0lib=
25248 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25249 # filter duplicates
25250 for cf_add_1lib in $cf_add_0lib; do
25251         for cf_add_2lib in $cf_add_libs; do
25252                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25253                         cf_add_1lib=
25254                         break
25255                 fi
25256         done
25257         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25258 done
25259 LIBS="$cf_add_libs"
25260
25261                 cat >"conftest.$ac_ext" <<_ACEOF
25262 #line 25262 "configure"
25263 #include "confdefs.h"
25264
25265                                 #include <iostream>
25266 int
25267 main (void)
25268 {
25269
25270                                 std::cout << "Hello World!" << std::endl;
25271   ;
25272   return 0;
25273 }
25274 _ACEOF
25275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25276 if { (eval echo "$as_me:25276: \"$ac_link\"") >&5
25277   (eval $ac_link) 2>&5
25278   ac_status=$?
25279   echo "$as_me:25279: \$? = $ac_status" >&5
25280   (exit "$ac_status"); } &&
25281          { ac_try='test -s "conftest$ac_exeext"'
25282   { (eval echo "$as_me:25282: \"$ac_try\"") >&5
25283   (eval $ac_try) 2>&5
25284   ac_status=$?
25285   echo "$as_me:25285: \$? = $ac_status" >&5
25286   (exit "$ac_status"); }; }; then
25287   cf_cv_libstdcpp=yes
25288 else
25289   echo "$as_me: failed program was:" >&5
25290 cat "conftest.$ac_ext" >&5
25291 cf_cv_libstdcpp=no
25292 fi
25293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25294                         LIBS="$cf_save"
25295
25296 fi
25297 echo "$as_me:25297: result: $cf_cv_libstdcpp" >&5
25298 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25299                 test "$cf_cv_libstdcpp" = yes && {
25300 cf_add_libs="$CXXLIBS"
25301 # reverse order
25302 cf_add_0lib=
25303 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25304 # filter duplicates
25305 for cf_add_1lib in $cf_add_0lib; do
25306         for cf_add_2lib in $cf_add_libs; do
25307                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25308                         cf_add_1lib=
25309                         break
25310                 fi
25311         done
25312         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25313 done
25314 CXXLIBS="$cf_add_libs"
25315  }
25316         fi
25317 fi
25318
25319         echo "$as_me:25319: checking whether $CXX understands -c and -o together" >&5
25320 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25321 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25322   echo $ECHO_N "(cached) $ECHO_C" >&6
25323 else
25324
25325 cat > conftest.$ac_ext <<CF_EOF
25326 int main(void)
25327 {
25328         ${cf_cv_main_return:-return}(0);
25329 }
25330 CF_EOF
25331 # We do the test twice because some compilers refuse to overwrite an
25332 # existing .o file with -o, though they will create one.
25333 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25334 if { (eval echo "$as_me:25334: \"$ac_try\"") >&5
25335   (eval $ac_try) 2>&5
25336   ac_status=$?
25337   echo "$as_me:25337: \$? = $ac_status" >&5
25338   (exit "$ac_status"); } &&
25339   test -f conftest2.$ac_objext && { (eval echo "$as_me:25339: \"$ac_try\"") >&5
25340   (eval $ac_try) 2>&5
25341   ac_status=$?
25342   echo "$as_me:25342: \$? = $ac_status" >&5
25343   (exit "$ac_status"); };
25344 then
25345   eval cf_cv_prog_CXX_c_o=yes
25346 else
25347   eval cf_cv_prog_CXX_c_o=no
25348 fi
25349 rm -rf ./conftest*
25350
25351 fi
25352 if test "$cf_cv_prog_CXX_c_o" = yes; then
25353   echo "$as_me:25353: result: yes" >&5
25354 echo "${ECHO_T}yes" >&6
25355 else
25356   echo "$as_me:25356: result: no" >&5
25357 echo "${ECHO_T}no" >&6
25358 fi
25359
25360         case "$GXX_VERSION" in
25361         (1.*|2.[0-6]*|[1-9][0-9].*)
25362                 cf_cxx_library=yes
25363                 ;;
25364         (*-2.7*|2.7*)
25365
25366 cf_cxx_library=unknown
25367 case "$cf_cv_system_name" in
25368 (os2*)
25369         cf_gpp_libname=gpp
25370         ;;
25371 (*)
25372         cf_gpp_libname=g++
25373         ;;
25374 esac
25375 if test "$GXX" = yes; then
25376         echo "$as_me:25376: checking for lib$cf_gpp_libname" >&5
25377 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25378         cf_save="$LIBS"
25379
25380 cf_add_libs="$LIBS"
25381 # reverse order
25382 cf_add_0lib=
25383 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25384 # filter duplicates
25385 for cf_add_1lib in $cf_add_0lib; do
25386         for cf_add_2lib in $cf_add_libs; do
25387                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25388                         cf_add_1lib=
25389                         break
25390                 fi
25391         done
25392         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25393 done
25394 LIBS="$cf_add_libs"
25395
25396         cat >"conftest.$ac_ext" <<_ACEOF
25397 #line 25397 "configure"
25398 #include "confdefs.h"
25399
25400 #include <$cf_gpp_libname/builtin.h>
25401
25402 int
25403 main (void)
25404 {
25405 two_arg_error_handler_t foo2 = lib_error_handler
25406   ;
25407   return 0;
25408 }
25409 _ACEOF
25410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25411 if { (eval echo "$as_me:25411: \"$ac_link\"") >&5
25412   (eval $ac_link) 2>&5
25413   ac_status=$?
25414   echo "$as_me:25414: \$? = $ac_status" >&5
25415   (exit "$ac_status"); } &&
25416          { ac_try='test -s "conftest$ac_exeext"'
25417   { (eval echo "$as_me:25417: \"$ac_try\"") >&5
25418   (eval $ac_try) 2>&5
25419   ac_status=$?
25420   echo "$as_me:25420: \$? = $ac_status" >&5
25421   (exit "$ac_status"); }; }; then
25422   cf_cxx_library=yes
25423
25424 cf_add_libs="$CXXLIBS"
25425 # reverse order
25426 cf_add_0lib=
25427 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25428 # filter duplicates
25429 for cf_add_1lib in $cf_add_0lib; do
25430         for cf_add_2lib in $cf_add_libs; do
25431                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25432                         cf_add_1lib=
25433                         break
25434                 fi
25435         done
25436         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25437 done
25438 CXXLIBS="$cf_add_libs"
25439
25440          if test "$cf_gpp_libname" = cpp ; then
25441
25442 cat >>confdefs.h <<\EOF
25443 #define HAVE_GPP_BUILTIN_H 1
25444 EOF
25445
25446          else
25447
25448 cat >>confdefs.h <<\EOF
25449 #define HAVE_GXX_BUILTIN_H 1
25450 EOF
25451
25452          fi
25453 else
25454   echo "$as_me: failed program was:" >&5
25455 cat "conftest.$ac_ext" >&5
25456 cat >"conftest.$ac_ext" <<_ACEOF
25457 #line 25457 "configure"
25458 #include "confdefs.h"
25459
25460 #include <builtin.h>
25461
25462 int
25463 main (void)
25464 {
25465 two_arg_error_handler_t foo2 = lib_error_handler
25466   ;
25467   return 0;
25468 }
25469 _ACEOF
25470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25471 if { (eval echo "$as_me:25471: \"$ac_link\"") >&5
25472   (eval $ac_link) 2>&5
25473   ac_status=$?
25474   echo "$as_me:25474: \$? = $ac_status" >&5
25475   (exit "$ac_status"); } &&
25476          { ac_try='test -s "conftest$ac_exeext"'
25477   { (eval echo "$as_me:25477: \"$ac_try\"") >&5
25478   (eval $ac_try) 2>&5
25479   ac_status=$?
25480   echo "$as_me:25480: \$? = $ac_status" >&5
25481   (exit "$ac_status"); }; }; then
25482   cf_cxx_library=yes
25483
25484 cf_add_libs="$CXXLIBS"
25485 # reverse order
25486 cf_add_0lib=
25487 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25488 # filter duplicates
25489 for cf_add_1lib in $cf_add_0lib; do
25490         for cf_add_2lib in $cf_add_libs; do
25491                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25492                         cf_add_1lib=
25493                         break
25494                 fi
25495         done
25496         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25497 done
25498 CXXLIBS="$cf_add_libs"
25499
25500 cat >>confdefs.h <<\EOF
25501 #define HAVE_BUILTIN_H 1
25502 EOF
25503
25504 else
25505   echo "$as_me: failed program was:" >&5
25506 cat "conftest.$ac_ext" >&5
25507 cf_cxx_library=no
25508 fi
25509 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25510 fi
25511 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25512         LIBS="$cf_save"
25513         echo "$as_me:25513: result: $cf_cxx_library" >&5
25514 echo "${ECHO_T}$cf_cxx_library" >&6
25515 fi
25516
25517                 ;;
25518         (*)
25519                 cf_cxx_library=no
25520                 ;;
25521         esac
25522
25523         ac_ext=cc
25524 ac_cpp='$CXXCPP $CPPFLAGS'
25525 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25526 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25527 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25528 ac_main_return="return"
25529 echo "$as_me:25529: checking how to run the C++ preprocessor" >&5
25530 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25531 if test -z "$CXXCPP"; then
25532   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25533   echo $ECHO_N "(cached) $ECHO_C" >&6
25534 else
25535       # Double quotes because CXXCPP needs to be expanded
25536     for CXXCPP in "$CXX -E" "/lib/cpp"
25537     do
25538       ac_preproc_ok=false
25539 for ac_cxx_preproc_warn_flag in '' yes
25540 do
25541   # Use a header file that comes with gcc, so configuring glibc
25542   # with a fresh cross-compiler works.
25543   # On the NeXT, cc -E runs the code through the compiler's parser,
25544   # not just through cpp. "Syntax error" is here to catch this case.
25545   cat >"conftest.$ac_ext" <<_ACEOF
25546 #line 25546 "configure"
25547 #include "confdefs.h"
25548 #include <assert.h>
25549                      Syntax error
25550 _ACEOF
25551 if { (eval echo "$as_me:25551: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25552   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25553   ac_status=$?
25554   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25555   rm -f conftest.er1
25556   cat conftest.err >&5
25557   echo "$as_me:25557: \$? = $ac_status" >&5
25558   (exit "$ac_status"); } >/dev/null; then
25559   if test -s conftest.err; then
25560     ac_cpp_err=$ac_cxx_preproc_warn_flag
25561   else
25562     ac_cpp_err=
25563   fi
25564 else
25565   ac_cpp_err=yes
25566 fi
25567 if test -z "$ac_cpp_err"; then
25568   :
25569 else
25570   echo "$as_me: failed program was:" >&5
25571   cat "conftest.$ac_ext" >&5
25572   # Broken: fails on valid input.
25573 continue
25574 fi
25575 rm -f conftest.err "conftest.$ac_ext"
25576
25577   # OK, works on sane cases.  Now check whether non-existent headers
25578   # can be detected and how.
25579   cat >"conftest.$ac_ext" <<_ACEOF
25580 #line 25580 "configure"
25581 #include "confdefs.h"
25582 #include <ac_nonexistent.h>
25583 _ACEOF
25584 if { (eval echo "$as_me:25584: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25585   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25586   ac_status=$?
25587   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25588   rm -f conftest.er1
25589   cat conftest.err >&5
25590   echo "$as_me:25590: \$? = $ac_status" >&5
25591   (exit "$ac_status"); } >/dev/null; then
25592   if test -s conftest.err; then
25593     ac_cpp_err=$ac_cxx_preproc_warn_flag
25594   else
25595     ac_cpp_err=
25596   fi
25597 else
25598   ac_cpp_err=yes
25599 fi
25600 if test -z "$ac_cpp_err"; then
25601   # Broken: success on invalid input.
25602 continue
25603 else
25604   echo "$as_me: failed program was:" >&5
25605   cat "conftest.$ac_ext" >&5
25606   # Passes both tests.
25607 ac_preproc_ok=:
25608 break
25609 fi
25610 rm -f conftest.err "conftest.$ac_ext"
25611
25612 done
25613 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25614 rm -f conftest.err "conftest.$ac_ext"
25615 if $ac_preproc_ok; then
25616   break
25617 fi
25618
25619     done
25620     ac_cv_prog_CXXCPP=$CXXCPP
25621
25622 fi
25623   CXXCPP=$ac_cv_prog_CXXCPP
25624 else
25625   ac_cv_prog_CXXCPP=$CXXCPP
25626 fi
25627 echo "$as_me:25627: result: $CXXCPP" >&5
25628 echo "${ECHO_T}$CXXCPP" >&6
25629 ac_preproc_ok=false
25630 for ac_cxx_preproc_warn_flag in '' yes
25631 do
25632   # Use a header file that comes with gcc, so configuring glibc
25633   # with a fresh cross-compiler works.
25634   # On the NeXT, cc -E runs the code through the compiler's parser,
25635   # not just through cpp. "Syntax error" is here to catch this case.
25636   cat >"conftest.$ac_ext" <<_ACEOF
25637 #line 25637 "configure"
25638 #include "confdefs.h"
25639 #include <assert.h>
25640                      Syntax error
25641 _ACEOF
25642 if { (eval echo "$as_me:25642: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25643   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25644   ac_status=$?
25645   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25646   rm -f conftest.er1
25647   cat conftest.err >&5
25648   echo "$as_me:25648: \$? = $ac_status" >&5
25649   (exit "$ac_status"); } >/dev/null; then
25650   if test -s conftest.err; then
25651     ac_cpp_err=$ac_cxx_preproc_warn_flag
25652   else
25653     ac_cpp_err=
25654   fi
25655 else
25656   ac_cpp_err=yes
25657 fi
25658 if test -z "$ac_cpp_err"; then
25659   :
25660 else
25661   echo "$as_me: failed program was:" >&5
25662   cat "conftest.$ac_ext" >&5
25663   # Broken: fails on valid input.
25664 continue
25665 fi
25666 rm -f conftest.err "conftest.$ac_ext"
25667
25668   # OK, works on sane cases.  Now check whether non-existent headers
25669   # can be detected and how.
25670   cat >"conftest.$ac_ext" <<_ACEOF
25671 #line 25671 "configure"
25672 #include "confdefs.h"
25673 #include <ac_nonexistent.h>
25674 _ACEOF
25675 if { (eval echo "$as_me:25675: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25676   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25677   ac_status=$?
25678   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25679   rm -f conftest.er1
25680   cat conftest.err >&5
25681   echo "$as_me:25681: \$? = $ac_status" >&5
25682   (exit "$ac_status"); } >/dev/null; then
25683   if test -s conftest.err; then
25684     ac_cpp_err=$ac_cxx_preproc_warn_flag
25685   else
25686     ac_cpp_err=
25687   fi
25688 else
25689   ac_cpp_err=yes
25690 fi
25691 if test -z "$ac_cpp_err"; then
25692   # Broken: success on invalid input.
25693 continue
25694 else
25695   echo "$as_me: failed program was:" >&5
25696   cat "conftest.$ac_ext" >&5
25697   # Passes both tests.
25698 ac_preproc_ok=:
25699 break
25700 fi
25701 rm -f conftest.err "conftest.$ac_ext"
25702
25703 done
25704 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25705 rm -f conftest.err "conftest.$ac_ext"
25706 if $ac_preproc_ok; then
25707   :
25708 else
25709   { { echo "$as_me:25709: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25710 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25711    { (exit 1); exit 1; }; }
25712 fi
25713
25714 ac_ext=cc
25715 ac_cpp='$CXXCPP $CPPFLAGS'
25716 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25717 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25718 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25719 ac_main_return="return"
25720
25721 for ac_header in typeinfo
25722 do
25723 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25724 echo "$as_me:25724: checking for $ac_header" >&5
25725 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25726 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25727   echo $ECHO_N "(cached) $ECHO_C" >&6
25728 else
25729   cat >"conftest.$ac_ext" <<_ACEOF
25730 #line 25730 "configure"
25731 #include "confdefs.h"
25732 #include <$ac_header>
25733 _ACEOF
25734 if { (eval echo "$as_me:25734: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25735   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25736   ac_status=$?
25737   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25738   rm -f conftest.er1
25739   cat conftest.err >&5
25740   echo "$as_me:25740: \$? = $ac_status" >&5
25741   (exit "$ac_status"); } >/dev/null; then
25742   if test -s conftest.err; then
25743     ac_cpp_err=$ac_cxx_preproc_warn_flag
25744   else
25745     ac_cpp_err=
25746   fi
25747 else
25748   ac_cpp_err=yes
25749 fi
25750 if test -z "$ac_cpp_err"; then
25751   eval "$as_ac_Header=yes"
25752 else
25753   echo "$as_me: failed program was:" >&5
25754   cat "conftest.$ac_ext" >&5
25755   eval "$as_ac_Header=no"
25756 fi
25757 rm -f conftest.err "conftest.$ac_ext"
25758 fi
25759 echo "$as_me:25759: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25760 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25761 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25762   cat >>confdefs.h <<EOF
25763 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25764 EOF
25765
25766 fi
25767 done
25768
25769 for ac_header in iostream
25770 do
25771 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25772 echo "$as_me:25772: checking for $ac_header" >&5
25773 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25774 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25775   echo $ECHO_N "(cached) $ECHO_C" >&6
25776 else
25777   cat >"conftest.$ac_ext" <<_ACEOF
25778 #line 25778 "configure"
25779 #include "confdefs.h"
25780 #include <$ac_header>
25781 _ACEOF
25782 if { (eval echo "$as_me:25782: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25783   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25784   ac_status=$?
25785   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25786   rm -f conftest.er1
25787   cat conftest.err >&5
25788   echo "$as_me:25788: \$? = $ac_status" >&5
25789   (exit "$ac_status"); } >/dev/null; then
25790   if test -s conftest.err; then
25791     ac_cpp_err=$ac_cxx_preproc_warn_flag
25792   else
25793     ac_cpp_err=
25794   fi
25795 else
25796   ac_cpp_err=yes
25797 fi
25798 if test -z "$ac_cpp_err"; then
25799   eval "$as_ac_Header=yes"
25800 else
25801   echo "$as_me: failed program was:" >&5
25802   cat "conftest.$ac_ext" >&5
25803   eval "$as_ac_Header=no"
25804 fi
25805 rm -f conftest.err "conftest.$ac_ext"
25806 fi
25807 echo "$as_me:25807: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25808 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25809 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25810   cat >>confdefs.h <<EOF
25811 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25812 EOF
25813
25814 fi
25815 done
25816
25817 if test x"$ac_cv_header_iostream" = xyes ; then
25818         echo "$as_me:25818: checking if iostream uses std-namespace" >&5
25819 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25820         cat >"conftest.$ac_ext" <<_ACEOF
25821 #line 25821 "configure"
25822 #include "confdefs.h"
25823
25824 #include <iostream>
25825 using std::endl;
25826 using std::cerr;
25827 int
25828 main (void)
25829 {
25830
25831 cerr << "testing" << endl;
25832
25833   ;
25834   return 0;
25835 }
25836 _ACEOF
25837 rm -f "conftest.$ac_objext"
25838 if { (eval echo "$as_me:25838: \"$ac_compile\"") >&5
25839   (eval $ac_compile) 2>&5
25840   ac_status=$?
25841   echo "$as_me:25841: \$? = $ac_status" >&5
25842   (exit "$ac_status"); } &&
25843          { ac_try='test -s "conftest.$ac_objext"'
25844   { (eval echo "$as_me:25844: \"$ac_try\"") >&5
25845   (eval $ac_try) 2>&5
25846   ac_status=$?
25847   echo "$as_me:25847: \$? = $ac_status" >&5
25848   (exit "$ac_status"); }; }; then
25849   cf_iostream_namespace=yes
25850 else
25851   echo "$as_me: failed program was:" >&5
25852 cat "conftest.$ac_ext" >&5
25853 cf_iostream_namespace=no
25854 fi
25855 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25856         echo "$as_me:25856: result: $cf_iostream_namespace" >&5
25857 echo "${ECHO_T}$cf_iostream_namespace" >&6
25858         if test "$cf_iostream_namespace" = yes ; then
25859
25860 cat >>confdefs.h <<\EOF
25861 #define IOSTREAM_NAMESPACE 1
25862 EOF
25863
25864         fi
25865 fi
25866
25867 echo "$as_me:25867: checking if we should include stdbool.h" >&5
25868 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25869
25870 if test "${cf_cv_header_stdbool_h+set}" = set; then
25871   echo $ECHO_N "(cached) $ECHO_C" >&6
25872 else
25873
25874         cat >"conftest.$ac_ext" <<_ACEOF
25875 #line 25875 "configure"
25876 #include "confdefs.h"
25877
25878 int
25879 main (void)
25880 {
25881 bool foo = false
25882   ;
25883   return 0;
25884 }
25885 _ACEOF
25886 rm -f "conftest.$ac_objext"
25887 if { (eval echo "$as_me:25887: \"$ac_compile\"") >&5
25888   (eval $ac_compile) 2>&5
25889   ac_status=$?
25890   echo "$as_me:25890: \$? = $ac_status" >&5
25891   (exit "$ac_status"); } &&
25892          { ac_try='test -s "conftest.$ac_objext"'
25893   { (eval echo "$as_me:25893: \"$ac_try\"") >&5
25894   (eval $ac_try) 2>&5
25895   ac_status=$?
25896   echo "$as_me:25896: \$? = $ac_status" >&5
25897   (exit "$ac_status"); }; }; then
25898   cf_cv_header_stdbool_h=0
25899 else
25900   echo "$as_me: failed program was:" >&5
25901 cat "conftest.$ac_ext" >&5
25902 cat >"conftest.$ac_ext" <<_ACEOF
25903 #line 25903 "configure"
25904 #include "confdefs.h"
25905
25906 #ifndef __BEOS__
25907 #include <stdbool.h>
25908 #endif
25909
25910 int
25911 main (void)
25912 {
25913 bool foo = false
25914   ;
25915   return 0;
25916 }
25917 _ACEOF
25918 rm -f "conftest.$ac_objext"
25919 if { (eval echo "$as_me:25919: \"$ac_compile\"") >&5
25920   (eval $ac_compile) 2>&5
25921   ac_status=$?
25922   echo "$as_me:25922: \$? = $ac_status" >&5
25923   (exit "$ac_status"); } &&
25924          { ac_try='test -s "conftest.$ac_objext"'
25925   { (eval echo "$as_me:25925: \"$ac_try\"") >&5
25926   (eval $ac_try) 2>&5
25927   ac_status=$?
25928   echo "$as_me:25928: \$? = $ac_status" >&5
25929   (exit "$ac_status"); }; }; then
25930   cf_cv_header_stdbool_h=1
25931 else
25932   echo "$as_me: failed program was:" >&5
25933 cat "conftest.$ac_ext" >&5
25934 cf_cv_header_stdbool_h=0
25935 fi
25936 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25937 fi
25938 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25939 fi
25940
25941 if test "$cf_cv_header_stdbool_h" = 1
25942 then    echo "$as_me:25942: result: yes" >&5
25943 echo "${ECHO_T}yes" >&6
25944 else    echo "$as_me:25944: result: no" >&5
25945 echo "${ECHO_T}no" >&6
25946 fi
25947
25948 echo "$as_me:25948: checking for builtin bool type" >&5
25949 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25950
25951 if test "${cf_cv_builtin_bool+set}" = set; then
25952   echo $ECHO_N "(cached) $ECHO_C" >&6
25953 else
25954
25955         cat >"conftest.$ac_ext" <<_ACEOF
25956 #line 25956 "configure"
25957 #include "confdefs.h"
25958
25959 #include <stdio.h>
25960 #include <sys/types.h>
25961
25962 int
25963 main (void)
25964 {
25965 bool x = false
25966   ;
25967   return 0;
25968 }
25969 _ACEOF
25970 rm -f "conftest.$ac_objext"
25971 if { (eval echo "$as_me:25971: \"$ac_compile\"") >&5
25972   (eval $ac_compile) 2>&5
25973   ac_status=$?
25974   echo "$as_me:25974: \$? = $ac_status" >&5
25975   (exit "$ac_status"); } &&
25976          { ac_try='test -s "conftest.$ac_objext"'
25977   { (eval echo "$as_me:25977: \"$ac_try\"") >&5
25978   (eval $ac_try) 2>&5
25979   ac_status=$?
25980   echo "$as_me:25980: \$? = $ac_status" >&5
25981   (exit "$ac_status"); }; }; then
25982   cf_cv_builtin_bool=1
25983 else
25984   echo "$as_me: failed program was:" >&5
25985 cat "conftest.$ac_ext" >&5
25986 cf_cv_builtin_bool=0
25987 fi
25988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25989
25990 fi
25991
25992 if test "$cf_cv_builtin_bool" = 1
25993 then    echo "$as_me:25993: result: yes" >&5
25994 echo "${ECHO_T}yes" >&6
25995 else    echo "$as_me:25995: result: no" >&5
25996 echo "${ECHO_T}no" >&6
25997 fi
25998
25999 echo "$as_me:25999: checking for bool" >&5
26000 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26001 if test "${ac_cv_type_bool+set}" = set; then
26002   echo $ECHO_N "(cached) $ECHO_C" >&6
26003 else
26004   cat >"conftest.$ac_ext" <<_ACEOF
26005 #line 26005 "configure"
26006 #include "confdefs.h"
26007
26008 $ac_includes_default
26009
26010 #if defined(__cplusplus)
26011
26012 #ifdef HAVE_GXX_BUILTIN_H
26013 #include <g++/builtin.h>
26014 #elif HAVE_GPP_BUILTIN_H
26015 #include <gpp/builtin.h>
26016 #elif HAVE_BUILTIN_H
26017 #include <builtin.h>
26018 #endif
26019
26020 #else
26021
26022 #if $cf_cv_header_stdbool_h
26023 #include <stdbool.h>
26024 #endif
26025
26026 #endif
26027
26028 int
26029 main (void)
26030 {
26031 if ((bool *) 0)
26032   return 0;
26033 if (sizeof (bool))
26034   return 0;
26035   ;
26036   return 0;
26037 }
26038 _ACEOF
26039 rm -f "conftest.$ac_objext"
26040 if { (eval echo "$as_me:26040: \"$ac_compile\"") >&5
26041   (eval $ac_compile) 2>&5
26042   ac_status=$?
26043   echo "$as_me:26043: \$? = $ac_status" >&5
26044   (exit "$ac_status"); } &&
26045          { ac_try='test -s "conftest.$ac_objext"'
26046   { (eval echo "$as_me:26046: \"$ac_try\"") >&5
26047   (eval $ac_try) 2>&5
26048   ac_status=$?
26049   echo "$as_me:26049: \$? = $ac_status" >&5
26050   (exit "$ac_status"); }; }; then
26051   ac_cv_type_bool=yes
26052 else
26053   echo "$as_me: failed program was:" >&5
26054 cat "conftest.$ac_ext" >&5
26055 ac_cv_type_bool=no
26056 fi
26057 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26058 fi
26059 echo "$as_me:26059: result: $ac_cv_type_bool" >&5
26060 echo "${ECHO_T}$ac_cv_type_bool" >&6
26061
26062 echo "$as_me:26062: checking size of bool" >&5
26063 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26064 if test "${ac_cv_sizeof_bool+set}" = set; then
26065   echo $ECHO_N "(cached) $ECHO_C" >&6
26066 else
26067   if test "$ac_cv_type_bool" = yes; then
26068   if test "$cross_compiling" = yes; then
26069   # Depending upon the size, compute the lo and hi bounds.
26070 cat >"conftest.$ac_ext" <<_ACEOF
26071 #line 26071 "configure"
26072 #include "confdefs.h"
26073
26074 $ac_includes_default
26075
26076 #if defined(__cplusplus)
26077
26078 #ifdef HAVE_GXX_BUILTIN_H
26079 #include <g++/builtin.h>
26080 #elif HAVE_GPP_BUILTIN_H
26081 #include <gpp/builtin.h>
26082 #elif HAVE_BUILTIN_H
26083 #include <builtin.h>
26084 #endif
26085
26086 #else
26087
26088 #if $cf_cv_header_stdbool_h
26089 #include <stdbool.h>
26090 #endif
26091
26092 #endif
26093
26094 int
26095 main (void)
26096 {
26097 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26098   ;
26099   return 0;
26100 }
26101 _ACEOF
26102 rm -f "conftest.$ac_objext"
26103 if { (eval echo "$as_me:26103: \"$ac_compile\"") >&5
26104   (eval $ac_compile) 2>&5
26105   ac_status=$?
26106   echo "$as_me:26106: \$? = $ac_status" >&5
26107   (exit "$ac_status"); } &&
26108          { ac_try='test -s "conftest.$ac_objext"'
26109   { (eval echo "$as_me:26109: \"$ac_try\"") >&5
26110   (eval $ac_try) 2>&5
26111   ac_status=$?
26112   echo "$as_me:26112: \$? = $ac_status" >&5
26113   (exit "$ac_status"); }; }; then
26114   ac_lo=0 ac_mid=0
26115   while :; do
26116     cat >"conftest.$ac_ext" <<_ACEOF
26117 #line 26117 "configure"
26118 #include "confdefs.h"
26119
26120 $ac_includes_default
26121
26122 #if defined(__cplusplus)
26123
26124 #ifdef HAVE_GXX_BUILTIN_H
26125 #include <g++/builtin.h>
26126 #elif HAVE_GPP_BUILTIN_H
26127 #include <gpp/builtin.h>
26128 #elif HAVE_BUILTIN_H
26129 #include <builtin.h>
26130 #endif
26131
26132 #else
26133
26134 #if $cf_cv_header_stdbool_h
26135 #include <stdbool.h>
26136 #endif
26137
26138 #endif
26139
26140 int
26141 main (void)
26142 {
26143 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26144   ;
26145   return 0;
26146 }
26147 _ACEOF
26148 rm -f "conftest.$ac_objext"
26149 if { (eval echo "$as_me:26149: \"$ac_compile\"") >&5
26150   (eval $ac_compile) 2>&5
26151   ac_status=$?
26152   echo "$as_me:26152: \$? = $ac_status" >&5
26153   (exit "$ac_status"); } &&
26154          { ac_try='test -s "conftest.$ac_objext"'
26155   { (eval echo "$as_me:26155: \"$ac_try\"") >&5
26156   (eval $ac_try) 2>&5
26157   ac_status=$?
26158   echo "$as_me:26158: \$? = $ac_status" >&5
26159   (exit "$ac_status"); }; }; then
26160   ac_hi=$ac_mid; break
26161 else
26162   echo "$as_me: failed program was:" >&5
26163 cat "conftest.$ac_ext" >&5
26164 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26165 fi
26166 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26167   done
26168 else
26169   echo "$as_me: failed program was:" >&5
26170 cat "conftest.$ac_ext" >&5
26171 ac_hi=-1 ac_mid=-1
26172   while :; do
26173     cat >"conftest.$ac_ext" <<_ACEOF
26174 #line 26174 "configure"
26175 #include "confdefs.h"
26176
26177 $ac_includes_default
26178
26179 #if defined(__cplusplus)
26180
26181 #ifdef HAVE_GXX_BUILTIN_H
26182 #include <g++/builtin.h>
26183 #elif HAVE_GPP_BUILTIN_H
26184 #include <gpp/builtin.h>
26185 #elif HAVE_BUILTIN_H
26186 #include <builtin.h>
26187 #endif
26188
26189 #else
26190
26191 #if $cf_cv_header_stdbool_h
26192 #include <stdbool.h>
26193 #endif
26194
26195 #endif
26196
26197 int
26198 main (void)
26199 {
26200 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26201   ;
26202   return 0;
26203 }
26204 _ACEOF
26205 rm -f "conftest.$ac_objext"
26206 if { (eval echo "$as_me:26206: \"$ac_compile\"") >&5
26207   (eval $ac_compile) 2>&5
26208   ac_status=$?
26209   echo "$as_me:26209: \$? = $ac_status" >&5
26210   (exit "$ac_status"); } &&
26211          { ac_try='test -s "conftest.$ac_objext"'
26212   { (eval echo "$as_me:26212: \"$ac_try\"") >&5
26213   (eval $ac_try) 2>&5
26214   ac_status=$?
26215   echo "$as_me:26215: \$? = $ac_status" >&5
26216   (exit "$ac_status"); }; }; then
26217   ac_lo=$ac_mid; break
26218 else
26219   echo "$as_me: failed program was:" >&5
26220 cat "conftest.$ac_ext" >&5
26221 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26222 fi
26223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26224   done
26225 fi
26226 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26227 # Binary search between lo and hi bounds.
26228 while test "x$ac_lo" != "x$ac_hi"; do
26229   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26230   cat >"conftest.$ac_ext" <<_ACEOF
26231 #line 26231 "configure"
26232 #include "confdefs.h"
26233
26234 $ac_includes_default
26235
26236 #if defined(__cplusplus)
26237
26238 #ifdef HAVE_GXX_BUILTIN_H
26239 #include <g++/builtin.h>
26240 #elif HAVE_GPP_BUILTIN_H
26241 #include <gpp/builtin.h>
26242 #elif HAVE_BUILTIN_H
26243 #include <builtin.h>
26244 #endif
26245
26246 #else
26247
26248 #if $cf_cv_header_stdbool_h
26249 #include <stdbool.h>
26250 #endif
26251
26252 #endif
26253
26254 int
26255 main (void)
26256 {
26257 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26258   ;
26259   return 0;
26260 }
26261 _ACEOF
26262 rm -f "conftest.$ac_objext"
26263 if { (eval echo "$as_me:26263: \"$ac_compile\"") >&5
26264   (eval $ac_compile) 2>&5
26265   ac_status=$?
26266   echo "$as_me:26266: \$? = $ac_status" >&5
26267   (exit "$ac_status"); } &&
26268          { ac_try='test -s "conftest.$ac_objext"'
26269   { (eval echo "$as_me:26269: \"$ac_try\"") >&5
26270   (eval $ac_try) 2>&5
26271   ac_status=$?
26272   echo "$as_me:26272: \$? = $ac_status" >&5
26273   (exit "$ac_status"); }; }; then
26274   ac_hi=$ac_mid
26275 else
26276   echo "$as_me: failed program was:" >&5
26277 cat "conftest.$ac_ext" >&5
26278 ac_lo=`expr "$ac_mid" + 1`
26279 fi
26280 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26281 done
26282 ac_cv_sizeof_bool=$ac_lo
26283 else
26284   if test "$cross_compiling" = yes; then
26285   { { echo "$as_me:26285: error: cannot run test program while cross compiling" >&5
26286 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26287    { (exit 1); exit 1; }; }
26288 else
26289   cat >"conftest.$ac_ext" <<_ACEOF
26290 #line 26290 "configure"
26291 #include "confdefs.h"
26292
26293 $ac_includes_default
26294
26295 #if defined(__cplusplus)
26296
26297 #ifdef HAVE_GXX_BUILTIN_H
26298 #include <g++/builtin.h>
26299 #elif HAVE_GPP_BUILTIN_H
26300 #include <gpp/builtin.h>
26301 #elif HAVE_BUILTIN_H
26302 #include <builtin.h>
26303 #endif
26304
26305 #else
26306
26307 #if $cf_cv_header_stdbool_h
26308 #include <stdbool.h>
26309 #endif
26310
26311 #endif
26312
26313 int
26314 main (void)
26315 {
26316 FILE *f = fopen ("conftest.val", "w");
26317 if (!f)
26318   $ac_main_return (1);
26319 fprintf (f, "%ld", (long)(sizeof (bool)));
26320 fclose (f);
26321   ;
26322   return 0;
26323 }
26324 _ACEOF
26325 rm -f "conftest$ac_exeext"
26326 if { (eval echo "$as_me:26326: \"$ac_link\"") >&5
26327   (eval $ac_link) 2>&5
26328   ac_status=$?
26329   echo "$as_me:26329: \$? = $ac_status" >&5
26330   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26331   { (eval echo "$as_me:26331: \"$ac_try\"") >&5
26332   (eval $ac_try) 2>&5
26333   ac_status=$?
26334   echo "$as_me:26334: \$? = $ac_status" >&5
26335   (exit "$ac_status"); }; }; then
26336   ac_cv_sizeof_bool=`cat conftest.val`
26337 else
26338   echo "$as_me: program exited with status $ac_status" >&5
26339 echo "$as_me: failed program was:" >&5
26340 cat "conftest.$ac_ext" >&5
26341 fi
26342 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26343 fi
26344 fi
26345 rm -f conftest.val
26346 else
26347   ac_cv_sizeof_bool=0
26348 fi
26349 fi
26350 echo "$as_me:26350: result: $ac_cv_sizeof_bool" >&5
26351 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26352 cat >>confdefs.h <<EOF
26353 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26354 EOF
26355
26356 echo "$as_me:26356: checking for type of bool" >&5
26357 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26358 if test "${cf_cv_type_of_bool+set}" = set; then
26359   echo $ECHO_N "(cached) $ECHO_C" >&6
26360 else
26361
26362         rm -f cf_test.out
26363         if test "$cross_compiling" = yes; then
26364
26365                 case x$ac_cv_sizeof_bool in
26366                 (x1) cf_cv_type_of_bool="unsigned char";;
26367                 (x2) cf_cv_type_of_bool="unsigned short";;
26368                 (x4) cf_cv_type_of_bool="unsigned int";;
26369                 (x8) cf_cv_type_of_bool="unsigned long";;
26370                 (*)  cf_cv_type_of_bool=unknown;;
26371                 esac
26372
26373 else
26374   cat >"conftest.$ac_ext" <<_ACEOF
26375 #line 26375 "configure"
26376 #include "confdefs.h"
26377
26378 $ac_includes_default
26379
26380 #if defined(__cplusplus)
26381
26382 #ifdef HAVE_GXX_BUILTIN_H
26383 #include <g++/builtin.h>
26384 #elif HAVE_GPP_BUILTIN_H
26385 #include <gpp/builtin.h>
26386 #elif HAVE_BUILTIN_H
26387 #include <builtin.h>
26388 #endif
26389
26390 #else
26391
26392 #if $cf_cv_header_stdbool_h
26393 #include <stdbool.h>
26394 #endif
26395
26396 #endif
26397
26398 int main(void)
26399 {
26400         FILE *fp = fopen("cf_test.out", "w");
26401         if (fp != 0) {
26402                 bool x = true;
26403                 if ((bool)(-x) >= 0)
26404                         fputs("unsigned ", fp);
26405                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26406                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26407                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26408                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26409                 fclose(fp);
26410         }
26411         ${cf_cv_main_return:-return}(0);
26412 }
26413
26414 _ACEOF
26415 rm -f "conftest$ac_exeext"
26416 if { (eval echo "$as_me:26416: \"$ac_link\"") >&5
26417   (eval $ac_link) 2>&5
26418   ac_status=$?
26419   echo "$as_me:26419: \$? = $ac_status" >&5
26420   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26421   { (eval echo "$as_me:26421: \"$ac_try\"") >&5
26422   (eval $ac_try) 2>&5
26423   ac_status=$?
26424   echo "$as_me:26424: \$? = $ac_status" >&5
26425   (exit "$ac_status"); }; }; then
26426   cf_cv_type_of_bool=`cat cf_test.out`
26427                  if test -z "$cf_cv_type_of_bool"; then
26428                    cf_cv_type_of_bool=unknown
26429                  fi
26430 else
26431   echo "$as_me: program exited with status $ac_status" >&5
26432 echo "$as_me: failed program was:" >&5
26433 cat "conftest.$ac_ext" >&5
26434 cf_cv_type_of_bool=unknown
26435 fi
26436 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26437 fi
26438         rm -f cf_test.out
26439
26440 fi
26441 echo "$as_me:26441: result: $cf_cv_type_of_bool" >&5
26442 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26443
26444 if test "$cf_cv_type_of_bool" = unknown ; then
26445         case .$NCURSES_BOOL in
26446         (.auto|.) NCURSES_BOOL=unsigned;;
26447         esac
26448         { echo "$as_me:26448: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26449 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26450         cf_cv_type_of_bool=$NCURSES_BOOL
26451 fi
26452
26453 echo "$as_me:26453: checking for special defines needed for etip.h" >&5
26454 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26455 cf_save_CXXFLAGS="$CXXFLAGS"
26456 cf_result="none"
26457
26458 # etip.h includes ncurses.h which includes ncurses_dll.h
26459 # But ncurses_dll.h is generated - fix here.
26460 test -d include || mkdir include
26461 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
26462
26463 for cf_math in "" MATH_H
26464 do
26465 for cf_excp in "" MATH_EXCEPTION
26466 do
26467         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26468         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26469         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26470 cat >"conftest.$ac_ext" <<_ACEOF
26471 #line 26471 "configure"
26472 #include "confdefs.h"
26473
26474 #include <etip.h.in>
26475
26476 int
26477 main (void)
26478 {
26479
26480   ;
26481   return 0;
26482 }
26483 _ACEOF
26484 rm -f "conftest.$ac_objext"
26485 if { (eval echo "$as_me:26485: \"$ac_compile\"") >&5
26486   (eval $ac_compile) 2>&5
26487   ac_status=$?
26488   echo "$as_me:26488: \$? = $ac_status" >&5
26489   (exit "$ac_status"); } &&
26490          { ac_try='test -s "conftest.$ac_objext"'
26491   { (eval echo "$as_me:26491: \"$ac_try\"") >&5
26492   (eval $ac_try) 2>&5
26493   ac_status=$?
26494   echo "$as_me:26494: \$? = $ac_status" >&5
26495   (exit "$ac_status"); }; }; then
26496
26497         test -n "$cf_math" && cat >>confdefs.h <<EOF
26498 #define ETIP_NEEDS_${cf_math} 1
26499 EOF
26500
26501         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26502 #define ETIP_NEEDS_${cf_excp} 1
26503 EOF
26504
26505         cf_result="$cf_math $cf_excp"
26506         break 2
26507
26508 else
26509   echo "$as_me: failed program was:" >&5
26510 cat "conftest.$ac_ext" >&5
26511 fi
26512 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26513 done
26514 done
26515 echo "$as_me:26515: result: $cf_result" >&5
26516 echo "${ECHO_T}$cf_result" >&6
26517 CXXFLAGS="$cf_save_CXXFLAGS"
26518
26519 if test -n "$CXX"; then
26520 echo "$as_me:26520: checking if $CXX accepts override keyword" >&5
26521 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26522 if test "${cf_cv_cpp_override+set}" = set; then
26523   echo $ECHO_N "(cached) $ECHO_C" >&6
26524 else
26525
26526         ac_ext=cc
26527 ac_cpp='$CXXCPP $CPPFLAGS'
26528 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26529 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26530 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26531 ac_main_return="return"
26532
26533         if test "$cross_compiling" = yes; then
26534   cf_cv_cpp_override=unknown
26535 else
26536   cat >"conftest.$ac_ext" <<_ACEOF
26537 #line 26537 "configure"
26538 #include "confdefs.h"
26539
26540 class base
26541 {
26542 public:
26543         virtual int foo(float x) = 0;
26544 };
26545
26546 class derived: public base
26547 {
26548 public:
26549         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26550 };
26551
26552 int main(void) { }
26553
26554 _ACEOF
26555 rm -f "conftest$ac_exeext"
26556 if { (eval echo "$as_me:26556: \"$ac_link\"") >&5
26557   (eval $ac_link) 2>&5
26558   ac_status=$?
26559   echo "$as_me:26559: \$? = $ac_status" >&5
26560   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26561   { (eval echo "$as_me:26561: \"$ac_try\"") >&5
26562   (eval $ac_try) 2>&5
26563   ac_status=$?
26564   echo "$as_me:26564: \$? = $ac_status" >&5
26565   (exit "$ac_status"); }; }; then
26566   cf_cv_cpp_override=yes
26567 else
26568   echo "$as_me: program exited with status $ac_status" >&5
26569 echo "$as_me: failed program was:" >&5
26570 cat "conftest.$ac_ext" >&5
26571 cf_cv_cpp_override=no
26572 fi
26573 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26574 fi
26575         ac_ext=cc
26576 ac_cpp='$CXXCPP $CPPFLAGS'
26577 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26578 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26579 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26580 ac_main_return="return"
26581
26582 fi
26583 echo "$as_me:26583: result: $cf_cv_cpp_override" >&5
26584 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26585 fi
26586 test "$cf_cv_cpp_override" = yes &&
26587 cat >>confdefs.h <<\EOF
26588 #define CPP_HAS_OVERRIDE 1
26589 EOF
26590
26591 if test -n "$CXX"; then
26592 echo "$as_me:26592: checking if $CXX accepts parameter initialization" >&5
26593 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26594 if test "${cf_cv_cpp_param_init+set}" = set; then
26595   echo $ECHO_N "(cached) $ECHO_C" >&6
26596 else
26597
26598         ac_ext=cc
26599 ac_cpp='$CXXCPP $CPPFLAGS'
26600 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26601 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26602 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26603 ac_main_return="return"
26604
26605         if test "$cross_compiling" = yes; then
26606   cf_cv_cpp_param_init=unknown
26607 else
26608   cat >"conftest.$ac_ext" <<_ACEOF
26609 #line 26609 "configure"
26610 #include "confdefs.h"
26611
26612 class TEST {
26613 private:
26614         int value;
26615 public:
26616         TEST(int x = 1);
26617         ~TEST();
26618 };
26619
26620 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26621 {
26622         value = x;
26623 }
26624 int main(void) { }
26625
26626 _ACEOF
26627 rm -f "conftest$ac_exeext"
26628 if { (eval echo "$as_me:26628: \"$ac_link\"") >&5
26629   (eval $ac_link) 2>&5
26630   ac_status=$?
26631   echo "$as_me:26631: \$? = $ac_status" >&5
26632   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26633   { (eval echo "$as_me:26633: \"$ac_try\"") >&5
26634   (eval $ac_try) 2>&5
26635   ac_status=$?
26636   echo "$as_me:26636: \$? = $ac_status" >&5
26637   (exit "$ac_status"); }; }; then
26638   cf_cv_cpp_param_init=yes
26639 else
26640   echo "$as_me: program exited with status $ac_status" >&5
26641 echo "$as_me: failed program was:" >&5
26642 cat "conftest.$ac_ext" >&5
26643 cf_cv_cpp_param_init=no
26644 fi
26645 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26646 fi
26647         ac_ext=cc
26648 ac_cpp='$CXXCPP $CPPFLAGS'
26649 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26650 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26651 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26652 ac_main_return="return"
26653
26654 fi
26655 echo "$as_me:26655: result: $cf_cv_cpp_param_init" >&5
26656 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26657 fi
26658 test "$cf_cv_cpp_param_init" = yes &&
26659 cat >>confdefs.h <<\EOF
26660 #define CPP_HAS_PARAM_INIT 1
26661 EOF
26662
26663 if test -n "$CXX"; then
26664
26665 echo "$as_me:26665: checking if $CXX accepts static_cast" >&5
26666 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26667 if test "${cf_cv_cpp_static_cast+set}" = set; then
26668   echo $ECHO_N "(cached) $ECHO_C" >&6
26669 else
26670
26671         ac_ext=cc
26672 ac_cpp='$CXXCPP $CPPFLAGS'
26673 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26674 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26675 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26676 ac_main_return="return"
26677
26678         cat >"conftest.$ac_ext" <<_ACEOF
26679 #line 26679 "configure"
26680 #include "confdefs.h"
26681
26682 class NCursesPanel
26683 {
26684 public:
26685   NCursesPanel(int nlines,
26686                int ncols,
26687                int begin_y = 0,
26688                int begin_x = 0)
26689   {
26690   }
26691   NCursesPanel();
26692   ~NCursesPanel();
26693 };
26694
26695 template<class T> class NCursesUserPanel : public NCursesPanel
26696 {
26697 public:
26698   NCursesUserPanel (int nlines,
26699                     int ncols,
26700                     int begin_y = 0,
26701                     int begin_x = 0,
26702                     const T* p_UserData = static_cast<T*>(0))
26703     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26704   {
26705   };
26706   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26707   {
26708   };
26709
26710   virtual ~NCursesUserPanel() {};
26711 };
26712
26713 int
26714 main (void)
26715 {
26716
26717         const char* p_UserData = static_cast<char*>(0)
26718   ;
26719   return 0;
26720 }
26721 _ACEOF
26722 rm -f "conftest.$ac_objext"
26723 if { (eval echo "$as_me:26723: \"$ac_compile\"") >&5
26724   (eval $ac_compile) 2>&5
26725   ac_status=$?
26726   echo "$as_me:26726: \$? = $ac_status" >&5
26727   (exit "$ac_status"); } &&
26728          { ac_try='test -s "conftest.$ac_objext"'
26729   { (eval echo "$as_me:26729: \"$ac_try\"") >&5
26730   (eval $ac_try) 2>&5
26731   ac_status=$?
26732   echo "$as_me:26732: \$? = $ac_status" >&5
26733   (exit "$ac_status"); }; }; then
26734   cf_cv_cpp_static_cast=yes
26735 else
26736   echo "$as_me: failed program was:" >&5
26737 cat "conftest.$ac_ext" >&5
26738 cf_cv_cpp_static_cast=no
26739 fi
26740 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26741
26742         ac_ext=cc
26743 ac_cpp='$CXXCPP $CPPFLAGS'
26744 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26745 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26746 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26747 ac_main_return="return"
26748
26749 fi
26750 echo "$as_me:26750: result: $cf_cv_cpp_static_cast" >&5
26751 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26752
26753 fi
26754
26755 test "$cf_cv_cpp_static_cast" = yes &&
26756 cat >>confdefs.h <<\EOF
26757 #define CPP_HAS_STATIC_CAST 1
26758 EOF
26759
26760         CXX_AR='$(AR)'
26761         CXX_ARFLAGS='$(ARFLAGS)'
26762         case "$cf_cv_system_name" in
26763         (irix*)
26764             if test "$GXX" != yes ; then
26765                 CXX_AR='$(CXX)'
26766                 CXX_ARFLAGS='-ar -o'
26767             fi
26768             ;;
26769         (sco3.2v5*)
26770             CXXLDFLAGS="-u main"
26771             ;;
26772         (solaris2*)
26773             if test "$GXX" != yes ; then
26774                 CXX_AR='$(CXX)'
26775                 CXX_ARFLAGS='-xar -o'
26776             fi
26777             ;;
26778         esac
26779
26780 else
26781         cf_cxx_library=no
26782         cf_cv_builtin_bool=1
26783
26784         # Just because we are not configuring against C++ right now does not
26785         # mean that a user will not want to use C++.  Some distributors disable
26786         # the C++ portion of this configuration as a shortcut (or just to avoid
26787         # compiling the demo in the c++ directory).  So we need a reasonable
26788         # default for the 'bool' type.
26789         #
26790         # Caveat: since the storage of the bool type is not standardized, it
26791         # may change.
26792
26793         if test "$NCURSES_BOOL" != auto ; then
26794                 cf_cv_type_of_bool=$NCURSES_BOOL
26795                 cf_cv_header_stdbool_h=0
26796         else
26797                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26798
26799 echo "$as_me:26799: checking for bool" >&5
26800 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26801 if test "${ac_cv_type_bool+set}" = set; then
26802   echo $ECHO_N "(cached) $ECHO_C" >&6
26803 else
26804   cat >"conftest.$ac_ext" <<_ACEOF
26805 #line 26805 "configure"
26806 #include "confdefs.h"
26807
26808 $ac_includes_default
26809
26810 #if defined(__cplusplus)
26811
26812 #ifdef HAVE_GXX_BUILTIN_H
26813 #include <g++/builtin.h>
26814 #elif HAVE_GPP_BUILTIN_H
26815 #include <gpp/builtin.h>
26816 #elif HAVE_BUILTIN_H
26817 #include <builtin.h>
26818 #endif
26819
26820 #else
26821
26822 #if $cf_cv_header_stdbool_h
26823 #include <stdbool.h>
26824 #endif
26825
26826 #endif
26827
26828 int
26829 main (void)
26830 {
26831 if ((bool *) 0)
26832   return 0;
26833 if (sizeof (bool))
26834   return 0;
26835   ;
26836   return 0;
26837 }
26838 _ACEOF
26839 rm -f "conftest.$ac_objext"
26840 if { (eval echo "$as_me:26840: \"$ac_compile\"") >&5
26841   (eval $ac_compile) 2>&5
26842   ac_status=$?
26843   echo "$as_me:26843: \$? = $ac_status" >&5
26844   (exit "$ac_status"); } &&
26845          { ac_try='test -s "conftest.$ac_objext"'
26846   { (eval echo "$as_me:26846: \"$ac_try\"") >&5
26847   (eval $ac_try) 2>&5
26848   ac_status=$?
26849   echo "$as_me:26849: \$? = $ac_status" >&5
26850   (exit "$ac_status"); }; }; then
26851   ac_cv_type_bool=yes
26852 else
26853   echo "$as_me: failed program was:" >&5
26854 cat "conftest.$ac_ext" >&5
26855 ac_cv_type_bool=no
26856 fi
26857 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26858 fi
26859 echo "$as_me:26859: result: $ac_cv_type_bool" >&5
26860 echo "${ECHO_T}$ac_cv_type_bool" >&6
26861
26862 echo "$as_me:26862: checking size of bool" >&5
26863 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26864 if test "${ac_cv_sizeof_bool+set}" = set; then
26865   echo $ECHO_N "(cached) $ECHO_C" >&6
26866 else
26867   if test "$ac_cv_type_bool" = yes; then
26868   if test "$cross_compiling" = yes; then
26869   # Depending upon the size, compute the lo and hi bounds.
26870 cat >"conftest.$ac_ext" <<_ACEOF
26871 #line 26871 "configure"
26872 #include "confdefs.h"
26873
26874 $ac_includes_default
26875
26876 #if defined(__cplusplus)
26877
26878 #ifdef HAVE_GXX_BUILTIN_H
26879 #include <g++/builtin.h>
26880 #elif HAVE_GPP_BUILTIN_H
26881 #include <gpp/builtin.h>
26882 #elif HAVE_BUILTIN_H
26883 #include <builtin.h>
26884 #endif
26885
26886 #else
26887
26888 #if $cf_cv_header_stdbool_h
26889 #include <stdbool.h>
26890 #endif
26891
26892 #endif
26893
26894 int
26895 main (void)
26896 {
26897 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26898   ;
26899   return 0;
26900 }
26901 _ACEOF
26902 rm -f "conftest.$ac_objext"
26903 if { (eval echo "$as_me:26903: \"$ac_compile\"") >&5
26904   (eval $ac_compile) 2>&5
26905   ac_status=$?
26906   echo "$as_me:26906: \$? = $ac_status" >&5
26907   (exit "$ac_status"); } &&
26908          { ac_try='test -s "conftest.$ac_objext"'
26909   { (eval echo "$as_me:26909: \"$ac_try\"") >&5
26910   (eval $ac_try) 2>&5
26911   ac_status=$?
26912   echo "$as_me:26912: \$? = $ac_status" >&5
26913   (exit "$ac_status"); }; }; then
26914   ac_lo=0 ac_mid=0
26915   while :; do
26916     cat >"conftest.$ac_ext" <<_ACEOF
26917 #line 26917 "configure"
26918 #include "confdefs.h"
26919
26920 $ac_includes_default
26921
26922 #if defined(__cplusplus)
26923
26924 #ifdef HAVE_GXX_BUILTIN_H
26925 #include <g++/builtin.h>
26926 #elif HAVE_GPP_BUILTIN_H
26927 #include <gpp/builtin.h>
26928 #elif HAVE_BUILTIN_H
26929 #include <builtin.h>
26930 #endif
26931
26932 #else
26933
26934 #if $cf_cv_header_stdbool_h
26935 #include <stdbool.h>
26936 #endif
26937
26938 #endif
26939
26940 int
26941 main (void)
26942 {
26943 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26944   ;
26945   return 0;
26946 }
26947 _ACEOF
26948 rm -f "conftest.$ac_objext"
26949 if { (eval echo "$as_me:26949: \"$ac_compile\"") >&5
26950   (eval $ac_compile) 2>&5
26951   ac_status=$?
26952   echo "$as_me:26952: \$? = $ac_status" >&5
26953   (exit "$ac_status"); } &&
26954          { ac_try='test -s "conftest.$ac_objext"'
26955   { (eval echo "$as_me:26955: \"$ac_try\"") >&5
26956   (eval $ac_try) 2>&5
26957   ac_status=$?
26958   echo "$as_me:26958: \$? = $ac_status" >&5
26959   (exit "$ac_status"); }; }; then
26960   ac_hi=$ac_mid; break
26961 else
26962   echo "$as_me: failed program was:" >&5
26963 cat "conftest.$ac_ext" >&5
26964 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26965 fi
26966 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26967   done
26968 else
26969   echo "$as_me: failed program was:" >&5
26970 cat "conftest.$ac_ext" >&5
26971 ac_hi=-1 ac_mid=-1
26972   while :; do
26973     cat >"conftest.$ac_ext" <<_ACEOF
26974 #line 26974 "configure"
26975 #include "confdefs.h"
26976
26977 $ac_includes_default
26978
26979 #if defined(__cplusplus)
26980
26981 #ifdef HAVE_GXX_BUILTIN_H
26982 #include <g++/builtin.h>
26983 #elif HAVE_GPP_BUILTIN_H
26984 #include <gpp/builtin.h>
26985 #elif HAVE_BUILTIN_H
26986 #include <builtin.h>
26987 #endif
26988
26989 #else
26990
26991 #if $cf_cv_header_stdbool_h
26992 #include <stdbool.h>
26993 #endif
26994
26995 #endif
26996
26997 int
26998 main (void)
26999 {
27000 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27001   ;
27002   return 0;
27003 }
27004 _ACEOF
27005 rm -f "conftest.$ac_objext"
27006 if { (eval echo "$as_me:27006: \"$ac_compile\"") >&5
27007   (eval $ac_compile) 2>&5
27008   ac_status=$?
27009   echo "$as_me:27009: \$? = $ac_status" >&5
27010   (exit "$ac_status"); } &&
27011          { ac_try='test -s "conftest.$ac_objext"'
27012   { (eval echo "$as_me:27012: \"$ac_try\"") >&5
27013   (eval $ac_try) 2>&5
27014   ac_status=$?
27015   echo "$as_me:27015: \$? = $ac_status" >&5
27016   (exit "$ac_status"); }; }; then
27017   ac_lo=$ac_mid; break
27018 else
27019   echo "$as_me: failed program was:" >&5
27020 cat "conftest.$ac_ext" >&5
27021 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27022 fi
27023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27024   done
27025 fi
27026 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27027 # Binary search between lo and hi bounds.
27028 while test "x$ac_lo" != "x$ac_hi"; do
27029   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27030   cat >"conftest.$ac_ext" <<_ACEOF
27031 #line 27031 "configure"
27032 #include "confdefs.h"
27033
27034 $ac_includes_default
27035
27036 #if defined(__cplusplus)
27037
27038 #ifdef HAVE_GXX_BUILTIN_H
27039 #include <g++/builtin.h>
27040 #elif HAVE_GPP_BUILTIN_H
27041 #include <gpp/builtin.h>
27042 #elif HAVE_BUILTIN_H
27043 #include <builtin.h>
27044 #endif
27045
27046 #else
27047
27048 #if $cf_cv_header_stdbool_h
27049 #include <stdbool.h>
27050 #endif
27051
27052 #endif
27053
27054 int
27055 main (void)
27056 {
27057 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27058   ;
27059   return 0;
27060 }
27061 _ACEOF
27062 rm -f "conftest.$ac_objext"
27063 if { (eval echo "$as_me:27063: \"$ac_compile\"") >&5
27064   (eval $ac_compile) 2>&5
27065   ac_status=$?
27066   echo "$as_me:27066: \$? = $ac_status" >&5
27067   (exit "$ac_status"); } &&
27068          { ac_try='test -s "conftest.$ac_objext"'
27069   { (eval echo "$as_me:27069: \"$ac_try\"") >&5
27070   (eval $ac_try) 2>&5
27071   ac_status=$?
27072   echo "$as_me:27072: \$? = $ac_status" >&5
27073   (exit "$ac_status"); }; }; then
27074   ac_hi=$ac_mid
27075 else
27076   echo "$as_me: failed program was:" >&5
27077 cat "conftest.$ac_ext" >&5
27078 ac_lo=`expr "$ac_mid" + 1`
27079 fi
27080 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27081 done
27082 ac_cv_sizeof_bool=$ac_lo
27083 else
27084   if test "$cross_compiling" = yes; then
27085   { { echo "$as_me:27085: error: cannot run test program while cross compiling" >&5
27086 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27087    { (exit 1); exit 1; }; }
27088 else
27089   cat >"conftest.$ac_ext" <<_ACEOF
27090 #line 27090 "configure"
27091 #include "confdefs.h"
27092
27093 $ac_includes_default
27094
27095 #if defined(__cplusplus)
27096
27097 #ifdef HAVE_GXX_BUILTIN_H
27098 #include <g++/builtin.h>
27099 #elif HAVE_GPP_BUILTIN_H
27100 #include <gpp/builtin.h>
27101 #elif HAVE_BUILTIN_H
27102 #include <builtin.h>
27103 #endif
27104
27105 #else
27106
27107 #if $cf_cv_header_stdbool_h
27108 #include <stdbool.h>
27109 #endif
27110
27111 #endif
27112
27113 int
27114 main (void)
27115 {
27116 FILE *f = fopen ("conftest.val", "w");
27117 if (!f)
27118   $ac_main_return (1);
27119 fprintf (f, "%ld", (long)(sizeof (bool)));
27120 fclose (f);
27121   ;
27122   return 0;
27123 }
27124 _ACEOF
27125 rm -f "conftest$ac_exeext"
27126 if { (eval echo "$as_me:27126: \"$ac_link\"") >&5
27127   (eval $ac_link) 2>&5
27128   ac_status=$?
27129   echo "$as_me:27129: \$? = $ac_status" >&5
27130   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27131   { (eval echo "$as_me:27131: \"$ac_try\"") >&5
27132   (eval $ac_try) 2>&5
27133   ac_status=$?
27134   echo "$as_me:27134: \$? = $ac_status" >&5
27135   (exit "$ac_status"); }; }; then
27136   ac_cv_sizeof_bool=`cat conftest.val`
27137 else
27138   echo "$as_me: program exited with status $ac_status" >&5
27139 echo "$as_me: failed program was:" >&5
27140 cat "conftest.$ac_ext" >&5
27141 fi
27142 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27143 fi
27144 fi
27145 rm -f conftest.val
27146 else
27147   ac_cv_sizeof_bool=0
27148 fi
27149 fi
27150 echo "$as_me:27150: result: $ac_cv_sizeof_bool" >&5
27151 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27152 cat >>confdefs.h <<EOF
27153 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27154 EOF
27155
27156 echo "$as_me:27156: checking for type of bool" >&5
27157 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27158 if test "${cf_cv_type_of_bool+set}" = set; then
27159   echo $ECHO_N "(cached) $ECHO_C" >&6
27160 else
27161
27162         rm -f cf_test.out
27163         if test "$cross_compiling" = yes; then
27164
27165                 case x$ac_cv_sizeof_bool in
27166                 (x1) cf_cv_type_of_bool="unsigned char";;
27167                 (x2) cf_cv_type_of_bool="unsigned short";;
27168                 (x4) cf_cv_type_of_bool="unsigned int";;
27169                 (x8) cf_cv_type_of_bool="unsigned long";;
27170                 (*)  cf_cv_type_of_bool=unknown;;
27171                 esac
27172
27173 else
27174   cat >"conftest.$ac_ext" <<_ACEOF
27175 #line 27175 "configure"
27176 #include "confdefs.h"
27177
27178 $ac_includes_default
27179
27180 #if defined(__cplusplus)
27181
27182 #ifdef HAVE_GXX_BUILTIN_H
27183 #include <g++/builtin.h>
27184 #elif HAVE_GPP_BUILTIN_H
27185 #include <gpp/builtin.h>
27186 #elif HAVE_BUILTIN_H
27187 #include <builtin.h>
27188 #endif
27189
27190 #else
27191
27192 #if $cf_cv_header_stdbool_h
27193 #include <stdbool.h>
27194 #endif
27195
27196 #endif
27197
27198 int main(void)
27199 {
27200         FILE *fp = fopen("cf_test.out", "w");
27201         if (fp != 0) {
27202                 bool x = true;
27203                 if ((bool)(-x) >= 0)
27204                         fputs("unsigned ", fp);
27205                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27206                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27207                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27208                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27209                 fclose(fp);
27210         }
27211         ${cf_cv_main_return:-return}(0);
27212 }
27213
27214 _ACEOF
27215 rm -f "conftest$ac_exeext"
27216 if { (eval echo "$as_me:27216: \"$ac_link\"") >&5
27217   (eval $ac_link) 2>&5
27218   ac_status=$?
27219   echo "$as_me:27219: \$? = $ac_status" >&5
27220   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27221   { (eval echo "$as_me:27221: \"$ac_try\"") >&5
27222   (eval $ac_try) 2>&5
27223   ac_status=$?
27224   echo "$as_me:27224: \$? = $ac_status" >&5
27225   (exit "$ac_status"); }; }; then
27226   cf_cv_type_of_bool=`cat cf_test.out`
27227                  if test -z "$cf_cv_type_of_bool"; then
27228                    cf_cv_type_of_bool=unknown
27229                  fi
27230 else
27231   echo "$as_me: program exited with status $ac_status" >&5
27232 echo "$as_me: failed program was:" >&5
27233 cat "conftest.$ac_ext" >&5
27234 cf_cv_type_of_bool=unknown
27235 fi
27236 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27237 fi
27238         rm -f cf_test.out
27239
27240 fi
27241 echo "$as_me:27241: result: $cf_cv_type_of_bool" >&5
27242 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27243
27244 if test "$cf_cv_type_of_bool" = unknown ; then
27245         case .$NCURSES_BOOL in
27246         (.auto|.) NCURSES_BOOL=unsigned;;
27247         esac
27248         { echo "$as_me:27248: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27249 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27250         cf_cv_type_of_bool=$NCURSES_BOOL
27251 fi
27252
27253                 else
27254                         echo "$as_me:27254: checking for fallback type of bool" >&5
27255 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27256                         case "$host_cpu" in
27257                         (i?86)  cf_cv_type_of_bool=char ;;
27258                         (*)     cf_cv_type_of_bool=int  ;;
27259                         esac
27260                         echo "$as_me:27260: result: $cf_cv_type_of_bool" >&5
27261 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27262                 fi
27263         fi
27264 fi
27265
27266 # If the C compiler did not declare bool, and we did not determine that the C++
27267 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27268 # ncurses library use the same type as C++ bool.  Note that this allows one to
27269 # specify the type of bool in a configure-script option and postpone
27270 # integration with the C++ compiler provided that the types are compatible.
27271 USE_CXX_BOOL=1
27272 if test "$cf_cv_cc_bool_type" = 1
27273 then
27274         # oops: C has a bool.  Unlikely, but C++ could differ.
27275         USE_CXX_BOOL=0
27276 elif test "$cf_cv_builtin_bool" = 0
27277 then
27278         # C++ has no bool
27279         USE_CXX_BOOL=0
27280 else
27281         # this is the normal case
27282         USE_CXX_BOOL='defined(__cplusplus)'
27283 fi
27284
27285 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27286
27287         if test "$cf_with_ada" != "no" ; then
27288                 if test "$with_libtool" != "no"; then
27289                         { echo "$as_me:27289: WARNING: libtool does not support Ada - disabling feature" >&5
27290 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27291                         cf_with_ada=no
27292                 fi
27293         fi
27294
27295         if test "$cf_with_ada" != "no" ; then
27296
27297 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27298 do
27299
27300 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27301
27302         unset ac_cv_path_cf_TEMP_gnat
27303         unset cf_TEMP_gnat
27304         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27305 set dummy $cf_prog_gnat; ac_word=$2
27306 echo "$as_me:27306: checking for $ac_word" >&5
27307 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27308 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27309   echo $ECHO_N "(cached) $ECHO_C" >&6
27310 else
27311   case $cf_TEMP_gnat in
27312   [\\/]* | ?:[\\/]*)
27313   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27314   ;;
27315   *)
27316   ac_save_IFS=$IFS; IFS=$ac_path_separator
27317 ac_dummy="$PATH"
27318 for ac_dir in $ac_dummy; do
27319   IFS=$ac_save_IFS
27320   test -z "$ac_dir" && ac_dir=.
27321   if $as_executable_p "$ac_dir/$ac_word"; then
27322    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27323    echo "$as_me:27323: found $ac_dir/$ac_word" >&5
27324    break
27325 fi
27326 done
27327
27328   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27329   ;;
27330 esac
27331 fi
27332 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27333
27334 if test -n "$cf_TEMP_gnat"; then
27335   echo "$as_me:27335: result: $cf_TEMP_gnat" >&5
27336 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27337 else
27338   echo "$as_me:27338: result: no" >&5
27339 echo "${ECHO_T}no" >&6
27340 fi
27341
27342         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27343
27344         if test "x$cf_TEMP_gnat" != xno; then
27345                 unset cf_cv_gnat_version
27346                 unset cf_TEMP_gnat
27347
27348 echo "$as_me:27348: checking for $cf_prog_gnat version" >&5
27349 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27350 if test "${cf_cv_gnat_version+set}" = set; then
27351   echo $ECHO_N "(cached) $ECHO_C" >&6
27352 else
27353
27354 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27355         grep '[0-9].[0-9][0-9]*' |\
27356         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27357
27358 fi
27359 echo "$as_me:27359: result: $cf_cv_gnat_version" >&5
27360 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27361 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27362 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27363
27364         fi
27365         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27366
27367         unset cf_TEMP_gnat
27368         unset cf_cv_gnat_version
27369         unset ac_cv_path_cf_TEMP_gnat
27370 done
27371
27372 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27373         cf_ada_make=
27374         cf_cv_prog_gnat_correct=no
27375 else
27376         cf_ada_make=gnatmake
27377         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27378                 # gprconfig is newer than gnatmake; we can continue...
27379                 cf_ada_config="##"
27380         else
27381                 rm -rf ./conftest* ./*~conftest*
27382                 if mkdir conftest.src
27383                 then
27384                         cf_ada_config=""
27385                         cd conftest.src
27386                         for cf_gprconfig in Ada C
27387                         do
27388                                 echo "$as_me:27388: checking for gprconfig name for $cf_gprconfig" >&5
27389 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27390                                 if test "$cf_gprconfig" = C
27391                                 then
27392                                         for cf_gprconfig_param in \
27393                                                 "$cf_gprconfig,,,,GNATGCC" \
27394                                                 "$cf_gprconfig,,,,GCC" \
27395                                                 "$cf_gprconfig"
27396                                         do
27397                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27398                                                 test -n "$cf_gprconfig_value" && break
27399                                         done
27400                                 else
27401                                         cf_gprconfig_param=$cf_gprconfig
27402                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27403                                 fi
27404                                 if test -n "$cf_gprconfig_value"
27405                                 then
27406                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27407                                         echo "$as_me:27407: result: $cf_gprconfig_value" >&5
27408 echo "${ECHO_T}$cf_gprconfig_value" >&6
27409                                 else
27410                                         echo "$as_me:27410: result: missing" >&5
27411 echo "${ECHO_T}missing" >&6
27412                                         cf_ada_config="#"
27413                                         break
27414                                 fi
27415                         done
27416                         cd ..
27417                         rm -rf ./conftest* ./*~conftest*
27418                 fi
27419         fi
27420         if test "x$cf_ada_config" != "x#"
27421         then
27422
27423 echo "$as_me:27423: checking for gnat version" >&5
27424 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27425 if test "${cf_cv_gnat_version+set}" = set; then
27426   echo $ECHO_N "(cached) $ECHO_C" >&6
27427 else
27428
27429 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27430         grep '[0-9].[0-9][0-9]*' |\
27431         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27432
27433 fi
27434 echo "$as_me:27434: result: $cf_cv_gnat_version" >&5
27435 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27436 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27437
27438 case "$cf_cv_gnat_version" in
27439 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27440         cf_cv_prog_gnat_correct=yes
27441         ;;
27442 (*)
27443         { echo "$as_me:27443: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27444 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27445         cf_cv_prog_gnat_correct=no
27446         ;;
27447 esac
27448
27449                 # Extract the first word of "m4", so it can be a program name with args.
27450 set dummy m4; ac_word=$2
27451 echo "$as_me:27451: checking for $ac_word" >&5
27452 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27453 if test "${ac_cv_prog_M4_exists+set}" = set; then
27454   echo $ECHO_N "(cached) $ECHO_C" >&6
27455 else
27456   if test -n "$M4_exists"; then
27457   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27458 else
27459   ac_save_IFS=$IFS; IFS=$ac_path_separator
27460 ac_dummy="$PATH"
27461 for ac_dir in $ac_dummy; do
27462   IFS=$ac_save_IFS
27463   test -z "$ac_dir" && ac_dir=.
27464   $as_executable_p "$ac_dir/$ac_word" || continue
27465 ac_cv_prog_M4_exists="yes"
27466 echo "$as_me:27466: found $ac_dir/$ac_word" >&5
27467 break
27468 done
27469
27470   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27471 fi
27472 fi
27473 M4_exists=$ac_cv_prog_M4_exists
27474 if test -n "$M4_exists"; then
27475   echo "$as_me:27475: result: $M4_exists" >&5
27476 echo "${ECHO_T}$M4_exists" >&6
27477 else
27478   echo "$as_me:27478: result: no" >&5
27479 echo "${ECHO_T}no" >&6
27480 fi
27481
27482                 if test "$ac_cv_prog_M4_exists" = no; then
27483                         cf_cv_prog_gnat_correct=no
27484                         { echo "$as_me:27484: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27485 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27486                 fi
27487                 if test "$cf_cv_prog_gnat_correct" = yes; then
27488                         echo "$as_me:27488: checking if GNAT works" >&5
27489 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27490
27491 rm -rf ./conftest* ./*~conftest*
27492 cat >>conftest.ads <<CF_EOF
27493 procedure conftest;
27494 CF_EOF
27495 cat >>conftest.adb <<CF_EOF
27496 with Text_IO;
27497 with GNAT.OS_Lib;
27498 procedure conftest is
27499 begin
27500    Text_IO.Put ("Hello World");
27501    Text_IO.New_Line;
27502    GNAT.OS_Lib.OS_Exit (0);
27503 end conftest;
27504 CF_EOF
27505 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27506    if ( ./conftest 1>&5 2>&1 ) ; then
27507       cf_cv_prog_gnat_correct=yes
27508    else
27509       cf_cv_prog_gnat_correct=no
27510    fi
27511 else
27512    cf_cv_prog_gnat_correct=no
27513 fi
27514 rm -rf ./conftest* ./*~conftest*
27515
27516                         echo "$as_me:27516: result: $cf_cv_prog_gnat_correct" >&5
27517 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27518                 fi
27519         else
27520                 cf_cv_prog_gnat_correct=no
27521         fi
27522 fi
27523
27524                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27525
27526         ADAFLAGS="$ADAFLAGS -gnatpn"
27527
27528         echo "$as_me:27528: checking optimization options for ADAFLAGS" >&5
27529 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27530         case "$CFLAGS" in
27531         (*-g*)
27532
27533         ADAFLAGS="$ADAFLAGS -g"
27534
27535                 ;;
27536         esac
27537         case "$CFLAGS" in
27538         (*-O*)
27539                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27540
27541         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27542
27543                 ;;
27544         esac
27545         echo "$as_me:27545: result: $ADAFLAGS" >&5
27546 echo "${ECHO_T}$ADAFLAGS" >&6
27547
27548 echo "$as_me:27548: checking if GNATPREP supports -T option" >&5
27549 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27550 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27551   echo $ECHO_N "(cached) $ECHO_C" >&6
27552 else
27553
27554 cf_cv_gnatprep_opt_t=no
27555 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27556
27557 fi
27558 echo "$as_me:27558: result: $cf_cv_gnatprep_opt_t" >&5
27559 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27560 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27561
27562 echo "$as_me:27562: checking if GNAT supports generics" >&5
27563 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27564 case "$cf_cv_gnat_version" in
27565 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27566         cf_gnat_generics=yes
27567         ;;
27568 (*)
27569         cf_gnat_generics=no
27570         ;;
27571 esac
27572 echo "$as_me:27572: result: $cf_gnat_generics" >&5
27573 echo "${ECHO_T}$cf_gnat_generics" >&6
27574
27575 if test "$cf_gnat_generics" = yes
27576 then
27577         cf_compile_generics=generics
27578         cf_generic_objects="\${GENOBJS}"
27579 else
27580         cf_compile_generics=
27581         cf_generic_objects=
27582 fi
27583
27584 echo "$as_me:27584: checking if GNAT supports SIGINT" >&5
27585 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27586 if test "${cf_cv_gnat_sigint+set}" = set; then
27587   echo $ECHO_N "(cached) $ECHO_C" >&6
27588 else
27589
27590 rm -rf ./conftest* ./*~conftest*
27591 cat >>conftest.ads <<CF_EOF
27592 with Ada.Interrupts.Names;
27593
27594 package ConfTest is
27595
27596    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27597    pragma Unreserve_All_Interrupts;
27598    pragma Warnings (On);
27599
27600    protected Process is
27601       procedure Stop;
27602       function Continue return Boolean;
27603       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27604    private
27605       Done : Boolean := False;
27606    end Process;
27607
27608 end ConfTest;
27609 CF_EOF
27610 cat >>conftest.adb <<CF_EOF
27611 package body ConfTest is
27612    protected body Process is
27613       procedure Stop is
27614       begin
27615          Done := True;
27616       end Stop;
27617       function Continue return Boolean is
27618       begin
27619          return not Done;
27620       end Continue;
27621    end Process;
27622 end ConfTest;
27623 CF_EOF
27624 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27625       cf_cv_gnat_sigint=yes
27626 else
27627    cf_cv_gnat_sigint=no
27628 fi
27629 rm -rf ./conftest* ./*~conftest*
27630
27631 fi
27632 echo "$as_me:27632: result: $cf_cv_gnat_sigint" >&5
27633 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27634
27635 if test "$cf_cv_gnat_sigint" = yes ; then
27636         USE_GNAT_SIGINT=""
27637 else
27638         USE_GNAT_SIGINT="#"
27639 fi
27640
27641 cf_gnat_libraries=no
27642 cf_gnat_projects=no
27643
27644 if test "$enable_gnat_projects" != no ; then
27645 echo "$as_me:27645: checking if GNAT supports project files" >&5
27646 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27647 case "$cf_cv_gnat_version" in
27648 (3.[0-9]*)
27649         ;;
27650 (*)
27651         case "$cf_cv_system_name" in
27652         (cygwin*|msys*)
27653                 ;;
27654         (*)
27655                 rm -rf ./conftest* ./*~conftest*
27656                 if mkdir conftest.src conftest.bin conftest.lib
27657                 then
27658                         cd conftest.src
27659                         rm -rf ./conftest* ./*~conftest*
27660                         cat >>library.gpr <<CF_EOF
27661 project Library is
27662   Kind := External ("LIB_KIND");
27663   for Library_Name use "ConfTest";
27664   for Object_Dir use ".";
27665   for Library_ALI_Dir use External("LIBRARY_DIR");
27666   for Library_Version use External ("SONAME");
27667   for Library_Kind use Kind;
27668   for Library_Dir use External("BUILD_DIR");
27669   Source_Dir := External ("SOURCE_DIR");
27670   for Source_Dirs use (Source_Dir);
27671 end Library;
27672 CF_EOF
27673                         cat >>confpackage.ads <<CF_EOF
27674 package ConfPackage is
27675    procedure conftest;
27676 end ConfPackage;
27677 CF_EOF
27678                         cat >>confpackage.adb <<CF_EOF
27679 with Text_IO;
27680 package body ConfPackage is
27681    procedure conftest is
27682    begin
27683       Text_IO.Put ("Hello World");
27684       Text_IO.New_Line;
27685    end conftest;
27686 end ConfPackage;
27687 CF_EOF
27688                         if ( "$cf_ada_make" $ADAFLAGS \
27689                                         -Plibrary.gpr \
27690                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27691                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27692                                         -XSOURCE_DIR="`pwd`" \
27693                                         -XSONAME=libConfTest.so.1 \
27694                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27695                                 cf_gnat_projects=yes
27696                         fi
27697                         cd ..
27698                 fi
27699                 if test -f conftest.lib/confpackage.ali
27700                 then
27701                         cf_gnat_libraries=yes
27702                 fi
27703                 rm -rf ./conftest* ./*~conftest*
27704                 ;;
27705         esac
27706         ;;
27707 esac
27708 echo "$as_me:27708: result: $cf_gnat_projects" >&5
27709 echo "${ECHO_T}$cf_gnat_projects" >&6
27710 fi # enable_gnat_projects
27711
27712 if test "$cf_gnat_projects" = yes
27713 then
27714         echo "$as_me:27714: checking if GNAT supports libraries" >&5
27715 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27716         echo "$as_me:27716: result: $cf_gnat_libraries" >&5
27717 echo "${ECHO_T}$cf_gnat_libraries" >&6
27718 fi
27719
27720 USE_OLD_MAKERULES=""
27721 USE_GNAT_PROJECTS="#"
27722 USE_GNAT_MAKE_GPR="#"
27723 USE_GNAT_GPRBUILD="#"
27724
27725 if test "$cf_gnat_projects" = yes
27726 then
27727         USE_OLD_MAKERULES="#"
27728         USE_GNAT_PROJECTS=""
27729         if test "$cf_cv_VERSION_GPRBUILD" != no
27730         then
27731                 USE_GNAT_GPRBUILD=""
27732         elif test "$cf_cv_VERSION_GNATMAKE" != no
27733         then
27734                 USE_GNAT_MAKE_GPR=""
27735         else
27736                 { echo "$as_me:27736: WARNING: use old makefile rules since tools are missing" >&5
27737 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27738         fi
27739 fi
27740
27741 if test "$cf_gnat_libraries" = yes
27742 then
27743         USE_GNAT_LIBRARIES=""
27744 else
27745         USE_GNAT_LIBRARIES="#"
27746 fi
27747
27748 echo "$as_me:27748: checking for ada-compiler" >&5
27749 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27750
27751 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27752 if test "${with_ada_compiler+set}" = set; then
27753   withval="$with_ada_compiler"
27754   cf_ada_compiler=$withval
27755 else
27756   cf_ada_compiler=gnatmake
27757 fi;
27758
27759 echo "$as_me:27759: result: $cf_ada_compiler" >&5
27760 echo "${ECHO_T}$cf_ada_compiler" >&6
27761
27762                         cf_ada_package=terminal_interface
27763
27764 echo "$as_me:27764: checking for ada-include" >&5
27765 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27766
27767 # Check whether --with-ada-include or --without-ada-include was given.
27768 if test "${with_ada_include+set}" = set; then
27769   withval="$with_ada_include"
27770
27771 else
27772   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27773 fi; if test -n "$prefix/share/ada/adainclude" ; then
27774
27775 if test "x$prefix" != xNONE; then
27776         cf_path_syntax="$prefix"
27777 else
27778         cf_path_syntax="$ac_default_prefix"
27779 fi
27780
27781 case ".$withval" in
27782 (.\$\(*\)*|.\'*\'*)
27783         ;;
27784 (..|./*|.\\*)
27785         ;;
27786 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27787         ;;
27788 (.\$\{*prefix\}*|.\$\{*dir\}*)
27789         eval withval="$withval"
27790         case ".$withval" in
27791         (.NONE/*)
27792                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27793                 ;;
27794         esac
27795         ;;
27796 (.no|.NONE/*)
27797         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27798         ;;
27799 (*)
27800         { { echo "$as_me:27800: error: expected a pathname, not \"$withval\"" >&5
27801 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27802    { (exit 1); exit 1; }; }
27803         ;;
27804 esac
27805
27806 fi
27807 eval ADA_INCLUDE="$withval"
27808
27809 echo "$as_me:27809: result: $ADA_INCLUDE" >&5
27810 echo "${ECHO_T}$ADA_INCLUDE" >&6
27811
27812 echo "$as_me:27812: checking for ada-objects" >&5
27813 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27814
27815 # Check whether --with-ada-objects or --without-ada-objects was given.
27816 if test "${with_ada_objects+set}" = set; then
27817   withval="$with_ada_objects"
27818
27819 else
27820   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27821 fi; if test -n "$prefix/lib/ada/adalib" ; then
27822
27823 if test "x$prefix" != xNONE; then
27824         cf_path_syntax="$prefix"
27825 else
27826         cf_path_syntax="$ac_default_prefix"
27827 fi
27828
27829 case ".$withval" in
27830 (.\$\(*\)*|.\'*\'*)
27831         ;;
27832 (..|./*|.\\*)
27833         ;;
27834 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27835         ;;
27836 (.\$\{*prefix\}*|.\$\{*dir\}*)
27837         eval withval="$withval"
27838         case ".$withval" in
27839         (.NONE/*)
27840                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27841                 ;;
27842         esac
27843         ;;
27844 (.no|.NONE/*)
27845         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27846         ;;
27847 (*)
27848         { { echo "$as_me:27848: error: expected a pathname, not \"$withval\"" >&5
27849 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27850    { (exit 1); exit 1; }; }
27851         ;;
27852 esac
27853
27854 fi
27855 eval ADA_OBJECTS="$withval"
27856
27857 echo "$as_me:27857: result: $ADA_OBJECTS" >&5
27858 echo "${ECHO_T}$ADA_OBJECTS" >&6
27859
27860 echo "$as_me:27860: checking if an Ada95 shared-library should be built" >&5
27861 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27862
27863 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27864 if test "${with_ada_sharedlib+set}" = set; then
27865   withval="$with_ada_sharedlib"
27866   with_ada_sharedlib=$withval
27867 else
27868   with_ada_sharedlib=no
27869 fi;
27870 echo "$as_me:27870: result: $with_ada_sharedlib" >&5
27871 echo "${ECHO_T}$with_ada_sharedlib" >&6
27872
27873 if test "x$with_ada_sharedlib" != xno
27874 then
27875         if test "x$cf_gnat_projects" != xyes
27876         then
27877                 { echo "$as_me:27877: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27878 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27879                 with_ada_sharedlib=no
27880         fi
27881 fi
27882
27883 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27884 MAKE_ADA_SHAREDLIB="#"
27885
27886 if test "x$with_ada_sharedlib" != xno
27887 then
27888         MAKE_ADA_SHAREDLIB=
27889         if test "x$with_ada_sharedlib" != xyes
27890         then
27891                 ADA_SHAREDLIB="$with_ada_sharedlib"
27892         fi
27893 fi
27894
27895                         # allow the Ada binding to be renamed
27896
27897 echo "$as_me:27897: checking for ada-libname" >&5
27898 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27899
27900 # Check whether --with-ada-libname or --without-ada-libname was given.
27901 if test "${with_ada_libname+set}" = set; then
27902   withval="$with_ada_libname"
27903   ADA_LIBNAME=$withval
27904 else
27905   ADA_LIBNAME=AdaCurses
27906 fi;
27907 case "x$ADA_LIBNAME" in
27908 (x|xyes|xno)
27909         ADA_LIBNAME=AdaCurses
27910         ;;
27911 esac
27912
27913 echo "$as_me:27913: result: $ADA_LIBNAME" >&5
27914 echo "${ECHO_T}$ADA_LIBNAME" >&6
27915
27916                 fi
27917         fi
27918 else
27919         cf_with_ada=no
27920 fi
27921
27922 # do this "late" to avoid conflict with header-checks
27923 if test "x$with_widec" = xyes ; then
27924         echo "$as_me:27924: checking for wchar_t" >&5
27925 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27926 if test "${ac_cv_type_wchar_t+set}" = set; then
27927   echo $ECHO_N "(cached) $ECHO_C" >&6
27928 else
27929   cat >"conftest.$ac_ext" <<_ACEOF
27930 #line 27930 "configure"
27931 #include "confdefs.h"
27932 $ac_includes_default
27933 int
27934 main (void)
27935 {
27936 if ((wchar_t *) 0)
27937   return 0;
27938 if (sizeof (wchar_t))
27939   return 0;
27940   ;
27941   return 0;
27942 }
27943 _ACEOF
27944 rm -f "conftest.$ac_objext"
27945 if { (eval echo "$as_me:27945: \"$ac_compile\"") >&5
27946   (eval $ac_compile) 2>&5
27947   ac_status=$?
27948   echo "$as_me:27948: \$? = $ac_status" >&5
27949   (exit "$ac_status"); } &&
27950          { ac_try='test -s "conftest.$ac_objext"'
27951   { (eval echo "$as_me:27951: \"$ac_try\"") >&5
27952   (eval $ac_try) 2>&5
27953   ac_status=$?
27954   echo "$as_me:27954: \$? = $ac_status" >&5
27955   (exit "$ac_status"); }; }; then
27956   ac_cv_type_wchar_t=yes
27957 else
27958   echo "$as_me: failed program was:" >&5
27959 cat "conftest.$ac_ext" >&5
27960 ac_cv_type_wchar_t=no
27961 fi
27962 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27963 fi
27964 echo "$as_me:27964: result: $ac_cv_type_wchar_t" >&5
27965 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27966
27967 echo "$as_me:27967: checking size of wchar_t" >&5
27968 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27969 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27970   echo $ECHO_N "(cached) $ECHO_C" >&6
27971 else
27972   if test "$ac_cv_type_wchar_t" = yes; then
27973   if test "$cross_compiling" = yes; then
27974   # Depending upon the size, compute the lo and hi bounds.
27975 cat >"conftest.$ac_ext" <<_ACEOF
27976 #line 27976 "configure"
27977 #include "confdefs.h"
27978 $ac_includes_default
27979 int
27980 main (void)
27981 {
27982 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27983   ;
27984   return 0;
27985 }
27986 _ACEOF
27987 rm -f "conftest.$ac_objext"
27988 if { (eval echo "$as_me:27988: \"$ac_compile\"") >&5
27989   (eval $ac_compile) 2>&5
27990   ac_status=$?
27991   echo "$as_me:27991: \$? = $ac_status" >&5
27992   (exit "$ac_status"); } &&
27993          { ac_try='test -s "conftest.$ac_objext"'
27994   { (eval echo "$as_me:27994: \"$ac_try\"") >&5
27995   (eval $ac_try) 2>&5
27996   ac_status=$?
27997   echo "$as_me:27997: \$? = $ac_status" >&5
27998   (exit "$ac_status"); }; }; then
27999   ac_lo=0 ac_mid=0
28000   while :; do
28001     cat >"conftest.$ac_ext" <<_ACEOF
28002 #line 28002 "configure"
28003 #include "confdefs.h"
28004 $ac_includes_default
28005 int
28006 main (void)
28007 {
28008 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28009   ;
28010   return 0;
28011 }
28012 _ACEOF
28013 rm -f "conftest.$ac_objext"
28014 if { (eval echo "$as_me:28014: \"$ac_compile\"") >&5
28015   (eval $ac_compile) 2>&5
28016   ac_status=$?
28017   echo "$as_me:28017: \$? = $ac_status" >&5
28018   (exit "$ac_status"); } &&
28019          { ac_try='test -s "conftest.$ac_objext"'
28020   { (eval echo "$as_me:28020: \"$ac_try\"") >&5
28021   (eval $ac_try) 2>&5
28022   ac_status=$?
28023   echo "$as_me:28023: \$? = $ac_status" >&5
28024   (exit "$ac_status"); }; }; then
28025   ac_hi=$ac_mid; break
28026 else
28027   echo "$as_me: failed program was:" >&5
28028 cat "conftest.$ac_ext" >&5
28029 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28030 fi
28031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28032   done
28033 else
28034   echo "$as_me: failed program was:" >&5
28035 cat "conftest.$ac_ext" >&5
28036 ac_hi=-1 ac_mid=-1
28037   while :; do
28038     cat >"conftest.$ac_ext" <<_ACEOF
28039 #line 28039 "configure"
28040 #include "confdefs.h"
28041 $ac_includes_default
28042 int
28043 main (void)
28044 {
28045 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28046   ;
28047   return 0;
28048 }
28049 _ACEOF
28050 rm -f "conftest.$ac_objext"
28051 if { (eval echo "$as_me:28051: \"$ac_compile\"") >&5
28052   (eval $ac_compile) 2>&5
28053   ac_status=$?
28054   echo "$as_me:28054: \$? = $ac_status" >&5
28055   (exit "$ac_status"); } &&
28056          { ac_try='test -s "conftest.$ac_objext"'
28057   { (eval echo "$as_me:28057: \"$ac_try\"") >&5
28058   (eval $ac_try) 2>&5
28059   ac_status=$?
28060   echo "$as_me:28060: \$? = $ac_status" >&5
28061   (exit "$ac_status"); }; }; then
28062   ac_lo=$ac_mid; break
28063 else
28064   echo "$as_me: failed program was:" >&5
28065 cat "conftest.$ac_ext" >&5
28066 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28067 fi
28068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28069   done
28070 fi
28071 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28072 # Binary search between lo and hi bounds.
28073 while test "x$ac_lo" != "x$ac_hi"; do
28074   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28075   cat >"conftest.$ac_ext" <<_ACEOF
28076 #line 28076 "configure"
28077 #include "confdefs.h"
28078 $ac_includes_default
28079 int
28080 main (void)
28081 {
28082 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28083   ;
28084   return 0;
28085 }
28086 _ACEOF
28087 rm -f "conftest.$ac_objext"
28088 if { (eval echo "$as_me:28088: \"$ac_compile\"") >&5
28089   (eval $ac_compile) 2>&5
28090   ac_status=$?
28091   echo "$as_me:28091: \$? = $ac_status" >&5
28092   (exit "$ac_status"); } &&
28093          { ac_try='test -s "conftest.$ac_objext"'
28094   { (eval echo "$as_me:28094: \"$ac_try\"") >&5
28095   (eval $ac_try) 2>&5
28096   ac_status=$?
28097   echo "$as_me:28097: \$? = $ac_status" >&5
28098   (exit "$ac_status"); }; }; then
28099   ac_hi=$ac_mid
28100 else
28101   echo "$as_me: failed program was:" >&5
28102 cat "conftest.$ac_ext" >&5
28103 ac_lo=`expr "$ac_mid" + 1`
28104 fi
28105 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28106 done
28107 ac_cv_sizeof_wchar_t=$ac_lo
28108 else
28109   if test "$cross_compiling" = yes; then
28110   { { echo "$as_me:28110: error: cannot run test program while cross compiling" >&5
28111 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28112    { (exit 1); exit 1; }; }
28113 else
28114   cat >"conftest.$ac_ext" <<_ACEOF
28115 #line 28115 "configure"
28116 #include "confdefs.h"
28117 $ac_includes_default
28118 int
28119 main (void)
28120 {
28121 FILE *f = fopen ("conftest.val", "w");
28122 if (!f)
28123   $ac_main_return (1);
28124 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28125 fclose (f);
28126   ;
28127   return 0;
28128 }
28129 _ACEOF
28130 rm -f "conftest$ac_exeext"
28131 if { (eval echo "$as_me:28131: \"$ac_link\"") >&5
28132   (eval $ac_link) 2>&5
28133   ac_status=$?
28134   echo "$as_me:28134: \$? = $ac_status" >&5
28135   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28136   { (eval echo "$as_me:28136: \"$ac_try\"") >&5
28137   (eval $ac_try) 2>&5
28138   ac_status=$?
28139   echo "$as_me:28139: \$? = $ac_status" >&5
28140   (exit "$ac_status"); }; }; then
28141   ac_cv_sizeof_wchar_t=`cat conftest.val`
28142 else
28143   echo "$as_me: program exited with status $ac_status" >&5
28144 echo "$as_me: failed program was:" >&5
28145 cat "conftest.$ac_ext" >&5
28146 fi
28147 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28148 fi
28149 fi
28150 rm -f conftest.val
28151 else
28152   ac_cv_sizeof_wchar_t=0
28153 fi
28154 fi
28155 echo "$as_me:28155: result: $ac_cv_sizeof_wchar_t" >&5
28156 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28157 cat >>confdefs.h <<EOF
28158 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28159 EOF
28160
28161         # cross-compiling to mingw can run into the problem that attempting to
28162         # link with the regex library fails, causing the test to not set this to
28163         # a number.  "recent" autoconf does not address this problem either -TD
28164         if test -z "$ac_cv_sizeof_wchar_t"
28165         then
28166                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28167
28168 echo "${as_me:-configure}:28168: testing test failed (assume 2) ..." 1>&5
28169
28170                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28171                 mv confdefs.tmp confdefs.h
28172                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28173         fi
28174 fi
28175
28176 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28177 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28178 ###
28179 ### ticlib modules may be a separate library, otherwise contained in termlib.
28180 ### termlib modules may be a separate library, otherwise contained in ncurses.
28181 ###
28182 ### The of "+" or " " between the tokens controls the way the script
28183 ### chooses to split module lists into libraries.
28184 ###
28185 ### (see CF_LIB_RULES).
28186 echo "$as_me:28186: checking for library subsets" >&5
28187 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28188 LIB_SUBSETS=
28189
28190 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28191         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28192         if test "$with_ticlib" != no ; then
28193                 LIB_SUBSETS="${LIB_SUBSETS} "
28194         else
28195                 LIB_SUBSETS="${LIB_SUBSETS}+"
28196         fi
28197 fi
28198
28199 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28200 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28201
28202 if test "$with_termlib" != no ; then
28203         LIB_SUBSETS="${LIB_SUBSETS} "
28204 else
28205         LIB_SUBSETS="${LIB_SUBSETS}+"
28206 fi
28207
28208 LIB_SUBSETS="${LIB_SUBSETS}base"
28209
28210 # Most term-driver calls are to tinfo, but some like init_pair are to the
28211 # base library (so it resides in base).
28212 if test "$with_term_driver" != no ; then
28213         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28214         case "$cf_cv_system_name" in
28215         (*mingw32*|*mingw64*)
28216                 if test "x$with_exp_win32" = xyes ; then
28217                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28218                 else
28219                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28220                 fi
28221                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28222                 ;;
28223         (*)
28224                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28225                 ;;
28226         esac
28227 elif test "x$with_exp_win32" = xyes ; then
28228         case "$cf_cv_system_name" in
28229         (*mingw32*|*mingw64*)
28230                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28231                 ;;
28232         (*)
28233                 ;;
28234         esac
28235 fi
28236
28237 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28238 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28239
28240 echo "$as_me:28240: result: $LIB_SUBSETS" >&5
28241 echo "${ECHO_T}$LIB_SUBSETS" >&6
28242
28243 ### Construct the list of include-directories to be generated
28244
28245 if test "$srcdir" != "."; then
28246         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28247 fi
28248 CPPFLAGS="-I../include $CPPFLAGS"
28249 if test "$srcdir" != "."; then
28250         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28251 fi
28252 CPPFLAGS="-I. $CPPFLAGS"
28253
28254 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28255 if test "$srcdir" != "."; then
28256         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28257 fi
28258 if test "$GCC" != yes; then
28259         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28260 elif test "$includedir" != "/usr/include"; then
28261         if test "$includedir" = '${prefix}/include' ; then
28262                 if test x$prefix != x/usr ; then
28263                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28264                 fi
28265         else
28266                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28267         fi
28268 fi
28269
28270 ### Build up pieces for makefile rules
28271 echo "$as_me:28271: checking default library suffix" >&5
28272 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28273
28274         case $DFT_LWR_MODEL in
28275         (libtool) DFT_ARG_SUFFIX=''   ;;
28276         (normal)  DFT_ARG_SUFFIX=''   ;;
28277         (debug)   DFT_ARG_SUFFIX='_g' ;;
28278         (profile) DFT_ARG_SUFFIX='_p' ;;
28279         (shared)  DFT_ARG_SUFFIX=''   ;;
28280         esac
28281         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28282 echo "$as_me:28282: result: $DFT_ARG_SUFFIX" >&5
28283 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28284
28285 echo "$as_me:28285: checking default library-dependency suffix" >&5
28286 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28287
28288         case X$DFT_LWR_MODEL in
28289         (Xlibtool)
28290                 DFT_LIB_SUFFIX='.la'
28291                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28292                 ;;
28293         (Xdebug)
28294                 case "$cf_cv_system_name" in
28295                 (*-msvc*)
28296                         DFT_LIB_SUFFIX='_g.lib'
28297                         ;;
28298                 (*)
28299                         DFT_LIB_SUFFIX='_g.a'
28300                         ;;
28301                 esac
28302                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28303                 ;;
28304         (Xprofile)
28305                 case "$cf_cv_system_name" in
28306                 (*-msvc*)
28307                         DFT_LIB_SUFFIX='_p.lib'
28308                         ;;
28309                 (*)
28310                         DFT_LIB_SUFFIX='_p.a'
28311                         ;;
28312                 esac
28313                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28314                 ;;
28315         (Xshared)
28316                 case "$cf_cv_system_name" in
28317                 (aix[5-7]*)
28318                         DFT_LIB_SUFFIX='.so'
28319                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28320                         ;;
28321                 (*-msvc*)
28322                         DFT_LIB_SUFFIX='.dll'
28323                         DFT_DEP_SUFFIX='.dll.lib'
28324                         ;;
28325                 (cygwin*|msys*|mingw*)
28326                         DFT_LIB_SUFFIX='.dll'
28327                         DFT_DEP_SUFFIX='.dll.a'
28328                         ;;
28329                 (darwin*)
28330                         DFT_LIB_SUFFIX='.dylib'
28331                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28332                         ;;
28333                 (hpux*)
28334                         case "$target" in
28335                         (ia64*)
28336                                 DFT_LIB_SUFFIX='.so'
28337                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28338                                 ;;
28339                         (*)
28340                                 DFT_LIB_SUFFIX='.sl'
28341                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28342                                 ;;
28343                         esac
28344                         ;;
28345                 (*)
28346                         DFT_LIB_SUFFIX='.so'
28347                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28348                         ;;
28349                 esac
28350                 ;;
28351         (*)
28352                 case "$target" in
28353                 (*-msvc*)
28354                         DFT_LIB_SUFFIX='.lib'
28355                         ;;
28356                 (*)
28357                         DFT_LIB_SUFFIX='.a'
28358                         ;;
28359                 esac
28360                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28361                 ;;
28362         esac
28363         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28364         then
28365                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28366                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28367         fi
28368 echo "$as_me:28368: result: $DFT_DEP_SUFFIX" >&5
28369 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28370
28371 echo "$as_me:28371: checking default object directory" >&5
28372 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28373
28374         case $DFT_LWR_MODEL in
28375         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28376         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28377         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28378         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28379         (shared)
28380                 case "$cf_cv_system_name" in
28381                 (cygwin|msys)
28382                         DFT_OBJ_SUBDIR='objects' ;;
28383                 (*)
28384                         DFT_OBJ_SUBDIR='obj_s' ;;
28385                 esac
28386         esac
28387 echo "$as_me:28387: result: $DFT_OBJ_SUBDIR" >&5
28388 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28389
28390 if test "x$cf_with_cxx" = xyes ; then
28391 echo "$as_me:28391: checking c++ library-dependency suffix" >&5
28392 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28393 if test "$with_libtool" != "no"; then
28394         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28395         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28396 elif test "$with_shared_cxx" != "no"; then
28397         # also for g++ users...
28398         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28399 else
28400         # we normally make a static library because C/C++ library rules differ
28401
28402         case Xnormal in
28403         (Xlibtool)
28404                 CXX_LIB_SUFFIX='.la'
28405                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28406                 ;;
28407         (Xdebug)
28408                 case "$cf_cv_system_name" in
28409                 (*-msvc*)
28410                         CXX_LIB_SUFFIX='_g.lib'
28411                         ;;
28412                 (*)
28413                         CXX_LIB_SUFFIX='_g.a'
28414                         ;;
28415                 esac
28416                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28417                 ;;
28418         (Xprofile)
28419                 case "$cf_cv_system_name" in
28420                 (*-msvc*)
28421                         CXX_LIB_SUFFIX='_p.lib'
28422                         ;;
28423                 (*)
28424                         CXX_LIB_SUFFIX='_p.a'
28425                         ;;
28426                 esac
28427                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28428                 ;;
28429         (Xshared)
28430                 case "$cf_cv_system_name" in
28431                 (aix[5-7]*)
28432                         CXX_LIB_SUFFIX='.so'
28433                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28434                         ;;
28435                 (*-msvc*)
28436                         CXX_LIB_SUFFIX='.dll'
28437                         CXX_DEP_SUFFIX='.dll.lib'
28438                         ;;
28439                 (cygwin*|msys*|mingw*)
28440                         CXX_LIB_SUFFIX='.dll'
28441                         CXX_DEP_SUFFIX='.dll.a'
28442                         ;;
28443                 (darwin*)
28444                         CXX_LIB_SUFFIX='.dylib'
28445                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28446                         ;;
28447                 (hpux*)
28448                         case "$target" in
28449                         (ia64*)
28450                                 CXX_LIB_SUFFIX='.so'
28451                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28452                                 ;;
28453                         (*)
28454                                 CXX_LIB_SUFFIX='.sl'
28455                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28456                                 ;;
28457                         esac
28458                         ;;
28459                 (*)
28460                         CXX_LIB_SUFFIX='.so'
28461                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28462                         ;;
28463                 esac
28464                 ;;
28465         (*)
28466                 case "$target" in
28467                 (*-msvc*)
28468                         CXX_LIB_SUFFIX='.lib'
28469                         ;;
28470                 (*)
28471                         CXX_LIB_SUFFIX='.a'
28472                         ;;
28473                 esac
28474                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28475                 ;;
28476         esac
28477         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28478         then
28479                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28480                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28481         fi
28482
28483 fi
28484 echo "$as_me:28484: result: $CXX_LIB_SUFFIX" >&5
28485 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28486
28487 fi
28488
28489 # do not want -ldl in build except as needed for -lncurses dependency
28490 if test "x$with_dlsym" = xyes ; then
28491 if test "$DFT_LWR_MODEL" = shared || \
28492    test "$DFT_LWR_MODEL" = libtool ; then
28493
28494 # remove dl library from $LIBS
28495 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28496
28497 fi
28498 fi
28499 ### Set up low-level terminfo dependencies for makefiles.
28500
28501 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28502 # do not need libdl
28503 TICS_LIST=
28504 if test "x$with_dlsym" = xyes ; then
28505
28506 # remove dl library from $SHLIB_LIST
28507 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28508
28509 fi
28510
28511 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28512 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28513 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28514 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28515 then
28516         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28517 fi
28518
28519 if test "$with_ticlib" != no ; then
28520
28521         if test "x$with_ticlib" != xyes ; then
28522                 TICS_NAME=$with_ticlib
28523                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28524                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28525                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28526                 TICS_LIB_SUFFIX="${with_ticlib}"
28527         else
28528                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28529                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28530                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28531                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28532         fi
28533         TICS_LDFLAGS="-L${LIB_DIR}"
28534         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28535 else
28536         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28537         TICS_LDFLAGS="-L${LIB_DIR}"
28538         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28539 fi
28540
28541 if test "$with_termlib" != no ; then
28542
28543         if test "x$with_termlib" != xyes ; then
28544                 TINFO_NAME=$with_termlib
28545                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28546                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28547                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28548                 TINFO_LIB_SUFFIX="${with_termlib}"
28549         else
28550                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28551                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28552                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28553                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28554         fi
28555
28556         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28557         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28558         if test "$DFT_LWR_MODEL" = "libtool"; then
28559                 TEST_ARGS="${TEST_DEPS}"
28560                 TEST_ARG2="${TEST_DEP2}"
28561                 TINFO_LDFLAGS="-L${LIB_DIR}"
28562                 TINFO_LIBS="$TEST_ARGS"
28563                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28564                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28565         else
28566                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28567                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28568                 if test "x$with_term_driver" != xno ; then
28569                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28570                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28571                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28572                 else
28573                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28574                         TINFO_LIBS="$TEST_ARGS"
28575                 fi
28576                 TINFO_LDFLAGS="-L${LIB_DIR}"
28577                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28578         fi
28579 else
28580         # the next lines are needed for linking libtic over libncurses
28581         TINFO_NAME=${LIB_NAME}
28582         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28583         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28584         if test "x$with_tic_depends" = xyes ; then
28585                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28586         else
28587                 TICS_LIST="$SHLIB_LIST"
28588         fi
28589
28590         TINFO_LDFLAGS="-L${LIB_DIR}"
28591         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28592 fi
28593
28594 if test "$DFT_LWR_MODEL" = shared ; then
28595         case "$cf_cv_system_name" in
28596         (cygwin*|msys*)
28597                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28598                 TINFO_SUFFIX=.dll
28599                 ;;
28600         esac
28601 fi
28602
28603 if test "x$with_dlsym" = xyes ; then
28604
28605 # remove dl library from $TICS_LIST
28606 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28607
28608 fi
28609
28610 if test "$DFT_LWR_MODEL" = "libtool"; then
28611         OBJEXT=lo
28612 fi
28613
28614 # needed for Ada95
28615 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28616
28617 case "$DFT_LWR_MODEL" in
28618 (normal|debug|profile)
28619
28620 if test "$GCC" = yes ; then
28621         case "$cf_cv_system_name" in
28622         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28623                 LDFLAGS_STATIC=
28624                 LDFLAGS_SHARED=
28625                 ;;
28626         (*)     # normally, except when broken
28627                 LDFLAGS_STATIC=-static
28628                 LDFLAGS_SHARED=-dynamic
28629                 ;;
28630         esac
28631 else
28632         case "$cf_cv_system_name" in
28633         (aix[4-7]*)     # from ld manpage
28634                 LDFLAGS_STATIC=-bstatic
28635                 LDFLAGS_SHARED=-bdynamic
28636                 ;;
28637         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28638                 # We could also use just "archive" and "shared".
28639                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28640                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28641                 ;;
28642         (irix*)         # from ld manpage IRIX64
28643                 LDFLAGS_STATIC=-Bstatic
28644                 LDFLAGS_SHARED=-Bdynamic
28645                 ;;
28646         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28647                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28648                 LDFLAGS_STATIC=-noso
28649                 LDFLAGS_SHARED=-so_archive
28650                 ;;
28651         (solaris2*)
28652                 LDFLAGS_STATIC=-Bstatic
28653                 LDFLAGS_SHARED=-Bdynamic
28654                 ;;
28655         esac
28656 fi
28657
28658 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28659 then
28660         echo "$as_me:28660: checking if linker supports switching between static/dynamic" >&5
28661 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28662
28663         rm -f libconftest.a
28664         cat >conftest.$ac_ext <<EOF
28665 #line 28665 "configure"
28666 #include <stdio.h>
28667 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28668 EOF
28669         if { (eval echo "$as_me:28669: \"$ac_compile\"") >&5
28670   (eval $ac_compile) 2>&5
28671   ac_status=$?
28672   echo "$as_me:28672: \$? = $ac_status" >&5
28673   (exit "$ac_status"); } ; then
28674                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28675                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28676         fi
28677         rm -f conftest.*
28678
28679         cf_save_LIBS="$LIBS"
28680
28681         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28682         cat >"conftest.$ac_ext" <<_ACEOF
28683 #line 28683 "configure"
28684 #include "confdefs.h"
28685
28686 #line 28686 "configure"
28687 #include <stdio.h>
28688 int cf_ldflags_static(FILE *fp);
28689
28690 int
28691 main (void)
28692 {
28693
28694         return cf_ldflags_static(stdin);
28695
28696   ;
28697   return 0;
28698 }
28699 _ACEOF
28700 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28701 if { (eval echo "$as_me:28701: \"$ac_link\"") >&5
28702   (eval $ac_link) 2>&5
28703   ac_status=$?
28704   echo "$as_me:28704: \$? = $ac_status" >&5
28705   (exit "$ac_status"); } &&
28706          { ac_try='test -s "conftest$ac_exeext"'
28707   { (eval echo "$as_me:28707: \"$ac_try\"") >&5
28708   (eval $ac_try) 2>&5
28709   ac_status=$?
28710   echo "$as_me:28710: \$? = $ac_status" >&5
28711   (exit "$ac_status"); }; }; then
28712
28713         # some linkers simply ignore the -dynamic
28714         case x`file "conftest$ac_exeext" 2>/dev/null` in
28715         (*static*)
28716                 cf_ldflags_static=no
28717                 ;;
28718         (*)
28719                 cf_ldflags_static=yes
28720                 ;;
28721         esac
28722
28723 else
28724   echo "$as_me: failed program was:" >&5
28725 cat "conftest.$ac_ext" >&5
28726 cf_ldflags_static=no
28727 fi
28728 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28729
28730         rm -f libconftest.*
28731         LIBS="$cf_save_LIBS"
28732
28733         echo "$as_me:28733: result: $cf_ldflags_static" >&5
28734 echo "${ECHO_T}$cf_ldflags_static" >&6
28735
28736         if test "$cf_ldflags_static" != yes
28737         then
28738                 LDFLAGS_STATIC=
28739                 LDFLAGS_SHARED=
28740         fi
28741 else
28742         LDFLAGS_STATIC=
28743         LDFLAGS_SHARED=
28744 fi
28745
28746         ;;
28747 esac
28748
28749 echo "$as_me:28749: checking where we will install curses.h" >&5
28750 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28751
28752 includesubdir=
28753 if test "$with_overwrite" = no && \
28754  { test "x$includedir" = 'x${prefix}/include' || \
28755    test "x$includedir" = "x${prefix}/include"; }
28756 then
28757         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28758 fi
28759 echo "$as_me:28759: result: ${includedir}${includesubdir}" >&5
28760 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28761
28762 ### Resolve a conflict between normal and wide-curses by forcing applications
28763 ### that will need libutf8 to add it to their configure script.
28764 if test "$with_overwrite" != no ; then
28765 if test "$NCURSES_LIBUTF8" = 1 ; then
28766         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28767         { echo "$as_me:28767: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28768 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28769 fi
28770 fi
28771 WITH_OVERWRITE=$with_overwrite
28772
28773 ### At least on MinGW a shared library build without libtool
28774 ### requires adding the additional libs to the link list.
28775 case "$cf_cv_system_name" in
28776 (*mingw32*|*mingw64*)
28777         if test "$DFT_LWR_MODEL" != "libtool"; then
28778            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28779         fi
28780         ;;
28781 *)      ;;
28782 esac
28783
28784 ### predefined stuff for the test programs
28785
28786 cat >>confdefs.h <<\EOF
28787 #define HAVE_SLK_COLOR 1
28788 EOF
28789
28790 # pkgsrc uses these
28791
28792 echo "$as_me:28792: checking for desired basename for form library" >&5
28793 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28794
28795 # Check whether --with-form-libname or --without-form-libname was given.
28796 if test "${with_form_libname+set}" = set; then
28797   withval="$with_form_libname"
28798   with_lib_basename=$withval
28799 else
28800   with_lib_basename=form
28801 fi;
28802 FORM_NAME="$with_lib_basename"
28803
28804 case "x$FORM_NAME" in
28805 (x|xno|xnone|xyes)
28806         FORM_NAME=form
28807         ;;
28808 (*)
28809         ;;
28810 esac
28811
28812 echo "$as_me:28812: result: $FORM_NAME" >&5
28813 echo "${ECHO_T}$FORM_NAME" >&6
28814
28815 echo "$as_me:28815: checking for desired basename for menu library" >&5
28816 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28817
28818 # Check whether --with-menu-libname or --without-menu-libname was given.
28819 if test "${with_menu_libname+set}" = set; then
28820   withval="$with_menu_libname"
28821   with_lib_basename=$withval
28822 else
28823   with_lib_basename=menu
28824 fi;
28825 MENU_NAME="$with_lib_basename"
28826
28827 case "x$MENU_NAME" in
28828 (x|xno|xnone|xyes)
28829         MENU_NAME=menu
28830         ;;
28831 (*)
28832         ;;
28833 esac
28834
28835 echo "$as_me:28835: result: $MENU_NAME" >&5
28836 echo "${ECHO_T}$MENU_NAME" >&6
28837
28838 echo "$as_me:28838: checking for desired basename for panel library" >&5
28839 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28840
28841 # Check whether --with-panel-libname or --without-panel-libname was given.
28842 if test "${with_panel_libname+set}" = set; then
28843   withval="$with_panel_libname"
28844   with_lib_basename=$withval
28845 else
28846   with_lib_basename=panel
28847 fi;
28848 PANEL_NAME="$with_lib_basename"
28849
28850 case "x$PANEL_NAME" in
28851 (x|xno|xnone|xyes)
28852         PANEL_NAME=panel
28853         ;;
28854 (*)
28855         ;;
28856 esac
28857
28858 echo "$as_me:28858: result: $PANEL_NAME" >&5
28859 echo "${ECHO_T}$PANEL_NAME" >&6
28860
28861 echo "$as_me:28861: checking for desired basename for cxx library" >&5
28862 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28863
28864 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28865 if test "${with_cxx_libname+set}" = set; then
28866   withval="$with_cxx_libname"
28867   with_lib_basename=$withval
28868 else
28869   with_lib_basename=ncurses++
28870 fi;
28871 CXX_NAME="$with_lib_basename"
28872
28873 case "x$CXX_NAME" in
28874 (x|xno|xnone|xyes)
28875         CXX_NAME=ncurses++
28876         ;;
28877 (*)
28878         ;;
28879 esac
28880
28881 echo "$as_me:28881: result: $CXX_NAME" >&5
28882 echo "${ECHO_T}$CXX_NAME" >&6
28883
28884 ### Construct the list of subdirectories for which we'll customize makefiles
28885 ### with the appropriate compile-rules.
28886
28887 echo "$as_me:28887: checking for src modules" >&5
28888 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28889
28890 # dependencies and linker-arguments for test-programs
28891 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28892 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28893 if test "$DFT_LWR_MODEL" = "libtool"; then
28894         TEST_ARGS="${TEST_DEPS}"
28895         TEST_ARG2="${TEST_DEP2}"
28896 else
28897         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28898         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28899 fi
28900
28901 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28902 cf_cv_src_modules=
28903 for cf_dir in $modules_to_build
28904 do
28905         if test -f "$srcdir/$cf_dir/modules" ; then
28906
28907                 if test -z "$cf_cv_src_modules"; then
28908                         cf_cv_src_modules=$cf_dir
28909                 else
28910                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28911                 fi
28912
28913                 # Make the ncurses_cfg.h file record the library interface files as
28914                 # well.  These are header files that are the same name as their
28915                 # directory.  Ncurses is the only library that does not follow
28916                 # that pattern.
28917                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28918
28919 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28920
28921                         cat >>confdefs.h <<EOF
28922 #define HAVE_${cf_have_include}_H 1
28923 EOF
28924
28925                         cat >>confdefs.h <<EOF
28926 #define HAVE_LIB${cf_have_include} 1
28927 EOF
28928
28929 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28930
28931 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28932
28933                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28934                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28935                         if test "$DFT_LWR_MODEL" = "libtool"; then
28936                                 TEST_ARGS="${TEST_DEPS}"
28937                                 TEST_ARG2="${TEST_DEP2}"
28938                         else
28939                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28940                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28941                         fi
28942                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28943                 fi
28944         fi
28945 done
28946 echo "$as_me:28946: result: $cf_cv_src_modules" >&5
28947 echo "${ECHO_T}$cf_cv_src_modules" >&6
28948
28949 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28950 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28951
28952 SRC_SUBDIRS=
28953 if test "x$cf_with_manpages" != xno ; then
28954         SRC_SUBDIRS="$SRC_SUBDIRS man"
28955 fi
28956 SRC_SUBDIRS="$SRC_SUBDIRS include"
28957 for cf_dir in $cf_cv_src_modules
28958 do
28959         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28960 done
28961 if test "x$cf_with_tests" != "xno" ; then
28962         SRC_SUBDIRS="$SRC_SUBDIRS test"
28963 fi
28964 # always make this, to install the ncurses-config script
28965 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28966 if test "$cf_with_cxx_binding" != no; then
28967         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28968         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28969 fi
28970
28971 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28972 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28973
28974 ADA_SUBDIRS=
28975 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28976         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28977         ADA_SUBDIRS="gen src"
28978         if test "x$cf_with_tests" != "xno" ; then
28979                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28980         fi
28981 fi
28982
28983 SUB_MAKEFILES=
28984 for cf_dir in $SRC_SUBDIRS
28985 do
28986         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28987 done
28988
28989 if test -n "$ADA_SUBDIRS"; then
28990         for cf_dir in $ADA_SUBDIRS
28991         do
28992                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28993         done
28994
28995 fi
28996
28997 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28998    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28999    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29000    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29001 fi
29002
29003 DIRS_TO_MAKE="lib"
29004 for cf_item in $cf_list_models
29005 do
29006
29007         case $cf_item in
29008         (libtool) cf_subdir='obj_lo'  ;;
29009         (normal)  cf_subdir='objects' ;;
29010         (debug)   cf_subdir='obj_g' ;;
29011         (profile) cf_subdir='obj_p' ;;
29012         (shared)
29013                 case "$cf_cv_system_name" in
29014                 (cygwin|msys)
29015                         cf_subdir='objects' ;;
29016                 (*)
29017                         cf_subdir='obj_s' ;;
29018                 esac
29019         esac
29020
29021         for cf_item2 in $DIRS_TO_MAKE
29022         do
29023                 test "$cf_item2" = "$cf_subdir" && break
29024         done
29025         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29026 done
29027 for cf_dir in $DIRS_TO_MAKE
29028 do
29029         test ! -d "$cf_dir" && mkdir "$cf_dir"
29030 done
29031
29032 # symbols that differ when compiling Ada95 by itself.
29033 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29034
29035 # values to use as strings
29036
29037 cat >>confdefs.h <<EOF
29038 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29039 EOF
29040
29041 cat >>confdefs.h <<EOF
29042 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29043 EOF
29044
29045 ### Define substitutions for header files to avoid name-pollution
29046
29047 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29048         HAVE_TCGETATTR=1
29049 else
29050         HAVE_TCGETATTR=0
29051 fi
29052
29053 if test "x$ac_cv_header_stdint_h" = xyes ; then
29054         HAVE_STDINT_H=1
29055 else
29056         HAVE_STDINT_H=0
29057 fi
29058
29059 if test "x$ac_cv_header_termio_h" = xyes ; then
29060         HAVE_TERMIO_H=1
29061 else
29062         HAVE_TERMIO_H=0
29063 fi
29064
29065 if test "x$ac_cv_header_termios_h" = xyes ; then
29066         HAVE_TERMIOS_H=1
29067 else
29068         HAVE_TERMIOS_H=0
29069 fi
29070
29071 ################################################################################
29072 test "x$use_database" = xyes && \
29073 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29074
29075 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29076 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29077
29078 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29079 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29080 fi
29081
29082 if test "x$cf_with_tests" != xno ; then
29083         MAKE_TESTS=
29084 else
29085         MAKE_TESTS="#"
29086 fi
29087
29088 ADAHTML_DIR=../../doc/html/ada
29089
29090 # workaround for OS/2 (20151017)
29091 case "$cf_cv_system_name" in
29092 (os2*)
29093         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29094         ;;
29095 (*)
29096         LIBTOOL_OPTS_CXX=
29097         ;;
29098 esac
29099
29100 # workaround for g++ versus Solaris (20131116)
29101 case "$cf_cv_system_name" in
29102 (solaris2*)
29103         case "x$CPPFLAGS" in
29104         (*-D_XOPEN_SOURCE_EXTENDED*)
29105                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29106
29107 echo "${as_me:-configure}:29107: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29108
29109                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29110                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29111                 ;;
29112         esac
29113         ;;
29114 esac
29115
29116 # Help to automatically enable the extended curses features when using either
29117 # the *-config or the ".pc" files by adding defines.
29118 echo "$as_me:29118: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29119 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29120 PKG_CFLAGS=
29121 for cf_loop1 in $CPPFLAGS_after_XOPEN
29122 do
29123         cf_found=no
29124         for cf_loop2 in $CPPFLAGS_before_XOPEN
29125         do
29126                 if test "x$cf_loop1" = "x$cf_loop2"
29127                 then
29128                         cf_found=yes
29129                         break
29130                 fi
29131         done
29132         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29133 done
29134 echo "$as_me:29134: result: $PKG_CFLAGS" >&5
29135 echo "${ECHO_T}$PKG_CFLAGS" >&6
29136
29137 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29138 case "x$NCURSES_OSPEED" in
29139 (*short*)
29140         cf_compatible=1
29141         ;;
29142 (*)
29143         cf_compatible=0
29144         ;;
29145 esac
29146
29147 cat >>confdefs.h <<EOF
29148 #define NCURSES_OSPEED_COMPAT $cf_compatible
29149 EOF
29150
29151 case "x$cf_cv_typeof_chtype" in
29152 (xshort|xint|xlong)
29153         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29154         ;;
29155 esac
29156
29157 case "x$cf_cv_typeof_mmask_t" in
29158 (xshort|xint|xlong)
29159         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29160         ;;
29161 esac
29162
29163 # substitute into misc/Makefile to suppress
29164 # (un)install.data from the
29165 # (un)install rules.
29166 if test "x$cf_with_db_install" = "xno"; then
29167         MISC_INSTALL_DATA=
29168         MISC_UNINSTALL_DATA=
29169 else
29170         MISC_INSTALL_DATA=install.data
29171         MISC_UNINSTALL_DATA=uninstall.data
29172 fi
29173
29174 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29175         MAKE_DATABASE="#"
29176 else
29177         MAKE_DATABASE="$MAKE_TERMINFO"
29178 fi
29179
29180 if test -n "$PACKAGE"
29181 then
29182         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29183         export PACKAGE
29184         echo "package: $PACKAGE"
29185 fi
29186
29187 UNALTERED_SYMS=
29188 cf_filter_syms=no
29189
29190 if test -n "$RESULTING_SYMS"
29191 then
29192         cf_filter_syms=$cf_dft_filter_syms
29193         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29194
29195 echo "${as_me:-configure}:29195: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29196
29197 fi
29198
29199 if test "x$WILDCARD_SYMS" = xno
29200 then
29201         cf_filter_syms=yes
29202 fi
29203
29204 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29205
29206 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29207 if test "$cf_filter_syms" = yes
29208 then
29209         RESULTING_SYMS=resulting.map
29210 fi
29211
29212 if test "x$cross_compiling" = xyes ; then
29213         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29214         CHECK_BUILD="#"
29215 else
29216         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29217         CHECK_BUILD=
29218 fi
29219
29220 # This is used for the *-config script and *.pc data files.
29221
29222 echo "$as_me:29222: checking for linker search path" >&5
29223 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29224 if test "${cf_cv_ld_searchpath+set}" = set; then
29225   echo $ECHO_N "(cached) $ECHO_C" >&6
29226 else
29227
29228 if test "$cross_compiling" != yes ; then
29229
29230 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29231 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29232
29233 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29234 # update the cache, which makes it run faster.
29235 test -z "$cf_pathlist" && \
29236         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29237
29238 test -z "$cf_pathlist" &&
29239         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29240
29241 # This works with OpenBSD 6.5, which lists only filenames
29242 test -z "$cf_pathlist" &&
29243         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29244
29245 if test -z "$cf_pathlist"
29246 then
29247         # dyld default path with MacOS
29248         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29249         then
29250                 # do this to bypass check
29251                 cf_cv_ld_searchpath='$HOME/lib'
29252                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29253         fi
29254 fi
29255
29256 if test -z "$cf_pathlist"
29257 then
29258         # Solaris is "SunOS"
29259         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29260         then
29261                 case x`(isainfo -b)` in
29262                 (x64)
29263                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29264                         ;;
29265                 (x32)
29266                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29267                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29268                         ;;
29269                 (*)
29270                         { echo "$as_me:29270: WARNING: problem with Solaris architecture" >&5
29271 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29272                         ;;
29273                 esac
29274         fi
29275 fi
29276
29277 if test -z "$cf_pathlist"
29278 then
29279         # HP-UX
29280         if test x"`uname -s`" = xHP-UX
29281         then
29282                 case x`getconf LONG_BIT` in
29283                 (x64)
29284                         cf_pathlist="/usr/lib/hpux64"
29285                         ;;
29286                 (x*)
29287                         cf_pathlist="/usr/lib/hpux32"
29288                         ;;
29289                 esac
29290         fi
29291 fi
29292
29293 fi
29294
29295 # If nothing else, assume it is conventional
29296 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29297
29298 # Finally, check that this is only directories
29299 for cf_path in $0 $cf_pathlist
29300 do
29301         if test -d "$cf_path"; then
29302                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29303                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29304         fi
29305 done
29306
29307 # Ensure that it is nonempty
29308 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29309
29310 fi
29311 echo "$as_me:29311: result: $cf_cv_ld_searchpath" >&5
29312 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29313
29314 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29315
29316 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"
29317 ac_config_commands="$ac_config_commands default"
29318 cat >confcache <<\_ACEOF
29319 # This file is a shell script that caches the results of configure
29320 # tests run on this system so they can be shared between configure
29321 # scripts and configure runs, see configure's option --config-cache.
29322 # It is not useful on other systems.  If it contains results you don't
29323 # want to keep, you may remove or edit it.
29324 #
29325 # config.status only pays attention to the cache file if you give it
29326 # the --recheck option to rerun configure.
29327 #
29328 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29329 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29330 # following values.
29331
29332 _ACEOF
29333
29334 # The following way of writing the cache mishandles newlines in values,
29335 # but we know of no workaround that is simple, portable, and efficient.
29336 # So, don't put newlines in cache variables' values.
29337 # Ultrix sh set writes to stderr and can't be redirected directly,
29338 # and sets the high bit in the cache file unless we assign to the vars.
29339 {
29340   (set) 2>&1 |
29341     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29342     *ac_space=\ *)
29343       # `set' does not quote correctly, so add quotes (double-quote
29344       # substitution turns \\\\ into \\, and sed turns \\ into \).
29345       sed -n \
29346         "s/'/'\\\\''/g;
29347           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29348       ;;
29349     *)
29350       # `set' quotes correctly as required by POSIX, so do not add quotes.
29351       sed -n \
29352         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29353       ;;
29354     esac;
29355 } |
29356   sed '
29357      t clear
29358      : clear
29359      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29360      t end
29361      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29362      : end' >>confcache
29363 if cmp -s $cache_file confcache; then :; else
29364   if test -w $cache_file; then
29365     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29366     cat confcache >$cache_file
29367   else
29368     echo "not updating unwritable cache $cache_file"
29369   fi
29370 fi
29371 rm -f confcache
29372
29373 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29374 # Let make expand exec_prefix.
29375 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29376
29377 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29378 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29379 # trailing colons and then remove the whole line if VPATH becomes empty
29380 # (actually we leave an empty line to preserve line numbers).
29381 if test "x$srcdir" = x.; then
29382   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29383 s/:*\$(srcdir):*/:/;
29384 s/:*\${srcdir}:*/:/;
29385 s/:*@srcdir@:*/:/;
29386 s/^\([^=]*=[    ]*\):*/\1/;
29387 s/:*$//;
29388 s/^[^=]*=[      ]*$//;
29389 }'
29390 fi
29391
29392 DEFS=-DHAVE_CONFIG_H
29393
29394 : "${CONFIG_STATUS=./config.status}"
29395 ac_clean_files_save=$ac_clean_files
29396 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29397 { echo "$as_me:29397: creating $CONFIG_STATUS" >&5
29398 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29399 cat >"$CONFIG_STATUS" <<_ACEOF
29400 #! $SHELL
29401 # Generated automatically by configure.
29402 # Run this file to recreate the current configuration.
29403 # Compiler output produced by configure, useful for debugging
29404 # configure, is in config.log if it exists.
29405
29406 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29407
29408 debug=false
29409 SHELL=\${CONFIG_SHELL-$SHELL}
29410 ac_cs_invocation="\$0 \$@"
29411
29412 CLICOLOR_FORCE= GREP_OPTIONS=
29413 unset CLICOLOR_FORCE GREP_OPTIONS
29414 _ACEOF
29415
29416 cat >>"$CONFIG_STATUS" <<\_ACEOF
29417 # Be Bourne compatible
29418 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29419   emulate sh
29420   NULLCMD=:
29421 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29422   set -o posix
29423 fi
29424
29425 # Name of the executable.
29426 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29427
29428 if expr a : '\(a\)' >/dev/null 2>&1; then
29429   as_expr="expr"
29430 else
29431   as_expr="false"
29432 fi
29433
29434 rm -f conf$$ conf$$.exe conf$$.file
29435 echo >conf$$.file
29436 if ln -s conf$$.file conf$$ 2>/dev/null; then
29437   # We could just check for DJGPP; but this test a) works b) is more generic
29438   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29439   if test -f conf$$.exe; then
29440     # Don't use ln at all; we don't have any links
29441     as_ln_s='cp -p'
29442   else
29443     as_ln_s='ln -s'
29444   fi
29445 elif ln conf$$.file conf$$ 2>/dev/null; then
29446   as_ln_s='ln'
29447 else
29448   as_ln_s='cp -p'
29449 fi
29450 rm -f conf$$ conf$$.exe conf$$.file
29451
29452 as_executable_p="test -f"
29453
29454 # Support unset when possible.
29455 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29456   as_unset="unset"
29457 else
29458   as_unset="false"
29459 fi
29460
29461 # NLS nuisances.
29462 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29463 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29464 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29465 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29466 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29467 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29468 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29469 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29470
29471 # IFS
29472 # We need space, tab and new line, in precisely that order.
29473 as_nl='
29474 '
29475 IFS="   $as_nl"
29476
29477 # CDPATH.
29478 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29479
29480 exec 6>&1
29481
29482 _ACEOF
29483
29484 # Files that config.status was made for.
29485 if test -n "$ac_config_files"; then
29486   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29487 fi
29488
29489 if test -n "$ac_config_headers"; then
29490   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29491 fi
29492
29493 if test -n "$ac_config_links"; then
29494   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29495 fi
29496
29497 if test -n "$ac_config_commands"; then
29498   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29499 fi
29500
29501 cat >>"$CONFIG_STATUS" <<\EOF
29502
29503 ac_cs_usage="\
29504 \`$as_me' instantiates files from templates according to the
29505 current configuration.
29506
29507 Usage: $0 [OPTIONS] [FILE]...
29508
29509   -h, --help       print this help, then exit
29510   -V, --version    print version number, then exit
29511   -d, --debug      don't remove temporary files
29512       --recheck    update $as_me by reconfiguring in the same conditions
29513   --file=FILE[:TEMPLATE]
29514                    instantiate the configuration file FILE
29515   --header=FILE[:TEMPLATE]
29516                    instantiate the configuration header FILE
29517
29518 Configuration files:
29519 $config_files
29520
29521 Configuration headers:
29522 $config_headers
29523
29524 Configuration commands:
29525 $config_commands
29526
29527 Report bugs to <dickey@invisible-island.net>."
29528 EOF
29529
29530 cat >>"$CONFIG_STATUS" <<EOF
29531 ac_cs_version="\\
29532 config.status
29533 configured by $0, generated by GNU Autoconf 2.52.20230114,
29534   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29535
29536 Copyright 2003-2022,2023        Thomas E. Dickey
29537 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29538 Free Software Foundation, Inc.
29539 This config.status script is free software; the Free Software Foundation
29540 gives unlimited permission to copy, distribute and modify it."
29541 srcdir="$srcdir"
29542 INSTALL="$INSTALL"
29543 EOF
29544
29545 cat >>"$CONFIG_STATUS" <<\EOF
29546 # If no file are specified by the user, then we need to provide default
29547 # value.  By we need to know if files were specified by the user.
29548 ac_need_defaults=:
29549 while test $# != 0
29550 do
29551   case $1 in
29552   --*=*)
29553     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29554     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29555     shift
29556     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29557     shift
29558     ;;
29559   -*);;
29560   *) # This is not an option, so the user has probably given explicit
29561      # arguments.
29562      ac_need_defaults=false;;
29563   esac
29564
29565   case $1 in
29566   # Handling of the options.
29567 EOF
29568 cat >>"$CONFIG_STATUS" <<EOF
29569   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29570     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29571     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29572 EOF
29573 cat >>"$CONFIG_STATUS" <<\EOF
29574   --version | --vers* | -V )
29575     echo "$ac_cs_version"; exit 0 ;;
29576   --he | --h)
29577     # Conflict between --help and --header
29578     { { echo "$as_me:29578: error: ambiguous option: $1
29579 Try \`$0 --help' for more information." >&5
29580 echo "$as_me: error: ambiguous option: $1
29581 Try \`$0 --help' for more information." >&2;}
29582    { (exit 1); exit 1; }; };;
29583   --help | --hel | -h )
29584     echo "$ac_cs_usage"; exit 0 ;;
29585   --debug | --d* | -d )
29586     debug=: ;;
29587   --file | --fil | --fi | --f )
29588     shift
29589     CONFIG_FILES="$CONFIG_FILES $1"
29590     ac_need_defaults=false;;
29591   --header | --heade | --head | --hea )
29592     shift
29593     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29594     ac_need_defaults=false;;
29595
29596   # This is an error.
29597   -*) { { echo "$as_me:29597: error: unrecognized option: $1
29598 Try \`$0 --help' for more information." >&5
29599 echo "$as_me: error: unrecognized option: $1
29600 Try \`$0 --help' for more information." >&2;}
29601    { (exit 1); exit 1; }; } ;;
29602
29603   *) ac_config_targets="$ac_config_targets $1" ;;
29604
29605   esac
29606   shift
29607 done
29608
29609 exec 5>>config.log
29610 cat >&5 << _ACEOF
29611
29612 ## ----------------------- ##
29613 ## Running config.status.  ##
29614 ## ----------------------- ##
29615
29616 This file was extended by $as_me 2.52.20230114, executed with
29617   CONFIG_FILES    = $CONFIG_FILES
29618   CONFIG_HEADERS  = $CONFIG_HEADERS
29619   CONFIG_LINKS    = $CONFIG_LINKS
29620   CONFIG_COMMANDS = $CONFIG_COMMANDS
29621   > "$ac_cs_invocation"
29622 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29623
29624 _ACEOF
29625 EOF
29626
29627 cat >>"$CONFIG_STATUS" <<EOF
29628 #
29629 # INIT-COMMANDS section.
29630 #
29631
29632 ### Special initialization commands, used to pass information from the
29633 ### configuration-run into config.status
29634
29635 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29636 AWK="$AWK"
29637 CXX_NAME="$CXX_NAME"
29638 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29639 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29640 ECHO_LD="$ECHO_LD"
29641 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29642 FORM_NAME="$FORM_NAME"
29643 LDCONFIG="$LDCONFIG"
29644 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29645 LIB_NAME="$LIB_NAME"
29646 LIB_PREFIX="$LIB_PREFIX"
29647 LIB_SUBSETS="$LIB_SUBSETS"
29648 LIB_SUFFIX="$LIB_SUFFIX"
29649 LIB_TRACING="$LIB_TRACING"
29650 LN_S="$LN_S"
29651 MAKE_TERMINFO="$MAKE_TERMINFO"
29652 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29653 MENU_NAME="$MENU_NAME"
29654 NCURSES_MAJOR="$NCURSES_MAJOR"
29655 NCURSES_MINOR="$NCURSES_MINOR"
29656 NCURSES_OSPEED="$NCURSES_OSPEED"
29657 NCURSES_PATCH="$NCURSES_PATCH"
29658 PANEL_NAME="$PANEL_NAME"
29659 SRC_SUBDIRS="$SRC_SUBDIRS"
29660 TERMINFO="$TERMINFO"
29661 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29662 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29663 TICS_NAME="$TICS_NAME"
29664 TICS_SUFFIX="$TICS_SUFFIX"
29665 TIC_PATH="$TIC_PATH"
29666 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29667 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29668 TINFO_NAME="$TINFO_NAME"
29669 TINFO_SUFFIX="$TINFO_SUFFIX"
29670 UNALTERED_SYMS="$UNALTERED_SYMS"
29671 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29672 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29673 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29674 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29675 WILDCARD_SYMS="$WILDCARD_SYMS"
29676 WITH_CURSES_H="$with_curses_h"
29677 WITH_ECHO="${enable_echo:=yes}"
29678 WITH_OVERWRITE="$with_overwrite"
29679 cf_LIST_MODELS="$cf_list_models"
29680 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29681 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29682 cf_cv_abi_default="$cf_cv_abi_default"
29683 cf_cv_abi_version="$cf_cv_abi_version"
29684 cf_cv_do_relink="$cf_cv_do_relink"
29685 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29686 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29687 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29688 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29689 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29690 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29691 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29692 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29693 cf_cv_rel_version="$cf_cv_rel_version"
29694 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29695 cf_cv_shared_soname='$cf_cv_shared_soname'
29696 cf_cv_shlib_version="$cf_cv_shlib_version"
29697 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29698 cf_cv_system_name="$cf_cv_system_name"
29699 cf_cv_term_driver="$with_term_driver"
29700 cf_with_ada="$cf_with_ada"
29701 cf_with_cxx_binding="$cf_with_cxx_binding"
29702 cf_with_db_install="$cf_with_db_install"
29703 cf_with_manpages="$cf_with_manpages"
29704 cf_with_tests="$cf_with_tests"
29705 host="$host"
29706 target="$target"
29707 verbose="$verbose"
29708 with_shared_cxx="$with_shared_cxx"
29709
29710 EOF
29711
29712 cat >>"$CONFIG_STATUS" <<\EOF
29713 for ac_config_target in $ac_config_targets
29714 do
29715   case "$ac_config_target" in
29716   # Handling of arguments.
29717   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29718   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29719   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29720   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29721   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29722   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29723   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29724   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29725   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29726   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29727   *) { { echo "$as_me:29727: error: invalid argument: $ac_config_target" >&5
29728 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29729    { (exit 1); exit 1; }; };;
29730   esac
29731 done
29732
29733 # If the user did not use the arguments to specify the items to instantiate,
29734 # then the envvar interface is used.  Set only those that are not.
29735 # We use the long form for the default assignment because of an extremely
29736 # bizarre bug on SunOS 4.1.3.
29737 if "$ac_need_defaults"; then
29738   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29739   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29740   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29741 fi
29742
29743 # Create a temporary directory, and hook for its removal unless debugging.
29744 $debug ||
29745 {
29746   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29747   trap '{ (exit 1); exit 1; }' 1 2 13 15
29748 }
29749
29750 # Create a (secure) tmp directory for tmp files.
29751 : "${TMPDIR=/tmp}"
29752 {
29753   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29754   test -n "$tmp" && test -d "$tmp"
29755 }  ||
29756 {
29757   tmp=$TMPDIR/cs$$-$RANDOM
29758   (umask 077 && mkdir "$tmp")
29759 } ||
29760 {
29761    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29762    { (exit 1); exit 1; }
29763 }
29764
29765 EOF
29766
29767 cat >>"$CONFIG_STATUS" <<EOF
29768
29769 #
29770 # CONFIG_FILES section.
29771 #
29772
29773 # No need to generate the scripts if there are no CONFIG_FILES.
29774 # This happens for instance when ./config.status config.h
29775 if test -n "\$CONFIG_FILES"; then
29776   # Protect against being on the right side of a sed subst in config.status.
29777   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29778    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29779 s,@SHELL@,$SHELL,;t t
29780 s,@exec_prefix@,$exec_prefix,;t t
29781 s,@prefix@,$prefix,;t t
29782 s,@program_transform_name@,$program_transform_name,;t t
29783 s,@bindir@,$bindir,;t t
29784 s,@sbindir@,$sbindir,;t t
29785 s,@libexecdir@,$libexecdir,;t t
29786 s,@datarootdir@,$datarootdir,;t t
29787 s,@datadir@,$datadir,;t t
29788 s,@sysconfdir@,$sysconfdir,;t t
29789 s,@sharedstatedir@,$sharedstatedir,;t t
29790 s,@localstatedir@,$localstatedir,;t t
29791 s,@runstatedir@,$runstatedir,;t t
29792 s,@libdir@,$libdir,;t t
29793 s,@includedir@,$includedir,;t t
29794 s,@oldincludedir@,$oldincludedir,;t t
29795 s,@infodir@,$infodir,;t t
29796 s,@mandir@,$mandir,;t t
29797 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29798 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29799 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29800 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29801 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29802 s,@build_alias@,$build_alias,;t t
29803 s,@host_alias@,$host_alias,;t t
29804 s,@target_alias@,$target_alias,;t t
29805 s,@ECHO_C@,$ECHO_C,;t t
29806 s,@ECHO_N@,$ECHO_N,;t t
29807 s,@ECHO_T@,$ECHO_T,;t t
29808 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29809 s,@DEFS@,$DEFS,;t t
29810 s,@LIBS@,$LIBS,;t t
29811 s,@top_builddir@,$top_builddir,;t t
29812 s,@GREP@,$GREP,;t t
29813 s,@EGREP@,$EGREP,;t t
29814 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29815 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29816 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29817 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29818 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29819 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29820 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29821 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29822 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29823 s,@VERSION@,$VERSION,;t t
29824 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29825 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29826 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29827 s,@PACKAGE@,$PACKAGE,;t t
29828 s,@build@,$build,;t t
29829 s,@build_cpu@,$build_cpu,;t t
29830 s,@build_vendor@,$build_vendor,;t t
29831 s,@build_os@,$build_os,;t t
29832 s,@host@,$host,;t t
29833 s,@host_cpu@,$host_cpu,;t t
29834 s,@host_vendor@,$host_vendor,;t t
29835 s,@host_os@,$host_os,;t t
29836 s,@target@,$target,;t t
29837 s,@target_cpu@,$target_cpu,;t t
29838 s,@target_vendor@,$target_vendor,;t t
29839 s,@target_os@,$target_os,;t t
29840 s,@FGREP@,$FGREP,;t t
29841 s,@CC@,$CC,;t t
29842 s,@CFLAGS@,$CFLAGS,;t t
29843 s,@LDFLAGS@,$LDFLAGS,;t t
29844 s,@CPPFLAGS@,$CPPFLAGS,;t t
29845 s,@ac_ct_CC@,$ac_ct_CC,;t t
29846 s,@EXEEXT@,$EXEEXT,;t t
29847 s,@OBJEXT@,$OBJEXT,;t t
29848 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29849 s,@CPP@,$CPP,;t t
29850 s,@LDCONFIG@,$LDCONFIG,;t t
29851 s,@CXX@,$CXX,;t t
29852 s,@CXXFLAGS@,$CXXFLAGS,;t t
29853 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29854 s,@AWK@,$AWK,;t t
29855 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29856 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29857 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29858 s,@LINT@,$LINT,;t t
29859 s,@LINT_OPTS@,$LINT_OPTS,;t t
29860 s,@LINT_LIBS@,$LINT_LIBS,;t t
29861 s,@LN_S@,$LN_S,;t t
29862 s,@cf_config_suffix@,$cf_config_suffix,;t t
29863 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29864 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29865 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29866 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29867 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29868 s,@SET_MAKE@,$SET_MAKE,;t t
29869 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29870 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29871 s,@CTAGS@,$CTAGS,;t t
29872 s,@ETAGS@,$ETAGS,;t t
29873 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29874 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29875 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29876 s,@RANLIB@,$RANLIB,;t t
29877 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29878 s,@LD@,$LD,;t t
29879 s,@ac_ct_LD@,$ac_ct_LD,;t t
29880 s,@AR@,$AR,;t t
29881 s,@ac_ct_AR@,$ac_ct_AR,;t t
29882 s,@NM@,$NM,;t t
29883 s,@ac_ct_NM@,$ac_ct_NM,;t t
29884 s,@ARFLAGS@,$ARFLAGS,;t t
29885 s,@DESTDIR@,$DESTDIR,;t t
29886 s,@BUILD_CC@,$BUILD_CC,;t t
29887 s,@BUILD_CPP@,$BUILD_CPP,;t t
29888 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29889 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29890 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29891 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29892 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29893 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29894 s,@cf_list_models@,$cf_list_models,;t t
29895 s,@ABI_VERSION@,$ABI_VERSION,;t t
29896 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29897 s,@LIBTOOL@,$LIBTOOL,;t t
29898 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29899 s,@LT_UNDEF@,$LT_UNDEF,;t t
29900 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29901 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29902 s,@LIB_CREATE@,$LIB_CREATE,;t t
29903 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29904 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29905 s,@LIB_PREP@,$LIB_PREP,;t t
29906 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29907 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29908 s,@LIB_LINK@,$LIB_LINK,;t t
29909 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29910 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29911 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29912 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29913 s,@TICS_NAME@,$TICS_NAME,;t t
29914 s,@TINFO_NAME@,$TINFO_NAME,;t t
29915 s,@LIB_NAME@,$LIB_NAME,;t t
29916 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29917 s,@CC_G_OPT@,$CC_G_OPT,;t t
29918 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29919 s,@LD_MODEL@,$LD_MODEL,;t t
29920 s,@shlibdir@,$shlibdir,;t t
29921 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29922 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29923 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29924 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29925 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29926 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29927 s,@LINK_PROGS@,$LINK_PROGS,;t t
29928 s,@LINK_TESTS@,$LINK_TESTS,;t t
29929 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29930 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29931 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29932 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29933 s,@RPATH_LIST@,$RPATH_LIST,;t t
29934 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29935 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29936 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29937 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29938 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29939 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29940 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29941 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29942 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29943 s,@TIC@,$TIC,;t t
29944 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29945 s,@INFOCMP@,$INFOCMP,;t t
29946 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29947 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29948 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29949 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29950 s,@XTERM_KBS@,$XTERM_KBS,;t t
29951 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29952 s,@TERMINFO@,$TERMINFO,;t t
29953 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29954 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29955 s,@TERMPATH@,$TERMPATH,;t t
29956 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29957 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29958 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29959 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29960 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29961 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29962 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29963 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29964 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29965 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29966 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29967 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29968 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29969 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29970 s,@RGB_PATH@,$RGB_PATH,;t t
29971 s,@no_x11_rgb@,$no_x11_rgb,;t t
29972 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29973 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29974 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29975 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29976 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29977 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29978 s,@cf_manpage_format@,$cf_manpage_format,;t t
29979 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
29980 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
29981 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
29982 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29983 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29984 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29985 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29986 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29987 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29988 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29989 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29990 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29991 s,@PTHREAD@,$PTHREAD,;t t
29992 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29993 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29994 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29995 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29996 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29997 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29998 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29999 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30000 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30001 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30002 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30003 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30004 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30005 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30006 s,@ECHO_LT@,$ECHO_LT,;t t
30007 s,@ECHO_LD@,$ECHO_LD,;t t
30008 s,@RULE_CC@,$RULE_CC,;t t
30009 s,@SHOW_CC@,$SHOW_CC,;t t
30010 s,@ECHO_CC@,$ECHO_CC,;t t
30011 s,@ECHO_LINK@,$ECHO_LINK,;t t
30012 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30013 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30014 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30015 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30016 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30017 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30018 s,@ADAFLAGS@,$ADAFLAGS,;t t
30019 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30020 s,@ADA_TRACE@,$ADA_TRACE,;t t
30021 s,@MATH_LIB@,$MATH_LIB,;t t
30022 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30023 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30024 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30025 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30026 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30027 s,@TEST_LIBS@,$TEST_LIBS,;t t
30028 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30029 s,@CXXCPP@,$CXXCPP,;t t
30030 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30031 s,@CXX_AR@,$CXX_AR,;t t
30032 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30033 s,@CXXLIBS@,$CXXLIBS,;t t
30034 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30035 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30036 s,@M4_exists@,$M4_exists,;t t
30037 s,@cf_ada_make@,$cf_ada_make,;t t
30038 s,@cf_ada_config@,$cf_ada_config,;t t
30039 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30040 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30041 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30042 s,@cf_compile_generics@,$cf_compile_generics,;t t
30043 s,@cf_generic_objects@,$cf_generic_objects,;t t
30044 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30045 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30046 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30047 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30048 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30049 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30050 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30051 s,@cf_ada_package@,$cf_ada_package,;t t
30052 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30053 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30054 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30055 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30056 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30057 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30058 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30059 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30060 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30061 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30062 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30063 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30064 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30065 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30066 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30067 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30068 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30069 s,@TICS_LIBS@,$TICS_LIBS,;t t
30070 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30071 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30072 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30073 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30074 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30075 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30076 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30077 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30078 s,@includesubdir@,$includesubdir,;t t
30079 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30080 s,@TICS_LIST@,$TICS_LIST,;t t
30081 s,@TINFO_LIST@,$TINFO_LIST,;t t
30082 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30083 s,@FORM_NAME@,$FORM_NAME,;t t
30084 s,@MENU_NAME@,$MENU_NAME,;t t
30085 s,@PANEL_NAME@,$PANEL_NAME,;t t
30086 s,@CXX_NAME@,$CXX_NAME,;t t
30087 s,@TEST_ARGS@,$TEST_ARGS,;t t
30088 s,@TEST_DEPS@,$TEST_DEPS,;t t
30089 s,@TEST_ARG2@,$TEST_ARG2,;t t
30090 s,@TEST_DEP2@,$TEST_DEP2,;t t
30091 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30092 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30093 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30094 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30095 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30096 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30097 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30098 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30099 s,@cross_compiling@,$cross_compiling,;t t
30100 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30101 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30102 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30103 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30104 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30105 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30106 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30107 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30108 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30109 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30110 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30111 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30112 CEOF
30113
30114 EOF
30115
30116   cat >>"$CONFIG_STATUS" <<\EOF
30117   # Split the substitutions into bite-sized pieces for seds with
30118   # small command number limits, like on Digital OSF/1 and HP-UX.
30119   ac_max_sed_lines=48
30120   ac_sed_frag=1 # Number of current file.
30121   ac_beg=1 # First line for current file.
30122   ac_end=$ac_max_sed_lines # Line after last line for current file.
30123   ac_more_lines=:
30124   ac_sed_cmds=
30125   while "$ac_more_lines"; do
30126     if test "$ac_beg" -gt 1; then
30127       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30128     else
30129       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30130     fi
30131     if test ! -s "$tmp"/subs.frag; then
30132       ac_more_lines=false
30133     else
30134       # The purpose of the label and of the branching condition is to
30135       # speed up the sed processing (if there are no `@' at all, there
30136       # is no need to browse any of the substitutions).
30137       # These are the two extra sed commands mentioned above.
30138       (echo ':t
30139   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30140       # It is possible to make a multiline substitution using escaped newlines.
30141       # Ensure that we do not split the substitution between script fragments.
30142       ac_BEG=$ac_end
30143       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30144       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30145       if test -s "$tmp"/subs.next; then
30146         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30147         if test ! -s "$tmp"/subs.edit; then
30148           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30149           if test ! -s "$tmp"/subs.edit; then
30150             if test "$ac_beg" -gt 1; then
30151               ac_end=`expr "$ac_end" - 1`
30152               continue
30153             fi
30154           fi
30155         fi
30156       fi
30157
30158       if test -z "$ac_sed_cmds"; then
30159         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30160       else
30161         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30162       fi
30163       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30164       ac_beg=$ac_end
30165       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30166     fi
30167   done
30168   if test -z "$ac_sed_cmds"; then
30169     ac_sed_cmds="cat"
30170   fi
30171 fi # test -n "$CONFIG_FILES"
30172
30173 EOF
30174 cat >>"$CONFIG_STATUS" <<\EOF
30175 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30176   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30177   case "$ac_file" in
30178   - | *:- | *:-:* ) # input from stdin
30179         cat >"$tmp"/stdin
30180         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30181         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30182   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30183         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30184   * )   ac_file_in=$ac_file.in ;;
30185   esac
30186
30187   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30188   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30189          X"$ac_file" : 'X\(//\)[^/]' \| \
30190          X"$ac_file" : 'X\(//\)$' \| \
30191          X"$ac_file" : 'X\(/\)' \| \
30192          .     : '\(.\)' 2>/dev/null ||
30193 echo X"$ac_file" |
30194     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30195           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30196           /^X\(\/\/\)$/{ s//\1/; q; }
30197           /^X\(\/\).*/{ s//\1/; q; }
30198           s/.*/./; q'`
30199   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30200     { case "$ac_dir" in
30201   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30202   *)                      as_incr_dir=.;;
30203 esac
30204 as_dummy="$ac_dir"
30205 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30206   case $as_mkdir_dir in
30207     # Skip DOS drivespec
30208     ?:) as_incr_dir=$as_mkdir_dir ;;
30209     *)
30210       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30211       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30212     ;;
30213   esac
30214 done; }
30215
30216     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30217     # A "../" for each directory in $ac_dir_suffix.
30218     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30219   else
30220     ac_dir_suffix= ac_dots=
30221   fi
30222
30223   case "$srcdir" in
30224   .)  ac_srcdir=.
30225       if test -z "$ac_dots"; then
30226          ac_top_srcdir=.
30227       else
30228          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30229       fi ;;
30230   [\\/]* | ?:[\\/]* )
30231       ac_srcdir="$srcdir$ac_dir_suffix";
30232       ac_top_srcdir="$srcdir" ;;
30233   *) # Relative path.
30234     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30235     ac_top_srcdir="$ac_dots$srcdir" ;;
30236   esac
30237
30238   case $INSTALL in
30239   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30240   *) ac_INSTALL=$ac_dots$INSTALL ;;
30241   esac
30242
30243   if test x"$ac_file" != x-; then
30244     { echo "$as_me:30244: creating $ac_file" >&5
30245 echo "$as_me: creating $ac_file" >&6;}
30246     rm -f "$ac_file"
30247   fi
30248   # Let's still pretend it is `configure' which instantiates (i.e., don't
30249   # use $as_me), people would be surprised to read:
30250   #    /* config.h.  Generated automatically by config.status.  */
30251   configure_input="Generated automatically from `echo $ac_file_in |
30252                                                  sed 's,.*/,,'` by configure."
30253
30254   # First look for the input files in the build tree, otherwise in the
30255   # src tree.
30256   ac_file_inputs=`IFS=:
30257     for f in $ac_file_in; do
30258       case $f in
30259       -) echo "$tmp"/stdin ;;
30260       [\\/$]*)
30261          # Absolute (can't be DOS-style, as IFS=:)
30262          test -f "$f" || { { echo "$as_me:30262: error: cannot find input file: $f" >&5
30263 echo "$as_me: error: cannot find input file: $f" >&2;}
30264    { (exit 1); exit 1; }; }
30265          echo "$f";;
30266       *) # Relative
30267          if test -f "$f"; then
30268            # Build tree
30269            echo "$f"
30270          elif test -f "$srcdir/$f"; then
30271            # Source tree
30272            echo "$srcdir/$f"
30273          else
30274            # /dev/null tree
30275            { { echo "$as_me:30275: error: cannot find input file: $f" >&5
30276 echo "$as_me: error: cannot find input file: $f" >&2;}
30277    { (exit 1); exit 1; }; }
30278          fi;;
30279       esac
30280     done` || { (exit 1); exit 1; }
30281 EOF
30282 cat >>"$CONFIG_STATUS" <<\EOF
30283   ac_warn_datarootdir=no
30284   if test x"$ac_file" != x-; then
30285     for ac_item in $ac_file_inputs
30286     do
30287       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30288       if test -n "$ac_seen"; then
30289         ac_used=`grep '@datarootdir@' "$ac_item"`
30290         if test -z "$ac_used"; then
30291           { echo "$as_me:30291: WARNING: datarootdir was used implicitly but not set:
30292 $ac_seen" >&5
30293 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30294 $ac_seen" >&2;}
30295           ac_warn_datarootdir=yes
30296         fi
30297       fi
30298       ac_seen=`grep '${datarootdir}' "$ac_item"`
30299       if test -n "$ac_seen"; then
30300         { echo "$as_me:30300: WARNING: datarootdir was used explicitly but not set:
30301 $ac_seen" >&5
30302 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30303 $ac_seen" >&2;}
30304         ac_warn_datarootdir=yes
30305       fi
30306     done
30307   fi
30308
30309 if test "x$ac_warn_datarootdir" = xyes; then
30310   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30311 fi
30312
30313 EOF
30314 cat >>"$CONFIG_STATUS" <<EOF
30315   sed "$ac_vpsub
30316 $extrasub
30317 EOF
30318 cat >>"$CONFIG_STATUS" <<\EOF
30319 :t
30320 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30321 s,@configure_input@,$configure_input,;t t
30322 s,@srcdir@,$ac_srcdir,;t t
30323 s,@top_srcdir@,$ac_top_srcdir,;t t
30324 s,@INSTALL@,$ac_INSTALL,;t t
30325 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30326   rm -f "$tmp"/stdin
30327 EOF
30328 : "${FGREP:=grep -F}"
30329 : "${EGREP:=grep -E}"
30330 cat >>"$CONFIG_STATUS" <<EOF
30331   : "\${FGREP:=$FGREP}"
30332   : "\${EGREP:=$EGREP}"
30333 EOF
30334 cat >>"$CONFIG_STATUS" <<\EOF
30335   if test x"$ac_file" != x-; then
30336     cp "$tmp/out" "$ac_file"
30337
30338     for ac_name in prefix exec_prefix datarootdir
30339     do
30340         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30341         if test -n "$ac_seen"; then
30342             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30343             if test -z "$ac_init"; then
30344               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30345               { echo "$as_me:30345: WARNING: Variable $ac_name is used but was not set:
30346 $ac_seen" >&5
30347 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30348 $ac_seen" >&2;}
30349             fi
30350         fi
30351     done
30352     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30353     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30354     if test -s "$tmp"/out; then
30355       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30356       { echo "$as_me:30356: WARNING: Some variables may not be substituted:
30357 $ac_seen" >&5
30358 echo "$as_me: WARNING: Some variables may not be substituted:
30359 $ac_seen" >&2;}
30360     fi
30361   else
30362     cat "$tmp"/out
30363   fi
30364   rm -f "$tmp"/out
30365
30366 done
30367 EOF
30368 cat >>"$CONFIG_STATUS" <<\EOF
30369
30370 #
30371 # CONFIG_HEADER section.
30372 #
30373
30374 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30375 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30376 #
30377 # ac_d sets the value in "#define NAME VALUE" lines.
30378 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30379 ac_dB='[        ].*$,\1#\2'
30380 ac_dC=' '
30381 ac_dD=',;t'
30382 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30383 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30384 ac_iB='\([      ]\),\1#\2define\3'
30385 ac_iC=' '
30386 ac_iD='\4,;t'
30387 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30388 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30389 ac_uB='$,\1#\2define\3'
30390 ac_uC=' '
30391 ac_uD=',;t'
30392
30393 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30394   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30395   case "$ac_file" in
30396   - | *:- | *:-:* ) # input from stdin
30397         cat >"$tmp"/stdin
30398         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30399         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30400   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30401         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30402   * )   ac_file_in=$ac_file.in ;;
30403   esac
30404
30405   test x"$ac_file" != x- && { echo "$as_me:30405: creating $ac_file" >&5
30406 echo "$as_me: creating $ac_file" >&6;}
30407
30408   # First look for the input files in the build tree, otherwise in the
30409   # src tree.
30410   ac_file_inputs=`IFS=:
30411     for f in $ac_file_in; do
30412       case $f in
30413       -) echo "$tmp"/stdin ;;
30414       [\\/$]*)
30415          # Absolute (can't be DOS-style, as IFS=:)
30416          test -f "$f" || { { echo "$as_me:30416: error: cannot find input file: $f" >&5
30417 echo "$as_me: error: cannot find input file: $f" >&2;}
30418    { (exit 1); exit 1; }; }
30419          echo $f;;
30420       *) # Relative
30421          if test -f "$f"; then
30422            # Build tree
30423            echo $f
30424          elif test -f "$srcdir/$f"; then
30425            # Source tree
30426            echo "$srcdir/$f"
30427          else
30428            # /dev/null tree
30429            { { echo "$as_me:30429: error: cannot find input file: $f" >&5
30430 echo "$as_me: error: cannot find input file: $f" >&2;}
30431    { (exit 1); exit 1; }; }
30432          fi;;
30433       esac
30434     done` || { (exit 1); exit 1; }
30435   # Remove the trailing spaces.
30436   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30437
30438 EOF
30439
30440 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30441 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30442 # be either 'cat' or 'sort'.
30443 cat confdefs.h | uniq >conftest.vals
30444
30445 # Break up conftest.vals because some shells have a limit on
30446 # the size of here documents, and old seds have small limits too.
30447
30448 rm -f conftest.tail
30449 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30450 while grep . conftest.vals >/dev/null
30451 do
30452   # Write chunks of a limited-size here document to conftest.frag.
30453   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30454   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30455   echo 'CEOF' >> "$CONFIG_STATUS"
30456   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30457   rm -f conftest.vals
30458   mv conftest.tail conftest.vals
30459 done
30460 rm -f conftest.vals
30461
30462 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30463 # marker @DEFS@.
30464 echo '  cat >> conftest.edit <<CEOF
30465 /@DEFS@/r conftest.frag
30466 /@DEFS@/d
30467 CEOF
30468 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30469 rm -f "$tmp"/in
30470 mv "$tmp"/out "$tmp"/in
30471 rm -f conftest.edit conftest.frag
30472 ' >> "$CONFIG_STATUS"
30473
30474 cat >>"$CONFIG_STATUS" <<\EOF
30475   # Let's still pretend it is `configure' which instantiates (i.e., don't
30476   # use $as_me), people would be surprised to read:
30477   #    /* config.h.  Generated automatically by config.status.  */
30478   if test x"$ac_file" = x-; then
30479     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30480   else
30481     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30482   fi
30483   cat "$tmp"/in >>"$tmp"/config.h
30484   rm -f "$tmp"/in
30485   if test x"$ac_file" != x-; then
30486     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30487       { echo "$as_me:30487: $ac_file is unchanged" >&5
30488 echo "$as_me: $ac_file is unchanged" >&6;}
30489     else
30490       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30491          X"$ac_file" : 'X\(//\)[^/]' \| \
30492          X"$ac_file" : 'X\(//\)$' \| \
30493          X"$ac_file" : 'X\(/\)' \| \
30494          .     : '\(.\)' 2>/dev/null ||
30495 echo X"$ac_file" |
30496     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30497           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30498           /^X\(\/\/\)$/{ s//\1/; q; }
30499           /^X\(\/\).*/{ s//\1/; q; }
30500           s/.*/./; q'`
30501       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30502         { case "$ac_dir" in
30503   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30504   *)                      as_incr_dir=.;;
30505 esac
30506 as_dummy="$ac_dir"
30507 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30508   case $as_mkdir_dir in
30509     # Skip DOS drivespec
30510     ?:) as_incr_dir=$as_mkdir_dir ;;
30511     *)
30512       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30513       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30514     ;;
30515   esac
30516 done; }
30517
30518       fi
30519       rm -f "$ac_file"
30520       mv "$tmp/config.h" "$ac_file"
30521     fi
30522   else
30523     cat "$tmp"/config.h
30524     rm -f "$tmp"/config.h
30525   fi
30526 done
30527 EOF
30528 cat >>"$CONFIG_STATUS" <<\EOF
30529 #
30530 # CONFIG_COMMANDS section.
30531 #
30532 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30533   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30534   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30535
30536   case "$ac_dest" in
30537     default )
30538 if test "x$cf_with_tests" != xno ; then
30539
30540 for cf_dir in test
30541 do
30542         if test ! -d "$srcdir/$cf_dir" ; then
30543                 continue
30544         elif test -f "$srcdir/$cf_dir/programs" ; then
30545                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30546         fi
30547 done
30548
30549 fi
30550
30551 cf_prefix=$LIB_PREFIX
30552
30553 case "$cf_cv_shlib_version" in
30554 (cygdll|msysdll|mingw|msvcdll)
30555         TINFO_NAME=$TINFO_ARG_SUFFIX
30556         TINFO_SUFFIX=.dll
30557         ;;
30558 esac
30559
30560 if test -n "$TINFO_SUFFIX" ; then
30561         case "$TINFO_SUFFIX" in
30562         (tw*)
30563                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30564                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30565                 ;;
30566         (t*)
30567                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30568                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30569                 ;;
30570         (w*)
30571                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30572                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30573                 ;;
30574         esac
30575 fi
30576
30577 for cf_dir in $SRC_SUBDIRS
30578 do
30579         if test ! -d "$srcdir/$cf_dir" ; then
30580                 continue
30581         elif test -f "$srcdir/$cf_dir/modules" ; then
30582
30583                 SHARED_LIB=
30584                 Libs_To_Make=
30585                 cf_awk_program=
30586                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30587                 then
30588                         cf_awk_program="$cf_awk_program\
30589 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30590 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30591 "
30592                 fi
30593
30594                 if test "x$WILDCARD_SYMS" = xno
30595                 then
30596                         cf_awk_program="$cf_awk_program\
30597 /[      ]_\\*;/ { skip=1; next; }\
30598 "
30599                 fi
30600
30601                 if test "x$cf_awk_program" != "x"
30602                 then
30603                         cat >>$cf_dir/Makefile <<CF_EOF
30604
30605 # Generated by CF_LIB_RULES
30606 resulting.map: $UNALTERED_SYMS
30607         $AWK 'BEGIN { skip = 1; last=""; } \
30608 $cf_awk_program \
30609 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30610  skip = 0; last = \$\$0; } \
30611 END { print last; }' < "$UNALTERED_SYMS" >\$@
30612
30613 distclean::
30614         rm -f resulting.map
30615 CF_EOF
30616                 fi
30617
30618                 for cf_item in $cf_LIST_MODELS
30619                 do
30620
30621         case X$cf_item in
30622         (Xlibtool)
30623                 cf_suffix='.la'
30624                 cf_depsuf=$cf_suffix
30625                 ;;
30626         (Xdebug)
30627                 case "$cf_cv_system_name" in
30628                 (*-msvc*)
30629                         cf_suffix='_g.lib'
30630                         ;;
30631                 (*)
30632                         cf_suffix='_g.a'
30633                         ;;
30634                 esac
30635                 cf_depsuf=$cf_suffix
30636                 ;;
30637         (Xprofile)
30638                 case "$cf_cv_system_name" in
30639                 (*-msvc*)
30640                         cf_suffix='_p.lib'
30641                         ;;
30642                 (*)
30643                         cf_suffix='_p.a'
30644                         ;;
30645                 esac
30646                 cf_depsuf=$cf_suffix
30647                 ;;
30648         (Xshared)
30649                 case "$cf_cv_system_name" in
30650                 (aix[5-7]*)
30651                         cf_suffix='.so'
30652                         cf_depsuf=$cf_suffix
30653                         ;;
30654                 (*-msvc*)
30655                         cf_suffix='.dll'
30656                         cf_depsuf='.dll.lib'
30657                         ;;
30658                 (cygwin*|msys*|mingw*)
30659                         cf_suffix='.dll'
30660                         cf_depsuf='.dll.a'
30661                         ;;
30662                 (darwin*)
30663                         cf_suffix='.dylib'
30664                         cf_depsuf=$cf_suffix
30665                         ;;
30666                 (hpux*)
30667                         case "$target" in
30668                         (ia64*)
30669                                 cf_suffix='.so'
30670                                 cf_depsuf=$cf_suffix
30671                                 ;;
30672                         (*)
30673                                 cf_suffix='.sl'
30674                                 cf_depsuf=$cf_suffix
30675                                 ;;
30676                         esac
30677                         ;;
30678                 (*)
30679                         cf_suffix='.so'
30680                         cf_depsuf=$cf_suffix
30681                         ;;
30682                 esac
30683                 ;;
30684         (*)
30685                 case "$target" in
30686                 (*-msvc*)
30687                         cf_suffix='.lib'
30688                         ;;
30689                 (*)
30690                         cf_suffix='.a'
30691                         ;;
30692                 esac
30693                 cf_depsuf=$cf_suffix
30694                 ;;
30695         esac
30696         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30697         then
30698                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30699                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30700         fi
30701
30702                         if test "$cf_dir" = "c++"
30703                         then
30704
30705 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30706
30707 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30708
30709                         else
30710
30711 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30712
30713 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30714
30715                         fi
30716                         test -z "$cf_libname" && cf_libname="$cf_dir"
30717                         if test "$cf_item" = shared ; then
30718                                 if test -n "${LIB_SUFFIX}"
30719                                 then
30720                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30721                                 else
30722                                         cf_shared_suffix="$cf_suffix"
30723                                 fi
30724                                 if test "$cf_cv_do_symlinks" = yes ; then
30725                                         cf_version_name=
30726
30727                                         case "$cf_cv_shlib_version" in
30728                                         (rel)
30729                                                 cf_version_name=REL_VERSION
30730                                                 ;;
30731                                         (abi)
30732                                                 cf_version_name=ABI_VERSION
30733                                                 ;;
30734                                         esac
30735
30736                                         if test -n "$cf_version_name"
30737                                         then
30738                                                 case "$cf_cv_system_name" in
30739                                                 (darwin*)
30740                                                         # "w", etc?
30741                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30742                                                         ;;
30743                                                 (*)
30744                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30745                                                         ;;
30746                                                 esac
30747                                         fi
30748                                         if test -n "${USE_LIB_SUFFIX}"
30749                                         then
30750                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30751                                         else
30752                                                 cf_shared_suffix="$cf_suffix"
30753                                         fi
30754                                 fi
30755                                 # cygwin needs import library, and has unique naming convention
30756                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30757                                 # use 'cyg' prefix for shared lib.
30758                                 case "$cf_cv_shlib_version" in
30759                                 (cygdll)
30760                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30761                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30762                                         ;;
30763                                 (msysdll)
30764                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30765                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30766                                         ;;
30767                                 (mingw)
30768                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30769                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30770                                         ;;
30771                                 (msvcdll)
30772                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30773                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30774                                         ;;
30775                                 (*)
30776                                         cf_add_lib=
30777                                         ;;
30778                                 esac
30779                                 if test -n "$cf_add_lib"
30780                                 then
30781                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30782                                         continue
30783                                 fi
30784                         fi
30785                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30786                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30787                 done
30788
30789                 if test "$cf_dir" = ncurses ; then
30790                         cf_subsets="$LIB_SUBSETS"
30791                         cf_r_parts="$cf_subsets"
30792                         cf_liblist="$Libs_To_Make"
30793
30794                         while test -n "$cf_r_parts"
30795                         do
30796                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30797                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30798                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30799                                         cf_add_lib=
30800                                         case "$cf_l_parts" in
30801                                         (*termlib*)
30802                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30803                                                 ;;
30804                                         (*ticlib*)
30805                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30806                                                 ;;
30807                                         (*)
30808                                                 break
30809                                                 ;;
30810                                         esac
30811                                         if test -n "$cf_add_lib"; then
30812                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30813                                         fi
30814                                 else
30815                                         break
30816                                 fi
30817                         done
30818                 else
30819                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30820                 fi
30821
30822                 if test "$cf_dir" = c++; then
30823                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30824                                 cf_list=
30825                                 for cf_item in $Libs_To_Make
30826                                 do
30827                                         case "$cf_item" in
30828                                         (*.a)
30829                                                 ;;
30830                                         (*)
30831                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30832                                                 ;;
30833                                         esac
30834                                         for cf_test in $cf_list
30835                                         do
30836                                                 if test "$cf_test" = "$cf_item"
30837                                                 then
30838                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30839                                                         cf_item=
30840                                                         break
30841                                                 fi
30842                                         done
30843                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30844                                 done
30845                                 Libs_To_Make="$cf_list"
30846                         fi
30847                 fi
30848
30849                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30850                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30851                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30852                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30853
30854                 $AWK -f "$srcdir/mk-0th.awk" \
30855                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30856                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30857
30858                 for cf_subset in $cf_subsets
30859                 do
30860                         cf_subdirs=
30861                         for cf_item in $cf_LIST_MODELS
30862                         do
30863
30864                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30865
30866 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30867
30868                         CXX_MODEL=$cf_ITEM
30869                         if test "$CXX_MODEL" = SHARED; then
30870                                 case "$cf_cv_shlib_version" in
30871                                 (cygdll|msysdll|mingw|msvcdll)
30872                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30873
30874 echo "${as_me:-configure}:30874: testing overriding CXX_MODEL to SHARED ..." 1>&5
30875
30876                                         with_shared_cxx=yes
30877                                         ;;
30878                                 (*)
30879                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30880                                         ;;
30881                                 esac
30882                         fi
30883
30884         case X$cf_item in
30885         (Xlibtool)
30886                 cf_suffix='.la'
30887                 cf_depsuf=$cf_suffix
30888                 ;;
30889         (Xdebug)
30890                 case "$cf_cv_system_name" in
30891                 (*-msvc*)
30892                         cf_suffix='_g.lib'
30893                         ;;
30894                 (*)
30895                         cf_suffix='_g.a'
30896                         ;;
30897                 esac
30898                 cf_depsuf=$cf_suffix
30899                 ;;
30900         (Xprofile)
30901                 case "$cf_cv_system_name" in
30902                 (*-msvc*)
30903                         cf_suffix='_p.lib'
30904                         ;;
30905                 (*)
30906                         cf_suffix='_p.a'
30907                         ;;
30908                 esac
30909                 cf_depsuf=$cf_suffix
30910                 ;;
30911         (Xshared)
30912                 case "$cf_cv_system_name" in
30913                 (aix[5-7]*)
30914                         cf_suffix='.so'
30915                         cf_depsuf=$cf_suffix
30916                         ;;
30917                 (*-msvc*)
30918                         cf_suffix='.dll'
30919                         cf_depsuf='.dll.lib'
30920                         ;;
30921                 (cygwin*|msys*|mingw*)
30922                         cf_suffix='.dll'
30923                         cf_depsuf='.dll.a'
30924                         ;;
30925                 (darwin*)
30926                         cf_suffix='.dylib'
30927                         cf_depsuf=$cf_suffix
30928                         ;;
30929                 (hpux*)
30930                         case "$target" in
30931                         (ia64*)
30932                                 cf_suffix='.so'
30933                                 cf_depsuf=$cf_suffix
30934                                 ;;
30935                         (*)
30936                                 cf_suffix='.sl'
30937                                 cf_depsuf=$cf_suffix
30938                                 ;;
30939                         esac
30940                         ;;
30941                 (*)
30942                         cf_suffix='.so'
30943                         cf_depsuf=$cf_suffix
30944                         ;;
30945                 esac
30946                 ;;
30947         (*)
30948                 case "$target" in
30949                 (*-msvc*)
30950                         cf_suffix='.lib'
30951                         ;;
30952                 (*)
30953                         cf_suffix='.a'
30954                         ;;
30955                 esac
30956                 cf_depsuf=$cf_suffix
30957                 ;;
30958         esac
30959         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30960         then
30961                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30962                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30963         fi
30964
30965         case $cf_item in
30966         (libtool) cf_subdir='obj_lo'  ;;
30967         (normal)  cf_subdir='objects' ;;
30968         (debug)   cf_subdir='obj_g' ;;
30969         (profile) cf_subdir='obj_p' ;;
30970         (shared)
30971                 case "$cf_cv_system_name" in
30972                 (cygwin|msys)
30973                         cf_subdir='objects' ;;
30974                 (*)
30975                         cf_subdir='obj_s' ;;
30976                 esac
30977         esac
30978
30979                         # Test for case where we build libtinfo with a different name.
30980                         cf_libname=$cf_dir
30981                         if test "$cf_dir" = ncurses ; then
30982                                 case "$cf_subset" in
30983                                 (*base*)
30984                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30985                                         ;;
30986                                 (*termlib*)
30987                                         cf_libname=$TINFO_LIB_SUFFIX
30988                                         ;;
30989                                 (ticlib*)
30990                                         cf_libname=$TICS_LIB_SUFFIX
30991                                         ;;
30992                                 esac
30993                         elif test "$cf_dir" = c++ ; then
30994
30995 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30996
30997 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30998
30999                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31000                         else
31001
31002 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31003
31004 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31005
31006                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31007                         fi
31008                         if test -n "${USE_ARG_SUFFIX}" ; then
31009                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31010                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31011                         fi
31012
31013                         # These dependencies really are for development, not
31014                         # builds, but they are useful in porting, too.
31015                         cf_depend="../include/ncurses_cfg.h"
31016                         if test "$srcdir" = "."; then
31017                                 cf_reldir="."
31018                         else
31019                                 cf_reldir="\${srcdir}"
31020                         fi
31021
31022                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31023                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31024                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31025                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31026                         fi
31027
31028                         cf_dir_suffix=
31029                         old_cf_suffix="$cf_suffix"
31030                         if test "$cf_cv_shlib_version_infix" = yes ; then
31031                         if test -n "$USE_LIB_SUFFIX" ; then
31032                                 case "$USE_LIB_SUFFIX" in
31033                                 (tw*)
31034                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31035                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31036                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31037                                         ;;
31038                                 (t*)
31039                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31040                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31041                                         cf_dir_suffix=t$EXTRA_SUFFIX
31042                                         ;;
31043                                 (w*)
31044                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31045                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31046                                         cf_dir_suffix=w$EXTRA_SUFFIX
31047                                         ;;
31048                                 (*)
31049                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31050                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31051                                         cf_dir_suffix=$EXTRA_SUFFIX
31052                                         ;;
31053                                 esac
31054                         fi
31055                         fi
31056
31057                         $AWK -f "$srcdir/mk-1st.awk" \
31058                                 name=${cf_libname}${cf_dir_suffix} \
31059                                 traces=$LIB_TRACING \
31060                                 MODEL=$cf_ITEM \
31061                                 CXX_MODEL=$CXX_MODEL \
31062                                 LIB_SUFFIX=$LIB_SUFFIX \
31063                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31064                                 make_phony="${cf_cv_make_PHONY:-no}" \
31065                                 model=$cf_subdir \
31066                                 prefix=$cf_prefix \
31067                                 suffix=$cf_suffix \
31068                                 subset=$cf_subset \
31069                                 driver=$cf_cv_term_driver \
31070                                 SymLink="$LN_S" \
31071                                 TermlibRoot=$TINFO_NAME \
31072                                 TermlibSuffix=$TINFO_SUFFIX \
31073                                 ShlibVer=$cf_cv_shlib_version \
31074                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31075                                 ReLink=${cf_cv_do_relink:-no} \
31076                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31077                                 DoLinks=$cf_cv_do_symlinks \
31078                                 rmSoLocs=$cf_cv_rm_so_locs \
31079                                 ldconfig="$LDCONFIG" \
31080                                 overwrite=$WITH_OVERWRITE \
31081                                 depend="$cf_depend" \
31082                                 host="$host" \
31083                                 libtool_version="$LIBTOOL_VERSION" \
31084                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31085
31086                         cf_suffix="$old_cf_suffix"
31087
31088                         for cf_subdir2 in $cf_subdirs lib
31089                         do
31090                                 test "$cf_subdir" = "$cf_subdir2" && break
31091                         done
31092                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31093                         $AWK -f "$srcdir/mk-2nd.awk" \
31094                                 name=$cf_dir \
31095                                 traces=$LIB_TRACING \
31096                                 MODEL=$cf_ITEM \
31097                                 model=$cf_subdir \
31098                                 subset=$cf_subset \
31099                                 srcdir=$srcdir \
31100                                 echo=$WITH_ECHO \
31101                                 crenames=$cf_cv_prog_CC_c_o \
31102                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31103                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31104                         cf_subdirs="$cf_subdirs $cf_subdir"
31105                         done
31106                 done
31107         fi
31108
31109         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31110 done
31111
31112 echo >> Makefile
31113 echo '# generated by CF_LIB_RULES' >> Makefile
31114
31115 if test "x$cf_cv_make_PHONY" = xyes ; then
31116         cat >> Makefile <<-CF_EOF
31117
31118         .PHONY :        libs
31119         .PHONY :        lintlib
31120         .PHONY :        install.includes
31121         .PHONY :        uninstall.includes
31122         .PHONY :        install.libs
31123         .PHONY :        uninstall.libs
31124 CF_EOF
31125 fi
31126
31127 for cf_dir in $SRC_SUBDIRS
31128 do
31129         if test ! -d "$srcdir/$cf_dir" ; then
31130                 continue
31131         fi
31132
31133         if test -f "$cf_dir/Makefile" ; then
31134                 case "$cf_dir" in
31135                 (Ada95)
31136                         echo 'libs \' >> Makefile
31137                         echo 'install.libs \' >> Makefile
31138                         echo 'uninstall.libs ::' >> Makefile
31139                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31140                         ;;
31141                 esac
31142         fi
31143
31144         if test -f "$srcdir/$cf_dir/modules" ; then
31145
31146                 if test "x$cf_cv_make_PHONY" = xyes ; then
31147                         cat >> Makefile <<-CF_EOF
31148
31149                         .PHONY :        install.$cf_dir
31150                         .PHONY :        uninstall.$cf_dir
31151 CF_EOF
31152                 fi
31153
31154                 echo >> Makefile
31155                 if test -f "$srcdir/$cf_dir/headers" ; then
31156 cat >> Makefile <<CF_EOF
31157 install.includes \\
31158 uninstall.includes \\
31159 CF_EOF
31160                 fi
31161
31162 cat >> Makefile <<CF_EOF
31163 lint \\
31164 libs \\
31165 lintlib \\
31166 install.libs \\
31167 uninstall.libs \\
31168 install.$cf_dir \\
31169 uninstall.$cf_dir ::
31170         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31171 CF_EOF
31172         elif test -f "$srcdir/$cf_dir/headers" ; then
31173 cat >> Makefile <<CF_EOF
31174
31175 libs \\
31176 install.libs \\
31177 uninstall.libs \\
31178 install.includes \\
31179 uninstall.includes ::
31180         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31181 CF_EOF
31182 fi
31183 done
31184
31185 if test "x$cf_cv_make_PHONY" = xyes ; then
31186         cat >> Makefile <<-CF_EOF
31187
31188         .PHONY :        install.data
31189         .PHONY :        uninstall.data
31190 CF_EOF
31191 fi
31192
31193 if test "x$cf_with_db_install" = xyes; then
31194 cat >> Makefile <<CF_EOF
31195
31196 install.libs uninstall.libs \\
31197 install.data uninstall.data ::
31198 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31199 CF_EOF
31200 else
31201 cat >> Makefile <<CF_EOF
31202
31203 install.libs uninstall.libs ::
31204         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31205 CF_EOF
31206 fi
31207
31208 if test "x$cf_with_manpages" = xyes; then
31209
31210 if test "x$cf_cv_make_PHONY" = xyes ; then
31211         cat >> Makefile <<-CF_EOF
31212
31213         .PHONY :        install.man
31214         .PHONY :        uninstall.man
31215 CF_EOF
31216 fi
31217
31218 cat >> Makefile <<CF_EOF
31219
31220 install.man \\
31221 uninstall.man ::
31222         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31223 CF_EOF
31224 fi
31225
31226 cat >> Makefile <<CF_EOF
31227
31228 distclean ::
31229         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31230         rm -f headers.sh headers.sed mk_shared_lib.sh
31231         rm -f edit_man.* man_alias.* *.tmp
31232         rm -rf \${DIRS_TO_MAKE}
31233 CF_EOF
31234
31235 rm -f headers.sed headers.sh
31236
31237 echo creating headers.sh
31238 cat >headers.sh <<CF_EOF
31239 #! $SHELL
31240 # This shell script is generated by the 'configure' script.  It is invoked in a
31241 # subdirectory of the build tree.  It generates a sed-script in the parent
31242 # directory that is used to adjust includes for header files that reside in a
31243 # subdirectory of /usr/include, etc.
31244 PRG=""
31245 while test \$# != 3
31246 do
31247 PRG="\$PRG \$1"; shift
31248 done
31249 DST=\$1
31250 REF=\$2
31251 SRC=\$3
31252 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31253 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31254 echo installing \$SRC in \$DST
31255 CF_EOF
31256
31257 if test "$WITH_CURSES_H" = yes; then
31258         cat >>headers.sh <<CF_EOF
31259 case \$DST in
31260 (/*/include/*)
31261         END=\`basename \$DST\`
31262         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31263         do
31264                 NAME=\`basename \$i\`
31265                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31266         done
31267         ;;
31268 (*)
31269         echo "" >> \$TMPSED
31270         ;;
31271 esac
31272 CF_EOF
31273
31274 else
31275         cat >>headers.sh <<CF_EOF
31276 case \$DST in
31277 (/*/include/*)
31278         END=\`basename \$DST\`
31279         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31280         do
31281                 NAME=\`basename \$i\`
31282                 if test "\$NAME" = "curses.h"
31283                 then
31284                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31285                         NAME=ncurses.h
31286                 fi
31287                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31288         done
31289         ;;
31290 (*)
31291         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31292         ;;
31293 esac
31294 CF_EOF
31295 fi
31296 cat >>headers.sh <<CF_EOF
31297 rm -f \$TMPSRC
31298 sed -f \$TMPSED \$SRC > \$TMPSRC
31299 NAME=\`basename \$SRC\`
31300 CF_EOF
31301 if test "$WITH_CURSES_H" != yes; then
31302         cat >>headers.sh <<CF_EOF
31303 test "\$NAME" = "curses.h" && NAME=ncurses.h
31304 CF_EOF
31305 fi
31306 cat >>headers.sh <<CF_EOF
31307 # Just in case someone gzip'd manpages, remove the conflicting copy.
31308 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31309
31310 eval \$PRG \$TMPSRC \$DST/\$NAME
31311 rm -f \$TMPSRC \$TMPSED
31312 CF_EOF
31313
31314 chmod 0755 headers.sh
31315
31316 for cf_dir in $SRC_SUBDIRS
31317 do
31318         if test ! -d "$srcdir/$cf_dir" ; then
31319                 continue
31320         fi
31321
31322         if test -f "$srcdir/$cf_dir/headers" ; then
31323                 $AWK -f "$srcdir/mk-hdr.awk" \
31324                         subset="$LIB_SUBSETS" \
31325                         compat="$WITH_CURSES_H" \
31326                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31327         fi
31328
31329         if test -f "$srcdir/$cf_dir/modules" ; then
31330                 if test "$cf_dir" != "c++" ; then
31331                         if test "x$cf_cv_make_PHONY" = xyes ; then
31332                                 cat >> $cf_dir/Makefile <<-CF_EOF
31333
31334                                 .PHONY :        depend
31335 CF_EOF
31336                         fi
31337
31338                         cat >>$cf_dir/Makefile <<"CF_EOF"
31339 depend : ${AUTO_SRC}
31340         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31341
31342 # DO NOT DELETE THIS LINE -- make depend depends on it.
31343 CF_EOF
31344                 fi
31345         fi
31346 done
31347
31348 if test "$MANPAGE_RENAMES" != no ; then
31349         # Construct a sed-script to perform renaming within man-pages
31350         test -n "$verbose" && echo "creating edit_man.sed"
31351         test ! -d man && mkdir man
31352         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31353 fi
31354
31355 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31356 if test -z "$USE_OLD_MAKERULES" ; then
31357         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31358 fi
31359 fi
31360  ;;
31361   esac
31362 done
31363 EOF
31364
31365 cat >>"$CONFIG_STATUS" <<\EOF
31366
31367 { (exit 0); exit 0; }
31368 EOF
31369 chmod +x "$CONFIG_STATUS"
31370 ac_clean_files=$ac_clean_files_save
31371
31372 # configure is writing to config.log, and then calls config.status.
31373 # config.status does its own redirection, appending to config.log.
31374 # Unfortunately, on DOS this fails, as config.log is still kept open
31375 # by configure, so config.status won't be able to write to it; its
31376 # output is simply discarded.  So we exec the FD to /dev/null,
31377 # effectively closing config.log, so it can be properly (re)opened and
31378 # appended to by config.status.  When coming back to configure, we
31379 # need to make the FD available again.
31380 if test "$no_create" != yes; then
31381   ac_cs_success=:
31382   exec 5>/dev/null
31383   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31384   exec 5>>config.log
31385   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31386   # would make configure fail if this is the last instruction.
31387   "$ac_cs_success" || { (exit 1); exit 1; }
31388 fi
31389 ${MAKE:-make} preinstall