]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20231021
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.769 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20230903.
5 #
6 # Copyright 2003-2022,2023      Thomas E. Dickey
7 # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8 # Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11
12 # Avoid depending upon Character Ranges.
13 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16 as_cr_digits='0123456789'
17 as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19 # Sed expression to map a string onto a valid variable name.
20 as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22 # Sed expression to map a string onto a valid CPP name.
23 as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25 # Be Bourne compatible
26 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27   emulate sh
28   NULLCMD=:
29 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30   set -o posix
31 fi
32
33 # Name of the executable.
34 as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36 if expr a : '\(a\)' >/dev/null 2>&1; then
37   as_expr="expr"
38 else
39   as_expr="false"
40 fi
41
42 rm -f conf$$ conf$$.exe conf$$.file
43 echo >conf$$.file
44 if ln -s conf$$.file conf$$ 2>/dev/null; then
45   # We could just check for DJGPP; but this test a) works b) is more generic
46   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47   if test -f conf$$.exe; then
48     # Don't use ln at all; we don't have any links
49     as_ln_s='cp -p'
50   else
51     as_ln_s='ln -s'
52   fi
53 elif ln conf$$.file conf$$ 2>/dev/null; then
54   as_ln_s='ln'
55 else
56   as_ln_s='cp -p'
57 fi
58 rm -f conf$$ conf$$.exe conf$$.file
59
60 as_executable_p="test -f"
61
62 # Support unset when possible.
63 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64   as_unset="unset"
65 else
66   as_unset="false"
67 fi
68
69 # NLS nuisances.
70 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79 # IFS
80 # We need space, tab and new line, in precisely that order.
81 as_nl='
82 '
83 IFS="   $as_nl"
84
85 # CDPATH.
86 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88 # Name of the host.
89 # hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90 # so uname gets run too.
91 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93 exec 6>&1
94
95 #
96 # Initializations.
97 #
98 ac_default_prefix=/usr/local
99 cross_compiling=no
100 subdirs=
101 MFLAGS=
102 MAKEFLAGS=
103 SHELL=${CONFIG_SHELL-/bin/sh}
104
105 # Maximum number of lines to put in a shell here document.
106 # This variable seems obsolete.  It should probably be removed, and
107 # only ac_max_sed_lines should be used.
108 : "${ac_max_here_lines=38}"
109
110 ac_unique_file="ncurses/base/lib_initscr.c"
111 # Factoring default headers for most tests.
112 ac_includes_default="\
113 #include <stdio.h>
114 #if HAVE_SYS_TYPES_H
115 # include <sys/types.h>
116 #endif
117 #if HAVE_SYS_STAT_H
118 # include <sys/stat.h>
119 #endif
120 #if STDC_HEADERS
121 # include <stdlib.h>
122 # include <stddef.h>
123 #else
124 # if HAVE_STDLIB_H
125 #  include <stdlib.h>
126 # endif
127 #endif
128 #if HAVE_STRING_H
129 # if !STDC_HEADERS && HAVE_MEMORY_H
130 #  include <memory.h>
131 # endif
132 # include <string.h>
133 #endif
134 #if HAVE_STRINGS_H
135 # include <strings.h>
136 #endif
137 #if HAVE_INTTYPES_H
138 # include <inttypes.h>
139 #else
140 # if HAVE_STDINT_H
141 #  include <stdint.h>
142 # endif
143 #endif
144 #if HAVE_UNISTD_H
145 # include <unistd.h>
146 #endif"
147
148 # Initialize some variables set by options.
149 ac_init_help=
150 ac_init_version=false
151 # The variables have the same names as the options, with
152 # dashes changed to underlines.
153 cache_file=/dev/null
154 exec_prefix=NONE
155 no_create=
156 no_recursion=
157 prefix=NONE
158 program_prefix=NONE
159 program_suffix=NONE
160 program_transform_name=s,x,x,
161 silent=
162 site=
163 srcdir=
164 verbose=
165 x_includes=NONE
166 x_libraries=NONE
167
168 # Installation directory options.
169 # These are left unexpanded so users can "make install exec_prefix=/foo"
170 # and all the variables that are supposed to be based on exec_prefix
171 # by default will actually change.
172 # Use braces instead of parens because sh, perl, etc. also accept them.
173 bindir='${exec_prefix}/bin'
174 sbindir='${exec_prefix}/sbin'
175 libexecdir='${exec_prefix}/libexec'
176 datarootdir='${prefix}/share'
177 datadir='${datarootdir}'
178 sysconfdir='${prefix}/etc'
179 sharedstatedir='${prefix}/com'
180 localstatedir='${prefix}/var'
181 runstatedir='${localstatedir}/run'
182 libdir='${exec_prefix}/lib'
183 includedir='${prefix}/include'
184 oldincludedir='/usr/include'
185 infodir='${datarootdir}/info'
186 mandir='${datarootdir}/man'
187
188 # Identity of this package.
189 PACKAGE_NAME=
190 PACKAGE_TARNAME=
191 PACKAGE_VERSION=
192 PACKAGE_STRING=
193 PACKAGE_BUGREPORT=
194
195 ac_prev=
196 for ac_option
197 do
198   # If the previous option needs an argument, assign it.
199   if test -n "$ac_prev"; then
200     eval "$ac_prev=\$ac_option"
201     ac_prev=
202     continue
203   fi
204
205   ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
206
207   # Accept the important Cygnus configure options, so we can diagnose typos.
208
209   case "$ac_option" in
210
211   -bindir | --bindir | --bindi | --bind | --bin | --bi)
212     ac_prev=bindir ;;
213   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
214     bindir=$ac_optarg ;;
215
216   -build | --build | --buil | --bui | --bu)
217     ac_prev=build_alias ;;
218   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
219     build_alias=$ac_optarg ;;
220
221   -cache-file | --cache-file | --cache-fil | --cache-fi \
222   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
223     ac_prev=cache_file ;;
224   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
225   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
226     cache_file=$ac_optarg ;;
227
228   --config-cache | -C)
229     cache_file=config.cache ;;
230
231   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
232     ac_prev=datadir ;;
233   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
234   | --da=*)
235     datadir=$ac_optarg ;;
236
237   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
238   | --dataroo | --dataro | --datar)
239     ac_prev=datarootdir ;;
240   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
241   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
242     datarootdir=$ac_optarg ;;
243
244   -disable-* | --disable-*)
245     ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
246     # Reject names that are not valid shell variable names.
247     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
248       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
249    { (exit 1); exit 1; }; }
250     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
251     eval "enable_$ac_feature=no" ;;
252
253   -enable-* | --enable-*)
254     ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
255     # Reject names that are not valid shell variable names.
256     expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
257       { echo "$as_me: error: invalid feature name: $ac_feature" >&2
258    { (exit 1); exit 1; }; }
259     ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
260     case "$ac_option" in
261       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
262       *) ac_optarg=yes ;;
263     esac
264     eval "enable_$ac_feature='$ac_optarg'" ;;
265
266   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
267   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
268   | --exec | --exe | --ex)
269     ac_prev=exec_prefix ;;
270   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
271   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
272   | --exec=* | --exe=* | --ex=*)
273     exec_prefix=$ac_optarg ;;
274
275   -gas | --gas | --ga | --g)
276     # Obsolete; use --with-gas.
277     with_gas=yes ;;
278
279   -help | --help | --hel | --he | -h)
280     ac_init_help=long ;;
281   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
282     ac_init_help=recursive ;;
283   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
284     ac_init_help=short ;;
285
286   -host | --host | --hos | --ho)
287     ac_prev=host_alias ;;
288   -host=* | --host=* | --hos=* | --ho=*)
289     host_alias=$ac_optarg ;;
290
291   -includedir | --includedir | --includedi | --included | --include \
292   | --includ | --inclu | --incl | --inc)
293     ac_prev=includedir ;;
294   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
295   | --includ=* | --inclu=* | --incl=* | --inc=*)
296     includedir=$ac_optarg ;;
297
298   -infodir | --infodir | --infodi | --infod | --info | --inf)
299     ac_prev=infodir ;;
300   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
301     infodir=$ac_optarg ;;
302
303   -libdir | --libdir | --libdi | --libd)
304     ac_prev=libdir ;;
305   -libdir=* | --libdir=* | --libdi=* | --libd=*)
306     libdir=$ac_optarg ;;
307
308   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
309   | --libexe | --libex | --libe)
310     ac_prev=libexecdir ;;
311   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
312   | --libexe=* | --libex=* | --libe=*)
313     libexecdir=$ac_optarg ;;
314
315   -localstatedir | --localstatedir | --localstatedi | --localstated \
316   | --localstate | --localstat | --localsta | --localst \
317   | --locals | --local | --loca | --loc | --lo)
318     ac_prev=localstatedir ;;
319   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
320   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
321   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
322     localstatedir=$ac_optarg ;;
323
324   -runstatedir | --runstatedir | --runstatedi | --runstated \
325   | --runstate | --runstat | --runsta | --runst \
326   | --runs | --run | --ru)
327     ac_prev=runstatedir ;;
328   -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
329   | --runstate=* | --runstat=* | --runsta=* | --runst=* \
330   | --runs=* | --run=* | --ru=*)
331     runstatedir=$ac_optarg ;;
332
333   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
334     ac_prev=mandir ;;
335   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
336     mandir=$ac_optarg ;;
337
338   -nfp | --nfp | --nf)
339     # Obsolete; use --without-fp.
340     with_fp=no ;;
341
342   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
343   | --no-cr | --no-c)
344     no_create=yes ;;
345
346   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
347   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
348     no_recursion=yes ;;
349
350   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
351   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
352   | --oldin | --oldi | --old | --ol | --o)
353     ac_prev=oldincludedir ;;
354   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
355   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
356   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
357     oldincludedir=$ac_optarg ;;
358
359   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
360     ac_prev=prefix ;;
361   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
362     prefix=$ac_optarg ;;
363
364   -program-prefix | --program-prefix | --program-prefi | --program-pref \
365   | --program-pre | --program-pr | --program-p)
366     ac_prev=program_prefix ;;
367   -program-prefix=* | --program-prefix=* | --program-prefi=* \
368   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
369     program_prefix=$ac_optarg ;;
370
371   -program-suffix | --program-suffix | --program-suffi | --program-suff \
372   | --program-suf | --program-su | --program-s)
373     ac_prev=program_suffix ;;
374   -program-suffix=* | --program-suffix=* | --program-suffi=* \
375   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
376     program_suffix=$ac_optarg ;;
377
378   -program-transform-name | --program-transform-name \
379   | --program-transform-nam | --program-transform-na \
380   | --program-transform-n | --program-transform- \
381   | --program-transform | --program-transfor \
382   | --program-transfo | --program-transf \
383   | --program-trans | --program-tran \
384   | --progr-tra | --program-tr | --program-t)
385     ac_prev=program_transform_name ;;
386   -program-transform-name=* | --program-transform-name=* \
387   | --program-transform-nam=* | --program-transform-na=* \
388   | --program-transform-n=* | --program-transform-=* \
389   | --program-transform=* | --program-transfor=* \
390   | --program-transfo=* | --program-transf=* \
391   | --program-trans=* | --program-tran=* \
392   | --progr-tra=* | --program-tr=* | --program-t=*)
393     program_transform_name=$ac_optarg ;;
394
395   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
396   | -silent | --silent | --silen | --sile | --sil)
397     silent=yes ;;
398
399   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
400     ac_prev=sbindir ;;
401   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
402   | --sbi=* | --sb=*)
403     sbindir=$ac_optarg ;;
404
405   -sharedstatedir | --sharedstatedir | --sharedstatedi \
406   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
407   | --sharedst | --shareds | --shared | --share | --shar \
408   | --sha | --sh)
409     ac_prev=sharedstatedir ;;
410   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
411   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
412   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
413   | --sha=* | --sh=*)
414     sharedstatedir=$ac_optarg ;;
415
416   -site | --site | --sit)
417     ac_prev=site ;;
418   -site=* | --site=* | --sit=*)
419     site=$ac_optarg ;;
420
421   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
422     ac_prev=srcdir ;;
423   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
424     srcdir=$ac_optarg ;;
425
426   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
427   | --syscon | --sysco | --sysc | --sys | --sy)
428     ac_prev=sysconfdir ;;
429   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
430   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
431     sysconfdir=$ac_optarg ;;
432
433   -target | --target | --targe | --targ | --tar | --ta | --t)
434     ac_prev=target_alias ;;
435   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
436     target_alias=$ac_optarg ;;
437
438   -v | -verbose | --verbose | --verbos | --verbo | --verb)
439     verbose=yes ;;
440
441   -version | --version | --versio | --versi | --vers | -V)
442     ac_init_version=: ;;
443
444   -with-* | --with-*)
445     ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
446     # Reject names that are not valid shell variable names.
447     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448       { echo "$as_me: error: invalid package name: $ac_package" >&2
449    { (exit 1); exit 1; }; }
450     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
451     case "$ac_option" in
452       *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
453       *) ac_optarg=yes ;;
454     esac
455     eval "with_$ac_package='$ac_optarg'" ;;
456
457   -without-* | --without-*)
458     ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
459     # Reject names that are not valid shell variable names.
460     expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
461       { echo "$as_me: error: invalid package name: $ac_package" >&2
462    { (exit 1); exit 1; }; }
463     ac_package=`echo "$ac_package" | sed 's/-/_/g'`
464     eval "with_$ac_package=no" ;;
465
466   --x)
467     # Obsolete; use --with-x.
468     with_x=yes ;;
469
470   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
471   | --x-incl | --x-inc | --x-in | --x-i)
472     ac_prev=x_includes ;;
473   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
474   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
475     x_includes=$ac_optarg ;;
476
477   -x-libraries | --x-libraries | --x-librarie | --x-librari \
478   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
479     ac_prev=x_libraries ;;
480   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
481   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
482     x_libraries=$ac_optarg ;;
483
484   -*) { echo "$as_me: error: unrecognized option: $ac_option
485 Try \`$0 --help' for more information." >&2
486    { (exit 1); exit 1; }; }
487     ;;
488
489   *=*)
490     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
491     # Reject names that are not valid shell variable names.
492     expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
493       { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
494    { (exit 1); exit 1; }; }
495     ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
496     eval "$ac_envvar='$ac_optarg'"
497     export "$ac_envvar" ;;
498
499   *)
500     # FIXME: should be removed in autoconf 3.0.
501     echo "$as_me: WARNING: you should use --build, --host, --target" >&2
502     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
503       echo "$as_me: WARNING: invalid host type: $ac_option" >&2
504     : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
505     ;;
506
507   esac
508 done
509
510 if test -n "$ac_prev"; then
511   ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
512   { echo "$as_me: error: missing argument to $ac_option" >&2
513    { (exit 1); exit 1; }; }
514 fi
515
516 # Be sure to have absolute paths.
517 for ac_var in exec_prefix prefix
518 do
519   eval ac_val=$`echo "$ac_var"`
520   case "$ac_val" in
521     [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
522     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
523    { (exit 1); exit 1; }; };;
524   esac
525 done
526
527 # Be sure to have absolute paths.
528 for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
529               localstatedir libdir includedir oldincludedir infodir mandir
530 do
531   eval ac_val=$`echo "$ac_var"`
532   case "$ac_val" in
533     [\\/$]* | ?:[\\/]* ) ;;
534     *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
535    { (exit 1); exit 1; }; };;
536   esac
537 done
538
539 # There might be people who depend on the old broken behavior: `$host'
540 # used to hold the argument of --host etc.
541 build=$build_alias
542 host=$host_alias
543 target=$target_alias
544
545 # FIXME: should be removed in autoconf 3.0.
546 if test "x$host_alias" != x; then
547   if test "x$build_alias" = x; then
548     cross_compiling=maybe
549     echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
550     If a cross compiler is detected then cross compile mode will be used." >&2
551   elif test "x$build_alias" != "x$host_alias"; then
552     cross_compiling=yes
553   fi
554 fi
555
556 ac_tool_prefix=
557 test -n "$host_alias" && ac_tool_prefix=$host_alias-
558
559 test "$silent" = yes && exec 6>/dev/null
560
561 # Find the source files, if location was not specified.
562 if test -z "$srcdir"; then
563   ac_srcdir_defaulted=yes
564   # Try the directory containing this script, then its parent.
565   ac_prog=$0
566   ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
567   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
568   srcdir=$ac_confdir
569   if test ! -r "$srcdir/$ac_unique_file"; then
570     srcdir=..
571   fi
572 else
573   ac_srcdir_defaulted=no
574 fi
575 if test ! -r "$srcdir/$ac_unique_file"; then
576   if test "$ac_srcdir_defaulted" = yes; then
577     { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
578    { (exit 1); exit 1; }; }
579   else
580     { echo "$as_me: error: cannot find sources in $srcdir" >&2
581    { (exit 1); exit 1; }; }
582   fi
583 fi
584 srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
585 ac_env_build_alias_set=${build_alias+set}
586 ac_env_build_alias_value=$build_alias
587 ac_cv_env_build_alias_set=${build_alias+set}
588 ac_cv_env_build_alias_value=$build_alias
589 ac_env_host_alias_set=${host_alias+set}
590 ac_env_host_alias_value=$host_alias
591 ac_cv_env_host_alias_set=${host_alias+set}
592 ac_cv_env_host_alias_value=$host_alias
593 ac_env_target_alias_set=${target_alias+set}
594 ac_env_target_alias_value=$target_alias
595 ac_cv_env_target_alias_set=${target_alias+set}
596 ac_cv_env_target_alias_value=$target_alias
597 ac_env_CC_set=${CC+set}
598 ac_env_CC_value=$CC
599 ac_cv_env_CC_set=${CC+set}
600 ac_cv_env_CC_value=$CC
601 ac_env_CFLAGS_set=${CFLAGS+set}
602 ac_env_CFLAGS_value=$CFLAGS
603 ac_cv_env_CFLAGS_set=${CFLAGS+set}
604 ac_cv_env_CFLAGS_value=$CFLAGS
605 ac_env_LDFLAGS_set=${LDFLAGS+set}
606 ac_env_LDFLAGS_value=$LDFLAGS
607 ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
608 ac_cv_env_LDFLAGS_value=$LDFLAGS
609 ac_env_CPPFLAGS_set=${CPPFLAGS+set}
610 ac_env_CPPFLAGS_value=$CPPFLAGS
611 ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
612 ac_cv_env_CPPFLAGS_value=$CPPFLAGS
613 ac_env_CPP_set=${CPP+set}
614 ac_env_CPP_value=$CPP
615 ac_cv_env_CPP_set=${CPP+set}
616 ac_cv_env_CPP_value=$CPP
617 ac_env_CXX_set=${CXX+set}
618 ac_env_CXX_value=$CXX
619 ac_cv_env_CXX_set=${CXX+set}
620 ac_cv_env_CXX_value=$CXX
621 ac_env_CXXFLAGS_set=${CXXFLAGS+set}
622 ac_env_CXXFLAGS_value=$CXXFLAGS
623 ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
624 ac_cv_env_CXXFLAGS_value=$CXXFLAGS
625 ac_env_CXXCPP_set=${CXXCPP+set}
626 ac_env_CXXCPP_value=$CXXCPP
627 ac_cv_env_CXXCPP_set=${CXXCPP+set}
628 ac_cv_env_CXXCPP_value=$CXXCPP
629
630 #
631 # Report the --help message.
632 #
633 if test "$ac_init_help" = "long"; then
634   # Omit some internal or obsolete options to make the list less imposing.
635   # This message is too long to be a string in the A/UX 3.1 sh.
636   cat <<EOF
637 \`configure' configures this package to adapt to many kinds of systems.
638
639 Usage: $0 [OPTION]... [VAR=VALUE]...
640
641 To assign environment variables (e.g., CC, CFLAGS...), specify them as
642 VAR=VALUE.  See below for descriptions of some of the useful variables.
643
644 Defaults for the options are specified in brackets.
645
646 Configuration:
647   -h, --help              display this help and exit
648       --help=short        display options specific to this package
649       --help=recursive    display the short help of all the included packages
650   -V, --version           display version information and exit
651   -q, --quiet, --silent   do not print \`checking...' messages
652       --cache-file=FILE   cache test results in FILE [disabled]
653   -C, --config-cache      alias for \`--cache-file=config.cache'
654   -n, --no-create         do not create output files
655       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
656
657 EOF
658
659   cat <<EOF
660 Installation directories:
661   --prefix=PREFIX         install architecture-independent files in PREFIX
662                           [$ac_default_prefix]
663   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
664                           [PREFIX]
665
666 By default, \`make install' will install all the files in
667 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
668 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
669 for instance \`--prefix=\$HOME'.
670
671 For better control, use the options below.
672
673 Fine tuning of the installation directories:
674   --bindir=DIR            user executables [EPREFIX/bin]
675   --sbindir=DIR           system admin executables [EPREFIX/sbin]
676   --libexecdir=DIR        program executables [EPREFIX/libexec]
677   --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
678   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
679   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
680   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
681   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
682   --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
683   --libdir=DIR            object code libraries [EPREFIX/lib]
684   --includedir=DIR        C header files [PREFIX/include]
685   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
686   --infodir=DIR           info documentation [DATAROOTDIR/info]
687   --mandir=DIR            man documentation [DATAROOTDIR/man]
688 EOF
689
690   cat <<\EOF
691
692 Program names:
693   --program-prefix=PREFIX            prepend PREFIX to installed program names
694   --program-suffix=SUFFIX            append SUFFIX to installed program names
695   --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
696
697 System types:
698   --build=BUILD           configure for building on BUILD [guessed]
699   --host=HOST       build programs to run on HOST [BUILD]
700   --target=TARGET   configure for building compilers for TARGET [HOST]
701 EOF
702 fi
703
704 if test -n "$ac_init_help"; then
705
706   cat <<\EOF
707
708 Optional Packages:
709   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
710   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
711
712 Optional Features:
713   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
714   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
715
716   --with-rel-version=XXX  override derived release version
717   --with-abi-version=XXX  override derived ABI version
718   --with-system-type=XXX  test: override derived host system-type
719   --with-abi-altered=XXX  override visible ABI version, for packaging
720   --without-ada           suppress check for Ada compiler, don't build demo
721   --without-cxx           do not adjust ncurses bool to match C++
722   --without-cxx-binding   do not build C++ binding and demo
723   --disable-db-install    suppress install of terminal database
724   --without-manpages      suppress install of manpages
725   --without-progs         suppress build/install with programs (e.g., tic)
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --disable-widec         do not 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   --disable-opaque-curses do not make curses WINDOW, etc., "opaque"
833   --disable-opaque-form   do not make form-library structures "opaque"
834   --disable-opaque-menu   do not make menu-library structures "opaque"
835   --disable-opaque-panel  do not make panel-library structures "opaque"
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-hard-tabs      compile with hard-tabs code
840   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
841 Experimental Code:
842   --disable-assumed-color do not assume anything about default-colors
843   --disable-hashmap       compile without hashmap scrolling-optimization
844   --enable-check-size     compile-in code to detect screensize
845   --enable-colorfgbg      compile-in experimental $COLORFGBG code
846   --enable-fvisibility    compile with -fvisibility=hidden
847   --enable-interop        compile-in interop bindings
848   --enable-safe-sprintf   compile with experimental safe-sprintf code
849   --disable-scroll-hints  compile without scroll-hints code
850   --enable-wgetch-events  compile with wgetch-events code
851   --enable-exp-win32      compile with experimental-Windows driver
852 Testing/development Options:
853   --disable-echo          do not display "compiling" commands
854   --disable-stripping     do not strip (debug info) installed executables
855   --with-strip-program=XX specify program to use when stripping in install
856   --enable-warnings       test: turn on gcc compiler warnings
857   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
858   --enable-string-hacks   work around bogus compiler/loader warnings
859   --enable-assertions     test: turn on generation of assertion code
860   --with-dmalloc          test: use Gray Watson's dmalloc library
861   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
862   --with-valgrind         test: use valgrind
863   --disable-leaks         test: free permanent memory, analyze leaks
864   --enable-expanded       test: generate functions for certain macros
865   --disable-macros        test: use functions rather than macros
866   --with-trace            test: add trace() function to all models of ncurses
867   --disable-gnat-projects test: disable GNAT projects even if usable
868 Ada Binding Options:
869   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
870   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
871   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
872   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
873   --with-ada-libname=XXX  override default Ada library-name
874   --with-form-libname=XXX override form basename of library
875   --with-menu-libname=XXX override menu basename of library
876   --with-panel-libname=XXX override panel basename of library
877   --with-cxx-libname=XXX override ncurses++ basename of library
878
879 Some influential environment variables:
880   CC          C compiler command
881   CFLAGS      C compiler flags
882   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
883               nonstandard directory <lib dir>
884   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
885               headers in a nonstandard directory <include dir>
886   CPP         C preprocessor
887   CXX         C++ compiler command
888   CXXFLAGS    C++ compiler flags
889   CXXCPP      C++ preprocessor
890
891 Use these variables to override the choices made by `configure' or to help
892 it to find libraries and programs with nonstandard names/locations.
893
894 EOF
895 fi
896
897 if test "$ac_init_help" = "recursive"; then
898   # If there are subdirs, report their specific --help.
899   ac_popdir=`pwd`
900   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
901     cd "$ac_subdir"
902     # A "../" for each directory in /$ac_subdir.
903     ac_dots=`echo "$ac_subdir" |
904              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
905
906     case "$srcdir" in
907     .) # No --srcdir option.  We are building in place.
908       ac_sub_srcdir="$srcdir" ;;
909     [\\/]* | ?:[\\/]* ) # Absolute path.
910       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
911     *) # Relative path.
912       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
913     esac
914
915     # Check for guested configure; otherwise get Cygnus style configure.
916     if test -f "$ac_sub_srcdir/configure.gnu"; then
917       echo
918       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
919     elif test -f "$ac_sub_srcdir/configure"; then
920       echo
921       $SHELL "$ac_sub_srcdir/configure" --help=recursive
922     elif test -f "$ac_sub_srcdir/configure.ac" ||
923            test -f "$ac_sub_srcdir/configure.in"; then
924       echo
925       "$ac_configure" --help
926     else
927       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
928     fi
929     cd "$ac_popdir"
930   done
931 fi
932
933 test -n "$ac_init_help" && exit 0
934 if "$ac_init_version"; then
935   cat <<\EOF
936
937 Copyright 2003-2022,2023        Thomas E. Dickey
938 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
939 Free Software Foundation, Inc.
940 This configure script is free software; the Free Software Foundation
941 gives unlimited permission to copy, distribute and modify it.
942 EOF
943   exit 0
944 fi
945 exec 5>config.log
946 cat >&5 <<EOF
947 This file contains any messages produced by compilers while
948 running configure, to aid debugging if configure makes a mistake.
949
950 It was created by $as_me, which was
951 generated by GNU Autoconf 2.52.20230903.  Invocation command line was
952
953   $ $0 $@
954
955 EOF
956 {
957 cat <<_ASUNAME
958 ## ---------- ##
959 ## Platform.  ##
960 ## ---------- ##
961
962 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
963 uname -m = `(uname -m) 2>/dev/null || echo unknown`
964 uname -r = `(uname -r) 2>/dev/null || echo unknown`
965 uname -s = `(uname -s) 2>/dev/null || echo unknown`
966 uname -v = `(uname -v) 2>/dev/null || echo unknown`
967
968 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
969 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
970
971 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
972 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
973 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
974 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
975 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
976 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
977 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
978
979 PATH = $PATH
980
981 _ASUNAME
982 } >&5
983
984 cat >&5 <<EOF
985 ## ------------ ##
986 ## Core tests.  ##
987 ## ------------ ##
988
989 EOF
990
991 # Keep a trace of the command line.
992 # Strip out --no-create and --no-recursion so they do not pile up.
993 # Also quote any args containing shell meta-characters.
994 ac_configure_args=
995 ac_sep=
996 for ac_arg
997 do
998   case "$ac_arg" in
999   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1000   | --no-cr | --no-c) ;;
1001   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1003   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1004     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1005     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1006     ac_sep=" " ;;
1007   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1008      ac_sep=" " ;;
1009   esac
1010   # Get rid of the leading space.
1011 done
1012
1013 # When interrupted or exit'd, cleanup temporary files, and complete
1014 # config.log.  We remove comments because anyway the quotes in there
1015 # would cause problems or look ugly.
1016 trap 'exit_status=$?
1017   # Save into config.log some information that might help in debugging.
1018   echo >&5
1019   echo "## ----------------- ##" >&5
1020   echo "## Cache variables.  ##" >&5
1021   echo "## ----------------- ##" >&5
1022   echo >&5
1023   # The following way of writing the cache mishandles newlines in values,
1024 {
1025   (set) 2>&1 |
1026     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1027     *ac_space=\ *)
1028       sed -n \
1029         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1030           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1031       ;;
1032     *)
1033       sed -n \
1034         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1035       ;;
1036     esac;
1037 } >&5
1038   sed "/^$/d" confdefs.h >conftest.log
1039   if test -s conftest.log; then
1040     echo >&5
1041     echo "## ------------ ##" >&5
1042     echo "## confdefs.h.  ##" >&5
1043     echo "## ------------ ##" >&5
1044     echo >&5
1045     cat conftest.log >&5
1046   fi
1047   (echo; echo) >&5
1048   test "$ac_signal" != 0 &&
1049     echo "$as_me: caught signal $ac_signal" >&5
1050   echo "$as_me: exit $exit_status" >&5
1051   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1052     exit $exit_status
1053      ' 0
1054 for ac_signal in 1 2 13 15; do
1055   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1056 done
1057 ac_signal=0
1058
1059 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1060 rm -rf conftest* confdefs.h
1061 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1062 echo >confdefs.h
1063
1064 # Let the site file select an alternate cache file if it wants to.
1065 # Prefer explicitly selected file to automatically selected ones.
1066 if test -z "$CONFIG_SITE"; then
1067   if test "x$prefix" != xNONE; then
1068     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1069   else
1070     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1071   fi
1072 fi
1073 for ac_site_file in $CONFIG_SITE; do
1074   if test -r "$ac_site_file"; then
1075     { echo "$as_me:1075: loading site script $ac_site_file" >&5
1076 echo "$as_me: loading site script $ac_site_file" >&6;}
1077     cat "$ac_site_file" >&5
1078     . "$ac_site_file"
1079   fi
1080 done
1081
1082 if test -r "$cache_file"; then
1083   # Some versions of bash will fail to source /dev/null (special
1084   # files actually), so we avoid doing that.
1085   if test -f "$cache_file"; then
1086     { echo "$as_me:1086: loading cache $cache_file" >&5
1087 echo "$as_me: loading cache $cache_file" >&6;}
1088     case $cache_file in
1089       [\\/]* | ?:[\\/]* ) . $cache_file;;
1090       *)                      . ./$cache_file;;
1091     esac
1092   fi
1093 else
1094   { echo "$as_me:1094: creating cache $cache_file" >&5
1095 echo "$as_me: creating cache $cache_file" >&6;}
1096   >$cache_file
1097 fi
1098
1099 # Check that the precious variables saved in the cache have kept the same
1100 # value.
1101 ac_cache_corrupted=false
1102 for ac_var in `(set) 2>&1 |
1103                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1104   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1105   eval ac_new_set=\$ac_env_${ac_var}_set
1106   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1107   eval ac_new_val="\$ac_env_${ac_var}_value"
1108   case "$ac_old_set,$ac_new_set" in
1109     set,)
1110       { echo "$as_me:1110: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,set)
1114       { echo "$as_me:1114: error: \`$ac_var' was not set in the previous run" >&5
1115 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1116       ac_cache_corrupted=: ;;
1117     ,);;
1118     *)
1119       if test "x$ac_old_val" != "x$ac_new_val"; then
1120         { echo "$as_me:1120: error: \`$ac_var' has changed since the previous run:" >&5
1121 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1122         { echo "$as_me:1122:   former value:  $ac_old_val" >&5
1123 echo "$as_me:   former value:  $ac_old_val" >&2;}
1124         { echo "$as_me:1124:   current value: $ac_new_val" >&5
1125 echo "$as_me:   current value: $ac_new_val" >&2;}
1126         ac_cache_corrupted=:
1127       fi;;
1128   esac
1129   # Pass precious variables to config.status.  It doesn't matter if
1130   # we pass some twice (in addition to the command line arguments).
1131   if test "$ac_new_set" = set; then
1132     case "$ac_new_val" in
1133     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1134       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1135       ac_configure_args="$ac_configure_args '$ac_arg'"
1136       ;;
1137     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1138        ;;
1139     esac
1140   fi
1141 done
1142 if "$ac_cache_corrupted"; then
1143   { echo "$as_me:1143: error: changes in the environment can compromise the build" >&5
1144 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1145   { { echo "$as_me:1145: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1146 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1147    { (exit 1); exit 1; }; }
1148 fi
1149
1150 ac_ext=c
1151 ac_cpp='$CPP $CPPFLAGS'
1152 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1153 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1154 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1155 ac_main_return="return"
1156
1157 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1158   *c*,-n*) ECHO_N=
1159            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1160            ECHO_T='     '
1161            ;;
1162   *c*,*  ) ECHO_N=-n
1163            ECHO_C=
1164            ECHO_T=
1165            ;;
1166   *)       ECHO_N=
1167            ECHO_C='\c'
1168            ECHO_T=
1169            ;;
1170 esac
1171 echo "#! $SHELL" >conftest.sh
1172 echo  "exit 0"   >>conftest.sh
1173 chmod +x conftest.sh
1174 if { (echo "$as_me:1174: PATH=\".;.\"; conftest.sh") >&5
1175   (PATH=".;."; conftest.sh) 2>&5
1176   ac_status=$?
1177   echo "$as_me:1177: \$? = $ac_status" >&5
1178   (exit "$ac_status"); }; then
1179   ac_path_separator=';'
1180 else
1181   ac_path_separator=:
1182 fi
1183 PATH_SEPARATOR="$ac_path_separator"
1184 rm -f conftest.sh
1185
1186 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1187
1188 top_builddir=`pwd`
1189
1190 for ac_prog in ggrep grep
1191 do
1192   # Extract the first word of "$ac_prog", so it can be a program name with args.
1193 set dummy $ac_prog; ac_word=$2
1194 echo "$as_me:1194: checking for $ac_word" >&5
1195 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1196 if test "${ac_cv_prog_GREP+set}" = set; then
1197   echo $ECHO_N "(cached) $ECHO_C" >&6
1198 else
1199   if test -n "$GREP"; then
1200   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1201 else
1202   ac_save_IFS=$IFS; IFS=$ac_path_separator
1203 ac_dummy="$PATH"
1204 for ac_dir in $ac_dummy; do
1205   IFS=$ac_save_IFS
1206   test -z "$ac_dir" && ac_dir=.
1207   $as_executable_p "$ac_dir/$ac_word" || continue
1208 ac_cv_prog_GREP="$ac_prog"
1209 echo "$as_me:1209: found $ac_dir/$ac_word" >&5
1210 break
1211 done
1212
1213 fi
1214 fi
1215 GREP=$ac_cv_prog_GREP
1216 if test -n "$GREP"; then
1217   echo "$as_me:1217: result: $GREP" >&5
1218 echo "${ECHO_T}$GREP" >&6
1219 else
1220   echo "$as_me:1220: result: no" >&5
1221 echo "${ECHO_T}no" >&6
1222 fi
1223
1224   test -n "$GREP" && break
1225 done
1226 test -n "$GREP" || GREP=": "
1227
1228 echo "$as_me:1228: checking for egrep" >&5
1229 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1230 if test "${ac_cv_path_EGREP+set}" = set; then
1231   echo $ECHO_N "(cached) $ECHO_C" >&6
1232 else
1233   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1234    then ac_cv_path_EGREP="$GREP -E"
1235    else
1236      for ac_prog in gegrep egrep
1237 do
1238   # Extract the first word of "$ac_prog", so it can be a program name with args.
1239 set dummy $ac_prog; ac_word=$2
1240 echo "$as_me:1240: checking for $ac_word" >&5
1241 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1242 if test "${ac_cv_path_EGREP+set}" = set; then
1243   echo $ECHO_N "(cached) $ECHO_C" >&6
1244 else
1245   case $EGREP in
1246   [\\/]* | ?:[\\/]*)
1247   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1248   ;;
1249   *)
1250   ac_save_IFS=$IFS; IFS=$ac_path_separator
1251 ac_dummy="$PATH"
1252 for ac_dir in $ac_dummy; do
1253   IFS=$ac_save_IFS
1254   test -z "$ac_dir" && ac_dir=.
1255   if $as_executable_p "$ac_dir/$ac_word"; then
1256    ac_cv_path_EGREP="$ac_dir/$ac_word"
1257    echo "$as_me:1257: found $ac_dir/$ac_word" >&5
1258    break
1259 fi
1260 done
1261
1262   ;;
1263 esac
1264 fi
1265 EGREP=$ac_cv_path_EGREP
1266
1267 if test -n "$EGREP"; then
1268   echo "$as_me:1268: result: $EGREP" >&5
1269 echo "${ECHO_T}$EGREP" >&6
1270 else
1271   echo "$as_me:1271: result: no" >&5
1272 echo "${ECHO_T}no" >&6
1273 fi
1274
1275   test -n "$EGREP" && break
1276 done
1277 test -n "$EGREP" || EGREP=": "
1278
1279      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1279: error: cannot find workable egrep" >&5
1280 echo "$as_me: error: cannot find workable egrep" >&2;}
1281    { (exit 1); exit 1; }; }
1282    fi
1283 fi
1284 echo "$as_me:1284: result: $ac_cv_path_EGREP" >&5
1285 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1286  EGREP="$ac_cv_path_EGREP"
1287
1288 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1289 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291 cf_cv_abi_version=${NCURSES_MAJOR}
1292 cf_cv_abi_default=${NCURSES_MAJOR}
1293 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1294 cf_cv_timestamp=`date`
1295 echo "$as_me:1295: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1296 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1297
1298 if test -f "$srcdir/VERSION" ; then
1299         echo "$as_me:1299: checking for package version" >&5
1300 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1301
1302         # if there are not enough fields, cut returns the last one...
1303         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1304         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1305         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1306
1307         # this is how CF_BUNDLED_INTL uses $VERSION:
1308         VERSION="$cf_field1"
1309
1310         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1311         test -z "$VERSION_MAJOR" && { { echo "$as_me:1311: error: missing major-version" >&5
1312 echo "$as_me: error: missing major-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1316         test -z "$VERSION_MINOR" && { { echo "$as_me:1316: error: missing minor-version" >&5
1317 echo "$as_me: error: missing minor-version" >&2;}
1318    { (exit 1); exit 1; }; }
1319
1320         echo "$as_me:1320: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1321 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1322
1323         echo "$as_me:1323: checking for package patch date" >&5
1324 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1325         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1326         case .$VERSION_PATCH in
1327         (.)
1328                 { { echo "$as_me:1328: error: missing patch-date $VERSION_PATCH" >&5
1329 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1330    { (exit 1); exit 1; }; }
1331                 ;;
1332         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1333                 ;;
1334         (*)
1335                 { { echo "$as_me:1335: error: illegal patch-date $VERSION_PATCH" >&5
1336 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1337    { (exit 1); exit 1; }; }
1338                 ;;
1339         esac
1340         echo "$as_me:1340: result: $VERSION_PATCH" >&5
1341 echo "${ECHO_T}$VERSION_PATCH" >&6
1342 else
1343         { { echo "$as_me:1343: error: did not find $srcdir/VERSION" >&5
1344 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1345    { (exit 1); exit 1; }; }
1346 fi
1347
1348 # show the actual data that we have for versions:
1349 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1350
1351 echo "${as_me:-configure}:1351: testing ABI VERSION $VERSION ..." 1>&5
1352
1353 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1354
1355 echo "${as_me:-configure}:1355: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1356
1357 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1358
1359 echo "${as_me:-configure}:1359: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1360
1361 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1362
1363 echo "${as_me:-configure}:1363: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1364
1365         cf_PACKAGE=NCURSES
1366         PACKAGE=ncurses
1367
1368 cat >>confdefs.h <<EOF
1369 #define PACKAGE "$PACKAGE"
1370 EOF
1371
1372 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1373
1374         cat >>confdefs.h <<EOF
1375 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1376 EOF
1377
1378         cat >>confdefs.h <<EOF
1379 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1380 EOF
1381
1382 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1383
1384 # Check whether --with-rel-version or --without-rel-version was given.
1385 if test "${with_rel_version+set}" = set; then
1386   withval="$with_rel_version"
1387   { echo "$as_me:1387: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1388 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1389  cf_cv_rel_version=$withval
1390 fi;
1391
1392  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1393  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1394  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1395
1396 if test -n "$NCURSES_MAJOR" ; then
1397   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1398   (0)
1399         ;;
1400   (*)
1401         { { echo "$as_me:1401: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1402 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1403    { (exit 1); exit 1; }; }
1404         ;;
1405   esac
1406 else
1407   { { echo "$as_me:1407: error: Release major-version value is empty" >&5
1408 echo "$as_me: error: Release major-version value is empty" >&2;}
1409    { (exit 1); exit 1; }; }
1410 fi
1411
1412 if test -n "$NCURSES_MINOR" ; then
1413   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1414   (0)
1415         ;;
1416   (*)
1417         { { echo "$as_me:1417: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1418 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1419    { (exit 1); exit 1; }; }
1420         ;;
1421   esac
1422 else
1423   { { echo "$as_me:1423: error: Release minor-version value is empty" >&5
1424 echo "$as_me: error: Release minor-version value is empty" >&2;}
1425    { (exit 1); exit 1; }; }
1426 fi
1427
1428 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1429
1430 # Check whether --with-abi-version or --without-abi-version was given.
1431 if test "${with_abi_version+set}" = set; then
1432   withval="$with_abi_version"
1433
1434         if test "x$cf_cv_abi_version" != "x$withval"
1435         then
1436                 { echo "$as_me:1436: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1437 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1438                 case "$cf_cv_rel_version" in
1439                 (5.*)
1440                         cf_cv_rel_version=$withval.0
1441                         ;;
1442                 (6.*)
1443                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1444                         ;;
1445                 esac
1446         fi
1447         cf_cv_abi_version=$withval
1448 fi;
1449
1450 if test -n "$cf_cv_abi_version" ; then
1451   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1452   (0)
1453         ;;
1454   (*)
1455         { { echo "$as_me:1455: error: ABI version is not a number: $cf_cv_abi_version" >&5
1456 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1457    { (exit 1); exit 1; }; }
1458         ;;
1459   esac
1460 else
1461   { { echo "$as_me:1461: error: ABI version value is empty" >&5
1462 echo "$as_me: error: ABI version value is empty" >&2;}
1463    { (exit 1); exit 1; }; }
1464 fi
1465
1466 cf_cv_abi_default=$cf_cv_abi_version
1467
1468 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1469 then
1470         case "$cf_cv_rel_version" in
1471         (5.*)
1472                 cf_cv_rel_version=$with_abi_version.0
1473                 ;;
1474         esac
1475 fi
1476
1477 ac_aux_dir=
1478 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1479   if test -f "$ac_dir/install-sh"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/install-sh -c"
1482     break
1483   elif test -f "$ac_dir/install.sh"; then
1484     ac_aux_dir=$ac_dir
1485     ac_install_sh="$ac_aux_dir/install.sh -c"
1486     break
1487   elif test -f "$ac_dir/shtool"; then
1488     ac_aux_dir=$ac_dir
1489     ac_install_sh="$ac_aux_dir/shtool install -c"
1490     break
1491   fi
1492 done
1493 if test -z "$ac_aux_dir"; then
1494   { { echo "$as_me:1494: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1495 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1496    { (exit 1); exit 1; }; }
1497 fi
1498 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1499 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1500 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1501
1502 # Make sure we can run config.sub.
1503 $ac_config_sub sun4 >/dev/null 2>&1 ||
1504   { { echo "$as_me:1504: error: cannot run $ac_config_sub" >&5
1505 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1506    { (exit 1); exit 1; }; }
1507
1508 echo "$as_me:1508: checking build system type" >&5
1509 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1510 if test "${ac_cv_build+set}" = set; then
1511   echo $ECHO_N "(cached) $ECHO_C" >&6
1512 else
1513   ac_cv_build_alias=$build_alias
1514 test -z "$ac_cv_build_alias" &&
1515   ac_cv_build_alias=`$ac_config_guess`
1516 test -z "$ac_cv_build_alias" &&
1517   { { echo "$as_me:1517: error: cannot guess build type; you must specify one" >&5
1518 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1519    { (exit 1); exit 1; }; }
1520 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1521   { { echo "$as_me:1521: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1522 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1523    { (exit 1); exit 1; }; }
1524
1525 fi
1526 echo "$as_me:1526: result: $ac_cv_build" >&5
1527 echo "${ECHO_T}$ac_cv_build" >&6
1528 build=$ac_cv_build
1529 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1530 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1531 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1532
1533 echo "$as_me:1533: checking host system type" >&5
1534 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1535 if test "${ac_cv_host+set}" = set; then
1536   echo $ECHO_N "(cached) $ECHO_C" >&6
1537 else
1538   ac_cv_host_alias=$host_alias
1539 test -z "$ac_cv_host_alias" &&
1540   ac_cv_host_alias=$ac_cv_build_alias
1541 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1542   { { echo "$as_me:1542: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1543 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1544    { (exit 1); exit 1; }; }
1545
1546 fi
1547 echo "$as_me:1547: result: $ac_cv_host" >&5
1548 echo "${ECHO_T}$ac_cv_host" >&6
1549 host=$ac_cv_host
1550 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1551 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1552 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1553
1554 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1555         echo "$as_me:1555: checking target system type" >&5
1556 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1557 if test "${ac_cv_target+set}" = set; then
1558   echo $ECHO_N "(cached) $ECHO_C" >&6
1559 else
1560   ac_cv_target_alias=$target_alias
1561 test "x$ac_cv_target_alias" = "x" &&
1562   ac_cv_target_alias=$ac_cv_host_alias
1563 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1564   { { echo "$as_me:1564: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1565 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1566    { (exit 1); exit 1; }; }
1567
1568 fi
1569 echo "$as_me:1569: result: $ac_cv_target" >&5
1570 echo "${ECHO_T}$ac_cv_target" >&6
1571 target=$ac_cv_target
1572 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1573 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1574 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1575
1576 # The aliases save the names the user supplied, while $host etc.
1577 # will get canonicalized.
1578 test -n "$target_alias" &&
1579   test "$program_prefix$program_suffix$program_transform_name" = \
1580     NONENONEs,x,x, &&
1581   program_prefix=${target_alias}-
1582         system_name="$host_os"
1583 else
1584         system_name="`(uname -s -r) 2>/dev/null`"
1585         if test -z "$system_name" ; then
1586                 system_name="`(hostname) 2>/dev/null`"
1587         fi
1588 fi
1589 test -n "$system_name" &&
1590 cat >>confdefs.h <<EOF
1591 #define SYSTEM_NAME "$system_name"
1592 EOF
1593
1594 if test "${cf_cv_system_name+set}" = set; then
1595   echo $ECHO_N "(cached) $ECHO_C" >&6
1596 else
1597   cf_cv_system_name="$system_name"
1598 fi
1599
1600 test -z "$system_name" && system_name="$cf_cv_system_name"
1601 test -n "$cf_cv_system_name" && echo "$as_me:1601: result: Configuring for $cf_cv_system_name" >&5
1602 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1603
1604 if test ".$system_name" != ".$cf_cv_system_name" ; then
1605         echo "$as_me:1605: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1606 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1607         { { echo "$as_me:1607: error: \"Please remove config.cache and try again.\"" >&5
1608 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1609    { (exit 1); exit 1; }; }
1610 fi
1611
1612 # Check whether --with-system-type or --without-system-type was given.
1613 if test "${with_system_type+set}" = set; then
1614   withval="$with_system_type"
1615   { echo "$as_me:1615: WARNING: overriding system type to $withval" >&5
1616 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1617         cf_cv_system_name=$withval
1618         host_os=$withval
1619
1620 fi;
1621
1622 ###     Save the given $CFLAGS to allow user-override.
1623 cf_user_CFLAGS="$CFLAGS"
1624
1625 ###     Default install-location
1626 echo "$as_me:1626: checking for fgrep" >&5
1627 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1628 if test "${ac_cv_path_FGREP+set}" = set; then
1629   echo $ECHO_N "(cached) $ECHO_C" >&6
1630 else
1631   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1632    then ac_cv_path_FGREP="$GREP -F"
1633    else
1634      for ac_prog in gfgrep fgrep
1635 do
1636   # Extract the first word of "$ac_prog", so it can be a program name with args.
1637 set dummy $ac_prog; ac_word=$2
1638 echo "$as_me:1638: checking for $ac_word" >&5
1639 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1640 if test "${ac_cv_path_FGREP+set}" = set; then
1641   echo $ECHO_N "(cached) $ECHO_C" >&6
1642 else
1643   case $FGREP in
1644   [\\/]* | ?:[\\/]*)
1645   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1646   ;;
1647   *)
1648   ac_save_IFS=$IFS; IFS=$ac_path_separator
1649 ac_dummy="$PATH"
1650 for ac_dir in $ac_dummy; do
1651   IFS=$ac_save_IFS
1652   test -z "$ac_dir" && ac_dir=.
1653   if $as_executable_p "$ac_dir/$ac_word"; then
1654    ac_cv_path_FGREP="$ac_dir/$ac_word"
1655    echo "$as_me:1655: found $ac_dir/$ac_word" >&5
1656    break
1657 fi
1658 done
1659
1660   ;;
1661 esac
1662 fi
1663 FGREP=$ac_cv_path_FGREP
1664
1665 if test -n "$FGREP"; then
1666   echo "$as_me:1666: result: $FGREP" >&5
1667 echo "${ECHO_T}$FGREP" >&6
1668 else
1669   echo "$as_me:1669: result: no" >&5
1670 echo "${ECHO_T}no" >&6
1671 fi
1672
1673   test -n "$FGREP" && break
1674 done
1675 test -n "$FGREP" || FGREP=": "
1676
1677      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1677: error: cannot find workable fgrep" >&5
1678 echo "$as_me: error: cannot find workable fgrep" >&2;}
1679    { (exit 1); exit 1; }; }
1680    fi
1681 fi
1682 echo "$as_me:1682: result: $ac_cv_path_FGREP" >&5
1683 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1684  FGREP="$ac_cv_path_FGREP"
1685
1686 echo "$as_me:1686: checking for prefix" >&5
1687 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1688 if test "x$prefix" = "xNONE" ; then
1689         case "$cf_cv_system_name" in
1690                 # non-vendor systems don't have a conflict
1691         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1692                 prefix=/usr
1693                 ;;
1694         (*)     prefix=$ac_default_prefix
1695                 ;;
1696         esac
1697 fi
1698 echo "$as_me:1698: result: $prefix" >&5
1699 echo "${ECHO_T}$prefix" >&6
1700
1701 if test "x$prefix" = "xNONE" ; then
1702 echo "$as_me:1702: checking for default include-directory" >&5
1703 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1704 test -n "$verbose" && echo 1>&6
1705 for cf_symbol in \
1706         "$includedir" \
1707         "$includedir/ncurses" \
1708         "$prefix/include" \
1709         "$prefix/include/ncurses" \
1710         /usr/local/include \
1711         /usr/local/include/ncurses \
1712         /usr/include \
1713         /usr/include/ncurses
1714 do
1715         cf_dir=`eval echo "$cf_symbol"`
1716         if test -f "$cf_dir/curses.h" ; then
1717         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1718                 includedir="$cf_symbol"
1719                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1720                 break
1721         fi
1722         fi
1723         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1724 done
1725 echo "$as_me:1725: result: $includedir" >&5
1726 echo "${ECHO_T}$includedir" >&6
1727 fi
1728
1729 ### Defaults for ncurses ABI
1730
1731 # ABI 5 defaults:
1732 cf_dft_ccharw_max=5
1733 cf_dft_chtype=auto
1734 cf_dft_ext_colors=no
1735 cf_dft_ext_const=no
1736 cf_dft_ext_mouse=no
1737 cf_dft_ext_putwin=no
1738 cf_dft_ext_spfuncs=no
1739 cf_dft_filter_syms=no
1740 cf_dft_interop=no
1741 cf_dft_mmask_t=auto
1742 cf_dft_opaque_curses=no
1743 cf_dft_ordinate_type=short
1744 cf_dft_signed_char=no
1745 cf_dft_tparm_arg=long
1746 cf_dft_widec=no
1747 cf_dft_with_lp64=no
1748
1749 # ABI 6 default differences from ABI 5:
1750 case x$cf_cv_abi_default in
1751 (x[6789])
1752         cf_dft_chtype=uint32_t
1753         cf_dft_ext_colors=yes
1754         cf_dft_ext_const=yes
1755         cf_dft_ext_mouse=yes
1756         cf_dft_ext_putwin=yes
1757         cf_dft_ext_spfuncs=yes
1758         cf_dft_filter_syms=yes
1759         cf_dft_interop=yes
1760         cf_dft_mmask_t=uint32_t
1761         cf_dft_opaque_curses=yes
1762         cf_dft_tparm_arg=intptr_t
1763         cf_dft_widec=yes
1764         cf_dft_with_lp64=yes
1765         ;;
1766 esac
1767
1768 # ABI 7 default differences from ABI 6:
1769 case x$cf_cv_abi_default in
1770 (x[789])
1771         cf_dft_ccharw_max=6
1772         cf_dft_mmask_t=uint64_t
1773         cf_dft_ordinate_type=int
1774         cf_dft_signed_char=yes
1775         # also: remove the wgetch-events feature in ABI 7
1776         ;;
1777 esac
1778
1779 ### override ABI version, e.g., packagers
1780
1781 # Check whether --with-abi-altered or --without-abi-altered was given.
1782 if test "${with_abi_altered+set}" = set; then
1783   withval="$with_abi_altered"
1784
1785 if test -n "$withval" ; then
1786   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1787   (0)
1788         ;;
1789   (*)
1790         { { echo "$as_me:1790: error: ABI altered is not a number: $withval" >&5
1791 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1792    { (exit 1); exit 1; }; }
1793         ;;
1794   esac
1795 else
1796   { { echo "$as_me:1796: error: ABI altered value is empty" >&5
1797 echo "$as_me: error: ABI altered value is empty" >&2;}
1798    { (exit 1); exit 1; }; }
1799 fi
1800
1801         if test "$cf_cv_abi_version" != "$withval"
1802         then
1803                 { echo "$as_me:1803: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1804 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1805                 cf_cv_abi_version=$withval
1806         fi
1807
1808 fi;
1809
1810 ###     Checks for programs.
1811
1812 # Check whether --with-ada or --without-ada was given.
1813 if test "${with_ada+set}" = set; then
1814   withval="$with_ada"
1815   cf_with_ada=$withval
1816 else
1817   cf_with_ada=yes
1818 fi;
1819
1820 if test "x$cf_with_ada" = xyes
1821 then
1822         cf_prog_cc="gnatgcc gcc cc"
1823 else
1824         cf_prog_cc="gcc cc"
1825 fi
1826
1827 ac_ext=c
1828 ac_cpp='$CPP $CPPFLAGS'
1829 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1830 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1831 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1832 ac_main_return="return"
1833 if test -n "$ac_tool_prefix"; then
1834   for ac_prog in $cf_prog_cc
1835   do
1836     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1837 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1838 echo "$as_me:1838: checking for $ac_word" >&5
1839 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1840 if test "${ac_cv_prog_CC+set}" = set; then
1841   echo $ECHO_N "(cached) $ECHO_C" >&6
1842 else
1843   if test -n "$CC"; then
1844   ac_cv_prog_CC="$CC" # Let the user override the test.
1845 else
1846   ac_save_IFS=$IFS; IFS=$ac_path_separator
1847 ac_dummy="$PATH"
1848 for ac_dir in $ac_dummy; do
1849   IFS=$ac_save_IFS
1850   test -z "$ac_dir" && ac_dir=.
1851   $as_executable_p "$ac_dir/$ac_word" || continue
1852 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1853 echo "$as_me:1853: found $ac_dir/$ac_word" >&5
1854 break
1855 done
1856
1857 fi
1858 fi
1859 CC=$ac_cv_prog_CC
1860 if test -n "$CC"; then
1861   echo "$as_me:1861: result: $CC" >&5
1862 echo "${ECHO_T}$CC" >&6
1863 else
1864   echo "$as_me:1864: result: no" >&5
1865 echo "${ECHO_T}no" >&6
1866 fi
1867
1868     test -n "$CC" && break
1869   done
1870 fi
1871 if test -z "$CC"; then
1872   ac_ct_CC=$CC
1873   for ac_prog in $cf_prog_cc
1874 do
1875   # Extract the first word of "$ac_prog", so it can be a program name with args.
1876 set dummy $ac_prog; ac_word=$2
1877 echo "$as_me:1877: checking for $ac_word" >&5
1878 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1879 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1880   echo $ECHO_N "(cached) $ECHO_C" >&6
1881 else
1882   if test -n "$ac_ct_CC"; then
1883   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1884 else
1885   ac_save_IFS=$IFS; IFS=$ac_path_separator
1886 ac_dummy="$PATH"
1887 for ac_dir in $ac_dummy; do
1888   IFS=$ac_save_IFS
1889   test -z "$ac_dir" && ac_dir=.
1890   $as_executable_p "$ac_dir/$ac_word" || continue
1891 ac_cv_prog_ac_ct_CC="$ac_prog"
1892 echo "$as_me:1892: found $ac_dir/$ac_word" >&5
1893 break
1894 done
1895
1896 fi
1897 fi
1898 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1899 if test -n "$ac_ct_CC"; then
1900   echo "$as_me:1900: result: $ac_ct_CC" >&5
1901 echo "${ECHO_T}$ac_ct_CC" >&6
1902 else
1903   echo "$as_me:1903: result: no" >&5
1904 echo "${ECHO_T}no" >&6
1905 fi
1906
1907   test -n "$ac_ct_CC" && break
1908 done
1909
1910   CC=$ac_ct_CC
1911 fi
1912
1913 test -z "$CC" && { { echo "$as_me:1913: error: no acceptable cc found in \$PATH" >&5
1914 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1915    { (exit 1); exit 1; }; }
1916
1917 # Provide some information about the compiler.
1918 echo "$as_me:1918:" \
1919      "checking for C compiler version" >&5
1920 ac_compiler=`set X $ac_compile; echo "$2"`
1921 { (eval echo "$as_me:1921: \"$ac_compiler --version </dev/null >&5\"") >&5
1922   (eval $ac_compiler --version </dev/null >&5) 2>&5
1923   ac_status=$?
1924   echo "$as_me:1924: \$? = $ac_status" >&5
1925   (exit "$ac_status"); }
1926 { (eval echo "$as_me:1926: \"$ac_compiler -v </dev/null >&5\"") >&5
1927   (eval $ac_compiler -v </dev/null >&5) 2>&5
1928   ac_status=$?
1929   echo "$as_me:1929: \$? = $ac_status" >&5
1930   (exit "$ac_status"); }
1931 { (eval echo "$as_me:1931: \"$ac_compiler -V </dev/null >&5\"") >&5
1932   (eval $ac_compiler -V </dev/null >&5) 2>&5
1933   ac_status=$?
1934   echo "$as_me:1934: \$? = $ac_status" >&5
1935   (exit "$ac_status"); }
1936
1937 cat >"conftest.$ac_ext" <<_ACEOF
1938 #line 1938 "configure"
1939 #include "confdefs.h"
1940
1941 int
1942 main (void)
1943 {
1944
1945   ;
1946   return 0;
1947 }
1948 _ACEOF
1949 ac_clean_files_save=$ac_clean_files
1950 ac_clean_files="$ac_clean_files a.out a.exe"
1951 # Try to create an executable without -o first, disregard a.out.
1952 # It will help us diagnose broken compilers, and finding out an intuition
1953 # of exeext.
1954 echo "$as_me:1954: checking for C compiler default output" >&5
1955 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1956 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1957 if { (eval echo "$as_me:1957: \"$ac_link_default\"") >&5
1958   (eval $ac_link_default) 2>&5
1959   ac_status=$?
1960   echo "$as_me:1960: \$? = $ac_status" >&5
1961   (exit "$ac_status"); }; then
1962   # Find the output, starting from the most likely.  This scheme is
1963 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1964 # resort.
1965 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1966                 ls a.out conftest 2>/dev/null;
1967                 ls a.* conftest.* 2>/dev/null`; do
1968   case $ac_file in
1969     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1970     a.out ) # We found the default executable, but exeext='' is most
1971             # certainly right.
1972             break;;
1973     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1974           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1975           export ac_cv_exeext
1976           break;;
1977     * ) break;;
1978   esac
1979 done
1980 else
1981   echo "$as_me: failed program was:" >&5
1982 cat "conftest.$ac_ext" >&5
1983 { { echo "$as_me:1983: error: C compiler cannot create executables" >&5
1984 echo "$as_me: error: C compiler cannot create executables" >&2;}
1985    { (exit 77); exit 77; }; }
1986 fi
1987
1988 ac_exeext=$ac_cv_exeext
1989 echo "$as_me:1989: result: $ac_file" >&5
1990 echo "${ECHO_T}$ac_file" >&6
1991
1992 # Check the compiler produces executables we can run.  If not, either
1993 # the compiler is broken, or we cross compile.
1994 echo "$as_me:1994: checking whether the C compiler works" >&5
1995 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1996 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1997 # If not cross compiling, check that we can run a simple program.
1998 if test "$cross_compiling" != yes; then
1999   if { ac_try='./$ac_file'
2000   { (eval echo "$as_me:2000: \"$ac_try\"") >&5
2001   (eval $ac_try) 2>&5
2002   ac_status=$?
2003   echo "$as_me:2003: \$? = $ac_status" >&5
2004   (exit "$ac_status"); }; }; then
2005     cross_compiling=no
2006   else
2007     if test "$cross_compiling" = maybe; then
2008         cross_compiling=yes
2009     else
2010         { { echo "$as_me:2010: error: cannot run C compiled programs.
2011 If you meant to cross compile, use \`--host'." >&5
2012 echo "$as_me: error: cannot run C compiled programs.
2013 If you meant to cross compile, use \`--host'." >&2;}
2014    { (exit 1); exit 1; }; }
2015     fi
2016   fi
2017 fi
2018 echo "$as_me:2018: result: yes" >&5
2019 echo "${ECHO_T}yes" >&6
2020
2021 rm -f a.out a.exe "conftest$ac_cv_exeext"
2022 ac_clean_files=$ac_clean_files_save
2023 # Check the compiler produces executables we can run.  If not, either
2024 # the compiler is broken, or we cross compile.
2025 echo "$as_me:2025: checking whether we are cross compiling" >&5
2026 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2027 echo "$as_me:2027: result: $cross_compiling" >&5
2028 echo "${ECHO_T}$cross_compiling" >&6
2029
2030 echo "$as_me:2030: checking for executable suffix" >&5
2031 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2032 if { (eval echo "$as_me:2032: \"$ac_link\"") >&5
2033   (eval $ac_link) 2>&5
2034   ac_status=$?
2035   echo "$as_me:2035: \$? = $ac_status" >&5
2036   (exit "$ac_status"); }; then
2037   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2038 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2039 # work properly (i.e., refer to `conftest.exe'), while it won't with
2040 # `rm'.
2041 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2042   case $ac_file in
2043     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2044     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2045           export ac_cv_exeext
2046           break;;
2047     * ) break;;
2048   esac
2049 done
2050 else
2051   { { echo "$as_me:2051: error: cannot compute EXEEXT: cannot compile and link" >&5
2052 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2053    { (exit 1); exit 1; }; }
2054 fi
2055
2056 rm -f "conftest$ac_cv_exeext"
2057 echo "$as_me:2057: result: $ac_cv_exeext" >&5
2058 echo "${ECHO_T}$ac_cv_exeext" >&6
2059
2060 rm -f "conftest.$ac_ext"
2061 EXEEXT=$ac_cv_exeext
2062 ac_exeext=$EXEEXT
2063 echo "$as_me:2063: checking for object suffix" >&5
2064 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2065 if test "${ac_cv_objext+set}" = set; then
2066   echo $ECHO_N "(cached) $ECHO_C" >&6
2067 else
2068   cat >"conftest.$ac_ext" <<_ACEOF
2069 #line 2069 "configure"
2070 #include "confdefs.h"
2071
2072 int
2073 main (void)
2074 {
2075
2076   ;
2077   return 0;
2078 }
2079 _ACEOF
2080 rm -f conftest.o conftest.obj
2081 if { (eval echo "$as_me:2081: \"$ac_compile\"") >&5
2082   (eval $ac_compile) 2>&5
2083   ac_status=$?
2084   echo "$as_me:2084: \$? = $ac_status" >&5
2085   (exit "$ac_status"); }; then
2086   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2087   case $ac_file in
2088     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2089     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2090        break;;
2091   esac
2092 done
2093 else
2094   echo "$as_me: failed program was:" >&5
2095 cat "conftest.$ac_ext" >&5
2096 { { echo "$as_me:2096: error: cannot compute OBJEXT: cannot compile" >&5
2097 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2098    { (exit 1); exit 1; }; }
2099 fi
2100
2101 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2102 fi
2103 echo "$as_me:2103: result: $ac_cv_objext" >&5
2104 echo "${ECHO_T}$ac_cv_objext" >&6
2105 OBJEXT=$ac_cv_objext
2106 ac_objext=$OBJEXT
2107 echo "$as_me:2107: checking whether we are using the GNU C compiler" >&5
2108 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2109 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2110   echo $ECHO_N "(cached) $ECHO_C" >&6
2111 else
2112   cat >"conftest.$ac_ext" <<_ACEOF
2113 #line 2113 "configure"
2114 #include "confdefs.h"
2115
2116 int
2117 main (void)
2118 {
2119 #ifndef __GNUC__
2120        choke me
2121 #endif
2122
2123   ;
2124   return 0;
2125 }
2126 _ACEOF
2127 rm -f "conftest.$ac_objext"
2128 if { (eval echo "$as_me:2128: \"$ac_compile\"") >&5
2129   (eval $ac_compile) 2>&5
2130   ac_status=$?
2131   echo "$as_me:2131: \$? = $ac_status" >&5
2132   (exit "$ac_status"); } &&
2133          { ac_try='test -s "conftest.$ac_objext"'
2134   { (eval echo "$as_me:2134: \"$ac_try\"") >&5
2135   (eval $ac_try) 2>&5
2136   ac_status=$?
2137   echo "$as_me:2137: \$? = $ac_status" >&5
2138   (exit "$ac_status"); }; }; then
2139   ac_compiler_gnu=yes
2140 else
2141   echo "$as_me: failed program was:" >&5
2142 cat "conftest.$ac_ext" >&5
2143 ac_compiler_gnu=no
2144 fi
2145 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2146 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2147
2148 fi
2149 echo "$as_me:2149: result: $ac_cv_c_compiler_gnu" >&5
2150 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2151 GCC=`test $ac_compiler_gnu = yes && echo yes`
2152 ac_test_CFLAGS=${CFLAGS+set}
2153 ac_save_CFLAGS=$CFLAGS
2154 CFLAGS="-g"
2155 echo "$as_me:2155: checking whether $CC accepts -g" >&5
2156 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2157 if test "${ac_cv_prog_cc_g+set}" = set; then
2158   echo $ECHO_N "(cached) $ECHO_C" >&6
2159 else
2160   cat >"conftest.$ac_ext" <<_ACEOF
2161 #line 2161 "configure"
2162 #include "confdefs.h"
2163
2164 int
2165 main (void)
2166 {
2167
2168   ;
2169   return 0;
2170 }
2171 _ACEOF
2172 rm -f "conftest.$ac_objext"
2173 if { (eval echo "$as_me:2173: \"$ac_compile\"") >&5
2174   (eval $ac_compile) 2>&5
2175   ac_status=$?
2176   echo "$as_me:2176: \$? = $ac_status" >&5
2177   (exit "$ac_status"); } &&
2178          { ac_try='test -s "conftest.$ac_objext"'
2179   { (eval echo "$as_me:2179: \"$ac_try\"") >&5
2180   (eval $ac_try) 2>&5
2181   ac_status=$?
2182   echo "$as_me:2182: \$? = $ac_status" >&5
2183   (exit "$ac_status"); }; }; then
2184   ac_cv_prog_cc_g=yes
2185 else
2186   echo "$as_me: failed program was:" >&5
2187 cat "conftest.$ac_ext" >&5
2188 ac_cv_prog_cc_g=no
2189 fi
2190 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2191 fi
2192 echo "$as_me:2192: result: $ac_cv_prog_cc_g" >&5
2193 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2194 if test "$ac_test_CFLAGS" = set; then
2195   CFLAGS=$ac_save_CFLAGS
2196 elif test $ac_cv_prog_cc_g = yes; then
2197   if test "$GCC" = yes; then
2198     CFLAGS="-g -O2"
2199   else
2200     CFLAGS="-g"
2201   fi
2202 else
2203   if test "$GCC" = yes; then
2204     CFLAGS="-O2"
2205   else
2206     CFLAGS=
2207   fi
2208 fi
2209 # Some people use a C++ compiler to compile C.  Since we use `exit',
2210 # in C++ we need to declare it.  In case someone uses the same compiler
2211 # for both compiling C and C++ we need to have the C++ compiler decide
2212 # the declaration of exit, since it's the most demanding environment.
2213 cat >"conftest.$ac_ext" <<_ACEOF
2214 #ifndef __cplusplus
2215   choke me
2216 #endif
2217 _ACEOF
2218 rm -f "conftest.$ac_objext"
2219 if { (eval echo "$as_me:2219: \"$ac_compile\"") >&5
2220   (eval $ac_compile) 2>&5
2221   ac_status=$?
2222   echo "$as_me:2222: \$? = $ac_status" >&5
2223   (exit "$ac_status"); } &&
2224          { ac_try='test -s "conftest.$ac_objext"'
2225   { (eval echo "$as_me:2225: \"$ac_try\"") >&5
2226   (eval $ac_try) 2>&5
2227   ac_status=$?
2228   echo "$as_me:2228: \$? = $ac_status" >&5
2229   (exit "$ac_status"); }; }; then
2230   for ac_declaration in \
2231    ''\
2232    '#include <stdlib.h>' \
2233    'extern "C" void std::exit (int) throw (); using std::exit;' \
2234    'extern "C" void std::exit (int); using std::exit;' \
2235    'extern "C" void exit (int) throw ();' \
2236    'extern "C" void exit (int);' \
2237    'void exit (int);'
2238 do
2239   cat >"conftest.$ac_ext" <<_ACEOF
2240 #line 2240 "configure"
2241 #include "confdefs.h"
2242 #include <stdlib.h>
2243 $ac_declaration
2244 int
2245 main (void)
2246 {
2247 exit (42);
2248   ;
2249   return 0;
2250 }
2251 _ACEOF
2252 rm -f "conftest.$ac_objext"
2253 if { (eval echo "$as_me:2253: \"$ac_compile\"") >&5
2254   (eval $ac_compile) 2>&5
2255   ac_status=$?
2256   echo "$as_me:2256: \$? = $ac_status" >&5
2257   (exit "$ac_status"); } &&
2258          { ac_try='test -s "conftest.$ac_objext"'
2259   { (eval echo "$as_me:2259: \"$ac_try\"") >&5
2260   (eval $ac_try) 2>&5
2261   ac_status=$?
2262   echo "$as_me:2262: \$? = $ac_status" >&5
2263   (exit "$ac_status"); }; }; then
2264   :
2265 else
2266   echo "$as_me: failed program was:" >&5
2267 cat "conftest.$ac_ext" >&5
2268 continue
2269 fi
2270 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2271   cat >"conftest.$ac_ext" <<_ACEOF
2272 #line 2272 "configure"
2273 #include "confdefs.h"
2274 $ac_declaration
2275 int
2276 main (void)
2277 {
2278 exit (42);
2279   ;
2280   return 0;
2281 }
2282 _ACEOF
2283 rm -f "conftest.$ac_objext"
2284 if { (eval echo "$as_me:2284: \"$ac_compile\"") >&5
2285   (eval $ac_compile) 2>&5
2286   ac_status=$?
2287   echo "$as_me:2287: \$? = $ac_status" >&5
2288   (exit "$ac_status"); } &&
2289          { ac_try='test -s "conftest.$ac_objext"'
2290   { (eval echo "$as_me:2290: \"$ac_try\"") >&5
2291   (eval $ac_try) 2>&5
2292   ac_status=$?
2293   echo "$as_me:2293: \$? = $ac_status" >&5
2294   (exit "$ac_status"); }; }; then
2295   break
2296 else
2297   echo "$as_me: failed program was:" >&5
2298 cat "conftest.$ac_ext" >&5
2299 fi
2300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2301 done
2302 rm -rf conftest*
2303 if test -n "$ac_declaration"; then
2304   echo '#ifdef __cplusplus' >>confdefs.h
2305   echo "$ac_declaration"    >>confdefs.h
2306   echo '#endif'             >>confdefs.h
2307 fi
2308
2309 else
2310   echo "$as_me: failed program was:" >&5
2311 cat "conftest.$ac_ext" >&5
2312 fi
2313 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2314 ac_ext=c
2315 ac_cpp='$CPP $CPPFLAGS'
2316 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2317 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2318 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2319 ac_main_return="return"
2320
2321 GCC_VERSION=none
2322 if test "$GCC" = yes ; then
2323         echo "$as_me:2323: checking version of $CC" >&5
2324 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2325         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2326         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2327         echo "$as_me:2327: result: $GCC_VERSION" >&5
2328 echo "${ECHO_T}$GCC_VERSION" >&6
2329 fi
2330
2331 INTEL_COMPILER=no
2332
2333 if test "$GCC" = yes ; then
2334         case "$host_os" in
2335         (linux*|gnu*)
2336                 echo "$as_me:2336: checking if this is really Intel C compiler" >&5
2337 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2338                 cf_save_CFLAGS="$CFLAGS"
2339                 CFLAGS="$CFLAGS -no-gcc"
2340                 cat >"conftest.$ac_ext" <<_ACEOF
2341 #line 2341 "configure"
2342 #include "confdefs.h"
2343
2344 int
2345 main (void)
2346 {
2347
2348 #ifdef __INTEL_COMPILER
2349 #else
2350 #error __INTEL_COMPILER is not defined
2351 #endif
2352
2353   ;
2354   return 0;
2355 }
2356 _ACEOF
2357 rm -f "conftest.$ac_objext"
2358 if { (eval echo "$as_me:2358: \"$ac_compile\"") >&5
2359   (eval $ac_compile) 2>&5
2360   ac_status=$?
2361   echo "$as_me:2361: \$? = $ac_status" >&5
2362   (exit "$ac_status"); } &&
2363          { ac_try='test -s "conftest.$ac_objext"'
2364   { (eval echo "$as_me:2364: \"$ac_try\"") >&5
2365   (eval $ac_try) 2>&5
2366   ac_status=$?
2367   echo "$as_me:2367: \$? = $ac_status" >&5
2368   (exit "$ac_status"); }; }; then
2369   INTEL_COMPILER=yes
2370 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2371
2372 else
2373   echo "$as_me: failed program was:" >&5
2374 cat "conftest.$ac_ext" >&5
2375 fi
2376 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2377                 CFLAGS="$cf_save_CFLAGS"
2378                 echo "$as_me:2378: result: $INTEL_COMPILER" >&5
2379 echo "${ECHO_T}$INTEL_COMPILER" >&6
2380                 ;;
2381         esac
2382 fi
2383
2384 CLANG_COMPILER=no
2385
2386 if test "$GCC" = yes ; then
2387         echo "$as_me:2387: checking if this is really Clang C compiler" >&5
2388 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2389         cf_save_CFLAGS="$CFLAGS"
2390         cat >"conftest.$ac_ext" <<_ACEOF
2391 #line 2391 "configure"
2392 #include "confdefs.h"
2393
2394 int
2395 main (void)
2396 {
2397
2398 #ifdef __clang__
2399 #else
2400 #error __clang__ is not defined
2401 #endif
2402
2403   ;
2404   return 0;
2405 }
2406 _ACEOF
2407 rm -f "conftest.$ac_objext"
2408 if { (eval echo "$as_me:2408: \"$ac_compile\"") >&5
2409   (eval $ac_compile) 2>&5
2410   ac_status=$?
2411   echo "$as_me:2411: \$? = $ac_status" >&5
2412   (exit "$ac_status"); } &&
2413          { ac_try='test -s "conftest.$ac_objext"'
2414   { (eval echo "$as_me:2414: \"$ac_try\"") >&5
2415   (eval $ac_try) 2>&5
2416   ac_status=$?
2417   echo "$as_me:2417: \$? = $ac_status" >&5
2418   (exit "$ac_status"); }; }; then
2419   CLANG_COMPILER=yes
2420
2421 else
2422   echo "$as_me: failed program was:" >&5
2423 cat "conftest.$ac_ext" >&5
2424 fi
2425 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2426         CFLAGS="$cf_save_CFLAGS"
2427         echo "$as_me:2427: result: $CLANG_COMPILER" >&5
2428 echo "${ECHO_T}$CLANG_COMPILER" >&6
2429 fi
2430
2431 CLANG_VERSION=none
2432
2433 if test "x$CLANG_COMPILER" = "xyes" ; then
2434         case "$CC" in
2435         (c[1-9][0-9]|*/c[1-9][0-9])
2436                 { echo "$as_me:2436: WARNING: replacing broken compiler alias $CC" >&5
2437 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2438                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2439                 CC=clang
2440                 ;;
2441         esac
2442
2443         echo "$as_me:2443: checking version of $CC" >&5
2444 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2445         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.].*//'`"
2446         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2447         echo "$as_me:2447: result: $CLANG_VERSION" >&5
2448 echo "${ECHO_T}$CLANG_VERSION" >&6
2449
2450         for cf_clang_opt in \
2451                 -Qunused-arguments \
2452                 -Wno-error=implicit-function-declaration
2453         do
2454                 echo "$as_me:2454: checking if option $cf_clang_opt works" >&5
2455 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2456                 cf_save_CFLAGS="$CFLAGS"
2457                 CFLAGS="$CFLAGS $cf_clang_opt"
2458                 cat >"conftest.$ac_ext" <<_ACEOF
2459 #line 2459 "configure"
2460 #include "confdefs.h"
2461
2462                         #include <stdio.h>
2463 int
2464 main (void)
2465 {
2466
2467                         printf("hello!\\n");
2468   ;
2469   return 0;
2470 }
2471 _ACEOF
2472 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2473 if { (eval echo "$as_me:2473: \"$ac_link\"") >&5
2474   (eval $ac_link) 2>&5
2475   ac_status=$?
2476   echo "$as_me:2476: \$? = $ac_status" >&5
2477   (exit "$ac_status"); } &&
2478          { ac_try='test -s "conftest$ac_exeext"'
2479   { (eval echo "$as_me:2479: \"$ac_try\"") >&5
2480   (eval $ac_try) 2>&5
2481   ac_status=$?
2482   echo "$as_me:2482: \$? = $ac_status" >&5
2483   (exit "$ac_status"); }; }; then
2484
2485                         cf_clang_optok=yes
2486 else
2487   echo "$as_me: failed program was:" >&5
2488 cat "conftest.$ac_ext" >&5
2489
2490                         cf_clang_optok=no
2491 fi
2492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2493                 echo "$as_me:2493: result: $cf_clang_optok" >&5
2494 echo "${ECHO_T}$cf_clang_optok" >&6
2495                 CFLAGS="$cf_save_CFLAGS"
2496                 if test "$cf_clang_optok" = yes; then
2497                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2498
2499 echo "${as_me:-configure}:2499: testing adding option $cf_clang_opt ..." 1>&5
2500
2501         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2502         CFLAGS="${CFLAGS}$cf_clang_opt"
2503
2504                 fi
2505         done
2506 fi
2507
2508 echo "$as_me:2508: checking for $CC option to accept ANSI C" >&5
2509 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2510 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2511   echo $ECHO_N "(cached) $ECHO_C" >&6
2512 else
2513   ac_cv_prog_cc_stdc=no
2514 ac_save_CC=$CC
2515 cat >"conftest.$ac_ext" <<_ACEOF
2516 #line 2516 "configure"
2517 #include "confdefs.h"
2518 #include <stdarg.h>
2519 #include <stdio.h>
2520 #include <sys/types.h>
2521 #include <sys/stat.h>
2522 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2523 struct buf { int x; };
2524 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2525 static char *e (char **p, int i)
2526 {
2527   return p[i];
2528 }
2529 static char *f (char * (*g) (char **, int), char **p, ...)
2530 {
2531   char *s;
2532   va_list v;
2533   va_start (v,p);
2534   s = g (p, va_arg (v,int));
2535   va_end (v);
2536   return s;
2537 }
2538 int test (int i, double x);
2539 struct s1 {int (*f) (int a);};
2540 struct s2 {int (*f) (double a);};
2541 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2542 int argc;
2543 char **argv;
2544 int
2545 main (void)
2546 {
2547 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2548   ;
2549   return 0;
2550 }
2551 _ACEOF
2552 # Don't try gcc -ansi; that turns off useful extensions and
2553 # breaks some systems' header files.
2554 # AIX                   -qlanglvl=ansi
2555 # Ultrix and OSF/1      -std1
2556 # HP-UX 10.20 and later -Ae
2557 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2558 # SVR4                  -Xc -D__EXTENSIONS__
2559 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2560 do
2561   CC="$ac_save_CC $ac_arg"
2562   rm -f "conftest.$ac_objext"
2563 if { (eval echo "$as_me:2563: \"$ac_compile\"") >&5
2564   (eval $ac_compile) 2>&5
2565   ac_status=$?
2566   echo "$as_me:2566: \$? = $ac_status" >&5
2567   (exit "$ac_status"); } &&
2568          { ac_try='test -s "conftest.$ac_objext"'
2569   { (eval echo "$as_me:2569: \"$ac_try\"") >&5
2570   (eval $ac_try) 2>&5
2571   ac_status=$?
2572   echo "$as_me:2572: \$? = $ac_status" >&5
2573   (exit "$ac_status"); }; }; then
2574   ac_cv_prog_cc_stdc=$ac_arg
2575 break
2576 else
2577   echo "$as_me: failed program was:" >&5
2578 cat "conftest.$ac_ext" >&5
2579 fi
2580 rm -f "conftest.$ac_objext"
2581 done
2582 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2583 CC=$ac_save_CC
2584
2585 fi
2586
2587 case "x$ac_cv_prog_cc_stdc" in
2588   x|xno)
2589     echo "$as_me:2589: result: none needed" >&5
2590 echo "${ECHO_T}none needed" >&6 ;;
2591   *)
2592     echo "$as_me:2592: result: $ac_cv_prog_cc_stdc" >&5
2593 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2594     CC="$CC $ac_cv_prog_cc_stdc" ;;
2595 esac
2596
2597 # This should have been defined by AC_PROG_CC
2598 : "${CC:=cc}"
2599
2600 echo "$as_me:2600: checking \$CFLAGS variable" >&5
2601 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2602 case "x$CFLAGS" in
2603 (*-[IUD]*)
2604         echo "$as_me:2604: result: broken" >&5
2605 echo "${ECHO_T}broken" >&6
2606         { echo "$as_me:2606: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2607 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2608         cf_flags="$CFLAGS"
2609         CFLAGS=
2610         for cf_arg in $cf_flags
2611         do
2612
2613 cf_fix_cppflags=no
2614 cf_new_cflags=
2615 cf_new_cppflags=
2616 cf_new_extra_cppflags=
2617
2618 for cf_add_cflags in $cf_arg
2619 do
2620 case "$cf_fix_cppflags" in
2621 (no)
2622         case "$cf_add_cflags" in
2623         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2624                 case "$cf_add_cflags" in
2625                 (-D*)
2626                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2627
2628                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2629                                 && test -z "${cf_tst_cflags}" \
2630                                 && cf_fix_cppflags=yes
2631
2632                         if test "$cf_fix_cppflags" = yes ; then
2633
2634         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2635         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2636
2637                                 continue
2638                         elif test "${cf_tst_cflags}" = "\"'" ; then
2639
2640         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2641         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2642
2643                                 continue
2644                         fi
2645                         ;;
2646                 esac
2647                 case "$CPPFLAGS" in
2648                 (*$cf_add_cflags)
2649                         ;;
2650                 (*)
2651                         case "$cf_add_cflags" in
2652                         (-D*)
2653                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2654
2655 CPPFLAGS=`echo "$CPPFLAGS" | \
2656         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2657                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2658
2659                                 ;;
2660                         esac
2661
2662         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2663         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2664
2665                         ;;
2666                 esac
2667                 ;;
2668         (*)
2669
2670         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2671         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2672
2673                 ;;
2674         esac
2675         ;;
2676 (yes)
2677
2678         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2679         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2680
2681         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2682
2683         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2684                 && test -z "${cf_tst_cflags}" \
2685                 && cf_fix_cppflags=no
2686         ;;
2687 esac
2688 done
2689
2690 if test -n "$cf_new_cflags" ; then
2691
2692         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2693         CFLAGS="${CFLAGS}$cf_new_cflags"
2694
2695 fi
2696
2697 if test -n "$cf_new_cppflags" ; then
2698
2699         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2700         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2701
2702 fi
2703
2704 if test -n "$cf_new_extra_cppflags" ; then
2705
2706         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2707         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2708
2709 fi
2710
2711         done
2712         ;;
2713 (*)
2714         echo "$as_me:2714: result: ok" >&5
2715 echo "${ECHO_T}ok" >&6
2716         ;;
2717 esac
2718
2719 echo "$as_me:2719: checking \$CC variable" >&5
2720 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2721 case "$CC" in
2722 (*[\ \  ]-*)
2723         echo "$as_me:2723: result: broken" >&5
2724 echo "${ECHO_T}broken" >&6
2725         { echo "$as_me:2725: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2726 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2727         # humor him...
2728         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2729         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2730         CC="$cf_prog"
2731         for cf_arg in $cf_flags
2732         do
2733                 case "x$cf_arg" in
2734                 (x-[IUDfgOW]*)
2735
2736 cf_fix_cppflags=no
2737 cf_new_cflags=
2738 cf_new_cppflags=
2739 cf_new_extra_cppflags=
2740
2741 for cf_add_cflags in $cf_arg
2742 do
2743 case "$cf_fix_cppflags" in
2744 (no)
2745         case "$cf_add_cflags" in
2746         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2747                 case "$cf_add_cflags" in
2748                 (-D*)
2749                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2750
2751                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2752                                 && test -z "${cf_tst_cflags}" \
2753                                 && cf_fix_cppflags=yes
2754
2755                         if test "$cf_fix_cppflags" = yes ; then
2756
2757         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2758         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2759
2760                                 continue
2761                         elif test "${cf_tst_cflags}" = "\"'" ; then
2762
2763         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2764         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2765
2766                                 continue
2767                         fi
2768                         ;;
2769                 esac
2770                 case "$CPPFLAGS" in
2771                 (*$cf_add_cflags)
2772                         ;;
2773                 (*)
2774                         case "$cf_add_cflags" in
2775                         (-D*)
2776                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2777
2778 CPPFLAGS=`echo "$CPPFLAGS" | \
2779         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2780                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2781
2782                                 ;;
2783                         esac
2784
2785         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2786         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2787
2788                         ;;
2789                 esac
2790                 ;;
2791         (*)
2792
2793         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2794         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2795
2796                 ;;
2797         esac
2798         ;;
2799 (yes)
2800
2801         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2802         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2803
2804         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2805
2806         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2807                 && test -z "${cf_tst_cflags}" \
2808                 && cf_fix_cppflags=no
2809         ;;
2810 esac
2811 done
2812
2813 if test -n "$cf_new_cflags" ; then
2814
2815         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2816         CFLAGS="${CFLAGS}$cf_new_cflags"
2817
2818 fi
2819
2820 if test -n "$cf_new_cppflags" ; then
2821
2822         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2823         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2824
2825 fi
2826
2827 if test -n "$cf_new_extra_cppflags" ; then
2828
2829         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2830         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2831
2832 fi
2833
2834                         ;;
2835                 (*)
2836                         CC="$CC $cf_arg"
2837                         ;;
2838                 esac
2839         done
2840         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2841
2842 echo "${as_me:-configure}:2842: testing resulting CC: '$CC' ..." 1>&5
2843
2844         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2845
2846 echo "${as_me:-configure}:2846: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2847
2848         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2849
2850 echo "${as_me:-configure}:2850: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2851
2852         ;;
2853 (*)
2854         echo "$as_me:2854: result: ok" >&5
2855 echo "${ECHO_T}ok" >&6
2856         ;;
2857 esac
2858
2859 ac_ext=c
2860 ac_cpp='$CPP $CPPFLAGS'
2861 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2862 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2863 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2864 ac_main_return="return"
2865 echo "$as_me:2865: checking how to run the C preprocessor" >&5
2866 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2867 # On Suns, sometimes $CPP names a directory.
2868 if test -n "$CPP" && test -d "$CPP"; then
2869   CPP=
2870 fi
2871 if test -z "$CPP"; then
2872   if test "${ac_cv_prog_CPP+set}" = set; then
2873   echo $ECHO_N "(cached) $ECHO_C" >&6
2874 else
2875       # Double quotes because CPP needs to be expanded
2876     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2877     do
2878       ac_preproc_ok=false
2879 for ac_c_preproc_warn_flag in '' yes
2880 do
2881   # Use a header file that comes with gcc, so configuring glibc
2882   # with a fresh cross-compiler works.
2883   # On the NeXT, cc -E runs the code through the compiler's parser,
2884   # not just through cpp. "Syntax error" is here to catch this case.
2885   cat >"conftest.$ac_ext" <<_ACEOF
2886 #line 2886 "configure"
2887 #include "confdefs.h"
2888 #include <assert.h>
2889                      Syntax error
2890 _ACEOF
2891 if { (eval echo "$as_me:2891: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2892   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2893   ac_status=$?
2894   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2895   rm -f conftest.er1
2896   cat conftest.err >&5
2897   echo "$as_me:2897: \$? = $ac_status" >&5
2898   (exit "$ac_status"); } >/dev/null; then
2899   if test -s conftest.err; then
2900     ac_cpp_err=$ac_c_preproc_warn_flag
2901   else
2902     ac_cpp_err=
2903   fi
2904 else
2905   ac_cpp_err=yes
2906 fi
2907 if test -z "$ac_cpp_err"; then
2908   :
2909 else
2910   echo "$as_me: failed program was:" >&5
2911   cat "conftest.$ac_ext" >&5
2912   # Broken: fails on valid input.
2913 continue
2914 fi
2915 rm -f conftest.err "conftest.$ac_ext"
2916
2917   # OK, works on sane cases.  Now check whether non-existent headers
2918   # can be detected and how.
2919   cat >"conftest.$ac_ext" <<_ACEOF
2920 #line 2920 "configure"
2921 #include "confdefs.h"
2922 #include <ac_nonexistent.h>
2923 _ACEOF
2924 if { (eval echo "$as_me:2924: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2925   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2926   ac_status=$?
2927   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2928   rm -f conftest.er1
2929   cat conftest.err >&5
2930   echo "$as_me:2930: \$? = $ac_status" >&5
2931   (exit "$ac_status"); } >/dev/null; then
2932   if test -s conftest.err; then
2933     ac_cpp_err=$ac_c_preproc_warn_flag
2934   else
2935     ac_cpp_err=
2936   fi
2937 else
2938   ac_cpp_err=yes
2939 fi
2940 if test -z "$ac_cpp_err"; then
2941   # Broken: success on invalid input.
2942 continue
2943 else
2944   echo "$as_me: failed program was:" >&5
2945   cat "conftest.$ac_ext" >&5
2946   # Passes both tests.
2947 ac_preproc_ok=:
2948 break
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952 done
2953 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2954 rm -f conftest.err "conftest.$ac_ext"
2955 if $ac_preproc_ok; then
2956   break
2957 fi
2958
2959     done
2960     ac_cv_prog_CPP=$CPP
2961
2962 fi
2963   CPP=$ac_cv_prog_CPP
2964 else
2965   ac_cv_prog_CPP=$CPP
2966 fi
2967 echo "$as_me:2967: result: $CPP" >&5
2968 echo "${ECHO_T}$CPP" >&6
2969 ac_preproc_ok=false
2970 for ac_c_preproc_warn_flag in '' yes
2971 do
2972   # Use a header file that comes with gcc, so configuring glibc
2973   # with a fresh cross-compiler works.
2974   # On the NeXT, cc -E runs the code through the compiler's parser,
2975   # not just through cpp. "Syntax error" is here to catch this case.
2976   cat >"conftest.$ac_ext" <<_ACEOF
2977 #line 2977 "configure"
2978 #include "confdefs.h"
2979 #include <assert.h>
2980                      Syntax error
2981 _ACEOF
2982 if { (eval echo "$as_me:2982: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2983   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2984   ac_status=$?
2985   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2986   rm -f conftest.er1
2987   cat conftest.err >&5
2988   echo "$as_me:2988: \$? = $ac_status" >&5
2989   (exit "$ac_status"); } >/dev/null; then
2990   if test -s conftest.err; then
2991     ac_cpp_err=$ac_c_preproc_warn_flag
2992   else
2993     ac_cpp_err=
2994   fi
2995 else
2996   ac_cpp_err=yes
2997 fi
2998 if test -z "$ac_cpp_err"; then
2999   :
3000 else
3001   echo "$as_me: failed program was:" >&5
3002   cat "conftest.$ac_ext" >&5
3003   # Broken: fails on valid input.
3004 continue
3005 fi
3006 rm -f conftest.err "conftest.$ac_ext"
3007
3008   # OK, works on sane cases.  Now check whether non-existent headers
3009   # can be detected and how.
3010   cat >"conftest.$ac_ext" <<_ACEOF
3011 #line 3011 "configure"
3012 #include "confdefs.h"
3013 #include <ac_nonexistent.h>
3014 _ACEOF
3015 if { (eval echo "$as_me:3015: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3016   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3017   ac_status=$?
3018   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3019   rm -f conftest.er1
3020   cat conftest.err >&5
3021   echo "$as_me:3021: \$? = $ac_status" >&5
3022   (exit "$ac_status"); } >/dev/null; then
3023   if test -s conftest.err; then
3024     ac_cpp_err=$ac_c_preproc_warn_flag
3025   else
3026     ac_cpp_err=
3027   fi
3028 else
3029   ac_cpp_err=yes
3030 fi
3031 if test -z "$ac_cpp_err"; then
3032   # Broken: success on invalid input.
3033 continue
3034 else
3035   echo "$as_me: failed program was:" >&5
3036   cat "conftest.$ac_ext" >&5
3037   # Passes both tests.
3038 ac_preproc_ok=:
3039 break
3040 fi
3041 rm -f conftest.err "conftest.$ac_ext"
3042
3043 done
3044 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3045 rm -f conftest.err "conftest.$ac_ext"
3046 if $ac_preproc_ok; then
3047   :
3048 else
3049   { { echo "$as_me:3049: error: C preprocessor \"$CPP\" fails sanity check" >&5
3050 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3051    { (exit 1); exit 1; }; }
3052 fi
3053
3054 ac_ext=c
3055 ac_cpp='$CPP $CPPFLAGS'
3056 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3057 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3058 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3059 ac_main_return="return"
3060
3061 if test $ac_cv_c_compiler_gnu = yes; then
3062     echo "$as_me:3062: checking whether $CC needs -traditional" >&5
3063 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3064 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3065   echo $ECHO_N "(cached) $ECHO_C" >&6
3066 else
3067     ac_pattern="Autoconf.*'x'"
3068   cat >"conftest.$ac_ext" <<_ACEOF
3069 #line 3069 "configure"
3070 #include "confdefs.h"
3071 #include <sgtty.h>
3072 int Autoconf = TIOCGETP;
3073 _ACEOF
3074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3075   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3076   ac_cv_prog_gcc_traditional=yes
3077 else
3078   ac_cv_prog_gcc_traditional=no
3079 fi
3080 rm -rf conftest*
3081
3082   if test $ac_cv_prog_gcc_traditional = no; then
3083     cat >"conftest.$ac_ext" <<_ACEOF
3084 #line 3084 "configure"
3085 #include "confdefs.h"
3086 #include <termio.h>
3087 int Autoconf = TCGETA;
3088 _ACEOF
3089 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3090   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3091   ac_cv_prog_gcc_traditional=yes
3092 fi
3093 rm -rf conftest*
3094
3095   fi
3096 fi
3097 echo "$as_me:3097: result: $ac_cv_prog_gcc_traditional" >&5
3098 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3099   if test $ac_cv_prog_gcc_traditional = yes; then
3100     CC="$CC -traditional"
3101   fi
3102 fi
3103
3104 echo "$as_me:3104: checking whether $CC understands -c and -o together" >&5
3105 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3106 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3107   echo $ECHO_N "(cached) $ECHO_C" >&6
3108 else
3109
3110 cat > conftest.$ac_ext <<CF_EOF
3111 int main(void)
3112 {
3113         ${cf_cv_main_return:-return}(0);
3114 }
3115 CF_EOF
3116 # We do the test twice because some compilers refuse to overwrite an
3117 # existing .o file with -o, though they will create one.
3118 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3119 if { (eval echo "$as_me:3119: \"$ac_try\"") >&5
3120   (eval $ac_try) 2>&5
3121   ac_status=$?
3122   echo "$as_me:3122: \$? = $ac_status" >&5
3123   (exit "$ac_status"); } &&
3124   test -f conftest2.$ac_objext && { (eval echo "$as_me:3124: \"$ac_try\"") >&5
3125   (eval $ac_try) 2>&5
3126   ac_status=$?
3127   echo "$as_me:3127: \$? = $ac_status" >&5
3128   (exit "$ac_status"); };
3129 then
3130   eval cf_cv_prog_CC_c_o=yes
3131 else
3132   eval cf_cv_prog_CC_c_o=no
3133 fi
3134 rm -rf ./conftest*
3135
3136 fi
3137 if test "$cf_cv_prog_CC_c_o" = yes; then
3138   echo "$as_me:3138: result: yes" >&5
3139 echo "${ECHO_T}yes" >&6
3140 else
3141   echo "$as_me:3141: result: no" >&5
3142 echo "${ECHO_T}no" >&6
3143 fi
3144
3145 if test "$cross_compiling" = yes ; then
3146         LDCONFIG=:
3147 else
3148         case "$cf_cv_system_name" in
3149         (dragonfly*|mirbsd*|freebsd*)
3150                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3151                 ;;
3152         (*) LDPATH=$PATH:/sbin:/usr/sbin
3153                 # Extract the first word of "ldconfig", so it can be a program name with args.
3154 set dummy ldconfig; ac_word=$2
3155 echo "$as_me:3155: checking for $ac_word" >&5
3156 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3157 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3158   echo $ECHO_N "(cached) $ECHO_C" >&6
3159 else
3160   case $LDCONFIG in
3161   [\\/]* | ?:[\\/]*)
3162   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3163   ;;
3164   *)
3165   ac_save_IFS=$IFS; IFS=$ac_path_separator
3166 ac_dummy="$LDPATH"
3167 for ac_dir in $ac_dummy; do
3168   IFS=$ac_save_IFS
3169   test -z "$ac_dir" && ac_dir=.
3170   if $as_executable_p "$ac_dir/$ac_word"; then
3171    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3172    echo "$as_me:3172: found $ac_dir/$ac_word" >&5
3173    break
3174 fi
3175 done
3176
3177   ;;
3178 esac
3179 fi
3180 LDCONFIG=$ac_cv_path_LDCONFIG
3181
3182 if test -n "$LDCONFIG"; then
3183   echo "$as_me:3183: result: $LDCONFIG" >&5
3184 echo "${ECHO_T}$LDCONFIG" >&6
3185 else
3186   echo "$as_me:3186: result: no" >&5
3187 echo "${ECHO_T}no" >&6
3188 fi
3189
3190                 ;;
3191         esac
3192 fi
3193
3194 echo "$as_me:3194: checking if you want to ensure bool is consistent with C++" >&5
3195 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3196
3197 # Check whether --with-cxx or --without-cxx was given.
3198 if test "${with_cxx+set}" = set; then
3199   withval="$with_cxx"
3200   cf_with_cxx=$withval
3201 else
3202   cf_with_cxx=yes
3203 fi;
3204 echo "$as_me:3204: result: $cf_with_cxx" >&5
3205 echo "${ECHO_T}$cf_with_cxx" >&6
3206 if test "X$cf_with_cxx" = Xno ; then
3207         CXX=""
3208         GXX=""
3209 else
3210         # with autoconf 2.13, we can change the error to a warning:
3211                 ac_ext=cc
3212 ac_cpp='$CXXCPP $CPPFLAGS'
3213 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3214 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3215 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3216 ac_main_return="return"
3217 if test -n "$ac_tool_prefix"; then
3218   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3219   do
3220     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3221 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3222 echo "$as_me:3222: checking for $ac_word" >&5
3223 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3224 if test "${ac_cv_prog_CXX+set}" = set; then
3225   echo $ECHO_N "(cached) $ECHO_C" >&6
3226 else
3227   if test -n "$CXX"; then
3228   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3229 else
3230   ac_save_IFS=$IFS; IFS=$ac_path_separator
3231 ac_dummy="$PATH"
3232 for ac_dir in $ac_dummy; do
3233   IFS=$ac_save_IFS
3234   test -z "$ac_dir" && ac_dir=.
3235   $as_executable_p "$ac_dir/$ac_word" || continue
3236 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3237 echo "$as_me:3237: found $ac_dir/$ac_word" >&5
3238 break
3239 done
3240
3241 fi
3242 fi
3243 CXX=$ac_cv_prog_CXX
3244 if test -n "$CXX"; then
3245   echo "$as_me:3245: result: $CXX" >&5
3246 echo "${ECHO_T}$CXX" >&6
3247 else
3248   echo "$as_me:3248: result: no" >&5
3249 echo "${ECHO_T}no" >&6
3250 fi
3251
3252     test -n "$CXX" && break
3253   done
3254 fi
3255 if test -z "$CXX"; then
3256   ac_ct_CXX=$CXX
3257   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3258 do
3259   # Extract the first word of "$ac_prog", so it can be a program name with args.
3260 set dummy $ac_prog; ac_word=$2
3261 echo "$as_me:3261: checking for $ac_word" >&5
3262 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3263 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3264   echo $ECHO_N "(cached) $ECHO_C" >&6
3265 else
3266   if test -n "$ac_ct_CXX"; then
3267   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3268 else
3269   ac_save_IFS=$IFS; IFS=$ac_path_separator
3270 ac_dummy="$PATH"
3271 for ac_dir in $ac_dummy; do
3272   IFS=$ac_save_IFS
3273   test -z "$ac_dir" && ac_dir=.
3274   $as_executable_p "$ac_dir/$ac_word" || continue
3275 ac_cv_prog_ac_ct_CXX="$ac_prog"
3276 echo "$as_me:3276: found $ac_dir/$ac_word" >&5
3277 break
3278 done
3279
3280 fi
3281 fi
3282 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3283 if test -n "$ac_ct_CXX"; then
3284   echo "$as_me:3284: result: $ac_ct_CXX" >&5
3285 echo "${ECHO_T}$ac_ct_CXX" >&6
3286 else
3287   echo "$as_me:3287: result: no" >&5
3288 echo "${ECHO_T}no" >&6
3289 fi
3290
3291   test -n "$ac_ct_CXX" && break
3292 done
3293 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3294
3295   CXX=$ac_ct_CXX
3296 fi
3297
3298 # Provide some information about the compiler.
3299 echo "$as_me:3299:" \
3300      "checking for C++ compiler version" >&5
3301 ac_compiler=`set X $ac_compile; echo $2`
3302 { (eval echo "$as_me:3302: \"$ac_compiler --version </dev/null >&5\"") >&5
3303   (eval $ac_compiler --version </dev/null >&5) 2>&5
3304   ac_status=$?
3305   echo "$as_me:3305: \$? = $ac_status" >&5
3306   (exit "$ac_status"); }
3307 { (eval echo "$as_me:3307: \"$ac_compiler -v </dev/null >&5\"") >&5
3308   (eval $ac_compiler -v </dev/null >&5) 2>&5
3309   ac_status=$?
3310   echo "$as_me:3310: \$? = $ac_status" >&5
3311   (exit "$ac_status"); }
3312 { (eval echo "$as_me:3312: \"$ac_compiler -V </dev/null >&5\"") >&5
3313   (eval $ac_compiler -V </dev/null >&5) 2>&5
3314   ac_status=$?
3315   echo "$as_me:3315: \$? = $ac_status" >&5
3316   (exit "$ac_status"); }
3317
3318 echo "$as_me:3318: checking whether we are using the GNU C++ compiler" >&5
3319 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3320 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3321   echo $ECHO_N "(cached) $ECHO_C" >&6
3322 else
3323   cat >"conftest.$ac_ext" <<_ACEOF
3324 #line 3324 "configure"
3325 #include "confdefs.h"
3326
3327 int
3328 main (void)
3329 {
3330 #ifndef __GNUC__
3331        choke me
3332 #endif
3333
3334   ;
3335   return 0;
3336 }
3337 _ACEOF
3338 rm -f "conftest.$ac_objext"
3339 if { (eval echo "$as_me:3339: \"$ac_compile\"") >&5
3340   (eval $ac_compile) 2>&5
3341   ac_status=$?
3342   echo "$as_me:3342: \$? = $ac_status" >&5
3343   (exit "$ac_status"); } &&
3344          { ac_try='test -s "conftest.$ac_objext"'
3345   { (eval echo "$as_me:3345: \"$ac_try\"") >&5
3346   (eval $ac_try) 2>&5
3347   ac_status=$?
3348   echo "$as_me:3348: \$? = $ac_status" >&5
3349   (exit "$ac_status"); }; }; then
3350   ac_compiler_gnu=yes
3351 else
3352   echo "$as_me: failed program was:" >&5
3353 cat "conftest.$ac_ext" >&5
3354 ac_compiler_gnu=no
3355 fi
3356 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3357 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3358
3359 fi
3360 echo "$as_me:3360: result: $ac_cv_cxx_compiler_gnu" >&5
3361 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3362 GXX=`test $ac_compiler_gnu = yes && echo yes`
3363 ac_test_CXXFLAGS=${CXXFLAGS+set}
3364 ac_save_CXXFLAGS=$CXXFLAGS
3365 CXXFLAGS="-g"
3366 echo "$as_me:3366: checking whether $CXX accepts -g" >&5
3367 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3368 if test "${ac_cv_prog_cxx_g+set}" = set; then
3369   echo $ECHO_N "(cached) $ECHO_C" >&6
3370 else
3371   cat >"conftest.$ac_ext" <<_ACEOF
3372 #line 3372 "configure"
3373 #include "confdefs.h"
3374
3375 int
3376 main (void)
3377 {
3378
3379   ;
3380   return 0;
3381 }
3382 _ACEOF
3383 rm -f "conftest.$ac_objext"
3384 if { (eval echo "$as_me:3384: \"$ac_compile\"") >&5
3385   (eval $ac_compile) 2>&5
3386   ac_status=$?
3387   echo "$as_me:3387: \$? = $ac_status" >&5
3388   (exit "$ac_status"); } &&
3389          { ac_try='test -s "conftest.$ac_objext"'
3390   { (eval echo "$as_me:3390: \"$ac_try\"") >&5
3391   (eval $ac_try) 2>&5
3392   ac_status=$?
3393   echo "$as_me:3393: \$? = $ac_status" >&5
3394   (exit "$ac_status"); }; }; then
3395   ac_cv_prog_cxx_g=yes
3396 else
3397   echo "$as_me: failed program was:" >&5
3398 cat "conftest.$ac_ext" >&5
3399 ac_cv_prog_cxx_g=no
3400 fi
3401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3402 fi
3403 echo "$as_me:3403: result: $ac_cv_prog_cxx_g" >&5
3404 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3405 if test "$ac_test_CXXFLAGS" = set; then
3406   CXXFLAGS=$ac_save_CXXFLAGS
3407 elif test $ac_cv_prog_cxx_g = yes; then
3408   if test "$GXX" = yes; then
3409     CXXFLAGS="-g -O2"
3410   else
3411     CXXFLAGS="-g"
3412   fi
3413 else
3414   if test "$GXX" = yes; then
3415     CXXFLAGS="-O2"
3416   else
3417     CXXFLAGS=
3418   fi
3419 fi
3420 for ac_declaration in \
3421    ''\
3422    '#include <stdlib.h>' \
3423    'extern "C" void std::exit (int) throw (); using std::exit;' \
3424    'extern "C" void std::exit (int); using std::exit;' \
3425    'extern "C" void exit (int) throw ();' \
3426    'extern "C" void exit (int);' \
3427    'void exit (int);'
3428 do
3429   cat >"conftest.$ac_ext" <<_ACEOF
3430 #line 3430 "configure"
3431 #include "confdefs.h"
3432 #include <stdlib.h>
3433 $ac_declaration
3434 int
3435 main (void)
3436 {
3437 exit (42);
3438   ;
3439   return 0;
3440 }
3441 _ACEOF
3442 rm -f "conftest.$ac_objext"
3443 if { (eval echo "$as_me:3443: \"$ac_compile\"") >&5
3444   (eval $ac_compile) 2>&5
3445   ac_status=$?
3446   echo "$as_me:3446: \$? = $ac_status" >&5
3447   (exit "$ac_status"); } &&
3448          { ac_try='test -s "conftest.$ac_objext"'
3449   { (eval echo "$as_me:3449: \"$ac_try\"") >&5
3450   (eval $ac_try) 2>&5
3451   ac_status=$?
3452   echo "$as_me:3452: \$? = $ac_status" >&5
3453   (exit "$ac_status"); }; }; then
3454   :
3455 else
3456   echo "$as_me: failed program was:" >&5
3457 cat "conftest.$ac_ext" >&5
3458 continue
3459 fi
3460 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3461   cat >"conftest.$ac_ext" <<_ACEOF
3462 #line 3462 "configure"
3463 #include "confdefs.h"
3464 $ac_declaration
3465 int
3466 main (void)
3467 {
3468 exit (42);
3469   ;
3470   return 0;
3471 }
3472 _ACEOF
3473 rm -f "conftest.$ac_objext"
3474 if { (eval echo "$as_me:3474: \"$ac_compile\"") >&5
3475   (eval $ac_compile) 2>&5
3476   ac_status=$?
3477   echo "$as_me:3477: \$? = $ac_status" >&5
3478   (exit "$ac_status"); } &&
3479          { ac_try='test -s "conftest.$ac_objext"'
3480   { (eval echo "$as_me:3480: \"$ac_try\"") >&5
3481   (eval $ac_try) 2>&5
3482   ac_status=$?
3483   echo "$as_me:3483: \$? = $ac_status" >&5
3484   (exit "$ac_status"); }; }; then
3485   break
3486 else
3487   echo "$as_me: failed program was:" >&5
3488 cat "conftest.$ac_ext" >&5
3489 fi
3490 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3491 done
3492 rm -rf conftest*
3493 if test -n "$ac_declaration"; then
3494   echo '#ifdef __cplusplus' >>confdefs.h
3495   echo "$ac_declaration"    >>confdefs.h
3496   echo '#endif'             >>confdefs.h
3497 fi
3498
3499 ac_ext=c
3500 ac_cpp='$CPP $CPPFLAGS'
3501 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3502 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3503 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3504 ac_main_return="return"
3505
3506         ac_ext=cc
3507 ac_cpp='$CXXCPP $CPPFLAGS'
3508 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3509 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3510 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3511 ac_main_return="return"
3512
3513         if test "x$cf_with_cxx" != xno
3514         then
3515                 # Several of the C++ configurations do not work, particularly when
3516                 # cross-compiling (20140913 -TD)
3517                 echo "$as_me:3517: checking if $CXX works" >&5
3518 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3519
3520                 save_CPPFLAGS="$CPPFLAGS"
3521                 eval cf_includedir=${includedir}
3522                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3523
3524 cat >"conftest.$ac_ext" <<_ACEOF
3525 #line 3525 "configure"
3526 #include "confdefs.h"
3527
3528 #include <stdlib.h>
3529 #include <stdio.h>
3530
3531 int
3532 main (void)
3533 {
3534
3535                 printf("Hello world!\n")
3536
3537   ;
3538   return 0;
3539 }
3540 _ACEOF
3541 rm -f "conftest.$ac_objext"
3542 if { (eval echo "$as_me:3542: \"$ac_compile\"") >&5
3543   (eval $ac_compile) 2>&5
3544   ac_status=$?
3545   echo "$as_me:3545: \$? = $ac_status" >&5
3546   (exit "$ac_status"); } &&
3547          { ac_try='test -s "conftest.$ac_objext"'
3548   { (eval echo "$as_me:3548: \"$ac_try\"") >&5
3549   (eval $ac_try) 2>&5
3550   ac_status=$?
3551   echo "$as_me:3551: \$? = $ac_status" >&5
3552   (exit "$ac_status"); }; }; then
3553   cf_cxx_works=yes
3554 else
3555   echo "$as_me: failed program was:" >&5
3556 cat "conftest.$ac_ext" >&5
3557 cf_cxx_works=no
3558 fi
3559 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3560                 CPPFLAGS="$save_CPPFLAGS"
3561
3562                 echo "$as_me:3562: result: $cf_cxx_works" >&5
3563 echo "${ECHO_T}$cf_cxx_works" >&6
3564                 if test "x$cf_cxx_works" = xno
3565                 then
3566                         { echo "$as_me:3566: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3567 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3568                         cf_with_cxx=no; CXX=""; GXX="";
3569                 fi
3570         fi
3571         ac_ext=c
3572 ac_cpp='$CPP $CPPFLAGS'
3573 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3574 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3575 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3576 ac_main_return="return"
3577
3578         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3579         if test "$CXX" = "g++" ; then
3580                 # Extract the first word of "g++", so it can be a program name with args.
3581 set dummy g++; ac_word=$2
3582 echo "$as_me:3582: checking for $ac_word" >&5
3583 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3584 if test "${ac_cv_path_CXX+set}" = set; then
3585   echo $ECHO_N "(cached) $ECHO_C" >&6
3586 else
3587   case $CXX in
3588   [\\/]* | ?:[\\/]*)
3589   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3590   ;;
3591   *)
3592   ac_save_IFS=$IFS; IFS=$ac_path_separator
3593 ac_dummy="$PATH"
3594 for ac_dir in $ac_dummy; do
3595   IFS=$ac_save_IFS
3596   test -z "$ac_dir" && ac_dir=.
3597   if $as_executable_p "$ac_dir/$ac_word"; then
3598    ac_cv_path_CXX="$ac_dir/$ac_word"
3599    echo "$as_me:3599: found $ac_dir/$ac_word" >&5
3600    break
3601 fi
3602 done
3603
3604   ;;
3605 esac
3606 fi
3607 CXX=$ac_cv_path_CXX
3608
3609 if test -n "$CXX"; then
3610   echo "$as_me:3610: result: $CXX" >&5
3611 echo "${ECHO_T}$CXX" >&6
3612 else
3613   echo "$as_me:3613: result: no" >&5
3614 echo "${ECHO_T}no" >&6
3615 fi
3616
3617         fi
3618         case "x$CXX" in
3619         (x|xg++)
3620                 { echo "$as_me:3620: WARNING: You don't have any C++ compiler, too bad" >&5
3621 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3622                 cf_with_cxx=no; CXX=""; GXX="";
3623                 ;;
3624         esac
3625 fi
3626
3627 GXX_VERSION=none
3628 if test "$GXX" = yes; then
3629         echo "$as_me:3629: checking version of ${CXX:-g++}" >&5
3630 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3631         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3632         if test -z "$GXX_VERSION"
3633         then
3634                 GXX_VERSION=unknown
3635                 GXX=no
3636         fi
3637         echo "$as_me:3637: result: $GXX_VERSION" >&5
3638 echo "${ECHO_T}$GXX_VERSION" >&6
3639 fi
3640
3641 case "$GXX_VERSION" in
3642 ([1-9][0-9].*)
3643         ;;
3644 (1.*|2.[0-6]*)
3645         { echo "$as_me:3645: WARNING: templates do not work" >&5
3646 echo "$as_me: WARNING: templates do not work" >&2;}
3647         ;;
3648 esac
3649
3650 echo "$as_me:3650: checking if you want to build C++ binding and demo" >&5
3651 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3652
3653 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3654 if test "${with_cxx_binding+set}" = set; then
3655   withval="$with_cxx_binding"
3656   cf_with_cxx_binding=$withval
3657 else
3658   cf_with_cxx_binding=$cf_with_cxx
3659 fi;
3660 echo "$as_me:3660: result: $cf_with_cxx_binding" >&5
3661 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3662
3663 echo "$as_me:3663: checking if you want to build with Ada" >&5
3664 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3665 echo "$as_me:3665: result: $cf_with_ada" >&5
3666 echo "${ECHO_T}$cf_with_ada" >&6
3667
3668 echo "$as_me:3668: checking if you want to install terminal database" >&5
3669 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3670
3671 # Check whether --enable-db-install or --disable-db-install was given.
3672 if test "${enable_db_install+set}" = set; then
3673   enableval="$enable_db_install"
3674   cf_with_db_install=$enableval
3675 else
3676   cf_with_db_install=yes
3677 fi;
3678 echo "$as_me:3678: result: $cf_with_db_install" >&5
3679 echo "${ECHO_T}$cf_with_db_install" >&6
3680
3681 echo "$as_me:3681: checking if you want to install manpages" >&5
3682 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3683
3684 # Check whether --with-manpages or --without-manpages was given.
3685 if test "${with_manpages+set}" = set; then
3686   withval="$with_manpages"
3687   cf_with_manpages=$withval
3688 else
3689   cf_with_manpages=yes
3690 fi;
3691 echo "$as_me:3691: result: $cf_with_manpages" >&5
3692 echo "${ECHO_T}$cf_with_manpages" >&6
3693
3694 echo "$as_me:3694: checking if you want to build programs such as tic" >&5
3695 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3696
3697 # Check whether --with-progs or --without-progs was given.
3698 if test "${with_progs+set}" = set; then
3699   withval="$with_progs"
3700   cf_with_progs=$withval
3701 else
3702   cf_with_progs=yes
3703 fi;
3704 echo "$as_me:3704: result: $cf_with_progs" >&5
3705 echo "${ECHO_T}$cf_with_progs" >&6
3706
3707 echo "$as_me:3707: checking if you want to build test-programs" >&5
3708 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3709
3710 # Check whether --with-tests or --without-tests was given.
3711 if test "${with_tests+set}" = set; then
3712   withval="$with_tests"
3713   cf_with_tests=$withval
3714 else
3715   cf_with_tests=yes
3716 fi;
3717 echo "$as_me:3717: result: $cf_with_tests" >&5
3718 echo "${ECHO_T}$cf_with_tests" >&6
3719
3720 echo "$as_me:3720: checking if you wish to install curses.h" >&5
3721 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3722
3723 # Check whether --with-curses-h or --without-curses-h was given.
3724 if test "${with_curses_h+set}" = set; then
3725   withval="$with_curses_h"
3726   with_curses_h=$withval
3727 else
3728   with_curses_h=yes
3729 fi;
3730 echo "$as_me:3730: result: $with_curses_h" >&5
3731 echo "${ECHO_T}$with_curses_h" >&6
3732
3733 modules_to_build="ncurses"
3734 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3735 modules_to_build="$modules_to_build panel menu form"
3736
3737 test "$program_prefix" != NONE &&
3738   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3739 # Use a double $ so make ignores it.
3740 test "$program_suffix" != NONE &&
3741   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3742 # Double any \ or $.  echo might interpret backslashes.
3743 # By default was `s,x,x', remove it if useless.
3744 cat <<\_ACEOF >conftest.sed
3745 s/[\\$]/&&/g;s/;s,x,x,$//
3746 _ACEOF
3747 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3748 rm conftest.sed
3749
3750 for ac_prog in mawk gawk nawk awk
3751 do
3752   # Extract the first word of "$ac_prog", so it can be a program name with args.
3753 set dummy $ac_prog; ac_word=$2
3754 echo "$as_me:3754: checking for $ac_word" >&5
3755 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3756 if test "${ac_cv_prog_AWK+set}" = set; then
3757   echo $ECHO_N "(cached) $ECHO_C" >&6
3758 else
3759   if test -n "$AWK"; then
3760   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3761 else
3762   ac_save_IFS=$IFS; IFS=$ac_path_separator
3763 ac_dummy="$PATH"
3764 for ac_dir in $ac_dummy; do
3765   IFS=$ac_save_IFS
3766   test -z "$ac_dir" && ac_dir=.
3767   $as_executable_p "$ac_dir/$ac_word" || continue
3768 ac_cv_prog_AWK="$ac_prog"
3769 echo "$as_me:3769: found $ac_dir/$ac_word" >&5
3770 break
3771 done
3772
3773 fi
3774 fi
3775 AWK=$ac_cv_prog_AWK
3776 if test -n "$AWK"; then
3777   echo "$as_me:3777: result: $AWK" >&5
3778 echo "${ECHO_T}$AWK" >&6
3779 else
3780   echo "$as_me:3780: result: no" >&5
3781 echo "${ECHO_T}no" >&6
3782 fi
3783
3784   test -n "$AWK" && break
3785 done
3786
3787 test -z "$AWK" && { { echo "$as_me:3787: error: No awk program found" >&5
3788 echo "$as_me: error: No awk program found" >&2;}
3789    { (exit 1); exit 1; }; }
3790
3791 # Find a good install program.  We prefer a C program (faster),
3792 # so one script is as good as another.  But avoid the broken or
3793 # incompatible versions:
3794 # SysV /etc/install, /usr/sbin/install
3795 # SunOS /usr/etc/install
3796 # IRIX /sbin/install
3797 # AIX /bin/install
3798 # AmigaOS /C/install, which installs bootblocks on floppy discs
3799 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3800 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3801 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3802 # ./install, which can be erroneously created by make from ./install.sh.
3803 echo "$as_me:3803: checking for a BSD compatible install" >&5
3804 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3805 if test -z "$INSTALL"; then
3806 if test "${ac_cv_path_install+set}" = set; then
3807   echo $ECHO_N "(cached) $ECHO_C" >&6
3808 else
3809     ac_save_IFS=$IFS; IFS=$ac_path_separator
3810   for ac_dir in $PATH; do
3811     IFS=$ac_save_IFS
3812     # Account for people who put trailing slashes in PATH elements.
3813     case $ac_dir/ in
3814     / | ./ | .// | /cC/* \
3815     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3816     | /usr/ucb/* ) ;;
3817     *)
3818       # OSF1 and SCO ODT 3.0 have their own names for install.
3819       # Don't use installbsd from OSF since it installs stuff as root
3820       # by default.
3821       for ac_prog in ginstall scoinst install; do
3822         if $as_executable_p "$ac_dir/$ac_prog"; then
3823           if test $ac_prog = install &&
3824             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3825             # AIX install.  It has an incompatible calling convention.
3826             :
3827           elif test $ac_prog = install &&
3828             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3829             # program-specific install script used by HP pwplus--don't use.
3830             :
3831           else
3832             ac_cv_path_install="$ac_dir/$ac_prog -c"
3833             break 2
3834           fi
3835         fi
3836       done
3837       ;;
3838     esac
3839   done
3840
3841 fi
3842   if test "${ac_cv_path_install+set}" = set; then
3843     INSTALL=$ac_cv_path_install
3844   else
3845     # As a last resort, use the slow shell script.  We don't cache a
3846     # path for INSTALL within a source directory, because that will
3847     # break other packages using the cache if that directory is
3848     # removed, or if the path is relative.
3849     INSTALL=$ac_install_sh
3850   fi
3851 fi
3852 echo "$as_me:3852: result: $INSTALL" >&5
3853 echo "${ECHO_T}$INSTALL" >&6
3854
3855 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3856 # It thinks the first close brace ends the variable substitution.
3857 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3858
3859 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3860
3861 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3862
3863 case $INSTALL in
3864 (/*)
3865         ;;
3866 (*)
3867         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3868         test -z "$cf_dir" && cf_dir=.
3869         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3870         ;;
3871 esac
3872
3873 for ac_prog in lint cppcheck splint
3874 do
3875   # Extract the first word of "$ac_prog", so it can be a program name with args.
3876 set dummy $ac_prog; ac_word=$2
3877 echo "$as_me:3877: checking for $ac_word" >&5
3878 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3879 if test "${ac_cv_prog_LINT+set}" = set; then
3880   echo $ECHO_N "(cached) $ECHO_C" >&6
3881 else
3882   if test -n "$LINT"; then
3883   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3884 else
3885   ac_save_IFS=$IFS; IFS=$ac_path_separator
3886 ac_dummy="$PATH"
3887 for ac_dir in $ac_dummy; do
3888   IFS=$ac_save_IFS
3889   test -z "$ac_dir" && ac_dir=.
3890   $as_executable_p "$ac_dir/$ac_word" || continue
3891 ac_cv_prog_LINT="$ac_prog"
3892 echo "$as_me:3892: found $ac_dir/$ac_word" >&5
3893 break
3894 done
3895
3896 fi
3897 fi
3898 LINT=$ac_cv_prog_LINT
3899 if test -n "$LINT"; then
3900   echo "$as_me:3900: result: $LINT" >&5
3901 echo "${ECHO_T}$LINT" >&6
3902 else
3903   echo "$as_me:3903: result: no" >&5
3904 echo "${ECHO_T}no" >&6
3905 fi
3906
3907   test -n "$LINT" && break
3908 done
3909
3910 case "x$LINT" in
3911 (xcppcheck|x*/cppcheck)
3912         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3913         ;;
3914 esac
3915
3916 echo "$as_me:3916: checking whether ln -s works" >&5
3917 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3918 LN_S=$as_ln_s
3919 if test "$LN_S" = "ln -s"; then
3920   echo "$as_me:3920: result: yes" >&5
3921 echo "${ECHO_T}yes" >&6
3922 else
3923   echo "$as_me:3923: result: no, using $LN_S" >&5
3924 echo "${ECHO_T}no, using $LN_S" >&6
3925 fi
3926
3927 echo "$as_me:3927: checking if $LN_S -f options work" >&5
3928 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3929
3930 rm -f conf$$.src conf$$dst
3931 echo >conf$$.dst
3932 echo first >conf$$.src
3933 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3934         cf_prog_ln_sf=yes
3935 else
3936         cf_prog_ln_sf=no
3937 fi
3938 rm -f conf$$.dst conf$$src
3939 echo "$as_me:3939: result: $cf_prog_ln_sf" >&5
3940 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3941
3942 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3943
3944 echo "$as_me:3944: checking for long file names" >&5
3945 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3946 if test "${ac_cv_sys_long_file_names+set}" = set; then
3947   echo $ECHO_N "(cached) $ECHO_C" >&6
3948 else
3949   ac_cv_sys_long_file_names=yes
3950 # Test for long file names in all the places we know might matter:
3951 #      .                the current directory, where building will happen
3952 #      $prefix/lib      where we will be installing things
3953 #      $exec_prefix/lib likewise
3954 # eval it to expand exec_prefix.
3955 #      $TMPDIR          if set, where it might want to write temporary files
3956 # if $TMPDIR is not set:
3957 #      /tmp             where it might want to write temporary files
3958 #      /var/tmp         likewise
3959 #      /usr/tmp         likewise
3960 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3961   ac_tmpdirs=$TMPDIR
3962 else
3963   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3964 fi
3965 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3966   test -d "$ac_dir" || continue
3967   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3968   ac_xdir=$ac_dir/cf$$
3969   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3970   ac_tf1=$ac_xdir/conftest9012345
3971   ac_tf2=$ac_xdir/conftest9012346
3972   (echo 1 >"$ac_tf1") 2>/dev/null
3973   (echo 2 >"$ac_tf2") 2>/dev/null
3974   ac_val=`cat "$ac_tf1" 2>/dev/null`
3975   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3976     ac_cv_sys_long_file_names=no
3977     rm -rf "$ac_xdir" 2>/dev/null
3978     break
3979   fi
3980   rm -rf "$ac_xdir" 2>/dev/null
3981 done
3982 fi
3983 echo "$as_me:3983: result: $ac_cv_sys_long_file_names" >&5
3984 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3985 if test "$ac_cv_sys_long_file_names" = yes; then
3986
3987 cat >>confdefs.h <<\EOF
3988 #define HAVE_LONG_FILE_NAMES 1
3989 EOF
3990
3991 fi
3992
3993 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3994 # of package conflict.
3995 cf_config_suffix=
3996
3997 # Check whether --with-config-suffix or --without-config-suffix was given.
3998 if test "${with_config_suffix+set}" = set; then
3999   withval="$with_config_suffix"
4000   case "x$withval" in
4001         (xyes|xno)
4002                 { echo "$as_me:4002: WARNING: expected a value for config-suffix option" >&5
4003 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4004                 ;;
4005         (*)     cf_config_suffix="$withval"
4006                 ;;
4007         esac
4008 fi;
4009
4010 # If we find pkg-config, check if we should install the ".pc" files.
4011
4012 echo "$as_me:4012: checking if you want to use pkg-config" >&5
4013 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4014
4015 # Check whether --with-pkg-config or --without-pkg-config was given.
4016 if test "${with_pkg_config+set}" = set; then
4017   withval="$with_pkg_config"
4018   cf_pkg_config=$withval
4019 else
4020   cf_pkg_config=yes
4021 fi;
4022 echo "$as_me:4022: result: $cf_pkg_config" >&5
4023 echo "${ECHO_T}$cf_pkg_config" >&6
4024
4025 case "$cf_pkg_config" in
4026 (no)
4027         PKG_CONFIG=none
4028         ;;
4029 (yes)
4030
4031 if test -n "$ac_tool_prefix"; then
4032   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4033 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4034 echo "$as_me:4034: checking for $ac_word" >&5
4035 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4036 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4037   echo $ECHO_N "(cached) $ECHO_C" >&6
4038 else
4039   case $PKG_CONFIG in
4040   [\\/]* | ?:[\\/]*)
4041   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4042   ;;
4043   *)
4044   ac_save_IFS=$IFS; IFS=$ac_path_separator
4045 ac_dummy="$PATH"
4046 for ac_dir in $ac_dummy; do
4047   IFS=$ac_save_IFS
4048   test -z "$ac_dir" && ac_dir=.
4049   if $as_executable_p "$ac_dir/$ac_word"; then
4050    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4051    echo "$as_me:4051: found $ac_dir/$ac_word" >&5
4052    break
4053 fi
4054 done
4055
4056   ;;
4057 esac
4058 fi
4059 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4060
4061 if test -n "$PKG_CONFIG"; then
4062   echo "$as_me:4062: result: $PKG_CONFIG" >&5
4063 echo "${ECHO_T}$PKG_CONFIG" >&6
4064 else
4065   echo "$as_me:4065: result: no" >&5
4066 echo "${ECHO_T}no" >&6
4067 fi
4068
4069 fi
4070 if test -z "$ac_cv_path_PKG_CONFIG"; then
4071   ac_pt_PKG_CONFIG=$PKG_CONFIG
4072   # Extract the first word of "pkg-config", so it can be a program name with args.
4073 set dummy pkg-config; ac_word=$2
4074 echo "$as_me:4074: checking for $ac_word" >&5
4075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4076 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4077   echo $ECHO_N "(cached) $ECHO_C" >&6
4078 else
4079   case $ac_pt_PKG_CONFIG in
4080   [\\/]* | ?:[\\/]*)
4081   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4082   ;;
4083   *)
4084   ac_save_IFS=$IFS; IFS=$ac_path_separator
4085 ac_dummy="$PATH"
4086 for ac_dir in $ac_dummy; do
4087   IFS=$ac_save_IFS
4088   test -z "$ac_dir" && ac_dir=.
4089   if $as_executable_p "$ac_dir/$ac_word"; then
4090    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4091    echo "$as_me:4091: found $ac_dir/$ac_word" >&5
4092    break
4093 fi
4094 done
4095
4096   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4097   ;;
4098 esac
4099 fi
4100 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4101
4102 if test -n "$ac_pt_PKG_CONFIG"; then
4103   echo "$as_me:4103: result: $ac_pt_PKG_CONFIG" >&5
4104 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4105 else
4106   echo "$as_me:4106: result: no" >&5
4107 echo "${ECHO_T}no" >&6
4108 fi
4109
4110   PKG_CONFIG=$ac_pt_PKG_CONFIG
4111 else
4112   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4113 fi
4114
4115         ;;
4116 (*)
4117         PKG_CONFIG=$withval
4118         ;;
4119 esac
4120
4121 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4122 if test "$PKG_CONFIG" != none ; then
4123
4124 if test "x$prefix" != xNONE; then
4125         cf_path_syntax="$prefix"
4126 else
4127         cf_path_syntax="$ac_default_prefix"
4128 fi
4129
4130 case ".$PKG_CONFIG" in
4131 (.\$\(*\)*|.\'*\'*)
4132         ;;
4133 (..|./*|.\\*)
4134         ;;
4135 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4136         ;;
4137 (.\$\{*prefix\}*|.\$\{*dir\}*)
4138         eval PKG_CONFIG="$PKG_CONFIG"
4139         case ".$PKG_CONFIG" in
4140         (.NONE/*)
4141                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4142                 ;;
4143         esac
4144         ;;
4145 (.no|.NONE/*)
4146         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4147         ;;
4148 (*)
4149         { { echo "$as_me:4149: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4150 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4151    { (exit 1); exit 1; }; }
4152         ;;
4153 esac
4154
4155 elif test "x$cf_pkg_config" != xno ; then
4156         { echo "$as_me:4156: WARNING: pkg-config is not installed" >&5
4157 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4158 fi
4159
4160 case "$PKG_CONFIG" in
4161 (no|none|yes)
4162         echo "$as_me:4162: checking for pkg-config library directory" >&5
4163 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4164         ;;
4165 (*)
4166         echo "$as_me:4166: checking for $PKG_CONFIG library directory" >&5
4167 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4168         ;;
4169 esac
4170
4171 # if $PKG_CONFIG_LIBDIR is set, try to use that
4172 if test -n "$PKG_CONFIG_PATH"; then
4173         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4174 elif test -n "$PKG_CONFIG_LIBDIR"; then
4175         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4176 else
4177         cf_search_path=auto
4178 fi
4179
4180 # if the option is used, let that override.  otherwise default to "libdir"
4181
4182 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4183 if test "${with_pkg_config_libdir+set}" = set; then
4184   withval="$with_pkg_config_libdir"
4185   cf_search_path=$withval
4186 else
4187   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4188 fi;
4189
4190 case "x$cf_search_path" in
4191 (xlibdir)
4192         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4193         echo "$as_me:4193: result: $PKG_CONFIG_LIBDIR" >&5
4194 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4195         cf_search_path=
4196         ;;
4197 (x)
4198         ;;
4199 (x/*\ *)
4200         PKG_CONFIG_LIBDIR=
4201         ;;
4202 (x/*)
4203         PKG_CONFIG_LIBDIR="$cf_search_path"
4204         echo "$as_me:4204: result: $PKG_CONFIG_LIBDIR" >&5
4205 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4206         cf_search_path=
4207         ;;
4208 (xyes|xauto)
4209         echo "$as_me:4209: result: auto" >&5
4210 echo "${ECHO_T}auto" >&6
4211         cf_search_path=
4212         # Look for the library directory using the same prefix as the executable
4213         echo "$as_me:4213: checking for search-list" >&5
4214 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4215         if test "x$PKG_CONFIG" != xnone
4216         then
4217                 # works for pkg-config since version 0.24 (2009)
4218                 # works for pkgconf since version 0.8.3 (2012)
4219                 for cf_pkg_program in \
4220                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4221                         pkg-config \
4222                         pkgconf
4223                 do
4224                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4225                         test -n "$cf_search_path" && break
4226                 done
4227
4228                 # works for pkg-config since import in 2005 of original 2001 HP code.
4229                 test -z "$cf_search_path" && \
4230                 cf_search_path=`
4231                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4232 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4233         sub(\"^[^']*'\",\"\"); \
4234         sub(\"'.*\",\"\"); \
4235         printf \" %s\", \\$0; } \
4236 { next; } \
4237 "`
4238         fi
4239
4240         echo "$as_me:4240: result: $cf_search_path" >&5
4241 echo "${ECHO_T}$cf_search_path" >&6
4242         ;;
4243 (*)
4244         { { echo "$as_me:4244: error: Unexpected option value: $cf_search_path" >&5
4245 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4246    { (exit 1); exit 1; }; }
4247         ;;
4248 esac
4249
4250 if test -n "$cf_search_path"
4251 then
4252         echo "$as_me:4252: checking for first directory" >&5
4253 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4254         cf_pkg_config_path=none
4255         for cf_config in $cf_search_path
4256         do
4257                 if test -d "$cf_config"
4258                 then
4259                         cf_pkg_config_path=$cf_config
4260                         break
4261                 fi
4262         done
4263         echo "$as_me:4263: result: $cf_pkg_config_path" >&5
4264 echo "${ECHO_T}$cf_pkg_config_path" >&6
4265
4266         if test "x$cf_pkg_config_path" != xnone ; then
4267                 # limit this to the first directory found
4268                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4269         fi
4270
4271         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4272         then
4273                 echo "$as_me:4273: checking for workaround" >&5
4274 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4275                 if test "$prefix" = "NONE" ; then
4276                         cf_prefix="$ac_default_prefix"
4277                 else
4278                         cf_prefix="$prefix"
4279                 fi
4280                 eval cf_libdir=$libdir
4281                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4282                 cf_backup=
4283                 for cf_config in $cf_search_path
4284                 do
4285                         case $cf_config in
4286                         $cf_libdir/pkgconfig)
4287                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4288                                 break
4289                                 ;;
4290                         *)
4291                                 test -z "$cf_backup" && cf_backup=$cf_config
4292                                 ;;
4293                         esac
4294                 done
4295                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4296                 echo "$as_me:4296: result: $PKG_CONFIG_LIBDIR" >&5
4297 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4298         fi
4299 fi
4300
4301 if test "x$PKG_CONFIG" != xnone
4302 then
4303         echo "$as_me:4303: checking if we should install .pc files for $PKG_CONFIG" >&5
4304 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4305 else
4306         echo "$as_me:4306: checking if we should install .pc files" >&5
4307 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4308 fi
4309
4310 # Check whether --enable-pc-files or --disable-pc-files was given.
4311 if test "${enable_pc_files+set}" = set; then
4312   enableval="$enable_pc_files"
4313   enable_pc_files=$enableval
4314 else
4315   enable_pc_files=no
4316 fi;
4317 echo "$as_me:4317: result: $enable_pc_files" >&5
4318 echo "${ECHO_T}$enable_pc_files" >&6
4319
4320 if test "x$enable_pc_files" != xno
4321 then
4322         MAKE_PC_FILES=
4323         case "x$PKG_CONFIG_LIBDIR" in
4324         (xno|xnone|xyes|x)
4325                 { echo "$as_me:4325: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4326 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4327                 ;;
4328         (*)
4329                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4330
4331 if test "x$prefix" != xNONE; then
4332         cf_path_syntax="$prefix"
4333 else
4334         cf_path_syntax="$ac_default_prefix"
4335 fi
4336
4337 case ".$cf_pkg_config_libdir" in
4338 (.\$\(*\)*|.\'*\'*)
4339         ;;
4340 (..|./*|.\\*)
4341         ;;
4342 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4343         ;;
4344 (.\$\{*prefix\}*|.\$\{*dir\}*)
4345         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4346         case ".$cf_pkg_config_libdir" in
4347         (.NONE/*)
4348                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4349                 ;;
4350         esac
4351         ;;
4352 (.no|.NONE/*)
4353         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4354         ;;
4355 (*)
4356         { { echo "$as_me:4356: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4357 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4358    { (exit 1); exit 1; }; }
4359         ;;
4360 esac
4361
4362                 ;;
4363         esac
4364 else
4365         MAKE_PC_FILES="#"
4366 fi
4367
4368 if test -z "$MAKE_PC_FILES"
4369 then
4370         echo "$as_me:4370: checking for suffix to add to pc-files" >&5
4371 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4372
4373 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4374 if test "${with_pc_suffix+set}" = set; then
4375   withval="$with_pc_suffix"
4376   case "x$withval" in
4377         (xyes|xno)
4378                 PC_MODULE_SUFFIX=
4379                 ;;
4380         (*)     PC_MODULE_SUFFIX="$withval"
4381                 ;;
4382         esac
4383 fi;
4384         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4385         echo "$as_me:4385: result: $PC_MODULE_SUFFIX" >&5
4386 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4387         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4388
4389 fi
4390
4391 echo "$as_me:4391: checking if we should assume mixed-case filenames" >&5
4392 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4393
4394 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4395 if test "${enable_mixed_case+set}" = set; then
4396   enableval="$enable_mixed_case"
4397   enable_mixedcase=$enableval
4398 else
4399   enable_mixedcase=auto
4400 fi;
4401 echo "$as_me:4401: result: $enable_mixedcase" >&5
4402 echo "${ECHO_T}$enable_mixedcase" >&6
4403 if test "$enable_mixedcase" = "auto" ; then
4404
4405 echo "$as_me:4405: checking if filesystem supports mixed-case filenames" >&5
4406 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4407 if test "${cf_cv_mixedcase+set}" = set; then
4408   echo $ECHO_N "(cached) $ECHO_C" >&6
4409 else
4410
4411 if test "$cross_compiling" = yes ; then
4412         case "$target_alias" in
4413         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4414                 cf_cv_mixedcase=no
4415                 ;;
4416         (*)
4417                 cf_cv_mixedcase=yes
4418                 ;;
4419         esac
4420 else
4421         rm -f conftest CONFTEST
4422         echo test >conftest
4423         if test -f CONFTEST ; then
4424                 cf_cv_mixedcase=no
4425         else
4426                 cf_cv_mixedcase=yes
4427         fi
4428         rm -f conftest CONFTEST
4429 fi
4430
4431 fi
4432 echo "$as_me:4432: result: $cf_cv_mixedcase" >&5
4433 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4434 test "$cf_cv_mixedcase" = yes &&
4435 cat >>confdefs.h <<\EOF
4436 #define MIXEDCASE_FILENAMES 1
4437 EOF
4438
4439 else
4440         cf_cv_mixedcase=$enable_mixedcase
4441         if test "x$enable_mixedcase" = "xyes" ; then
4442
4443 cat >>confdefs.h <<\EOF
4444 #define MIXEDCASE_FILENAMES 1
4445 EOF
4446
4447         fi
4448 fi
4449
4450 # do this after mixed-case option (tags/TAGS is not as important as tic).
4451 echo "$as_me:4451: checking whether ${MAKE-make} sets \${MAKE}" >&5
4452 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4453 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4454 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4455   echo $ECHO_N "(cached) $ECHO_C" >&6
4456 else
4457   cat >conftest.make <<\EOF
4458 all:
4459         @echo 'ac_maketemp="${MAKE}"'
4460 EOF
4461 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4462 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4463 if test -n "$ac_maketemp"; then
4464   eval ac_cv_prog_make_${ac_make}_set=yes
4465 else
4466   eval ac_cv_prog_make_${ac_make}_set=no
4467 fi
4468 rm -f conftest.make
4469 fi
4470 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4471   echo "$as_me:4471: result: yes" >&5
4472 echo "${ECHO_T}yes" >&6
4473   SET_MAKE=
4474 else
4475   echo "$as_me:4475: result: no" >&5
4476 echo "${ECHO_T}no" >&6
4477   SET_MAKE="MAKE=${MAKE-make}"
4478 fi
4479
4480 echo "$as_me:4480: checking for \".PHONY\" make-support" >&5
4481 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4482 if test "${cf_cv_make_PHONY+set}" = set; then
4483   echo $ECHO_N "(cached) $ECHO_C" >&6
4484 else
4485
4486         rm -rf conftest*
4487         (
4488                 mkdir conftest || exit 1
4489                 cd conftest
4490                 cat >makefile <<'CF_EOF'
4491 .PHONY: always
4492 DATA=0
4493 always: always.out
4494         @echo "** making $@ $(DATA)"
4495 once: once.out
4496         @echo "** making $@ $(DATA)"
4497 always.out:
4498         @echo "** making $@ $(DATA)"
4499         echo $(DATA) > $@
4500 once.out:
4501         @echo "** making $@ $(DATA)"
4502         echo $(DATA) > $@
4503 CF_EOF
4504                 for cf_data in 1 2 3
4505                 do
4506                         ${MAKE:-make} always DATA=$cf_data
4507                         ${MAKE:-make} once   DATA=$cf_data
4508                         ${MAKE:-make} -t always once
4509                         if test -f always ; then
4510                                 echo "no (case 1)" > ../conftest.tmp
4511                         elif test ! -f always.out ; then
4512                                 echo "no (case 2)" > ../conftest.tmp
4513                         elif test ! -f once.out ; then
4514                                 echo "no (case 3)" > ../conftest.tmp
4515                         elif ! cmp -s always.out once.out ; then
4516                                 echo "no (case 4)" > ../conftest.tmp
4517                                 diff always.out once.out
4518                         else
4519                                 cf_check="`cat always.out`"
4520                                 if test "x$cf_check" != "x$cf_data" ; then
4521                                         echo "no (case 5)" > ../conftest.tmp
4522                                 else
4523                                         echo yes > ../conftest.tmp
4524                                         rm -f ./*.out
4525                                         continue
4526                                 fi
4527                         fi
4528                         break
4529                 done
4530         ) >&5 2>&1
4531         cf_cv_make_PHONY="`cat conftest.tmp`"
4532         rm -rf conftest*
4533
4534 fi
4535 echo "$as_me:4535: result: $cf_cv_make_PHONY" >&5
4536 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4537 MAKE_NO_PHONY="#"
4538 MAKE_PHONY="#"
4539 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4540 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4541
4542 for ac_prog in exctags ctags
4543 do
4544   # Extract the first word of "$ac_prog", so it can be a program name with args.
4545 set dummy $ac_prog; ac_word=$2
4546 echo "$as_me:4546: checking for $ac_word" >&5
4547 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4548 if test "${ac_cv_prog_CTAGS+set}" = set; then
4549   echo $ECHO_N "(cached) $ECHO_C" >&6
4550 else
4551   if test -n "$CTAGS"; then
4552   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4553 else
4554   ac_save_IFS=$IFS; IFS=$ac_path_separator
4555 ac_dummy="$PATH"
4556 for ac_dir in $ac_dummy; do
4557   IFS=$ac_save_IFS
4558   test -z "$ac_dir" && ac_dir=.
4559   $as_executable_p "$ac_dir/$ac_word" || continue
4560 ac_cv_prog_CTAGS="$ac_prog"
4561 echo "$as_me:4561: found $ac_dir/$ac_word" >&5
4562 break
4563 done
4564
4565 fi
4566 fi
4567 CTAGS=$ac_cv_prog_CTAGS
4568 if test -n "$CTAGS"; then
4569   echo "$as_me:4569: result: $CTAGS" >&5
4570 echo "${ECHO_T}$CTAGS" >&6
4571 else
4572   echo "$as_me:4572: result: no" >&5
4573 echo "${ECHO_T}no" >&6
4574 fi
4575
4576   test -n "$CTAGS" && break
4577 done
4578
4579 for ac_prog in exetags etags
4580 do
4581   # Extract the first word of "$ac_prog", so it can be a program name with args.
4582 set dummy $ac_prog; ac_word=$2
4583 echo "$as_me:4583: checking for $ac_word" >&5
4584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4585 if test "${ac_cv_prog_ETAGS+set}" = set; then
4586   echo $ECHO_N "(cached) $ECHO_C" >&6
4587 else
4588   if test -n "$ETAGS"; then
4589   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4590 else
4591   ac_save_IFS=$IFS; IFS=$ac_path_separator
4592 ac_dummy="$PATH"
4593 for ac_dir in $ac_dummy; do
4594   IFS=$ac_save_IFS
4595   test -z "$ac_dir" && ac_dir=.
4596   $as_executable_p "$ac_dir/$ac_word" || continue
4597 ac_cv_prog_ETAGS="$ac_prog"
4598 echo "$as_me:4598: found $ac_dir/$ac_word" >&5
4599 break
4600 done
4601
4602 fi
4603 fi
4604 ETAGS=$ac_cv_prog_ETAGS
4605 if test -n "$ETAGS"; then
4606   echo "$as_me:4606: result: $ETAGS" >&5
4607 echo "${ECHO_T}$ETAGS" >&6
4608 else
4609   echo "$as_me:4609: result: no" >&5
4610 echo "${ECHO_T}no" >&6
4611 fi
4612
4613   test -n "$ETAGS" && break
4614 done
4615
4616 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4617 set dummy ${CTAGS:-ctags}; ac_word=$2
4618 echo "$as_me:4618: checking for $ac_word" >&5
4619 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4620 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4621   echo $ECHO_N "(cached) $ECHO_C" >&6
4622 else
4623   if test -n "$MAKE_LOWER_TAGS"; then
4624   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4625 else
4626   ac_save_IFS=$IFS; IFS=$ac_path_separator
4627 ac_dummy="$PATH"
4628 for ac_dir in $ac_dummy; do
4629   IFS=$ac_save_IFS
4630   test -z "$ac_dir" && ac_dir=.
4631   $as_executable_p "$ac_dir/$ac_word" || continue
4632 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4633 echo "$as_me:4633: found $ac_dir/$ac_word" >&5
4634 break
4635 done
4636
4637   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4638 fi
4639 fi
4640 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4641 if test -n "$MAKE_LOWER_TAGS"; then
4642   echo "$as_me:4642: result: $MAKE_LOWER_TAGS" >&5
4643 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4644 else
4645   echo "$as_me:4645: result: no" >&5
4646 echo "${ECHO_T}no" >&6
4647 fi
4648
4649 if test "$cf_cv_mixedcase" = yes ; then
4650         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4651 set dummy ${ETAGS:-etags}; ac_word=$2
4652 echo "$as_me:4652: checking for $ac_word" >&5
4653 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4654 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4655   echo $ECHO_N "(cached) $ECHO_C" >&6
4656 else
4657   if test -n "$MAKE_UPPER_TAGS"; then
4658   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4659 else
4660   ac_save_IFS=$IFS; IFS=$ac_path_separator
4661 ac_dummy="$PATH"
4662 for ac_dir in $ac_dummy; do
4663   IFS=$ac_save_IFS
4664   test -z "$ac_dir" && ac_dir=.
4665   $as_executable_p "$ac_dir/$ac_word" || continue
4666 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4667 echo "$as_me:4667: found $ac_dir/$ac_word" >&5
4668 break
4669 done
4670
4671   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4672 fi
4673 fi
4674 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4675 if test -n "$MAKE_UPPER_TAGS"; then
4676   echo "$as_me:4676: result: $MAKE_UPPER_TAGS" >&5
4677 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4678 else
4679   echo "$as_me:4679: result: no" >&5
4680 echo "${ECHO_T}no" >&6
4681 fi
4682
4683 else
4684         MAKE_UPPER_TAGS=no
4685 fi
4686
4687 if test "$MAKE_UPPER_TAGS" = yes ; then
4688         MAKE_UPPER_TAGS=
4689 else
4690         MAKE_UPPER_TAGS="#"
4691 fi
4692
4693 if test "$MAKE_LOWER_TAGS" = yes ; then
4694         MAKE_LOWER_TAGS=
4695 else
4696         MAKE_LOWER_TAGS="#"
4697 fi
4698
4699 echo "$as_me:4699: checking for makeflags variable" >&5
4700 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4701 if test "${cf_cv_makeflags+set}" = set; then
4702   echo $ECHO_N "(cached) $ECHO_C" >&6
4703 else
4704
4705         cf_cv_makeflags=''
4706         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4707         do
4708                 cat >cf_makeflags.tmp <<CF_EOF
4709 SHELL = $SHELL
4710 all :
4711         @ echo '.$cf_option'
4712 CF_EOF
4713                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4714                 case "$cf_result" in
4715                 (.*k|.*kw)
4716                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4717                         case "$cf_result" in
4718                         (.*CC=*)        cf_cv_makeflags=
4719                                 ;;
4720                         (*)     cf_cv_makeflags=$cf_option
4721                                 ;;
4722                         esac
4723                         break
4724                         ;;
4725                 (.-)
4726                         ;;
4727                 (*)
4728
4729 echo "${as_me:-configure}:4729: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4730
4731                         ;;
4732                 esac
4733         done
4734         rm -f cf_makeflags.tmp
4735
4736 fi
4737 echo "$as_me:4737: result: $cf_cv_makeflags" >&5
4738 echo "${ECHO_T}$cf_cv_makeflags" >&6
4739
4740 if test -n "$ac_tool_prefix"; then
4741   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4742 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4743 echo "$as_me:4743: checking for $ac_word" >&5
4744 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4745 if test "${ac_cv_prog_RANLIB+set}" = set; then
4746   echo $ECHO_N "(cached) $ECHO_C" >&6
4747 else
4748   if test -n "$RANLIB"; then
4749   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4750 else
4751   ac_save_IFS=$IFS; IFS=$ac_path_separator
4752 ac_dummy="$PATH"
4753 for ac_dir in $ac_dummy; do
4754   IFS=$ac_save_IFS
4755   test -z "$ac_dir" && ac_dir=.
4756   $as_executable_p "$ac_dir/$ac_word" || continue
4757 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4758 echo "$as_me:4758: found $ac_dir/$ac_word" >&5
4759 break
4760 done
4761
4762 fi
4763 fi
4764 RANLIB=$ac_cv_prog_RANLIB
4765 if test -n "$RANLIB"; then
4766   echo "$as_me:4766: result: $RANLIB" >&5
4767 echo "${ECHO_T}$RANLIB" >&6
4768 else
4769   echo "$as_me:4769: result: no" >&5
4770 echo "${ECHO_T}no" >&6
4771 fi
4772
4773 fi
4774 if test -z "$ac_cv_prog_RANLIB"; then
4775   ac_ct_RANLIB=$RANLIB
4776   # Extract the first word of "ranlib", so it can be a program name with args.
4777 set dummy ranlib; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$ac_ct_RANLIB"; then
4784   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_ac_ct_RANLIB="ranlib"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4798 fi
4799 fi
4800 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4801 if test -n "$ac_ct_RANLIB"; then
4802   echo "$as_me:4802: result: $ac_ct_RANLIB" >&5
4803 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4804 else
4805   echo "$as_me:4805: result: no" >&5
4806 echo "${ECHO_T}no" >&6
4807 fi
4808
4809   RANLIB=$ac_ct_RANLIB
4810 else
4811   RANLIB="$ac_cv_prog_RANLIB"
4812 fi
4813
4814 if test -n "$ac_tool_prefix"; then
4815   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4816 set dummy ${ac_tool_prefix}ld; ac_word=$2
4817 echo "$as_me:4817: checking for $ac_word" >&5
4818 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4819 if test "${ac_cv_prog_LD+set}" = set; then
4820   echo $ECHO_N "(cached) $ECHO_C" >&6
4821 else
4822   if test -n "$LD"; then
4823   ac_cv_prog_LD="$LD" # Let the user override the test.
4824 else
4825   ac_save_IFS=$IFS; IFS=$ac_path_separator
4826 ac_dummy="$PATH"
4827 for ac_dir in $ac_dummy; do
4828   IFS=$ac_save_IFS
4829   test -z "$ac_dir" && ac_dir=.
4830   $as_executable_p "$ac_dir/$ac_word" || continue
4831 ac_cv_prog_LD="${ac_tool_prefix}ld"
4832 echo "$as_me:4832: found $ac_dir/$ac_word" >&5
4833 break
4834 done
4835
4836 fi
4837 fi
4838 LD=$ac_cv_prog_LD
4839 if test -n "$LD"; then
4840   echo "$as_me:4840: result: $LD" >&5
4841 echo "${ECHO_T}$LD" >&6
4842 else
4843   echo "$as_me:4843: result: no" >&5
4844 echo "${ECHO_T}no" >&6
4845 fi
4846
4847 fi
4848 if test -z "$ac_cv_prog_LD"; then
4849   ac_ct_LD=$LD
4850   # Extract the first word of "ld", so it can be a program name with args.
4851 set dummy ld; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$ac_ct_LD"; then
4858   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_ac_ct_LD="ld"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4872 fi
4873 fi
4874 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4875 if test -n "$ac_ct_LD"; then
4876   echo "$as_me:4876: result: $ac_ct_LD" >&5
4877 echo "${ECHO_T}$ac_ct_LD" >&6
4878 else
4879   echo "$as_me:4879: result: no" >&5
4880 echo "${ECHO_T}no" >&6
4881 fi
4882
4883   LD=$ac_ct_LD
4884 else
4885   LD="$ac_cv_prog_LD"
4886 fi
4887
4888 if test -n "$ac_tool_prefix"; then
4889   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4890 set dummy ${ac_tool_prefix}ar; ac_word=$2
4891 echo "$as_me:4891: checking for $ac_word" >&5
4892 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4893 if test "${ac_cv_prog_AR+set}" = set; then
4894   echo $ECHO_N "(cached) $ECHO_C" >&6
4895 else
4896   if test -n "$AR"; then
4897   ac_cv_prog_AR="$AR" # Let the user override the test.
4898 else
4899   ac_save_IFS=$IFS; IFS=$ac_path_separator
4900 ac_dummy="$PATH"
4901 for ac_dir in $ac_dummy; do
4902   IFS=$ac_save_IFS
4903   test -z "$ac_dir" && ac_dir=.
4904   $as_executable_p "$ac_dir/$ac_word" || continue
4905 ac_cv_prog_AR="${ac_tool_prefix}ar"
4906 echo "$as_me:4906: found $ac_dir/$ac_word" >&5
4907 break
4908 done
4909
4910 fi
4911 fi
4912 AR=$ac_cv_prog_AR
4913 if test -n "$AR"; then
4914   echo "$as_me:4914: result: $AR" >&5
4915 echo "${ECHO_T}$AR" >&6
4916 else
4917   echo "$as_me:4917: result: no" >&5
4918 echo "${ECHO_T}no" >&6
4919 fi
4920
4921 fi
4922 if test -z "$ac_cv_prog_AR"; then
4923   ac_ct_AR=$AR
4924   # Extract the first word of "ar", so it can be a program name with args.
4925 set dummy ar; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$ac_ct_AR"; then
4932   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_ac_ct_AR="ar"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4946 fi
4947 fi
4948 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4949 if test -n "$ac_ct_AR"; then
4950   echo "$as_me:4950: result: $ac_ct_AR" >&5
4951 echo "${ECHO_T}$ac_ct_AR" >&6
4952 else
4953   echo "$as_me:4953: result: no" >&5
4954 echo "${ECHO_T}no" >&6
4955 fi
4956
4957   AR=$ac_ct_AR
4958 else
4959   AR="$ac_cv_prog_AR"
4960 fi
4961
4962 if test -n "$ac_tool_prefix"; then
4963   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4964 set dummy ${ac_tool_prefix}nm; ac_word=$2
4965 echo "$as_me:4965: checking for $ac_word" >&5
4966 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4967 if test "${ac_cv_prog_NM+set}" = set; then
4968   echo $ECHO_N "(cached) $ECHO_C" >&6
4969 else
4970   if test -n "$NM"; then
4971   ac_cv_prog_NM="$NM" # Let the user override the test.
4972 else
4973   ac_save_IFS=$IFS; IFS=$ac_path_separator
4974 ac_dummy="$PATH"
4975 for ac_dir in $ac_dummy; do
4976   IFS=$ac_save_IFS
4977   test -z "$ac_dir" && ac_dir=.
4978   $as_executable_p "$ac_dir/$ac_word" || continue
4979 ac_cv_prog_NM="${ac_tool_prefix}nm"
4980 echo "$as_me:4980: found $ac_dir/$ac_word" >&5
4981 break
4982 done
4983
4984 fi
4985 fi
4986 NM=$ac_cv_prog_NM
4987 if test -n "$NM"; then
4988   echo "$as_me:4988: result: $NM" >&5
4989 echo "${ECHO_T}$NM" >&6
4990 else
4991   echo "$as_me:4991: result: no" >&5
4992 echo "${ECHO_T}no" >&6
4993 fi
4994
4995 fi
4996 if test -z "$ac_cv_prog_NM"; then
4997   ac_ct_NM=$NM
4998   # Extract the first word of "nm", so it can be a program name with args.
4999 set dummy nm; ac_word=$2
5000 echo "$as_me:5000: checking for $ac_word" >&5
5001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5002 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5003   echo $ECHO_N "(cached) $ECHO_C" >&6
5004 else
5005   if test -n "$ac_ct_NM"; then
5006   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5007 else
5008   ac_save_IFS=$IFS; IFS=$ac_path_separator
5009 ac_dummy="$PATH"
5010 for ac_dir in $ac_dummy; do
5011   IFS=$ac_save_IFS
5012   test -z "$ac_dir" && ac_dir=.
5013   $as_executable_p "$ac_dir/$ac_word" || continue
5014 ac_cv_prog_ac_ct_NM="nm"
5015 echo "$as_me:5015: found $ac_dir/$ac_word" >&5
5016 break
5017 done
5018
5019   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5020 fi
5021 fi
5022 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5023 if test -n "$ac_ct_NM"; then
5024   echo "$as_me:5024: result: $ac_ct_NM" >&5
5025 echo "${ECHO_T}$ac_ct_NM" >&6
5026 else
5027   echo "$as_me:5027: result: no" >&5
5028 echo "${ECHO_T}no" >&6
5029 fi
5030
5031   NM=$ac_ct_NM
5032 else
5033   NM="$ac_cv_prog_NM"
5034 fi
5035
5036 if test -n "$ac_tool_prefix"; then
5037   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5038 set dummy ${ac_tool_prefix}ar; ac_word=$2
5039 echo "$as_me:5039: checking for $ac_word" >&5
5040 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5041 if test "${ac_cv_prog_AR+set}" = set; then
5042   echo $ECHO_N "(cached) $ECHO_C" >&6
5043 else
5044   if test -n "$AR"; then
5045   ac_cv_prog_AR="$AR" # Let the user override the test.
5046 else
5047   ac_save_IFS=$IFS; IFS=$ac_path_separator
5048 ac_dummy="$PATH"
5049 for ac_dir in $ac_dummy; do
5050   IFS=$ac_save_IFS
5051   test -z "$ac_dir" && ac_dir=.
5052   $as_executable_p "$ac_dir/$ac_word" || continue
5053 ac_cv_prog_AR="${ac_tool_prefix}ar"
5054 echo "$as_me:5054: found $ac_dir/$ac_word" >&5
5055 break
5056 done
5057
5058 fi
5059 fi
5060 AR=$ac_cv_prog_AR
5061 if test -n "$AR"; then
5062   echo "$as_me:5062: result: $AR" >&5
5063 echo "${ECHO_T}$AR" >&6
5064 else
5065   echo "$as_me:5065: result: no" >&5
5066 echo "${ECHO_T}no" >&6
5067 fi
5068
5069 fi
5070 if test -z "$ac_cv_prog_AR"; then
5071   ac_ct_AR=$AR
5072   # Extract the first word of "ar", so it can be a program name with args.
5073 set dummy ar; ac_word=$2
5074 echo "$as_me:5074: checking for $ac_word" >&5
5075 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5076 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5077   echo $ECHO_N "(cached) $ECHO_C" >&6
5078 else
5079   if test -n "$ac_ct_AR"; then
5080   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5081 else
5082   ac_save_IFS=$IFS; IFS=$ac_path_separator
5083 ac_dummy="$PATH"
5084 for ac_dir in $ac_dummy; do
5085   IFS=$ac_save_IFS
5086   test -z "$ac_dir" && ac_dir=.
5087   $as_executable_p "$ac_dir/$ac_word" || continue
5088 ac_cv_prog_ac_ct_AR="ar"
5089 echo "$as_me:5089: found $ac_dir/$ac_word" >&5
5090 break
5091 done
5092
5093   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5094 fi
5095 fi
5096 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5097 if test -n "$ac_ct_AR"; then
5098   echo "$as_me:5098: result: $ac_ct_AR" >&5
5099 echo "${ECHO_T}$ac_ct_AR" >&6
5100 else
5101   echo "$as_me:5101: result: no" >&5
5102 echo "${ECHO_T}no" >&6
5103 fi
5104
5105   AR=$ac_ct_AR
5106 else
5107   AR="$ac_cv_prog_AR"
5108 fi
5109
5110 echo "$as_me:5110: checking for options to update archives" >&5
5111 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5112 if test "${cf_cv_ar_flags+set}" = set; then
5113   echo $ECHO_N "(cached) $ECHO_C" >&6
5114 else
5115
5116         case "$cf_cv_system_name" in
5117         (*-msvc*)
5118                 cf_cv_ar_flags=''
5119                 cat >mk_static_lib.sh <<-EOF
5120                 #!$SHELL
5121                 MSVC_BIN="$AR"
5122                 out="\$1"
5123                 shift
5124                 exec \$MSVC_BIN -out:"\$out" \$@
5125                 EOF
5126                 chmod +x mk_static_lib.sh
5127                 AR=`pwd`/mk_static_lib.sh
5128                 ;;
5129         (*)
5130                 cf_cv_ar_flags=unknown
5131                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5132                 do
5133
5134                         # check if $ARFLAGS already contains this choice
5135                         if test "x$ARFLAGS" != "x" ; then
5136                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5137                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5138                                         cf_cv_ar_flags=
5139                                         break
5140                                 fi
5141                         fi
5142
5143                         rm -f "conftest.$ac_cv_objext"
5144                         rm -f conftest.a
5145
5146                         cat >"conftest.$ac_ext" <<EOF
5147 #line 5147 "configure"
5148 int     testdata[3] = { 123, 456, 789 };
5149 EOF
5150                         if { (eval echo "$as_me:5150: \"$ac_compile\"") >&5
5151   (eval $ac_compile) 2>&5
5152   ac_status=$?
5153   echo "$as_me:5153: \$? = $ac_status" >&5
5154   (exit "$ac_status"); } ; then
5155                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5156                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5157                                 if test -f conftest.a ; then
5158                                         cf_cv_ar_flags="$cf_ar_flags"
5159                                         break
5160                                 fi
5161                         else
5162                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5163
5164 echo "${as_me:-configure}:5164: testing cannot compile test-program ..." 1>&5
5165
5166                                 break
5167                         fi
5168                 done
5169                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5170                 ;;
5171         esac
5172
5173 fi
5174 echo "$as_me:5174: result: $cf_cv_ar_flags" >&5
5175 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5176
5177 if test -n "$ARFLAGS" ; then
5178         if test -n "$cf_cv_ar_flags" ; then
5179                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5180         fi
5181 else
5182         ARFLAGS=$cf_cv_ar_flags
5183 fi
5184
5185 echo "$as_me:5185: checking if you have specified an install-prefix" >&5
5186 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5187
5188 # Check whether --with-install-prefix or --without-install-prefix was given.
5189 if test "${with_install_prefix+set}" = set; then
5190   withval="$with_install_prefix"
5191   case "x$withval" in
5192         (xyes|xno)
5193                 ;;
5194         (*)     DESTDIR="$withval"
5195                 ;;
5196         esac
5197 fi;
5198 echo "$as_me:5198: result: $DESTDIR" >&5
5199 echo "${ECHO_T}$DESTDIR" >&6
5200
5201 ###############################################################################
5202
5203 # If we're cross-compiling, allow the user to override the tools and their
5204 # options.  The configure script is oriented toward identifying the host
5205 # compiler, etc., but we need a build compiler to generate parts of the source.
5206
5207 case "$cf_cv_system_name" in
5208 (*-msvc*)
5209         LDFLAGS="$LDFLAGS user32.lib"
5210         export LDFLAGS
5211         ;;
5212 esac
5213
5214 if test "$cross_compiling" = yes ; then
5215
5216         # defaults that we might want to override
5217         : ${BUILD_CFLAGS:=''}
5218         : ${BUILD_CPPFLAGS:=''}
5219         : ${BUILD_LDFLAGS:=''}
5220         : ${BUILD_LIBS:=''}
5221         : ${BUILD_EXEEXT:='$x'}
5222         : ${BUILD_OBJEXT:='o'}
5223
5224 # Check whether --with-build-cc or --without-build-cc was given.
5225 if test "${with_build_cc+set}" = set; then
5226   withval="$with_build_cc"
5227   BUILD_CC="$withval"
5228 else
5229   for ac_prog in gcc clang c99 c89 cc cl
5230 do
5231   # Extract the first word of "$ac_prog", so it can be a program name with args.
5232 set dummy $ac_prog; ac_word=$2
5233 echo "$as_me:5233: checking for $ac_word" >&5
5234 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5235 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5236   echo $ECHO_N "(cached) $ECHO_C" >&6
5237 else
5238   if test -n "$BUILD_CC"; then
5239   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5240 else
5241   ac_save_IFS=$IFS; IFS=$ac_path_separator
5242 ac_dummy="$PATH"
5243 for ac_dir in $ac_dummy; do
5244   IFS=$ac_save_IFS
5245   test -z "$ac_dir" && ac_dir=.
5246   $as_executable_p "$ac_dir/$ac_word" || continue
5247 ac_cv_prog_BUILD_CC="$ac_prog"
5248 echo "$as_me:5248: found $ac_dir/$ac_word" >&5
5249 break
5250 done
5251
5252 fi
5253 fi
5254 BUILD_CC=$ac_cv_prog_BUILD_CC
5255 if test -n "$BUILD_CC"; then
5256   echo "$as_me:5256: result: $BUILD_CC" >&5
5257 echo "${ECHO_T}$BUILD_CC" >&6
5258 else
5259   echo "$as_me:5259: result: no" >&5
5260 echo "${ECHO_T}no" >&6
5261 fi
5262
5263   test -n "$BUILD_CC" && break
5264 done
5265 test -n "$BUILD_CC" || BUILD_CC="none"
5266
5267 fi;
5268         echo "$as_me:5268: checking for native build C compiler" >&5
5269 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5270         echo "$as_me:5270: result: $BUILD_CC" >&5
5271 echo "${ECHO_T}$BUILD_CC" >&6
5272
5273         echo "$as_me:5273: checking for native build C preprocessor" >&5
5274 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5275
5276 # Check whether --with-build-cpp or --without-build-cpp was given.
5277 if test "${with_build_cpp+set}" = set; then
5278   withval="$with_build_cpp"
5279   BUILD_CPP="$withval"
5280 else
5281   BUILD_CPP='${BUILD_CC} -E'
5282 fi;
5283         echo "$as_me:5283: result: $BUILD_CPP" >&5
5284 echo "${ECHO_T}$BUILD_CPP" >&6
5285
5286         echo "$as_me:5286: checking for native build C flags" >&5
5287 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5288
5289 # Check whether --with-build-cflags or --without-build-cflags was given.
5290 if test "${with_build_cflags+set}" = set; then
5291   withval="$with_build_cflags"
5292   BUILD_CFLAGS="$withval"
5293 fi;
5294         echo "$as_me:5294: result: $BUILD_CFLAGS" >&5
5295 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5296
5297         echo "$as_me:5297: checking for native build C preprocessor-flags" >&5
5298 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5299
5300 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5301 if test "${with_build_cppflags+set}" = set; then
5302   withval="$with_build_cppflags"
5303   BUILD_CPPFLAGS="$withval"
5304 fi;
5305         echo "$as_me:5305: result: $BUILD_CPPFLAGS" >&5
5306 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5307
5308         echo "$as_me:5308: checking for native build linker-flags" >&5
5309 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5310
5311 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5312 if test "${with_build_ldflags+set}" = set; then
5313   withval="$with_build_ldflags"
5314   BUILD_LDFLAGS="$withval"
5315 fi;
5316         echo "$as_me:5316: result: $BUILD_LDFLAGS" >&5
5317 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5318
5319         echo "$as_me:5319: checking for native build linker-libraries" >&5
5320 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5321
5322 # Check whether --with-build-libs or --without-build-libs was given.
5323 if test "${with_build_libs+set}" = set; then
5324   withval="$with_build_libs"
5325   BUILD_LIBS="$withval"
5326 fi;
5327         echo "$as_me:5327: result: $BUILD_LIBS" >&5
5328 echo "${ECHO_T}$BUILD_LIBS" >&6
5329
5330         # this assumes we're on Unix.
5331         BUILD_EXEEXT=
5332         BUILD_OBJEXT=o
5333
5334         : ${BUILD_CC:='${CC}'}
5335
5336         echo "$as_me:5336: checking if the build-compiler \"$BUILD_CC\" works" >&5
5337 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5338
5339         cf_save_crossed=$cross_compiling
5340         cf_save_ac_link=$ac_link
5341         cross_compiling=no
5342         cf_build_cppflags=$BUILD_CPPFLAGS
5343         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5344         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5345
5346         if test "$cross_compiling" = yes; then
5347   cf_ok_build_cc=unknown
5348 else
5349   cat >"conftest.$ac_ext" <<_ACEOF
5350 #line 5350 "configure"
5351 #include "confdefs.h"
5352 #include <stdio.h>
5353                 int main(int argc, char *argv[])
5354                 {
5355                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5356                 }
5357
5358 _ACEOF
5359 rm -f "conftest$ac_exeext"
5360 if { (eval echo "$as_me:5360: \"$ac_link\"") >&5
5361   (eval $ac_link) 2>&5
5362   ac_status=$?
5363   echo "$as_me:5363: \$? = $ac_status" >&5
5364   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5365   { (eval echo "$as_me:5365: \"$ac_try\"") >&5
5366   (eval $ac_try) 2>&5
5367   ac_status=$?
5368   echo "$as_me:5368: \$? = $ac_status" >&5
5369   (exit "$ac_status"); }; }; then
5370   cf_ok_build_cc=yes
5371 else
5372   echo "$as_me: program exited with status $ac_status" >&5
5373 echo "$as_me: failed program was:" >&5
5374 cat "conftest.$ac_ext" >&5
5375 cf_ok_build_cc=no
5376 fi
5377 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5378 fi
5379
5380         cross_compiling=$cf_save_crossed
5381         ac_link=$cf_save_ac_link
5382
5383         echo "$as_me:5383: result: $cf_ok_build_cc" >&5
5384 echo "${ECHO_T}$cf_ok_build_cc" >&6
5385
5386         if test "$cf_ok_build_cc" != yes
5387         then
5388                 { { echo "$as_me:5388: error: Cross-build requires two compilers.
5389 Use --with-build-cc to specify the native compiler." >&5
5390 echo "$as_me: error: Cross-build requires two compilers.
5391 Use --with-build-cc to specify the native compiler." >&2;}
5392    { (exit 1); exit 1; }; }
5393         fi
5394
5395 else
5396         : ${BUILD_CC:='${CC}'}
5397         : ${BUILD_CPP:='${CPP}'}
5398         : ${BUILD_CFLAGS:='${CFLAGS}'}
5399         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5400         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5401         : ${BUILD_LIBS:='${LIBS}'}
5402         : ${BUILD_EXEEXT:='$x'}
5403         : ${BUILD_OBJEXT:='o'}
5404 fi
5405
5406 ###############################################################################
5407
5408 ### Options to allow the user to specify the set of libraries which are used.
5409 ### Use "--without-normal --with-shared" to allow the default model to be
5410 ### shared, for example.
5411 cf_list_models=""
5412
5413 echo "$as_me:5413: checking if libtool -version-number should be used" >&5
5414 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5415
5416 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5417 if test "${enable_libtool_version+set}" = set; then
5418   enableval="$enable_libtool_version"
5419   test "$enableval" != no && enableval=yes
5420         if test "$enableval" != "yes" ; then
5421     cf_libtool_version=no
5422         else
5423                 cf_libtool_version=yes
5424         fi
5425 else
5426   enableval=yes
5427         cf_libtool_version=yes
5428
5429 fi;
5430 echo "$as_me:5430: result: $cf_libtool_version" >&5
5431 echo "${ECHO_T}$cf_libtool_version" >&6
5432
5433 if test "$cf_libtool_version" = yes ; then
5434         LIBTOOL_VERSION="-version-number"
5435 else
5436         LIBTOOL_VERSION="-version-info"
5437         case "x$VERSION" in
5438         (x)
5439                 { echo "$as_me:5439: WARNING: VERSION was not set" >&5
5440 echo "$as_me: WARNING: VERSION was not set" >&2;}
5441                 ;;
5442         (x*.*.*)
5443                 ABI_VERSION="$VERSION"
5444                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5445
5446 echo "${as_me:-configure}:5446: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5447
5448                 ;;
5449         (x*:*:*)
5450                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5451                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5452
5453 echo "${as_me:-configure}:5453: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5454
5455                 ;;
5456         (*)
5457                 { echo "$as_me:5457: WARNING: unexpected VERSION value: $VERSION" >&5
5458 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5459                 ;;
5460         esac
5461 fi
5462
5463 LIBTOOL=
5464
5465 # common library maintenance symbols that are convenient for libtool scripts:
5466 LIB_CREATE='${AR} -cr'
5467 LIB_OBJECT='${OBJECTS}'
5468 LIB_SUFFIX=.a
5469 LIB_PREP="$RANLIB"
5470
5471 # symbols used to prop libtool up to enable it to determine what it should be
5472 # doing:
5473 LIB_CLEAN=
5474 LIB_COMPILE=
5475 LIB_LINK='${CC}'
5476 LIB_INSTALL=
5477 LIB_UNINSTALL=
5478
5479 echo "$as_me:5479: checking if you want to build libraries with libtool" >&5
5480 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5481
5482 # Check whether --with-libtool or --without-libtool was given.
5483 if test "${with_libtool+set}" = set; then
5484   withval="$with_libtool"
5485   with_libtool=$withval
5486 else
5487   with_libtool=no
5488 fi;
5489 echo "$as_me:5489: result: $with_libtool" >&5
5490 echo "${ECHO_T}$with_libtool" >&6
5491 if test "$with_libtool" != "no"; then
5492
5493         if test "$with_libtool" != "yes" ; then
5494
5495 if test "x$prefix" != xNONE; then
5496         cf_path_syntax="$prefix"
5497 else
5498         cf_path_syntax="$ac_default_prefix"
5499 fi
5500
5501 case ".$with_libtool" in
5502 (.\$\(*\)*|.\'*\'*)
5503         ;;
5504 (..|./*|.\\*)
5505         ;;
5506 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5507         ;;
5508 (.\$\{*prefix\}*|.\$\{*dir\}*)
5509         eval with_libtool="$with_libtool"
5510         case ".$with_libtool" in
5511         (.NONE/*)
5512                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5513                 ;;
5514         esac
5515         ;;
5516 (.no|.NONE/*)
5517         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5518         ;;
5519 (*)
5520         { { echo "$as_me:5520: error: expected a pathname, not \"$with_libtool\"" >&5
5521 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5522    { (exit 1); exit 1; }; }
5523         ;;
5524 esac
5525
5526                 LIBTOOL=$with_libtool
5527         else
5528                 if test -n "$ac_tool_prefix"; then
5529   for ac_prog in libtool glibtool
5530   do
5531     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5532 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5533 echo "$as_me:5533: checking for $ac_word" >&5
5534 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5535 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5536   echo $ECHO_N "(cached) $ECHO_C" >&6
5537 else
5538   if test -n "$LIBTOOL"; then
5539   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5540 else
5541   ac_save_IFS=$IFS; IFS=$ac_path_separator
5542 ac_dummy="$PATH"
5543 for ac_dir in $ac_dummy; do
5544   IFS=$ac_save_IFS
5545   test -z "$ac_dir" && ac_dir=.
5546   $as_executable_p "$ac_dir/$ac_word" || continue
5547 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5548 echo "$as_me:5548: found $ac_dir/$ac_word" >&5
5549 break
5550 done
5551
5552 fi
5553 fi
5554 LIBTOOL=$ac_cv_prog_LIBTOOL
5555 if test -n "$LIBTOOL"; then
5556   echo "$as_me:5556: result: $LIBTOOL" >&5
5557 echo "${ECHO_T}$LIBTOOL" >&6
5558 else
5559   echo "$as_me:5559: result: no" >&5
5560 echo "${ECHO_T}no" >&6
5561 fi
5562
5563     test -n "$LIBTOOL" && break
5564   done
5565 fi
5566 if test -z "$LIBTOOL"; then
5567   ac_ct_LIBTOOL=$LIBTOOL
5568   for ac_prog in libtool glibtool
5569 do
5570   # Extract the first word of "$ac_prog", so it can be a program name with args.
5571 set dummy $ac_prog; ac_word=$2
5572 echo "$as_me:5572: checking for $ac_word" >&5
5573 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5574 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5575   echo $ECHO_N "(cached) $ECHO_C" >&6
5576 else
5577   if test -n "$ac_ct_LIBTOOL"; then
5578   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5579 else
5580   ac_save_IFS=$IFS; IFS=$ac_path_separator
5581 ac_dummy="$PATH"
5582 for ac_dir in $ac_dummy; do
5583   IFS=$ac_save_IFS
5584   test -z "$ac_dir" && ac_dir=.
5585   $as_executable_p "$ac_dir/$ac_word" || continue
5586 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5587 echo "$as_me:5587: found $ac_dir/$ac_word" >&5
5588 break
5589 done
5590
5591 fi
5592 fi
5593 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5594 if test -n "$ac_ct_LIBTOOL"; then
5595   echo "$as_me:5595: result: $ac_ct_LIBTOOL" >&5
5596 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5597 else
5598   echo "$as_me:5598: result: no" >&5
5599 echo "${ECHO_T}no" >&6
5600 fi
5601
5602   test -n "$ac_ct_LIBTOOL" && break
5603 done
5604 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5605
5606   LIBTOOL=$ac_ct_LIBTOOL
5607 fi
5608
5609 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5610 then
5611         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.].*//'`
5612 else
5613         cf_cv_libtool_version=
5614 fi
5615 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5616
5617                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5618                 then
5619
5620 unset ac_cv_prog_ac_ct_LIBTOOL
5621 unset ac_ct_LIBTOOL
5622 unset LIBTOOL
5623
5624                         if test -n "$ac_tool_prefix"; then
5625   for ac_prog in glibtool
5626   do
5627     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5628 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5629 echo "$as_me:5629: checking for $ac_word" >&5
5630 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5631 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5632   echo $ECHO_N "(cached) $ECHO_C" >&6
5633 else
5634   if test -n "$LIBTOOL"; then
5635   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5636 else
5637   ac_save_IFS=$IFS; IFS=$ac_path_separator
5638 ac_dummy="$PATH"
5639 for ac_dir in $ac_dummy; do
5640   IFS=$ac_save_IFS
5641   test -z "$ac_dir" && ac_dir=.
5642   $as_executable_p "$ac_dir/$ac_word" || continue
5643 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5644 echo "$as_me:5644: found $ac_dir/$ac_word" >&5
5645 break
5646 done
5647
5648 fi
5649 fi
5650 LIBTOOL=$ac_cv_prog_LIBTOOL
5651 if test -n "$LIBTOOL"; then
5652   echo "$as_me:5652: result: $LIBTOOL" >&5
5653 echo "${ECHO_T}$LIBTOOL" >&6
5654 else
5655   echo "$as_me:5655: result: no" >&5
5656 echo "${ECHO_T}no" >&6
5657 fi
5658
5659     test -n "$LIBTOOL" && break
5660   done
5661 fi
5662 if test -z "$LIBTOOL"; then
5663   ac_ct_LIBTOOL=$LIBTOOL
5664   for ac_prog in glibtool
5665 do
5666   # Extract the first word of "$ac_prog", so it can be a program name with args.
5667 set dummy $ac_prog; ac_word=$2
5668 echo "$as_me:5668: checking for $ac_word" >&5
5669 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5670 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5671   echo $ECHO_N "(cached) $ECHO_C" >&6
5672 else
5673   if test -n "$ac_ct_LIBTOOL"; then
5674   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5675 else
5676   ac_save_IFS=$IFS; IFS=$ac_path_separator
5677 ac_dummy="$PATH"
5678 for ac_dir in $ac_dummy; do
5679   IFS=$ac_save_IFS
5680   test -z "$ac_dir" && ac_dir=.
5681   $as_executable_p "$ac_dir/$ac_word" || continue
5682 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5683 echo "$as_me:5683: found $ac_dir/$ac_word" >&5
5684 break
5685 done
5686
5687 fi
5688 fi
5689 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5690 if test -n "$ac_ct_LIBTOOL"; then
5691   echo "$as_me:5691: result: $ac_ct_LIBTOOL" >&5
5692 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5693 else
5694   echo "$as_me:5694: result: no" >&5
5695 echo "${ECHO_T}no" >&6
5696 fi
5697
5698   test -n "$ac_ct_LIBTOOL" && break
5699 done
5700 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5701
5702   LIBTOOL=$ac_ct_LIBTOOL
5703 fi
5704
5705 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5706 then
5707         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.].*//'`
5708 else
5709         cf_cv_libtool_version=
5710 fi
5711 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5712
5713                 fi
5714         fi
5715         if test -z "$LIBTOOL" ; then
5716                 { { echo "$as_me:5716: error: Cannot find libtool" >&5
5717 echo "$as_me: error: Cannot find libtool" >&2;}
5718    { (exit 1); exit 1; }; }
5719         fi
5720         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5721         LIB_OBJECT='${OBJECTS:.o=.lo}'
5722         LIB_SUFFIX=.la
5723         LIB_CLEAN='${LIBTOOL} --mode=clean'
5724         LIB_COMPILE='${LIBTOOL} --mode=compile'
5725         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5726         LIB_INSTALL='${LIBTOOL} --mode=install'
5727         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5728         LIB_PREP=:
5729
5730 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5731 then
5732         echo "$as_me:5732: checking version of $LIBTOOL" >&5
5733 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5734
5735 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5736 then
5737         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.].*//'`
5738 else
5739         cf_cv_libtool_version=
5740 fi
5741 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5742
5743         echo "$as_me:5743: result: $cf_cv_libtool_version" >&5
5744 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5745         if test -n "$cf_cv_libtool_version"
5746         then
5747                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5748                 case "x$cf_check_libtool_version" in
5749                 (*...GNU-libtool...*)
5750                         ;;
5751                 (*)
5752                         { { echo "$as_me:5752: error: This is not GNU libtool" >&5
5753 echo "$as_me: error: This is not GNU libtool" >&2;}
5754    { (exit 1); exit 1; }; }
5755                         ;;
5756                 esac
5757         else
5758                 { { echo "$as_me:5758: error: No version found for $LIBTOOL" >&5
5759 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5760    { (exit 1); exit 1; }; }
5761         fi
5762 else
5763         { { echo "$as_me:5763: error: GNU libtool has not been found" >&5
5764 echo "$as_me: error: GNU libtool has not been found" >&2;}
5765    { (exit 1); exit 1; }; }
5766 fi
5767
5768         # special hack to add -no-undefined (which libtool should do for itself)
5769         LT_UNDEF=
5770         case "$cf_cv_system_name" in
5771         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5772                 LT_UNDEF=-no-undefined
5773                 ;;
5774         esac
5775
5776         # special hack to add --tag option for C++ compiler
5777         case "$cf_cv_libtool_version" in
5778         (1.[5-9]*|[2-9].[0-9.a-z]*)
5779                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5780                 LIBTOOL="$LIBTOOL --tag=CC"
5781                 ;;
5782         (*)
5783                 LIBTOOL_CXX="$LIBTOOL"
5784                 ;;
5785         esac
5786 else
5787         LIBTOOL=""
5788         LIBTOOL_CXX=""
5789 fi
5790
5791 test -z "$LIBTOOL" && ECHO_LT=
5792
5793 if test "$with_libtool" != "no" ; then
5794
5795 cf_list_models="$cf_list_models libtool"
5796
5797 else
5798
5799 echo "$as_me:5799: checking if you want to build shared libraries" >&5
5800 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5801
5802 # Check whether --with-shared or --without-shared was given.
5803 if test "${with_shared+set}" = set; then
5804   withval="$with_shared"
5805   with_shared=$withval
5806 else
5807   with_shared=no
5808 fi;
5809 echo "$as_me:5809: result: $with_shared" >&5
5810 echo "${ECHO_T}$with_shared" >&6
5811 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5812
5813 echo "$as_me:5813: checking if you want to build static libraries" >&5
5814 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5815
5816 # Check whether --with-normal or --without-normal was given.
5817 if test "${with_normal+set}" = set; then
5818   withval="$with_normal"
5819   with_normal=$withval
5820 else
5821   with_normal=yes
5822 fi;
5823 echo "$as_me:5823: result: $with_normal" >&5
5824 echo "${ECHO_T}$with_normal" >&6
5825 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5826
5827 echo "$as_me:5827: checking if you want to build debug libraries" >&5
5828 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5829
5830 # Check whether --with-debug or --without-debug was given.
5831 if test "${with_debug+set}" = set; then
5832   withval="$with_debug"
5833   with_debug=$withval
5834 else
5835   with_debug=yes
5836 fi;
5837 echo "$as_me:5837: result: $with_debug" >&5
5838 echo "${ECHO_T}$with_debug" >&6
5839 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5840
5841 echo "$as_me:5841: checking if you want to build profiling libraries" >&5
5842 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5843
5844 # Check whether --with-profile or --without-profile was given.
5845 if test "${with_profile+set}" = set; then
5846   withval="$with_profile"
5847   with_profile=$withval
5848 else
5849   with_profile=no
5850 fi;
5851 echo "$as_me:5851: result: $with_profile" >&5
5852 echo "${ECHO_T}$with_profile" >&6
5853 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5854
5855 fi
5856
5857 if test "X$cf_with_cxx_binding" != Xno; then
5858 if test "x$with_shared" = "xyes"; then
5859 echo "$as_me:5859: checking if you want to build C++ shared libraries" >&5
5860 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5861
5862 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5863 if test "${with_cxx_shared+set}" = set; then
5864   withval="$with_cxx_shared"
5865   with_shared_cxx=$withval
5866 else
5867   with_shared_cxx=no
5868 fi;
5869 echo "$as_me:5869: result: $with_shared_cxx" >&5
5870 echo "${ECHO_T}$with_shared_cxx" >&6
5871 fi
5872 fi
5873
5874 ###############################################################################
5875
5876 echo "$as_me:5876: checking for specified models" >&5
5877 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5878 test -z "$cf_list_models" && cf_list_models=normal
5879 test "$with_libtool" != "no" && cf_list_models=libtool
5880 echo "$as_me:5880: result: $cf_list_models" >&5
5881 echo "${ECHO_T}$cf_list_models" >&6
5882
5883 ### Use the first model as the default, and save its suffix for use in building
5884 ### up test-applications.
5885 echo "$as_me:5885: checking for default model" >&5
5886 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5887 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5888 echo "$as_me:5888: result: $DFT_LWR_MODEL" >&5
5889 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5890
5891 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5892
5893 TICS_NAME=tic
5894
5895 TINFO_NAME=tinfo
5896
5897 LIB_NAME=ncurses
5898
5899 LIB_DIR=../lib
5900 LIB_2ND=../../lib
5901
5902 echo "$as_me:5902: checking if you want to have a library-prefix" >&5
5903 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5904
5905 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5906 if test "${with_lib_prefix+set}" = set; then
5907   withval="$with_lib_prefix"
5908   with_lib_prefix=$withval
5909 else
5910   with_lib_prefix=auto
5911 fi;
5912 echo "$as_me:5912: result: $with_lib_prefix" >&5
5913 echo "${ECHO_T}$with_lib_prefix" >&6
5914
5915 if test "$with_lib_prefix" = auto
5916 then
5917
5918         case "$cf_cv_system_name" in
5919         (OS/2*|os2*)
5920                 if test "$DFT_LWR_MODEL" = libtool; then
5921                         LIB_PREFIX='lib'
5922                 else
5923                         LIB_PREFIX=''
5924                 fi
5925                 ;;
5926         (*-msvc*)
5927                 LIB_PREFIX=''
5928                 ;;
5929         (*)     LIB_PREFIX='lib'
5930                 ;;
5931         esac
5932 cf_prefix=$LIB_PREFIX
5933
5934 elif test "$with_lib_prefix" = no
5935 then
5936         LIB_PREFIX=
5937 else
5938         LIB_PREFIX=$with_lib_prefix
5939 fi
5940
5941 LIB_SUFFIX=
5942
5943         echo "$as_me:5943: checking for PATH separator" >&5
5944 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5945         case "$cf_cv_system_name" in
5946         (os2*)  PATH_SEPARATOR=';'  ;;
5947         (*)     ${PATH_SEPARATOR:=':'}  ;;
5948         esac
5949
5950         echo "$as_me:5950: result: $PATH_SEPARATOR" >&5
5951 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5952
5953 # headers needed for checks...
5954 echo "$as_me:5954: checking for ANSI C header files" >&5
5955 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5956 if test "${ac_cv_header_stdc+set}" = set; then
5957   echo $ECHO_N "(cached) $ECHO_C" >&6
5958 else
5959   cat >"conftest.$ac_ext" <<_ACEOF
5960 #line 5960 "configure"
5961 #include "confdefs.h"
5962 #include <stdlib.h>
5963 #include <stdarg.h>
5964 #include <string.h>
5965 #include <float.h>
5966
5967 _ACEOF
5968 if { (eval echo "$as_me:5968: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5969   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5970   ac_status=$?
5971   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5972   rm -f conftest.er1
5973   cat conftest.err >&5
5974   echo "$as_me:5974: \$? = $ac_status" >&5
5975   (exit "$ac_status"); } >/dev/null; then
5976   if test -s conftest.err; then
5977     ac_cpp_err=$ac_c_preproc_warn_flag
5978   else
5979     ac_cpp_err=
5980   fi
5981 else
5982   ac_cpp_err=yes
5983 fi
5984 if test -z "$ac_cpp_err"; then
5985   ac_cv_header_stdc=yes
5986 else
5987   echo "$as_me: failed program was:" >&5
5988   cat "conftest.$ac_ext" >&5
5989   ac_cv_header_stdc=no
5990 fi
5991 rm -f conftest.err "conftest.$ac_ext"
5992
5993 if test $ac_cv_header_stdc = yes; then
5994   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5995   cat >"conftest.$ac_ext" <<_ACEOF
5996 #line 5996 "configure"
5997 #include "confdefs.h"
5998 #include <string.h>
5999
6000 _ACEOF
6001 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6002   $EGREP "memchr" >/dev/null 2>&1; then
6003   :
6004 else
6005   ac_cv_header_stdc=no
6006 fi
6007 rm -rf conftest*
6008
6009 fi
6010
6011 if test $ac_cv_header_stdc = yes; then
6012   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6013   cat >"conftest.$ac_ext" <<_ACEOF
6014 #line 6014 "configure"
6015 #include "confdefs.h"
6016 #include <stdlib.h>
6017
6018 _ACEOF
6019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6020   $EGREP "free" >/dev/null 2>&1; then
6021   :
6022 else
6023   ac_cv_header_stdc=no
6024 fi
6025 rm -rf conftest*
6026
6027 fi
6028
6029 if test $ac_cv_header_stdc = yes; then
6030   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6031   if test "$cross_compiling" = yes; then
6032   :
6033 else
6034   cat >"conftest.$ac_ext" <<_ACEOF
6035 #line 6035 "configure"
6036 #include "confdefs.h"
6037 #include <ctype.h>
6038 #if ((' ' & 0x0FF) == 0x020)
6039 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6040 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6041 #else
6042 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6043                      || ('j' <= (c) && (c) <= 'r') \
6044                      || ('s' <= (c) && (c) <= 'z'))
6045 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6046 #endif
6047
6048 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6049 int
6050 main (void)
6051 {
6052   int i;
6053   for (i = 0; i < 256; i++)
6054     if (XOR (islower (i), ISLOWER (i))
6055         || toupper (i) != TOUPPER (i))
6056       $ac_main_return(2);
6057   $ac_main_return (0);
6058 }
6059 _ACEOF
6060 rm -f "conftest$ac_exeext"
6061 if { (eval echo "$as_me:6061: \"$ac_link\"") >&5
6062   (eval $ac_link) 2>&5
6063   ac_status=$?
6064   echo "$as_me:6064: \$? = $ac_status" >&5
6065   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6066   { (eval echo "$as_me:6066: \"$ac_try\"") >&5
6067   (eval $ac_try) 2>&5
6068   ac_status=$?
6069   echo "$as_me:6069: \$? = $ac_status" >&5
6070   (exit "$ac_status"); }; }; then
6071   :
6072 else
6073   echo "$as_me: program exited with status $ac_status" >&5
6074 echo "$as_me: failed program was:" >&5
6075 cat "conftest.$ac_ext" >&5
6076 ac_cv_header_stdc=no
6077 fi
6078 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6079 fi
6080 fi
6081 fi
6082 echo "$as_me:6082: result: $ac_cv_header_stdc" >&5
6083 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6084 if test $ac_cv_header_stdc = yes; then
6085
6086 cat >>confdefs.h <<\EOF
6087 #define STDC_HEADERS 1
6088 EOF
6089
6090 fi
6091
6092 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6093
6094 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6095                   inttypes.h stdint.h unistd.h
6096 do
6097 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6098 echo "$as_me:6098: checking for $ac_header" >&5
6099 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6100 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6101   echo $ECHO_N "(cached) $ECHO_C" >&6
6102 else
6103   cat >"conftest.$ac_ext" <<_ACEOF
6104 #line 6104 "configure"
6105 #include "confdefs.h"
6106 $ac_includes_default
6107 #include <$ac_header>
6108 _ACEOF
6109 rm -f "conftest.$ac_objext"
6110 if { (eval echo "$as_me:6110: \"$ac_compile\"") >&5
6111   (eval $ac_compile) 2>&5
6112   ac_status=$?
6113   echo "$as_me:6113: \$? = $ac_status" >&5
6114   (exit "$ac_status"); } &&
6115          { ac_try='test -s "conftest.$ac_objext"'
6116   { (eval echo "$as_me:6116: \"$ac_try\"") >&5
6117   (eval $ac_try) 2>&5
6118   ac_status=$?
6119   echo "$as_me:6119: \$? = $ac_status" >&5
6120   (exit "$ac_status"); }; }; then
6121   eval "$as_ac_Header=yes"
6122 else
6123   echo "$as_me: failed program was:" >&5
6124 cat "conftest.$ac_ext" >&5
6125 eval "$as_ac_Header=no"
6126 fi
6127 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6128 fi
6129 echo "$as_me:6129: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6130 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6131 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6132   cat >>confdefs.h <<EOF
6133 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6134 EOF
6135
6136 fi
6137 done
6138
6139 echo "$as_me:6139: checking whether exit is declared" >&5
6140 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6141 if test "${ac_cv_have_decl_exit+set}" = set; then
6142   echo $ECHO_N "(cached) $ECHO_C" >&6
6143 else
6144   cat >"conftest.$ac_ext" <<_ACEOF
6145 #line 6145 "configure"
6146 #include "confdefs.h"
6147 $ac_includes_default
6148 int
6149 main (void)
6150 {
6151 #ifndef exit
6152   char *p = (char *) exit; (void) p;
6153 #endif
6154
6155   ;
6156   return 0;
6157 }
6158 _ACEOF
6159 rm -f "conftest.$ac_objext"
6160 if { (eval echo "$as_me:6160: \"$ac_compile\"") >&5
6161   (eval $ac_compile) 2>&5
6162   ac_status=$?
6163   echo "$as_me:6163: \$? = $ac_status" >&5
6164   (exit "$ac_status"); } &&
6165          { ac_try='test -s "conftest.$ac_objext"'
6166   { (eval echo "$as_me:6166: \"$ac_try\"") >&5
6167   (eval $ac_try) 2>&5
6168   ac_status=$?
6169   echo "$as_me:6169: \$? = $ac_status" >&5
6170   (exit "$ac_status"); }; }; then
6171   ac_cv_have_decl_exit=yes
6172 else
6173   echo "$as_me: failed program was:" >&5
6174 cat "conftest.$ac_ext" >&5
6175 ac_cv_have_decl_exit=no
6176 fi
6177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6178 fi
6179 echo "$as_me:6179: result: $ac_cv_have_decl_exit" >&5
6180 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6181
6182 ac_header_dirent=no
6183 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6184   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6185 echo "$as_me:6185: checking for $ac_hdr that defines DIR" >&5
6186 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6187 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6188   echo $ECHO_N "(cached) $ECHO_C" >&6
6189 else
6190   cat >"conftest.$ac_ext" <<_ACEOF
6191 #line 6191 "configure"
6192 #include "confdefs.h"
6193 #include <sys/types.h>
6194 #include <$ac_hdr>
6195
6196 int
6197 main (void)
6198 {
6199 if ((DIR *) 0)
6200 return 0;
6201   ;
6202   return 0;
6203 }
6204 _ACEOF
6205 rm -f "conftest.$ac_objext"
6206 if { (eval echo "$as_me:6206: \"$ac_compile\"") >&5
6207   (eval $ac_compile) 2>&5
6208   ac_status=$?
6209   echo "$as_me:6209: \$? = $ac_status" >&5
6210   (exit "$ac_status"); } &&
6211          { ac_try='test -s "conftest.$ac_objext"'
6212   { (eval echo "$as_me:6212: \"$ac_try\"") >&5
6213   (eval $ac_try) 2>&5
6214   ac_status=$?
6215   echo "$as_me:6215: \$? = $ac_status" >&5
6216   (exit "$ac_status"); }; }; then
6217   eval "$as_ac_Header=yes"
6218 else
6219   echo "$as_me: failed program was:" >&5
6220 cat "conftest.$ac_ext" >&5
6221 eval "$as_ac_Header=no"
6222 fi
6223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6224 fi
6225 echo "$as_me:6225: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6226 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6227 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6228   cat >>confdefs.h <<EOF
6229 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6230 EOF
6231
6232 ac_header_dirent=$ac_hdr; break
6233 fi
6234
6235 done
6236 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6237 if test $ac_header_dirent = dirent.h; then
6238   echo "$as_me:6238: checking for opendir in -ldir" >&5
6239 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6240 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6241   echo $ECHO_N "(cached) $ECHO_C" >&6
6242 else
6243   ac_check_lib_save_LIBS=$LIBS
6244 LIBS="-ldir  $LIBS"
6245 cat >"conftest.$ac_ext" <<_ACEOF
6246 #line 6246 "configure"
6247 #include "confdefs.h"
6248
6249 /* Override any gcc2 internal prototype to avoid an error.  */
6250 #ifdef __cplusplus
6251 extern "C"
6252 #endif
6253 /* We use char because int might match the return type of a gcc2
6254    builtin and then its argument prototype would still apply.  */
6255 char opendir ();
6256 int
6257 main (void)
6258 {
6259 opendir ();
6260   ;
6261   return 0;
6262 }
6263 _ACEOF
6264 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6265 if { (eval echo "$as_me:6265: \"$ac_link\"") >&5
6266   (eval $ac_link) 2>&5
6267   ac_status=$?
6268   echo "$as_me:6268: \$? = $ac_status" >&5
6269   (exit "$ac_status"); } &&
6270          { ac_try='test -s "conftest$ac_exeext"'
6271   { (eval echo "$as_me:6271: \"$ac_try\"") >&5
6272   (eval $ac_try) 2>&5
6273   ac_status=$?
6274   echo "$as_me:6274: \$? = $ac_status" >&5
6275   (exit "$ac_status"); }; }; then
6276   ac_cv_lib_dir_opendir=yes
6277 else
6278   echo "$as_me: failed program was:" >&5
6279 cat "conftest.$ac_ext" >&5
6280 ac_cv_lib_dir_opendir=no
6281 fi
6282 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6283 LIBS=$ac_check_lib_save_LIBS
6284 fi
6285 echo "$as_me:6285: result: $ac_cv_lib_dir_opendir" >&5
6286 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6287 if test "$ac_cv_lib_dir_opendir" = yes; then
6288   LIBS="$LIBS -ldir"
6289 fi
6290
6291 else
6292   echo "$as_me:6292: checking for opendir in -lx" >&5
6293 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6294 if test "${ac_cv_lib_x_opendir+set}" = set; then
6295   echo $ECHO_N "(cached) $ECHO_C" >&6
6296 else
6297   ac_check_lib_save_LIBS=$LIBS
6298 LIBS="-lx  $LIBS"
6299 cat >"conftest.$ac_ext" <<_ACEOF
6300 #line 6300 "configure"
6301 #include "confdefs.h"
6302
6303 /* Override any gcc2 internal prototype to avoid an error.  */
6304 #ifdef __cplusplus
6305 extern "C"
6306 #endif
6307 /* We use char because int might match the return type of a gcc2
6308    builtin and then its argument prototype would still apply.  */
6309 char opendir ();
6310 int
6311 main (void)
6312 {
6313 opendir ();
6314   ;
6315   return 0;
6316 }
6317 _ACEOF
6318 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6319 if { (eval echo "$as_me:6319: \"$ac_link\"") >&5
6320   (eval $ac_link) 2>&5
6321   ac_status=$?
6322   echo "$as_me:6322: \$? = $ac_status" >&5
6323   (exit "$ac_status"); } &&
6324          { ac_try='test -s "conftest$ac_exeext"'
6325   { (eval echo "$as_me:6325: \"$ac_try\"") >&5
6326   (eval $ac_try) 2>&5
6327   ac_status=$?
6328   echo "$as_me:6328: \$? = $ac_status" >&5
6329   (exit "$ac_status"); }; }; then
6330   ac_cv_lib_x_opendir=yes
6331 else
6332   echo "$as_me: failed program was:" >&5
6333 cat "conftest.$ac_ext" >&5
6334 ac_cv_lib_x_opendir=no
6335 fi
6336 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6337 LIBS=$ac_check_lib_save_LIBS
6338 fi
6339 echo "$as_me:6339: result: $ac_cv_lib_x_opendir" >&5
6340 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6341 if test "$ac_cv_lib_x_opendir" = yes; then
6342   LIBS="$LIBS -lx"
6343 fi
6344
6345 fi
6346
6347 ###############################################################################
6348
6349 echo "$as_me:6349: checking if you want to build a separate terminfo library" >&5
6350 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6351
6352 # Check whether --with-termlib or --without-termlib was given.
6353 if test "${with_termlib+set}" = set; then
6354   withval="$with_termlib"
6355   with_termlib=$withval
6356 else
6357   with_termlib=no
6358 fi;
6359 echo "$as_me:6359: result: $with_termlib" >&5
6360 echo "${ECHO_T}$with_termlib" >&6
6361
6362 echo "$as_me:6362: checking if you want to build a separate tic library" >&5
6363 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6364
6365 # Check whether --with-ticlib or --without-ticlib was given.
6366 if test "${with_ticlib+set}" = set; then
6367   withval="$with_ticlib"
6368   with_ticlib=$withval
6369 else
6370   with_ticlib=no
6371 fi;
6372 echo "$as_me:6372: result: $with_ticlib" >&5
6373 echo "${ECHO_T}$with_ticlib" >&6
6374
6375 if test X"$CC_G_OPT" = X"" ; then
6376         CC_G_OPT='-g'
6377         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6378 fi
6379
6380 if test X"$CXX_G_OPT" = X"" ; then
6381         CXX_G_OPT='-g'
6382         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6383 fi
6384
6385 echo "$as_me:6385: checking for default loader flags" >&5
6386 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6387 case "$DFT_LWR_MODEL" in
6388 (libtool) LD_MODEL=''   ;;
6389 (normal)  LD_MODEL=''   ;;
6390 (debug)   LD_MODEL=$CC_G_OPT ;;
6391 (profile) LD_MODEL='-pg';;
6392 (shared)  LD_MODEL=''   ;;
6393 esac
6394 echo "$as_me:6394: result: $LD_MODEL" >&5
6395 echo "${ECHO_T}$LD_MODEL" >&6
6396
6397 case "$DFT_LWR_MODEL" in
6398 (shared)
6399
6400 echo "$as_me:6400: checking if rpath option should be used" >&5
6401 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6402
6403 # Check whether --enable-rpath or --disable-rpath was given.
6404 if test "${enable_rpath+set}" = set; then
6405   enableval="$enable_rpath"
6406   cf_cv_enable_rpath=$enableval
6407 else
6408   cf_cv_enable_rpath=no
6409 fi;
6410 echo "$as_me:6410: result: $cf_cv_enable_rpath" >&5
6411 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6412
6413 echo "$as_me:6413: checking if shared libraries should be relinked during install" >&5
6414 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6415
6416 # Check whether --enable-relink or --disable-relink was given.
6417 if test "${enable_relink+set}" = set; then
6418   enableval="$enable_relink"
6419   cf_cv_do_relink=$enableval
6420 else
6421   cf_cv_do_relink=yes
6422 fi;
6423 echo "$as_me:6423: result: $cf_cv_do_relink" >&5
6424 echo "${ECHO_T}$cf_cv_do_relink" >&6
6425         ;;
6426 esac
6427
6428 # we will build libraries one-level down.
6429 rel_builddir=..
6430
6431 LD_RPATH_OPT=
6432 if test "x$cf_cv_enable_rpath" != xno
6433 then
6434         echo "$as_me:6434: checking for an rpath option" >&5
6435 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6436         case "$cf_cv_system_name" in
6437         (irix*)
6438                 if test "$GCC" = yes; then
6439                         LD_RPATH_OPT="-Wl,-rpath,"
6440                 else
6441                         LD_RPATH_OPT="-rpath "
6442                 fi
6443                 ;;
6444         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6445                 LD_RPATH_OPT="-Wl,-rpath,"
6446                 ;;
6447         (openbsd[2-9].*|mirbsd*)
6448                 LD_RPATH_OPT="-Wl,-rpath,"
6449                 ;;
6450         (dragonfly*)
6451                 LD_RPATH_OPT="-rpath "
6452                 ;;
6453         (netbsd*)
6454                 LD_RPATH_OPT="-Wl,-rpath,"
6455                 ;;
6456         (osf*|mls+*)
6457                 LD_RPATH_OPT="-rpath "
6458                 ;;
6459         (solaris2*)
6460                 LD_RPATH_OPT="-R"
6461                 ;;
6462         (*)
6463                 ;;
6464         esac
6465         echo "$as_me:6465: result: $LD_RPATH_OPT" >&5
6466 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6467
6468         case "x$LD_RPATH_OPT" in
6469         (x-R*)
6470                 echo "$as_me:6470: checking if we need a space after rpath option" >&5
6471 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6472                 cf_save_LIBS="$LIBS"
6473
6474 cf_add_libs="$LIBS"
6475 # reverse order
6476 cf_add_0lib=
6477 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6478 # filter duplicates
6479 for cf_add_1lib in $cf_add_0lib; do
6480         for cf_add_2lib in $cf_add_libs; do
6481                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6482                         cf_add_1lib=
6483                         break
6484                 fi
6485         done
6486         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6487 done
6488 LIBS="$cf_add_libs"
6489
6490                 cat >"conftest.$ac_ext" <<_ACEOF
6491 #line 6491 "configure"
6492 #include "confdefs.h"
6493
6494 int
6495 main (void)
6496 {
6497
6498   ;
6499   return 0;
6500 }
6501 _ACEOF
6502 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6503 if { (eval echo "$as_me:6503: \"$ac_link\"") >&5
6504   (eval $ac_link) 2>&5
6505   ac_status=$?
6506   echo "$as_me:6506: \$? = $ac_status" >&5
6507   (exit "$ac_status"); } &&
6508          { ac_try='test -s "conftest$ac_exeext"'
6509   { (eval echo "$as_me:6509: \"$ac_try\"") >&5
6510   (eval $ac_try) 2>&5
6511   ac_status=$?
6512   echo "$as_me:6512: \$? = $ac_status" >&5
6513   (exit "$ac_status"); }; }; then
6514   cf_rpath_space=no
6515 else
6516   echo "$as_me: failed program was:" >&5
6517 cat "conftest.$ac_ext" >&5
6518 cf_rpath_space=yes
6519 fi
6520 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6521                 LIBS="$cf_save_LIBS"
6522                 echo "$as_me:6522: result: $cf_rpath_space" >&5
6523 echo "${ECHO_T}$cf_rpath_space" >&6
6524                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6525                 ;;
6526         esac
6527 fi
6528
6529         RM_SHARED_OPTS=
6530         LOCAL_LDFLAGS=
6531         LOCAL_LDFLAGS2=
6532         LD_SHARED_OPTS=
6533         INSTALL_LIB="-m 644"
6534         : ${rel_builddir:=.}
6535
6536         shlibdir=$libdir
6537
6538         MAKE_DLLS="#"
6539
6540         cf_cv_do_symlinks=no
6541         cf_ld_rpath_opt=
6542         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6543
6544         echo "$as_me:6544: checking if release/abi version should be used for shared libs" >&5
6545 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6546
6547 # Check whether --with-shlib-version or --without-shlib-version was given.
6548 if test "${with_shlib_version+set}" = set; then
6549   withval="$with_shlib_version"
6550   test -z "$withval" && withval=auto
6551         case "$withval" in
6552         (yes)
6553                 cf_cv_shlib_version=auto
6554                 ;;
6555         (rel|abi|auto)
6556                 cf_cv_shlib_version=$withval
6557                 ;;
6558         (*)
6559                 echo "$as_me:6559: result: $withval" >&5
6560 echo "${ECHO_T}$withval" >&6
6561                 { { echo "$as_me:6561: error: option value must be one of: rel, abi, or auto" >&5
6562 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6563    { (exit 1); exit 1; }; }
6564                 ;;
6565         esac
6566
6567 else
6568   cf_cv_shlib_version=auto
6569 fi;
6570         echo "$as_me:6570: result: $cf_cv_shlib_version" >&5
6571 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6572
6573         cf_cv_rm_so_locs=no
6574         cf_try_cflags=
6575
6576         # Some less-capable ports of gcc support only -fpic
6577         CC_SHARED_OPTS=
6578
6579         cf_try_fPIC=no
6580         if test "$GCC" = yes
6581         then
6582                 cf_try_fPIC=yes
6583         else
6584                 case "$cf_cv_system_name" in
6585                 (*linux*)       # e.g., PGI compiler
6586                         cf_try_fPIC=yes
6587                         ;;
6588                 esac
6589         fi
6590
6591         if test "$cf_try_fPIC" = yes
6592         then
6593                 echo "$as_me:6593: checking which $CC option to use" >&5
6594 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6595                 cf_save_CFLAGS="$CFLAGS"
6596                 for CC_SHARED_OPTS in -fPIC -fpic ''
6597                 do
6598                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6599                         cat >"conftest.$ac_ext" <<_ACEOF
6600 #line 6600 "configure"
6601 #include "confdefs.h"
6602 #include <stdio.h>
6603 int
6604 main (void)
6605 {
6606 int x = 1
6607   ;
6608   return 0;
6609 }
6610 _ACEOF
6611 rm -f "conftest.$ac_objext"
6612 if { (eval echo "$as_me:6612: \"$ac_compile\"") >&5
6613   (eval $ac_compile) 2>&5
6614   ac_status=$?
6615   echo "$as_me:6615: \$? = $ac_status" >&5
6616   (exit "$ac_status"); } &&
6617          { ac_try='test -s "conftest.$ac_objext"'
6618   { (eval echo "$as_me:6618: \"$ac_try\"") >&5
6619   (eval $ac_try) 2>&5
6620   ac_status=$?
6621   echo "$as_me:6621: \$? = $ac_status" >&5
6622   (exit "$ac_status"); }; }; then
6623   break
6624 else
6625   echo "$as_me: failed program was:" >&5
6626 cat "conftest.$ac_ext" >&5
6627 fi
6628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6629                 done
6630                 echo "$as_me:6630: result: $CC_SHARED_OPTS" >&5
6631 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6632                 CFLAGS="$cf_save_CFLAGS"
6633         fi
6634
6635         cf_cv_shlib_version_infix=no
6636
6637         case "$cf_cv_system_name" in
6638         (aix4.3-9*|aix[5-7]*)
6639                 if test "$GCC" = yes; then
6640                         CC_SHARED_OPTS='-Wl,-brtl'
6641                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6642                 else
6643                         CC_SHARED_OPTS='-brtl'
6644                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6645                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6646                 fi
6647                 ;;
6648         (beos*)
6649                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6650                 ;;
6651         (cygwin*)
6652                 CC_SHARED_OPTS=
6653                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6654                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6655                 cf_cv_shlib_version=cygdll
6656                 cf_cv_shlib_version_infix=cygdll
6657                 shlibdir=$bindir
6658                 MAKE_DLLS=
6659                 cat >mk_shared_lib.sh <<-CF_EOF
6660                 #!$SHELL
6661                 SHARED_LIB=\$1
6662                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6663                 shift
6664                 cat <<-EOF
6665                 Linking shared library
6666                 ** SHARED_LIB \$SHARED_LIB
6667                 ** IMPORT_LIB \$IMPORT_LIB
6668 EOF
6669                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6670 CF_EOF
6671                 chmod +x mk_shared_lib.sh
6672                 ;;
6673         (msys*)
6674                 CC_SHARED_OPTS=
6675                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6676                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6677                 cf_cv_shlib_version=msysdll
6678                 cf_cv_shlib_version_infix=msysdll
6679                 shlibdir=$bindir
6680                 MAKE_DLLS=
6681                 cat >mk_shared_lib.sh <<-CF_EOF
6682                 #!$SHELL
6683                 SHARED_LIB=\$1
6684                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6685                 shift
6686                 cat <<-EOF
6687                 Linking shared library
6688                 ** SHARED_LIB \$SHARED_LIB
6689                 ** IMPORT_LIB \$IMPORT_LIB
6690 EOF
6691                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6692 CF_EOF
6693                 chmod +x mk_shared_lib.sh
6694                 ;;
6695         (darwin*)
6696                 cf_try_cflags="no-cpp-precomp"
6697                 CC_SHARED_OPTS="-dynamic"
6698                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6699                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6700                 cf_cv_shlib_version_infix=yes
6701                 echo "$as_me:6701: checking if ld -search_paths_first works" >&5
6702 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6703 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6704   echo $ECHO_N "(cached) $ECHO_C" >&6
6705 else
6706
6707                         cf_save_LDFLAGS=$LDFLAGS
6708                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6709                         cat >"conftest.$ac_ext" <<_ACEOF
6710 #line 6710 "configure"
6711 #include "confdefs.h"
6712
6713 int
6714 main (void)
6715 {
6716 int i;
6717   ;
6718   return 0;
6719 }
6720 _ACEOF
6721 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6722 if { (eval echo "$as_me:6722: \"$ac_link\"") >&5
6723   (eval $ac_link) 2>&5
6724   ac_status=$?
6725   echo "$as_me:6725: \$? = $ac_status" >&5
6726   (exit "$ac_status"); } &&
6727          { ac_try='test -s "conftest$ac_exeext"'
6728   { (eval echo "$as_me:6728: \"$ac_try\"") >&5
6729   (eval $ac_try) 2>&5
6730   ac_status=$?
6731   echo "$as_me:6731: \$? = $ac_status" >&5
6732   (exit "$ac_status"); }; }; then
6733   cf_cv_ldflags_search_paths_first=yes
6734 else
6735   echo "$as_me: failed program was:" >&5
6736 cat "conftest.$ac_ext" >&5
6737 cf_cv_ldflags_search_paths_first=no
6738 fi
6739 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6740                                 LDFLAGS=$cf_save_LDFLAGS
6741 fi
6742 echo "$as_me:6742: result: $cf_cv_ldflags_search_paths_first" >&5
6743 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6744                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6745                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6746                 fi
6747                 ;;
6748         (haiku*)
6749
6750         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6751         if test "$cf_cv_shlib_version" = rel; then
6752                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6753         else
6754                 cf_cv_shared_soname='`basename $@`'
6755         fi
6756
6757                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6758                 ;;
6759         (hpux[7-8]*)
6760                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6761                 if test "$GCC" != yes; then
6762                         CC_SHARED_OPTS='+Z'
6763                 fi
6764                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6765                 INSTALL_LIB="-m 555"
6766                 ;;
6767         (hpux*)
6768                 # (tested with gcc 2.7.2 -- I don't have c89)
6769                 if test "$GCC" = yes; then
6770                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6771                 else
6772                         CC_SHARED_OPTS='+Z'
6773                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6774                 fi
6775                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6776                 # HP-UX shared libraries must be executable, and should be
6777                 # readonly to exploit a quirk in the memory manager.
6778                 INSTALL_LIB="-m 555"
6779                 ;;
6780         (interix*)
6781                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6782                 if test "$cf_cv_shlib_version" = rel; then
6783                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6784                 else
6785                         cf_shared_soname='`basename $@`'
6786                 fi
6787                 CC_SHARED_OPTS=
6788                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6789                 ;;
6790         (irix*)
6791                 if test "$cf_cv_enable_rpath" = yes ; then
6792                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6793                 fi
6794                 # tested with IRIX 5.2 and 'cc'.
6795                 if test "$GCC" != yes; then
6796                         CC_SHARED_OPTS='-KPIC'
6797                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6798                 else
6799                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6800                 fi
6801                 cf_cv_rm_so_locs=yes
6802                 ;;
6803         (linux*|gnu*|k*bsd*-gnu)
6804                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6805                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6806                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6807                 fi
6808                 if test "$cf_cv_enable_rpath" = yes ; then
6809                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6810                 fi
6811
6812         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6813         if test "$cf_cv_shlib_version" = rel; then
6814                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6815         else
6816                 cf_cv_shared_soname='`basename $@`'
6817         fi
6818
6819                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6820                 ;;
6821         (mingw*msvc*)
6822                 cf_cv_shlib_version=msvcdll
6823                 cf_cv_shlib_version_infix=msvcdll
6824                 shlibdir=$bindir
6825                 MAKE_DLLS=
6826                 if test "$DFT_LWR_MODEL" = "shared" ; then
6827                         LOCAL_LDFLAGS="-link -dll"
6828                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6829                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6830                 fi
6831                 CC_SHARED_OPTS=
6832                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6833                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6834                 cat >mk_shared_lib.sh <<-CF_EOF
6835                 #!$SHELL
6836                 SHARED_LIB=\$1
6837                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6838                 shift
6839                 my_ld=\$1
6840                 shift
6841                 cat <<-EOF
6842                 Linking shared library
6843                 ** SHARED LIB \$SHARED_LIB
6844                 ** IMPORT_LIB \$IMPORT_LIB
6845 EOF
6846                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6847                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6848                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6849 CF_EOF
6850                 chmod +x mk_shared_lib.sh
6851                 cat >mk_prog.sh <<-CF_EOF
6852                 #!$SHELL
6853                 shift
6854                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6855                 LD="$LD"
6856                 clopts=()
6857                 ldopts=("/subsystem:console")
6858                 libs=()
6859                 isdll=0
6860                 while test \$# -gt 0; do
6861                         case "\$1" in
6862                                 -link)
6863                                         # ignore -link argument
6864                                         ;;
6865                                 -M[TD] | -M[TD]d)
6866                                         # ignore runtime-library option
6867                                         ;;
6868                                 -dll)
6869                                         isdll=1
6870                                         ;;
6871                                 -W* | -w*)
6872                                         # ignore warnings
6873                                         ;;
6874                                 -D*)
6875                                         clopts+=("\$1")
6876                                         ;;
6877                                 -I*)
6878                                         clopts+=("\$1")
6879                                         ;;
6880                                 -l*)
6881                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6882                                         ;;
6883                                 -L*)
6884                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6885                                         ;;
6886                                 *.obj | *.o)
6887                                         ldopts+=("\$1")
6888                                         ;;
6889                                 -Wl,*)
6890                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6891                                                 ldopts+=("\${linkarg}")
6892                                         done
6893                                         ;;
6894                                 *.lib)
6895                                         ldopts+=("\$1")
6896                                         ;;
6897                                 -o)
6898                                         shift
6899                                         ldopts+=("-out:\$1")
6900                                         ;;
6901                                 *)
6902                                         clopts+=("\$1")
6903                                         ldopts+=("\$1")
6904                                         ;;
6905                         esac
6906                         shift
6907                 done
6908                 if [ "\$isdll" -ne 0 ]; then
6909                         for lib in \${libs[*]}; do
6910                                 ldopts+=("\$lib.dll.lib")
6911                         done
6912                 else
6913                         for lib in \${libs[*]}; do
6914                                 ldopts+=("\$lib.lib")
6915                         done
6916                 fi
6917                 cat <<-EOF
6918                 Creating program
6919                 ** ld options:   "\${ldopts[@]}"
6920 EOF
6921                 exec \$LD \${ldopts[@]}
6922 CF_EOF
6923                 chmod +x mk_prog.sh
6924                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6925                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6926                 ;;
6927         (mingw*)
6928                 cf_cv_shlib_version=mingw
6929                 cf_cv_shlib_version_infix=mingw
6930                 shlibdir=$bindir
6931                 MAKE_DLLS=
6932                 if test "$DFT_LWR_MODEL" = "shared" ; then
6933                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6934                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6935                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6936                 fi
6937                 CC_SHARED_OPTS=
6938                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6939                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6940                 cat >mk_shared_lib.sh <<-CF_EOF
6941                 #!$SHELL
6942                 SHARED_LIB=\$1
6943                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6944                 shift
6945                 cat <<-EOF
6946                 Linking shared library
6947                 ** SHARED_LIB \$SHARED_LIB
6948                 ** IMPORT_LIB \$IMPORT_LIB
6949 EOF
6950                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6951 CF_EOF
6952                 chmod +x mk_shared_lib.sh
6953                 ;;
6954         (openbsd[2-9].*|mirbsd*)
6955                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6956                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6957                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6958                 fi
6959                 if test "$cf_cv_enable_rpath" = yes ; then
6960                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6961                 fi
6962                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6963
6964         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6965         if test "$cf_cv_shlib_version" = rel; then
6966                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6967         else
6968                 cf_cv_shared_soname='`basename $@`'
6969         fi
6970
6971                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6972                 ;;
6973         (nskJ*)
6974                 CC_SHARED_OPTS=
6975                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6976                 ;;
6977         (nskL*)
6978                 CC_SHARED_OPTS=
6979                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6980                 ;;
6981         (nto-qnx*|openbsd*|freebsd[12].*)
6982                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6983                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6984                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6985                 ;;
6986         (dragonfly*|freebsd*)
6987                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6988                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6989                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6990                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6991                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6992                 fi
6993
6994         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6995         if test "$cf_cv_shlib_version" = rel; then
6996                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6997         else
6998                 cf_cv_shared_soname='`basename $@`'
6999         fi
7000
7001                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7002                 ;;
7003         (netbsd*)
7004                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7005                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7006                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7007                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7008                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7009                         if test "$cf_cv_shlib_version" = auto; then
7010                         if test -f /usr/libexec/ld.elf_so; then
7011                                 cf_cv_shlib_version=abi
7012                         else
7013                                 cf_cv_shlib_version=rel
7014                         fi
7015                         fi
7016
7017         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7018         if test "$cf_cv_shlib_version" = rel; then
7019                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7020         else
7021                 cf_cv_shared_soname='`basename $@`'
7022         fi
7023
7024                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7025                 else
7026                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7027                 fi
7028                 ;;
7029         (osf*|mls+*)
7030                 # tested with OSF/1 V3.2 and 'cc'
7031                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7032                 # link with shared libs).
7033                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7034                 case "$host_os" in
7035                 (osf4*)
7036                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7037                         ;;
7038                 esac
7039                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7040                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7041                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7042                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7043                 fi
7044                 cf_cv_rm_so_locs=yes
7045                 ;;
7046         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7047                 # tested with osr5.0.5
7048                 if test "$GCC" != yes; then
7049                         CC_SHARED_OPTS='-belf -KPIC'
7050                 fi
7051                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7052                 if test "$cf_cv_enable_rpath" = yes ; then
7053                         # only way is to set LD_RUN_PATH but no switch for it
7054                         RUN_PATH=$libdir
7055                 fi
7056                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7057                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7058                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7059                 ;;
7060         (sunos4*)
7061                 # tested with SunOS 4.1.1 and gcc 2.7.0
7062                 if test "$GCC" != yes; then
7063                         CC_SHARED_OPTS='-KPIC'
7064                 fi
7065                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7066                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7067                 ;;
7068         (solaris2*)
7069                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7070                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7071                 if test "$DFT_LWR_MODEL" = "shared" ; then
7072                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7073                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7074                 fi
7075                 if test "$cf_cv_enable_rpath" = yes ; then
7076                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7077                 fi
7078
7079         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7080         if test "$cf_cv_shlib_version" = rel; then
7081                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7082         else
7083                 cf_cv_shared_soname='`basename $@`'
7084         fi
7085
7086                 if test "$GCC" != yes; then
7087                         cf_save_CFLAGS="$CFLAGS"
7088                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7089                         do
7090                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7091                                 cat >"conftest.$ac_ext" <<_ACEOF
7092 #line 7092 "configure"
7093 #include "confdefs.h"
7094 #include <stdio.h>
7095 int
7096 main (void)
7097 {
7098 printf("Hello\\n");
7099   ;
7100   return 0;
7101 }
7102 _ACEOF
7103 rm -f "conftest.$ac_objext"
7104 if { (eval echo "$as_me:7104: \"$ac_compile\"") >&5
7105   (eval $ac_compile) 2>&5
7106   ac_status=$?
7107   echo "$as_me:7107: \$? = $ac_status" >&5
7108   (exit "$ac_status"); } &&
7109          { ac_try='test -s "conftest.$ac_objext"'
7110   { (eval echo "$as_me:7110: \"$ac_try\"") >&5
7111   (eval $ac_try) 2>&5
7112   ac_status=$?
7113   echo "$as_me:7113: \$? = $ac_status" >&5
7114   (exit "$ac_status"); }; }; then
7115   break
7116 else
7117   echo "$as_me: failed program was:" >&5
7118 cat "conftest.$ac_ext" >&5
7119 fi
7120 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7121                         done
7122                         CFLAGS="$cf_save_CFLAGS"
7123                         CC_SHARED_OPTS=$cf_shared_opts
7124                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7125                 else
7126                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7127                 fi
7128                 ;;
7129         (sysv5uw7*|unix_sv*)
7130                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7131                 if test "$GCC" != yes; then
7132                         CC_SHARED_OPTS='-KPIC'
7133                 fi
7134                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7135                 ;;
7136         (*)
7137                 CC_SHARED_OPTS='unknown'
7138                 MK_SHARED_LIB='echo unknown'
7139                 ;;
7140         esac
7141
7142         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7143         case "$cf_cv_shlib_version" in
7144         (rel|abi)
7145                 case "$MK_SHARED_LIB" in
7146                 (*'-o $@')
7147                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7148                         ;;
7149                 (*)
7150                         { echo "$as_me:7150: WARNING: ignored --with-shlib-version" >&5
7151 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7152                         ;;
7153                 esac
7154                 ;;
7155         esac
7156
7157         if test -n "$cf_try_cflags"
7158         then
7159 cat > conftest.$ac_ext <<EOF
7160 #line 7160 "${as_me:-configure}"
7161 #include <stdio.h>
7162 int main(int argc, char *argv[])
7163 {
7164         printf("hello\\n");
7165         return (argv[argc-1] == 0) ;
7166 }
7167 EOF
7168                 cf_save_CFLAGS="$CFLAGS"
7169                 for cf_opt in $cf_try_cflags
7170                 do
7171                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7172                         echo "$as_me:7172: checking if CFLAGS option -$cf_opt works" >&5
7173 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7174                         if { (eval echo "$as_me:7174: \"$ac_compile\"") >&5
7175   (eval $ac_compile) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit "$ac_status"); }; then
7179                                 echo "$as_me:7179: result: yes" >&5
7180 echo "${ECHO_T}yes" >&6
7181                                 cf_save_CFLAGS="$CFLAGS"
7182                         else
7183                                 echo "$as_me:7183: result: no" >&5
7184 echo "${ECHO_T}no" >&6
7185                         fi
7186                 done
7187                 CFLAGS="$cf_save_CFLAGS"
7188         fi
7189
7190         # RPATH_LIST is a colon-separated list of directories
7191         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7192         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7193
7194         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7195
7196         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7197
7198 echo "${as_me:-configure}:7198: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7199
7200         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7201
7202 echo "${as_me:-configure}:7202: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7203
7204 for model in $cf_list_models ; do
7205         case "$model" in
7206         (libtool)
7207
7208 echo "$as_me:7208: checking for additional libtool options" >&5
7209 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7210
7211 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7212 if test "${with_libtool_opts+set}" = set; then
7213   withval="$with_libtool_opts"
7214   with_libtool_opts=$withval
7215 else
7216   with_libtool_opts=no
7217 fi;
7218 echo "$as_me:7218: result: $with_libtool_opts" >&5
7219 echo "${ECHO_T}$with_libtool_opts" >&6
7220
7221 case .$with_libtool_opts in
7222 (.yes|.no|.)
7223         ;;
7224 (*)
7225         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7226         ;;
7227 esac
7228
7229 echo "$as_me:7229: checking if exported-symbols file should be used" >&5
7230 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7231
7232 # Check whether --with-export-syms or --without-export-syms was given.
7233 if test "${with_export_syms+set}" = set; then
7234   withval="$with_export_syms"
7235   with_export_syms=$withval
7236 else
7237   with_export_syms=no
7238 fi;
7239 if test "x$with_export_syms" = xyes
7240 then
7241         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7242
7243 fi
7244 echo "$as_me:7244: result: $with_export_syms" >&5
7245 echo "${ECHO_T}$with_export_syms" >&6
7246 if test "x$with_export_syms" != xno
7247 then
7248         EXPORT_SYMS="-export-symbols $with_export_syms"
7249
7250 fi
7251
7252                 ;;
7253         (shared)
7254                 if test "$CC_SHARED_OPTS" = "unknown"; then
7255                         { { echo "$as_me:7255: error: Shared libraries are not supported in this version" >&5
7256 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7257    { (exit 1); exit 1; }; }
7258                 fi
7259                 # workaround for inept transition to PIE vs PIC...
7260                 echo "$as_me:7260: checking if current CFLAGS link properly" >&5
7261 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7262                 cat >"conftest.$ac_ext" <<_ACEOF
7263 #line 7263 "configure"
7264 #include "confdefs.h"
7265 #include <stdio.h>
7266 int
7267 main (void)
7268 {
7269 printf("Hello work\\n");
7270   ;
7271   return 0;
7272 }
7273 _ACEOF
7274 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7275 if { (eval echo "$as_me:7275: \"$ac_link\"") >&5
7276   (eval $ac_link) 2>&5
7277   ac_status=$?
7278   echo "$as_me:7278: \$? = $ac_status" >&5
7279   (exit "$ac_status"); } &&
7280          { ac_try='test -s "conftest$ac_exeext"'
7281   { (eval echo "$as_me:7281: \"$ac_try\"") >&5
7282   (eval $ac_try) 2>&5
7283   ac_status=$?
7284   echo "$as_me:7284: \$? = $ac_status" >&5
7285   (exit "$ac_status"); }; }; then
7286   cf_cflags_work=yes
7287 else
7288   echo "$as_me: failed program was:" >&5
7289 cat "conftest.$ac_ext" >&5
7290 cf_cflags_work=no
7291 fi
7292 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7293                 echo "$as_me:7293: result: $cf_cflags_work" >&5
7294 echo "${ECHO_T}$cf_cflags_work" >&6
7295                 if test "$cf_cflags_work" = no
7296                 then
7297                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7298
7299 echo "${as_me:-configure}:7299: testing try to work around by appending shared-options ..." 1>&5
7300
7301                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7302                 fi
7303
7304 echo "$as_me:7304: checking if versioned-symbols file should be used" >&5
7305 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7306
7307 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7308 if test "${with_versioned_syms+set}" = set; then
7309   withval="$with_versioned_syms"
7310   with_versioned_syms=$withval
7311 else
7312   with_versioned_syms=no
7313 fi;
7314 case "x$with_versioned_syms" in
7315 (xyes)
7316         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7317
7318         ;;
7319 (xno)
7320         ;;
7321 (x/*)
7322         test -f "$with_versioned_syms" || { { echo "$as_me:7322: error: expected a filename: $with_versioned_syms" >&5
7323 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7324    { (exit 1); exit 1; }; }
7325         ;;
7326 (*)
7327         test -f "$with_versioned_syms" || { { echo "$as_me:7327: error: expected a filename: $with_versioned_syms" >&5
7328 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7329    { (exit 1); exit 1; }; }
7330         with_versioned_syms=`pwd`/"$with_versioned_syms"
7331         ;;
7332 esac
7333 echo "$as_me:7333: result: $with_versioned_syms" >&5
7334 echo "${ECHO_T}$with_versioned_syms" >&6
7335
7336 RESULTING_SYMS=
7337 VERSIONED_SYMS=
7338 WILDCARD_SYMS=
7339
7340 if test "x$with_versioned_syms" != xno
7341 then
7342         RESULTING_SYMS=$with_versioned_syms
7343         case "x$MK_SHARED_LIB" in
7344         (*-Wl,*)
7345                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7346                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7347                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7348
7349 echo "${as_me:-configure}:7349: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7350
7351                 ;;
7352         (*-dy\ *)
7353                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7354                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7355                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7356
7357 echo "${as_me:-configure}:7357: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7358
7359                 ;;
7360         (*)
7361                 { echo "$as_me:7361: WARNING: this system does not support versioned-symbols" >&5
7362 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7363                 ;;
7364         esac
7365
7366         # Linux ld can selectively override scope, e.g., of symbols beginning with
7367         # "_" by first declaring some as global, and then using a wildcard to
7368         # declare the others as local.  Some other loaders cannot do this.  Check
7369         # by constructing a (very) simple shared library and inspecting its
7370         # symbols.
7371         if test "x$VERSIONED_SYMS" != "x"
7372         then
7373                 echo "$as_me:7373: checking if wildcards can be used to selectively omit symbols" >&5
7374 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7375                 WILDCARD_SYMS=no
7376
7377                 # make sources
7378                 rm -f conftest.*
7379
7380                 cat >conftest.ver <<EOF
7381 module_1.0 {
7382 global:
7383         globalf1;
7384 local:
7385         localf1;
7386 };
7387 module_2.0 {
7388 global:
7389         globalf2;
7390 local:
7391         localf2;
7392         _*;
7393 } module_1.0;
7394 submodule_1.0 {
7395 global:
7396         subglobalf1;
7397         _ismissing;
7398 local:
7399         sublocalf1;
7400 };
7401 submodule_2.0 {
7402 global:
7403         subglobalf2;
7404 local:
7405         sublocalf2;
7406         _*;
7407 } submodule_1.0;
7408 EOF
7409                 cat >conftest.$ac_ext <<EOF
7410 #line 7410 "configure"
7411 int     _ismissing(void) { return 1; }
7412 int     _localf1(void) { return 1; }
7413 int     _localf2(void) { return 2; }
7414 int     globalf1(void) { return 1; }
7415 int     globalf2(void) { return 2; }
7416 int     _sublocalf1(void) { return 1; }
7417 int     _sublocalf2(void) { return 2; }
7418 int     subglobalf1(void) { return 1; }
7419 int     subglobalf2(void) { return 2; }
7420 EOF
7421                 cat >conftest.mk <<EOF
7422 CC=${CC}
7423 CFLAGS=${CFLAGS}
7424 CPPFLAGS=${CPPFLAGS}
7425 LDFLAGS=${LDFLAGS}
7426 LIBS=${LIBS}
7427 VERSIONED_SYMS=${VERSIONED_SYMS}
7428 RESULTING_SYMS=conftest.ver
7429 MK_SHARED_LIB=${MK_SHARED_LIB}
7430 conftest.so: conftest.$ac_cv_objext
7431                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7432 EOF
7433
7434                 # compile source, make library
7435                 if make -f conftest.mk 2>&5 >/dev/null
7436                 then
7437                         # test for missing symbol in either Data or Text section
7438                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7439                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7440                 fi
7441                 echo "$as_me:7441: result: $WILDCARD_SYMS" >&5
7442 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7443                 rm -f conftest.*
7444         fi
7445 fi
7446
7447                 ;;
7448         esac
7449 done
7450
7451 ### Checks for special libraries, must be done up-front.
7452 SHLIB_LIST=""
7453
7454 echo "$as_me:7454: checking if you want to link with the GPM mouse library" >&5
7455 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7456
7457 # Check whether --with-gpm or --without-gpm was given.
7458 if test "${with_gpm+set}" = set; then
7459   withval="$with_gpm"
7460   with_gpm=$withval
7461 else
7462   with_gpm=maybe
7463 fi;
7464 echo "$as_me:7464: result: $with_gpm" >&5
7465 echo "${ECHO_T}$with_gpm" >&6
7466
7467 if test "$with_gpm" != no ; then
7468         echo "$as_me:7468: checking for gpm.h" >&5
7469 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7470 if test "${ac_cv_header_gpm_h+set}" = set; then
7471   echo $ECHO_N "(cached) $ECHO_C" >&6
7472 else
7473   cat >"conftest.$ac_ext" <<_ACEOF
7474 #line 7474 "configure"
7475 #include "confdefs.h"
7476 #include <gpm.h>
7477 _ACEOF
7478 if { (eval echo "$as_me:7478: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7479   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7480   ac_status=$?
7481   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7482   rm -f conftest.er1
7483   cat conftest.err >&5
7484   echo "$as_me:7484: \$? = $ac_status" >&5
7485   (exit "$ac_status"); } >/dev/null; then
7486   if test -s conftest.err; then
7487     ac_cpp_err=$ac_c_preproc_warn_flag
7488   else
7489     ac_cpp_err=
7490   fi
7491 else
7492   ac_cpp_err=yes
7493 fi
7494 if test -z "$ac_cpp_err"; then
7495   ac_cv_header_gpm_h=yes
7496 else
7497   echo "$as_me: failed program was:" >&5
7498   cat "conftest.$ac_ext" >&5
7499   ac_cv_header_gpm_h=no
7500 fi
7501 rm -f conftest.err "conftest.$ac_ext"
7502 fi
7503 echo "$as_me:7503: result: $ac_cv_header_gpm_h" >&5
7504 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7505 if test "$ac_cv_header_gpm_h" = yes; then
7506
7507 cat >>confdefs.h <<\EOF
7508 #define HAVE_GPM_H 1
7509 EOF
7510
7511                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7512                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7513
7514 echo "${as_me:-configure}:7514: testing assuming we really have GPM library ..." 1>&5
7515
7516 cat >>confdefs.h <<\EOF
7517 #define HAVE_LIBGPM 1
7518 EOF
7519
7520                         with_gpm=yes
7521                 else
7522                         echo "$as_me:7522: checking for Gpm_Open in -lgpm" >&5
7523 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7524 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7525   echo $ECHO_N "(cached) $ECHO_C" >&6
7526 else
7527   ac_check_lib_save_LIBS=$LIBS
7528 LIBS="-lgpm  $LIBS"
7529 cat >"conftest.$ac_ext" <<_ACEOF
7530 #line 7530 "configure"
7531 #include "confdefs.h"
7532
7533 /* Override any gcc2 internal prototype to avoid an error.  */
7534 #ifdef __cplusplus
7535 extern "C"
7536 #endif
7537 /* We use char because int might match the return type of a gcc2
7538    builtin and then its argument prototype would still apply.  */
7539 char Gpm_Open ();
7540 int
7541 main (void)
7542 {
7543 Gpm_Open ();
7544   ;
7545   return 0;
7546 }
7547 _ACEOF
7548 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7549 if { (eval echo "$as_me:7549: \"$ac_link\"") >&5
7550   (eval $ac_link) 2>&5
7551   ac_status=$?
7552   echo "$as_me:7552: \$? = $ac_status" >&5
7553   (exit "$ac_status"); } &&
7554          { ac_try='test -s "conftest$ac_exeext"'
7555   { (eval echo "$as_me:7555: \"$ac_try\"") >&5
7556   (eval $ac_try) 2>&5
7557   ac_status=$?
7558   echo "$as_me:7558: \$? = $ac_status" >&5
7559   (exit "$ac_status"); }; }; then
7560   ac_cv_lib_gpm_Gpm_Open=yes
7561 else
7562   echo "$as_me: failed program was:" >&5
7563 cat "conftest.$ac_ext" >&5
7564 ac_cv_lib_gpm_Gpm_Open=no
7565 fi
7566 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7567 LIBS=$ac_check_lib_save_LIBS
7568 fi
7569 echo "$as_me:7569: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7570 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7571 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7572   with_gpm=yes
7573 else
7574
7575                                 if test "$with_gpm" = maybe; then
7576                                         { echo "$as_me:7576: WARNING: Cannot link with GPM library" >&5
7577 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7578                                         with_gpm=no
7579                                 else
7580                                         { { echo "$as_me:7580: error: Cannot link with GPM library" >&5
7581 echo "$as_me: error: Cannot link with GPM library" >&2;}
7582    { (exit 1); exit 1; }; }
7583                                 fi
7584
7585 fi
7586
7587                 fi
7588
7589 else
7590
7591                 test "$with_gpm" != maybe && { echo "$as_me:7591: WARNING: Cannot find GPM header" >&5
7592 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7593                 with_gpm=no
7594
7595 fi
7596
7597 fi
7598
7599 if test "$with_gpm" != no ; then
7600         echo "$as_me:7600: checking if you want to load GPM dynamically" >&5
7601 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7602
7603 # Check whether --with-dlsym or --without-dlsym was given.
7604 if test "${with_dlsym+set}" = set; then
7605   withval="$with_dlsym"
7606   with_dlsym=$withval
7607 else
7608   with_dlsym=yes
7609 fi;
7610         echo "$as_me:7610: result: $with_dlsym" >&5
7611 echo "${ECHO_T}$with_dlsym" >&6
7612         if test "x$with_dlsym" = xyes ; then
7613
7614 cf_have_dlsym=no
7615 echo "$as_me:7615: checking for dlsym" >&5
7616 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7617 if test "${ac_cv_func_dlsym+set}" = set; then
7618   echo $ECHO_N "(cached) $ECHO_C" >&6
7619 else
7620   cat >"conftest.$ac_ext" <<_ACEOF
7621 #line 7621 "configure"
7622 #include "confdefs.h"
7623 #define dlsym autoconf_temporary
7624 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7625 #undef dlsym
7626
7627 #ifdef __cplusplus
7628 extern "C"
7629 #endif
7630
7631 /* We use char because int might match the return type of a gcc2
7632    builtin and then its argument prototype would still apply.  */
7633 char dlsym (void);
7634
7635 int
7636 main (void)
7637 {
7638
7639 /* The GNU C library defines stubs for functions which it implements
7640     to always fail with ENOSYS.  Some functions are actually named
7641     something starting with __ and the normal name is an alias.  */
7642 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7643 #error found stub for dlsym
7644 #endif
7645
7646         return dlsym ();
7647   ;
7648   return 0;
7649 }
7650 _ACEOF
7651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7652 if { (eval echo "$as_me:7652: \"$ac_link\"") >&5
7653   (eval $ac_link) 2>&5
7654   ac_status=$?
7655   echo "$as_me:7655: \$? = $ac_status" >&5
7656   (exit "$ac_status"); } &&
7657          { ac_try='test -s "conftest$ac_exeext"'
7658   { (eval echo "$as_me:7658: \"$ac_try\"") >&5
7659   (eval $ac_try) 2>&5
7660   ac_status=$?
7661   echo "$as_me:7661: \$? = $ac_status" >&5
7662   (exit "$ac_status"); }; }; then
7663   ac_cv_func_dlsym=yes
7664 else
7665   echo "$as_me: failed program was:" >&5
7666 cat "conftest.$ac_ext" >&5
7667 ac_cv_func_dlsym=no
7668 fi
7669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7670 fi
7671 echo "$as_me:7671: result: $ac_cv_func_dlsym" >&5
7672 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7673 if test "$ac_cv_func_dlsym" = yes; then
7674   cf_have_dlsym=yes
7675 else
7676
7677 cf_have_libdl=no
7678 echo "$as_me:7678: checking for dlsym in -ldl" >&5
7679 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7680 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7681   echo $ECHO_N "(cached) $ECHO_C" >&6
7682 else
7683   ac_check_lib_save_LIBS=$LIBS
7684 LIBS="-ldl  $LIBS"
7685 cat >"conftest.$ac_ext" <<_ACEOF
7686 #line 7686 "configure"
7687 #include "confdefs.h"
7688
7689 /* Override any gcc2 internal prototype to avoid an error.  */
7690 #ifdef __cplusplus
7691 extern "C"
7692 #endif
7693 /* We use char because int might match the return type of a gcc2
7694    builtin and then its argument prototype would still apply.  */
7695 char dlsym ();
7696 int
7697 main (void)
7698 {
7699 dlsym ();
7700   ;
7701   return 0;
7702 }
7703 _ACEOF
7704 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7705 if { (eval echo "$as_me:7705: \"$ac_link\"") >&5
7706   (eval $ac_link) 2>&5
7707   ac_status=$?
7708   echo "$as_me:7708: \$? = $ac_status" >&5
7709   (exit "$ac_status"); } &&
7710          { ac_try='test -s "conftest$ac_exeext"'
7711   { (eval echo "$as_me:7711: \"$ac_try\"") >&5
7712   (eval $ac_try) 2>&5
7713   ac_status=$?
7714   echo "$as_me:7714: \$? = $ac_status" >&5
7715   (exit "$ac_status"); }; }; then
7716   ac_cv_lib_dl_dlsym=yes
7717 else
7718   echo "$as_me: failed program was:" >&5
7719 cat "conftest.$ac_ext" >&5
7720 ac_cv_lib_dl_dlsym=no
7721 fi
7722 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7723 LIBS=$ac_check_lib_save_LIBS
7724 fi
7725 echo "$as_me:7725: result: $ac_cv_lib_dl_dlsym" >&5
7726 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7727 if test "$ac_cv_lib_dl_dlsym" = yes; then
7728
7729         cf_have_dlsym=yes
7730         cf_have_libdl=yes
7731 fi
7732
7733 fi
7734
7735 if test "$cf_have_dlsym" = yes ; then
7736         test "$cf_have_libdl" = yes && {
7737 cf_add_libs="$LIBS"
7738 # reverse order
7739 cf_add_0lib=
7740 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7741 # filter duplicates
7742 for cf_add_1lib in $cf_add_0lib; do
7743         for cf_add_2lib in $cf_add_libs; do
7744                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7745                         cf_add_1lib=
7746                         break
7747                 fi
7748         done
7749         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7750 done
7751 LIBS="$cf_add_libs"
7752  }
7753
7754         echo "$as_me:7754: checking whether able to link to dl*() functions" >&5
7755 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7756         cat >"conftest.$ac_ext" <<_ACEOF
7757 #line 7757 "configure"
7758 #include "confdefs.h"
7759 #include <dlfcn.h>
7760 int
7761 main (void)
7762 {
7763
7764                 void *obj;
7765                 if ((obj = dlopen("filename", 0)) != 0) {
7766                         if (dlsym(obj, "symbolname") == 0) {
7767                         dlclose(obj);
7768                         }
7769                 }
7770   ;
7771   return 0;
7772 }
7773 _ACEOF
7774 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7775 if { (eval echo "$as_me:7775: \"$ac_link\"") >&5
7776   (eval $ac_link) 2>&5
7777   ac_status=$?
7778   echo "$as_me:7778: \$? = $ac_status" >&5
7779   (exit "$ac_status"); } &&
7780          { ac_try='test -s "conftest$ac_exeext"'
7781   { (eval echo "$as_me:7781: \"$ac_try\"") >&5
7782   (eval $ac_try) 2>&5
7783   ac_status=$?
7784   echo "$as_me:7784: \$? = $ac_status" >&5
7785   (exit "$ac_status"); }; }; then
7786
7787 cat >>confdefs.h <<\EOF
7788 #define HAVE_LIBDL 1
7789 EOF
7790
7791 else
7792   echo "$as_me: failed program was:" >&5
7793 cat "conftest.$ac_ext" >&5
7794
7795                 { { echo "$as_me:7795: error: Cannot link test program for libdl" >&5
7796 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7797    { (exit 1); exit 1; }; }
7798 fi
7799 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7800         echo "$as_me:7800: result: ok" >&5
7801 echo "${ECHO_T}ok" >&6
7802 else
7803         { { echo "$as_me:7803: error: Cannot find dlsym function" >&5
7804 echo "$as_me: error: Cannot find dlsym function" >&2;}
7805    { (exit 1); exit 1; }; }
7806 fi
7807
7808                 if test "x$with_gpm" != xyes ; then
7809                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7810
7811 echo "${as_me:-configure}:7811: testing assuming soname for gpm is $with_gpm ..." 1>&5
7812
7813                         cf_cv_gpm_soname="$with_gpm"
7814                 else
7815
7816 echo "$as_me:7816: checking for soname of gpm library" >&5
7817 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7818 if test "${cf_cv_gpm_soname+set}" = set; then
7819   echo $ECHO_N "(cached) $ECHO_C" >&6
7820 else
7821
7822 cf_cv_gpm_soname=unknown
7823 if test "$cross_compiling" != yes ; then
7824 cat >conftest.$ac_ext <<CF_EOF
7825 #include <gpm.h>
7826 int main(void)
7827 {
7828 if (Gpm_Open(0,0)) Gpm_Close();
7829         ${cf_cv_main_return:-return}(0);
7830 }
7831 CF_EOF
7832 cf_save_LIBS="$LIBS"
7833
7834 cf_add_libs="$LIBS"
7835 # reverse order
7836 cf_add_0lib=
7837 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7838 # filter duplicates
7839 for cf_add_1lib in $cf_add_0lib; do
7840         for cf_add_2lib in $cf_add_libs; do
7841                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7842                         cf_add_1lib=
7843                         break
7844                 fi
7845         done
7846         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7847 done
7848 LIBS="$cf_add_libs"
7849
7850         if { (eval echo "$as_me:7850: \"$ac_compile\"") >&5
7851   (eval $ac_compile) 2>&5
7852   ac_status=$?
7853   echo "$as_me:7853: \$? = $ac_status" >&5
7854   (exit "$ac_status"); } ; then
7855                 if { (eval echo "$as_me:7855: \"$ac_link\"") >&5
7856   (eval $ac_link) 2>&5
7857   ac_status=$?
7858   echo "$as_me:7858: \$? = $ac_status" >&5
7859   (exit "$ac_status"); } ; then
7860                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7861                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7862                 fi
7863         fi
7864 rm -rf ./conftest*
7865 LIBS="$cf_save_LIBS"
7866 fi
7867
7868 fi
7869 echo "$as_me:7869: result: $cf_cv_gpm_soname" >&5
7870 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7871
7872                 fi
7873                 test "$cf_cv_gpm_soname" != "unknown" &&
7874 cat >>confdefs.h <<EOF
7875 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7876 EOF
7877
7878                 SHLIB_LIST="-ldl $SHLIB_LIST"
7879
7880 cf_add_libs="$PRIVATE_LIBS"
7881 # reverse order
7882 cf_add_0lib=
7883 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7884 # filter duplicates
7885 for cf_add_1lib in $cf_add_0lib; do
7886         for cf_add_2lib in $cf_add_libs; do
7887                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7888                         cf_add_1lib=
7889                         break
7890                 fi
7891         done
7892         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7893 done
7894 PRIVATE_LIBS="$cf_add_libs"
7895
7896         else
7897                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7898
7899 cf_add_libs="$TEST_LIBS"
7900 # reverse order
7901 cf_add_0lib=
7902 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7903 # filter duplicates
7904 for cf_add_1lib in $cf_add_0lib; do
7905         for cf_add_2lib in $cf_add_libs; do
7906                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7907                         cf_add_1lib=
7908                         break
7909                 fi
7910         done
7911         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7912 done
7913 TEST_LIBS="$cf_add_libs"
7914
7915 cf_add_libs="$PRIVATE_LIBS"
7916 # reverse order
7917 cf_add_0lib=
7918 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7919 # filter duplicates
7920 for cf_add_1lib in $cf_add_0lib; do
7921         for cf_add_2lib in $cf_add_libs; do
7922                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7923                         cf_add_1lib=
7924                         break
7925                 fi
7926         done
7927         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7928 done
7929 PRIVATE_LIBS="$cf_add_libs"
7930
7931         fi
7932
7933 cat >>confdefs.h <<\EOF
7934 #define HAVE_LIBGPM 1
7935 EOF
7936
7937 echo "$as_me:7937: checking for Gpm_Wgetch in -lgpm" >&5
7938 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7939 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7940   echo $ECHO_N "(cached) $ECHO_C" >&6
7941 else
7942   ac_check_lib_save_LIBS=$LIBS
7943 LIBS="-lgpm  $LIBS"
7944 cat >"conftest.$ac_ext" <<_ACEOF
7945 #line 7945 "configure"
7946 #include "confdefs.h"
7947
7948 /* Override any gcc2 internal prototype to avoid an error.  */
7949 #ifdef __cplusplus
7950 extern "C"
7951 #endif
7952 /* We use char because int might match the return type of a gcc2
7953    builtin and then its argument prototype would still apply.  */
7954 char Gpm_Wgetch ();
7955 int
7956 main (void)
7957 {
7958 Gpm_Wgetch ();
7959   ;
7960   return 0;
7961 }
7962 _ACEOF
7963 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7964 if { (eval echo "$as_me:7964: \"$ac_link\"") >&5
7965   (eval $ac_link) 2>&5
7966   ac_status=$?
7967   echo "$as_me:7967: \$? = $ac_status" >&5
7968   (exit "$ac_status"); } &&
7969          { ac_try='test -s "conftest$ac_exeext"'
7970   { (eval echo "$as_me:7970: \"$ac_try\"") >&5
7971   (eval $ac_try) 2>&5
7972   ac_status=$?
7973   echo "$as_me:7973: \$? = $ac_status" >&5
7974   (exit "$ac_status"); }; }; then
7975   ac_cv_lib_gpm_Gpm_Wgetch=yes
7976 else
7977   echo "$as_me: failed program was:" >&5
7978 cat "conftest.$ac_ext" >&5
7979 ac_cv_lib_gpm_Gpm_Wgetch=no
7980 fi
7981 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7982 LIBS=$ac_check_lib_save_LIBS
7983 fi
7984 echo "$as_me:7984: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7985 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7986 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7987
7988 echo "$as_me:7988: checking if GPM is weakly bound to curses library" >&5
7989 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7990 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7991   echo $ECHO_N "(cached) $ECHO_C" >&6
7992 else
7993
7994 cf_cv_check_gpm_wgetch=unknown
7995 if test "$cross_compiling" != yes ; then
7996
7997 cat >conftest.$ac_ext <<CF_EOF
7998 #include <gpm.h>
7999 int main(void)
8000 {
8001         Gpm_Wgetch();
8002         ${cf_cv_main_return:-return}(0);
8003 }
8004 CF_EOF
8005
8006         cf_save_LIBS="$LIBS"
8007         # This only works if we can look at the symbol table.  If a shared
8008         # library is stripped for install, we cannot use that.  So we're forced
8009         # to rely on the static library, noting that some packagers may not
8010         # include it.
8011         LIBS="-static -lgpm -dynamic $LIBS"
8012         if { (eval echo "$as_me:8012: \"$ac_compile\"") >&5
8013   (eval $ac_compile) 2>&5
8014   ac_status=$?
8015   echo "$as_me:8015: \$? = $ac_status" >&5
8016   (exit "$ac_status"); } ; then
8017                 if { (eval echo "$as_me:8017: \"$ac_link\"") >&5
8018   (eval $ac_link) 2>&5
8019   ac_status=$?
8020   echo "$as_me:8020: \$? = $ac_status" >&5
8021   (exit "$ac_status"); } ; then
8022                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8023                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8024                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8025                 fi
8026         fi
8027         rm -rf ./conftest*
8028         LIBS="$cf_save_LIBS"
8029 fi
8030
8031 fi
8032 echo "$as_me:8032: result: $cf_cv_check_gpm_wgetch" >&5
8033 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8034
8035 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8036         { echo "$as_me:8036: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8037 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8038 fi
8039
8040 fi
8041
8042 fi
8043
8044 echo "$as_me:8044: checking if you want to use PCRE2 for regular-expressions" >&5
8045 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8046
8047 # Check whether --with-pcre2 or --without-pcre2 was given.
8048 if test "${with_pcre2+set}" = set; then
8049   withval="$with_pcre2"
8050
8051 fi;
8052 test -z "$with_pcre2" && with_pcre2=no
8053 echo "$as_me:8053: result: $with_pcre2" >&5
8054 echo "${ECHO_T}$with_pcre2" >&6
8055
8056 if test "x$with_pcre2" != xno ; then
8057         cf_with_pcre2_ok=no
8058         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8059         do
8060
8061 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8062         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8063
8064 echo "${as_me:-configure}:8064: testing found package $cf_with_pcre2 ..." 1>&5
8065
8066         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8067         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8068         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8069
8070 echo "${as_me:-configure}:8070: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8071
8072         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8073
8074 echo "${as_me:-configure}:8074: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8075
8076 cf_fix_cppflags=no
8077 cf_new_cflags=
8078 cf_new_cppflags=
8079 cf_new_extra_cppflags=
8080
8081 for cf_add_cflags in $cf_pkgconfig_incs
8082 do
8083 case "$cf_fix_cppflags" in
8084 (no)
8085         case "$cf_add_cflags" in
8086         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8087                 case "$cf_add_cflags" in
8088                 (-D*)
8089                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8090
8091                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8092                                 && test -z "${cf_tst_cflags}" \
8093                                 && cf_fix_cppflags=yes
8094
8095                         if test "$cf_fix_cppflags" = yes ; then
8096
8097         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8098         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8099
8100                                 continue
8101                         elif test "${cf_tst_cflags}" = "\"'" ; then
8102
8103         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8104         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8105
8106                                 continue
8107                         fi
8108                         ;;
8109                 esac
8110                 case "$CPPFLAGS" in
8111                 (*$cf_add_cflags)
8112                         ;;
8113                 (*)
8114                         case "$cf_add_cflags" in
8115                         (-D*)
8116                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8117
8118 CPPFLAGS=`echo "$CPPFLAGS" | \
8119         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8120                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8121
8122                                 ;;
8123                         esac
8124
8125         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8126         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8127
8128                         ;;
8129                 esac
8130                 ;;
8131         (*)
8132
8133         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8134         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8135
8136                 ;;
8137         esac
8138         ;;
8139 (yes)
8140
8141         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8142         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8143
8144         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8145
8146         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8147                 && test -z "${cf_tst_cflags}" \
8148                 && cf_fix_cppflags=no
8149         ;;
8150 esac
8151 done
8152
8153 if test -n "$cf_new_cflags" ; then
8154
8155         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8156         CFLAGS="${CFLAGS}$cf_new_cflags"
8157
8158 fi
8159
8160 if test -n "$cf_new_cppflags" ; then
8161
8162         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8163         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8164
8165 fi
8166
8167 if test -n "$cf_new_extra_cppflags" ; then
8168
8169         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8170         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8171
8172 fi
8173
8174 cf_add_libs="$LIBS"
8175 # reverse order
8176 cf_add_0lib=
8177 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8178 # filter duplicates
8179 for cf_add_1lib in $cf_add_0lib; do
8180         for cf_add_2lib in $cf_add_libs; do
8181                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8182                         cf_add_1lib=
8183                         break
8184                 fi
8185         done
8186         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8187 done
8188 LIBS="$cf_add_libs"
8189
8190         cf_with_pcre2_ok=yes; break
8191 else
8192         cf_pkgconfig_incs=
8193         cf_pkgconfig_libs=
8194         :
8195 fi
8196
8197         done
8198         cf_with_pcre2_ok=yes || { { echo "$as_me:8198: error: Cannot find PCRE2 library" >&5
8199 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8200    { (exit 1); exit 1; }; }
8201
8202 cat >>confdefs.h <<\EOF
8203 #define HAVE_LIB_PCRE2 1
8204 EOF
8205
8206         # if pkgconfig gave no results, look for the libraries directly
8207         case "$LIBS" in
8208         (*pcre2-posix*|*pcreposix*)
8209                 ;;
8210         (*)
8211                 echo "$as_me:8211: checking for regcomp in -lpcre2-posix" >&5
8212 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8213 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8214   echo $ECHO_N "(cached) $ECHO_C" >&6
8215 else
8216   ac_check_lib_save_LIBS=$LIBS
8217 LIBS="-lpcre2-posix  $LIBS"
8218 cat >"conftest.$ac_ext" <<_ACEOF
8219 #line 8219 "configure"
8220 #include "confdefs.h"
8221
8222 /* Override any gcc2 internal prototype to avoid an error.  */
8223 #ifdef __cplusplus
8224 extern "C"
8225 #endif
8226 /* We use char because int might match the return type of a gcc2
8227    builtin and then its argument prototype would still apply.  */
8228 char regcomp ();
8229 int
8230 main (void)
8231 {
8232 regcomp ();
8233   ;
8234   return 0;
8235 }
8236 _ACEOF
8237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8238 if { (eval echo "$as_me:8238: \"$ac_link\"") >&5
8239   (eval $ac_link) 2>&5
8240   ac_status=$?
8241   echo "$as_me:8241: \$? = $ac_status" >&5
8242   (exit "$ac_status"); } &&
8243          { ac_try='test -s "conftest$ac_exeext"'
8244   { (eval echo "$as_me:8244: \"$ac_try\"") >&5
8245   (eval $ac_try) 2>&5
8246   ac_status=$?
8247   echo "$as_me:8247: \$? = $ac_status" >&5
8248   (exit "$ac_status"); }; }; then
8249   ac_cv_lib_pcre2_posix_regcomp=yes
8250 else
8251   echo "$as_me: failed program was:" >&5
8252 cat "conftest.$ac_ext" >&5
8253 ac_cv_lib_pcre2_posix_regcomp=no
8254 fi
8255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8256 LIBS=$ac_check_lib_save_LIBS
8257 fi
8258 echo "$as_me:8258: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8259 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8260 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8261
8262 cf_add_libs="$LIBS"
8263 # reverse order
8264 cf_add_0lib=
8265 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8266 # filter duplicates
8267 for cf_add_1lib in $cf_add_0lib; do
8268         for cf_add_2lib in $cf_add_libs; do
8269                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8270                         cf_add_1lib=
8271                         break
8272                 fi
8273         done
8274         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8275 done
8276 LIBS="$cf_add_libs"
8277
8278 else
8279   echo "$as_me:8279: checking for regcomp in -lpcreposix" >&5
8280 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8281 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8282   echo $ECHO_N "(cached) $ECHO_C" >&6
8283 else
8284   ac_check_lib_save_LIBS=$LIBS
8285 LIBS="-lpcreposix  $LIBS"
8286 cat >"conftest.$ac_ext" <<_ACEOF
8287 #line 8287 "configure"
8288 #include "confdefs.h"
8289
8290 /* Override any gcc2 internal prototype to avoid an error.  */
8291 #ifdef __cplusplus
8292 extern "C"
8293 #endif
8294 /* We use char because int might match the return type of a gcc2
8295    builtin and then its argument prototype would still apply.  */
8296 char regcomp ();
8297 int
8298 main (void)
8299 {
8300 regcomp ();
8301   ;
8302   return 0;
8303 }
8304 _ACEOF
8305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8306 if { (eval echo "$as_me:8306: \"$ac_link\"") >&5
8307   (eval $ac_link) 2>&5
8308   ac_status=$?
8309   echo "$as_me:8309: \$? = $ac_status" >&5
8310   (exit "$ac_status"); } &&
8311          { ac_try='test -s "conftest$ac_exeext"'
8312   { (eval echo "$as_me:8312: \"$ac_try\"") >&5
8313   (eval $ac_try) 2>&5
8314   ac_status=$?
8315   echo "$as_me:8315: \$? = $ac_status" >&5
8316   (exit "$ac_status"); }; }; then
8317   ac_cv_lib_pcreposix_regcomp=yes
8318 else
8319   echo "$as_me: failed program was:" >&5
8320 cat "conftest.$ac_ext" >&5
8321 ac_cv_lib_pcreposix_regcomp=no
8322 fi
8323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8324 LIBS=$ac_check_lib_save_LIBS
8325 fi
8326 echo "$as_me:8326: result: $ac_cv_lib_pcreposix_regcomp" >&5
8327 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8328 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8329
8330 cf_add_libs="$LIBS"
8331 # reverse order
8332 cf_add_0lib=
8333 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8334 # filter duplicates
8335 for cf_add_1lib in $cf_add_0lib; do
8336         for cf_add_2lib in $cf_add_libs; do
8337                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8338                         cf_add_1lib=
8339                         break
8340                 fi
8341         done
8342         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8343 done
8344 LIBS="$cf_add_libs"
8345
8346 else
8347   { { echo "$as_me:8347: error: Cannot find PCRE2 POSIX library" >&5
8348 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8349    { (exit 1); exit 1; }; }
8350 fi
8351
8352 fi
8353
8354                 ;;
8355         esac
8356
8357         # either way, check for the library header files
8358
8359 for ac_header in pcre2posix.h pcreposix.h
8360 do
8361 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8362 echo "$as_me:8362: checking for $ac_header" >&5
8363 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8364 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8365   echo $ECHO_N "(cached) $ECHO_C" >&6
8366 else
8367   cat >"conftest.$ac_ext" <<_ACEOF
8368 #line 8368 "configure"
8369 #include "confdefs.h"
8370 #include <$ac_header>
8371 _ACEOF
8372 if { (eval echo "$as_me:8372: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8373   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8374   ac_status=$?
8375   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8376   rm -f conftest.er1
8377   cat conftest.err >&5
8378   echo "$as_me:8378: \$? = $ac_status" >&5
8379   (exit "$ac_status"); } >/dev/null; then
8380   if test -s conftest.err; then
8381     ac_cpp_err=$ac_c_preproc_warn_flag
8382   else
8383     ac_cpp_err=
8384   fi
8385 else
8386   ac_cpp_err=yes
8387 fi
8388 if test -z "$ac_cpp_err"; then
8389   eval "$as_ac_Header=yes"
8390 else
8391   echo "$as_me: failed program was:" >&5
8392   cat "conftest.$ac_ext" >&5
8393   eval "$as_ac_Header=no"
8394 fi
8395 rm -f conftest.err "conftest.$ac_ext"
8396 fi
8397 echo "$as_me:8397: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8398 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8399 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8400   cat >>confdefs.h <<EOF
8401 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8402 EOF
8403
8404 fi
8405 done
8406
8407 for ac_func in PCRE2regcomp
8408 do
8409 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8410 echo "$as_me:8410: checking for $ac_func" >&5
8411 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8412 if eval "test \"\${$as_ac_var+set}\" = set"; then
8413   echo $ECHO_N "(cached) $ECHO_C" >&6
8414 else
8415   cat >"conftest.$ac_ext" <<_ACEOF
8416 #line 8416 "configure"
8417 #include "confdefs.h"
8418 #define $ac_func autoconf_temporary
8419 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8420 #undef $ac_func
8421
8422 #ifdef __cplusplus
8423 extern "C"
8424 #endif
8425
8426 /* We use char because int might match the return type of a gcc2
8427    builtin and then its argument prototype would still apply.  */
8428 char $ac_func (void);
8429
8430 int
8431 main (void)
8432 {
8433
8434 /* The GNU C library defines stubs for functions which it implements
8435     to always fail with ENOSYS.  Some functions are actually named
8436     something starting with __ and the normal name is an alias.  */
8437 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8438 #error found stub for $ac_func
8439 #endif
8440
8441         return $ac_func ();
8442   ;
8443   return 0;
8444 }
8445 _ACEOF
8446 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8447 if { (eval echo "$as_me:8447: \"$ac_link\"") >&5
8448   (eval $ac_link) 2>&5
8449   ac_status=$?
8450   echo "$as_me:8450: \$? = $ac_status" >&5
8451   (exit "$ac_status"); } &&
8452          { ac_try='test -s "conftest$ac_exeext"'
8453   { (eval echo "$as_me:8453: \"$ac_try\"") >&5
8454   (eval $ac_try) 2>&5
8455   ac_status=$?
8456   echo "$as_me:8456: \$? = $ac_status" >&5
8457   (exit "$ac_status"); }; }; then
8458   eval "$as_ac_var=yes"
8459 else
8460   echo "$as_me: failed program was:" >&5
8461 cat "conftest.$ac_ext" >&5
8462 eval "$as_ac_var=no"
8463 fi
8464 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8465 fi
8466 echo "$as_me:8466: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8467 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8468 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8469   cat >>confdefs.h <<EOF
8470 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8471 EOF
8472
8473 fi
8474 done
8475
8476 fi
8477
8478 # not everyone has "test -c"
8479 if test -c /dev/sysmouse 2>/dev/null ; then
8480 echo "$as_me:8480: checking if you want to use sysmouse" >&5
8481 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8482
8483 # Check whether --with-sysmouse or --without-sysmouse was given.
8484 if test "${with_sysmouse+set}" = set; then
8485   withval="$with_sysmouse"
8486   cf_with_sysmouse=$withval
8487 else
8488   cf_with_sysmouse=maybe
8489 fi;
8490         if test "$cf_with_sysmouse" != no ; then
8491         cat >"conftest.$ac_ext" <<_ACEOF
8492 #line 8492 "configure"
8493 #include "confdefs.h"
8494
8495 #include <osreldate.h>
8496 #if (__FreeBSD_version >= 400017)
8497 #include <sys/consio.h>
8498 #include <sys/fbio.h>
8499 #else
8500 #include <machine/console.h>
8501 #endif
8502
8503 int
8504 main (void)
8505 {
8506
8507         struct mouse_info the_mouse;
8508         ioctl(0, CONS_MOUSECTL, &the_mouse);
8509
8510   ;
8511   return 0;
8512 }
8513 _ACEOF
8514 rm -f "conftest.$ac_objext"
8515 if { (eval echo "$as_me:8515: \"$ac_compile\"") >&5
8516   (eval $ac_compile) 2>&5
8517   ac_status=$?
8518   echo "$as_me:8518: \$? = $ac_status" >&5
8519   (exit "$ac_status"); } &&
8520          { ac_try='test -s "conftest.$ac_objext"'
8521   { (eval echo "$as_me:8521: \"$ac_try\"") >&5
8522   (eval $ac_try) 2>&5
8523   ac_status=$?
8524   echo "$as_me:8524: \$? = $ac_status" >&5
8525   (exit "$ac_status"); }; }; then
8526   cf_with_sysmouse=yes
8527 else
8528   echo "$as_me: failed program was:" >&5
8529 cat "conftest.$ac_ext" >&5
8530 cf_with_sysmouse=no
8531 fi
8532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8533         fi
8534 echo "$as_me:8534: result: $cf_with_sysmouse" >&5
8535 echo "${ECHO_T}$cf_with_sysmouse" >&6
8536 test "$cf_with_sysmouse" = yes &&
8537 cat >>confdefs.h <<\EOF
8538 #define USE_SYSMOUSE 1
8539 EOF
8540
8541 fi
8542
8543 # pretend that ncurses==ncursesw==ncursest
8544 echo "$as_me:8544: checking if you want to disable library suffixes" >&5
8545 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8546
8547 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8548 if test "${enable_lib_suffixes+set}" = set; then
8549   enableval="$enable_lib_suffixes"
8550   test "$enableval" != no && enableval=yes
8551         if test "$enableval" != "yes" ; then
8552     disable_lib_suffixes=yes
8553         else
8554                 disable_lib_suffixes=no
8555         fi
8556 else
8557   enableval=yes
8558         disable_lib_suffixes=no
8559
8560 fi;
8561 echo "$as_me:8561: result: $disable_lib_suffixes" >&5
8562 echo "${ECHO_T}$disable_lib_suffixes" >&6
8563
8564 ### If we're building with rpath, try to link non-standard libs that way too.
8565 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8566
8567 echo "$as_me:8567: checking if rpath-hack should be disabled" >&5
8568 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8569
8570 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8571 if test "${enable_rpath_hack+set}" = set; then
8572   enableval="$enable_rpath_hack"
8573   test "$enableval" != no && enableval=yes
8574         if test "$enableval" != "yes" ; then
8575     enable_rpath_hack=no
8576         else
8577                 enable_rpath_hack=yes
8578         fi
8579 else
8580   enableval=yes
8581         enable_rpath_hack=yes
8582
8583 fi;
8584 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8585 echo "$as_me:8585: result: $cf_disable_rpath_hack" >&5
8586 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8587
8588 if test "$enable_rpath_hack" = yes ; then
8589
8590 echo "$as_me:8590: checking for updated LDFLAGS" >&5
8591 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8592 if test -n "$LD_RPATH_OPT" ; then
8593         echo "$as_me:8593: result: maybe" >&5
8594 echo "${ECHO_T}maybe" >&6
8595
8596         for ac_prog in ldd
8597 do
8598   # Extract the first word of "$ac_prog", so it can be a program name with args.
8599 set dummy $ac_prog; ac_word=$2
8600 echo "$as_me:8600: checking for $ac_word" >&5
8601 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8602 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8603   echo $ECHO_N "(cached) $ECHO_C" >&6
8604 else
8605   if test -n "$cf_ldd_prog"; then
8606   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8607 else
8608   ac_save_IFS=$IFS; IFS=$ac_path_separator
8609 ac_dummy="$PATH"
8610 for ac_dir in $ac_dummy; do
8611   IFS=$ac_save_IFS
8612   test -z "$ac_dir" && ac_dir=.
8613   $as_executable_p "$ac_dir/$ac_word" || continue
8614 ac_cv_prog_cf_ldd_prog="$ac_prog"
8615 echo "$as_me:8615: found $ac_dir/$ac_word" >&5
8616 break
8617 done
8618
8619 fi
8620 fi
8621 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8622 if test -n "$cf_ldd_prog"; then
8623   echo "$as_me:8623: result: $cf_ldd_prog" >&5
8624 echo "${ECHO_T}$cf_ldd_prog" >&6
8625 else
8626   echo "$as_me:8626: result: no" >&5
8627 echo "${ECHO_T}no" >&6
8628 fi
8629
8630   test -n "$cf_ldd_prog" && break
8631 done
8632 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8633
8634         cf_rpath_list="/usr/lib /lib"
8635         if test "$cf_ldd_prog" != no
8636         then
8637                 cf_rpath_oops=
8638
8639 cat >"conftest.$ac_ext" <<_ACEOF
8640 #line 8640 "configure"
8641 #include "confdefs.h"
8642 #include <stdio.h>
8643 int
8644 main (void)
8645 {
8646 printf("Hello");
8647   ;
8648   return 0;
8649 }
8650 _ACEOF
8651 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8652 if { (eval echo "$as_me:8652: \"$ac_link\"") >&5
8653   (eval $ac_link) 2>&5
8654   ac_status=$?
8655   echo "$as_me:8655: \$? = $ac_status" >&5
8656   (exit "$ac_status"); } &&
8657          { ac_try='test -s "conftest$ac_exeext"'
8658   { (eval echo "$as_me:8658: \"$ac_try\"") >&5
8659   (eval $ac_try) 2>&5
8660   ac_status=$?
8661   echo "$as_me:8661: \$? = $ac_status" >&5
8662   (exit "$ac_status"); }; }; then
8663   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8664                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8665 else
8666   echo "$as_me: failed program was:" >&5
8667 cat "conftest.$ac_ext" >&5
8668 fi
8669 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8670
8671                 # If we passed the link-test, but get a "not found" on a given library,
8672                 # this could be due to inept reconfiguration of gcc to make it only
8673                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8674                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8675                 # /usr/local libraries.
8676                 if test -n "$cf_rpath_oops"
8677                 then
8678                         for cf_rpath_src in $cf_rpath_oops
8679                         do
8680                                 for cf_rpath_dir in \
8681                                         /usr/local \
8682                                         /usr/pkg \
8683                                         /opt/sfw
8684                                 do
8685                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8686                                         then
8687                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8688
8689 echo "${as_me:-configure}:8689: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8690
8691                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8692                                                 break
8693                                         fi
8694                                 done
8695                         done
8696                 fi
8697         fi
8698
8699         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8700
8701 echo "${as_me:-configure}:8701: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8702
8703 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8704
8705 echo "${as_me:-configure}:8705: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8706
8707 cf_rpath_dst=
8708 for cf_rpath_src in $LDFLAGS
8709 do
8710         case "$cf_rpath_src" in
8711         (-L*)
8712
8713                 # check if this refers to a directory which we will ignore
8714                 cf_rpath_skip=no
8715                 if test -n "$cf_rpath_list"
8716                 then
8717                         for cf_rpath_item in $cf_rpath_list
8718                         do
8719                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8720                                 then
8721                                         cf_rpath_skip=yes
8722                                         break
8723                                 fi
8724                         done
8725                 fi
8726
8727                 if test "$cf_rpath_skip" = no
8728                 then
8729                         # transform the option
8730                         if test "$LD_RPATH_OPT" = "-R " ; then
8731                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8732                         else
8733                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8734                         fi
8735
8736                         # if we have not already added this, add it now
8737                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8738                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8739                         then
8740                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8741
8742 echo "${as_me:-configure}:8742: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8743
8744                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8745                         fi
8746                 fi
8747                 ;;
8748         esac
8749         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8750 done
8751 LDFLAGS=$cf_rpath_dst
8752
8753 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8754
8755 echo "${as_me:-configure}:8755: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8756
8757 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8758
8759 echo "${as_me:-configure}:8759: testing ...checking LIBS $LIBS ..." 1>&5
8760
8761 cf_rpath_dst=
8762 for cf_rpath_src in $LIBS
8763 do
8764         case "$cf_rpath_src" in
8765         (-L*)
8766
8767                 # check if this refers to a directory which we will ignore
8768                 cf_rpath_skip=no
8769                 if test -n "$cf_rpath_list"
8770                 then
8771                         for cf_rpath_item in $cf_rpath_list
8772                         do
8773                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8774                                 then
8775                                         cf_rpath_skip=yes
8776                                         break
8777                                 fi
8778                         done
8779                 fi
8780
8781                 if test "$cf_rpath_skip" = no
8782                 then
8783                         # transform the option
8784                         if test "$LD_RPATH_OPT" = "-R " ; then
8785                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8786                         else
8787                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8788                         fi
8789
8790                         # if we have not already added this, add it now
8791                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8792                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8793                         then
8794                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8795
8796 echo "${as_me:-configure}:8796: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8797
8798                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8799                         fi
8800                 fi
8801                 ;;
8802         esac
8803         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8804 done
8805 LIBS=$cf_rpath_dst
8806
8807 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8808
8809 echo "${as_me:-configure}:8809: testing ...checked LIBS $LIBS ..." 1>&5
8810
8811         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8812
8813 echo "${as_me:-configure}:8813: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8814
8815 else
8816         echo "$as_me:8816: result: no" >&5
8817 echo "${ECHO_T}no" >&6
8818 fi
8819
8820 fi
8821
8822 fi
8823
8824 ### Depending on the system, someone may use rpath to build ncurses but not
8825 # want users of the package to rely upon that feature.  Give those people an
8826 # option to suppress that detail from EXTRA_LDFLAGS.
8827 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8828 if test -n "$EXTRA_PKG_LDFLAGS"
8829 then
8830         echo "$as_me:8830: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8831 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8832
8833 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8834 if test "${enable_pkg_ldflags+set}" = set; then
8835   enableval="$enable_pkg_ldflags"
8836   test "$enableval" != no && enableval=yes
8837         if test "$enableval" != "yes" ; then
8838     disable_pkg_ldflags=yes
8839         else
8840                 disable_pkg_ldflags=no
8841         fi
8842 else
8843   enableval=yes
8844         disable_pkg_ldflags=no
8845
8846 fi;
8847         echo "$as_me:8847: result: $disable_pkg_ldflags" >&5
8848 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8849         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8850 fi
8851
8852 ###############################################################################
8853
8854 ###     use option --with-extra-suffix to append suffix to headers and libraries
8855 echo "$as_me:8855: checking if you wish to append extra suffix to header/library paths" >&5
8856 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8857 EXTRA_SUFFIX=
8858
8859 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8860 if test "${with_extra_suffix+set}" = set; then
8861   withval="$with_extra_suffix"
8862   case x$withval in
8863         (xno)
8864                 ;;
8865         (xyes|x)
8866                 EXTRA_SUFFIX=$cf_cv_abi_version
8867                 ;;
8868         (*)
8869                 EXTRA_SUFFIX=$withval
8870                 ;;
8871         esac
8872
8873 fi;
8874 echo "$as_me:8874: result: $EXTRA_SUFFIX" >&5
8875 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8876
8877 ###     use option --disable-overwrite to leave out the link to -lcurses
8878 echo "$as_me:8878: checking if you wish to install ncurses overwriting curses" >&5
8879 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8880
8881 # Check whether --enable-overwrite or --disable-overwrite was given.
8882 if test "${enable_overwrite+set}" = set; then
8883   enableval="$enable_overwrite"
8884   with_overwrite=$enableval
8885 else
8886   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8887 fi;
8888 echo "$as_me:8888: result: $with_overwrite" >&5
8889 echo "${ECHO_T}$with_overwrite" >&6
8890
8891 echo "$as_me:8891: checking if external terminfo-database is used" >&5
8892 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8893
8894 # Check whether --enable-database or --disable-database was given.
8895 if test "${enable_database+set}" = set; then
8896   enableval="$enable_database"
8897   use_database=$enableval
8898 else
8899   use_database=yes
8900 fi;
8901 echo "$as_me:8901: result: $use_database" >&5
8902 echo "${ECHO_T}$use_database" >&6
8903
8904 case "$host_os" in
8905 (os2*)
8906         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8907         ;;
8908 (*)
8909         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8910         ;;
8911 esac
8912
8913 NCURSES_USE_DATABASE=0
8914 if test "$use_database" != no ; then
8915         NCURSES_USE_DATABASE=1
8916
8917         echo "$as_me:8917: checking which terminfo source-file will be installed" >&5
8918 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8919
8920 # Check whether --with-database or --without-database was given.
8921 if test "${with_database+set}" = set; then
8922   withval="$with_database"
8923   TERMINFO_SRC=$withval
8924 fi;
8925         echo "$as_me:8925: result: $TERMINFO_SRC" >&5
8926 echo "${ECHO_T}$TERMINFO_SRC" >&6
8927
8928         echo "$as_me:8928: checking whether to use hashed database instead of directory/tree" >&5
8929 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8930
8931 # Check whether --with-hashed-db or --without-hashed-db was given.
8932 if test "${with_hashed_db+set}" = set; then
8933   withval="$with_hashed_db"
8934
8935 else
8936   with_hashed_db=no
8937 fi;
8938         echo "$as_me:8938: result: $with_hashed_db" >&5
8939 echo "${ECHO_T}$with_hashed_db" >&6
8940 else
8941         with_hashed_db=no
8942 fi
8943
8944 echo "$as_me:8944: checking for list of fallback descriptions" >&5
8945 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8946
8947 # Check whether --with-fallbacks or --without-fallbacks was given.
8948 if test "${with_fallbacks+set}" = set; then
8949   withval="$with_fallbacks"
8950   with_fallback=$withval
8951 else
8952   with_fallback=
8953 fi;
8954 echo "$as_me:8954: result: $with_fallback" >&5
8955 echo "${ECHO_T}$with_fallback" >&6
8956
8957 case ".$with_fallback" in
8958 (.|.no)
8959         FALLBACK_LIST=
8960         ;;
8961 (.yes)
8962         { echo "$as_me:8962: WARNING: expected a list of terminal descriptions" >&5
8963 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8964         ;;
8965 (*)
8966         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8967         ;;
8968 esac
8969
8970 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8971 # tree for generating the terminal descriptions that will be compiled into the
8972 # library.  If your toolchain is old, it may not handle current terminal
8973 # databases.  Use configure-options to point to the tools which will be used,
8974 # rather than the first ones found on the $PATH.
8975 if test -n "$ac_tool_prefix"; then
8976   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8977 set dummy ${ac_tool_prefix}tic; ac_word=$2
8978 echo "$as_me:8978: checking for $ac_word" >&5
8979 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8980 if test "${ac_cv_prog_TIC+set}" = set; then
8981   echo $ECHO_N "(cached) $ECHO_C" >&6
8982 else
8983   if test -n "$TIC"; then
8984   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8985 else
8986   ac_save_IFS=$IFS; IFS=$ac_path_separator
8987 ac_dummy="$PATH"
8988 for ac_dir in $ac_dummy; do
8989   IFS=$ac_save_IFS
8990   test -z "$ac_dir" && ac_dir=.
8991   $as_executable_p "$ac_dir/$ac_word" || continue
8992 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8993 echo "$as_me:8993: found $ac_dir/$ac_word" >&5
8994 break
8995 done
8996
8997 fi
8998 fi
8999 TIC=$ac_cv_prog_TIC
9000 if test -n "$TIC"; then
9001   echo "$as_me:9001: result: $TIC" >&5
9002 echo "${ECHO_T}$TIC" >&6
9003 else
9004   echo "$as_me:9004: result: no" >&5
9005 echo "${ECHO_T}no" >&6
9006 fi
9007
9008 fi
9009 if test -z "$ac_cv_prog_TIC"; then
9010   ac_ct_TIC=$TIC
9011   # Extract the first word of "tic", so it can be a program name with args.
9012 set dummy tic; ac_word=$2
9013 echo "$as_me:9013: checking for $ac_word" >&5
9014 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9015 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9016   echo $ECHO_N "(cached) $ECHO_C" >&6
9017 else
9018   if test -n "$ac_ct_TIC"; then
9019   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9020 else
9021   ac_save_IFS=$IFS; IFS=$ac_path_separator
9022 ac_dummy="$PATH"
9023 for ac_dir in $ac_dummy; do
9024   IFS=$ac_save_IFS
9025   test -z "$ac_dir" && ac_dir=.
9026   $as_executable_p "$ac_dir/$ac_word" || continue
9027 ac_cv_prog_ac_ct_TIC="tic"
9028 echo "$as_me:9028: found $ac_dir/$ac_word" >&5
9029 break
9030 done
9031
9032 fi
9033 fi
9034 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9035 if test -n "$ac_ct_TIC"; then
9036   echo "$as_me:9036: result: $ac_ct_TIC" >&5
9037 echo "${ECHO_T}$ac_ct_TIC" >&6
9038 else
9039   echo "$as_me:9039: result: no" >&5
9040 echo "${ECHO_T}no" >&6
9041 fi
9042
9043   TIC=$ac_ct_TIC
9044 else
9045   TIC="$ac_cv_prog_TIC"
9046 fi
9047
9048 if test -n "$ac_tool_prefix"; then
9049   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9050 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9051 echo "$as_me:9051: checking for $ac_word" >&5
9052 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9053 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9054   echo $ECHO_N "(cached) $ECHO_C" >&6
9055 else
9056   if test -n "$INFOCMP"; then
9057   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9058 else
9059   ac_save_IFS=$IFS; IFS=$ac_path_separator
9060 ac_dummy="$PATH"
9061 for ac_dir in $ac_dummy; do
9062   IFS=$ac_save_IFS
9063   test -z "$ac_dir" && ac_dir=.
9064   $as_executable_p "$ac_dir/$ac_word" || continue
9065 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9066 echo "$as_me:9066: found $ac_dir/$ac_word" >&5
9067 break
9068 done
9069
9070 fi
9071 fi
9072 INFOCMP=$ac_cv_prog_INFOCMP
9073 if test -n "$INFOCMP"; then
9074   echo "$as_me:9074: result: $INFOCMP" >&5
9075 echo "${ECHO_T}$INFOCMP" >&6
9076 else
9077   echo "$as_me:9077: result: no" >&5
9078 echo "${ECHO_T}no" >&6
9079 fi
9080
9081 fi
9082 if test -z "$ac_cv_prog_INFOCMP"; then
9083   ac_ct_INFOCMP=$INFOCMP
9084   # Extract the first word of "infocmp", so it can be a program name with args.
9085 set dummy infocmp; ac_word=$2
9086 echo "$as_me:9086: checking for $ac_word" >&5
9087 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9088 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9089   echo $ECHO_N "(cached) $ECHO_C" >&6
9090 else
9091   if test -n "$ac_ct_INFOCMP"; then
9092   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9093 else
9094   ac_save_IFS=$IFS; IFS=$ac_path_separator
9095 ac_dummy="$PATH"
9096 for ac_dir in $ac_dummy; do
9097   IFS=$ac_save_IFS
9098   test -z "$ac_dir" && ac_dir=.
9099   $as_executable_p "$ac_dir/$ac_word" || continue
9100 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9101 echo "$as_me:9101: found $ac_dir/$ac_word" >&5
9102 break
9103 done
9104
9105 fi
9106 fi
9107 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9108 if test -n "$ac_ct_INFOCMP"; then
9109   echo "$as_me:9109: result: $ac_ct_INFOCMP" >&5
9110 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9111 else
9112   echo "$as_me:9112: result: no" >&5
9113 echo "${ECHO_T}no" >&6
9114 fi
9115
9116   INFOCMP=$ac_ct_INFOCMP
9117 else
9118   INFOCMP="$ac_cv_prog_INFOCMP"
9119 fi
9120
9121 if test -n "$FALLBACK_LIST"
9122 then
9123
9124 # Check whether --with-tic-path or --without-tic-path was given.
9125 if test "${with_tic_path+set}" = set; then
9126   withval="$with_tic_path"
9127   echo "$as_me:9127: checking for tic program for fallbacks" >&5
9128 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9129                 TIC=$withval
9130                 echo "$as_me:9130: result: $TIC" >&5
9131 echo "${ECHO_T}$TIC" >&6
9132
9133 if test "x$prefix" != xNONE; then
9134         cf_path_syntax="$prefix"
9135 else
9136         cf_path_syntax="$ac_default_prefix"
9137 fi
9138
9139 case ".$TIC" in
9140 (.\$\(*\)*|.\'*\'*)
9141         ;;
9142 (..|./*|.\\*)
9143         ;;
9144 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9145         ;;
9146 (.\$\{*prefix\}*|.\$\{*dir\}*)
9147         eval TIC="$TIC"
9148         case ".$TIC" in
9149         (.NONE/*)
9150                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9151                 ;;
9152         esac
9153         ;;
9154 (.no|.NONE/*)
9155         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9156         ;;
9157 (*)
9158         { { echo "$as_me:9158: error: expected a pathname, not \"$TIC\"" >&5
9159 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9160    { (exit 1); exit 1; }; }
9161         ;;
9162 esac
9163
9164 else
9165
9166 test -z "$TIC" && TIC="tic"
9167 for ac_prog in $TIC tic
9168 do
9169   # Extract the first word of "$ac_prog", so it can be a program name with args.
9170 set dummy $ac_prog; ac_word=$2
9171 echo "$as_me:9171: checking for $ac_word" >&5
9172 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9173 if test "${ac_cv_path_TIC+set}" = set; then
9174   echo $ECHO_N "(cached) $ECHO_C" >&6
9175 else
9176   case $TIC in
9177   [\\/]* | ?:[\\/]*)
9178   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9179   ;;
9180   *)
9181   ac_save_IFS=$IFS; IFS=$ac_path_separator
9182 ac_dummy="$PATH:/usr/local/ncurses/bin"
9183 for ac_dir in $ac_dummy; do
9184   IFS=$ac_save_IFS
9185   test -z "$ac_dir" && ac_dir=.
9186   if $as_executable_p "$ac_dir/$ac_word"; then
9187    ac_cv_path_TIC="$ac_dir/$ac_word"
9188    echo "$as_me:9188: found $ac_dir/$ac_word" >&5
9189    break
9190 fi
9191 done
9192
9193   ;;
9194 esac
9195 fi
9196 TIC=$ac_cv_path_TIC
9197
9198 if test -n "$TIC"; then
9199   echo "$as_me:9199: result: $TIC" >&5
9200 echo "${ECHO_T}$TIC" >&6
9201 else
9202   echo "$as_me:9202: result: no" >&5
9203 echo "${ECHO_T}no" >&6
9204 fi
9205
9206   test -n "$TIC" && break
9207 done
9208 test -n "$TIC" || TIC="$TIC"
9209
9210 cf_path_prog=""
9211 cf_path_args=""
9212 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9213 for cf_temp in $ac_cv_path_TIC
9214 do
9215         if test -z "$cf_path_prog" ; then
9216                 if test "$with_full_paths" = yes ; then
9217
9218 if test "x$prefix" != xNONE; then
9219         cf_path_syntax="$prefix"
9220 else
9221         cf_path_syntax="$ac_default_prefix"
9222 fi
9223
9224 case ".$cf_temp" in
9225 (.\$\(*\)*|.\'*\'*)
9226         ;;
9227 (..|./*|.\\*)
9228         ;;
9229 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9230         ;;
9231 (.\$\{*prefix\}*|.\$\{*dir\}*)
9232         eval cf_temp="$cf_temp"
9233         case ".$cf_temp" in
9234         (.NONE/*)
9235                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9236                 ;;
9237         esac
9238         ;;
9239 (.no|.NONE/*)
9240         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9241         ;;
9242 (*)
9243         break
9244         ;;
9245 esac
9246
9247                         cf_path_prog="$cf_temp"
9248                 else
9249                         cf_path_prog="`basename "$cf_temp"`"
9250                 fi
9251         elif test -z "$cf_path_args" ; then
9252                 cf_path_args="$cf_temp"
9253         else
9254                 cf_path_args="$cf_path_args $cf_temp"
9255         fi
9256 done
9257 IFS="$cf_save_ifs"
9258
9259 if test -n "$cf_path_prog" ; then
9260
9261 echo "${as_me:-configure}:9261: testing defining path for ${cf_path_prog} ..." 1>&5
9262
9263 cat >>confdefs.h <<EOF
9264 #define TIC_PATH "$cf_path_prog"
9265 EOF
9266
9267         test -n "$cf_path_args" &&
9268 cat >>confdefs.h <<EOF
9269 #define TIC_ARGS "$cf_path_args"
9270 EOF
9271
9272 fi
9273
9274                 if test -z "$TIC"
9275                 then
9276                         { echo "$as_me:9276: WARNING: no tic program found for fallbacks" >&5
9277 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9278                 fi
9279
9280 fi;
9281
9282 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9283 if test "${with_infocmp_path+set}" = set; then
9284   withval="$with_infocmp_path"
9285   echo "$as_me:9285: checking for infocmp program for fallbacks" >&5
9286 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9287                 INFOCMP=$withval
9288                 echo "$as_me:9288: result: $INFOCMP" >&5
9289 echo "${ECHO_T}$INFOCMP" >&6
9290
9291 if test "x$prefix" != xNONE; then
9292         cf_path_syntax="$prefix"
9293 else
9294         cf_path_syntax="$ac_default_prefix"
9295 fi
9296
9297 case ".$INFOCMP" in
9298 (.\$\(*\)*|.\'*\'*)
9299         ;;
9300 (..|./*|.\\*)
9301         ;;
9302 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9303         ;;
9304 (.\$\{*prefix\}*|.\$\{*dir\}*)
9305         eval INFOCMP="$INFOCMP"
9306         case ".$INFOCMP" in
9307         (.NONE/*)
9308                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9309                 ;;
9310         esac
9311         ;;
9312 (.no|.NONE/*)
9313         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9314         ;;
9315 (*)
9316         { { echo "$as_me:9316: error: expected a pathname, not \"$INFOCMP\"" >&5
9317 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9318    { (exit 1); exit 1; }; }
9319         ;;
9320 esac
9321
9322 else
9323
9324 test -z "$INFOCMP" && INFOCMP="infocmp"
9325 for ac_prog in $INFOCMP infocmp
9326 do
9327   # Extract the first word of "$ac_prog", so it can be a program name with args.
9328 set dummy $ac_prog; ac_word=$2
9329 echo "$as_me:9329: checking for $ac_word" >&5
9330 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9331 if test "${ac_cv_path_INFOCMP+set}" = set; then
9332   echo $ECHO_N "(cached) $ECHO_C" >&6
9333 else
9334   case $INFOCMP in
9335   [\\/]* | ?:[\\/]*)
9336   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9337   ;;
9338   *)
9339   ac_save_IFS=$IFS; IFS=$ac_path_separator
9340 ac_dummy="$PATH:/usr/local/ncurses/bin"
9341 for ac_dir in $ac_dummy; do
9342   IFS=$ac_save_IFS
9343   test -z "$ac_dir" && ac_dir=.
9344   if $as_executable_p "$ac_dir/$ac_word"; then
9345    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9346    echo "$as_me:9346: found $ac_dir/$ac_word" >&5
9347    break
9348 fi
9349 done
9350
9351   ;;
9352 esac
9353 fi
9354 INFOCMP=$ac_cv_path_INFOCMP
9355
9356 if test -n "$INFOCMP"; then
9357   echo "$as_me:9357: result: $INFOCMP" >&5
9358 echo "${ECHO_T}$INFOCMP" >&6
9359 else
9360   echo "$as_me:9360: result: no" >&5
9361 echo "${ECHO_T}no" >&6
9362 fi
9363
9364   test -n "$INFOCMP" && break
9365 done
9366 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9367
9368 cf_path_prog=""
9369 cf_path_args=""
9370 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9371 for cf_temp in $ac_cv_path_INFOCMP
9372 do
9373         if test -z "$cf_path_prog" ; then
9374                 if test "$with_full_paths" = yes ; then
9375
9376 if test "x$prefix" != xNONE; then
9377         cf_path_syntax="$prefix"
9378 else
9379         cf_path_syntax="$ac_default_prefix"
9380 fi
9381
9382 case ".$cf_temp" in
9383 (.\$\(*\)*|.\'*\'*)
9384         ;;
9385 (..|./*|.\\*)
9386         ;;
9387 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9388         ;;
9389 (.\$\{*prefix\}*|.\$\{*dir\}*)
9390         eval cf_temp="$cf_temp"
9391         case ".$cf_temp" in
9392         (.NONE/*)
9393                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9394                 ;;
9395         esac
9396         ;;
9397 (.no|.NONE/*)
9398         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9399         ;;
9400 (*)
9401         break
9402         ;;
9403 esac
9404
9405                         cf_path_prog="$cf_temp"
9406                 else
9407                         cf_path_prog="`basename "$cf_temp"`"
9408                 fi
9409         elif test -z "$cf_path_args" ; then
9410                 cf_path_args="$cf_temp"
9411         else
9412                 cf_path_args="$cf_path_args $cf_temp"
9413         fi
9414 done
9415 IFS="$cf_save_ifs"
9416
9417 if test -n "$cf_path_prog" ; then
9418
9419 echo "${as_me:-configure}:9419: testing defining path for ${cf_path_prog} ..." 1>&5
9420
9421 cat >>confdefs.h <<EOF
9422 #define INFOCMP_PATH "$cf_path_prog"
9423 EOF
9424
9425         test -n "$cf_path_args" &&
9426 cat >>confdefs.h <<EOF
9427 #define INFOCMP_ARGS "$cf_path_args"
9428 EOF
9429
9430 fi
9431
9432                 if test -z "$INFOCMP"
9433                 then
9434                         { echo "$as_me:9434: WARNING: no infocmp program found for fallbacks" >&5
9435 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9436                 fi
9437
9438 fi;
9439
9440         test -z "$TIC" && FALLBACK_LIST=
9441         test -z "$INFOCMP" && FALLBACK_LIST=
9442         if test -z "$FALLBACK_LIST"
9443         then
9444                 { echo "$as_me:9444: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9445 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9446         fi
9447 fi
9448
9449 USE_FALLBACKS=
9450 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9451
9452 echo "$as_me:9452: checking if you want modern xterm or antique" >&5
9453 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9454
9455 # Check whether --with-xterm-new or --without-xterm-new was given.
9456 if test "${with_xterm_new+set}" = set; then
9457   withval="$with_xterm_new"
9458   with_xterm_new=$withval
9459 else
9460   with_xterm_new=yes
9461 fi;
9462 case "$with_xterm_new" in
9463 (no) with_xterm_new=xterm-old;;
9464 (*)      with_xterm_new=xterm-new;;
9465 esac
9466 echo "$as_me:9466: result: $with_xterm_new" >&5
9467 echo "${ECHO_T}$with_xterm_new" >&6
9468 WHICH_XTERM=$with_xterm_new
9469
9470 case $host_os in
9471 (*linux-gnu|*cygwin|*mingw32|*msys)
9472         want_xterm_kbs=DEL
9473         ;;
9474 (*)
9475         want_xterm_kbs=BS
9476         ;;
9477 esac
9478
9479 echo "$as_me:9479: checking if xterm backspace sends BS or DEL" >&5
9480 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9481
9482 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9483 if test "${with_xterm_kbs+set}" = set; then
9484   withval="$with_xterm_kbs"
9485   with_xterm_kbs=$withval
9486 else
9487   with_xterm_kbs=auto
9488 fi;
9489 case x$with_xterm_kbs in
9490 (xyes|xno|xBS|xbs|x8)
9491         with_xterm_kbs=BS
9492         ;;
9493 (xDEL|xdel|x127)
9494         with_xterm_kbs=DEL
9495         ;;
9496 (xauto)
9497         with_xterm_kbs=$want_xterm_kbs
9498         ;;
9499 (*)
9500         with_xterm_kbs=$withval
9501         ;;
9502 esac
9503 echo "$as_me:9503: result: $with_xterm_kbs" >&5
9504 echo "${ECHO_T}$with_xterm_kbs" >&6
9505 XTERM_KBS=$with_xterm_kbs
9506
9507 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9508 then
9509         { echo "$as_me:9509: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9510 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9511 fi
9512
9513 MAKE_TERMINFO=
9514 if test "$use_database" = no ; then
9515         TERMINFO="${datadir}/terminfo"
9516         MAKE_TERMINFO="#"
9517 else
9518
9519 echo "$as_me:9519: checking for list of terminfo directories" >&5
9520 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9521
9522 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9523 if test "${with_terminfo_dirs+set}" = set; then
9524   withval="$with_terminfo_dirs"
9525
9526 else
9527   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9528 fi;
9529 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9530 cf_dst_path=
9531 for cf_src_path in $withval
9532 do
9533
9534 if test "x$prefix" != xNONE; then
9535         cf_path_syntax="$prefix"
9536 else
9537         cf_path_syntax="$ac_default_prefix"
9538 fi
9539
9540 case ".$cf_src_path" in
9541 (.\$\(*\)*|.\'*\'*)
9542         ;;
9543 (..|./*|.\\*)
9544         ;;
9545 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9546         ;;
9547 (.\$\{*prefix\}*|.\$\{*dir\}*)
9548         eval cf_src_path="$cf_src_path"
9549         case ".$cf_src_path" in
9550         (.NONE/*)
9551                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9552                 ;;
9553         esac
9554         ;;
9555 (.no|.NONE/*)
9556         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9557         ;;
9558 (*)
9559         { { echo "$as_me:9559: error: expected a pathname, not \"$cf_src_path\"" >&5
9560 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9561    { (exit 1); exit 1; }; }
9562         ;;
9563 esac
9564
9565   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9566   cf_dst_path="${cf_dst_path}${cf_src_path}"
9567 done
9568 IFS="$ac_save_ifs"
9569
9570 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9571 # so we have to check/work around.  We do prefer the result of "eval"...
9572 eval cf_dst_eval="$cf_dst_path"
9573 case "x$cf_dst_eval" in
9574 (xNONE*)
9575         TERMINFO_DIRS=$cf_dst_path
9576         ;;
9577 (*)
9578         TERMINFO_DIRS="$cf_dst_eval"
9579         ;;
9580 esac
9581
9582 echo "$as_me:9582: result: $TERMINFO_DIRS" >&5
9583 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9584 test -n "$TERMINFO_DIRS" &&
9585 cat >>confdefs.h <<EOF
9586 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9587 EOF
9588
9589 case "x$TERMINFO" in
9590 x???:*)
9591         { echo "$as_me:9591: WARNING: ignoring non-directory/file TERMINFO value" >&5
9592 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9593         unset TERMINFO
9594         ;;
9595 esac
9596
9597 echo "$as_me:9597: checking for default terminfo directory" >&5
9598 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9599
9600 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9601 if test "${with_default_terminfo_dir+set}" = set; then
9602   withval="$with_default_terminfo_dir"
9603
9604 else
9605   withval="${TERMINFO:-${datadir}/terminfo}"
9606 fi; if test -n "${datadir}/terminfo" ; then
9607
9608 if test "x$prefix" != xNONE; then
9609         cf_path_syntax="$prefix"
9610 else
9611         cf_path_syntax="$ac_default_prefix"
9612 fi
9613
9614 case ".$withval" in
9615 (.\$\(*\)*|.\'*\'*)
9616         ;;
9617 (..|./*|.\\*)
9618         ;;
9619 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9620         ;;
9621 (.\$\{*prefix\}*|.\$\{*dir\}*)
9622         eval withval="$withval"
9623         case ".$withval" in
9624         (.NONE/*)
9625                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9626                 ;;
9627         esac
9628         ;;
9629 (.no|.NONE/*)
9630         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9631         ;;
9632 (*)
9633         { { echo "$as_me:9633: error: expected a pathname, not \"$withval\"" >&5
9634 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9635    { (exit 1); exit 1; }; }
9636         ;;
9637 esac
9638
9639 fi
9640 eval TERMINFO="$withval"
9641
9642 echo "$as_me:9642: result: $TERMINFO" >&5
9643 echo "${ECHO_T}$TERMINFO" >&6
9644
9645 cat >>confdefs.h <<EOF
9646 #define TERMINFO "$TERMINFO"
9647 EOF
9648
9649 fi
9650
9651 ###     use option --disable-big-core to make tic run on small machines
9652 ###     We need 4Mb, check if we can allocate 50% more than that.
9653 echo "$as_me:9653: checking if big-core option selected" >&5
9654 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9655
9656 # Check whether --enable-big-core or --disable-big-core was given.
9657 if test "${enable_big_core+set}" = set; then
9658   enableval="$enable_big_core"
9659   with_big_core=$enableval
9660 else
9661   if test "$cross_compiling" = yes; then
9662   with_big_core=no
9663 else
9664   cat >"conftest.$ac_ext" <<_ACEOF
9665 #line 9665 "configure"
9666 #include "confdefs.h"
9667
9668 #include <stdlib.h>
9669 #include <string.h>
9670 int main() {
9671         unsigned long n = 6000000L;
9672         char *s = malloc(n);
9673         if (s != 0)
9674                 s[0] = s[n-1] = 0;
9675         ${cf_cv_main_return:-return}(s == 0);
9676 }
9677 _ACEOF
9678 rm -f "conftest$ac_exeext"
9679 if { (eval echo "$as_me:9679: \"$ac_link\"") >&5
9680   (eval $ac_link) 2>&5
9681   ac_status=$?
9682   echo "$as_me:9682: \$? = $ac_status" >&5
9683   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9684   { (eval echo "$as_me:9684: \"$ac_try\"") >&5
9685   (eval $ac_try) 2>&5
9686   ac_status=$?
9687   echo "$as_me:9687: \$? = $ac_status" >&5
9688   (exit "$ac_status"); }; }; then
9689   with_big_core=yes
9690 else
9691   echo "$as_me: program exited with status $ac_status" >&5
9692 echo "$as_me: failed program was:" >&5
9693 cat "conftest.$ac_ext" >&5
9694 with_big_core=no
9695 fi
9696 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9697 fi
9698 fi;
9699 echo "$as_me:9699: result: $with_big_core" >&5
9700 echo "${ECHO_T}$with_big_core" >&6
9701 test "x$with_big_core" = "xyes" &&
9702 cat >>confdefs.h <<\EOF
9703 #define HAVE_BIG_CORE 1
9704 EOF
9705
9706 ### ISO C only guarantees 512-char strings, we have tables which load faster
9707 ### when constructed using "big" strings.  More than the C compiler, the awk
9708 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9709 echo "$as_me:9709: checking if big-strings option selected" >&5
9710 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9711
9712 # Check whether --enable-big-strings or --disable-big-strings was given.
9713 if test "${enable_big_strings+set}" = set; then
9714   enableval="$enable_big_strings"
9715   with_big_strings=$enableval
9716 else
9717
9718         case x$AWK in
9719         (x)
9720                 eval with_big_strings=no
9721                 ;;
9722         (*)
9723                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9724                         | $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
9725                         eval with_big_strings=yes
9726                 else
9727                         eval with_big_strings=no
9728                 fi
9729                 ;;
9730         esac
9731
9732 fi;
9733 echo "$as_me:9733: result: $with_big_strings" >&5
9734 echo "${ECHO_T}$with_big_strings" >&6
9735
9736 USE_BIG_STRINGS=0
9737 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9738
9739 ###     use option --enable-termcap to compile in the termcap fallback support
9740 echo "$as_me:9740: checking if you want termcap-fallback support" >&5
9741 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9742
9743 # Check whether --enable-termcap or --disable-termcap was given.
9744 if test "${enable_termcap+set}" = set; then
9745   enableval="$enable_termcap"
9746   with_termcap=$enableval
9747 else
9748   with_termcap=no
9749 fi;
9750 echo "$as_me:9750: result: $with_termcap" >&5
9751 echo "${ECHO_T}$with_termcap" >&6
9752
9753 NCURSES_USE_TERMCAP=0
9754 if test "x$with_termcap" != "xyes" ; then
9755         if test "$use_database" = no ; then
9756                 if test -z "$with_fallback" ; then
9757                         { { echo "$as_me:9757: error: You have disabled the database w/o specifying fallbacks" >&5
9758 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9759    { (exit 1); exit 1; }; }
9760                 fi
9761         fi
9762
9763 cat >>confdefs.h <<\EOF
9764 #define PURE_TERMINFO 1
9765 EOF
9766
9767 else
9768
9769         if test "$with_ticlib" != no ; then
9770                 { { echo "$as_me:9770: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9771 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9772    { (exit 1); exit 1; }; }
9773         fi
9774
9775         NCURSES_USE_TERMCAP=1
9776         echo "$as_me:9776: checking for list of termcap files" >&5
9777 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9778
9779 # Check whether --with-termpath or --without-termpath was given.
9780 if test "${with_termpath+set}" = set; then
9781   withval="$with_termpath"
9782
9783 else
9784   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9785 fi;
9786 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9787 cf_dst_path=
9788 for cf_src_path in $withval
9789 do
9790
9791 if test "x$prefix" != xNONE; then
9792         cf_path_syntax="$prefix"
9793 else
9794         cf_path_syntax="$ac_default_prefix"
9795 fi
9796
9797 case ".$cf_src_path" in
9798 (.\$\(*\)*|.\'*\'*)
9799         ;;
9800 (..|./*|.\\*)
9801         ;;
9802 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9803         ;;
9804 (.\$\{*prefix\}*|.\$\{*dir\}*)
9805         eval cf_src_path="$cf_src_path"
9806         case ".$cf_src_path" in
9807         (.NONE/*)
9808                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9809                 ;;
9810         esac
9811         ;;
9812 (.no|.NONE/*)
9813         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9814         ;;
9815 (*)
9816         { { echo "$as_me:9816: error: expected a pathname, not \"$cf_src_path\"" >&5
9817 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9818    { (exit 1); exit 1; }; }
9819         ;;
9820 esac
9821
9822   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9823   cf_dst_path="${cf_dst_path}${cf_src_path}"
9824 done
9825 IFS="$ac_save_ifs"
9826
9827 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9828 # so we have to check/work around.  We do prefer the result of "eval"...
9829 eval cf_dst_eval="$cf_dst_path"
9830 case "x$cf_dst_eval" in
9831 (xNONE*)
9832         TERMPATH=$cf_dst_path
9833         ;;
9834 (*)
9835         TERMPATH="$cf_dst_eval"
9836         ;;
9837 esac
9838
9839         echo "$as_me:9839: result: $TERMPATH" >&5
9840 echo "${ECHO_T}$TERMPATH" >&6
9841         test -n "$TERMPATH" &&
9842 cat >>confdefs.h <<EOF
9843 #define TERMPATH "$TERMPATH"
9844 EOF
9845
9846         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9847         echo "$as_me:9847: checking if fast termcap-loader is needed" >&5
9848 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9849
9850 # Check whether --enable-getcap or --disable-getcap was given.
9851 if test "${enable_getcap+set}" = set; then
9852   enableval="$enable_getcap"
9853   with_getcap=$enableval
9854 else
9855   with_getcap=no
9856 fi;
9857         echo "$as_me:9857: result: $with_getcap" >&5
9858 echo "${ECHO_T}$with_getcap" >&6
9859         test "x$with_getcap" = "xyes" &&
9860 cat >>confdefs.h <<\EOF
9861 #define USE_GETCAP 1
9862 EOF
9863
9864         echo "$as_me:9864: checking if translated termcaps will be cached in ~/.terminfo" >&5
9865 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9866
9867 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9868 if test "${enable_getcap_cache+set}" = set; then
9869   enableval="$enable_getcap_cache"
9870   with_getcap_cache=$enableval
9871 else
9872   with_getcap_cache=no
9873 fi;
9874         echo "$as_me:9874: result: $with_getcap_cache" >&5
9875 echo "${ECHO_T}$with_getcap_cache" >&6
9876         test "x$with_getcap_cache" = "xyes" &&
9877 cat >>confdefs.h <<\EOF
9878 #define USE_GETCAP_CACHE 1
9879 EOF
9880
9881 fi
9882
9883 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9884 echo "$as_me:9884: checking if ~/.terminfo is wanted" >&5
9885 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9886
9887 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9888 if test "${enable_home_terminfo+set}" = set; then
9889   enableval="$enable_home_terminfo"
9890   with_home_terminfo=$enableval
9891 else
9892   with_home_terminfo=yes
9893 fi;
9894 echo "$as_me:9894: result: $with_home_terminfo" >&5
9895 echo "${ECHO_T}$with_home_terminfo" >&6
9896 test "x$with_home_terminfo" = "xyes" &&
9897 cat >>confdefs.h <<\EOF
9898 #define USE_HOME_TERMINFO 1
9899 EOF
9900
9901 echo "$as_me:9901: checking if you want to permit root to use ncurses environment variables" >&5
9902 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9903
9904 # Check whether --enable-root-environ or --disable-root-environ was given.
9905 if test "${enable_root_environ+set}" = set; then
9906   enableval="$enable_root_environ"
9907   with_root_environ=$enableval
9908 else
9909   with_root_environ=yes
9910 fi;
9911 echo "$as_me:9911: result: $with_root_environ" >&5
9912 echo "${ECHO_T}$with_root_environ" >&6
9913 test "x$with_root_environ" = xyes &&
9914 cat >>confdefs.h <<\EOF
9915 #define USE_ROOT_ENVIRON 1
9916 EOF
9917
9918 echo "$as_me:9918: checking if you want to permit setuid programs to access all files" >&5
9919 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9920
9921 # Check whether --enable-root-access or --disable-root-access was given.
9922 if test "${enable_root_access+set}" = set; then
9923   enableval="$enable_root_access"
9924   with_root_access=$enableval
9925 else
9926   with_root_access=yes
9927 fi;
9928 echo "$as_me:9928: result: $with_root_access" >&5
9929 echo "${ECHO_T}$with_root_access" >&6
9930 test "x$with_root_access" = xyes &&
9931 cat >>confdefs.h <<\EOF
9932 #define USE_ROOT_ACCESS 1
9933 EOF
9934
9935 echo "$as_me:9935: checking if you want to permit setuid use of ncurses environment variables" >&5
9936 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9937
9938 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9939 if test "${enable_setuid_environ+set}" = set; then
9940   enableval="$enable_setuid_environ"
9941   with_setuid_environ=$enableval
9942 else
9943   with_setuid_environ=$with_root_environ
9944 fi;
9945 echo "$as_me:9945: result: $with_setuid_environ" >&5
9946 echo "${ECHO_T}$with_setuid_environ" >&6
9947 test "x$with_setuid_environ" = xyes &&
9948 cat >>confdefs.h <<\EOF
9949 #define USE_SETUID_ENVIRON 1
9950 EOF
9951
9952 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9953 ###   to reduce storage requirements for the terminfo database.
9954
9955 for ac_header in \
9956 unistd.h \
9957
9958 do
9959 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9960 echo "$as_me:9960: checking for $ac_header" >&5
9961 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9962 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9963   echo $ECHO_N "(cached) $ECHO_C" >&6
9964 else
9965   cat >"conftest.$ac_ext" <<_ACEOF
9966 #line 9966 "configure"
9967 #include "confdefs.h"
9968 #include <$ac_header>
9969 _ACEOF
9970 if { (eval echo "$as_me:9970: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9971   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9972   ac_status=$?
9973   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9974   rm -f conftest.er1
9975   cat conftest.err >&5
9976   echo "$as_me:9976: \$? = $ac_status" >&5
9977   (exit "$ac_status"); } >/dev/null; then
9978   if test -s conftest.err; then
9979     ac_cpp_err=$ac_c_preproc_warn_flag
9980   else
9981     ac_cpp_err=
9982   fi
9983 else
9984   ac_cpp_err=yes
9985 fi
9986 if test -z "$ac_cpp_err"; then
9987   eval "$as_ac_Header=yes"
9988 else
9989   echo "$as_me: failed program was:" >&5
9990   cat "conftest.$ac_ext" >&5
9991   eval "$as_ac_Header=no"
9992 fi
9993 rm -f conftest.err "conftest.$ac_ext"
9994 fi
9995 echo "$as_me:9995: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9996 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9997 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9998   cat >>confdefs.h <<EOF
9999 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10000 EOF
10001
10002 fi
10003 done
10004
10005 for ac_func in \
10006         remove \
10007         unlink
10008 do
10009 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10010 echo "$as_me:10010: checking for $ac_func" >&5
10011 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10012 if eval "test \"\${$as_ac_var+set}\" = set"; then
10013   echo $ECHO_N "(cached) $ECHO_C" >&6
10014 else
10015   cat >"conftest.$ac_ext" <<_ACEOF
10016 #line 10016 "configure"
10017 #include "confdefs.h"
10018 #define $ac_func autoconf_temporary
10019 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10020 #undef $ac_func
10021
10022 #ifdef __cplusplus
10023 extern "C"
10024 #endif
10025
10026 /* We use char because int might match the return type of a gcc2
10027    builtin and then its argument prototype would still apply.  */
10028 char $ac_func (void);
10029
10030 int
10031 main (void)
10032 {
10033
10034 /* The GNU C library defines stubs for functions which it implements
10035     to always fail with ENOSYS.  Some functions are actually named
10036     something starting with __ and the normal name is an alias.  */
10037 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10038 #error found stub for $ac_func
10039 #endif
10040
10041         return $ac_func ();
10042   ;
10043   return 0;
10044 }
10045 _ACEOF
10046 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10047 if { (eval echo "$as_me:10047: \"$ac_link\"") >&5
10048   (eval $ac_link) 2>&5
10049   ac_status=$?
10050   echo "$as_me:10050: \$? = $ac_status" >&5
10051   (exit "$ac_status"); } &&
10052          { ac_try='test -s "conftest$ac_exeext"'
10053   { (eval echo "$as_me:10053: \"$ac_try\"") >&5
10054   (eval $ac_try) 2>&5
10055   ac_status=$?
10056   echo "$as_me:10056: \$? = $ac_status" >&5
10057   (exit "$ac_status"); }; }; then
10058   eval "$as_ac_var=yes"
10059 else
10060   echo "$as_me: failed program was:" >&5
10061 cat "conftest.$ac_ext" >&5
10062 eval "$as_ac_var=no"
10063 fi
10064 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10065 fi
10066 echo "$as_me:10066: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10067 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10068 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10069   cat >>confdefs.h <<EOF
10070 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10071 EOF
10072
10073 fi
10074 done
10075
10076 if test "$cross_compiling" = yes ; then
10077
10078 for ac_func in \
10079                 link \
10080                 symlink
10081 do
10082 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10083 echo "$as_me:10083: checking for $ac_func" >&5
10084 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10085 if eval "test \"\${$as_ac_var+set}\" = set"; then
10086   echo $ECHO_N "(cached) $ECHO_C" >&6
10087 else
10088   cat >"conftest.$ac_ext" <<_ACEOF
10089 #line 10089 "configure"
10090 #include "confdefs.h"
10091 #define $ac_func autoconf_temporary
10092 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10093 #undef $ac_func
10094
10095 #ifdef __cplusplus
10096 extern "C"
10097 #endif
10098
10099 /* We use char because int might match the return type of a gcc2
10100    builtin and then its argument prototype would still apply.  */
10101 char $ac_func (void);
10102
10103 int
10104 main (void)
10105 {
10106
10107 /* The GNU C library defines stubs for functions which it implements
10108     to always fail with ENOSYS.  Some functions are actually named
10109     something starting with __ and the normal name is an alias.  */
10110 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10111 #error found stub for $ac_func
10112 #endif
10113
10114         return $ac_func ();
10115   ;
10116   return 0;
10117 }
10118 _ACEOF
10119 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10120 if { (eval echo "$as_me:10120: \"$ac_link\"") >&5
10121   (eval $ac_link) 2>&5
10122   ac_status=$?
10123   echo "$as_me:10123: \$? = $ac_status" >&5
10124   (exit "$ac_status"); } &&
10125          { ac_try='test -s "conftest$ac_exeext"'
10126   { (eval echo "$as_me:10126: \"$ac_try\"") >&5
10127   (eval $ac_try) 2>&5
10128   ac_status=$?
10129   echo "$as_me:10129: \$? = $ac_status" >&5
10130   (exit "$ac_status"); }; }; then
10131   eval "$as_ac_var=yes"
10132 else
10133   echo "$as_me: failed program was:" >&5
10134 cat "conftest.$ac_ext" >&5
10135 eval "$as_ac_var=no"
10136 fi
10137 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10138 fi
10139 echo "$as_me:10139: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10140 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10141 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10142   cat >>confdefs.h <<EOF
10143 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10144 EOF
10145
10146 fi
10147 done
10148
10149 else
10150         echo "$as_me:10150: checking if link/symlink functions work" >&5
10151 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10152 if test "${cf_cv_link_funcs+set}" = set; then
10153   echo $ECHO_N "(cached) $ECHO_C" >&6
10154 else
10155
10156                 cf_cv_link_funcs=
10157                 for cf_func in link symlink ; do
10158                         if test "$cross_compiling" = yes; then
10159
10160                         eval 'ac_cv_func_'$cf_func'=error'
10161 else
10162   cat >"conftest.$ac_ext" <<_ACEOF
10163 #line 10163 "configure"
10164 #include "confdefs.h"
10165
10166 $ac_includes_default
10167
10168 int main(void)
10169 {
10170         int fail = 0;
10171         char *src = "conftest.tmp";
10172         char *dst = "conftest.chk";
10173         struct stat src_sb, dst_sb;
10174         FILE *fp = fopen(src, "w");
10175         if (fp == 0) { fail = 3; } else {
10176                 fclose(fp); stat(src, &src_sb);
10177                 if ($cf_func(src, dst) < 0) {
10178                         fail = 1;
10179                 } else if (stat(dst, &dst_sb) < 0) {
10180                         fail = 2;
10181                 } else {
10182                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10183                         if (diff < 0) diff = -diff;
10184                         if (diff > 2) fail = 3;
10185                 }
10186         }
10187 #ifdef HAVE_UNLINK
10188         unlink(dst); unlink(src);
10189 #else
10190         remove(dst); remove(src);
10191 #endif
10192         ${cf_cv_main_return:-return} (fail);
10193 }
10194
10195 _ACEOF
10196 rm -f "conftest$ac_exeext"
10197 if { (eval echo "$as_me:10197: \"$ac_link\"") >&5
10198   (eval $ac_link) 2>&5
10199   ac_status=$?
10200   echo "$as_me:10200: \$? = $ac_status" >&5
10201   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10202   { (eval echo "$as_me:10202: \"$ac_try\"") >&5
10203   (eval $ac_try) 2>&5
10204   ac_status=$?
10205   echo "$as_me:10205: \$? = $ac_status" >&5
10206   (exit "$ac_status"); }; }; then
10207
10208                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10209                         eval 'ac_cv_func_'$cf_func'=yes'
10210 else
10211   echo "$as_me: program exited with status $ac_status" >&5
10212 echo "$as_me: failed program was:" >&5
10213 cat "conftest.$ac_ext" >&5
10214
10215                         eval 'ac_cv_func_'$cf_func'=no'
10216 fi
10217 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10218 fi
10219                 done
10220                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10221
10222 fi
10223 echo "$as_me:10223: result: $cf_cv_link_funcs" >&5
10224 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10225         test "$ac_cv_func_link"    = yes &&
10226 cat >>confdefs.h <<\EOF
10227 #define HAVE_LINK 1
10228 EOF
10229
10230         test "$ac_cv_func_symlink" = yes &&
10231 cat >>confdefs.h <<\EOF
10232 #define HAVE_SYMLINK 1
10233 EOF
10234
10235 fi
10236
10237 with_links=no
10238 with_symlinks=no
10239
10240 # soft links (symbolic links) are useful for some systems where hard links do
10241 # not work, or to make it simpler to copy terminfo trees around.
10242 if test "x$ac_cv_func_symlink" = xyes ; then
10243         echo "$as_me:10243: checking if tic should use symbolic links" >&5
10244 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10245
10246 # Check whether --enable-symlinks or --disable-symlinks was given.
10247 if test "${enable_symlinks+set}" = set; then
10248   enableval="$enable_symlinks"
10249   with_symlinks=$enableval
10250 else
10251   with_symlinks=no
10252 fi;
10253         echo "$as_me:10253: result: $with_symlinks" >&5
10254 echo "${ECHO_T}$with_symlinks" >&6
10255 fi
10256
10257 # If we have hard links and did not choose to use soft links instead, there is
10258 # no reason to make this choice optional - use the hard links.
10259 if test "$with_symlinks" = no ; then
10260         echo "$as_me:10260: checking if tic should use hard links" >&5
10261 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10262         if test "x$ac_cv_func_link" = xyes ; then
10263                 with_links=yes
10264         else
10265                 with_links=no
10266         fi
10267         echo "$as_me:10267: result: $with_links" >&5
10268 echo "${ECHO_T}$with_links" >&6
10269 fi
10270
10271 test "x$with_links" = xyes &&
10272 cat >>confdefs.h <<\EOF
10273 #define USE_LINKS 1
10274 EOF
10275
10276 test "x$with_symlinks" = xyes &&
10277 cat >>confdefs.h <<\EOF
10278 #define USE_SYMLINKS 1
10279 EOF
10280
10281 ###   use option --enable-broken-linker to force on use of broken-linker support
10282
10283 echo "$as_me:10283: checking if you want broken-linker support code" >&5
10284 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10285
10286 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10287 if test "${enable_broken_linker+set}" = set; then
10288   enableval="$enable_broken_linker"
10289   with_broken_linker=$enableval
10290 else
10291   with_broken_linker=no
10292 fi;
10293 echo "$as_me:10293: result: $with_broken_linker" >&5
10294 echo "${ECHO_T}$with_broken_linker" >&6
10295
10296 : "${BROKEN_LINKER:=0}"
10297 if test "x$with_broken_linker" = xyes ; then
10298
10299 cat >>confdefs.h <<\EOF
10300 #define BROKEN_LINKER 1
10301 EOF
10302
10303         BROKEN_LINKER=1
10304 fi
10305
10306 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10307 echo "$as_me:10307: checking if tputs should process BSD-style prefix padding" >&5
10308 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10309
10310 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10311 if test "${enable_bsdpad+set}" = set; then
10312   enableval="$enable_bsdpad"
10313   with_bsdpad=$enableval
10314 else
10315   with_bsdpad=no
10316 fi;
10317 echo "$as_me:10317: result: $with_bsdpad" >&5
10318 echo "${ECHO_T}$with_bsdpad" >&6
10319 test "x$with_bsdpad" = xyes &&
10320 cat >>confdefs.h <<\EOF
10321 #define BSD_TPUTS 1
10322 EOF
10323
10324 ###   use option --enable-widec to turn on use of wide-character support
10325 NCURSES_CH_T=chtype
10326 NCURSES_LIBUTF8=0
10327
10328 NEED_WCHAR_H=0
10329 NCURSES_MBSTATE_T=0
10330 NCURSES_WCHAR_T=0
10331 NCURSES_WINT_T=0
10332
10333 # Check to define _XOPEN_SOURCE "automatically"
10334 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10335
10336 echo "$as_me:10336: checking if the POSIX test-macros are already defined" >&5
10337 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10338 if test "${cf_cv_posix_visible+set}" = set; then
10339   echo $ECHO_N "(cached) $ECHO_C" >&6
10340 else
10341
10342 cat >"conftest.$ac_ext" <<_ACEOF
10343 #line 10343 "configure"
10344 #include "confdefs.h"
10345 #include <stdio.h>
10346 int
10347 main (void)
10348 {
10349
10350 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10351         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10352         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10353         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10354 #error conflicting symbols found
10355 #endif
10356
10357   ;
10358   return 0;
10359 }
10360 _ACEOF
10361 rm -f "conftest.$ac_objext"
10362 if { (eval echo "$as_me:10362: \"$ac_compile\"") >&5
10363   (eval $ac_compile) 2>&5
10364   ac_status=$?
10365   echo "$as_me:10365: \$? = $ac_status" >&5
10366   (exit "$ac_status"); } &&
10367          { ac_try='test -s "conftest.$ac_objext"'
10368   { (eval echo "$as_me:10368: \"$ac_try\"") >&5
10369   (eval $ac_try) 2>&5
10370   ac_status=$?
10371   echo "$as_me:10371: \$? = $ac_status" >&5
10372   (exit "$ac_status"); }; }; then
10373   cf_cv_posix_visible=no
10374 else
10375   echo "$as_me: failed program was:" >&5
10376 cat "conftest.$ac_ext" >&5
10377 cf_cv_posix_visible=yes
10378 fi
10379 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10380
10381 fi
10382 echo "$as_me:10382: result: $cf_cv_posix_visible" >&5
10383 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10384
10385 if test "$cf_cv_posix_visible" = no; then
10386
10387 cf_XOPEN_SOURCE=600
10388 cf_POSIX_C_SOURCE=199506L
10389 cf_xopen_source=
10390
10391 case "$host_os" in
10392 (aix[4-7]*)
10393         cf_xopen_source="-D_ALL_SOURCE"
10394         ;;
10395 (darwin[0-8].*)
10396         cf_xopen_source="-D_APPLE_C_SOURCE"
10397         ;;
10398 (darwin*)
10399         cf_xopen_source="-D_DARWIN_C_SOURCE"
10400         cf_XOPEN_SOURCE=
10401         ;;
10402 (freebsd*|dragonfly*|midnightbsd*)
10403         # 5.x headers associate
10404         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10405         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10406         cf_POSIX_C_SOURCE=200112L
10407         cf_XOPEN_SOURCE=600
10408         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10409         ;;
10410 (hpux11*)
10411         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10412         ;;
10413 (hpux*)
10414         cf_xopen_source="-D_HPUX_SOURCE"
10415         ;;
10416 (irix[56].*)
10417         cf_xopen_source="-D_SGI_SOURCE"
10418         cf_XOPEN_SOURCE=
10419         ;;
10420 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10421
10422 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10423
10424 echo "$as_me:10424: checking if this is the GNU C library" >&5
10425 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10426 if test "${cf_cv_gnu_library+set}" = set; then
10427   echo $ECHO_N "(cached) $ECHO_C" >&6
10428 else
10429
10430 cat >"conftest.$ac_ext" <<_ACEOF
10431 #line 10431 "configure"
10432 #include "confdefs.h"
10433 #include <sys/types.h>
10434 int
10435 main (void)
10436 {
10437
10438         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10439                 return 0;
10440         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10441                 return 0;
10442         #else
10443         #       error not GNU C library
10444         #endif
10445   ;
10446   return 0;
10447 }
10448 _ACEOF
10449 rm -f "conftest.$ac_objext"
10450 if { (eval echo "$as_me:10450: \"$ac_compile\"") >&5
10451   (eval $ac_compile) 2>&5
10452   ac_status=$?
10453   echo "$as_me:10453: \$? = $ac_status" >&5
10454   (exit "$ac_status"); } &&
10455          { ac_try='test -s "conftest.$ac_objext"'
10456   { (eval echo "$as_me:10456: \"$ac_try\"") >&5
10457   (eval $ac_try) 2>&5
10458   ac_status=$?
10459   echo "$as_me:10459: \$? = $ac_status" >&5
10460   (exit "$ac_status"); }; }; then
10461   cf_cv_gnu_library=yes
10462 else
10463   echo "$as_me: failed program was:" >&5
10464 cat "conftest.$ac_ext" >&5
10465 cf_cv_gnu_library=no
10466 fi
10467 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10468
10469 fi
10470 echo "$as_me:10470: result: $cf_cv_gnu_library" >&5
10471 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10472
10473 if test x$cf_cv_gnu_library = xyes; then
10474
10475         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10476         # was changed to help a little.  newlib incorporated the change about 4
10477         # years later.
10478         echo "$as_me:10478: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10479 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10480 if test "${cf_cv_gnu_library_219+set}" = set; then
10481   echo $ECHO_N "(cached) $ECHO_C" >&6
10482 else
10483
10484                 cf_save="$CPPFLAGS"
10485
10486         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10487         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10488
10489                 cat >"conftest.$ac_ext" <<_ACEOF
10490 #line 10490 "configure"
10491 #include "confdefs.h"
10492 #include <sys/types.h>
10493 int
10494 main (void)
10495 {
10496
10497                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10498                                 return 0;
10499                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10500                                 return 0;
10501                         #else
10502                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10503                         #endif
10504   ;
10505   return 0;
10506 }
10507 _ACEOF
10508 rm -f "conftest.$ac_objext"
10509 if { (eval echo "$as_me:10509: \"$ac_compile\"") >&5
10510   (eval $ac_compile) 2>&5
10511   ac_status=$?
10512   echo "$as_me:10512: \$? = $ac_status" >&5
10513   (exit "$ac_status"); } &&
10514          { ac_try='test -s "conftest.$ac_objext"'
10515   { (eval echo "$as_me:10515: \"$ac_try\"") >&5
10516   (eval $ac_try) 2>&5
10517   ac_status=$?
10518   echo "$as_me:10518: \$? = $ac_status" >&5
10519   (exit "$ac_status"); }; }; then
10520   cf_cv_gnu_library_219=yes
10521 else
10522   echo "$as_me: failed program was:" >&5
10523 cat "conftest.$ac_ext" >&5
10524 cf_cv_gnu_library_219=no
10525 fi
10526 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10527                 CPPFLAGS="$cf_save"
10528
10529 fi
10530 echo "$as_me:10530: result: $cf_cv_gnu_library_219" >&5
10531 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10532
10533         if test "x$cf_cv_gnu_library_219" = xyes; then
10534                 cf_save="$CPPFLAGS"
10535                 echo "$as_me:10535: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10536 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10537 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10538   echo $ECHO_N "(cached) $ECHO_C" >&6
10539 else
10540
10541 cf_fix_cppflags=no
10542 cf_new_cflags=
10543 cf_new_cppflags=
10544 cf_new_extra_cppflags=
10545
10546 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10547 do
10548 case "$cf_fix_cppflags" in
10549 (no)
10550         case "$cf_add_cflags" in
10551         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10552                 case "$cf_add_cflags" in
10553                 (-D*)
10554                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10555
10556                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10557                                 && test -z "${cf_tst_cflags}" \
10558                                 && cf_fix_cppflags=yes
10559
10560                         if test "$cf_fix_cppflags" = yes ; then
10561
10562         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10563         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10564
10565                                 continue
10566                         elif test "${cf_tst_cflags}" = "\"'" ; then
10567
10568         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10569         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10570
10571                                 continue
10572                         fi
10573                         ;;
10574                 esac
10575                 case "$CPPFLAGS" in
10576                 (*$cf_add_cflags)
10577                         ;;
10578                 (*)
10579                         case "$cf_add_cflags" in
10580                         (-D*)
10581                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10582
10583 CPPFLAGS=`echo "$CPPFLAGS" | \
10584         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10585                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10586
10587                                 ;;
10588                         esac
10589
10590         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10591         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10592
10593                         ;;
10594                 esac
10595                 ;;
10596         (*)
10597
10598         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10599         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10600
10601                 ;;
10602         esac
10603         ;;
10604 (yes)
10605
10606         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10607         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10608
10609         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10610
10611         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10612                 && test -z "${cf_tst_cflags}" \
10613                 && cf_fix_cppflags=no
10614         ;;
10615 esac
10616 done
10617
10618 if test -n "$cf_new_cflags" ; then
10619
10620         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10621         CFLAGS="${CFLAGS}$cf_new_cflags"
10622
10623 fi
10624
10625 if test -n "$cf_new_cppflags" ; then
10626
10627         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10628         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10629
10630 fi
10631
10632 if test -n "$cf_new_extra_cppflags" ; then
10633
10634         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10635         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10636
10637 fi
10638
10639                         cat >"conftest.$ac_ext" <<_ACEOF
10640 #line 10640 "configure"
10641 #include "confdefs.h"
10642
10643                                 #include <limits.h>
10644                                 #include <sys/types.h>
10645
10646 int
10647 main (void)
10648 {
10649
10650                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10651                                         return 0;
10652                                 #else
10653                                 #       error GNU C library is too old
10654                                 #endif
10655   ;
10656   return 0;
10657 }
10658 _ACEOF
10659 rm -f "conftest.$ac_objext"
10660 if { (eval echo "$as_me:10660: \"$ac_compile\"") >&5
10661   (eval $ac_compile) 2>&5
10662   ac_status=$?
10663   echo "$as_me:10663: \$? = $ac_status" >&5
10664   (exit "$ac_status"); } &&
10665          { ac_try='test -s "conftest.$ac_objext"'
10666   { (eval echo "$as_me:10666: \"$ac_try\"") >&5
10667   (eval $ac_try) 2>&5
10668   ac_status=$?
10669   echo "$as_me:10669: \$? = $ac_status" >&5
10670   (exit "$ac_status"); }; }; then
10671   cf_cv_gnu_dftsrc_219=yes
10672 else
10673   echo "$as_me: failed program was:" >&5
10674 cat "conftest.$ac_ext" >&5
10675 cf_cv_gnu_dftsrc_219=no
10676 fi
10677 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10678
10679 fi
10680 echo "$as_me:10680: result: $cf_cv_gnu_dftsrc_219" >&5
10681 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10682                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10683         else
10684                 cf_cv_gnu_dftsrc_219=maybe
10685         fi
10686
10687         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10688
10689                 echo "$as_me:10689: checking if we must define _GNU_SOURCE" >&5
10690 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10691 if test "${cf_cv_gnu_source+set}" = set; then
10692   echo $ECHO_N "(cached) $ECHO_C" >&6
10693 else
10694
10695                 cat >"conftest.$ac_ext" <<_ACEOF
10696 #line 10696 "configure"
10697 #include "confdefs.h"
10698 #include <sys/types.h>
10699 int
10700 main (void)
10701 {
10702
10703                         #ifndef _XOPEN_SOURCE
10704                         #error  expected _XOPEN_SOURCE to be defined
10705                         #endif
10706   ;
10707   return 0;
10708 }
10709 _ACEOF
10710 rm -f "conftest.$ac_objext"
10711 if { (eval echo "$as_me:10711: \"$ac_compile\"") >&5
10712   (eval $ac_compile) 2>&5
10713   ac_status=$?
10714   echo "$as_me:10714: \$? = $ac_status" >&5
10715   (exit "$ac_status"); } &&
10716          { ac_try='test -s "conftest.$ac_objext"'
10717   { (eval echo "$as_me:10717: \"$ac_try\"") >&5
10718   (eval $ac_try) 2>&5
10719   ac_status=$?
10720   echo "$as_me:10720: \$? = $ac_status" >&5
10721   (exit "$ac_status"); }; }; then
10722   cf_cv_gnu_source=no
10723 else
10724   echo "$as_me: failed program was:" >&5
10725 cat "conftest.$ac_ext" >&5
10726 cf_save="$CPPFLAGS"
10727
10728 cf_fix_cppflags=no
10729 cf_new_cflags=
10730 cf_new_cppflags=
10731 cf_new_extra_cppflags=
10732
10733 for cf_add_cflags in -D_GNU_SOURCE
10734 do
10735 case "$cf_fix_cppflags" in
10736 (no)
10737         case "$cf_add_cflags" in
10738         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10739                 case "$cf_add_cflags" in
10740                 (-D*)
10741                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10742
10743                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10744                                 && test -z "${cf_tst_cflags}" \
10745                                 && cf_fix_cppflags=yes
10746
10747                         if test "$cf_fix_cppflags" = yes ; then
10748
10749         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10750         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10751
10752                                 continue
10753                         elif test "${cf_tst_cflags}" = "\"'" ; then
10754
10755         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10756         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10757
10758                                 continue
10759                         fi
10760                         ;;
10761                 esac
10762                 case "$CPPFLAGS" in
10763                 (*$cf_add_cflags)
10764                         ;;
10765                 (*)
10766                         case "$cf_add_cflags" in
10767                         (-D*)
10768                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10769
10770 CPPFLAGS=`echo "$CPPFLAGS" | \
10771         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10772                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10773
10774                                 ;;
10775                         esac
10776
10777         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10778         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10779
10780                         ;;
10781                 esac
10782                 ;;
10783         (*)
10784
10785         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10786         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10787
10788                 ;;
10789         esac
10790         ;;
10791 (yes)
10792
10793         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10794         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10795
10796         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10797
10798         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10799                 && test -z "${cf_tst_cflags}" \
10800                 && cf_fix_cppflags=no
10801         ;;
10802 esac
10803 done
10804
10805 if test -n "$cf_new_cflags" ; then
10806
10807         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10808         CFLAGS="${CFLAGS}$cf_new_cflags"
10809
10810 fi
10811
10812 if test -n "$cf_new_cppflags" ; then
10813
10814         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10815         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10816
10817 fi
10818
10819 if test -n "$cf_new_extra_cppflags" ; then
10820
10821         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10822         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10823
10824 fi
10825
10826                          cat >"conftest.$ac_ext" <<_ACEOF
10827 #line 10827 "configure"
10828 #include "confdefs.h"
10829 #include <sys/types.h>
10830 int
10831 main (void)
10832 {
10833
10834                                 #ifdef _XOPEN_SOURCE
10835                                 #error  expected _XOPEN_SOURCE to be undefined
10836                                 #endif
10837   ;
10838   return 0;
10839 }
10840 _ACEOF
10841 rm -f "conftest.$ac_objext"
10842 if { (eval echo "$as_me:10842: \"$ac_compile\"") >&5
10843   (eval $ac_compile) 2>&5
10844   ac_status=$?
10845   echo "$as_me:10845: \$? = $ac_status" >&5
10846   (exit "$ac_status"); } &&
10847          { ac_try='test -s "conftest.$ac_objext"'
10848   { (eval echo "$as_me:10848: \"$ac_try\"") >&5
10849   (eval $ac_try) 2>&5
10850   ac_status=$?
10851   echo "$as_me:10851: \$? = $ac_status" >&5
10852   (exit "$ac_status"); }; }; then
10853   cf_cv_gnu_source=no
10854 else
10855   echo "$as_me: failed program was:" >&5
10856 cat "conftest.$ac_ext" >&5
10857 cf_cv_gnu_source=yes
10858 fi
10859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10860                         CPPFLAGS="$cf_save"
10861
10862 fi
10863 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10864
10865 fi
10866 echo "$as_me:10866: result: $cf_cv_gnu_source" >&5
10867 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10868
10869                 if test "$cf_cv_gnu_source" = yes
10870                 then
10871                 echo "$as_me:10871: checking if we should also define _DEFAULT_SOURCE" >&5
10872 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10873 if test "${cf_cv_default_source+set}" = set; then
10874   echo $ECHO_N "(cached) $ECHO_C" >&6
10875 else
10876
10877         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10878         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10879
10880                         cat >"conftest.$ac_ext" <<_ACEOF
10881 #line 10881 "configure"
10882 #include "confdefs.h"
10883 #include <sys/types.h>
10884 int
10885 main (void)
10886 {
10887
10888                                 #ifdef _DEFAULT_SOURCE
10889                                 #error  expected _DEFAULT_SOURCE to be undefined
10890                                 #endif
10891   ;
10892   return 0;
10893 }
10894 _ACEOF
10895 rm -f "conftest.$ac_objext"
10896 if { (eval echo "$as_me:10896: \"$ac_compile\"") >&5
10897   (eval $ac_compile) 2>&5
10898   ac_status=$?
10899   echo "$as_me:10899: \$? = $ac_status" >&5
10900   (exit "$ac_status"); } &&
10901          { ac_try='test -s "conftest.$ac_objext"'
10902   { (eval echo "$as_me:10902: \"$ac_try\"") >&5
10903   (eval $ac_try) 2>&5
10904   ac_status=$?
10905   echo "$as_me:10905: \$? = $ac_status" >&5
10906   (exit "$ac_status"); }; }; then
10907   cf_cv_default_source=no
10908 else
10909   echo "$as_me: failed program was:" >&5
10910 cat "conftest.$ac_ext" >&5
10911 cf_cv_default_source=yes
10912 fi
10913 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10914
10915 fi
10916 echo "$as_me:10916: result: $cf_cv_default_source" >&5
10917 echo "${ECHO_T}$cf_cv_default_source" >&6
10918                         if test "$cf_cv_default_source" = yes
10919                         then
10920
10921         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10922         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10923
10924                         fi
10925                 fi
10926         fi
10927
10928 fi
10929
10930         ;;
10931 (minix*)
10932         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10933         ;;
10934 (mirbsd*)
10935         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10936         cf_XOPEN_SOURCE=
10937
10938 if test "$cf_cv_posix_visible" = no; then
10939
10940 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10941
10942 cf_save_CFLAGS="$CFLAGS"
10943 cf_save_CPPFLAGS="$CPPFLAGS"
10944
10945 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10946         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10947                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10948
10949 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10950         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10951                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10952
10953 echo "$as_me:10953: checking if we should define _POSIX_C_SOURCE" >&5
10954 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10955 if test "${cf_cv_posix_c_source+set}" = set; then
10956   echo $ECHO_N "(cached) $ECHO_C" >&6
10957 else
10958
10959 echo "${as_me:-configure}:10959: testing if the symbol is already defined go no further ..." 1>&5
10960
10961         cat >"conftest.$ac_ext" <<_ACEOF
10962 #line 10962 "configure"
10963 #include "confdefs.h"
10964 #include <sys/types.h>
10965 int
10966 main (void)
10967 {
10968
10969 #ifndef _POSIX_C_SOURCE
10970 #error _POSIX_C_SOURCE is not defined
10971 #endif
10972   ;
10973   return 0;
10974 }
10975 _ACEOF
10976 rm -f "conftest.$ac_objext"
10977 if { (eval echo "$as_me:10977: \"$ac_compile\"") >&5
10978   (eval $ac_compile) 2>&5
10979   ac_status=$?
10980   echo "$as_me:10980: \$? = $ac_status" >&5
10981   (exit "$ac_status"); } &&
10982          { ac_try='test -s "conftest.$ac_objext"'
10983   { (eval echo "$as_me:10983: \"$ac_try\"") >&5
10984   (eval $ac_try) 2>&5
10985   ac_status=$?
10986   echo "$as_me:10986: \$? = $ac_status" >&5
10987   (exit "$ac_status"); }; }; then
10988   cf_cv_posix_c_source=no
10989 else
10990   echo "$as_me: failed program was:" >&5
10991 cat "conftest.$ac_ext" >&5
10992 cf_want_posix_source=no
10993          case .$cf_POSIX_C_SOURCE in
10994          (.[12]??*)
10995                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10996                 ;;
10997          (.2)
10998                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10999                 cf_want_posix_source=yes
11000                 ;;
11001          (.*)
11002                 cf_want_posix_source=yes
11003                 ;;
11004          esac
11005          if test "$cf_want_posix_source" = yes ; then
11006                 cat >"conftest.$ac_ext" <<_ACEOF
11007 #line 11007 "configure"
11008 #include "confdefs.h"
11009 #include <sys/types.h>
11010 int
11011 main (void)
11012 {
11013
11014 #ifdef _POSIX_SOURCE
11015 #error _POSIX_SOURCE is defined
11016 #endif
11017   ;
11018   return 0;
11019 }
11020 _ACEOF
11021 rm -f "conftest.$ac_objext"
11022 if { (eval echo "$as_me:11022: \"$ac_compile\"") >&5
11023   (eval $ac_compile) 2>&5
11024   ac_status=$?
11025   echo "$as_me:11025: \$? = $ac_status" >&5
11026   (exit "$ac_status"); } &&
11027          { ac_try='test -s "conftest.$ac_objext"'
11028   { (eval echo "$as_me:11028: \"$ac_try\"") >&5
11029   (eval $ac_try) 2>&5
11030   ac_status=$?
11031   echo "$as_me:11031: \$? = $ac_status" >&5
11032   (exit "$ac_status"); }; }; then
11033   :
11034 else
11035   echo "$as_me: failed program was:" >&5
11036 cat "conftest.$ac_ext" >&5
11037 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11038 fi
11039 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11040          fi
11041
11042 echo "${as_me:-configure}:11042: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11043
11044          CFLAGS="$cf_trim_CFLAGS"
11045          CPPFLAGS="$cf_trim_CPPFLAGS"
11046
11047         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11048         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11049
11050 echo "${as_me:-configure}:11050: testing if the second compile does not leave our definition intact error ..." 1>&5
11051
11052          cat >"conftest.$ac_ext" <<_ACEOF
11053 #line 11053 "configure"
11054 #include "confdefs.h"
11055 #include <sys/types.h>
11056 int
11057 main (void)
11058 {
11059
11060 #ifndef _POSIX_C_SOURCE
11061 #error _POSIX_C_SOURCE is not defined
11062 #endif
11063   ;
11064   return 0;
11065 }
11066 _ACEOF
11067 rm -f "conftest.$ac_objext"
11068 if { (eval echo "$as_me:11068: \"$ac_compile\"") >&5
11069   (eval $ac_compile) 2>&5
11070   ac_status=$?
11071   echo "$as_me:11071: \$? = $ac_status" >&5
11072   (exit "$ac_status"); } &&
11073          { ac_try='test -s "conftest.$ac_objext"'
11074   { (eval echo "$as_me:11074: \"$ac_try\"") >&5
11075   (eval $ac_try) 2>&5
11076   ac_status=$?
11077   echo "$as_me:11077: \$? = $ac_status" >&5
11078   (exit "$ac_status"); }; }; then
11079   :
11080 else
11081   echo "$as_me: failed program was:" >&5
11082 cat "conftest.$ac_ext" >&5
11083 cf_cv_posix_c_source=no
11084 fi
11085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11086          CFLAGS="$cf_save_CFLAGS"
11087          CPPFLAGS="$cf_save_CPPFLAGS"
11088
11089 fi
11090 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11091
11092 fi
11093 echo "$as_me:11093: result: $cf_cv_posix_c_source" >&5
11094 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11095
11096 if test "$cf_cv_posix_c_source" != no ; then
11097         CFLAGS="$cf_trim_CFLAGS"
11098         CPPFLAGS="$cf_trim_CPPFLAGS"
11099
11100 cf_fix_cppflags=no
11101 cf_new_cflags=
11102 cf_new_cppflags=
11103 cf_new_extra_cppflags=
11104
11105 for cf_add_cflags in $cf_cv_posix_c_source
11106 do
11107 case "$cf_fix_cppflags" in
11108 (no)
11109         case "$cf_add_cflags" in
11110         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11111                 case "$cf_add_cflags" in
11112                 (-D*)
11113                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11114
11115                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11116                                 && test -z "${cf_tst_cflags}" \
11117                                 && cf_fix_cppflags=yes
11118
11119                         if test "$cf_fix_cppflags" = yes ; then
11120
11121         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11122         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11123
11124                                 continue
11125                         elif test "${cf_tst_cflags}" = "\"'" ; then
11126
11127         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11128         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11129
11130                                 continue
11131                         fi
11132                         ;;
11133                 esac
11134                 case "$CPPFLAGS" in
11135                 (*$cf_add_cflags)
11136                         ;;
11137                 (*)
11138                         case "$cf_add_cflags" in
11139                         (-D*)
11140                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11141
11142 CPPFLAGS=`echo "$CPPFLAGS" | \
11143         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11144                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11145
11146                                 ;;
11147                         esac
11148
11149         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11150         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11151
11152                         ;;
11153                 esac
11154                 ;;
11155         (*)
11156
11157         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11158         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11159
11160                 ;;
11161         esac
11162         ;;
11163 (yes)
11164
11165         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11166         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11167
11168         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11169
11170         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11171                 && test -z "${cf_tst_cflags}" \
11172                 && cf_fix_cppflags=no
11173         ;;
11174 esac
11175 done
11176
11177 if test -n "$cf_new_cflags" ; then
11178
11179         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11180         CFLAGS="${CFLAGS}$cf_new_cflags"
11181
11182 fi
11183
11184 if test -n "$cf_new_cppflags" ; then
11185
11186         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11187         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11188
11189 fi
11190
11191 if test -n "$cf_new_extra_cppflags" ; then
11192
11193         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11194         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11195
11196 fi
11197
11198 fi
11199
11200 fi # cf_cv_posix_visible
11201
11202         ;;
11203 (netbsd*)
11204         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11205         ;;
11206 (openbsd[6-9]*)
11207         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11208         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11209         # Abusing the conformance level is a workaround.
11210         { echo "$as_me:11210: WARNING: this system does not provide usable locale support" >&5
11211 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11212         cf_xopen_source="-D_BSD_SOURCE"
11213         cf_XOPEN_SOURCE=700
11214         ;;
11215 (openbsd[4-5]*)
11216         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11217         cf_xopen_source="-D_BSD_SOURCE"
11218         cf_XOPEN_SOURCE=600
11219         ;;
11220 (openbsd*)
11221         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11222         ;;
11223 (osf[45]*)
11224         cf_xopen_source="-D_OSF_SOURCE"
11225         ;;
11226 (nto-qnx*)
11227         cf_xopen_source="-D_QNX_SOURCE"
11228         ;;
11229 (sco*)
11230         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11231         ;;
11232 (solaris2.*)
11233         cf_xopen_source="-D__EXTENSIONS__"
11234         cf_cv_xopen_source=broken
11235         ;;
11236 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11237         cf_XOPEN_SOURCE=
11238         cf_POSIX_C_SOURCE=
11239         ;;
11240 (*)
11241
11242 echo "$as_me:11242: checking if we should define _XOPEN_SOURCE" >&5
11243 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11244 if test "${cf_cv_xopen_source+set}" = set; then
11245   echo $ECHO_N "(cached) $ECHO_C" >&6
11246 else
11247
11248         cat >"conftest.$ac_ext" <<_ACEOF
11249 #line 11249 "configure"
11250 #include "confdefs.h"
11251
11252 $ac_includes_default
11253
11254 int
11255 main (void)
11256 {
11257
11258 #ifndef _XOPEN_SOURCE
11259 #error _XOPEN_SOURCE is not defined
11260 #endif
11261
11262   ;
11263   return 0;
11264 }
11265 _ACEOF
11266 rm -f "conftest.$ac_objext"
11267 if { (eval echo "$as_me:11267: \"$ac_compile\"") >&5
11268   (eval $ac_compile) 2>&5
11269   ac_status=$?
11270   echo "$as_me:11270: \$? = $ac_status" >&5
11271   (exit "$ac_status"); } &&
11272          { ac_try='test -s "conftest.$ac_objext"'
11273   { (eval echo "$as_me:11273: \"$ac_try\"") >&5
11274   (eval $ac_try) 2>&5
11275   ac_status=$?
11276   echo "$as_me:11276: \$? = $ac_status" >&5
11277   (exit "$ac_status"); }; }; then
11278   cf_cv_xopen_source=no
11279 else
11280   echo "$as_me: failed program was:" >&5
11281 cat "conftest.$ac_ext" >&5
11282 cf_save="$CPPFLAGS"
11283
11284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11285         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11286
11287          cat >"conftest.$ac_ext" <<_ACEOF
11288 #line 11288 "configure"
11289 #include "confdefs.h"
11290
11291 $ac_includes_default
11292
11293 int
11294 main (void)
11295 {
11296
11297 #ifndef _XOPEN_SOURCE
11298 #error _XOPEN_SOURCE is not defined
11299 #endif
11300
11301   ;
11302   return 0;
11303 }
11304 _ACEOF
11305 rm -f "conftest.$ac_objext"
11306 if { (eval echo "$as_me:11306: \"$ac_compile\"") >&5
11307   (eval $ac_compile) 2>&5
11308   ac_status=$?
11309   echo "$as_me:11309: \$? = $ac_status" >&5
11310   (exit "$ac_status"); } &&
11311          { ac_try='test -s "conftest.$ac_objext"'
11312   { (eval echo "$as_me:11312: \"$ac_try\"") >&5
11313   (eval $ac_try) 2>&5
11314   ac_status=$?
11315   echo "$as_me:11315: \$? = $ac_status" >&5
11316   (exit "$ac_status"); }; }; then
11317   cf_cv_xopen_source=no
11318 else
11319   echo "$as_me: failed program was:" >&5
11320 cat "conftest.$ac_ext" >&5
11321 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11322 fi
11323 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11324                 CPPFLAGS="$cf_save"
11325
11326 fi
11327 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11328
11329 fi
11330 echo "$as_me:11330: result: $cf_cv_xopen_source" >&5
11331 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11332
11333 if test "$cf_cv_xopen_source" != no ; then
11334
11335 CFLAGS=`echo "$CFLAGS" | \
11336         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11337                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11338
11339 CPPFLAGS=`echo "$CPPFLAGS" | \
11340         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11341                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11342
11343         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11344
11345 for cf_add_cflags in $cf_temp_xopen_source
11346 do
11347         case "x$cf_add_cflags" in
11348         (x-[DU]*)
11349
11350 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11351 while true
11352 do
11353         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'`
11354         test "$CFLAGS" != "$cf_old_cflag" || break
11355
11356         CFLAGS="$cf_old_cflag"
11357 done
11358
11359 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11360 while true
11361 do
11362         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'`
11363         test "$CPPFLAGS" != "$cf_old_cflag" || break
11364
11365         CPPFLAGS="$cf_old_cflag"
11366 done
11367
11368                 ;;
11369         esac
11370
11371 cf_fix_cppflags=no
11372 cf_new_cflags=
11373 cf_new_cppflags=
11374 cf_new_extra_cppflags=
11375
11376 for cf_add_cflags in $cf_add_cflags
11377 do
11378 case "$cf_fix_cppflags" in
11379 (no)
11380         case "$cf_add_cflags" in
11381         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11382                 case "$cf_add_cflags" in
11383                 (-D*)
11384                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11385
11386                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11387                                 && test -z "${cf_tst_cflags}" \
11388                                 && cf_fix_cppflags=yes
11389
11390                         if test "$cf_fix_cppflags" = yes ; then
11391
11392         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11393         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11394
11395                                 continue
11396                         elif test "${cf_tst_cflags}" = "\"'" ; then
11397
11398         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11399         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11400
11401                                 continue
11402                         fi
11403                         ;;
11404                 esac
11405                 case "$CPPFLAGS" in
11406                 (*$cf_add_cflags)
11407                         ;;
11408                 (*)
11409                         case "$cf_add_cflags" in
11410                         (-D*)
11411                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11412
11413 CPPFLAGS=`echo "$CPPFLAGS" | \
11414         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11415                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11416
11417                                 ;;
11418                         esac
11419
11420         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11421         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11422
11423                         ;;
11424                 esac
11425                 ;;
11426         (*)
11427
11428         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11429         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11430
11431                 ;;
11432         esac
11433         ;;
11434 (yes)
11435
11436         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11437         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11438
11439         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11440
11441         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11442                 && test -z "${cf_tst_cflags}" \
11443                 && cf_fix_cppflags=no
11444         ;;
11445 esac
11446 done
11447
11448 if test -n "$cf_new_cflags" ; then
11449
11450         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11451         CFLAGS="${CFLAGS}$cf_new_cflags"
11452
11453 fi
11454
11455 if test -n "$cf_new_cppflags" ; then
11456
11457         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11458         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11459
11460 fi
11461
11462 if test -n "$cf_new_extra_cppflags" ; then
11463
11464         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11465         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11466
11467 fi
11468
11469 done
11470
11471 fi
11472
11473         cf_save_xopen_cppflags="$CPPFLAGS"
11474
11475 if test "$cf_cv_posix_visible" = no; then
11476
11477 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11478
11479 cf_save_CFLAGS="$CFLAGS"
11480 cf_save_CPPFLAGS="$CPPFLAGS"
11481
11482 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11483         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11484                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11485
11486 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11487         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11488                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11489
11490 echo "$as_me:11490: checking if we should define _POSIX_C_SOURCE" >&5
11491 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11492 if test "${cf_cv_posix_c_source+set}" = set; then
11493   echo $ECHO_N "(cached) $ECHO_C" >&6
11494 else
11495
11496 echo "${as_me:-configure}:11496: testing if the symbol is already defined go no further ..." 1>&5
11497
11498         cat >"conftest.$ac_ext" <<_ACEOF
11499 #line 11499 "configure"
11500 #include "confdefs.h"
11501 #include <sys/types.h>
11502 int
11503 main (void)
11504 {
11505
11506 #ifndef _POSIX_C_SOURCE
11507 #error _POSIX_C_SOURCE is not defined
11508 #endif
11509   ;
11510   return 0;
11511 }
11512 _ACEOF
11513 rm -f "conftest.$ac_objext"
11514 if { (eval echo "$as_me:11514: \"$ac_compile\"") >&5
11515   (eval $ac_compile) 2>&5
11516   ac_status=$?
11517   echo "$as_me:11517: \$? = $ac_status" >&5
11518   (exit "$ac_status"); } &&
11519          { ac_try='test -s "conftest.$ac_objext"'
11520   { (eval echo "$as_me:11520: \"$ac_try\"") >&5
11521   (eval $ac_try) 2>&5
11522   ac_status=$?
11523   echo "$as_me:11523: \$? = $ac_status" >&5
11524   (exit "$ac_status"); }; }; then
11525   cf_cv_posix_c_source=no
11526 else
11527   echo "$as_me: failed program was:" >&5
11528 cat "conftest.$ac_ext" >&5
11529 cf_want_posix_source=no
11530          case .$cf_POSIX_C_SOURCE in
11531          (.[12]??*)
11532                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11533                 ;;
11534          (.2)
11535                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11536                 cf_want_posix_source=yes
11537                 ;;
11538          (.*)
11539                 cf_want_posix_source=yes
11540                 ;;
11541          esac
11542          if test "$cf_want_posix_source" = yes ; then
11543                 cat >"conftest.$ac_ext" <<_ACEOF
11544 #line 11544 "configure"
11545 #include "confdefs.h"
11546 #include <sys/types.h>
11547 int
11548 main (void)
11549 {
11550
11551 #ifdef _POSIX_SOURCE
11552 #error _POSIX_SOURCE is defined
11553 #endif
11554   ;
11555   return 0;
11556 }
11557 _ACEOF
11558 rm -f "conftest.$ac_objext"
11559 if { (eval echo "$as_me:11559: \"$ac_compile\"") >&5
11560   (eval $ac_compile) 2>&5
11561   ac_status=$?
11562   echo "$as_me:11562: \$? = $ac_status" >&5
11563   (exit "$ac_status"); } &&
11564          { ac_try='test -s "conftest.$ac_objext"'
11565   { (eval echo "$as_me:11565: \"$ac_try\"") >&5
11566   (eval $ac_try) 2>&5
11567   ac_status=$?
11568   echo "$as_me:11568: \$? = $ac_status" >&5
11569   (exit "$ac_status"); }; }; then
11570   :
11571 else
11572   echo "$as_me: failed program was:" >&5
11573 cat "conftest.$ac_ext" >&5
11574 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11575 fi
11576 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11577          fi
11578
11579 echo "${as_me:-configure}:11579: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11580
11581          CFLAGS="$cf_trim_CFLAGS"
11582          CPPFLAGS="$cf_trim_CPPFLAGS"
11583
11584         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11585         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11586
11587 echo "${as_me:-configure}:11587: testing if the second compile does not leave our definition intact error ..." 1>&5
11588
11589          cat >"conftest.$ac_ext" <<_ACEOF
11590 #line 11590 "configure"
11591 #include "confdefs.h"
11592 #include <sys/types.h>
11593 int
11594 main (void)
11595 {
11596
11597 #ifndef _POSIX_C_SOURCE
11598 #error _POSIX_C_SOURCE is not defined
11599 #endif
11600   ;
11601   return 0;
11602 }
11603 _ACEOF
11604 rm -f "conftest.$ac_objext"
11605 if { (eval echo "$as_me:11605: \"$ac_compile\"") >&5
11606   (eval $ac_compile) 2>&5
11607   ac_status=$?
11608   echo "$as_me:11608: \$? = $ac_status" >&5
11609   (exit "$ac_status"); } &&
11610          { ac_try='test -s "conftest.$ac_objext"'
11611   { (eval echo "$as_me:11611: \"$ac_try\"") >&5
11612   (eval $ac_try) 2>&5
11613   ac_status=$?
11614   echo "$as_me:11614: \$? = $ac_status" >&5
11615   (exit "$ac_status"); }; }; then
11616   :
11617 else
11618   echo "$as_me: failed program was:" >&5
11619 cat "conftest.$ac_ext" >&5
11620 cf_cv_posix_c_source=no
11621 fi
11622 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11623          CFLAGS="$cf_save_CFLAGS"
11624          CPPFLAGS="$cf_save_CPPFLAGS"
11625
11626 fi
11627 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11628
11629 fi
11630 echo "$as_me:11630: result: $cf_cv_posix_c_source" >&5
11631 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11632
11633 if test "$cf_cv_posix_c_source" != no ; then
11634         CFLAGS="$cf_trim_CFLAGS"
11635         CPPFLAGS="$cf_trim_CPPFLAGS"
11636
11637 cf_fix_cppflags=no
11638 cf_new_cflags=
11639 cf_new_cppflags=
11640 cf_new_extra_cppflags=
11641
11642 for cf_add_cflags in $cf_cv_posix_c_source
11643 do
11644 case "$cf_fix_cppflags" in
11645 (no)
11646         case "$cf_add_cflags" in
11647         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11648                 case "$cf_add_cflags" in
11649                 (-D*)
11650                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11651
11652                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11653                                 && test -z "${cf_tst_cflags}" \
11654                                 && cf_fix_cppflags=yes
11655
11656                         if test "$cf_fix_cppflags" = yes ; then
11657
11658         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11659         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11660
11661                                 continue
11662                         elif test "${cf_tst_cflags}" = "\"'" ; then
11663
11664         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11665         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11666
11667                                 continue
11668                         fi
11669                         ;;
11670                 esac
11671                 case "$CPPFLAGS" in
11672                 (*$cf_add_cflags)
11673                         ;;
11674                 (*)
11675                         case "$cf_add_cflags" in
11676                         (-D*)
11677                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11678
11679 CPPFLAGS=`echo "$CPPFLAGS" | \
11680         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11681                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11682
11683                                 ;;
11684                         esac
11685
11686         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11687         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11688
11689                         ;;
11690                 esac
11691                 ;;
11692         (*)
11693
11694         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11695         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11696
11697                 ;;
11698         esac
11699         ;;
11700 (yes)
11701
11702         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11703         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11704
11705         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11706
11707         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11708                 && test -z "${cf_tst_cflags}" \
11709                 && cf_fix_cppflags=no
11710         ;;
11711 esac
11712 done
11713
11714 if test -n "$cf_new_cflags" ; then
11715
11716         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11717         CFLAGS="${CFLAGS}$cf_new_cflags"
11718
11719 fi
11720
11721 if test -n "$cf_new_cppflags" ; then
11722
11723         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11724         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11725
11726 fi
11727
11728 if test -n "$cf_new_extra_cppflags" ; then
11729
11730         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11731         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11732
11733 fi
11734
11735 fi
11736
11737 fi # cf_cv_posix_visible
11738
11739         # Some of these niche implementations use copy/paste, double-check...
11740         if test "$cf_cv_xopen_source" = no ; then
11741                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11742
11743 echo "${as_me:-configure}:11743: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11744
11745                 cat >"conftest.$ac_ext" <<_ACEOF
11746 #line 11746 "configure"
11747 #include "confdefs.h"
11748
11749 $ac_includes_default
11750
11751 int
11752 main (void)
11753 {
11754
11755 #ifndef _XOPEN_SOURCE
11756 #error _XOPEN_SOURCE is not defined
11757 #endif
11758
11759   ;
11760   return 0;
11761 }
11762 _ACEOF
11763 rm -f "conftest.$ac_objext"
11764 if { (eval echo "$as_me:11764: \"$ac_compile\"") >&5
11765   (eval $ac_compile) 2>&5
11766   ac_status=$?
11767   echo "$as_me:11767: \$? = $ac_status" >&5
11768   (exit "$ac_status"); } &&
11769          { ac_try='test -s "conftest.$ac_objext"'
11770   { (eval echo "$as_me:11770: \"$ac_try\"") >&5
11771   (eval $ac_try) 2>&5
11772   ac_status=$?
11773   echo "$as_me:11773: \$? = $ac_status" >&5
11774   (exit "$ac_status"); }; }; then
11775   :
11776 else
11777   echo "$as_me: failed program was:" >&5
11778 cat "conftest.$ac_ext" >&5
11779
11780                         { echo "$as_me:11780: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11781 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11782                         CPPFLAGS="$cf_save_xopen_cppflags"
11783 fi
11784 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11785         fi
11786         ;;
11787 esac
11788
11789 if test -n "$cf_xopen_source" ; then
11790
11791 for cf_add_cflags in $cf_xopen_source
11792 do
11793         case "x$cf_add_cflags" in
11794         (x-[DU]*)
11795
11796 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11797 while true
11798 do
11799         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'`
11800         test "$CFLAGS" != "$cf_old_cflag" || break
11801         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11802
11803 echo "${as_me:-configure}:11803: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11804
11805         CFLAGS="$cf_old_cflag"
11806 done
11807
11808 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11809 while true
11810 do
11811         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'`
11812         test "$CPPFLAGS" != "$cf_old_cflag" || break
11813         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11814
11815 echo "${as_me:-configure}:11815: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11816
11817         CPPFLAGS="$cf_old_cflag"
11818 done
11819
11820                 ;;
11821         esac
11822
11823 cf_fix_cppflags=no
11824 cf_new_cflags=
11825 cf_new_cppflags=
11826 cf_new_extra_cppflags=
11827
11828 for cf_add_cflags in $cf_add_cflags
11829 do
11830 case "$cf_fix_cppflags" in
11831 (no)
11832         case "$cf_add_cflags" in
11833         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11834                 case "$cf_add_cflags" in
11835                 (-D*)
11836                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11837
11838                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11839                                 && test -z "${cf_tst_cflags}" \
11840                                 && cf_fix_cppflags=yes
11841
11842                         if test "$cf_fix_cppflags" = yes ; then
11843
11844         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11845         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11846
11847                                 continue
11848                         elif test "${cf_tst_cflags}" = "\"'" ; then
11849
11850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11852
11853                                 continue
11854                         fi
11855                         ;;
11856                 esac
11857                 case "$CPPFLAGS" in
11858                 (*$cf_add_cflags)
11859                         ;;
11860                 (*)
11861                         case "$cf_add_cflags" in
11862                         (-D*)
11863                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11864
11865 CPPFLAGS=`echo "$CPPFLAGS" | \
11866         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11867                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11868
11869                                 ;;
11870                         esac
11871
11872         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11873         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11874
11875                         ;;
11876                 esac
11877                 ;;
11878         (*)
11879
11880         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11881         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11882
11883                 ;;
11884         esac
11885         ;;
11886 (yes)
11887
11888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11890
11891         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11892
11893         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11894                 && test -z "${cf_tst_cflags}" \
11895                 && cf_fix_cppflags=no
11896         ;;
11897 esac
11898 done
11899
11900 if test -n "$cf_new_cflags" ; then
11901         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11902
11903 echo "${as_me:-configure}:11903: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11904
11905         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11906         CFLAGS="${CFLAGS}$cf_new_cflags"
11907
11908 fi
11909
11910 if test -n "$cf_new_cppflags" ; then
11911         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11912
11913 echo "${as_me:-configure}:11913: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11914
11915         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11916         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11917
11918 fi
11919
11920 if test -n "$cf_new_extra_cppflags" ; then
11921         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11922
11923 echo "${as_me:-configure}:11923: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11924
11925         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11926         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11927
11928 fi
11929
11930 done
11931
11932 fi
11933
11934 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11935         echo "$as_me:11935: checking if _XOPEN_SOURCE really is set" >&5
11936 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11937         cat >"conftest.$ac_ext" <<_ACEOF
11938 #line 11938 "configure"
11939 #include "confdefs.h"
11940 #include <stdlib.h>
11941 int
11942 main (void)
11943 {
11944
11945 #ifndef _XOPEN_SOURCE
11946 #error _XOPEN_SOURCE is not defined
11947 #endif
11948   ;
11949   return 0;
11950 }
11951 _ACEOF
11952 rm -f "conftest.$ac_objext"
11953 if { (eval echo "$as_me:11953: \"$ac_compile\"") >&5
11954   (eval $ac_compile) 2>&5
11955   ac_status=$?
11956   echo "$as_me:11956: \$? = $ac_status" >&5
11957   (exit "$ac_status"); } &&
11958          { ac_try='test -s "conftest.$ac_objext"'
11959   { (eval echo "$as_me:11959: \"$ac_try\"") >&5
11960   (eval $ac_try) 2>&5
11961   ac_status=$?
11962   echo "$as_me:11962: \$? = $ac_status" >&5
11963   (exit "$ac_status"); }; }; then
11964   cf_XOPEN_SOURCE_set=yes
11965 else
11966   echo "$as_me: failed program was:" >&5
11967 cat "conftest.$ac_ext" >&5
11968 cf_XOPEN_SOURCE_set=no
11969 fi
11970 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11971         echo "$as_me:11971: result: $cf_XOPEN_SOURCE_set" >&5
11972 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11973         if test "$cf_XOPEN_SOURCE_set" = yes
11974         then
11975                 cat >"conftest.$ac_ext" <<_ACEOF
11976 #line 11976 "configure"
11977 #include "confdefs.h"
11978 #include <stdlib.h>
11979 int
11980 main (void)
11981 {
11982
11983 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11984 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11985 #endif
11986   ;
11987   return 0;
11988 }
11989 _ACEOF
11990 rm -f "conftest.$ac_objext"
11991 if { (eval echo "$as_me:11991: \"$ac_compile\"") >&5
11992   (eval $ac_compile) 2>&5
11993   ac_status=$?
11994   echo "$as_me:11994: \$? = $ac_status" >&5
11995   (exit "$ac_status"); } &&
11996          { ac_try='test -s "conftest.$ac_objext"'
11997   { (eval echo "$as_me:11997: \"$ac_try\"") >&5
11998   (eval $ac_try) 2>&5
11999   ac_status=$?
12000   echo "$as_me:12000: \$? = $ac_status" >&5
12001   (exit "$ac_status"); }; }; then
12002   cf_XOPEN_SOURCE_set_ok=yes
12003 else
12004   echo "$as_me: failed program was:" >&5
12005 cat "conftest.$ac_ext" >&5
12006 cf_XOPEN_SOURCE_set_ok=no
12007 fi
12008 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12009                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12010                 then
12011                         { echo "$as_me:12011: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12012 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12013                 fi
12014         else
12015
12016 echo "$as_me:12016: checking if we should define _XOPEN_SOURCE" >&5
12017 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12018 if test "${cf_cv_xopen_source+set}" = set; then
12019   echo $ECHO_N "(cached) $ECHO_C" >&6
12020 else
12021
12022         cat >"conftest.$ac_ext" <<_ACEOF
12023 #line 12023 "configure"
12024 #include "confdefs.h"
12025
12026 $ac_includes_default
12027
12028 int
12029 main (void)
12030 {
12031
12032 #ifndef _XOPEN_SOURCE
12033 #error _XOPEN_SOURCE is not defined
12034 #endif
12035
12036   ;
12037   return 0;
12038 }
12039 _ACEOF
12040 rm -f "conftest.$ac_objext"
12041 if { (eval echo "$as_me:12041: \"$ac_compile\"") >&5
12042   (eval $ac_compile) 2>&5
12043   ac_status=$?
12044   echo "$as_me:12044: \$? = $ac_status" >&5
12045   (exit "$ac_status"); } &&
12046          { ac_try='test -s "conftest.$ac_objext"'
12047   { (eval echo "$as_me:12047: \"$ac_try\"") >&5
12048   (eval $ac_try) 2>&5
12049   ac_status=$?
12050   echo "$as_me:12050: \$? = $ac_status" >&5
12051   (exit "$ac_status"); }; }; then
12052   cf_cv_xopen_source=no
12053 else
12054   echo "$as_me: failed program was:" >&5
12055 cat "conftest.$ac_ext" >&5
12056 cf_save="$CPPFLAGS"
12057
12058         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12059         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12060
12061          cat >"conftest.$ac_ext" <<_ACEOF
12062 #line 12062 "configure"
12063 #include "confdefs.h"
12064
12065 $ac_includes_default
12066
12067 int
12068 main (void)
12069 {
12070
12071 #ifndef _XOPEN_SOURCE
12072 #error _XOPEN_SOURCE is not defined
12073 #endif
12074
12075   ;
12076   return 0;
12077 }
12078 _ACEOF
12079 rm -f "conftest.$ac_objext"
12080 if { (eval echo "$as_me:12080: \"$ac_compile\"") >&5
12081   (eval $ac_compile) 2>&5
12082   ac_status=$?
12083   echo "$as_me:12083: \$? = $ac_status" >&5
12084   (exit "$ac_status"); } &&
12085          { ac_try='test -s "conftest.$ac_objext"'
12086   { (eval echo "$as_me:12086: \"$ac_try\"") >&5
12087   (eval $ac_try) 2>&5
12088   ac_status=$?
12089   echo "$as_me:12089: \$? = $ac_status" >&5
12090   (exit "$ac_status"); }; }; then
12091   cf_cv_xopen_source=no
12092 else
12093   echo "$as_me: failed program was:" >&5
12094 cat "conftest.$ac_ext" >&5
12095 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12096 fi
12097 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12098                 CPPFLAGS="$cf_save"
12099
12100 fi
12101 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12102
12103 fi
12104 echo "$as_me:12104: result: $cf_cv_xopen_source" >&5
12105 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12106
12107 if test "$cf_cv_xopen_source" != no ; then
12108
12109 CFLAGS=`echo "$CFLAGS" | \
12110         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12111                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12112
12113 CPPFLAGS=`echo "$CPPFLAGS" | \
12114         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12115                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12116
12117         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12118
12119 for cf_add_cflags in $cf_temp_xopen_source
12120 do
12121         case "x$cf_add_cflags" in
12122         (x-[DU]*)
12123
12124 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12125 while true
12126 do
12127         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'`
12128         test "$CFLAGS" != "$cf_old_cflag" || break
12129
12130         CFLAGS="$cf_old_cflag"
12131 done
12132
12133 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12134 while true
12135 do
12136         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'`
12137         test "$CPPFLAGS" != "$cf_old_cflag" || break
12138
12139         CPPFLAGS="$cf_old_cflag"
12140 done
12141
12142                 ;;
12143         esac
12144
12145 cf_fix_cppflags=no
12146 cf_new_cflags=
12147 cf_new_cppflags=
12148 cf_new_extra_cppflags=
12149
12150 for cf_add_cflags in $cf_add_cflags
12151 do
12152 case "$cf_fix_cppflags" in
12153 (no)
12154         case "$cf_add_cflags" in
12155         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12156                 case "$cf_add_cflags" in
12157                 (-D*)
12158                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12159
12160                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12161                                 && test -z "${cf_tst_cflags}" \
12162                                 && cf_fix_cppflags=yes
12163
12164                         if test "$cf_fix_cppflags" = yes ; then
12165
12166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12168
12169                                 continue
12170                         elif test "${cf_tst_cflags}" = "\"'" ; then
12171
12172         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12173         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12174
12175                                 continue
12176                         fi
12177                         ;;
12178                 esac
12179                 case "$CPPFLAGS" in
12180                 (*$cf_add_cflags)
12181                         ;;
12182                 (*)
12183                         case "$cf_add_cflags" in
12184                         (-D*)
12185                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12186
12187 CPPFLAGS=`echo "$CPPFLAGS" | \
12188         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12189                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12190
12191                                 ;;
12192                         esac
12193
12194         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12195         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12196
12197                         ;;
12198                 esac
12199                 ;;
12200         (*)
12201
12202         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12203         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12204
12205                 ;;
12206         esac
12207         ;;
12208 (yes)
12209
12210         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12211         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12212
12213         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12214
12215         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12216                 && test -z "${cf_tst_cflags}" \
12217                 && cf_fix_cppflags=no
12218         ;;
12219 esac
12220 done
12221
12222 if test -n "$cf_new_cflags" ; then
12223
12224         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12225         CFLAGS="${CFLAGS}$cf_new_cflags"
12226
12227 fi
12228
12229 if test -n "$cf_new_cppflags" ; then
12230
12231         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12232         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12233
12234 fi
12235
12236 if test -n "$cf_new_extra_cppflags" ; then
12237
12238         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12239         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12240
12241 fi
12242
12243 done
12244
12245 fi
12246
12247         fi
12248 fi
12249 fi # cf_cv_posix_visible
12250
12251 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12252
12253 # Work around breakage on OS X
12254
12255 echo "$as_me:12255: checking if SIGWINCH is defined" >&5
12256 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12257 if test "${cf_cv_define_sigwinch+set}" = set; then
12258   echo $ECHO_N "(cached) $ECHO_C" >&6
12259 else
12260
12261         cat >"conftest.$ac_ext" <<_ACEOF
12262 #line 12262 "configure"
12263 #include "confdefs.h"
12264
12265 #include <sys/types.h>
12266 #include <sys/signal.h>
12267
12268 int
12269 main (void)
12270 {
12271 int x = SIGWINCH; (void)x
12272   ;
12273   return 0;
12274 }
12275 _ACEOF
12276 rm -f "conftest.$ac_objext"
12277 if { (eval echo "$as_me:12277: \"$ac_compile\"") >&5
12278   (eval $ac_compile) 2>&5
12279   ac_status=$?
12280   echo "$as_me:12280: \$? = $ac_status" >&5
12281   (exit "$ac_status"); } &&
12282          { ac_try='test -s "conftest.$ac_objext"'
12283   { (eval echo "$as_me:12283: \"$ac_try\"") >&5
12284   (eval $ac_try) 2>&5
12285   ac_status=$?
12286   echo "$as_me:12286: \$? = $ac_status" >&5
12287   (exit "$ac_status"); }; }; then
12288   cf_cv_define_sigwinch=yes
12289 else
12290   echo "$as_me: failed program was:" >&5
12291 cat "conftest.$ac_ext" >&5
12292 cat >"conftest.$ac_ext" <<_ACEOF
12293 #line 12293 "configure"
12294 #include "confdefs.h"
12295
12296 #undef _XOPEN_SOURCE
12297 #undef _POSIX_SOURCE
12298 #undef _POSIX_C_SOURCE
12299 #include <sys/types.h>
12300 #include <sys/signal.h>
12301
12302 int
12303 main (void)
12304 {
12305 int x = SIGWINCH; (void)x
12306   ;
12307   return 0;
12308 }
12309 _ACEOF
12310 rm -f "conftest.$ac_objext"
12311 if { (eval echo "$as_me:12311: \"$ac_compile\"") >&5
12312   (eval $ac_compile) 2>&5
12313   ac_status=$?
12314   echo "$as_me:12314: \$? = $ac_status" >&5
12315   (exit "$ac_status"); } &&
12316          { ac_try='test -s "conftest.$ac_objext"'
12317   { (eval echo "$as_me:12317: \"$ac_try\"") >&5
12318   (eval $ac_try) 2>&5
12319   ac_status=$?
12320   echo "$as_me:12320: \$? = $ac_status" >&5
12321   (exit "$ac_status"); }; }; then
12322   cf_cv_define_sigwinch=maybe
12323 else
12324   echo "$as_me: failed program was:" >&5
12325 cat "conftest.$ac_ext" >&5
12326 cf_cv_define_sigwinch=no
12327 fi
12328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12329
12330 fi
12331 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12332
12333 fi
12334 echo "$as_me:12334: result: $cf_cv_define_sigwinch" >&5
12335 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12336
12337 if test "$cf_cv_define_sigwinch" = maybe ; then
12338 echo "$as_me:12338: checking for actual SIGWINCH definition" >&5
12339 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12340 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12341   echo $ECHO_N "(cached) $ECHO_C" >&6
12342 else
12343
12344 cf_cv_fixup_sigwinch=unknown
12345 cf_sigwinch=32
12346 while test "$cf_sigwinch" != 1
12347 do
12348         cat >"conftest.$ac_ext" <<_ACEOF
12349 #line 12349 "configure"
12350 #include "confdefs.h"
12351
12352 #undef _XOPEN_SOURCE
12353 #undef _POSIX_SOURCE
12354 #undef _POSIX_C_SOURCE
12355 #include <sys/types.h>
12356 #include <sys/signal.h>
12357
12358 int
12359 main (void)
12360 {
12361
12362 #if SIGWINCH != $cf_sigwinch
12363 #error SIGWINCH is not $cf_sigwinch
12364 #endif
12365 int x = SIGWINCH; (void)x
12366   ;
12367   return 0;
12368 }
12369 _ACEOF
12370 rm -f "conftest.$ac_objext"
12371 if { (eval echo "$as_me:12371: \"$ac_compile\"") >&5
12372   (eval $ac_compile) 2>&5
12373   ac_status=$?
12374   echo "$as_me:12374: \$? = $ac_status" >&5
12375   (exit "$ac_status"); } &&
12376          { ac_try='test -s "conftest.$ac_objext"'
12377   { (eval echo "$as_me:12377: \"$ac_try\"") >&5
12378   (eval $ac_try) 2>&5
12379   ac_status=$?
12380   echo "$as_me:12380: \$? = $ac_status" >&5
12381   (exit "$ac_status"); }; }; then
12382   cf_cv_fixup_sigwinch=$cf_sigwinch
12383          break
12384 else
12385   echo "$as_me: failed program was:" >&5
12386 cat "conftest.$ac_ext" >&5
12387 fi
12388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12389
12390 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12391 done
12392
12393 fi
12394 echo "$as_me:12394: result: $cf_cv_fixup_sigwinch" >&5
12395 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12396
12397         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12398                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12399         fi
12400 fi
12401
12402 # Checks for CODESET support.
12403
12404 echo "$as_me:12404: checking for nl_langinfo and CODESET" >&5
12405 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12406 if test "${am_cv_langinfo_codeset+set}" = set; then
12407   echo $ECHO_N "(cached) $ECHO_C" >&6
12408 else
12409   cat >"conftest.$ac_ext" <<_ACEOF
12410 #line 12410 "configure"
12411 #include "confdefs.h"
12412
12413 $ac_includes_default
12414 #include <langinfo.h>
12415 int
12416 main (void)
12417 {
12418 char* cs = nl_langinfo(CODESET); (void)cs
12419   ;
12420   return 0;
12421 }
12422 _ACEOF
12423 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12424 if { (eval echo "$as_me:12424: \"$ac_link\"") >&5
12425   (eval $ac_link) 2>&5
12426   ac_status=$?
12427   echo "$as_me:12427: \$? = $ac_status" >&5
12428   (exit "$ac_status"); } &&
12429          { ac_try='test -s "conftest$ac_exeext"'
12430   { (eval echo "$as_me:12430: \"$ac_try\"") >&5
12431   (eval $ac_try) 2>&5
12432   ac_status=$?
12433   echo "$as_me:12433: \$? = $ac_status" >&5
12434   (exit "$ac_status"); }; }; then
12435   am_cv_langinfo_codeset=yes
12436 else
12437   echo "$as_me: failed program was:" >&5
12438 cat "conftest.$ac_ext" >&5
12439 am_cv_langinfo_codeset=no
12440 fi
12441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12442
12443 fi
12444 echo "$as_me:12444: result: $am_cv_langinfo_codeset" >&5
12445 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12446         if test "$am_cv_langinfo_codeset" = yes; then
12447
12448 cat >>confdefs.h <<\EOF
12449 #define HAVE_LANGINFO_CODESET 1
12450 EOF
12451
12452         fi
12453
12454 # use these variables to work around a defect in gcc's fixincludes.
12455 NCURSES_OK_WCHAR_T=
12456 NCURSES_OK_WINT_T=
12457
12458 echo "$as_me:12458: checking if you want wide-character code" >&5
12459 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12460
12461 # Check whether --enable-widec or --disable-widec was given.
12462 if test "${enable_widec+set}" = set; then
12463   enableval="$enable_widec"
12464   with_widec=$enableval
12465 else
12466   with_widec=$cf_dft_widec
12467 fi;
12468 echo "$as_me:12468: result: $with_widec" >&5
12469 echo "${ECHO_T}$with_widec" >&6
12470
12471 NCURSES_WCWIDTH_GRAPHICS=1
12472
12473 if test "x$with_widec" = xyes ; then
12474         if test "x$disable_lib_suffixes" = xno ; then
12475                 LIB_SUFFIX="w${LIB_SUFFIX}"
12476         fi
12477
12478 cat >>confdefs.h <<\EOF
12479 #define USE_WIDEC_SUPPORT 1
12480 EOF
12481
12482 cat >>confdefs.h <<\EOF
12483 #define NCURSES_WIDECHAR 1
12484 EOF
12485
12486         case "$CPPFLAGS" in
12487         (*_XOPEN_SOURCE=*)
12488                 ;;
12489         (*)
12490                 { echo "$as_me:12490: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12491 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12492                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12493                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12494                 ;;
12495         esac
12496
12497 for ac_header in \
12498 wchar.h \
12499 wctype.h \
12500
12501 do
12502 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12503 echo "$as_me:12503: checking for $ac_header" >&5
12504 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12505 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12506   echo $ECHO_N "(cached) $ECHO_C" >&6
12507 else
12508   cat >"conftest.$ac_ext" <<_ACEOF
12509 #line 12509 "configure"
12510 #include "confdefs.h"
12511 #include <$ac_header>
12512 _ACEOF
12513 if { (eval echo "$as_me:12513: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12514   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12515   ac_status=$?
12516   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12517   rm -f conftest.er1
12518   cat conftest.err >&5
12519   echo "$as_me:12519: \$? = $ac_status" >&5
12520   (exit "$ac_status"); } >/dev/null; then
12521   if test -s conftest.err; then
12522     ac_cpp_err=$ac_c_preproc_warn_flag
12523   else
12524     ac_cpp_err=
12525   fi
12526 else
12527   ac_cpp_err=yes
12528 fi
12529 if test -z "$ac_cpp_err"; then
12530   eval "$as_ac_Header=yes"
12531 else
12532   echo "$as_me: failed program was:" >&5
12533   cat "conftest.$ac_ext" >&5
12534   eval "$as_ac_Header=no"
12535 fi
12536 rm -f conftest.err "conftest.$ac_ext"
12537 fi
12538 echo "$as_me:12538: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12539 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12540 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12541   cat >>confdefs.h <<EOF
12542 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12543 EOF
12544
12545 fi
12546 done
12547
12548 echo "$as_me:12548: checking if wchar.h can be used as is" >&5
12549 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12550 if test "${cf_cv_wchar_h_okay+set}" = set; then
12551   echo $ECHO_N "(cached) $ECHO_C" >&6
12552 else
12553
12554 cat >"conftest.$ac_ext" <<_ACEOF
12555 #line 12555 "configure"
12556 #include "confdefs.h"
12557
12558 $ac_includes_default
12559 #ifdef HAVE_WCHAR_H
12560 #include <wchar.h>
12561 #endif
12562 #ifdef HAVE_WCTYPE_H
12563 #include <wctype.h>
12564 #endif
12565
12566 int
12567 main (void)
12568 {
12569
12570         wint_t foo = 0;
12571         int bar = iswpunct(foo)
12572   ;
12573   return 0;
12574 }
12575 _ACEOF
12576 rm -f "conftest.$ac_objext"
12577 if { (eval echo "$as_me:12577: \"$ac_compile\"") >&5
12578   (eval $ac_compile) 2>&5
12579   ac_status=$?
12580   echo "$as_me:12580: \$? = $ac_status" >&5
12581   (exit "$ac_status"); } &&
12582          { ac_try='test -s "conftest.$ac_objext"'
12583   { (eval echo "$as_me:12583: \"$ac_try\"") >&5
12584   (eval $ac_try) 2>&5
12585   ac_status=$?
12586   echo "$as_me:12586: \$? = $ac_status" >&5
12587   (exit "$ac_status"); }; }; then
12588   cf_cv_wchar_h_okay=yes
12589 else
12590   echo "$as_me: failed program was:" >&5
12591 cat "conftest.$ac_ext" >&5
12592 cf_cv_wchar_h_okay=no
12593 fi
12594 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12595 fi
12596 echo "$as_me:12596: result: $cf_cv_wchar_h_okay" >&5
12597 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12598
12599 if test "$cf_cv_wchar_h_okay" = no
12600 then
12601
12602 echo "$as_me:12602: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12603 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12604 cat >"conftest.$ac_ext" <<_ACEOF
12605 #line 12605 "configure"
12606 #include "confdefs.h"
12607 #include <sys/types.h>
12608
12609 int
12610 main (void)
12611 {
12612
12613 #ifndef _XOPEN_SOURCE_EXTENDED
12614 #error _XOPEN_SOURCE_EXTENDED is not defined
12615 #endif
12616   ;
12617   return 0;
12618 }
12619 _ACEOF
12620 rm -f "conftest.$ac_objext"
12621 if { (eval echo "$as_me:12621: \"$ac_compile\"") >&5
12622   (eval $ac_compile) 2>&5
12623   ac_status=$?
12624   echo "$as_me:12624: \$? = $ac_status" >&5
12625   (exit "$ac_status"); } &&
12626          { ac_try='test -s "conftest.$ac_objext"'
12627   { (eval echo "$as_me:12627: \"$ac_try\"") >&5
12628   (eval $ac_try) 2>&5
12629   ac_status=$?
12630   echo "$as_me:12630: \$? = $ac_status" >&5
12631   (exit "$ac_status"); }; }; then
12632   cf_result=no
12633 else
12634   echo "$as_me: failed program was:" >&5
12635 cat "conftest.$ac_ext" >&5
12636 cf_result=yes
12637 fi
12638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12639 echo "$as_me:12639: result: $cf_result" >&5
12640 echo "${ECHO_T}$cf_result" >&6
12641
12642 if test "$cf_result" = yes ; then
12643         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12644 elif test "x" != "x" ; then
12645         echo "$as_me:12645: checking checking for compatible value versus " >&5
12646 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12647         cat >"conftest.$ac_ext" <<_ACEOF
12648 #line 12648 "configure"
12649 #include "confdefs.h"
12650 #include <sys/types.h>
12651
12652 int
12653 main (void)
12654 {
12655
12656 #if _XOPEN_SOURCE_EXTENDED- < 0
12657 #error _XOPEN_SOURCE_EXTENDED- is negative
12658 #endif
12659   ;
12660   return 0;
12661 }
12662 _ACEOF
12663 rm -f "conftest.$ac_objext"
12664 if { (eval echo "$as_me:12664: \"$ac_compile\"") >&5
12665   (eval $ac_compile) 2>&5
12666   ac_status=$?
12667   echo "$as_me:12667: \$? = $ac_status" >&5
12668   (exit "$ac_status"); } &&
12669          { ac_try='test -s "conftest.$ac_objext"'
12670   { (eval echo "$as_me:12670: \"$ac_try\"") >&5
12671   (eval $ac_try) 2>&5
12672   ac_status=$?
12673   echo "$as_me:12673: \$? = $ac_status" >&5
12674   (exit "$ac_status"); }; }; then
12675   cf_result=yes
12676 else
12677   echo "$as_me: failed program was:" >&5
12678 cat "conftest.$ac_ext" >&5
12679 cf_result=no
12680 fi
12681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12682         echo "$as_me:12682: result: $cf_result" >&5
12683 echo "${ECHO_T}$cf_result" >&6
12684         if test "$cf_result" = no ; then
12685                 # perhaps we can override it - try...
12686                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12687         fi
12688 fi
12689
12690 fi
12691
12692 echo "$as_me:12692: checking if wcwidth agrees graphics are single-width" >&5
12693 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12694 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12695   echo $ECHO_N "(cached) $ECHO_C" >&6
12696 else
12697
12698 cat >conftest.in <<CF_EOF
12699 -       VT100 symbols
12700 0x250c  upper left corner
12701 0x2514  lower left corner
12702 0x2510  upper right corner
12703 0x2518  lower right corner
12704 0x251c  tee pointing left
12705 0x2524  tee pointing right
12706 0x2534  tee pointing up
12707 0x252c  tee pointing down
12708 0x2500  horizontal line
12709 0x2502  vertical line
12710 0x253c  large plus or crossover
12711 0x23ba  scan line 1
12712 0x23bd  scan line 9
12713 0x25c6  diamond
12714 0x2592  checker board (stipple)
12715 0x00b0  degree symbol
12716 0x00b1  plus/minus
12717 0x00b7  bullet
12718 -       Teletype 5410v1 symbols
12719 0x2190  arrow pointing left
12720 0x2192  arrow pointing right
12721 0x2193  arrow pointing down
12722 0x2191  arrow pointing up
12723 0x2592  board of squares
12724 0x2603  lantern symbol
12725 0x25ae  solid square block
12726 -       these defaults were invented for ncurses
12727 0x23bb  scan line 3
12728 0x23bc  scan line 7
12729 0x2264  less-than-or-equal-to
12730 0x2265  greater-than-or-equal-to
12731 0x03c0  greek pi
12732 0x2260  not-equal
12733 0x00a3  pound-sterling symbol
12734 -       thick-line-drawing
12735 0x250f  upper left corner
12736 0x2517  lower left corner
12737 0x2513  upper right corner
12738 0x251b  lower right corner
12739 0x2523  tee pointing left
12740 0x252b  tee pointing right
12741 0x253b  tee pointing up
12742 0x2533  tee pointing down
12743 0x2501  horizontal line
12744 0x2503  vertical line
12745 0x254b  large plus or crossover
12746 -       double-line-drawing
12747 0x2554  upper left corner
12748 0x255a  lower left corner
12749 0x2557  upper right corner
12750 0x255d  lower right corner
12751 0x2563  tee pointing left
12752 0x2560  tee pointing right
12753 0x2569  tee pointing up
12754 0x2566  tee pointing down
12755 0x2550  horizontal line
12756 0x2551  vertical line
12757 0x256c  large plus or crossover
12758 CF_EOF
12759 if test "$cross_compiling" = yes; then
12760   cf_cv_wcwidth_graphics=unknown
12761 else
12762   cat >"conftest.$ac_ext" <<_ACEOF
12763 #line 12763 "configure"
12764 #include "confdefs.h"
12765
12766 $ac_includes_default
12767
12768 #include <locale.h>
12769 #include <wchar.h>
12770
12771 #define MY_LEN 80
12772
12773 int
12774 main(void)
12775 {
12776         FILE *fp;
12777         int value;
12778         char buffer[MY_LEN + 1];
12779         char notes[MY_LEN + 1];
12780         int totals = 0;
12781         int passed = 0;
12782
12783         if (setlocale(LC_ALL, "en_US.UTF8") ||
12784                 setlocale(LC_ALL, "en_US.UTF-8") ||
12785                 setlocale(LC_ALL, "en_US.utf8") ||
12786                 setlocale(LC_ALL, "en_US.utf-8")) {
12787                 if ((fp = fopen("conftest.in", "r")) != 0) {
12788                         while (fgets(buffer, MY_LEN, fp) != 0) {
12789                                 if (*buffer == '-') {
12790                                         fprintf(stderr, "\\t%s", buffer);
12791                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12792                                         ++totals;
12793                                         if (wcwidth(value) == 1)
12794                                                 ++passed;
12795                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12796                                 } else {
12797                                         fprintf(stderr, "?\\t%s", buffer);
12798                                 }
12799                         }
12800                 }
12801         }
12802         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12803         return (totals == passed) ? 0 : 1;
12804 }
12805
12806 _ACEOF
12807 rm -f "conftest$ac_exeext"
12808 if { (eval echo "$as_me:12808: \"$ac_link\"") >&5
12809   (eval $ac_link) 2>&5
12810   ac_status=$?
12811   echo "$as_me:12811: \$? = $ac_status" >&5
12812   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12813   { (eval echo "$as_me:12813: \"$ac_try\"") >&5
12814   (eval $ac_try) 2>&5
12815   ac_status=$?
12816   echo "$as_me:12816: \$? = $ac_status" >&5
12817   (exit "$ac_status"); }; }; then
12818   cf_cv_wcwidth_graphics=yes
12819 else
12820   echo "$as_me: program exited with status $ac_status" >&5
12821 echo "$as_me: failed program was:" >&5
12822 cat "conftest.$ac_ext" >&5
12823 cf_cv_wcwidth_graphics=no
12824 fi
12825 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12826 fi
12827
12828 fi
12829 echo "$as_me:12829: result: $cf_cv_wcwidth_graphics" >&5
12830 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12831
12832         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12833
12834         # with_overwrite=no
12835         NCURSES_CH_T=cchar_t
12836
12837 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12838 do
12839 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12840 echo "$as_me:12840: checking for $ac_func" >&5
12841 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12842 if eval "test \"\${$as_ac_var+set}\" = set"; then
12843   echo $ECHO_N "(cached) $ECHO_C" >&6
12844 else
12845   cat >"conftest.$ac_ext" <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848 #define $ac_func autoconf_temporary
12849 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12850 #undef $ac_func
12851
12852 #ifdef __cplusplus
12853 extern "C"
12854 #endif
12855
12856 /* We use char because int might match the return type of a gcc2
12857    builtin and then its argument prototype would still apply.  */
12858 char $ac_func (void);
12859
12860 int
12861 main (void)
12862 {
12863
12864 /* The GNU C library defines stubs for functions which it implements
12865     to always fail with ENOSYS.  Some functions are actually named
12866     something starting with __ and the normal name is an alias.  */
12867 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12868 #error found stub for $ac_func
12869 #endif
12870
12871         return $ac_func ();
12872   ;
12873   return 0;
12874 }
12875 _ACEOF
12876 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12877 if { (eval echo "$as_me:12877: \"$ac_link\"") >&5
12878   (eval $ac_link) 2>&5
12879   ac_status=$?
12880   echo "$as_me:12880: \$? = $ac_status" >&5
12881   (exit "$ac_status"); } &&
12882          { ac_try='test -s "conftest$ac_exeext"'
12883   { (eval echo "$as_me:12883: \"$ac_try\"") >&5
12884   (eval $ac_try) 2>&5
12885   ac_status=$?
12886   echo "$as_me:12886: \$? = $ac_status" >&5
12887   (exit "$ac_status"); }; }; then
12888   eval "$as_ac_var=yes"
12889 else
12890   echo "$as_me: failed program was:" >&5
12891 cat "conftest.$ac_ext" >&5
12892 eval "$as_ac_var=no"
12893 fi
12894 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12895 fi
12896 echo "$as_me:12896: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12897 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12898 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12899   cat >>confdefs.h <<EOF
12900 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12901 EOF
12902
12903 fi
12904 done
12905
12906         if test "x$ac_cv_func_putwc" != xyes ; then
12907
12908 for ac_header in wchar.h
12909 do
12910 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12911 echo "$as_me:12911: checking for $ac_header" >&5
12912 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12913 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12914   echo $ECHO_N "(cached) $ECHO_C" >&6
12915 else
12916   cat >"conftest.$ac_ext" <<_ACEOF
12917 #line 12917 "configure"
12918 #include "confdefs.h"
12919 #include <$ac_header>
12920 _ACEOF
12921 if { (eval echo "$as_me:12921: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12922   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12923   ac_status=$?
12924   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12925   rm -f conftest.er1
12926   cat conftest.err >&5
12927   echo "$as_me:12927: \$? = $ac_status" >&5
12928   (exit "$ac_status"); } >/dev/null; then
12929   if test -s conftest.err; then
12930     ac_cpp_err=$ac_c_preproc_warn_flag
12931   else
12932     ac_cpp_err=
12933   fi
12934 else
12935   ac_cpp_err=yes
12936 fi
12937 if test -z "$ac_cpp_err"; then
12938   eval "$as_ac_Header=yes"
12939 else
12940   echo "$as_me: failed program was:" >&5
12941   cat "conftest.$ac_ext" >&5
12942   eval "$as_ac_Header=no"
12943 fi
12944 rm -f conftest.err "conftest.$ac_ext"
12945 fi
12946 echo "$as_me:12946: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12947 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12948 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12949   cat >>confdefs.h <<EOF
12950 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12951 EOF
12952
12953 fi
12954 done
12955
12956 echo "$as_me:12956: checking for multibyte character support" >&5
12957 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12958 if test "${cf_cv_utf8_lib+set}" = set; then
12959   echo $ECHO_N "(cached) $ECHO_C" >&6
12960 else
12961
12962         cf_save_LIBS="$LIBS"
12963         cat >"conftest.$ac_ext" <<_ACEOF
12964 #line 12964 "configure"
12965 #include "confdefs.h"
12966
12967 $ac_includes_default
12968 #ifdef HAVE_WCHAR_H
12969 #include <wchar.h>
12970 #endif
12971
12972 int
12973 main (void)
12974 {
12975 putwc(0,0);
12976   ;
12977   return 0;
12978 }
12979 _ACEOF
12980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12981 if { (eval echo "$as_me:12981: \"$ac_link\"") >&5
12982   (eval $ac_link) 2>&5
12983   ac_status=$?
12984   echo "$as_me:12984: \$? = $ac_status" >&5
12985   (exit "$ac_status"); } &&
12986          { ac_try='test -s "conftest$ac_exeext"'
12987   { (eval echo "$as_me:12987: \"$ac_try\"") >&5
12988   (eval $ac_try) 2>&5
12989   ac_status=$?
12990   echo "$as_me:12990: \$? = $ac_status" >&5
12991   (exit "$ac_status"); }; }; then
12992   cf_cv_utf8_lib=yes
12993 else
12994   echo "$as_me: failed program was:" >&5
12995 cat "conftest.$ac_ext" >&5
12996
12997 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12998 # will be set on completion of the AC_TRY_LINK below.
12999 cf_cv_header_path_utf8=
13000 cf_cv_library_path_utf8=
13001
13002 echo "${as_me:-configure}:13002: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13003
13004 cf_save_LIBS="$LIBS"
13005
13006 cat >"conftest.$ac_ext" <<_ACEOF
13007 #line 13007 "configure"
13008 #include "confdefs.h"
13009
13010 #include <libutf8.h>
13011 int
13012 main (void)
13013 {
13014 putwc(0,0);
13015   ;
13016   return 0;
13017 }
13018 _ACEOF
13019 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13020 if { (eval echo "$as_me:13020: \"$ac_link\"") >&5
13021   (eval $ac_link) 2>&5
13022   ac_status=$?
13023   echo "$as_me:13023: \$? = $ac_status" >&5
13024   (exit "$ac_status"); } &&
13025          { ac_try='test -s "conftest$ac_exeext"'
13026   { (eval echo "$as_me:13026: \"$ac_try\"") >&5
13027   (eval $ac_try) 2>&5
13028   ac_status=$?
13029   echo "$as_me:13029: \$? = $ac_status" >&5
13030   (exit "$ac_status"); }; }; then
13031
13032         cf_cv_find_linkage_utf8=yes
13033         cf_cv_header_path_utf8=/usr/include
13034         cf_cv_library_path_utf8=/usr/lib
13035
13036 else
13037   echo "$as_me: failed program was:" >&5
13038 cat "conftest.$ac_ext" >&5
13039
13040 LIBS="-lutf8  $cf_save_LIBS"
13041
13042 cat >"conftest.$ac_ext" <<_ACEOF
13043 #line 13043 "configure"
13044 #include "confdefs.h"
13045
13046 #include <libutf8.h>
13047 int
13048 main (void)
13049 {
13050 putwc(0,0);
13051   ;
13052   return 0;
13053 }
13054 _ACEOF
13055 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13056 if { (eval echo "$as_me:13056: \"$ac_link\"") >&5
13057   (eval $ac_link) 2>&5
13058   ac_status=$?
13059   echo "$as_me:13059: \$? = $ac_status" >&5
13060   (exit "$ac_status"); } &&
13061          { ac_try='test -s "conftest$ac_exeext"'
13062   { (eval echo "$as_me:13062: \"$ac_try\"") >&5
13063   (eval $ac_try) 2>&5
13064   ac_status=$?
13065   echo "$as_me:13065: \$? = $ac_status" >&5
13066   (exit "$ac_status"); }; }; then
13067
13068         cf_cv_find_linkage_utf8=yes
13069         cf_cv_header_path_utf8=/usr/include
13070         cf_cv_library_path_utf8=/usr/lib
13071         cf_cv_library_file_utf8="-lutf8"
13072
13073 else
13074   echo "$as_me: failed program was:" >&5
13075 cat "conftest.$ac_ext" >&5
13076
13077         cf_cv_find_linkage_utf8=no
13078         LIBS="$cf_save_LIBS"
13079
13080         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13081
13082 echo "${as_me:-configure}:13082: testing find linkage for utf8 library ..." 1>&5
13083
13084 echo "${as_me:-configure}:13084: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13085
13086         cf_save_CPPFLAGS="$CPPFLAGS"
13087         cf_test_CPPFLAGS="$CPPFLAGS"
13088
13089 cf_search=
13090
13091 # collect the current set of include-directories from compiler flags
13092 cf_header_path_list=""
13093 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13094         for cf_header_path in $CPPFLAGS $CFLAGS
13095         do
13096                 case "$cf_header_path" in
13097                 (-I*)
13098                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13099
13100 test "x$cf_header_path" != "xNONE" && \
13101 test -d "$cf_header_path" && \
13102  {
13103         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13104         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13105         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13106         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13107         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13108         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13109 }
13110
13111                         cf_header_path_list="$cf_header_path_list $cf_search"
13112                         ;;
13113                 esac
13114         done
13115 fi
13116
13117 # add the variations for the package we are looking for
13118
13119 cf_search=
13120
13121 test "x$prefix" != "xNONE" && \
13122 test -d "$prefix" && \
13123  {
13124         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13125         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13126         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13127         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13128         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13129         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13130 }
13131
13132 for cf_subdir_prefix in \
13133         /usr \
13134         /usr/local \
13135         /usr/pkg \
13136         /opt \
13137         /opt/local \
13138         $HOME
13139 do
13140
13141 test "x$cf_subdir_prefix" != "x$prefix" && \
13142 test -d "$cf_subdir_prefix" && \
13143 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13144         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13145         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13146         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13147         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13148         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13149         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13150 }
13151
13152 done
13153
13154 test "$includedir" != NONE && \
13155 test "$includedir" != "/usr/include" && \
13156 test -d "$includedir" && {
13157         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13158         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13159 }
13160
13161 test "$oldincludedir" != NONE && \
13162 test "$oldincludedir" != "/usr/include" && \
13163 test -d "$oldincludedir" && {
13164         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13165         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13166 }
13167
13168 cf_search="$cf_search $cf_header_path_list"
13169
13170         for cf_cv_header_path_utf8 in $cf_search
13171         do
13172                 if test -d "$cf_cv_header_path_utf8" ; then
13173                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13174
13175 echo "${as_me:-configure}:13175: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13176
13177                         CPPFLAGS="$cf_save_CPPFLAGS"
13178
13179         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13180         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13181
13182                         cat >"conftest.$ac_ext" <<_ACEOF
13183 #line 13183 "configure"
13184 #include "confdefs.h"
13185
13186 #include <libutf8.h>
13187 int
13188 main (void)
13189 {
13190 putwc(0,0);
13191   ;
13192   return 0;
13193 }
13194 _ACEOF
13195 rm -f "conftest.$ac_objext"
13196 if { (eval echo "$as_me:13196: \"$ac_compile\"") >&5
13197   (eval $ac_compile) 2>&5
13198   ac_status=$?
13199   echo "$as_me:13199: \$? = $ac_status" >&5
13200   (exit "$ac_status"); } &&
13201          { ac_try='test -s "conftest.$ac_objext"'
13202   { (eval echo "$as_me:13202: \"$ac_try\"") >&5
13203   (eval $ac_try) 2>&5
13204   ac_status=$?
13205   echo "$as_me:13205: \$? = $ac_status" >&5
13206   (exit "$ac_status"); }; }; then
13207
13208                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13209
13210 echo "${as_me:-configure}:13210: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13211
13212                                 cf_cv_find_linkage_utf8=maybe
13213                                 cf_test_CPPFLAGS="$CPPFLAGS"
13214                                 break
13215 else
13216   echo "$as_me: failed program was:" >&5
13217 cat "conftest.$ac_ext" >&5
13218
13219                                 CPPFLAGS="$cf_save_CPPFLAGS"
13220
13221 fi
13222 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13223                 fi
13224         done
13225
13226         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13227
13228 echo "${as_me:-configure}:13228: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13229
13230                 cf_save_LIBS="$LIBS"
13231                 cf_save_LDFLAGS="$LDFLAGS"
13232
13233                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13234
13235 cf_search=
13236 cf_library_path_list=""
13237 if test -n "${LDFLAGS}${LIBS}" ; then
13238         for cf_library_path in $LDFLAGS $LIBS
13239         do
13240                 case "$cf_library_path" in
13241                 (-L*)
13242                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13243
13244 test "x$cf_library_path" != "xNONE" && \
13245 test -d "$cf_library_path" && \
13246  {
13247         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13248         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13249         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13250         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13251         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13252         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13253 }
13254
13255                         cf_library_path_list="$cf_library_path_list $cf_search"
13256                         ;;
13257                 esac
13258         done
13259 fi
13260
13261 cf_search=
13262
13263 test "x$prefix" != "xNONE" && \
13264 test -d "$prefix" && \
13265  {
13266         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13267         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13268         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13269         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13270         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13271         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13272 }
13273
13274 for cf_subdir_prefix in \
13275         /usr \
13276         /usr/local \
13277         /usr/pkg \
13278         /opt \
13279         /opt/local \
13280         $HOME
13281 do
13282
13283 test "x$cf_subdir_prefix" != "x$prefix" && \
13284 test -d "$cf_subdir_prefix" && \
13285 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13286         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13287         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13288         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13289         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13290         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13291         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13292 }
13293
13294 done
13295
13296 cf_search="$cf_library_path_list $cf_search"
13297
13298                         for cf_cv_library_path_utf8 in $cf_search
13299                         do
13300                                 if test -d "$cf_cv_library_path_utf8" ; then
13301                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13302
13303 echo "${as_me:-configure}:13303: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13304
13305                                         CPPFLAGS="$cf_test_CPPFLAGS"
13306                                         LIBS="-lutf8  $cf_save_LIBS"
13307                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13308                                         cat >"conftest.$ac_ext" <<_ACEOF
13309 #line 13309 "configure"
13310 #include "confdefs.h"
13311
13312 #include <libutf8.h>
13313 int
13314 main (void)
13315 {
13316 putwc(0,0);
13317   ;
13318   return 0;
13319 }
13320 _ACEOF
13321 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13322 if { (eval echo "$as_me:13322: \"$ac_link\"") >&5
13323   (eval $ac_link) 2>&5
13324   ac_status=$?
13325   echo "$as_me:13325: \$? = $ac_status" >&5
13326   (exit "$ac_status"); } &&
13327          { ac_try='test -s "conftest$ac_exeext"'
13328   { (eval echo "$as_me:13328: \"$ac_try\"") >&5
13329   (eval $ac_try) 2>&5
13330   ac_status=$?
13331   echo "$as_me:13331: \$? = $ac_status" >&5
13332   (exit "$ac_status"); }; }; then
13333
13334                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13335
13336 echo "${as_me:-configure}:13336: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13337
13338                                         cf_cv_find_linkage_utf8=yes
13339                                         cf_cv_library_file_utf8="-lutf8"
13340                                         break
13341 else
13342   echo "$as_me: failed program was:" >&5
13343 cat "conftest.$ac_ext" >&5
13344
13345                                         CPPFLAGS="$cf_save_CPPFLAGS"
13346                                         LIBS="$cf_save_LIBS"
13347                                         LDFLAGS="$cf_save_LDFLAGS"
13348
13349 fi
13350 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13351                                 fi
13352                         done
13353                         CPPFLAGS="$cf_save_CPPFLAGS"
13354                         LDFLAGS="$cf_save_LDFLAGS"
13355                 fi
13356
13357         else
13358                 cf_cv_find_linkage_utf8=no
13359         fi
13360
13361 fi
13362 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13363
13364 fi
13365 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13366
13367 LIBS="$cf_save_LIBS"
13368
13369 if test "$cf_cv_find_linkage_utf8" = yes ; then
13370 cf_cv_utf8_lib=add-on
13371 else
13372 cf_cv_utf8_lib=no
13373 fi
13374
13375 fi
13376 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13377 fi
13378 echo "$as_me:13378: result: $cf_cv_utf8_lib" >&5
13379 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13380
13381 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13382 # ncurses/ncursesw:
13383 if test "$cf_cv_utf8_lib" = "add-on" ; then
13384
13385 cat >>confdefs.h <<\EOF
13386 #define HAVE_LIBUTF8_H 1
13387 EOF
13388
13389 if test -n "$cf_cv_header_path_utf8" ; then
13390   for cf_add_incdir in $cf_cv_header_path_utf8
13391   do
13392         while test "$cf_add_incdir" != /usr/include
13393         do
13394           if test -d "$cf_add_incdir"
13395           then
13396                 cf_have_incdir=no
13397                 if test -n "$CFLAGS$CPPFLAGS" ; then
13398                   # a loop is needed to ensure we can add subdirs of existing dirs
13399                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13400                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13401                           cf_have_incdir=yes; break
13402                         fi
13403                   done
13404                 fi
13405
13406                 if test "$cf_have_incdir" = no ; then
13407                   if test "$cf_add_incdir" = /usr/local/include ; then
13408                         if test "$GCC" = yes
13409                         then
13410                           cf_save_CPPFLAGS=$CPPFLAGS
13411
13412         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13413         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13414
13415                           cat >"conftest.$ac_ext" <<_ACEOF
13416 #line 13416 "configure"
13417 #include "confdefs.h"
13418 #include <stdio.h>
13419 int
13420 main (void)
13421 {
13422 printf("Hello")
13423   ;
13424   return 0;
13425 }
13426 _ACEOF
13427 rm -f "conftest.$ac_objext"
13428 if { (eval echo "$as_me:13428: \"$ac_compile\"") >&5
13429   (eval $ac_compile) 2>&5
13430   ac_status=$?
13431   echo "$as_me:13431: \$? = $ac_status" >&5
13432   (exit "$ac_status"); } &&
13433          { ac_try='test -s "conftest.$ac_objext"'
13434   { (eval echo "$as_me:13434: \"$ac_try\"") >&5
13435   (eval $ac_try) 2>&5
13436   ac_status=$?
13437   echo "$as_me:13437: \$? = $ac_status" >&5
13438   (exit "$ac_status"); }; }; then
13439   :
13440 else
13441   echo "$as_me: failed program was:" >&5
13442 cat "conftest.$ac_ext" >&5
13443 cf_have_incdir=yes
13444 fi
13445 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13446                           CPPFLAGS=$cf_save_CPPFLAGS
13447                         fi
13448                   fi
13449                 fi
13450
13451                 if test "$cf_have_incdir" = no ; then
13452                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13453
13454 echo "${as_me:-configure}:13454: testing adding $cf_add_incdir to include-path ..." 1>&5
13455
13456                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13457
13458                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13459                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13460                   cf_add_incdir="$cf_top_incdir"
13461                 else
13462                   break
13463                 fi
13464           else
13465                 break
13466           fi
13467         done
13468   done
13469 fi
13470
13471 if test -n "$cf_cv_library_path_utf8" ; then
13472         for cf_add_libdir in $cf_cv_library_path_utf8
13473         do
13474                 if test "$cf_add_libdir" = /usr/lib ; then
13475                         :
13476                 elif test -d "$cf_add_libdir"
13477                 then
13478                         cf_have_libdir=no
13479                         if test -n "$LDFLAGS$LIBS" ; then
13480                                 # a loop is needed to ensure we can add subdirs of existing dirs
13481                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13482                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13483                                                 cf_have_libdir=yes; break
13484                                         fi
13485                                 done
13486                         fi
13487                         if test "$cf_have_libdir" = no ; then
13488                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13489
13490 echo "${as_me:-configure}:13490: testing adding $cf_add_libdir to library-path ..." 1>&5
13491
13492                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13493                         fi
13494                 fi
13495         done
13496 fi
13497
13498 cf_add_libs="$LIBS"
13499 # reverse order
13500 cf_add_0lib=
13501 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13502 # filter duplicates
13503 for cf_add_1lib in $cf_add_0lib; do
13504         for cf_add_2lib in $cf_add_libs; do
13505                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13506                         cf_add_1lib=
13507                         break
13508                 fi
13509         done
13510         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13511 done
13512 LIBS="$cf_add_libs"
13513
13514 fi
13515
13516                 if test "$cf_cv_utf8_lib" != no ; then
13517                         NCURSES_LIBUTF8=1
13518                 fi
13519         fi
13520
13521 # This is needed on Tru64 5.0 to declare mbstate_t
13522 echo "$as_me:13522: checking if we must include wchar.h to declare mbstate_t" >&5
13523 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13524 if test "${cf_cv_mbstate_t+set}" = set; then
13525   echo $ECHO_N "(cached) $ECHO_C" >&6
13526 else
13527
13528 cat >"conftest.$ac_ext" <<_ACEOF
13529 #line 13529 "configure"
13530 #include "confdefs.h"
13531
13532 #include <stdlib.h>
13533 #include <stdarg.h>
13534 #include <stdio.h>
13535 #ifdef HAVE_LIBUTF8_H
13536 #include <libutf8.h>
13537 #endif
13538 int
13539 main (void)
13540 {
13541 mbstate_t state
13542   ;
13543   return 0;
13544 }
13545 _ACEOF
13546 rm -f "conftest.$ac_objext"
13547 if { (eval echo "$as_me:13547: \"$ac_compile\"") >&5
13548   (eval $ac_compile) 2>&5
13549   ac_status=$?
13550   echo "$as_me:13550: \$? = $ac_status" >&5
13551   (exit "$ac_status"); } &&
13552          { ac_try='test -s "conftest.$ac_objext"'
13553   { (eval echo "$as_me:13553: \"$ac_try\"") >&5
13554   (eval $ac_try) 2>&5
13555   ac_status=$?
13556   echo "$as_me:13556: \$? = $ac_status" >&5
13557   (exit "$ac_status"); }; }; then
13558   cf_cv_mbstate_t=no
13559 else
13560   echo "$as_me: failed program was:" >&5
13561 cat "conftest.$ac_ext" >&5
13562 cat >"conftest.$ac_ext" <<_ACEOF
13563 #line 13563 "configure"
13564 #include "confdefs.h"
13565
13566 #include <stdlib.h>
13567 #include <stdarg.h>
13568 #include <stdio.h>
13569 #include <wchar.h>
13570 #ifdef HAVE_LIBUTF8_H
13571 #include <libutf8.h>
13572 #endif
13573 int
13574 main (void)
13575 {
13576 mbstate_t value
13577   ;
13578   return 0;
13579 }
13580 _ACEOF
13581 rm -f "conftest.$ac_objext"
13582 if { (eval echo "$as_me:13582: \"$ac_compile\"") >&5
13583   (eval $ac_compile) 2>&5
13584   ac_status=$?
13585   echo "$as_me:13585: \$? = $ac_status" >&5
13586   (exit "$ac_status"); } &&
13587          { ac_try='test -s "conftest.$ac_objext"'
13588   { (eval echo "$as_me:13588: \"$ac_try\"") >&5
13589   (eval $ac_try) 2>&5
13590   ac_status=$?
13591   echo "$as_me:13591: \$? = $ac_status" >&5
13592   (exit "$ac_status"); }; }; then
13593   cf_cv_mbstate_t=yes
13594 else
13595   echo "$as_me: failed program was:" >&5
13596 cat "conftest.$ac_ext" >&5
13597 cf_cv_mbstate_t=unknown
13598 fi
13599 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13600 fi
13601 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13602 fi
13603 echo "$as_me:13603: result: $cf_cv_mbstate_t" >&5
13604 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13605
13606 if test "$cf_cv_mbstate_t" = yes ; then
13607
13608 cat >>confdefs.h <<\EOF
13609 #define NEED_WCHAR_H 1
13610 EOF
13611
13612         NEED_WCHAR_H=1
13613 fi
13614
13615 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13616 if test "$cf_cv_mbstate_t" = unknown ; then
13617         NCURSES_MBSTATE_T=1
13618 fi
13619
13620 # This is needed on Tru64 5.0 to declare wchar_t
13621 echo "$as_me:13621: checking if we must include wchar.h to declare wchar_t" >&5
13622 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13623 if test "${cf_cv_wchar_t+set}" = set; then
13624   echo $ECHO_N "(cached) $ECHO_C" >&6
13625 else
13626
13627 cat >"conftest.$ac_ext" <<_ACEOF
13628 #line 13628 "configure"
13629 #include "confdefs.h"
13630
13631 #include <stdlib.h>
13632 #include <stdarg.h>
13633 #include <stdio.h>
13634 #ifdef HAVE_LIBUTF8_H
13635 #include <libutf8.h>
13636 #endif
13637 int
13638 main (void)
13639 {
13640 wchar_t state
13641   ;
13642   return 0;
13643 }
13644 _ACEOF
13645 rm -f "conftest.$ac_objext"
13646 if { (eval echo "$as_me:13646: \"$ac_compile\"") >&5
13647   (eval $ac_compile) 2>&5
13648   ac_status=$?
13649   echo "$as_me:13649: \$? = $ac_status" >&5
13650   (exit "$ac_status"); } &&
13651          { ac_try='test -s "conftest.$ac_objext"'
13652   { (eval echo "$as_me:13652: \"$ac_try\"") >&5
13653   (eval $ac_try) 2>&5
13654   ac_status=$?
13655   echo "$as_me:13655: \$? = $ac_status" >&5
13656   (exit "$ac_status"); }; }; then
13657   cf_cv_wchar_t=no
13658 else
13659   echo "$as_me: failed program was:" >&5
13660 cat "conftest.$ac_ext" >&5
13661 cat >"conftest.$ac_ext" <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664
13665 #include <stdlib.h>
13666 #include <stdarg.h>
13667 #include <stdio.h>
13668 #include <wchar.h>
13669 #ifdef HAVE_LIBUTF8_H
13670 #include <libutf8.h>
13671 #endif
13672 int
13673 main (void)
13674 {
13675 wchar_t value
13676   ;
13677   return 0;
13678 }
13679 _ACEOF
13680 rm -f "conftest.$ac_objext"
13681 if { (eval echo "$as_me:13681: \"$ac_compile\"") >&5
13682   (eval $ac_compile) 2>&5
13683   ac_status=$?
13684   echo "$as_me:13684: \$? = $ac_status" >&5
13685   (exit "$ac_status"); } &&
13686          { ac_try='test -s "conftest.$ac_objext"'
13687   { (eval echo "$as_me:13687: \"$ac_try\"") >&5
13688   (eval $ac_try) 2>&5
13689   ac_status=$?
13690   echo "$as_me:13690: \$? = $ac_status" >&5
13691   (exit "$ac_status"); }; }; then
13692   cf_cv_wchar_t=yes
13693 else
13694   echo "$as_me: failed program was:" >&5
13695 cat "conftest.$ac_ext" >&5
13696 cf_cv_wchar_t=unknown
13697 fi
13698 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13699 fi
13700 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13701 fi
13702 echo "$as_me:13702: result: $cf_cv_wchar_t" >&5
13703 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13704
13705 if test "$cf_cv_wchar_t" = yes ; then
13706
13707 cat >>confdefs.h <<\EOF
13708 #define NEED_WCHAR_H 1
13709 EOF
13710
13711         NEED_WCHAR_H=1
13712 fi
13713
13714 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13715 if test "$cf_cv_wchar_t" = unknown ; then
13716         NCURSES_WCHAR_T=1
13717 fi
13718
13719 # if we find wchar_t in either place, use substitution to provide a fallback.
13720 if test "$cf_cv_wchar_t" != unknown ; then
13721         NCURSES_OK_WCHAR_T=1
13722 fi
13723
13724 # This is needed on Tru64 5.0 to declare wint_t
13725 echo "$as_me:13725: checking if we must include wchar.h to declare wint_t" >&5
13726 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13727 if test "${cf_cv_wint_t+set}" = set; then
13728   echo $ECHO_N "(cached) $ECHO_C" >&6
13729 else
13730
13731 cat >"conftest.$ac_ext" <<_ACEOF
13732 #line 13732 "configure"
13733 #include "confdefs.h"
13734
13735 #include <stdlib.h>
13736 #include <stdarg.h>
13737 #include <stdio.h>
13738 #ifdef HAVE_LIBUTF8_H
13739 #include <libutf8.h>
13740 #endif
13741 int
13742 main (void)
13743 {
13744 wint_t state
13745   ;
13746   return 0;
13747 }
13748 _ACEOF
13749 rm -f "conftest.$ac_objext"
13750 if { (eval echo "$as_me:13750: \"$ac_compile\"") >&5
13751   (eval $ac_compile) 2>&5
13752   ac_status=$?
13753   echo "$as_me:13753: \$? = $ac_status" >&5
13754   (exit "$ac_status"); } &&
13755          { ac_try='test -s "conftest.$ac_objext"'
13756   { (eval echo "$as_me:13756: \"$ac_try\"") >&5
13757   (eval $ac_try) 2>&5
13758   ac_status=$?
13759   echo "$as_me:13759: \$? = $ac_status" >&5
13760   (exit "$ac_status"); }; }; then
13761   cf_cv_wint_t=no
13762 else
13763   echo "$as_me: failed program was:" >&5
13764 cat "conftest.$ac_ext" >&5
13765 cat >"conftest.$ac_ext" <<_ACEOF
13766 #line 13766 "configure"
13767 #include "confdefs.h"
13768
13769 #include <stdlib.h>
13770 #include <stdarg.h>
13771 #include <stdio.h>
13772 #include <wchar.h>
13773 #ifdef HAVE_LIBUTF8_H
13774 #include <libutf8.h>
13775 #endif
13776 int
13777 main (void)
13778 {
13779 wint_t value
13780   ;
13781   return 0;
13782 }
13783 _ACEOF
13784 rm -f "conftest.$ac_objext"
13785 if { (eval echo "$as_me:13785: \"$ac_compile\"") >&5
13786   (eval $ac_compile) 2>&5
13787   ac_status=$?
13788   echo "$as_me:13788: \$? = $ac_status" >&5
13789   (exit "$ac_status"); } &&
13790          { ac_try='test -s "conftest.$ac_objext"'
13791   { (eval echo "$as_me:13791: \"$ac_try\"") >&5
13792   (eval $ac_try) 2>&5
13793   ac_status=$?
13794   echo "$as_me:13794: \$? = $ac_status" >&5
13795   (exit "$ac_status"); }; }; then
13796   cf_cv_wint_t=yes
13797 else
13798   echo "$as_me: failed program was:" >&5
13799 cat "conftest.$ac_ext" >&5
13800 cf_cv_wint_t=unknown
13801 fi
13802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13803 fi
13804 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13805 fi
13806 echo "$as_me:13806: result: $cf_cv_wint_t" >&5
13807 echo "${ECHO_T}$cf_cv_wint_t" >&6
13808
13809 if test "$cf_cv_wint_t" = yes ; then
13810
13811 cat >>confdefs.h <<\EOF
13812 #define NEED_WCHAR_H 1
13813 EOF
13814
13815         NEED_WCHAR_H=1
13816 fi
13817
13818 # if we do not find wint_t in either place, use substitution to provide a fallback.
13819 if test "$cf_cv_wint_t" = unknown ; then
13820         NCURSES_WINT_T=1
13821 fi
13822
13823 # if we find wint_t in either place, use substitution to provide a fallback.
13824 if test "$cf_cv_wint_t" != unknown ; then
13825         NCURSES_OK_WINT_T=1
13826 fi
13827
13828         if test "$NCURSES_MBSTATE_T" != 0; then
13829
13830 cat >>confdefs.h <<\EOF
13831 #define NEED_MBSTATE_T_DEF 1
13832 EOF
13833
13834         fi
13835 fi
13836
13837 ###   use option --disable-lp64 to allow long chtype
13838 echo "$as_me:13838: checking whether to enable _LP64 definition in curses.h" >&5
13839 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13840
13841 # Check whether --enable-lp64 or --disable-lp64 was given.
13842 if test "${enable_lp64+set}" = set; then
13843   enableval="$enable_lp64"
13844   with_lp64=$enableval
13845 else
13846   with_lp64=$cf_dft_with_lp64
13847 fi;
13848 echo "$as_me:13848: result: $with_lp64" >&5
13849 echo "${ECHO_T}$with_lp64" >&6
13850
13851 if test "x$with_lp64" = xyes ; then
13852         cf_cv_enable_lp64=1
13853 else
13854         cf_cv_enable_lp64=0
13855 fi
13856
13857 # Check whether --enable-largefile or --disable-largefile was given.
13858 if test "${enable_largefile+set}" = set; then
13859   enableval="$enable_largefile"
13860
13861 fi;
13862 if test "$enable_largefile" != no; then
13863
13864   echo "$as_me:13864: checking for special C compiler options needed for large files" >&5
13865 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13866 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13867   echo $ECHO_N "(cached) $ECHO_C" >&6
13868 else
13869   ac_cv_sys_largefile_CC=no
13870      if test "$GCC" != yes; then
13871        ac_save_CC=$CC
13872        while :; do
13873          # IRIX 6.2 and later do not support large files by default,
13874          # so use the C compiler's -n32 option if that helps.
13875          cat >"conftest.$ac_ext" <<_ACEOF
13876 #line 13876 "configure"
13877 #include "confdefs.h"
13878 #include <sys/types.h>
13879  /* Check that off_t can represent 2**63 - 1 correctly.
13880     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13881     since some C++ compilers masquerading as C compilers
13882     incorrectly reject 9223372036854775807.  */
13883 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13884   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13885                        && LARGE_OFF_T % 2147483647 == 1)
13886                       ? 1 : -1];
13887 int
13888 main (void)
13889 {
13890
13891   ;
13892   return 0;
13893 }
13894 _ACEOF
13895          rm -f "conftest.$ac_objext"
13896 if { (eval echo "$as_me:13896: \"$ac_compile\"") >&5
13897   (eval $ac_compile) 2>&5
13898   ac_status=$?
13899   echo "$as_me:13899: \$? = $ac_status" >&5
13900   (exit "$ac_status"); } &&
13901          { ac_try='test -s "conftest.$ac_objext"'
13902   { (eval echo "$as_me:13902: \"$ac_try\"") >&5
13903   (eval $ac_try) 2>&5
13904   ac_status=$?
13905   echo "$as_me:13905: \$? = $ac_status" >&5
13906   (exit "$ac_status"); }; }; then
13907   break
13908 else
13909   echo "$as_me: failed program was:" >&5
13910 cat "conftest.$ac_ext" >&5
13911 fi
13912 rm -f "conftest.$ac_objext"
13913          CC="$CC -n32"
13914          rm -f "conftest.$ac_objext"
13915 if { (eval echo "$as_me:13915: \"$ac_compile\"") >&5
13916   (eval $ac_compile) 2>&5
13917   ac_status=$?
13918   echo "$as_me:13918: \$? = $ac_status" >&5
13919   (exit "$ac_status"); } &&
13920          { ac_try='test -s "conftest.$ac_objext"'
13921   { (eval echo "$as_me:13921: \"$ac_try\"") >&5
13922   (eval $ac_try) 2>&5
13923   ac_status=$?
13924   echo "$as_me:13924: \$? = $ac_status" >&5
13925   (exit "$ac_status"); }; }; then
13926   ac_cv_sys_largefile_CC=' -n32'; break
13927 else
13928   echo "$as_me: failed program was:" >&5
13929 cat "conftest.$ac_ext" >&5
13930 fi
13931 rm -f "conftest.$ac_objext"
13932          break
13933        done
13934        CC=$ac_save_CC
13935        rm -f "conftest.$ac_ext"
13936     fi
13937 fi
13938 echo "$as_me:13938: result: $ac_cv_sys_largefile_CC" >&5
13939 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13940   if test "$ac_cv_sys_largefile_CC" != no; then
13941     CC=$CC$ac_cv_sys_largefile_CC
13942   fi
13943
13944   echo "$as_me:13944: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13945 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13946 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13947   echo $ECHO_N "(cached) $ECHO_C" >&6
13948 else
13949   while :; do
13950   ac_cv_sys_file_offset_bits=no
13951   cat >"conftest.$ac_ext" <<_ACEOF
13952 #line 13952 "configure"
13953 #include "confdefs.h"
13954 #include <sys/types.h>
13955  /* Check that off_t can represent 2**63 - 1 correctly.
13956     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13957     since some C++ compilers masquerading as C compilers
13958     incorrectly reject 9223372036854775807.  */
13959 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13960   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13961                        && LARGE_OFF_T % 2147483647 == 1)
13962                       ? 1 : -1];
13963 int
13964 main (void)
13965 {
13966
13967   ;
13968   return 0;
13969 }
13970 _ACEOF
13971 rm -f "conftest.$ac_objext"
13972 if { (eval echo "$as_me:13972: \"$ac_compile\"") >&5
13973   (eval $ac_compile) 2>&5
13974   ac_status=$?
13975   echo "$as_me:13975: \$? = $ac_status" >&5
13976   (exit "$ac_status"); } &&
13977          { ac_try='test -s "conftest.$ac_objext"'
13978   { (eval echo "$as_me:13978: \"$ac_try\"") >&5
13979   (eval $ac_try) 2>&5
13980   ac_status=$?
13981   echo "$as_me:13981: \$? = $ac_status" >&5
13982   (exit "$ac_status"); }; }; then
13983   break
13984 else
13985   echo "$as_me: failed program was:" >&5
13986 cat "conftest.$ac_ext" >&5
13987 fi
13988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13989   cat >"conftest.$ac_ext" <<_ACEOF
13990 #line 13990 "configure"
13991 #include "confdefs.h"
13992 #define _FILE_OFFSET_BITS 64
13993 #include <sys/types.h>
13994  /* Check that off_t can represent 2**63 - 1 correctly.
13995     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13996     since some C++ compilers masquerading as C compilers
13997     incorrectly reject 9223372036854775807.  */
13998 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13999   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14000                        && LARGE_OFF_T % 2147483647 == 1)
14001                       ? 1 : -1];
14002 int
14003 main (void)
14004 {
14005
14006   ;
14007   return 0;
14008 }
14009 _ACEOF
14010 rm -f "conftest.$ac_objext"
14011 if { (eval echo "$as_me:14011: \"$ac_compile\"") >&5
14012   (eval $ac_compile) 2>&5
14013   ac_status=$?
14014   echo "$as_me:14014: \$? = $ac_status" >&5
14015   (exit "$ac_status"); } &&
14016          { ac_try='test -s "conftest.$ac_objext"'
14017   { (eval echo "$as_me:14017: \"$ac_try\"") >&5
14018   (eval $ac_try) 2>&5
14019   ac_status=$?
14020   echo "$as_me:14020: \$? = $ac_status" >&5
14021   (exit "$ac_status"); }; }; then
14022   ac_cv_sys_file_offset_bits=64; break
14023 else
14024   echo "$as_me: failed program was:" >&5
14025 cat "conftest.$ac_ext" >&5
14026 fi
14027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14028   break
14029 done
14030 fi
14031 echo "$as_me:14031: result: $ac_cv_sys_file_offset_bits" >&5
14032 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14033 if test "$ac_cv_sys_file_offset_bits" != no; then
14034
14035 cat >>confdefs.h <<EOF
14036 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14037 EOF
14038
14039 fi
14040 rm -rf conftest*
14041   echo "$as_me:14041: checking for _LARGE_FILES value needed for large files" >&5
14042 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14043 if test "${ac_cv_sys_large_files+set}" = set; then
14044   echo $ECHO_N "(cached) $ECHO_C" >&6
14045 else
14046   while :; do
14047   ac_cv_sys_large_files=no
14048   cat >"conftest.$ac_ext" <<_ACEOF
14049 #line 14049 "configure"
14050 #include "confdefs.h"
14051 #include <sys/types.h>
14052  /* Check that off_t can represent 2**63 - 1 correctly.
14053     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14054     since some C++ compilers masquerading as C compilers
14055     incorrectly reject 9223372036854775807.  */
14056 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14057   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14058                        && LARGE_OFF_T % 2147483647 == 1)
14059                       ? 1 : -1];
14060 int
14061 main (void)
14062 {
14063
14064   ;
14065   return 0;
14066 }
14067 _ACEOF
14068 rm -f "conftest.$ac_objext"
14069 if { (eval echo "$as_me:14069: \"$ac_compile\"") >&5
14070   (eval $ac_compile) 2>&5
14071   ac_status=$?
14072   echo "$as_me:14072: \$? = $ac_status" >&5
14073   (exit "$ac_status"); } &&
14074          { ac_try='test -s "conftest.$ac_objext"'
14075   { (eval echo "$as_me:14075: \"$ac_try\"") >&5
14076   (eval $ac_try) 2>&5
14077   ac_status=$?
14078   echo "$as_me:14078: \$? = $ac_status" >&5
14079   (exit "$ac_status"); }; }; then
14080   break
14081 else
14082   echo "$as_me: failed program was:" >&5
14083 cat "conftest.$ac_ext" >&5
14084 fi
14085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14086   cat >"conftest.$ac_ext" <<_ACEOF
14087 #line 14087 "configure"
14088 #include "confdefs.h"
14089 #define _LARGE_FILES 1
14090 #include <sys/types.h>
14091  /* Check that off_t can represent 2**63 - 1 correctly.
14092     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14093     since some C++ compilers masquerading as C compilers
14094     incorrectly reject 9223372036854775807.  */
14095 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14096   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14097                        && LARGE_OFF_T % 2147483647 == 1)
14098                       ? 1 : -1];
14099 int
14100 main (void)
14101 {
14102
14103   ;
14104   return 0;
14105 }
14106 _ACEOF
14107 rm -f "conftest.$ac_objext"
14108 if { (eval echo "$as_me:14108: \"$ac_compile\"") >&5
14109   (eval $ac_compile) 2>&5
14110   ac_status=$?
14111   echo "$as_me:14111: \$? = $ac_status" >&5
14112   (exit "$ac_status"); } &&
14113          { ac_try='test -s "conftest.$ac_objext"'
14114   { (eval echo "$as_me:14114: \"$ac_try\"") >&5
14115   (eval $ac_try) 2>&5
14116   ac_status=$?
14117   echo "$as_me:14117: \$? = $ac_status" >&5
14118   (exit "$ac_status"); }; }; then
14119   ac_cv_sys_large_files=1; break
14120 else
14121   echo "$as_me: failed program was:" >&5
14122 cat "conftest.$ac_ext" >&5
14123 fi
14124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14125   break
14126 done
14127 fi
14128 echo "$as_me:14128: result: $ac_cv_sys_large_files" >&5
14129 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14130 if test "$ac_cv_sys_large_files" != no; then
14131
14132 cat >>confdefs.h <<EOF
14133 #define _LARGE_FILES $ac_cv_sys_large_files
14134 EOF
14135
14136 fi
14137 rm -rf conftest*
14138 fi
14139
14140         if test "$enable_largefile" != no ; then
14141         echo "$as_me:14141: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14142 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14143 if test "${ac_cv_sys_largefile_source+set}" = set; then
14144   echo $ECHO_N "(cached) $ECHO_C" >&6
14145 else
14146   while :; do
14147   ac_cv_sys_largefile_source=no
14148   cat >"conftest.$ac_ext" <<_ACEOF
14149 #line 14149 "configure"
14150 #include "confdefs.h"
14151 #include <stdio.h>
14152 int
14153 main (void)
14154 {
14155 return !fseeko;
14156   ;
14157   return 0;
14158 }
14159 _ACEOF
14160 rm -f "conftest.$ac_objext"
14161 if { (eval echo "$as_me:14161: \"$ac_compile\"") >&5
14162   (eval $ac_compile) 2>&5
14163   ac_status=$?
14164   echo "$as_me:14164: \$? = $ac_status" >&5
14165   (exit "$ac_status"); } &&
14166          { ac_try='test -s "conftest.$ac_objext"'
14167   { (eval echo "$as_me:14167: \"$ac_try\"") >&5
14168   (eval $ac_try) 2>&5
14169   ac_status=$?
14170   echo "$as_me:14170: \$? = $ac_status" >&5
14171   (exit "$ac_status"); }; }; then
14172   break
14173 else
14174   echo "$as_me: failed program was:" >&5
14175 cat "conftest.$ac_ext" >&5
14176 fi
14177 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14178   cat >"conftest.$ac_ext" <<_ACEOF
14179 #line 14179 "configure"
14180 #include "confdefs.h"
14181 #define _LARGEFILE_SOURCE 1
14182 #include <stdio.h>
14183 int
14184 main (void)
14185 {
14186 return !fseeko;
14187   ;
14188   return 0;
14189 }
14190 _ACEOF
14191 rm -f "conftest.$ac_objext"
14192 if { (eval echo "$as_me:14192: \"$ac_compile\"") >&5
14193   (eval $ac_compile) 2>&5
14194   ac_status=$?
14195   echo "$as_me:14195: \$? = $ac_status" >&5
14196   (exit "$ac_status"); } &&
14197          { ac_try='test -s "conftest.$ac_objext"'
14198   { (eval echo "$as_me:14198: \"$ac_try\"") >&5
14199   (eval $ac_try) 2>&5
14200   ac_status=$?
14201   echo "$as_me:14201: \$? = $ac_status" >&5
14202   (exit "$ac_status"); }; }; then
14203   ac_cv_sys_largefile_source=1; break
14204 else
14205   echo "$as_me: failed program was:" >&5
14206 cat "conftest.$ac_ext" >&5
14207 fi
14208 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14209   break
14210 done
14211 fi
14212 echo "$as_me:14212: result: $ac_cv_sys_largefile_source" >&5
14213 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14214 if test "$ac_cv_sys_largefile_source" != no; then
14215
14216 cat >>confdefs.h <<EOF
14217 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14218 EOF
14219
14220 fi
14221 rm -rf conftest*
14222
14223 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14224 # in glibc 2.1.3, but that breaks too many other things.
14225 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14226 echo "$as_me:14226: checking for fseeko" >&5
14227 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14228 if test "${ac_cv_func_fseeko+set}" = set; then
14229   echo $ECHO_N "(cached) $ECHO_C" >&6
14230 else
14231   cat >"conftest.$ac_ext" <<_ACEOF
14232 #line 14232 "configure"
14233 #include "confdefs.h"
14234 #include <stdio.h>
14235 int
14236 main (void)
14237 {
14238 return fseeko && fseeko (stdin, 0, 0);
14239   ;
14240   return 0;
14241 }
14242 _ACEOF
14243 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14244 if { (eval echo "$as_me:14244: \"$ac_link\"") >&5
14245   (eval $ac_link) 2>&5
14246   ac_status=$?
14247   echo "$as_me:14247: \$? = $ac_status" >&5
14248   (exit "$ac_status"); } &&
14249          { ac_try='test -s "conftest$ac_exeext"'
14250   { (eval echo "$as_me:14250: \"$ac_try\"") >&5
14251   (eval $ac_try) 2>&5
14252   ac_status=$?
14253   echo "$as_me:14253: \$? = $ac_status" >&5
14254   (exit "$ac_status"); }; }; then
14255   ac_cv_func_fseeko=yes
14256 else
14257   echo "$as_me: failed program was:" >&5
14258 cat "conftest.$ac_ext" >&5
14259 ac_cv_func_fseeko=no
14260 fi
14261 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14262 fi
14263 echo "$as_me:14263: result: $ac_cv_func_fseeko" >&5
14264 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14265 if test $ac_cv_func_fseeko = yes; then
14266
14267 cat >>confdefs.h <<\EOF
14268 #define HAVE_FSEEKO 1
14269 EOF
14270
14271 fi
14272
14273         # Normally we would collect these definitions in the config.h,
14274         # but (like _XOPEN_SOURCE), some environments rely on having these
14275         # defined before any of the system headers are included.  Another
14276         # case comes up with C++, e.g., on AIX the compiler compiles the
14277         # header files by themselves before looking at the body files it is
14278         # told to compile.  For ncurses, those header files do not include
14279         # the config.h
14280         if test "$ac_cv_sys_large_files" != no
14281         then
14282
14283         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14284         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14285
14286         fi
14287         if test "$ac_cv_sys_largefile_source" != no
14288         then
14289
14290         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14291         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14292
14293         fi
14294         if test "$ac_cv_sys_file_offset_bits" != no
14295         then
14296
14297         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14298         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14299
14300         fi
14301
14302         echo "$as_me:14302: checking whether to use struct dirent64" >&5
14303 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14304 if test "${cf_cv_struct_dirent64+set}" = set; then
14305   echo $ECHO_N "(cached) $ECHO_C" >&6
14306 else
14307
14308                 cat >"conftest.$ac_ext" <<_ACEOF
14309 #line 14309 "configure"
14310 #include "confdefs.h"
14311
14312 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14313 #include <sys/types.h>
14314 #include <dirent.h>
14315
14316 int
14317 main (void)
14318 {
14319
14320                 /* if transitional largefile support is setup, this is true */
14321                 extern struct dirent64 * readdir(DIR *);
14322                 struct dirent64 *x = readdir((DIR *)0);
14323                 struct dirent *y = readdir((DIR *)0);
14324                 int z = x - y;
14325                 (void)z;
14326
14327   ;
14328   return 0;
14329 }
14330 _ACEOF
14331 rm -f "conftest.$ac_objext"
14332 if { (eval echo "$as_me:14332: \"$ac_compile\"") >&5
14333   (eval $ac_compile) 2>&5
14334   ac_status=$?
14335   echo "$as_me:14335: \$? = $ac_status" >&5
14336   (exit "$ac_status"); } &&
14337          { ac_try='test -s "conftest.$ac_objext"'
14338   { (eval echo "$as_me:14338: \"$ac_try\"") >&5
14339   (eval $ac_try) 2>&5
14340   ac_status=$?
14341   echo "$as_me:14341: \$? = $ac_status" >&5
14342   (exit "$ac_status"); }; }; then
14343   cf_cv_struct_dirent64=yes
14344 else
14345   echo "$as_me: failed program was:" >&5
14346 cat "conftest.$ac_ext" >&5
14347 cf_cv_struct_dirent64=no
14348 fi
14349 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14350
14351 fi
14352 echo "$as_me:14352: result: $cf_cv_struct_dirent64" >&5
14353 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14354         test "$cf_cv_struct_dirent64" = yes &&
14355 cat >>confdefs.h <<\EOF
14356 #define HAVE_STRUCT_DIRENT64 1
14357 EOF
14358
14359         fi
14360
14361 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14362 echo "$as_me:14362: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14363 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14364
14365 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14366 if test "${enable_tparm_varargs+set}" = set; then
14367   enableval="$enable_tparm_varargs"
14368   with_tparm_varargs=$enableval
14369 else
14370   with_tparm_varargs=yes
14371 fi;
14372 echo "$as_me:14372: result: $with_tparm_varargs" >&5
14373 echo "${ECHO_T}$with_tparm_varargs" >&6
14374 NCURSES_TPARM_VARARGS=0
14375 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14376
14377 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14378 if test "$with_ticlib" != no ; then
14379 echo "$as_me:14379: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14380 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14381
14382 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14383 if test "${enable_tic_depends+set}" = set; then
14384   enableval="$enable_tic_depends"
14385   with_tic_depends=$enableval
14386 else
14387   with_tic_depends=yes
14388 fi;
14389 echo "$as_me:14389: result: $with_tic_depends" >&5
14390 echo "${ECHO_T}$with_tic_depends" >&6
14391 else
14392         with_tic_depends=no
14393 fi
14394
14395 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14396 echo "$as_me:14396: checking if you want to enable wattr* macros" >&5
14397 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14398
14399 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14400 if test "${enable_wattr_macros+set}" = set; then
14401   enableval="$enable_wattr_macros"
14402   with_wattr_macros=$enableval
14403 else
14404   with_wattr_macros=no
14405 fi;
14406 if [ "x$with_wattr_macros" != xyes ]; then
14407         NCURSES_WATTR_MACROS=0
14408         echo "$as_me:14408: result: no" >&5
14409 echo "${ECHO_T}no" >&6
14410 else
14411         NCURSES_WATTR_MACROS=1
14412         echo "$as_me:14412: result: yes" >&5
14413 echo "${ECHO_T}yes" >&6
14414 fi
14415
14416 echo "$as_me:14416: checking for X11 rgb file" >&5
14417 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14418
14419 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14420 if test "${with_x11_rgb+set}" = set; then
14421   withval="$with_x11_rgb"
14422   RGB_PATH=$withval
14423 else
14424   RGB_PATH=auto
14425 fi;
14426
14427 if test "x$RGB_PATH" = xauto
14428 then
14429         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14430         for cf_path in \
14431                 /opt/local/share/X11/rgb.txt \
14432                 /opt/X11/share/X11/rgb.txt \
14433                 /usr/share/X11/rgb.txt \
14434                 /usr/X11/share/X11/rgb.txt \
14435                 /usr/X11/lib/X11/rgb.txt \
14436                 /usr/lib/X11/rgb.txt \
14437                 /etc/X11/rgb.txt \
14438                 /usr/pkg/lib/X11/rgb.txt \
14439                 /usr/X11R7/lib/X11/rgb.txt \
14440                 /usr/X11R6/lib/X11/rgb.txt \
14441                 /usr/X11R5/lib/X11/rgb.txt \
14442                 /usr/X11R4/lib/X11/rgb.txt \
14443                 /usr/local/lib/X11/rgb.txt \
14444                 /usr/local/share/X11/rgb.txt \
14445                 /usr/lib64/X11/rgb.txt
14446         do
14447                 if test -f "$cf_path" ; then
14448                         RGB_PATH="$cf_path"
14449                         break
14450                 fi
14451         done
14452 else
14453         cf_path=$RGB_PATH
14454
14455 if test "x$prefix" != xNONE; then
14456         cf_path_syntax="$prefix"
14457 else
14458         cf_path_syntax="$ac_default_prefix"
14459 fi
14460
14461 case ".$cf_path" in
14462 (.\$\(*\)*|.\'*\'*)
14463         ;;
14464 (..|./*|.\\*)
14465         ;;
14466 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14467         ;;
14468 (.\$\{*prefix\}*|.\$\{*dir\}*)
14469         eval cf_path="$cf_path"
14470         case ".$cf_path" in
14471         (.NONE/*)
14472                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14473                 ;;
14474         esac
14475         ;;
14476 (.no|.NONE/*)
14477         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14478         ;;
14479 (*)
14480         { { echo "$as_me:14480: error: expected a pathname, not \"$cf_path\"" >&5
14481 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14482    { (exit 1); exit 1; }; }
14483         ;;
14484 esac
14485
14486 fi
14487
14488 echo "$as_me:14488: result: $RGB_PATH" >&5
14489 echo "${ECHO_T}$RGB_PATH" >&6
14490
14491 cat >>confdefs.h <<EOF
14492 #define RGB_PATH "$cf_path"
14493 EOF
14494
14495 no_x11_rgb=
14496 if test "$RGB_PATH" = no
14497 then
14498         no_x11_rgb="#"
14499 fi
14500
14501 ###   use option --with-bool to override bool's type
14502 echo "$as_me:14502: checking for type of bool" >&5
14503 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14504
14505 # Check whether --with-bool or --without-bool was given.
14506 if test "${with_bool+set}" = set; then
14507   withval="$with_bool"
14508   NCURSES_BOOL="$withval"
14509 else
14510   NCURSES_BOOL=auto
14511 fi;
14512 echo "$as_me:14512: result: $NCURSES_BOOL" >&5
14513 echo "${ECHO_T}$NCURSES_BOOL" >&6
14514
14515 echo "$as_me:14515: checking for alternate terminal capabilities file" >&5
14516 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14517
14518 # Check whether --with-caps or --without-caps was given.
14519 if test "${with_caps+set}" = set; then
14520   withval="$with_caps"
14521   TERMINFO_CAPS=Caps.$withval
14522 else
14523   TERMINFO_CAPS=Caps
14524 fi;
14525 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14526 then
14527         { echo "$as_me:14527: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14528 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14529         TERMINFO_CAPS=Caps
14530 fi
14531 echo "$as_me:14531: result: $TERMINFO_CAPS" >&5
14532 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14533
14534 ###   use option --with-chtype to override chtype's type
14535 echo "$as_me:14535: checking for type of chtype" >&5
14536 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14537
14538 # Check whether --with-chtype or --without-chtype was given.
14539 if test "${with_chtype+set}" = set; then
14540   withval="$with_chtype"
14541   NCURSES_CHTYPE="$withval"
14542 else
14543   NCURSES_CHTYPE=$cf_dft_chtype
14544 fi;
14545 echo "$as_me:14545: result: $NCURSES_CHTYPE" >&5
14546 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14547
14548 ###   use option --with-ospeed to override ospeed's type
14549 echo "$as_me:14549: checking for type of ospeed" >&5
14550 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14551
14552 # Check whether --with-ospeed or --without-ospeed was given.
14553 if test "${with_ospeed+set}" = set; then
14554   withval="$with_ospeed"
14555   NCURSES_OSPEED="$withval"
14556 else
14557   NCURSES_OSPEED=short
14558 fi;
14559 echo "$as_me:14559: result: $NCURSES_OSPEED" >&5
14560 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14561
14562 ###   use option --with-mmask-t to override mmask_t's type
14563 echo "$as_me:14563: checking for type of mmask_t" >&5
14564 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
14565
14566 # Check whether --with-mmask-t or --without-mmask-t was given.
14567 if test "${with_mmask_t+set}" = set; then
14568   withval="$with_mmask_t"
14569   NCURSES_MMASK_T="$withval"
14570 else
14571   NCURSES_MMASK_T=$cf_dft_mmask_t
14572 fi;
14573 echo "$as_me:14573: result: $NCURSES_MMASK_T" >&5
14574 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14575
14576 ###   use option --with-ccharw-max to override CCHARW_MAX size
14577 echo "$as_me:14577: checking for size CCHARW_MAX" >&5
14578 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14579
14580 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14581 if test "${with_ccharw_max+set}" = set; then
14582   withval="$with_ccharw_max"
14583   NCURSES_CCHARW_MAX="$withval"
14584 else
14585   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14586 fi;
14587 echo "$as_me:14587: result: $NCURSES_CCHARW_MAX" >&5
14588 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14589
14590 echo "$as_me:14590: checking for signed char" >&5
14591 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14592 if test "${ac_cv_type_signed_char+set}" = set; then
14593   echo $ECHO_N "(cached) $ECHO_C" >&6
14594 else
14595   cat >"conftest.$ac_ext" <<_ACEOF
14596 #line 14596 "configure"
14597 #include "confdefs.h"
14598 $ac_includes_default
14599 int
14600 main (void)
14601 {
14602 if ((signed char *) 0)
14603   return 0;
14604 if (sizeof (signed char))
14605   return 0;
14606   ;
14607   return 0;
14608 }
14609 _ACEOF
14610 rm -f "conftest.$ac_objext"
14611 if { (eval echo "$as_me:14611: \"$ac_compile\"") >&5
14612   (eval $ac_compile) 2>&5
14613   ac_status=$?
14614   echo "$as_me:14614: \$? = $ac_status" >&5
14615   (exit "$ac_status"); } &&
14616          { ac_try='test -s "conftest.$ac_objext"'
14617   { (eval echo "$as_me:14617: \"$ac_try\"") >&5
14618   (eval $ac_try) 2>&5
14619   ac_status=$?
14620   echo "$as_me:14620: \$? = $ac_status" >&5
14621   (exit "$ac_status"); }; }; then
14622   ac_cv_type_signed_char=yes
14623 else
14624   echo "$as_me: failed program was:" >&5
14625 cat "conftest.$ac_ext" >&5
14626 ac_cv_type_signed_char=no
14627 fi
14628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14629 fi
14630 echo "$as_me:14630: result: $ac_cv_type_signed_char" >&5
14631 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14632
14633 echo "$as_me:14633: checking size of signed char" >&5
14634 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14635 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14636   echo $ECHO_N "(cached) $ECHO_C" >&6
14637 else
14638   if test "$ac_cv_type_signed_char" = yes; then
14639   if test "$cross_compiling" = yes; then
14640   # Depending upon the size, compute the lo and hi bounds.
14641 cat >"conftest.$ac_ext" <<_ACEOF
14642 #line 14642 "configure"
14643 #include "confdefs.h"
14644 $ac_includes_default
14645 int
14646 main (void)
14647 {
14648 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14649   ;
14650   return 0;
14651 }
14652 _ACEOF
14653 rm -f "conftest.$ac_objext"
14654 if { (eval echo "$as_me:14654: \"$ac_compile\"") >&5
14655   (eval $ac_compile) 2>&5
14656   ac_status=$?
14657   echo "$as_me:14657: \$? = $ac_status" >&5
14658   (exit "$ac_status"); } &&
14659          { ac_try='test -s "conftest.$ac_objext"'
14660   { (eval echo "$as_me:14660: \"$ac_try\"") >&5
14661   (eval $ac_try) 2>&5
14662   ac_status=$?
14663   echo "$as_me:14663: \$? = $ac_status" >&5
14664   (exit "$ac_status"); }; }; then
14665   ac_lo=0 ac_mid=0
14666   while :; do
14667     cat >"conftest.$ac_ext" <<_ACEOF
14668 #line 14668 "configure"
14669 #include "confdefs.h"
14670 $ac_includes_default
14671 int
14672 main (void)
14673 {
14674 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14675   ;
14676   return 0;
14677 }
14678 _ACEOF
14679 rm -f "conftest.$ac_objext"
14680 if { (eval echo "$as_me:14680: \"$ac_compile\"") >&5
14681   (eval $ac_compile) 2>&5
14682   ac_status=$?
14683   echo "$as_me:14683: \$? = $ac_status" >&5
14684   (exit "$ac_status"); } &&
14685          { ac_try='test -s "conftest.$ac_objext"'
14686   { (eval echo "$as_me:14686: \"$ac_try\"") >&5
14687   (eval $ac_try) 2>&5
14688   ac_status=$?
14689   echo "$as_me:14689: \$? = $ac_status" >&5
14690   (exit "$ac_status"); }; }; then
14691   ac_hi=$ac_mid; break
14692 else
14693   echo "$as_me: failed program was:" >&5
14694 cat "conftest.$ac_ext" >&5
14695 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14696 fi
14697 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14698   done
14699 else
14700   echo "$as_me: failed program was:" >&5
14701 cat "conftest.$ac_ext" >&5
14702 ac_hi=-1 ac_mid=-1
14703   while :; do
14704     cat >"conftest.$ac_ext" <<_ACEOF
14705 #line 14705 "configure"
14706 #include "confdefs.h"
14707 $ac_includes_default
14708 int
14709 main (void)
14710 {
14711 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14712   ;
14713   return 0;
14714 }
14715 _ACEOF
14716 rm -f "conftest.$ac_objext"
14717 if { (eval echo "$as_me:14717: \"$ac_compile\"") >&5
14718   (eval $ac_compile) 2>&5
14719   ac_status=$?
14720   echo "$as_me:14720: \$? = $ac_status" >&5
14721   (exit "$ac_status"); } &&
14722          { ac_try='test -s "conftest.$ac_objext"'
14723   { (eval echo "$as_me:14723: \"$ac_try\"") >&5
14724   (eval $ac_try) 2>&5
14725   ac_status=$?
14726   echo "$as_me:14726: \$? = $ac_status" >&5
14727   (exit "$ac_status"); }; }; then
14728   ac_lo=$ac_mid; break
14729 else
14730   echo "$as_me: failed program was:" >&5
14731 cat "conftest.$ac_ext" >&5
14732 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14733 fi
14734 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14735   done
14736 fi
14737 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14738 # Binary search between lo and hi bounds.
14739 while test "x$ac_lo" != "x$ac_hi"; do
14740   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14741   cat >"conftest.$ac_ext" <<_ACEOF
14742 #line 14742 "configure"
14743 #include "confdefs.h"
14744 $ac_includes_default
14745 int
14746 main (void)
14747 {
14748 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14749   ;
14750   return 0;
14751 }
14752 _ACEOF
14753 rm -f "conftest.$ac_objext"
14754 if { (eval echo "$as_me:14754: \"$ac_compile\"") >&5
14755   (eval $ac_compile) 2>&5
14756   ac_status=$?
14757   echo "$as_me:14757: \$? = $ac_status" >&5
14758   (exit "$ac_status"); } &&
14759          { ac_try='test -s "conftest.$ac_objext"'
14760   { (eval echo "$as_me:14760: \"$ac_try\"") >&5
14761   (eval $ac_try) 2>&5
14762   ac_status=$?
14763   echo "$as_me:14763: \$? = $ac_status" >&5
14764   (exit "$ac_status"); }; }; then
14765   ac_hi=$ac_mid
14766 else
14767   echo "$as_me: failed program was:" >&5
14768 cat "conftest.$ac_ext" >&5
14769 ac_lo=`expr "$ac_mid" + 1`
14770 fi
14771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14772 done
14773 ac_cv_sizeof_signed_char=$ac_lo
14774 else
14775   if test "$cross_compiling" = yes; then
14776   { { echo "$as_me:14776: error: cannot run test program while cross compiling" >&5
14777 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14778    { (exit 1); exit 1; }; }
14779 else
14780   cat >"conftest.$ac_ext" <<_ACEOF
14781 #line 14781 "configure"
14782 #include "confdefs.h"
14783 $ac_includes_default
14784 int
14785 main (void)
14786 {
14787 FILE *f = fopen ("conftest.val", "w");
14788 if (!f)
14789   $ac_main_return (1);
14790 fprintf (f, "%ld", (long)(sizeof (signed char)));
14791 fclose (f);
14792   ;
14793   return 0;
14794 }
14795 _ACEOF
14796 rm -f "conftest$ac_exeext"
14797 if { (eval echo "$as_me:14797: \"$ac_link\"") >&5
14798   (eval $ac_link) 2>&5
14799   ac_status=$?
14800   echo "$as_me:14800: \$? = $ac_status" >&5
14801   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14802   { (eval echo "$as_me:14802: \"$ac_try\"") >&5
14803   (eval $ac_try) 2>&5
14804   ac_status=$?
14805   echo "$as_me:14805: \$? = $ac_status" >&5
14806   (exit "$ac_status"); }; }; then
14807   ac_cv_sizeof_signed_char=`cat conftest.val`
14808 else
14809   echo "$as_me: program exited with status $ac_status" >&5
14810 echo "$as_me: failed program was:" >&5
14811 cat "conftest.$ac_ext" >&5
14812 fi
14813 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14814 fi
14815 fi
14816 rm -f conftest.val
14817 else
14818   ac_cv_sizeof_signed_char=0
14819 fi
14820 fi
14821 echo "$as_me:14821: result: $ac_cv_sizeof_signed_char" >&5
14822 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14823 cat >>confdefs.h <<EOF
14824 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14825 EOF
14826
14827 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14828         NCURSES_SBOOL="signed char"
14829 else
14830         NCURSES_SBOOL="char"
14831 fi
14832 echo "$as_me:14832: checking if you want to use signed Boolean array in term.h" >&5
14833 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14834
14835 # Check whether --enable-signed-char or --disable-signed-char was given.
14836 if test "${enable_signed_char+set}" = set; then
14837   enableval="$enable_signed_char"
14838   with_signed_char=$enableval
14839 else
14840   with_signed_char=$cf_dft_signed_char
14841 fi;
14842 echo "$as_me:14842: result: $with_signed_char" >&5
14843 echo "${ECHO_T}$with_signed_char" >&6
14844 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14845
14846 ###   use option --with-tparm-arg to override tparm's argument type
14847 echo "$as_me:14847: checking for type of tparm args" >&5
14848 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14849
14850 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14851 if test "${with_tparm_arg+set}" = set; then
14852   withval="$with_tparm_arg"
14853   NCURSES_TPARM_ARG="$withval"
14854 else
14855   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14856 fi;
14857 echo "$as_me:14857: result: $NCURSES_TPARM_ARG" >&5
14858 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14859
14860 ### Enable compiling-in rcs id's
14861 echo "$as_me:14861: checking if RCS identifiers should be compiled-in" >&5
14862 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14863
14864 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14865 if test "${with_rcs_ids+set}" = set; then
14866   withval="$with_rcs_ids"
14867   with_rcs_ids=$withval
14868 else
14869   with_rcs_ids=no
14870 fi;
14871 echo "$as_me:14871: result: $with_rcs_ids" >&5
14872 echo "${ECHO_T}$with_rcs_ids" >&6
14873 test "x$with_rcs_ids" = xyes &&
14874 cat >>confdefs.h <<\EOF
14875 #define USE_RCS_IDS 1
14876 EOF
14877
14878 ###############################################################################
14879
14880 echo "$as_me:14880: checking format of man-pages" >&5
14881 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14882
14883 # Check whether --with-manpage-format or --without-manpage-format was given.
14884 if test "${with_manpage_format+set}" = set; then
14885   withval="$with_manpage_format"
14886   MANPAGE_FORMAT=$withval
14887 else
14888   MANPAGE_FORMAT=unknown
14889 fi;
14890
14891 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14892 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14893
14894 cf_unknown=
14895
14896 case "$MANPAGE_FORMAT" in
14897 (unknown)
14898         if test -z "$MANPATH" ; then
14899                 MANPATH="/usr/man:/usr/share/man"
14900         fi
14901
14902         # look for the 'date' man-page (it is most likely to be installed!)
14903         MANPAGE_FORMAT=
14904         cf_preform="no"
14905         cf_catonly="yes"
14906         cf_example="date"
14907
14908         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14909         for cf_dir in $MANPATH; do
14910                 test -z "$cf_dir" && cf_dir=/usr/man
14911                 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
14912                 do
14913                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14914                         if test "x$cf_test" = "x$cf_name" ; then
14915
14916                                 case "$cf_name" in
14917                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14918                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14919                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14920                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14921                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14922                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14923                                 esac
14924
14925                                 case "$cf_name" in
14926                                 ($cf_dir/man*)
14927                                         cf_catonly=no
14928                                         ;;
14929                                 ($cf_dir/cat*)
14930                                         cf_preform=yes
14931                                         ;;
14932                                 esac
14933                                 break
14934                         fi
14935
14936                         # if we found a match in either man* or cat*, stop looking
14937                         if test -n "$MANPAGE_FORMAT" ; then
14938                                 cf_found=no
14939                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14940                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14941                                 case "$cf_name" in
14942                                 ($cf_dir/cat*)
14943                                         cf_found=yes
14944                                         ;;
14945                                 esac
14946                                 test "$cf_found" = yes && break
14947                         fi
14948                 done
14949                 # only check the first directory in $MANPATH where we find manpages
14950                 if test -n "$MANPAGE_FORMAT" ; then
14951                         break
14952                 fi
14953         done
14954         # if we did not find the example, just assume it is normal
14955         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14956         IFS="$ac_save_ifs"
14957         ;;
14958 (*)
14959         for cf_option in $MANPAGE_FORMAT; do
14960         case "$cf_option" in
14961         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
14962                 ;;
14963         (*)
14964                 cf_unknown="$cf_unknown $cf_option"
14965                 ;;
14966         esac
14967         done
14968         ;;
14969 esac
14970
14971 echo "$as_me:14971: result: $MANPAGE_FORMAT" >&5
14972 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14973 if test -n "$cf_unknown" ; then
14974         { echo "$as_me:14974: WARNING: Unexpected manpage-format $cf_unknown" >&5
14975 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14976 fi
14977
14978 cf_manpage_format=no
14979 cf_manpage_inboth=no
14980 cf_manpage_so_strip=
14981 cf_manpage_compress=
14982
14983 for cf_item in $MANPAGE_FORMAT
14984 do
14985 case "$cf_item" in
14986 (catonly)
14987         cf_manpage_format=yes
14988         cf_manpage_inboth=no
14989         ;;
14990 (formatted)
14991         cf_manpage_format=yes
14992         cf_manpage_inboth=yes
14993         ;;
14994 (compress)
14995         cf_manpage_so_strip="Z"
14996         cf_manpage_compress=compress
14997         ;;
14998 (gzip)
14999         cf_manpage_so_strip="gz"
15000         cf_manpage_compress=gzip
15001         ;;
15002 (bzip2)
15003         cf_manpage_so_strip="bz2"
15004         cf_manpage_compress=bzip2
15005         ;;
15006 (xz)
15007         cf_manpage_so_strip="xz"
15008         cf_manpage_compress=xz
15009         ;;
15010 esac
15011 done
15012
15013 echo "$as_me:15013: checking for manpage renaming" >&5
15014 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15015
15016 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15017 if test "${with_manpage_renames+set}" = set; then
15018   withval="$with_manpage_renames"
15019   MANPAGE_RENAMES=$withval
15020 else
15021   MANPAGE_RENAMES=yes
15022 fi;
15023
15024 case ".$MANPAGE_RENAMES" in
15025 (.no)
15026         ;;
15027 (.|.yes)
15028         # Debian 'man' program?
15029         if test -f /etc/debian_version ; then
15030                 MANPAGE_RENAMES=man/man_db.renames
15031         else
15032                 MANPAGE_RENAMES=no
15033         fi
15034         ;;
15035 esac
15036
15037 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15038         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15039 elif test "$MANPAGE_RENAMES" = no ; then
15040         :
15041 elif test ! -f "$MANPAGE_RENAMES" ; then
15042         { { echo "$as_me:15042: error: not a filename: $MANPAGE_RENAMES" >&5
15043 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15044    { (exit 1); exit 1; }; }
15045 fi
15046
15047 echo "$as_me:15047: result: $MANPAGE_RENAMES" >&5
15048 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15049
15050 echo "$as_me:15050: checking if manpage aliases will be installed" >&5
15051 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15052
15053 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15054 if test "${with_manpage_aliases+set}" = set; then
15055   withval="$with_manpage_aliases"
15056   MANPAGE_ALIASES=$withval
15057 else
15058   MANPAGE_ALIASES=yes
15059 fi;
15060
15061 echo "$as_me:15061: result: $MANPAGE_ALIASES" >&5
15062 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15063
15064 case "x$LN_S" in
15065 (xln*)
15066         cf_use_symlinks=yes
15067         ;;
15068 (*)
15069         cf_use_symlinks=no
15070         ;;
15071 esac
15072
15073 MANPAGE_SYMLINKS=no
15074 if test "$MANPAGE_ALIASES" = yes ; then
15075 echo "$as_me:15075: checking if manpage symlinks should be used" >&5
15076 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15077
15078 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15079 if test "${with_manpage_symlinks+set}" = set; then
15080   withval="$with_manpage_symlinks"
15081   MANPAGE_SYMLINKS=$withval
15082 else
15083   MANPAGE_SYMLINKS=$cf_use_symlinks
15084 fi;
15085
15086 if test "$cf_use_symlinks" = no; then
15087 if test "$MANPAGE_SYMLINKS" = yes ; then
15088         { echo "$as_me:15088: WARNING: cannot make symlinks" >&5
15089 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15090         MANPAGE_SYMLINKS=no
15091 fi
15092 fi
15093
15094 echo "$as_me:15094: result: $MANPAGE_SYMLINKS" >&5
15095 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15096 fi
15097
15098 echo "$as_me:15098: checking for manpage tbl" >&5
15099 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15100
15101 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15102 if test "${with_manpage_tbl+set}" = set; then
15103   withval="$with_manpage_tbl"
15104   MANPAGE_TBL=$withval
15105 else
15106   MANPAGE_TBL=no
15107 fi;
15108
15109 echo "$as_me:15109: result: $MANPAGE_TBL" >&5
15110 echo "${ECHO_T}$MANPAGE_TBL" >&6
15111
15112 if test "$prefix" = "NONE" ; then
15113         cf_prefix="$ac_default_prefix"
15114 else
15115         cf_prefix="$prefix"
15116 fi
15117
15118 test ! -d man && mkdir man
15119
15120 cf_edit_man=./edit_man.sh
15121 cf_man_alias=`pwd`/man_alias.sed
15122
15123 cat >$cf_edit_man <<CF_EOF
15124 #! $SHELL
15125 # this script is generated by the configure-script CF_MAN_PAGES macro.
15126
15127 prefix="$cf_prefix"
15128 datarootdir="$datarootdir"
15129 datadir="$datadir"
15130
15131 NCURSES_MAJOR="$NCURSES_MAJOR"
15132 NCURSES_MINOR="$NCURSES_MINOR"
15133 NCURSES_PATCH="$NCURSES_PATCH"
15134
15135 NCURSES_OSPEED="$NCURSES_OSPEED"
15136 TERMINFO="$TERMINFO"
15137 TERMINFO_DIRS="$TERMINFO_DIRS"
15138
15139 INSTALL="$INSTALL"
15140 INSTALL_DATA="$INSTALL_DATA"
15141
15142 transform="$program_transform_name"
15143
15144 TMP=\${TMPDIR:=/tmp}/man\$\$
15145 trap "rm -f \$TMP; exit 1" 1 2 3 15
15146 trap "rm -f \$TMP" 0
15147
15148 form=\$1
15149 shift || exit 1
15150
15151 verb=\$1
15152 shift || exit 1
15153
15154 mandir=\$1
15155 shift || exit 1
15156
15157 srcdir=\$1
15158 top_srcdir=\$srcdir/..
15159 shift || exit 1
15160
15161 if test "\$form" = normal ; then
15162         if test "$cf_manpage_format" = yes ; then
15163         if test "$cf_manpage_inboth" = no ; then
15164                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15165                 exit $?
15166         fi
15167         fi
15168         cf_subdir=\$mandir/man
15169         cf_tables=$MANPAGE_TBL
15170 else
15171         cf_subdir=\$mandir/cat
15172         cf_tables=yes
15173 fi
15174
15175 # process the list of source-files
15176 for i in "\$@" ; do
15177 case \$i in
15178 (*.orig|*.rej) ;;
15179 (*.[0-9]*)
15180         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15181         if test "\$verb" = installing ; then
15182         if test ! -d "\$cf_subdir\${section}" ; then
15183                 mkdir -p "\$cf_subdir\$section"
15184         fi
15185         fi
15186
15187         # replace variables in man page
15188         if test ! -f "$cf_man_alias" ; then
15189 cat >>$cf_man_alias <<-CF_EOF2
15190                 s,@DATADIR@,\$datadir,g
15191                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15192                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15193                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15194                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15195                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15196                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15197 CF_EOF
15198
15199         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15200         do
15201                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15202                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15203 cat >>$cf_edit_man <<-CF_EOF
15204                 s,@$cf_NAME@,$cf_name,g
15205 CF_EOF
15206         done
15207
15208 cat >>$cf_edit_man <<CF_EOF
15209 CF_EOF2
15210                 echo "...made $cf_man_alias"
15211         fi
15212
15213         aliases=
15214         cf_source=\`basename "\$i"\`
15215         cf_full_alias=\$cf_source
15216         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15217         if test ! -f "\$cf_full_alias" ; then
15218                 echo ".. skipped \$cf_source"
15219                 continue
15220         fi
15221 CF_EOF
15222
15223 if test "$MANPAGE_ALIASES" != no ; then
15224 cat >>$cf_edit_man <<CF_EOF
15225         nCurses=ignore.3x
15226         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15227         test "$with_curses_h" = yes && nCurses=ncurses.3x
15228         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\`
15229 CF_EOF
15230 fi
15231
15232 if test "$MANPAGE_RENAMES" = no ; then
15233 cat >>$cf_edit_man <<CF_EOF
15234         # perform program transformations for section 1 man pages
15235         if test \$section = 1 ; then
15236                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15237         else
15238                 cf_target=\$cf_subdir\${section}/\$cf_source
15239         fi
15240 CF_EOF
15241 else
15242 cat >>$cf_edit_man <<CF_EOF
15243         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15244         if test -z "\$cf_target" ; then
15245                 echo "? missing rename for \$cf_source"
15246                 cf_target="\$cf_source"
15247         fi
15248         cf_target="\$cf_subdir\${section}/\${cf_target}"
15249
15250 CF_EOF
15251 fi
15252
15253 cat >>$cf_edit_man <<CF_EOF
15254         sed     -f "$cf_man_alias" \\
15255 CF_EOF
15256
15257 if test "$MANPAGE_RENAMES" != no ; then
15258 cat >>$cf_edit_man <<CF_EOF
15259                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15260 CF_EOF
15261 else
15262 cat >>$cf_edit_man <<CF_EOF
15263                 < "\$i" >\$TMP
15264 CF_EOF
15265 fi
15266
15267 cat >>$cf_edit_man <<CF_EOF
15268 if test \$cf_tables = yes ; then
15269         tbl \$TMP >\$TMP.out
15270         mv \$TMP.out \$TMP
15271 fi
15272 CF_EOF
15273
15274 if test "$with_overwrite" != yes ; then
15275 cat >>$cf_edit_man <<CF_EOF
15276         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15277         mv \$TMP.out \$TMP
15278 CF_EOF
15279 fi
15280
15281 if test "$with_curses_h" != yes ; then
15282 cat >>$cf_edit_man <<CF_EOF
15283         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15284         mv \$TMP.out \$TMP
15285 CF_EOF
15286 fi
15287
15288 cat >>$cf_edit_man <<CF_EOF
15289         if test "\$form" = format ; then
15290                 nroff -man \$TMP >\$TMP.out
15291                 mv \$TMP.out \$TMP
15292         fi
15293 CF_EOF
15294
15295 if test -n "$cf_manpage_compress" ; then
15296 cat >>$cf_edit_man <<CF_EOF
15297         if test "\$verb" = installing ; then
15298         if ( "$cf_manpage_compress" -f \$TMP )
15299         then
15300                 mv \$TMP.$cf_manpage_so_strip \$TMP
15301         fi
15302         fi
15303         cf_target="\$cf_target.$cf_manpage_so_strip"
15304 CF_EOF
15305 fi
15306
15307 case "$MANPAGE_FORMAT" in
15308 (*BSDI*)
15309 cat >>$cf_edit_man <<CF_EOF
15310         if test "\$form" = format ; then
15311                 # BSDI installs only .0 suffixes in the cat directories
15312                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15313         fi
15314 CF_EOF
15315   ;;
15316 esac
15317
15318 cat >>$cf_edit_man <<CF_EOF
15319         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15320         extra_suffix=
15321         if test -n "$EXTRA_SUFFIX" ; then
15322                 case \$cf_target in
15323                 (*${EXTRA_SUFFIX}\$suffix)
15324                         extra_suffix="$EXTRA_SUFFIX"
15325                         ;;
15326                 esac
15327         fi
15328         if test "\$verb" = installing ; then
15329                 echo "\$verb \$cf_target"
15330                 \$INSTALL_DATA \$TMP "\$cf_target"
15331                 test -d "\$cf_subdir\${section}" &&
15332                 test -n "\$aliases" && (
15333                         cd "\$cf_subdir\${section}" && (
15334                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15335                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15336                                 cf_target=\`basename "\$cf_target"\`
15337                                 for cf_alias in \$aliases
15338                                 do
15339                                         if test "\$section" = 1 ; then
15340                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15341                                         fi
15342                                         cf_alias="\${cf_alias}\${extra_suffix}"
15343
15344                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15345                                                 if test -f "\$cf_alias\${suffix}" ; then
15346                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15347                                                         then
15348                                                                 continue
15349                                                         fi
15350                                                 fi
15351                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15352 CF_EOF
15353 case "x$LN_S" in
15354 (*-f)
15355 cat >>$cf_edit_man <<CF_EOF
15356                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15357 CF_EOF
15358         ;;
15359 (*)
15360 cat >>$cf_edit_man <<CF_EOF
15361                                                 rm -f "\$cf_alias\${suffix}"
15362                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15363 CF_EOF
15364         ;;
15365 esac
15366 cat >>$cf_edit_man <<CF_EOF
15367                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15368                                                 echo ".so \$cf_source" >\$TMP
15369 CF_EOF
15370 if test -n "$cf_manpage_compress" ; then
15371 cat >>$cf_edit_man <<CF_EOF
15372                                                 if test -n "$cf_manpage_so_strip" ; then
15373                                                         "$cf_manpage_compress" -f \$TMP
15374                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15375                                                 fi
15376 CF_EOF
15377 fi
15378 cat >>$cf_edit_man <<CF_EOF
15379                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15380                                                 rm -f "\$cf_alias\${suffix}"
15381                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15382                                         fi
15383                                 done
15384                         )
15385                 )
15386         elif test "\$verb" = removing ; then
15387                 test -f "\$cf_target" && (
15388                         echo "\$verb \$cf_target"
15389                         rm -f "\$cf_target"
15390                 )
15391                 test -d "\$cf_subdir\${section}" &&
15392                 test -n "\$aliases" && (
15393                         cd "\$cf_subdir\${section}" && (
15394                                 for cf_alias in \$aliases
15395                                 do
15396                                         if test "\$section" = 1 ; then
15397                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15398                                         fi
15399                                         cf_alias="\${cf_alias}\${extra_suffix}"
15400
15401                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15402                                         rm -f "\$cf_alias\${suffix}"
15403                                 done
15404                         )
15405                 )
15406         else
15407 #               echo ".hy 0"
15408                 cat \$TMP
15409         fi
15410         ;;
15411 esac
15412 done
15413
15414 if test "$cf_manpage_inboth" = yes ; then
15415 if test "\$form" != format ; then
15416         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15417 fi
15418 fi
15419
15420 exit 0
15421 CF_EOF
15422 chmod 755 "$cf_edit_man"
15423
15424 ###############################################################################
15425
15426 ### Note that some functions (such as const) are normally disabled anyway.
15427 echo "$as_me:15427: checking if you want to build with function extensions" >&5
15428 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15429
15430 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15431 if test "${enable_ext_funcs+set}" = set; then
15432   enableval="$enable_ext_funcs"
15433   with_ext_funcs=$enableval
15434 else
15435   with_ext_funcs=yes
15436 fi;
15437 echo "$as_me:15437: result: $with_ext_funcs" >&5
15438 echo "${ECHO_T}$with_ext_funcs" >&6
15439 if test "x$with_ext_funcs" = xyes ; then
15440         NCURSES_EXT_FUNCS=1
15441
15442 cat >>confdefs.h <<\EOF
15443 #define NCURSES_EXT_FUNCS 1
15444 EOF
15445
15446 cat >>confdefs.h <<\EOF
15447 #define HAVE_ASSUME_DEFAULT_COLORS 1
15448 EOF
15449
15450 cat >>confdefs.h <<\EOF
15451 #define HAVE_CURSES_VERSION 1
15452 EOF
15453
15454 cat >>confdefs.h <<\EOF
15455 #define HAVE_HAS_KEY 1
15456 EOF
15457
15458 cat >>confdefs.h <<\EOF
15459 #define HAVE_RESIZETERM 1
15460 EOF
15461
15462 cat >>confdefs.h <<\EOF
15463 #define HAVE_RESIZE_TERM 1
15464 EOF
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_TERM_ENTRY_H 1
15468 EOF
15469
15470 cat >>confdefs.h <<\EOF
15471 #define HAVE_USE_DEFAULT_COLORS 1
15472 EOF
15473
15474 cat >>confdefs.h <<\EOF
15475 #define HAVE_USE_SCREEN 1
15476 EOF
15477
15478 cat >>confdefs.h <<\EOF
15479 #define HAVE_USE_WINDOW 1
15480 EOF
15481
15482 cat >>confdefs.h <<\EOF
15483 #define HAVE_WRESIZE 1
15484 EOF
15485
15486         GENERATED_EXT_FUNCS=generated
15487         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15488 else
15489         NCURSES_EXT_FUNCS=0
15490         GENERATED_EXT_FUNCS=
15491 fi
15492
15493 echo "$as_me:15493: checking if you want to build with SCREEN extensions" >&5
15494 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15495
15496 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15497 if test "${enable_sp_funcs+set}" = set; then
15498   enableval="$enable_sp_funcs"
15499   with_sp_funcs=$enableval
15500 else
15501   with_sp_funcs=$cf_dft_ext_spfuncs
15502 fi;
15503 echo "$as_me:15503: result: $with_sp_funcs" >&5
15504 echo "${ECHO_T}$with_sp_funcs" >&6
15505 if test "x$with_sp_funcs" = xyes ; then
15506         NCURSES_SP_FUNCS=1
15507
15508 cat >>confdefs.h <<\EOF
15509 #define NCURSES_SP_FUNCS 1
15510 EOF
15511
15512 cat >>confdefs.h <<\EOF
15513 #define HAVE_TPUTS_SP 1
15514 EOF
15515
15516         GENERATED_SP_FUNCS=generated
15517 else
15518         NCURSES_SP_FUNCS=0
15519         GENERATED_SP_FUNCS=
15520 fi
15521
15522 echo "$as_me:15522: checking if you want to build with terminal-driver" >&5
15523 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15524
15525 # Check whether --enable-term-driver or --disable-term-driver was given.
15526 if test "${enable_term_driver+set}" = set; then
15527   enableval="$enable_term_driver"
15528   with_term_driver=$enableval
15529 else
15530   with_term_driver=no
15531 fi;
15532 echo "$as_me:15532: result: $with_term_driver" >&5
15533 echo "${ECHO_T}$with_term_driver" >&6
15534 if test "x$with_term_driver" = xyes ; then
15535
15536 cat >>confdefs.h <<\EOF
15537 #define USE_TERM_DRIVER 1
15538 EOF
15539
15540         if test "x$with_termlib" != xno ; then
15541                 { { echo "$as_me:15541: error: The term-driver option conflicts with the termlib option" >&5
15542 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15543    { (exit 1); exit 1; }; }
15544         fi
15545         if test "x$with_sp_funcs" != xyes ; then
15546                 { { echo "$as_me:15546: error: The term-driver option relies upon sp-funcs" >&5
15547 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15548    { (exit 1); exit 1; }; }
15549         fi
15550 fi
15551
15552 ###   use option --enable-const to turn on use of const beyond that in XSI.
15553 echo "$as_me:15553: checking for extended use of const keyword" >&5
15554 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15555
15556 # Check whether --enable-const or --disable-const was given.
15557 if test "${enable_const+set}" = set; then
15558   enableval="$enable_const"
15559   with_ext_const=$enableval
15560 else
15561   with_ext_const=$cf_dft_ext_const
15562 fi;
15563 echo "$as_me:15563: result: $with_ext_const" >&5
15564 echo "${ECHO_T}$with_ext_const" >&6
15565 NCURSES_CONST='/*nothing*/'
15566 if test "x$with_ext_const" = xyes ; then
15567         NCURSES_CONST=const
15568 fi
15569
15570 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15571 echo "$as_me:15571: checking if you want to use extended colors" >&5
15572 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15573
15574 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15575 if test "${enable_ext_colors+set}" = set; then
15576   enableval="$enable_ext_colors"
15577   with_ext_colors=$enableval
15578 else
15579   with_ext_colors=$cf_dft_ext_colors
15580 fi;
15581 echo "$as_me:15581: result: $with_ext_colors" >&5
15582 echo "${ECHO_T}$with_ext_colors" >&6
15583 NCURSES_EXT_COLORS=0
15584 if test "x$with_ext_colors" = xyes ; then
15585         if test "x$with_widec" != xyes ; then
15586                 { echo "$as_me:15586: WARNING: This option applies only to wide-character library" >&5
15587 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15588         else
15589                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15590
15591 if test "${with_abi_version+set}" != set; then
15592         case "$cf_cv_rel_version" in
15593         (5.*)
15594                 cf_cv_rel_version=6.0
15595                 cf_cv_abi_version=6
15596                 cf_cv_abi_default=6
15597                 { echo "$as_me:15597: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15598 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15599                 ;;
15600         esac
15601 fi
15602
15603                 NCURSES_EXT_COLORS=1
15604
15605 cat >>confdefs.h <<\EOF
15606 #define NCURSES_EXT_COLORS 1
15607 EOF
15608
15609 cat >>confdefs.h <<\EOF
15610 #define HAVE_ALLOC_PAIR 1
15611 EOF
15612
15613 cat >>confdefs.h <<\EOF
15614 #define HAVE_INIT_EXTENDED_COLOR 1
15615 EOF
15616
15617 cat >>confdefs.h <<\EOF
15618 #define HAVE_RESET_COLOR_PAIRS 1
15619 EOF
15620
15621         fi
15622 fi
15623
15624 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15625 echo "$as_me:15625: checking if you want to use extended mouse encoding" >&5
15626 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15627
15628 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15629 if test "${enable_ext_mouse+set}" = set; then
15630   enableval="$enable_ext_mouse"
15631   with_ext_mouse=$enableval
15632 else
15633   with_ext_mouse=$cf_dft_ext_mouse
15634 fi;
15635 echo "$as_me:15635: result: $with_ext_mouse" >&5
15636 echo "${ECHO_T}$with_ext_mouse" >&6
15637 if test "x$with_ext_mouse" = xyes ; then
15638
15639 if test "${with_abi_version+set}" != set; then
15640         case "$cf_cv_rel_version" in
15641         (5.*)
15642                 cf_cv_rel_version=6.0
15643                 cf_cv_abi_version=6
15644                 cf_cv_abi_default=6
15645                 { echo "$as_me:15645: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15646 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15647                 ;;
15648         esac
15649 fi
15650
15651 fi
15652
15653 if test $cf_cv_abi_default -le 5 ; then
15654         NCURSES_MOUSE_VERSION=1
15655 elif test $cf_cv_abi_default -le 6 ; then
15656         NCURSES_MOUSE_VERSION=2
15657 else
15658         NCURSES_MOUSE_VERSION=3
15659 fi
15660
15661 ###   use option --enable-ext-putwin to turn on extended screendumps
15662 echo "$as_me:15662: checking if you want to use extended putwin/screendump" >&5
15663 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15664
15665 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15666 if test "${enable_ext_putwin+set}" = set; then
15667   enableval="$enable_ext_putwin"
15668   with_ext_putwin=$enableval
15669 else
15670   with_ext_putwin=$cf_dft_ext_putwin
15671 fi;
15672 echo "$as_me:15672: result: $with_ext_putwin" >&5
15673 echo "${ECHO_T}$with_ext_putwin" >&6
15674 if test "x$with_ext_putwin" = xyes ; then
15675
15676 cat >>confdefs.h <<\EOF
15677 #define NCURSES_EXT_PUTWIN 1
15678 EOF
15679
15680 fi
15681
15682 echo "$as_me:15682: checking if you want \$NCURSES_NO_PADDING code" >&5
15683 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15684
15685 # Check whether --enable-no-padding or --disable-no-padding was given.
15686 if test "${enable_no_padding+set}" = set; then
15687   enableval="$enable_no_padding"
15688   with_no_padding=$enableval
15689 else
15690   with_no_padding=$with_ext_funcs
15691 fi;
15692 echo "$as_me:15692: result: $with_no_padding" >&5
15693 echo "${ECHO_T}$with_no_padding" >&6
15694 test "x$with_no_padding" = xyes &&
15695 cat >>confdefs.h <<\EOF
15696 #define NCURSES_NO_PADDING 1
15697 EOF
15698
15699 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15700 echo "$as_me:15700: checking if you want SIGWINCH handler" >&5
15701 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15702
15703 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15704 if test "${enable_sigwinch+set}" = set; then
15705   enableval="$enable_sigwinch"
15706   with_sigwinch=$enableval
15707 else
15708   with_sigwinch=$with_ext_funcs
15709 fi;
15710 echo "$as_me:15710: result: $with_sigwinch" >&5
15711 echo "${ECHO_T}$with_sigwinch" >&6
15712 test "x$with_sigwinch" = xyes &&
15713 cat >>confdefs.h <<\EOF
15714 #define USE_SIGWINCH 1
15715 EOF
15716
15717 ###   use option --enable-tcap-names to allow user to define new capabilities
15718 echo "$as_me:15718: checking if you want user-definable terminal capabilities like termcap" >&5
15719 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15720
15721 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15722 if test "${enable_tcap_names+set}" = set; then
15723   enableval="$enable_tcap_names"
15724   with_tcap_names=$enableval
15725 else
15726   with_tcap_names=$with_ext_funcs
15727 fi;
15728 echo "$as_me:15728: result: $with_tcap_names" >&5
15729 echo "${ECHO_T}$with_tcap_names" >&6
15730 NCURSES_XNAMES=0
15731 if test "x$with_tcap_names" = xyes; then
15732         NCURSES_XNAMES=1
15733
15734 cat >>confdefs.h <<\EOF
15735 #define NCURSES_XNAMES 1
15736 EOF
15737
15738 fi
15739
15740 ##############################################################################
15741
15742 echo "$as_me:15742: checking if you want to link with the pthread library" >&5
15743 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15744
15745 # Check whether --with-pthread or --without-pthread was given.
15746 if test "${with_pthread+set}" = set; then
15747   withval="$with_pthread"
15748   with_pthread=$withval
15749 else
15750   with_pthread=no
15751 fi;
15752 echo "$as_me:15752: result: $with_pthread" >&5
15753 echo "${ECHO_T}$with_pthread" >&6
15754
15755 if test "$with_pthread" != no ; then
15756         echo "$as_me:15756: checking for pthread.h" >&5
15757 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15758 if test "${ac_cv_header_pthread_h+set}" = set; then
15759   echo $ECHO_N "(cached) $ECHO_C" >&6
15760 else
15761   cat >"conftest.$ac_ext" <<_ACEOF
15762 #line 15762 "configure"
15763 #include "confdefs.h"
15764 #include <pthread.h>
15765 _ACEOF
15766 if { (eval echo "$as_me:15766: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15767   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15768   ac_status=$?
15769   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15770   rm -f conftest.er1
15771   cat conftest.err >&5
15772   echo "$as_me:15772: \$? = $ac_status" >&5
15773   (exit "$ac_status"); } >/dev/null; then
15774   if test -s conftest.err; then
15775     ac_cpp_err=$ac_c_preproc_warn_flag
15776   else
15777     ac_cpp_err=
15778   fi
15779 else
15780   ac_cpp_err=yes
15781 fi
15782 if test -z "$ac_cpp_err"; then
15783   ac_cv_header_pthread_h=yes
15784 else
15785   echo "$as_me: failed program was:" >&5
15786   cat "conftest.$ac_ext" >&5
15787   ac_cv_header_pthread_h=no
15788 fi
15789 rm -f conftest.err "conftest.$ac_ext"
15790 fi
15791 echo "$as_me:15791: result: $ac_cv_header_pthread_h" >&5
15792 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15793 if test "$ac_cv_header_pthread_h" = yes; then
15794
15795 cat >>confdefs.h <<\EOF
15796 #define HAVE_PTHREADS_H 1
15797 EOF
15798
15799         for cf_lib_pthread in pthread c_r
15800         do
15801             echo "$as_me:15801: checking if we can link with the $cf_lib_pthread library" >&5
15802 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15803             cf_save_LIBS="$LIBS"
15804
15805 cf_add_libs="$LIBS"
15806 # reverse order
15807 cf_add_0lib=
15808 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15809 # filter duplicates
15810 for cf_add_1lib in $cf_add_0lib; do
15811         for cf_add_2lib in $cf_add_libs; do
15812                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15813                         cf_add_1lib=
15814                         break
15815                 fi
15816         done
15817         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15818 done
15819 LIBS="$cf_add_libs"
15820
15821             cat >"conftest.$ac_ext" <<_ACEOF
15822 #line 15822 "configure"
15823 #include "confdefs.h"
15824
15825 #include <pthread.h>
15826
15827 int
15828 main (void)
15829 {
15830
15831                 int rc = pthread_create(0,0,0,0);
15832                 int r2 = pthread_mutexattr_settype(0, 0);
15833
15834   ;
15835   return 0;
15836 }
15837 _ACEOF
15838 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15839 if { (eval echo "$as_me:15839: \"$ac_link\"") >&5
15840   (eval $ac_link) 2>&5
15841   ac_status=$?
15842   echo "$as_me:15842: \$? = $ac_status" >&5
15843   (exit "$ac_status"); } &&
15844          { ac_try='test -s "conftest$ac_exeext"'
15845   { (eval echo "$as_me:15845: \"$ac_try\"") >&5
15846   (eval $ac_try) 2>&5
15847   ac_status=$?
15848   echo "$as_me:15848: \$? = $ac_status" >&5
15849   (exit "$ac_status"); }; }; then
15850   with_pthread=yes
15851 else
15852   echo "$as_me: failed program was:" >&5
15853 cat "conftest.$ac_ext" >&5
15854 with_pthread=no
15855 fi
15856 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15857             LIBS="$cf_save_LIBS"
15858             echo "$as_me:15858: result: $with_pthread" >&5
15859 echo "${ECHO_T}$with_pthread" >&6
15860             test "$with_pthread" = yes && break
15861         done
15862
15863         if test "$with_pthread" = yes ; then
15864
15865 cf_add_libs="$LIBS"
15866 # reverse order
15867 cf_add_0lib=
15868 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15869 # filter duplicates
15870 for cf_add_1lib in $cf_add_0lib; do
15871         for cf_add_2lib in $cf_add_libs; do
15872                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15873                         cf_add_1lib=
15874                         break
15875                 fi
15876         done
15877         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15878 done
15879 LIBS="$cf_add_libs"
15880
15881 cat >>confdefs.h <<\EOF
15882 #define HAVE_LIBPTHREADS 1
15883 EOF
15884
15885         else
15886             { { echo "$as_me:15886: error: Cannot link with pthread library" >&5
15887 echo "$as_me: error: Cannot link with pthread library" >&2;}
15888    { (exit 1); exit 1; }; }
15889         fi
15890
15891 fi
15892
15893 fi
15894
15895 if test "x$with_pthread" != xno; then
15896         echo "$as_me:15896: checking for pthread_kill" >&5
15897 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15898 if test "${ac_cv_func_pthread_kill+set}" = set; then
15899   echo $ECHO_N "(cached) $ECHO_C" >&6
15900 else
15901   cat >"conftest.$ac_ext" <<_ACEOF
15902 #line 15902 "configure"
15903 #include "confdefs.h"
15904 #define pthread_kill autoconf_temporary
15905 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15906 #undef pthread_kill
15907
15908 #ifdef __cplusplus
15909 extern "C"
15910 #endif
15911
15912 /* We use char because int might match the return type of a gcc2
15913    builtin and then its argument prototype would still apply.  */
15914 char pthread_kill (void);
15915
15916 int
15917 main (void)
15918 {
15919
15920 /* The GNU C library defines stubs for functions which it implements
15921     to always fail with ENOSYS.  Some functions are actually named
15922     something starting with __ and the normal name is an alias.  */
15923 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15924 #error found stub for pthread_kill
15925 #endif
15926
15927         return pthread_kill ();
15928   ;
15929   return 0;
15930 }
15931 _ACEOF
15932 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15933 if { (eval echo "$as_me:15933: \"$ac_link\"") >&5
15934   (eval $ac_link) 2>&5
15935   ac_status=$?
15936   echo "$as_me:15936: \$? = $ac_status" >&5
15937   (exit "$ac_status"); } &&
15938          { ac_try='test -s "conftest$ac_exeext"'
15939   { (eval echo "$as_me:15939: \"$ac_try\"") >&5
15940   (eval $ac_try) 2>&5
15941   ac_status=$?
15942   echo "$as_me:15942: \$? = $ac_status" >&5
15943   (exit "$ac_status"); }; }; then
15944   ac_cv_func_pthread_kill=yes
15945 else
15946   echo "$as_me: failed program was:" >&5
15947 cat "conftest.$ac_ext" >&5
15948 ac_cv_func_pthread_kill=no
15949 fi
15950 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15951 fi
15952 echo "$as_me:15952: result: $ac_cv_func_pthread_kill" >&5
15953 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15954 if test "$ac_cv_func_pthread_kill" = yes; then
15955
15956                 echo "$as_me:15956: checking if you want to allow EINTR in wgetch with pthreads" >&5
15957 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15958
15959 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15960 if test "${enable_pthreads_eintr+set}" = set; then
15961   enableval="$enable_pthreads_eintr"
15962   use_pthreads_eintr=$enableval
15963 else
15964   use_pthreads_eintr=no
15965 fi;
15966                 echo "$as_me:15966: result: $use_pthreads_eintr" >&5
15967 echo "${ECHO_T}$use_pthreads_eintr" >&6
15968                 if test "x$use_pthreads_eintr" = xyes ; then
15969
15970 cat >>confdefs.h <<\EOF
15971 #define USE_PTHREADS_EINTR 1
15972 EOF
15973
15974                 fi
15975 fi
15976
15977         echo "$as_me:15977: checking if you want to use weak-symbols for pthreads" >&5
15978 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15979
15980 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15981 if test "${enable_weak_symbols+set}" = set; then
15982   enableval="$enable_weak_symbols"
15983   use_weak_symbols=$enableval
15984 else
15985   use_weak_symbols=no
15986 fi;
15987         echo "$as_me:15987: result: $use_weak_symbols" >&5
15988 echo "${ECHO_T}$use_weak_symbols" >&6
15989         if test "x$use_weak_symbols" = xyes ; then
15990
15991 echo "$as_me:15991: checking if $CC supports weak symbols" >&5
15992 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15993 if test "${cf_cv_weak_symbols+set}" = set; then
15994   echo $ECHO_N "(cached) $ECHO_C" >&6
15995 else
15996
15997 cat >"conftest.$ac_ext" <<_ACEOF
15998 #line 15998 "configure"
15999 #include "confdefs.h"
16000
16001 #include <stdio.h>
16002 int
16003 main (void)
16004 {
16005
16006 #if defined(__GNUC__)
16007 #  if defined __USE_ISOC99
16008 #    define _cat_pragma(exp)    _Pragma(#exp)
16009 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16010 #  else
16011 #    define _weak_pragma(exp)
16012 #  endif
16013 #  define _declare(name)        __extension__ extern __typeof__(name) name
16014 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16015 #endif
16016
16017 weak_symbol(fopen);
16018
16019   ;
16020   return 0;
16021 }
16022 _ACEOF
16023 rm -f "conftest.$ac_objext"
16024 if { (eval echo "$as_me:16024: \"$ac_compile\"") >&5
16025   (eval $ac_compile) 2>&5
16026   ac_status=$?
16027   echo "$as_me:16027: \$? = $ac_status" >&5
16028   (exit "$ac_status"); } &&
16029          { ac_try='test -s "conftest.$ac_objext"'
16030   { (eval echo "$as_me:16030: \"$ac_try\"") >&5
16031   (eval $ac_try) 2>&5
16032   ac_status=$?
16033   echo "$as_me:16033: \$? = $ac_status" >&5
16034   (exit "$ac_status"); }; }; then
16035   cf_cv_weak_symbols=yes
16036 else
16037   echo "$as_me: failed program was:" >&5
16038 cat "conftest.$ac_ext" >&5
16039 cf_cv_weak_symbols=no
16040 fi
16041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16042
16043 fi
16044 echo "$as_me:16044: result: $cf_cv_weak_symbols" >&5
16045 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16046
16047         else
16048                 cf_cv_weak_symbols=no
16049         fi
16050
16051         if test "x$cf_cv_weak_symbols" = xyes ; then
16052
16053 cat >>confdefs.h <<\EOF
16054 #define USE_WEAK_SYMBOLS 1
16055 EOF
16056
16057         fi
16058 fi
16059
16060 PTHREAD=
16061 if test "x$with_pthread" = "xyes" ; then
16062
16063 cat >>confdefs.h <<\EOF
16064 #define USE_PTHREADS 1
16065 EOF
16066
16067         enable_reentrant=yes
16068         if test "x$cf_cv_weak_symbols" = xyes ; then
16069                 PTHREAD=-lpthread
16070
16071 cf_add_libs="$PRIVATE_LIBS"
16072 # reverse order
16073 cf_add_0lib=
16074 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16075 # filter duplicates
16076 for cf_add_1lib in $cf_add_0lib; do
16077         for cf_add_2lib in $cf_add_libs; do
16078                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16079                         cf_add_1lib=
16080                         break
16081                 fi
16082         done
16083         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16084 done
16085 PRIVATE_LIBS="$cf_add_libs"
16086
16087         fi
16088 fi
16089
16090 # Reentrant code has to be opaque; there's little advantage to making ncurses
16091 # opaque outside of that, so there is no --enable-opaque option.  We can use
16092 # this option without --with-pthreads, but this will be always set for
16093 # pthreads.
16094 echo "$as_me:16094: checking if you want reentrant code" >&5
16095 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16096
16097 # Check whether --enable-reentrant or --disable-reentrant was given.
16098 if test "${enable_reentrant+set}" = set; then
16099   enableval="$enable_reentrant"
16100   with_reentrant=$enableval
16101 else
16102   with_reentrant=no
16103 fi;
16104 echo "$as_me:16104: result: $with_reentrant" >&5
16105 echo "${ECHO_T}$with_reentrant" >&6
16106 if test "x$with_reentrant" = xyes ; then
16107         cf_cv_enable_reentrant=1
16108         cf_cv_enable_opaque="NCURSES_INTERNALS"
16109         NCURSES_SIZE_T=int
16110         if test "x$cf_cv_weak_symbols" = xyes ; then
16111
16112 # remove pthread library from $LIBS
16113 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16114
16115 cf_add_libs="$TEST_LIBS"
16116 # reverse order
16117 cf_add_0lib=
16118 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16119 # filter duplicates
16120 for cf_add_1lib in $cf_add_0lib; do
16121         for cf_add_2lib in $cf_add_libs; do
16122                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16123                         cf_add_1lib=
16124                         break
16125                 fi
16126         done
16127         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16128 done
16129 TEST_LIBS="$cf_add_libs"
16130
16131 cf_add_libs="$TEST_LIBS2"
16132 # reverse order
16133 cf_add_0lib=
16134 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16135 # filter duplicates
16136 for cf_add_1lib in $cf_add_0lib; do
16137         for cf_add_2lib in $cf_add_libs; do
16138                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16139                         cf_add_1lib=
16140                         break
16141                 fi
16142         done
16143         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16144 done
16145 TEST_LIBS2="$cf_add_libs"
16146
16147 cf_add_libs="$PRIVATE_LIBS"
16148 # reverse order
16149 cf_add_0lib=
16150 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16151 # filter duplicates
16152 for cf_add_1lib in $cf_add_0lib; do
16153         for cf_add_2lib in $cf_add_libs; do
16154                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16155                         cf_add_1lib=
16156                         break
16157                 fi
16158         done
16159         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16160 done
16161 PRIVATE_LIBS="$cf_add_libs"
16162
16163         else
16164                 # when not using weak symbols but with_reentrant,
16165                 # add 't' to the library suffix on all platforms
16166                 # except cygwin, where we only do that if ALSO
16167                 # compiling with full thread support.
16168                 case "$host" in
16169                 (*cygwin* | *msys*)
16170                         if test "$with_pthread" = "yes" ; then
16171                                 if test "x$disable_lib_suffixes" = "xno" ; then
16172                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16173                                 fi
16174                         fi ;;
16175                 (*)
16176                         if test "x$disable_lib_suffixes" = "xno" ; then
16177                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16178                         fi
16179                         ;;
16180                 esac
16181         fi
16182
16183 cat >>confdefs.h <<\EOF
16184 #define USE_REENTRANT 1
16185 EOF
16186
16187 if test "${with_abi_version+set}" != set; then
16188         case "$cf_cv_rel_version" in
16189         (5.*)
16190                 cf_cv_rel_version=6.0
16191                 cf_cv_abi_version=6
16192                 cf_cv_abi_default=6
16193                 { echo "$as_me:16193: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16194 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16195                 ;;
16196         esac
16197 fi
16198
16199 else
16200         cf_cv_enable_reentrant=0
16201         cf_cv_enable_opaque="NCURSES_OPAQUE"
16202         NCURSES_SIZE_T=$cf_dft_ordinate_type
16203 fi
16204
16205 echo "$as_me:16205: checking if you want opaque curses-library structures" >&5
16206 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
16207
16208 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16209 if test "${enable_opaque_curses+set}" = set; then
16210   enableval="$enable_opaque_curses"
16211   test "$enableval" != yes && enableval=no
16212         if test "$enableval" != "no" ; then
16213     enable_opaque_curses=yes
16214         else
16215
16216          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16217          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16218
16219         fi
16220 else
16221   enableval=no
16222
16223          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16224          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16225
16226 fi;
16227 echo "$as_me:16227: result: $enable_opaque_curses" >&5
16228 echo "${ECHO_T}$enable_opaque_curses" >&6
16229
16230 test "$cf_cv_enable_reentrant" = 1 && \
16231 test "$enable_opaque_curses" = no && \
16232 { { echo "$as_me:16232: error: reentrant configuration requires opaque library" >&5
16233 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16234    { (exit 1); exit 1; }; }
16235
16236 echo "$as_me:16236: checking if you want opaque form-library structures" >&5
16237 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
16238
16239 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16240 if test "${enable_opaque_form+set}" = set; then
16241   enableval="$enable_opaque_form"
16242   enable_opaque_form=yes
16243 else
16244   enable_opaque_form=$cf_dft_opaque_curses
16245 fi;
16246 echo "$as_me:16246: result: $enable_opaque_form" >&5
16247 echo "${ECHO_T}$enable_opaque_form" >&6
16248
16249 echo "$as_me:16249: checking if you want opaque menu-library structures" >&5
16250 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
16251
16252 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16253 if test "${enable_opaque_menu+set}" = set; then
16254   enableval="$enable_opaque_menu"
16255   enable_opaque_menu=yes
16256 else
16257   enable_opaque_menu=$cf_dft_opaque_curses
16258 fi;
16259 echo "$as_me:16259: result: $enable_opaque_menu" >&5
16260 echo "${ECHO_T}$enable_opaque_menu" >&6
16261
16262 echo "$as_me:16262: checking if you want opaque panel-library structures" >&5
16263 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
16264
16265 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16266 if test "${enable_opaque_panel+set}" = set; then
16267   enableval="$enable_opaque_panel"
16268   enable_opaque_panel=yes
16269 else
16270   enable_opaque_panel=$cf_dft_opaque_curses
16271 fi;
16272 echo "$as_me:16272: result: $enable_opaque_panel" >&5
16273 echo "${ECHO_T}$enable_opaque_panel" >&6
16274
16275 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16276 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16277 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16278 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16279
16280 ### Allow using a different wrap-prefix
16281 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16282         echo "$as_me:16282: checking for prefix used to wrap public variables" >&5
16283 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16284
16285 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16286 if test "${with_wrap_prefix+set}" = set; then
16287   withval="$with_wrap_prefix"
16288   NCURSES_WRAP_PREFIX=$withval
16289 else
16290   NCURSES_WRAP_PREFIX=_nc_
16291 fi;
16292         echo "$as_me:16292: result: $NCURSES_WRAP_PREFIX" >&5
16293 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16294 else
16295         NCURSES_WRAP_PREFIX=_nc_
16296 fi
16297
16298 cat >>confdefs.h <<EOF
16299 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16300 EOF
16301
16302 ###############################################################################
16303 # These options are relatively safe to experiment with.
16304
16305 echo "$as_me:16305: checking if you want all development code" >&5
16306 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16307
16308 # Check whether --with-develop or --without-develop was given.
16309 if test "${with_develop+set}" = set; then
16310   withval="$with_develop"
16311   with_develop=$withval
16312 else
16313   with_develop=no
16314 fi;
16315 echo "$as_me:16315: result: $with_develop" >&5
16316 echo "${ECHO_T}$with_develop" >&6
16317
16318 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16319 echo "$as_me:16319: checking if you want hard-tabs code" >&5
16320 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16321
16322 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16323 if test "${enable_hard_tabs+set}" = set; then
16324   enableval="$enable_hard_tabs"
16325
16326 else
16327   enable_hard_tabs=$with_develop
16328 fi;
16329 echo "$as_me:16329: result: $enable_hard_tabs" >&5
16330 echo "${ECHO_T}$enable_hard_tabs" >&6
16331 test "x$enable_hard_tabs" = xyes &&
16332 cat >>confdefs.h <<\EOF
16333 #define USE_HARD_TABS 1
16334 EOF
16335
16336 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16337 echo "$as_me:16337: checking if you want limited support for xmc" >&5
16338 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16339
16340 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16341 if test "${enable_xmc_glitch+set}" = set; then
16342   enableval="$enable_xmc_glitch"
16343
16344 else
16345   enable_xmc_glitch=$with_develop
16346 fi;
16347 echo "$as_me:16347: result: $enable_xmc_glitch" >&5
16348 echo "${ECHO_T}$enable_xmc_glitch" >&6
16349 test "x$enable_xmc_glitch" = xyes &&
16350 cat >>confdefs.h <<\EOF
16351 #define USE_XMC_SUPPORT 1
16352 EOF
16353
16354 ###############################################################################
16355 # These are just experimental, probably should not be in a package:
16356
16357 echo "$as_me:16357: checking if you do not want to assume colors are white-on-black" >&5
16358 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16359
16360 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16361 if test "${enable_assumed_color+set}" = set; then
16362   enableval="$enable_assumed_color"
16363   with_assumed_color=$enableval
16364 else
16365   with_assumed_color=yes
16366 fi;
16367 echo "$as_me:16367: result: $with_assumed_color" >&5
16368 echo "${ECHO_T}$with_assumed_color" >&6
16369 test "x$with_assumed_color" = xyes &&
16370 cat >>confdefs.h <<\EOF
16371 #define USE_ASSUMED_COLOR 1
16372 EOF
16373
16374 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16375 echo "$as_me:16375: checking if you want hashmap scrolling-optimization code" >&5
16376 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16377
16378 # Check whether --enable-hashmap or --disable-hashmap was given.
16379 if test "${enable_hashmap+set}" = set; then
16380   enableval="$enable_hashmap"
16381   with_hashmap=$enableval
16382 else
16383   with_hashmap=yes
16384 fi;
16385 echo "$as_me:16385: result: $with_hashmap" >&5
16386 echo "${ECHO_T}$with_hashmap" >&6
16387 test "x$with_hashmap" = xyes &&
16388 cat >>confdefs.h <<\EOF
16389 #define USE_HASHMAP 1
16390 EOF
16391
16392 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16393 echo "$as_me:16393: checking if you want code to check screensize" >&5
16394 echo $ECHO_N "checking if you want code to check screensize... $ECHO_C" >&6
16395
16396 # Check whether --enable-check-size or --disable-check-size was given.
16397 if test "${enable_check_size+set}" = set; then
16398   enableval="$enable_check_size"
16399   with_check_size=$enableval
16400 else
16401   with_check_size=no
16402 fi;
16403 echo "$as_me:16403: result: $with_check_size" >&5
16404 echo "${ECHO_T}$with_check_size" >&6
16405 test "x$with_check_size" = xyes &&
16406 cat >>confdefs.h <<\EOF
16407 #define USE_CHECK_SIZE 1
16408 EOF
16409
16410 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16411 echo "$as_me:16411: checking if you want colorfgbg code" >&5
16412 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16413
16414 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16415 if test "${enable_colorfgbg+set}" = set; then
16416   enableval="$enable_colorfgbg"
16417   with_colorfgbg=$enableval
16418 else
16419   with_colorfgbg=no
16420 fi;
16421 echo "$as_me:16421: result: $with_colorfgbg" >&5
16422 echo "${ECHO_T}$with_colorfgbg" >&6
16423 test "x$with_colorfgbg" = xyes &&
16424 cat >>confdefs.h <<\EOF
16425 #define USE_COLORFGBG 1
16426 EOF
16427
16428 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16429 echo "$as_me:16429: checking if you want to use gcc -fvisibility option" >&5
16430 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16431
16432 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16433 if test "${enable_fvisibility+set}" = set; then
16434   enableval="$enable_fvisibility"
16435   cf_with_fvisibility=$enableval
16436 else
16437   cf_with_fvisibility=no
16438 fi;
16439 echo "$as_me:16439: result: $cf_with_fvisibility" >&5
16440 echo "${ECHO_T}$cf_with_fvisibility" >&6
16441
16442 NCURSES_IMPEXP=
16443 NCURSES_CXX_IMPEXP=
16444 if test "x$cf_with_fvisibility" = xyes; then
16445
16446 echo "$as_me:16446: checking if $CC -fvisibility=hidden option works" >&5
16447 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16448 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16449   echo $ECHO_N "(cached) $ECHO_C" >&6
16450 else
16451
16452     cf_save_cflags="$CFLAGS"
16453     CFLAGS="$CFLAGS -fvisibility=hidden"
16454     cat >"conftest.$ac_ext" <<_ACEOF
16455 #line 16455 "configure"
16456 #include "confdefs.h"
16457
16458 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16459
16460 int
16461 main (void)
16462 {
16463
16464         if (somefunc()) return 1;
16465
16466   ;
16467   return 0;
16468 }
16469 _ACEOF
16470 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16471 if { (eval echo "$as_me:16471: \"$ac_link\"") >&5
16472   (eval $ac_link) 2>&5
16473   ac_status=$?
16474   echo "$as_me:16474: \$? = $ac_status" >&5
16475   (exit "$ac_status"); } &&
16476          { ac_try='test -s "conftest$ac_exeext"'
16477   { (eval echo "$as_me:16477: \"$ac_try\"") >&5
16478   (eval $ac_try) 2>&5
16479   ac_status=$?
16480   echo "$as_me:16480: \$? = $ac_status" >&5
16481   (exit "$ac_status"); }; }; then
16482   cf_cv_fvisibility_hidden=yes
16483 else
16484   echo "$as_me: failed program was:" >&5
16485 cat "conftest.$ac_ext" >&5
16486 cf_cv_fvisibility_hidden=no
16487 fi
16488 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16489     CFLAGS=$cf_save_cflags
16490
16491 fi
16492 echo "$as_me:16492: result: $cf_cv_fvisibility_hidden" >&5
16493 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16494
16495         if test "x$cf_cv_fvisibility_hidden" = xyes
16496         then
16497
16498 cf_fix_cppflags=no
16499 cf_new_cflags=
16500 cf_new_cppflags=
16501 cf_new_extra_cppflags=
16502
16503 for cf_add_cflags in -fvisibility=hidden
16504 do
16505 case "$cf_fix_cppflags" in
16506 (no)
16507         case "$cf_add_cflags" in
16508         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16509                 case "$cf_add_cflags" in
16510                 (-D*)
16511                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16512
16513                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16514                                 && test -z "${cf_tst_cflags}" \
16515                                 && cf_fix_cppflags=yes
16516
16517                         if test "$cf_fix_cppflags" = yes ; then
16518
16519         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16520         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16521
16522                                 continue
16523                         elif test "${cf_tst_cflags}" = "\"'" ; then
16524
16525         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16526         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16527
16528                                 continue
16529                         fi
16530                         ;;
16531                 esac
16532                 case "$CPPFLAGS" in
16533                 (*$cf_add_cflags)
16534                         ;;
16535                 (*)
16536                         case "$cf_add_cflags" in
16537                         (-D*)
16538                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16539
16540 CPPFLAGS=`echo "$CPPFLAGS" | \
16541         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16542                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16543
16544                                 ;;
16545                         esac
16546
16547         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16548         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16549
16550                         ;;
16551                 esac
16552                 ;;
16553         (*)
16554
16555         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16556         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16557
16558                 ;;
16559         esac
16560         ;;
16561 (yes)
16562
16563         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16564         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16565
16566         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16567
16568         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16569                 && test -z "${cf_tst_cflags}" \
16570                 && cf_fix_cppflags=no
16571         ;;
16572 esac
16573 done
16574
16575 if test -n "$cf_new_cflags" ; then
16576
16577         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16578         CFLAGS="${CFLAGS}$cf_new_cflags"
16579
16580 fi
16581
16582 if test -n "$cf_new_cppflags" ; then
16583
16584         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16585         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16586
16587 fi
16588
16589 if test -n "$cf_new_extra_cppflags" ; then
16590
16591         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16592         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16593
16594 fi
16595
16596                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16597         fi
16598         if test -n "$CXX"
16599         then
16600                 ac_ext=cc
16601 ac_cpp='$CXXCPP $CPPFLAGS'
16602 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16603 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16604 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16605 ac_main_return="return"
16606
16607 echo "$as_me:16607: checking if $CXX -fvisibility=hidden option works" >&5
16608 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16609 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16610   echo $ECHO_N "(cached) $ECHO_C" >&6
16611 else
16612
16613     cf_save_cflags="$CXXFLAGS"
16614     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16615     cat >"conftest.$ac_ext" <<_ACEOF
16616 #line 16616 "configure"
16617 #include "confdefs.h"
16618
16619 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16620
16621 int
16622 main (void)
16623 {
16624
16625         if (somefunc()) return 1;
16626
16627   ;
16628   return 0;
16629 }
16630 _ACEOF
16631 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16632 if { (eval echo "$as_me:16632: \"$ac_link\"") >&5
16633   (eval $ac_link) 2>&5
16634   ac_status=$?
16635   echo "$as_me:16635: \$? = $ac_status" >&5
16636   (exit "$ac_status"); } &&
16637          { ac_try='test -s "conftest$ac_exeext"'
16638   { (eval echo "$as_me:16638: \"$ac_try\"") >&5
16639   (eval $ac_try) 2>&5
16640   ac_status=$?
16641   echo "$as_me:16641: \$? = $ac_status" >&5
16642   (exit "$ac_status"); }; }; then
16643   cf_cv_fvisibility_hidden2=yes
16644 else
16645   echo "$as_me: failed program was:" >&5
16646 cat "conftest.$ac_ext" >&5
16647 cf_cv_fvisibility_hidden2=no
16648 fi
16649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16650     CXXFLAGS=$cf_save_cflags
16651
16652 fi
16653 echo "$as_me:16653: result: $cf_cv_fvisibility_hidden2" >&5
16654 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16655
16656                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16657                 then
16658
16659 cf_save_CXXFLAGS="$CFLAGS"
16660 CFLAGS="$CXXFLAGS"
16661
16662 cf_fix_cppflags=no
16663 cf_new_cflags=
16664 cf_new_cppflags=
16665 cf_new_extra_cppflags=
16666
16667 for cf_add_cflags in -fvisibility=hidden
16668 do
16669 case "$cf_fix_cppflags" in
16670 (no)
16671         case "$cf_add_cflags" in
16672         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16673                 case "$cf_add_cflags" in
16674                 (-D*)
16675                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16676
16677                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16678                                 && test -z "${cf_tst_cflags}" \
16679                                 && cf_fix_cppflags=yes
16680
16681                         if test "$cf_fix_cppflags" = yes ; then
16682
16683         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16684         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16685
16686                                 continue
16687                         elif test "${cf_tst_cflags}" = "\"'" ; then
16688
16689         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16690         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16691
16692                                 continue
16693                         fi
16694                         ;;
16695                 esac
16696                 case "$CPPFLAGS" in
16697                 (*$cf_add_cflags)
16698                         ;;
16699                 (*)
16700                         case "$cf_add_cflags" in
16701                         (-D*)
16702                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16703
16704 CPPFLAGS=`echo "$CPPFLAGS" | \
16705         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16706                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16707
16708                                 ;;
16709                         esac
16710
16711         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16712         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16713
16714                         ;;
16715                 esac
16716                 ;;
16717         (*)
16718
16719         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16720         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16721
16722                 ;;
16723         esac
16724         ;;
16725 (yes)
16726
16727         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16728         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16729
16730         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16731
16732         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16733                 && test -z "${cf_tst_cflags}" \
16734                 && cf_fix_cppflags=no
16735         ;;
16736 esac
16737 done
16738
16739 if test -n "$cf_new_cflags" ; then
16740
16741         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16742         CFLAGS="${CFLAGS}$cf_new_cflags"
16743
16744 fi
16745
16746 if test -n "$cf_new_cppflags" ; then
16747
16748         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16749         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16750
16751 fi
16752
16753 if test -n "$cf_new_extra_cppflags" ; then
16754
16755         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16756         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16757
16758 fi
16759
16760 CXXFLAGS="$CFLAGS"
16761 CFLAGS="$cf_save_CXXFLAGS"
16762
16763                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16764                 fi
16765                 ac_ext=c
16766 ac_cpp='$CPP $CPPFLAGS'
16767 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16768 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16769 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16770 ac_main_return="return"
16771
16772         fi
16773 fi
16774
16775 ###   use option --enable-interop to turn on use of bindings used for interop
16776 echo "$as_me:16776: checking if you want interop bindings" >&5
16777 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16778
16779 # Check whether --enable-interop or --disable-interop was given.
16780 if test "${enable_interop+set}" = set; then
16781   enableval="$enable_interop"
16782   with_exp_interop=$enableval
16783 else
16784   with_exp_interop=$cf_dft_interop
16785 fi;
16786 echo "$as_me:16786: result: $with_exp_interop" >&5
16787 echo "${ECHO_T}$with_exp_interop" >&6
16788
16789 NCURSES_INTEROP_FUNCS=0
16790 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16791
16792 echo "$as_me:16792: checking if you want experimental safe-sprintf code" >&5
16793 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16794
16795 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16796 if test "${enable_safe_sprintf+set}" = set; then
16797   enableval="$enable_safe_sprintf"
16798   with_safe_sprintf=$enableval
16799 else
16800   with_safe_sprintf=no
16801 fi;
16802 echo "$as_me:16802: result: $with_safe_sprintf" >&5
16803 echo "${ECHO_T}$with_safe_sprintf" >&6
16804
16805 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16806 # when hashmap is used scroll hints are useless
16807 if test "$with_hashmap" = no ; then
16808 echo "$as_me:16808: checking if you want to experiment without scrolling-hints code" >&5
16809 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16810
16811 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16812 if test "${enable_scroll_hints+set}" = set; then
16813   enableval="$enable_scroll_hints"
16814   with_scroll_hints=$enableval
16815 else
16816   with_scroll_hints=yes
16817 fi;
16818 echo "$as_me:16818: result: $with_scroll_hints" >&5
16819 echo "${ECHO_T}$with_scroll_hints" >&6
16820 test "x$with_scroll_hints" = xyes &&
16821 cat >>confdefs.h <<\EOF
16822 #define USE_SCROLL_HINTS 1
16823 EOF
16824
16825 fi
16826
16827 echo "$as_me:16827: checking if you want wgetch-events code" >&5
16828 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16829
16830 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16831 if test "${enable_wgetch_events+set}" = set; then
16832   enableval="$enable_wgetch_events"
16833   with_wgetch_events=$enableval
16834 else
16835   with_wgetch_events=no
16836 fi;
16837 echo "$as_me:16837: result: $with_wgetch_events" >&5
16838 echo "${ECHO_T}$with_wgetch_events" >&6
16839 if test "x$with_wgetch_events" = xyes ; then
16840
16841 cat >>confdefs.h <<\EOF
16842 #define NCURSES_WGETCH_EVENTS 1
16843 EOF
16844
16845         NCURSES_WGETCH_EVENTS=1
16846 else
16847         NCURSES_WGETCH_EVENTS=0
16848 fi
16849
16850 case "$cf_cv_system_name" in
16851 (*mingw32*|*mingw64*|*-msvc*)
16852         echo "$as_me:16852: checking if you want experimental-Windows driver" >&5
16853 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16854
16855 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16856 if test "${enable_exp_win32+set}" = set; then
16857   enableval="$enable_exp_win32"
16858   with_exp_win32=$enableval
16859 else
16860   with_exp_win32=no
16861 fi;
16862         echo "$as_me:16862: result: $with_exp_win32" >&5
16863 echo "${ECHO_T}$with_exp_win32" >&6
16864         if test "x$with_exp_win32" = xyes
16865         then
16866
16867 cat >>confdefs.h <<\EOF
16868 #define EXP_WIN32_DRIVER 1
16869 EOF
16870
16871                 EXP_WIN32_DRIVER=1
16872                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16873         else
16874                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16875                 EXP_WIN32_DRIVER=0
16876         fi
16877         ;;
16878 (*)
16879         EXP_WIN32_DRIVER=0
16880         INTERNALS_HDR=
16881         ;;
16882 esac
16883
16884 ###############################################################################
16885
16886 ###     use option --disable-echo to suppress full display compiling commands
16887
16888 echo "$as_me:16888: checking if you want to see long compiling messages" >&5
16889 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16890
16891 # Check whether --enable-echo or --disable-echo was given.
16892 if test "${enable_echo+set}" = set; then
16893   enableval="$enable_echo"
16894   test "$enableval" != no && enableval=yes
16895         if test "$enableval" != "yes" ; then
16896
16897         ECHO_LT='--silent'
16898         ECHO_LD='@echo linking $@;'
16899         RULE_CC='@echo compiling $<'
16900         SHOW_CC='@echo compiling $@'
16901         ECHO_CC='@'
16902
16903         else
16904
16905         ECHO_LT=''
16906         ECHO_LD=''
16907         RULE_CC=''
16908         SHOW_CC=''
16909         ECHO_CC=''
16910
16911         fi
16912 else
16913   enableval=yes
16914
16915         ECHO_LT=''
16916         ECHO_LD=''
16917         RULE_CC=''
16918         SHOW_CC=''
16919         ECHO_CC=''
16920
16921 fi;
16922 echo "$as_me:16922: result: $enableval" >&5
16923 echo "${ECHO_T}$enableval" >&6
16924
16925 if test "x$enable_echo" = xyes; then
16926         ECHO_LINK=
16927 else
16928         ECHO_LINK='@ echo linking $@ ... ;'
16929         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16930         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16931 fi
16932
16933 # --disable-stripping is used for debugging
16934
16935 echo "$as_me:16935: checking if you want to install stripped executables" >&5
16936 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16937
16938 # Check whether --enable-stripping or --disable-stripping was given.
16939 if test "${enable_stripping+set}" = set; then
16940   enableval="$enable_stripping"
16941   test "$enableval" != no && enableval=yes
16942         if test "$enableval" != "yes" ; then
16943     enable_stripping=no
16944         else
16945                 enable_stripping=yes
16946         fi
16947 else
16948   enableval=yes
16949         enable_stripping=yes
16950
16951 fi;
16952 echo "$as_me:16952: result: $enable_stripping" >&5
16953 echo "${ECHO_T}$enable_stripping" >&6
16954
16955 if test "$enable_stripping" = yes
16956 then
16957         INSTALL_OPT_S="-s"
16958 else
16959         INSTALL_OPT_S=
16960 fi
16961
16962 : "${INSTALL:=install}"
16963 echo "$as_me:16963: checking if install accepts -p option" >&5
16964 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16965 if test "${cf_cv_install_p+set}" = set; then
16966   echo $ECHO_N "(cached) $ECHO_C" >&6
16967 else
16968
16969         rm -rf ./conftest*
16970         date >conftest.in
16971         mkdir conftest.out
16972         sleep 3
16973         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16974         then
16975                 if test -f conftest.out/conftest.in
16976                 then
16977                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16978                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16979                         if test -s conftest.err
16980                         then
16981                                 cf_cv_install_p=no
16982                         else
16983                                 cf_cv_install_p=yes
16984                         fi
16985                 else
16986                         cf_cv_install_p=no
16987                 fi
16988         else
16989                 cf_cv_install_p=no
16990         fi
16991         rm -rf ./conftest*
16992
16993 fi
16994 echo "$as_me:16994: result: $cf_cv_install_p" >&5
16995 echo "${ECHO_T}$cf_cv_install_p" >&6
16996
16997 echo "$as_me:16997: checking if install needs to be told about ownership" >&5
16998 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16999 case `$ac_config_guess` in
17000 (*minix)
17001         with_install_o=yes
17002         ;;
17003 (*)
17004         with_install_o=no
17005         ;;
17006 esac
17007
17008 echo "$as_me:17008: result: $with_install_o" >&5
17009 echo "${ECHO_T}$with_install_o" >&6
17010 if test "x$with_install_o" = xyes
17011 then
17012         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'`"
17013 else
17014         INSTALL_OPT_O=
17015 fi
17016
17017 if test -n "$INSTALL_OPT_S"
17018 then
17019         echo "$as_me:17019: checking if you want to specify strip-program" >&5
17020 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17021
17022 # Check whether --with-strip-program or --without-strip-program was given.
17023 if test "${with_strip_program+set}" = set; then
17024   withval="$with_strip_program"
17025   with_strip_program=$withval
17026 else
17027   with_strip_program=no
17028 fi;
17029         echo "$as_me:17029: result: $with_strip_program" >&5
17030 echo "${ECHO_T}$with_strip_program" >&6
17031         if test "$with_strip_program" != no
17032         then
17033                 echo "$as_me:17033: checking if strip-program is supported with this installer" >&5
17034 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17035                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17036                 check_install_strip=no
17037                 if test -f "$cf_install_program"
17038                 then
17039                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17040                         if test -n "$check_install_version"
17041                         then
17042                                 check_install_strip="option"
17043                         else
17044                                 for check_strip_variable in STRIPBIN STRIP
17045                                 do
17046                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17047                                         then
17048                                                 check_install_strip="environ"
17049                                                 break
17050                                         fi
17051                                 done
17052                         fi
17053                 fi
17054                 echo "$as_me:17054: result: $check_install_strip" >&5
17055 echo "${ECHO_T}$check_install_strip" >&6
17056                 case "$check_install_strip" in
17057                 (no)
17058                         { echo "$as_me:17058: WARNING: $cf_install_program does not support strip program option" >&5
17059 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17060                         with_strip_program=no
17061                         ;;
17062                 (environ)
17063                         cat >install.tmp <<-CF_EOF
17064                         #! $SHELL
17065                         STRIPBIN="$with_strip_program" \\
17066                         STRIP="$with_strip_program" \\
17067                         $INSTALL "$@"
17068                         CF_EOF
17069                         INSTALL="`pwd`/install.tmp"
17070                         chmod +x "$INSTALL"
17071                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17072
17073 echo "${as_me:-configure}:17073: testing created $INSTALL ..." 1>&5
17074
17075                         ;;
17076                 (option)
17077                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17078                         ;;
17079                 esac
17080         fi
17081 fi
17082
17083 # If we're avoiding relinking of shared libraries during install, that is to
17084 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17085 # the install program has "-p" (for preserving timestamps).
17086 cf_cv_do_reranlib=yes
17087 if test "x$cf_cv_install_p" = xyes
17088 then
17089         if test "x$cf_cv_do_relink" != xyes
17090         then
17091                 cf_cv_do_reranlib=no
17092                 INSTALL_OPT_P="-p"
17093                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17094         fi
17095 fi
17096
17097 ###     use option --enable-warnings to turn on all gcc warnings
17098
17099 echo "$as_me:17099: checking if you want to use C11 _Noreturn feature" >&5
17100 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17101
17102 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17103 if test "${enable_stdnoreturn+set}" = set; then
17104   enableval="$enable_stdnoreturn"
17105   test "$enableval" != yes && enableval=no
17106         if test "$enableval" != "no" ; then
17107     enable_stdnoreturn=yes
17108         else
17109                 enable_stdnoreturn=no
17110         fi
17111 else
17112   enableval=no
17113         enable_stdnoreturn=no
17114
17115 fi;
17116 echo "$as_me:17116: result: $enable_stdnoreturn" >&5
17117 echo "${ECHO_T}$enable_stdnoreturn" >&6
17118
17119 if test $enable_stdnoreturn = yes; then
17120 echo "$as_me:17120: checking for C11 _Noreturn feature" >&5
17121 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17122 if test "${cf_cv_c11_noreturn+set}" = set; then
17123   echo $ECHO_N "(cached) $ECHO_C" >&6
17124 else
17125   cat >"conftest.$ac_ext" <<_ACEOF
17126 #line 17126 "configure"
17127 #include "confdefs.h"
17128
17129 $ac_includes_default
17130 #include <stdnoreturn.h>
17131 static _Noreturn void giveup(void) { exit(0); }
17132
17133 int
17134 main (void)
17135 {
17136 if (feof(stdin)) giveup()
17137   ;
17138   return 0;
17139 }
17140 _ACEOF
17141 rm -f "conftest.$ac_objext"
17142 if { (eval echo "$as_me:17142: \"$ac_compile\"") >&5
17143   (eval $ac_compile) 2>&5
17144   ac_status=$?
17145   echo "$as_me:17145: \$? = $ac_status" >&5
17146   (exit "$ac_status"); } &&
17147          { ac_try='test -s "conftest.$ac_objext"'
17148   { (eval echo "$as_me:17148: \"$ac_try\"") >&5
17149   (eval $ac_try) 2>&5
17150   ac_status=$?
17151   echo "$as_me:17151: \$? = $ac_status" >&5
17152   (exit "$ac_status"); }; }; then
17153   cf_cv_c11_noreturn=yes
17154 else
17155   echo "$as_me: failed program was:" >&5
17156 cat "conftest.$ac_ext" >&5
17157 cf_cv_c11_noreturn=no
17158 fi
17159 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17160
17161 fi
17162 echo "$as_me:17162: result: $cf_cv_c11_noreturn" >&5
17163 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17164 else
17165         cf_cv_c11_noreturn=no,
17166 fi
17167
17168 if test "$cf_cv_c11_noreturn" = yes; then
17169
17170 cat >>confdefs.h <<\EOF
17171 #define HAVE_STDNORETURN_H 1
17172 EOF
17173
17174 cat >>confdefs.h <<EOF
17175 #define STDC_NORETURN _Noreturn
17176 EOF
17177
17178         HAVE_STDNORETURN_H=1
17179 else
17180         HAVE_STDNORETURN_H=0
17181 fi
17182
17183 if test "$GCC" = yes || test "$GXX" = yes
17184 then
17185
17186 if test "$GCC" = yes || test "$GXX" = yes
17187 then
17188         case $CFLAGS in
17189         (*-Werror=*)
17190                 cf_temp_flags=
17191                 for cf_temp_scan in $CFLAGS
17192                 do
17193                         case "x$cf_temp_scan" in
17194                         (x-Werror=format*)
17195
17196         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17197         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17198
17199                                 ;;
17200                         (x-Werror=*)
17201
17202         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17203         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17204
17205                                 ;;
17206                         (*)
17207
17208         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17209         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17210
17211                                 ;;
17212                         esac
17213                 done
17214                 if test "x$CFLAGS" != "x$cf_temp_flags"
17215                 then
17216                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17217
17218 echo "${as_me:-configure}:17218: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17219
17220                         CFLAGS="$cf_temp_flags"
17221                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17222
17223 echo "${as_me:-configure}:17223: testing ... fixed $CFLAGS ..." 1>&5
17224
17225                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17226
17227 echo "${as_me:-configure}:17227: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17228
17229                 fi
17230                 ;;
17231         esac
17232 fi
17233
17234 if test "$GCC" = yes || test "$GXX" = yes
17235 then
17236         case $CPPFLAGS in
17237         (*-Werror=*)
17238                 cf_temp_flags=
17239                 for cf_temp_scan in $CPPFLAGS
17240                 do
17241                         case "x$cf_temp_scan" in
17242                         (x-Werror=format*)
17243
17244         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17245         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17246
17247                                 ;;
17248                         (x-Werror=*)
17249
17250         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17251         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17252
17253                                 ;;
17254                         (*)
17255
17256         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17257         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17258
17259                                 ;;
17260                         esac
17261                 done
17262                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17263                 then
17264                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17265
17266 echo "${as_me:-configure}:17266: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17267
17268                         CPPFLAGS="$cf_temp_flags"
17269                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17270
17271 echo "${as_me:-configure}:17271: testing ... fixed $CPPFLAGS ..." 1>&5
17272
17273                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17274
17275 echo "${as_me:-configure}:17275: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17276
17277                 fi
17278                 ;;
17279         esac
17280 fi
17281
17282 if test "$GCC" = yes || test "$GXX" = yes
17283 then
17284         case $LDFLAGS in
17285         (*-Werror=*)
17286                 cf_temp_flags=
17287                 for cf_temp_scan in $LDFLAGS
17288                 do
17289                         case "x$cf_temp_scan" in
17290                         (x-Werror=format*)
17291
17292         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17293         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17294
17295                                 ;;
17296                         (x-Werror=*)
17297
17298         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17299         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17300
17301                                 ;;
17302                         (*)
17303
17304         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17305         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17306
17307                                 ;;
17308                         esac
17309                 done
17310                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17311                 then
17312                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17313
17314 echo "${as_me:-configure}:17314: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17315
17316                         LDFLAGS="$cf_temp_flags"
17317                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17318
17319 echo "${as_me:-configure}:17319: testing ... fixed $LDFLAGS ..." 1>&5
17320
17321                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17322
17323 echo "${as_me:-configure}:17323: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17324
17325                 fi
17326                 ;;
17327         esac
17328 fi
17329
17330 echo "$as_me:17330: checking if you want to turn on gcc warnings" >&5
17331 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17332
17333 # Check whether --enable-warnings or --disable-warnings was given.
17334 if test "${enable_warnings+set}" = set; then
17335   enableval="$enable_warnings"
17336   test "$enableval" != yes && enableval=no
17337         if test "$enableval" != "no" ; then
17338     enable_warnings=yes
17339         else
17340                 enable_warnings=no
17341         fi
17342 else
17343   enableval=no
17344         enable_warnings=no
17345
17346 fi;
17347 echo "$as_me:17347: result: $enable_warnings" >&5
17348 echo "${ECHO_T}$enable_warnings" >&6
17349 if test "$enable_warnings" = "yes"
17350 then
17351
17352 if test "x$have_x" = xyes; then
17353
17354 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17355 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17356 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17357 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17358 for cf_X_CFLAGS in $X_CFLAGS
17359 do
17360         case "x$cf_X_CFLAGS" in
17361         x-[IUD]*)
17362                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17363                 ;;
17364         *)
17365                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17366                 ;;
17367         esac
17368 done
17369
17370 cat >"conftest.$ac_ext" <<_ACEOF
17371 #line 17371 "configure"
17372 #include "confdefs.h"
17373
17374 #include <stdlib.h>
17375 #include <X11/Intrinsic.h>
17376
17377 int
17378 main (void)
17379 {
17380 String foo = malloc(1); free((void*)foo)
17381   ;
17382   return 0;
17383 }
17384 _ACEOF
17385 rm -f "conftest.$ac_objext"
17386 if { (eval echo "$as_me:17386: \"$ac_compile\"") >&5
17387   (eval $ac_compile) 2>&5
17388   ac_status=$?
17389   echo "$as_me:17389: \$? = $ac_status" >&5
17390   (exit "$ac_status"); } &&
17391          { ac_try='test -s "conftest.$ac_objext"'
17392   { (eval echo "$as_me:17392: \"$ac_try\"") >&5
17393   (eval $ac_try) 2>&5
17394   ac_status=$?
17395   echo "$as_me:17395: \$? = $ac_status" >&5
17396   (exit "$ac_status"); }; }; then
17397
17398 echo "$as_me:17398: checking for X11/Xt const-feature" >&5
17399 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17400 if test "${cf_cv_const_x_string+set}" = set; then
17401   echo $ECHO_N "(cached) $ECHO_C" >&6
17402 else
17403
17404         cat >"conftest.$ac_ext" <<_ACEOF
17405 #line 17405 "configure"
17406 #include "confdefs.h"
17407
17408 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17409 #undef  XTSTRINGDEFINES /* X11R5 and later */
17410 #include <stdlib.h>
17411 #include <X11/Intrinsic.h>
17412
17413 int
17414 main (void)
17415 {
17416 String foo = malloc(1); *foo = 0
17417   ;
17418   return 0;
17419 }
17420 _ACEOF
17421 rm -f "conftest.$ac_objext"
17422 if { (eval echo "$as_me:17422: \"$ac_compile\"") >&5
17423   (eval $ac_compile) 2>&5
17424   ac_status=$?
17425   echo "$as_me:17425: \$? = $ac_status" >&5
17426   (exit "$ac_status"); } &&
17427          { ac_try='test -s "conftest.$ac_objext"'
17428   { (eval echo "$as_me:17428: \"$ac_try\"") >&5
17429   (eval $ac_try) 2>&5
17430   ac_status=$?
17431   echo "$as_me:17431: \$? = $ac_status" >&5
17432   (exit "$ac_status"); }; }; then
17433
17434                         cf_cv_const_x_string=no
17435
17436 else
17437   echo "$as_me: failed program was:" >&5
17438 cat "conftest.$ac_ext" >&5
17439
17440                         cf_cv_const_x_string=yes
17441
17442 fi
17443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17444
17445 fi
17446 echo "$as_me:17446: result: $cf_cv_const_x_string" >&5
17447 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17448
17449 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17450 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17451 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17452
17453 case "$cf_cv_const_x_string" in
17454 (no)
17455
17456         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17457         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17458
17459         ;;
17460 (*)
17461
17462         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17463         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17464
17465         ;;
17466 esac
17467
17468 else
17469   echo "$as_me: failed program was:" >&5
17470 cat "conftest.$ac_ext" >&5
17471 fi
17472 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17473  fi
17474 cat > "conftest.$ac_ext" <<EOF
17475 #line 17475 "${as_me:-configure}"
17476 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17477 EOF
17478 if test "$INTEL_COMPILER" = yes
17479 then
17480 # The "-wdXXX" options suppress warnings:
17481 # remark #1419: external declaration in primary source file
17482 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17483 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17484 # remark #193: zero used for undefined preprocessing identifier
17485 # remark #593: variable "curs_sb_left_arrow" was set but never used
17486 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17487 # remark #869: parameter "tw" was never referenced
17488 # remark #981: operands are evaluated in unspecified order
17489 # warning #279: controlling expression is constant
17490
17491         { echo "$as_me:17491: checking for $CC warning options..." >&5
17492 echo "$as_me: checking for $CC warning options..." >&6;}
17493         cf_save_CFLAGS="$CFLAGS"
17494         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17495         for cf_opt in \
17496                 wd1419 \
17497                 wd1683 \
17498                 wd1684 \
17499                 wd193 \
17500                 wd593 \
17501                 wd279 \
17502                 wd810 \
17503                 wd869 \
17504                 wd981
17505         do
17506                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17507                 if { (eval echo "$as_me:17507: \"$ac_compile\"") >&5
17508   (eval $ac_compile) 2>&5
17509   ac_status=$?
17510   echo "$as_me:17510: \$? = $ac_status" >&5
17511   (exit "$ac_status"); }; then
17512                         test -n "$verbose" && echo "$as_me:17512: result: ... -$cf_opt" >&5
17513 echo "${ECHO_T}... -$cf_opt" >&6
17514                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17515                 fi
17516         done
17517         CFLAGS="$cf_save_CFLAGS"
17518 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17519 then
17520         { echo "$as_me:17520: checking for $CC warning options..." >&5
17521 echo "$as_me: checking for $CC warning options..." >&6;}
17522         cf_save_CFLAGS="$CFLAGS"
17523         cf_warn_CONST=""
17524         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17525         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17526         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17527         for cf_opt in W Wall \
17528                 Wbad-function-cast \
17529                 Wcast-align \
17530                 Wcast-qual \
17531                 Wdeclaration-after-statement \
17532                 Wextra \
17533                 Winline \
17534                 Wmissing-declarations \
17535                 Wmissing-prototypes \
17536                 Wnested-externs \
17537                 Wpointer-arith \
17538                 Wshadow \
17539                 Wstrict-prototypes \
17540                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17541         do
17542                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17543                 if { (eval echo "$as_me:17543: \"$ac_compile\"") >&5
17544   (eval $ac_compile) 2>&5
17545   ac_status=$?
17546   echo "$as_me:17546: \$? = $ac_status" >&5
17547   (exit "$ac_status"); }; then
17548                         test -n "$verbose" && echo "$as_me:17548: result: ... -$cf_opt" >&5
17549 echo "${ECHO_T}... -$cf_opt" >&6
17550                         case "$cf_opt" in
17551                         (Winline)
17552                                 case "$GCC_VERSION" in
17553                                 ([34].*)
17554                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17555
17556 echo "${as_me:-configure}:17556: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17557
17558                                         continue;;
17559                                 esac
17560                                 ;;
17561                         (Wpointer-arith)
17562                                 case "$GCC_VERSION" in
17563                                 ([12].*)
17564                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17565
17566 echo "${as_me:-configure}:17566: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17567
17568                                         continue;;
17569                                 esac
17570                                 ;;
17571                         esac
17572                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17573                 fi
17574         done
17575         CFLAGS="$cf_save_CFLAGS"
17576 fi
17577 rm -rf ./conftest*
17578
17579 fi
17580
17581 if test "$GCC" = yes || test "$GXX" = yes
17582 then
17583 cat > conftest.i <<EOF
17584 #ifndef GCC_PRINTF
17585 #define GCC_PRINTF 0
17586 #endif
17587 #ifndef GCC_SCANF
17588 #define GCC_SCANF 0
17589 #endif
17590 #ifndef GCC_NORETURN
17591 #define GCC_NORETURN /* nothing */
17592 #endif
17593 #ifndef GCC_UNUSED
17594 #define GCC_UNUSED /* nothing */
17595 #endif
17596 EOF
17597 if test "$GCC" = yes
17598 then
17599         { echo "$as_me:17599: checking for $CC __attribute__ directives..." >&5
17600 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17601 cat > "conftest.$ac_ext" <<EOF
17602 #line 17602 "${as_me:-configure}"
17603 #include <stdio.h>
17604 #include "confdefs.h"
17605 #include "conftest.h"
17606 #include "conftest.i"
17607 #if     GCC_PRINTF
17608 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17609 #else
17610 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17611 #endif
17612 #if     GCC_SCANF
17613 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17614 #else
17615 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17616 #endif
17617 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17618 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17619 extern GCC_NORETURN void foo(void);
17620 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17621 EOF
17622         cf_printf_attribute=no
17623         cf_scanf_attribute=no
17624         for cf_attribute in scanf printf unused noreturn
17625         do
17626
17627 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17628
17629                 cf_directive="__attribute__(($cf_attribute))"
17630                 echo "checking for $CC $cf_directive" 1>&5
17631
17632                 case "$cf_attribute" in
17633                 (printf)
17634                         cf_printf_attribute=yes
17635                         cat >conftest.h <<EOF
17636 #define GCC_$cf_ATTRIBUTE 1
17637 EOF
17638                         ;;
17639                 (scanf)
17640                         cf_scanf_attribute=yes
17641                         cat >conftest.h <<EOF
17642 #define GCC_$cf_ATTRIBUTE 1
17643 EOF
17644                         ;;
17645                 (*)
17646                         cat >conftest.h <<EOF
17647 #define GCC_$cf_ATTRIBUTE $cf_directive
17648 EOF
17649                         ;;
17650                 esac
17651
17652                 if { (eval echo "$as_me:17652: \"$ac_compile\"") >&5
17653   (eval $ac_compile) 2>&5
17654   ac_status=$?
17655   echo "$as_me:17655: \$? = $ac_status" >&5
17656   (exit "$ac_status"); }; then
17657                         test -n "$verbose" && echo "$as_me:17657: result: ... $cf_attribute" >&5
17658 echo "${ECHO_T}... $cf_attribute" >&6
17659                         cat conftest.h >>confdefs.h
17660                         case "$cf_attribute" in
17661                         (noreturn)
17662
17663 cat >>confdefs.h <<EOF
17664 #define GCC_NORETURN $cf_directive
17665 EOF
17666
17667                                 ;;
17668                         (printf)
17669                                 cf_value='/* nothing */'
17670                                 if test "$cf_printf_attribute" != no ; then
17671                                         cf_value='__attribute__((format(printf,fmt,var)))'
17672
17673 cat >>confdefs.h <<\EOF
17674 #define GCC_PRINTF 1
17675 EOF
17676
17677                                 fi
17678
17679 cat >>confdefs.h <<EOF
17680 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17681 EOF
17682
17683                                 ;;
17684                         (scanf)
17685                                 cf_value='/* nothing */'
17686                                 if test "$cf_scanf_attribute" != no ; then
17687                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17688
17689 cat >>confdefs.h <<\EOF
17690 #define GCC_SCANF 1
17691 EOF
17692
17693                                 fi
17694
17695 cat >>confdefs.h <<EOF
17696 #define GCC_SCANFLIKE(fmt,var) $cf_value
17697 EOF
17698
17699                                 ;;
17700                         (unused)
17701
17702 cat >>confdefs.h <<EOF
17703 #define GCC_UNUSED $cf_directive
17704 EOF
17705
17706                                 ;;
17707                         esac
17708                 fi
17709         done
17710 else
17711         ${FGREP-fgrep} define conftest.i >>confdefs.h
17712 fi
17713 rm -rf ./conftest*
17714 fi
17715
17716 fi
17717
17718 if test "x$enable_warnings" = "xyes"; then
17719
17720         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17721
17722         if test "x$cf_with_cxx" = xyes ; then
17723
17724 INTEL_CPLUSPLUS=no
17725
17726 if test "$GCC" = yes ; then
17727         case "$host_os" in
17728         (linux*|gnu*)
17729                 echo "$as_me:17729: checking if this is really Intel C++ compiler" >&5
17730 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17731                 cf_save_CFLAGS="$CXXFLAGS"
17732                 CXXFLAGS="$CXXFLAGS -no-gcc"
17733                 cat >"conftest.$ac_ext" <<_ACEOF
17734 #line 17734 "configure"
17735 #include "confdefs.h"
17736
17737 int
17738 main (void)
17739 {
17740
17741 #ifdef __INTEL_COMPILER
17742 #else
17743 #error __INTEL_COMPILER is not defined
17744 #endif
17745
17746   ;
17747   return 0;
17748 }
17749 _ACEOF
17750 rm -f "conftest.$ac_objext"
17751 if { (eval echo "$as_me:17751: \"$ac_compile\"") >&5
17752   (eval $ac_compile) 2>&5
17753   ac_status=$?
17754   echo "$as_me:17754: \$? = $ac_status" >&5
17755   (exit "$ac_status"); } &&
17756          { ac_try='test -s "conftest.$ac_objext"'
17757   { (eval echo "$as_me:17757: \"$ac_try\"") >&5
17758   (eval $ac_try) 2>&5
17759   ac_status=$?
17760   echo "$as_me:17760: \$? = $ac_status" >&5
17761   (exit "$ac_status"); }; }; then
17762   INTEL_CPLUSPLUS=yes
17763 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17764
17765 else
17766   echo "$as_me: failed program was:" >&5
17767 cat "conftest.$ac_ext" >&5
17768 fi
17769 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17770                 CXXFLAGS="$cf_save_CFLAGS"
17771                 echo "$as_me:17771: result: $INTEL_CPLUSPLUS" >&5
17772 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17773                 ;;
17774         esac
17775 fi
17776
17777 CLANG_CPLUSPLUS=no
17778
17779 if test "$GCC" = yes ; then
17780         echo "$as_me:17780: checking if this is really Clang C++ compiler" >&5
17781 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17782         cf_save_CFLAGS="$CXXFLAGS"
17783         cat >"conftest.$ac_ext" <<_ACEOF
17784 #line 17784 "configure"
17785 #include "confdefs.h"
17786
17787 int
17788 main (void)
17789 {
17790
17791 #ifdef __clang__
17792 #else
17793 #error __clang__ is not defined
17794 #endif
17795
17796   ;
17797   return 0;
17798 }
17799 _ACEOF
17800 rm -f "conftest.$ac_objext"
17801 if { (eval echo "$as_me:17801: \"$ac_compile\"") >&5
17802   (eval $ac_compile) 2>&5
17803   ac_status=$?
17804   echo "$as_me:17804: \$? = $ac_status" >&5
17805   (exit "$ac_status"); } &&
17806          { ac_try='test -s "conftest.$ac_objext"'
17807   { (eval echo "$as_me:17807: \"$ac_try\"") >&5
17808   (eval $ac_try) 2>&5
17809   ac_status=$?
17810   echo "$as_me:17810: \$? = $ac_status" >&5
17811   (exit "$ac_status"); }; }; then
17812   CLANG_CPLUSPLUS=yes
17813
17814 else
17815   echo "$as_me: failed program was:" >&5
17816 cat "conftest.$ac_ext" >&5
17817 fi
17818 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17819         CXXFLAGS="$cf_save_CFLAGS"
17820         echo "$as_me:17820: result: $CLANG_CPLUSPLUS" >&5
17821 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17822 fi
17823
17824 CLANG_VERSION=none
17825
17826 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17827         case "$CC" in
17828         (c[1-9][0-9]|*/c[1-9][0-9])
17829                 { echo "$as_me:17829: WARNING: replacing broken compiler alias $CC" >&5
17830 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17831                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17832                 CC=clang
17833                 ;;
17834         esac
17835
17836         echo "$as_me:17836: checking version of $CC" >&5
17837 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17838         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.].*//'`"
17839         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17840         echo "$as_me:17840: result: $CLANG_VERSION" >&5
17841 echo "${ECHO_T}$CLANG_VERSION" >&6
17842
17843         for cf_clang_opt in \
17844                 -Qunused-arguments \
17845                 -Wno-error=implicit-function-declaration
17846         do
17847                 echo "$as_me:17847: checking if option $cf_clang_opt works" >&5
17848 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17849                 cf_save_CFLAGS="$CFLAGS"
17850                 CFLAGS="$CFLAGS $cf_clang_opt"
17851                 cat >"conftest.$ac_ext" <<_ACEOF
17852 #line 17852 "configure"
17853 #include "confdefs.h"
17854
17855                         #include <stdio.h>
17856 int
17857 main (void)
17858 {
17859
17860                         printf("hello!\\n");
17861   ;
17862   return 0;
17863 }
17864 _ACEOF
17865 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17866 if { (eval echo "$as_me:17866: \"$ac_link\"") >&5
17867   (eval $ac_link) 2>&5
17868   ac_status=$?
17869   echo "$as_me:17869: \$? = $ac_status" >&5
17870   (exit "$ac_status"); } &&
17871          { ac_try='test -s "conftest$ac_exeext"'
17872   { (eval echo "$as_me:17872: \"$ac_try\"") >&5
17873   (eval $ac_try) 2>&5
17874   ac_status=$?
17875   echo "$as_me:17875: \$? = $ac_status" >&5
17876   (exit "$ac_status"); }; }; then
17877
17878                         cf_clang_optok=yes
17879 else
17880   echo "$as_me: failed program was:" >&5
17881 cat "conftest.$ac_ext" >&5
17882
17883                         cf_clang_optok=no
17884 fi
17885 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17886                 echo "$as_me:17886: result: $cf_clang_optok" >&5
17887 echo "${ECHO_T}$cf_clang_optok" >&6
17888                 CFLAGS="$cf_save_CFLAGS"
17889                 if test "$cf_clang_optok" = yes; then
17890                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17891
17892 echo "${as_me:-configure}:17892: testing adding option $cf_clang_opt ..." 1>&5
17893
17894         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17895         CFLAGS="${CFLAGS}$cf_clang_opt"
17896
17897                 fi
17898         done
17899 fi
17900
17901 ac_ext=cc
17902 ac_cpp='$CXXCPP $CPPFLAGS'
17903 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17904 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17905 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17906 ac_main_return="return"
17907
17908 cat > conftest.$ac_ext <<EOF
17909 #line 17909 "configure"
17910 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17911 EOF
17912
17913 if test "$INTEL_CPLUSPLUS" = yes
17914 then
17915 # The "-wdXXX" options suppress warnings:
17916 # remark #1419: external declaration in primary source file
17917 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17918 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17919 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17920 # remark #193: zero used for undefined preprocessing identifier
17921 # remark #593: variable "curs_sb_left_arrow" was set but never used
17922 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17923 # remark #869: parameter "tw" was never referenced
17924 # remark #981: operands are evaluated in unspecified order
17925 # warning #269: invalid format string conversion
17926
17927         { echo "$as_me:17927: checking for $CC warning options..." >&5
17928 echo "$as_me: checking for $CC warning options..." >&6;}
17929         cf_save_CXXFLAGS="$CXXFLAGS"
17930         EXTRA_CXXFLAGS="-Wall"
17931         for cf_opt in \
17932                 wd1419 \
17933                 wd1682 \
17934                 wd1683 \
17935                 wd1684 \
17936                 wd193 \
17937                 wd279 \
17938                 wd593 \
17939                 wd810 \
17940                 wd869 \
17941                 wd981
17942         do
17943                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17944                 if { (eval echo "$as_me:17944: \"$ac_compile\"") >&5
17945   (eval $ac_compile) 2>&5
17946   ac_status=$?
17947   echo "$as_me:17947: \$? = $ac_status" >&5
17948   (exit "$ac_status"); }; then
17949                         test -n "$verbose" && echo "$as_me:17949: result: ... -$cf_opt" >&5
17950 echo "${ECHO_T}... -$cf_opt" >&6
17951                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17952                 fi
17953         done
17954         CXXFLAGS="$cf_save_CXXFLAGS"
17955
17956 elif test "$GXX" = yes
17957 then
17958         { echo "$as_me:17958: checking for $CXX warning options..." >&5
17959 echo "$as_me: checking for $CXX warning options..." >&6;}
17960         cf_save_CXXFLAGS="$CXXFLAGS"
17961         EXTRA_CXXFLAGS="-W -Wall"
17962         cf_gxx_extra_warnings=""
17963         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17964         case "$GXX_VERSION" in
17965         ([1-2].*)
17966                 ;;
17967         (*)
17968                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17969                 ;;
17970         esac
17971         for cf_opt in \
17972                 Wabi \
17973                 fabi-version=0 \
17974                 Wextra \
17975                 Wignored-qualifiers \
17976                 Wlogical-op \
17977                 Woverloaded-virtual \
17978                 Wsign-promo \
17979                 Wsynth \
17980                 Wold-style-cast \
17981                 Wcast-align \
17982                 Wcast-qual \
17983                 Wpointer-arith \
17984                 Wshadow \
17985                 Wundef $cf_gxx_extra_warnings Wno-unused
17986         do
17987                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17988                 if { (eval echo "$as_me:17988: \"$ac_compile\"") >&5
17989   (eval $ac_compile) 2>&5
17990   ac_status=$?
17991   echo "$as_me:17991: \$? = $ac_status" >&5
17992   (exit "$ac_status"); }; then
17993                         test -n "$verbose" && echo "$as_me:17993: result: ... -$cf_opt" >&5
17994 echo "${ECHO_T}... -$cf_opt" >&6
17995                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17996                 else
17997                         test -n "$verbose" && echo "$as_me:17997: result: ... no -$cf_opt" >&5
17998 echo "${ECHO_T}... no -$cf_opt" >&6
17999                 fi
18000         done
18001         CXXFLAGS="$cf_save_CXXFLAGS"
18002 fi
18003
18004 rm -rf ./conftest*
18005 ac_ext=c
18006 ac_cpp='$CPP $CPPFLAGS'
18007 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18008 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18009 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18010 ac_main_return="return"
18011
18012         fi
18013 fi
18014
18015 echo "$as_me:18015: checking if you want to work around bogus compiler/loader warnings" >&5
18016 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18017
18018 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18019 if test "${enable_string_hacks+set}" = set; then
18020   enableval="$enable_string_hacks"
18021   enable_string_hacks=$enableval
18022 else
18023   enable_string_hacks=no
18024 fi;
18025 echo "$as_me:18025: result: $enable_string_hacks" >&5
18026 echo "${ECHO_T}$enable_string_hacks" >&6
18027
18028 if test "x$enable_string_hacks" = "xyes"; then
18029
18030 cat >>confdefs.h <<\EOF
18031 #define USE_STRING_HACKS 1
18032 EOF
18033
18034         { echo "$as_me:18034: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18035 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18036         echo "$as_me:18036: checking for strlcat" >&5
18037 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18038 if test "${ac_cv_func_strlcat+set}" = set; then
18039   echo $ECHO_N "(cached) $ECHO_C" >&6
18040 else
18041   cat >"conftest.$ac_ext" <<_ACEOF
18042 #line 18042 "configure"
18043 #include "confdefs.h"
18044 #define strlcat autoconf_temporary
18045 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18046 #undef strlcat
18047
18048 #ifdef __cplusplus
18049 extern "C"
18050 #endif
18051
18052 /* We use char because int might match the return type of a gcc2
18053    builtin and then its argument prototype would still apply.  */
18054 char strlcat (void);
18055
18056 int
18057 main (void)
18058 {
18059
18060 /* The GNU C library defines stubs for functions which it implements
18061     to always fail with ENOSYS.  Some functions are actually named
18062     something starting with __ and the normal name is an alias.  */
18063 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18064 #error found stub for strlcat
18065 #endif
18066
18067         return strlcat ();
18068   ;
18069   return 0;
18070 }
18071 _ACEOF
18072 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18073 if { (eval echo "$as_me:18073: \"$ac_link\"") >&5
18074   (eval $ac_link) 2>&5
18075   ac_status=$?
18076   echo "$as_me:18076: \$? = $ac_status" >&5
18077   (exit "$ac_status"); } &&
18078          { ac_try='test -s "conftest$ac_exeext"'
18079   { (eval echo "$as_me:18079: \"$ac_try\"") >&5
18080   (eval $ac_try) 2>&5
18081   ac_status=$?
18082   echo "$as_me:18082: \$? = $ac_status" >&5
18083   (exit "$ac_status"); }; }; then
18084   ac_cv_func_strlcat=yes
18085 else
18086   echo "$as_me: failed program was:" >&5
18087 cat "conftest.$ac_ext" >&5
18088 ac_cv_func_strlcat=no
18089 fi
18090 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18091 fi
18092 echo "$as_me:18092: result: $ac_cv_func_strlcat" >&5
18093 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18094 if test "$ac_cv_func_strlcat" = yes; then
18095
18096 cat >>confdefs.h <<\EOF
18097 #define HAVE_STRLCAT 1
18098 EOF
18099
18100 else
18101
18102                 echo "$as_me:18102: checking for strlcat in -lbsd" >&5
18103 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18104 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18105   echo $ECHO_N "(cached) $ECHO_C" >&6
18106 else
18107   ac_check_lib_save_LIBS=$LIBS
18108 LIBS="-lbsd  $LIBS"
18109 cat >"conftest.$ac_ext" <<_ACEOF
18110 #line 18110 "configure"
18111 #include "confdefs.h"
18112
18113 /* Override any gcc2 internal prototype to avoid an error.  */
18114 #ifdef __cplusplus
18115 extern "C"
18116 #endif
18117 /* We use char because int might match the return type of a gcc2
18118    builtin and then its argument prototype would still apply.  */
18119 char strlcat ();
18120 int
18121 main (void)
18122 {
18123 strlcat ();
18124   ;
18125   return 0;
18126 }
18127 _ACEOF
18128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18129 if { (eval echo "$as_me:18129: \"$ac_link\"") >&5
18130   (eval $ac_link) 2>&5
18131   ac_status=$?
18132   echo "$as_me:18132: \$? = $ac_status" >&5
18133   (exit "$ac_status"); } &&
18134          { ac_try='test -s "conftest$ac_exeext"'
18135   { (eval echo "$as_me:18135: \"$ac_try\"") >&5
18136   (eval $ac_try) 2>&5
18137   ac_status=$?
18138   echo "$as_me:18138: \$? = $ac_status" >&5
18139   (exit "$ac_status"); }; }; then
18140   ac_cv_lib_bsd_strlcat=yes
18141 else
18142   echo "$as_me: failed program was:" >&5
18143 cat "conftest.$ac_ext" >&5
18144 ac_cv_lib_bsd_strlcat=no
18145 fi
18146 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18147 LIBS=$ac_check_lib_save_LIBS
18148 fi
18149 echo "$as_me:18149: result: $ac_cv_lib_bsd_strlcat" >&5
18150 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18151 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18152
18153 cf_add_libs="$LIBS"
18154 # reverse order
18155 cf_add_0lib=
18156 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18157 # filter duplicates
18158 for cf_add_1lib in $cf_add_0lib; do
18159         for cf_add_2lib in $cf_add_libs; do
18160                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18161                         cf_add_1lib=
18162                         break
18163                 fi
18164         done
18165         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18166 done
18167 LIBS="$cf_add_libs"
18168
18169 for ac_header in bsd/string.h
18170 do
18171 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18172 echo "$as_me:18172: checking for $ac_header" >&5
18173 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18174 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18175   echo $ECHO_N "(cached) $ECHO_C" >&6
18176 else
18177   cat >"conftest.$ac_ext" <<_ACEOF
18178 #line 18178 "configure"
18179 #include "confdefs.h"
18180 #include <$ac_header>
18181 _ACEOF
18182 if { (eval echo "$as_me:18182: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18183   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18184   ac_status=$?
18185   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18186   rm -f conftest.er1
18187   cat conftest.err >&5
18188   echo "$as_me:18188: \$? = $ac_status" >&5
18189   (exit "$ac_status"); } >/dev/null; then
18190   if test -s conftest.err; then
18191     ac_cpp_err=$ac_c_preproc_warn_flag
18192   else
18193     ac_cpp_err=
18194   fi
18195 else
18196   ac_cpp_err=yes
18197 fi
18198 if test -z "$ac_cpp_err"; then
18199   eval "$as_ac_Header=yes"
18200 else
18201   echo "$as_me: failed program was:" >&5
18202   cat "conftest.$ac_ext" >&5
18203   eval "$as_ac_Header=no"
18204 fi
18205 rm -f conftest.err "conftest.$ac_ext"
18206 fi
18207 echo "$as_me:18207: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18208 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18209 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18210   cat >>confdefs.h <<EOF
18211 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18212 EOF
18213
18214 fi
18215 done
18216
18217 cat >>confdefs.h <<\EOF
18218 #define HAVE_STRLCAT 1
18219 EOF
18220
18221 fi
18222
18223 fi
18224
18225 for ac_func in strlcpy snprintf
18226 do
18227 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18228 echo "$as_me:18228: checking for $ac_func" >&5
18229 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18230 if eval "test \"\${$as_ac_var+set}\" = set"; then
18231   echo $ECHO_N "(cached) $ECHO_C" >&6
18232 else
18233   cat >"conftest.$ac_ext" <<_ACEOF
18234 #line 18234 "configure"
18235 #include "confdefs.h"
18236 #define $ac_func autoconf_temporary
18237 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18238 #undef $ac_func
18239
18240 #ifdef __cplusplus
18241 extern "C"
18242 #endif
18243
18244 /* We use char because int might match the return type of a gcc2
18245    builtin and then its argument prototype would still apply.  */
18246 char $ac_func (void);
18247
18248 int
18249 main (void)
18250 {
18251
18252 /* The GNU C library defines stubs for functions which it implements
18253     to always fail with ENOSYS.  Some functions are actually named
18254     something starting with __ and the normal name is an alias.  */
18255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18256 #error found stub for $ac_func
18257 #endif
18258
18259         return $ac_func ();
18260   ;
18261   return 0;
18262 }
18263 _ACEOF
18264 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18265 if { (eval echo "$as_me:18265: \"$ac_link\"") >&5
18266   (eval $ac_link) 2>&5
18267   ac_status=$?
18268   echo "$as_me:18268: \$? = $ac_status" >&5
18269   (exit "$ac_status"); } &&
18270          { ac_try='test -s "conftest$ac_exeext"'
18271   { (eval echo "$as_me:18271: \"$ac_try\"") >&5
18272   (eval $ac_try) 2>&5
18273   ac_status=$?
18274   echo "$as_me:18274: \$? = $ac_status" >&5
18275   (exit "$ac_status"); }; }; then
18276   eval "$as_ac_var=yes"
18277 else
18278   echo "$as_me: failed program was:" >&5
18279 cat "conftest.$ac_ext" >&5
18280 eval "$as_ac_var=no"
18281 fi
18282 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18283 fi
18284 echo "$as_me:18284: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18285 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18286 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18287   cat >>confdefs.h <<EOF
18288 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18289 EOF
18290
18291 fi
18292 done
18293
18294 fi
18295
18296 ###     use option --enable-assertions to turn on generation of assertion code
18297 echo "$as_me:18297: checking if you want to enable runtime assertions" >&5
18298 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18299
18300 # Check whether --enable-assertions or --disable-assertions was given.
18301 if test "${enable_assertions+set}" = set; then
18302   enableval="$enable_assertions"
18303   with_assertions=$enableval
18304 else
18305   with_assertions=no
18306 fi;
18307 echo "$as_me:18307: result: $with_assertions" >&5
18308 echo "${ECHO_T}$with_assertions" >&6
18309 if test -n "$GCC"
18310 then
18311         if test "$with_assertions" = no
18312         then
18313                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18314         else
18315
18316         ADAFLAGS="$ADAFLAGS -gnata"
18317
18318         fi
18319 fi
18320
18321 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18322
18323 echo "$as_me:18323: checking if you want to use dmalloc for testing" >&5
18324 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18325
18326 # Check whether --with-dmalloc or --without-dmalloc was given.
18327 if test "${with_dmalloc+set}" = set; then
18328   withval="$with_dmalloc"
18329   case "x$withval" in
18330         (x|xno) ;;
18331         (*)
18332                 : "${with_cflags:=-g}"
18333                 : "${enable_leaks:=no}"
18334                 with_dmalloc=yes
18335
18336 cat >>confdefs.h <<EOF
18337 #define USE_DMALLOC 1
18338 EOF
18339
18340                 ;;
18341         esac
18342 else
18343   with_dmalloc=
18344 fi;
18345 echo "$as_me:18345: result: ${with_dmalloc:-no}" >&5
18346 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18347
18348 case ".$with_cflags" in
18349 (.*-g*)
18350         case .$CFLAGS in
18351         (.*-g*)
18352                 ;;
18353         (*)
18354
18355 cf_fix_cppflags=no
18356 cf_new_cflags=
18357 cf_new_cppflags=
18358 cf_new_extra_cppflags=
18359
18360 for cf_add_cflags in -g
18361 do
18362 case "$cf_fix_cppflags" in
18363 (no)
18364         case "$cf_add_cflags" in
18365         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18366                 case "$cf_add_cflags" in
18367                 (-D*)
18368                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18369
18370                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18371                                 && test -z "${cf_tst_cflags}" \
18372                                 && cf_fix_cppflags=yes
18373
18374                         if test "$cf_fix_cppflags" = yes ; then
18375
18376         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18377         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18378
18379                                 continue
18380                         elif test "${cf_tst_cflags}" = "\"'" ; then
18381
18382         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18383         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18384
18385                                 continue
18386                         fi
18387                         ;;
18388                 esac
18389                 case "$CPPFLAGS" in
18390                 (*$cf_add_cflags)
18391                         ;;
18392                 (*)
18393                         case "$cf_add_cflags" in
18394                         (-D*)
18395                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18396
18397 CPPFLAGS=`echo "$CPPFLAGS" | \
18398         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18399                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18400
18401                                 ;;
18402                         esac
18403
18404         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18405         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18406
18407                         ;;
18408                 esac
18409                 ;;
18410         (*)
18411
18412         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18413         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18414
18415                 ;;
18416         esac
18417         ;;
18418 (yes)
18419
18420         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18421         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18422
18423         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18424
18425         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18426                 && test -z "${cf_tst_cflags}" \
18427                 && cf_fix_cppflags=no
18428         ;;
18429 esac
18430 done
18431
18432 if test -n "$cf_new_cflags" ; then
18433
18434         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18435         CFLAGS="${CFLAGS}$cf_new_cflags"
18436
18437 fi
18438
18439 if test -n "$cf_new_cppflags" ; then
18440
18441         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18442         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18443
18444 fi
18445
18446 if test -n "$cf_new_extra_cppflags" ; then
18447
18448         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18449         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18450
18451 fi
18452
18453                 ;;
18454         esac
18455         ;;
18456 esac
18457
18458 if test "$with_dmalloc" = yes ; then
18459         echo "$as_me:18459: checking for dmalloc.h" >&5
18460 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18461 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18462   echo $ECHO_N "(cached) $ECHO_C" >&6
18463 else
18464   cat >"conftest.$ac_ext" <<_ACEOF
18465 #line 18465 "configure"
18466 #include "confdefs.h"
18467 #include <dmalloc.h>
18468 _ACEOF
18469 if { (eval echo "$as_me:18469: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18470   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18471   ac_status=$?
18472   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18473   rm -f conftest.er1
18474   cat conftest.err >&5
18475   echo "$as_me:18475: \$? = $ac_status" >&5
18476   (exit "$ac_status"); } >/dev/null; then
18477   if test -s conftest.err; then
18478     ac_cpp_err=$ac_c_preproc_warn_flag
18479   else
18480     ac_cpp_err=
18481   fi
18482 else
18483   ac_cpp_err=yes
18484 fi
18485 if test -z "$ac_cpp_err"; then
18486   ac_cv_header_dmalloc_h=yes
18487 else
18488   echo "$as_me: failed program was:" >&5
18489   cat "conftest.$ac_ext" >&5
18490   ac_cv_header_dmalloc_h=no
18491 fi
18492 rm -f conftest.err "conftest.$ac_ext"
18493 fi
18494 echo "$as_me:18494: result: $ac_cv_header_dmalloc_h" >&5
18495 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18496 if test "$ac_cv_header_dmalloc_h" = yes; then
18497
18498 echo "$as_me:18498: checking for dmalloc_debug in -ldmalloc" >&5
18499 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18500 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18501   echo $ECHO_N "(cached) $ECHO_C" >&6
18502 else
18503   ac_check_lib_save_LIBS=$LIBS
18504 LIBS="-ldmalloc  $LIBS"
18505 cat >"conftest.$ac_ext" <<_ACEOF
18506 #line 18506 "configure"
18507 #include "confdefs.h"
18508
18509 /* Override any gcc2 internal prototype to avoid an error.  */
18510 #ifdef __cplusplus
18511 extern "C"
18512 #endif
18513 /* We use char because int might match the return type of a gcc2
18514    builtin and then its argument prototype would still apply.  */
18515 char dmalloc_debug ();
18516 int
18517 main (void)
18518 {
18519 dmalloc_debug ();
18520   ;
18521   return 0;
18522 }
18523 _ACEOF
18524 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18525 if { (eval echo "$as_me:18525: \"$ac_link\"") >&5
18526   (eval $ac_link) 2>&5
18527   ac_status=$?
18528   echo "$as_me:18528: \$? = $ac_status" >&5
18529   (exit "$ac_status"); } &&
18530          { ac_try='test -s "conftest$ac_exeext"'
18531   { (eval echo "$as_me:18531: \"$ac_try\"") >&5
18532   (eval $ac_try) 2>&5
18533   ac_status=$?
18534   echo "$as_me:18534: \$? = $ac_status" >&5
18535   (exit "$ac_status"); }; }; then
18536   ac_cv_lib_dmalloc_dmalloc_debug=yes
18537 else
18538   echo "$as_me: failed program was:" >&5
18539 cat "conftest.$ac_ext" >&5
18540 ac_cv_lib_dmalloc_dmalloc_debug=no
18541 fi
18542 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18543 LIBS=$ac_check_lib_save_LIBS
18544 fi
18545 echo "$as_me:18545: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18546 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18547 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18548   cat >>confdefs.h <<EOF
18549 #define HAVE_LIBDMALLOC 1
18550 EOF
18551
18552   LIBS="-ldmalloc $LIBS"
18553
18554 fi
18555
18556 fi
18557
18558 fi
18559
18560 echo "$as_me:18560: checking if you want to use dbmalloc for testing" >&5
18561 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18562
18563 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18564 if test "${with_dbmalloc+set}" = set; then
18565   withval="$with_dbmalloc"
18566   case "x$withval" in
18567         (x|xno) ;;
18568         (*)
18569                 : "${with_cflags:=-g}"
18570                 : "${enable_leaks:=no}"
18571                 with_dbmalloc=yes
18572
18573 cat >>confdefs.h <<EOF
18574 #define USE_DBMALLOC 1
18575 EOF
18576
18577                 ;;
18578         esac
18579 else
18580   with_dbmalloc=
18581 fi;
18582 echo "$as_me:18582: result: ${with_dbmalloc:-no}" >&5
18583 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18584
18585 case ".$with_cflags" in
18586 (.*-g*)
18587         case .$CFLAGS in
18588         (.*-g*)
18589                 ;;
18590         (*)
18591
18592 cf_fix_cppflags=no
18593 cf_new_cflags=
18594 cf_new_cppflags=
18595 cf_new_extra_cppflags=
18596
18597 for cf_add_cflags in -g
18598 do
18599 case "$cf_fix_cppflags" in
18600 (no)
18601         case "$cf_add_cflags" in
18602         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18603                 case "$cf_add_cflags" in
18604                 (-D*)
18605                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18606
18607                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18608                                 && test -z "${cf_tst_cflags}" \
18609                                 && cf_fix_cppflags=yes
18610
18611                         if test "$cf_fix_cppflags" = yes ; then
18612
18613         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18614         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18615
18616                                 continue
18617                         elif test "${cf_tst_cflags}" = "\"'" ; then
18618
18619         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18620         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18621
18622                                 continue
18623                         fi
18624                         ;;
18625                 esac
18626                 case "$CPPFLAGS" in
18627                 (*$cf_add_cflags)
18628                         ;;
18629                 (*)
18630                         case "$cf_add_cflags" in
18631                         (-D*)
18632                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18633
18634 CPPFLAGS=`echo "$CPPFLAGS" | \
18635         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18636                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18637
18638                                 ;;
18639                         esac
18640
18641         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18642         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18643
18644                         ;;
18645                 esac
18646                 ;;
18647         (*)
18648
18649         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18650         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18651
18652                 ;;
18653         esac
18654         ;;
18655 (yes)
18656
18657         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18658         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18659
18660         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18661
18662         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18663                 && test -z "${cf_tst_cflags}" \
18664                 && cf_fix_cppflags=no
18665         ;;
18666 esac
18667 done
18668
18669 if test -n "$cf_new_cflags" ; then
18670
18671         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18672         CFLAGS="${CFLAGS}$cf_new_cflags"
18673
18674 fi
18675
18676 if test -n "$cf_new_cppflags" ; then
18677
18678         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18679         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18680
18681 fi
18682
18683 if test -n "$cf_new_extra_cppflags" ; then
18684
18685         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18686         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18687
18688 fi
18689
18690                 ;;
18691         esac
18692         ;;
18693 esac
18694
18695 if test "$with_dbmalloc" = yes ; then
18696         echo "$as_me:18696: checking for dbmalloc.h" >&5
18697 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18698 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18699   echo $ECHO_N "(cached) $ECHO_C" >&6
18700 else
18701   cat >"conftest.$ac_ext" <<_ACEOF
18702 #line 18702 "configure"
18703 #include "confdefs.h"
18704 #include <dbmalloc.h>
18705 _ACEOF
18706 if { (eval echo "$as_me:18706: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18707   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18708   ac_status=$?
18709   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18710   rm -f conftest.er1
18711   cat conftest.err >&5
18712   echo "$as_me:18712: \$? = $ac_status" >&5
18713   (exit "$ac_status"); } >/dev/null; then
18714   if test -s conftest.err; then
18715     ac_cpp_err=$ac_c_preproc_warn_flag
18716   else
18717     ac_cpp_err=
18718   fi
18719 else
18720   ac_cpp_err=yes
18721 fi
18722 if test -z "$ac_cpp_err"; then
18723   ac_cv_header_dbmalloc_h=yes
18724 else
18725   echo "$as_me: failed program was:" >&5
18726   cat "conftest.$ac_ext" >&5
18727   ac_cv_header_dbmalloc_h=no
18728 fi
18729 rm -f conftest.err "conftest.$ac_ext"
18730 fi
18731 echo "$as_me:18731: result: $ac_cv_header_dbmalloc_h" >&5
18732 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18733 if test "$ac_cv_header_dbmalloc_h" = yes; then
18734
18735 echo "$as_me:18735: checking for debug_malloc in -ldbmalloc" >&5
18736 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18737 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18738   echo $ECHO_N "(cached) $ECHO_C" >&6
18739 else
18740   ac_check_lib_save_LIBS=$LIBS
18741 LIBS="-ldbmalloc  $LIBS"
18742 cat >"conftest.$ac_ext" <<_ACEOF
18743 #line 18743 "configure"
18744 #include "confdefs.h"
18745
18746 /* Override any gcc2 internal prototype to avoid an error.  */
18747 #ifdef __cplusplus
18748 extern "C"
18749 #endif
18750 /* We use char because int might match the return type of a gcc2
18751    builtin and then its argument prototype would still apply.  */
18752 char debug_malloc ();
18753 int
18754 main (void)
18755 {
18756 debug_malloc ();
18757   ;
18758   return 0;
18759 }
18760 _ACEOF
18761 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18762 if { (eval echo "$as_me:18762: \"$ac_link\"") >&5
18763   (eval $ac_link) 2>&5
18764   ac_status=$?
18765   echo "$as_me:18765: \$? = $ac_status" >&5
18766   (exit "$ac_status"); } &&
18767          { ac_try='test -s "conftest$ac_exeext"'
18768   { (eval echo "$as_me:18768: \"$ac_try\"") >&5
18769   (eval $ac_try) 2>&5
18770   ac_status=$?
18771   echo "$as_me:18771: \$? = $ac_status" >&5
18772   (exit "$ac_status"); }; }; then
18773   ac_cv_lib_dbmalloc_debug_malloc=yes
18774 else
18775   echo "$as_me: failed program was:" >&5
18776 cat "conftest.$ac_ext" >&5
18777 ac_cv_lib_dbmalloc_debug_malloc=no
18778 fi
18779 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18780 LIBS=$ac_check_lib_save_LIBS
18781 fi
18782 echo "$as_me:18782: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18783 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18784 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18785   cat >>confdefs.h <<EOF
18786 #define HAVE_LIBDBMALLOC 1
18787 EOF
18788
18789   LIBS="-ldbmalloc $LIBS"
18790
18791 fi
18792
18793 fi
18794
18795 fi
18796
18797 echo "$as_me:18797: checking if you want to use valgrind for testing" >&5
18798 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18799
18800 # Check whether --with-valgrind or --without-valgrind was given.
18801 if test "${with_valgrind+set}" = set; then
18802   withval="$with_valgrind"
18803   case "x$withval" in
18804         (x|xno) ;;
18805         (*)
18806                 : "${with_cflags:=-g}"
18807                 : "${enable_leaks:=no}"
18808                 with_valgrind=yes
18809
18810 cat >>confdefs.h <<EOF
18811 #define USE_VALGRIND 1
18812 EOF
18813
18814                 ;;
18815         esac
18816 else
18817   with_valgrind=
18818 fi;
18819 echo "$as_me:18819: result: ${with_valgrind:-no}" >&5
18820 echo "${ECHO_T}${with_valgrind:-no}" >&6
18821
18822 case ".$with_cflags" in
18823 (.*-g*)
18824         case .$CFLAGS in
18825         (.*-g*)
18826                 ;;
18827         (*)
18828
18829 cf_fix_cppflags=no
18830 cf_new_cflags=
18831 cf_new_cppflags=
18832 cf_new_extra_cppflags=
18833
18834 for cf_add_cflags in -g
18835 do
18836 case "$cf_fix_cppflags" in
18837 (no)
18838         case "$cf_add_cflags" in
18839         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18840                 case "$cf_add_cflags" in
18841                 (-D*)
18842                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18843
18844                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18845                                 && test -z "${cf_tst_cflags}" \
18846                                 && cf_fix_cppflags=yes
18847
18848                         if test "$cf_fix_cppflags" = yes ; then
18849
18850         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18851         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18852
18853                                 continue
18854                         elif test "${cf_tst_cflags}" = "\"'" ; then
18855
18856         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18857         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18858
18859                                 continue
18860                         fi
18861                         ;;
18862                 esac
18863                 case "$CPPFLAGS" in
18864                 (*$cf_add_cflags)
18865                         ;;
18866                 (*)
18867                         case "$cf_add_cflags" in
18868                         (-D*)
18869                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18870
18871 CPPFLAGS=`echo "$CPPFLAGS" | \
18872         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18873                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18874
18875                                 ;;
18876                         esac
18877
18878         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18879         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18880
18881                         ;;
18882                 esac
18883                 ;;
18884         (*)
18885
18886         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18887         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18888
18889                 ;;
18890         esac
18891         ;;
18892 (yes)
18893
18894         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18895         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18896
18897         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18898
18899         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18900                 && test -z "${cf_tst_cflags}" \
18901                 && cf_fix_cppflags=no
18902         ;;
18903 esac
18904 done
18905
18906 if test -n "$cf_new_cflags" ; then
18907
18908         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18909         CFLAGS="${CFLAGS}$cf_new_cflags"
18910
18911 fi
18912
18913 if test -n "$cf_new_cppflags" ; then
18914
18915         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18916         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18917
18918 fi
18919
18920 if test -n "$cf_new_extra_cppflags" ; then
18921
18922         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18923         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18924
18925 fi
18926
18927                 ;;
18928         esac
18929         ;;
18930 esac
18931
18932 echo "$as_me:18932: checking if you want to perform memory-leak testing" >&5
18933 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18934
18935 # Check whether --enable-leaks or --disable-leaks was given.
18936 if test "${enable_leaks+set}" = set; then
18937   enableval="$enable_leaks"
18938   enable_leaks=$enableval
18939 else
18940   enable_leaks=yes
18941 fi;
18942 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18943 echo "$as_me:18943: result: $with_no_leaks" >&5
18944 echo "${ECHO_T}$with_no_leaks" >&6
18945
18946 if test "$enable_leaks" = no ; then
18947
18948 cat >>confdefs.h <<\EOF
18949 #define NO_LEAKS 1
18950 EOF
18951
18952 cat >>confdefs.h <<\EOF
18953 #define YY_NO_LEAKS 1
18954 EOF
18955
18956 fi
18957
18958 cat >>confdefs.h <<\EOF
18959 #define HAVE_NC_ALLOC_H 1
18960 EOF
18961
18962 ###     use option --enable-expanded to generate certain macros as functions
18963
18964 # Check whether --enable-expanded or --disable-expanded was given.
18965 if test "${enable_expanded+set}" = set; then
18966   enableval="$enable_expanded"
18967   test "x$enableval" = xyes &&
18968 cat >>confdefs.h <<\EOF
18969 #define NCURSES_EXPANDED 1
18970 EOF
18971
18972 fi;
18973
18974 ###     use option --disable-macros to suppress macros in favor of functions
18975
18976 # Check whether --enable-macros or --disable-macros was given.
18977 if test "${enable_macros+set}" = set; then
18978   enableval="$enable_macros"
18979   test "$enableval" = no &&
18980 cat >>confdefs.h <<\EOF
18981 #define NCURSES_NOMACROS 1
18982 EOF
18983
18984 fi;
18985
18986 # Normally we only add trace() to the debug-library.  Allow this to be
18987 # extended to all models of the ncurses library:
18988 cf_all_traces=no
18989 case "$CFLAGS $CPPFLAGS" in
18990 (*-DTRACE*)
18991         cf_all_traces=yes
18992         ;;
18993 esac
18994
18995 echo "$as_me:18995: checking whether to add trace feature to all models" >&5
18996 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18997
18998 # Check whether --with-trace or --without-trace was given.
18999 if test "${with_trace+set}" = set; then
19000   withval="$with_trace"
19001   cf_with_trace=$withval
19002 else
19003   cf_with_trace=$cf_all_traces
19004 fi;
19005 echo "$as_me:19005: result: $cf_with_trace" >&5
19006 echo "${ECHO_T}$cf_with_trace" >&6
19007
19008 if test "x$cf_with_trace" = xyes ; then
19009         LIB_TRACING=all
19010         ADA_TRACE=TRUE
19011
19012 cf_fix_cppflags=no
19013 cf_new_cflags=
19014 cf_new_cppflags=
19015 cf_new_extra_cppflags=
19016
19017 for cf_add_cflags in -DTRACE
19018 do
19019 case "$cf_fix_cppflags" in
19020 (no)
19021         case "$cf_add_cflags" in
19022         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19023                 case "$cf_add_cflags" in
19024                 (-D*)
19025                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19026
19027                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19028                                 && test -z "${cf_tst_cflags}" \
19029                                 && cf_fix_cppflags=yes
19030
19031                         if test "$cf_fix_cppflags" = yes ; then
19032
19033         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19034         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19035
19036                                 continue
19037                         elif test "${cf_tst_cflags}" = "\"'" ; then
19038
19039         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19040         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19041
19042                                 continue
19043                         fi
19044                         ;;
19045                 esac
19046                 case "$CPPFLAGS" in
19047                 (*$cf_add_cflags)
19048                         ;;
19049                 (*)
19050                         case "$cf_add_cflags" in
19051                         (-D*)
19052                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19053
19054 CPPFLAGS=`echo "$CPPFLAGS" | \
19055         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19056                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19057
19058                                 ;;
19059                         esac
19060
19061         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19062         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19063
19064                         ;;
19065                 esac
19066                 ;;
19067         (*)
19068
19069         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19070         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19071
19072                 ;;
19073         esac
19074         ;;
19075 (yes)
19076
19077         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19078         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19079
19080         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19081
19082         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19083                 && test -z "${cf_tst_cflags}" \
19084                 && cf_fix_cppflags=no
19085         ;;
19086 esac
19087 done
19088
19089 if test -n "$cf_new_cflags" ; then
19090
19091         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19092         CFLAGS="${CFLAGS}$cf_new_cflags"
19093
19094 fi
19095
19096 if test -n "$cf_new_cppflags" ; then
19097
19098         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19099         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19100
19101 fi
19102
19103 if test -n "$cf_new_extra_cppflags" ; then
19104
19105         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19106         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19107
19108 fi
19109
19110 cat >>confdefs.h <<\EOF
19111 #define HAVE__TRACEF 1
19112 EOF
19113
19114 else
19115         LIB_TRACING=DEBUG
19116         ADA_TRACE=FALSE
19117 fi
19118
19119 echo "$as_me:19119: checking if we want to use GNAT projects" >&5
19120 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19121
19122 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19123 if test "${enable_gnat_projects+set}" = set; then
19124   enableval="$enable_gnat_projects"
19125   test "$enableval" != no && enableval=yes
19126         if test "$enableval" != "yes" ; then
19127     enable_gnat_projects=no
19128         else
19129                 enable_gnat_projects=yes
19130         fi
19131 else
19132   enableval=yes
19133         enable_gnat_projects=yes
19134
19135 fi;
19136 echo "$as_me:19136: result: $enable_gnat_projects" >&5
19137 echo "${ECHO_T}$enable_gnat_projects" >&6
19138
19139 ###     Checks for libraries.
19140 case "$cf_cv_system_name" in
19141 (*mingw32*|*mingw64*)
19142         # Note: WINVER may be a problem with Windows 10
19143         if test "x$with_exp_win32" = xyes ; then
19144                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19145         else
19146                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19147         fi
19148
19149 echo "$as_me:19149: checking if ssp library is needed" >&5
19150 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19151 if test "${cf_cv_need_libssp+set}" = set; then
19152   echo $ECHO_N "(cached) $ECHO_C" >&6
19153 else
19154
19155 cat >"conftest.$ac_ext" <<_ACEOF
19156 #line 19156 "configure"
19157 #include "confdefs.h"
19158
19159 #include <sys/types.h>
19160 #include <dirent.h>
19161
19162 int
19163 main (void)
19164 {
19165
19166        DIR *dp = opendir(".");
19167
19168   ;
19169   return 0;
19170 }
19171 _ACEOF
19172 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19173 if { (eval echo "$as_me:19173: \"$ac_link\"") >&5
19174   (eval $ac_link) 2>&5
19175   ac_status=$?
19176   echo "$as_me:19176: \$? = $ac_status" >&5
19177   (exit "$ac_status"); } &&
19178          { ac_try='test -s "conftest$ac_exeext"'
19179   { (eval echo "$as_me:19179: \"$ac_try\"") >&5
19180   (eval $ac_try) 2>&5
19181   ac_status=$?
19182   echo "$as_me:19182: \$? = $ac_status" >&5
19183   (exit "$ac_status"); }; }; then
19184   cf_cv_need_libssp=no
19185 else
19186   echo "$as_me: failed program was:" >&5
19187 cat "conftest.$ac_ext" >&5
19188
19189         cf_save_LIBS="$LIBS"
19190         LIBS="$LIBS -lssp"
19191         cat >"conftest.$ac_ext" <<_ACEOF
19192 #line 19192 "configure"
19193 #include "confdefs.h"
19194
19195 #include <sys/types.h>
19196 #include <dirent.h>
19197
19198 int
19199 main (void)
19200 {
19201
19202                    DIR *dp = opendir(".");
19203
19204   ;
19205   return 0;
19206 }
19207 _ACEOF
19208 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19209 if { (eval echo "$as_me:19209: \"$ac_link\"") >&5
19210   (eval $ac_link) 2>&5
19211   ac_status=$?
19212   echo "$as_me:19212: \$? = $ac_status" >&5
19213   (exit "$ac_status"); } &&
19214          { ac_try='test -s "conftest$ac_exeext"'
19215   { (eval echo "$as_me:19215: \"$ac_try\"") >&5
19216   (eval $ac_try) 2>&5
19217   ac_status=$?
19218   echo "$as_me:19218: \$? = $ac_status" >&5
19219   (exit "$ac_status"); }; }; then
19220   cf_cv_need_libssp=yes
19221 else
19222   echo "$as_me: failed program was:" >&5
19223 cat "conftest.$ac_ext" >&5
19224 cf_cv_need_libssp=maybe
19225 fi
19226 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19227         LIBS="$cf_save_LIBS"
19228
19229 fi
19230 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19231 fi
19232 echo "$as_me:19232: result: $cf_cv_need_libssp" >&5
19233 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19234
19235 if test "x$cf_cv_need_libssp" = xyes
19236 then
19237
19238 cf_add_libs="$LIBS"
19239 # reverse order
19240 cf_add_0lib=
19241 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19242 # filter duplicates
19243 for cf_add_1lib in $cf_add_0lib; do
19244         for cf_add_2lib in $cf_add_libs; do
19245                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19246                         cf_add_1lib=
19247                         break
19248                 fi
19249         done
19250         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19251 done
19252 LIBS="$cf_add_libs"
19253
19254 fi
19255
19256         ;;
19257 (*)
19258         ;;
19259 esac
19260
19261 echo "$as_me:19261: checking if -lm needed for math functions" >&5
19262 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19263 if test "${cf_cv_need_libm+set}" = set; then
19264   echo $ECHO_N "(cached) $ECHO_C" >&6
19265 else
19266
19267         cat >"conftest.$ac_ext" <<_ACEOF
19268 #line 19268 "configure"
19269 #include "confdefs.h"
19270
19271                 #include <stdio.h>
19272                 #include <stdlib.h>
19273                 #include <math.h>
19274
19275 int
19276 main (void)
19277 {
19278 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19279   ;
19280   return 0;
19281 }
19282 _ACEOF
19283 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19284 if { (eval echo "$as_me:19284: \"$ac_link\"") >&5
19285   (eval $ac_link) 2>&5
19286   ac_status=$?
19287   echo "$as_me:19287: \$? = $ac_status" >&5
19288   (exit "$ac_status"); } &&
19289          { ac_try='test -s "conftest$ac_exeext"'
19290   { (eval echo "$as_me:19290: \"$ac_try\"") >&5
19291   (eval $ac_try) 2>&5
19292   ac_status=$?
19293   echo "$as_me:19293: \$? = $ac_status" >&5
19294   (exit "$ac_status"); }; }; then
19295   cf_cv_need_libm=no
19296 else
19297   echo "$as_me: failed program was:" >&5
19298 cat "conftest.$ac_ext" >&5
19299 cf_cv_need_libm=yes
19300 fi
19301 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19302 fi
19303 echo "$as_me:19303: result: $cf_cv_need_libm" >&5
19304 echo "${ECHO_T}$cf_cv_need_libm" >&6
19305
19306 if test "$cf_cv_need_libm" = yes
19307 then
19308
19309         cf_save_LIBS="$LIBS"
19310         LIBS="$LIBS -lm"
19311         echo "$as_me:19311: checking if -lm is available for math functions" >&5
19312 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19313 if test "${cf_cv_have_libm+set}" = set; then
19314   echo $ECHO_N "(cached) $ECHO_C" >&6
19315 else
19316
19317         cat >"conftest.$ac_ext" <<_ACEOF
19318 #line 19318 "configure"
19319 #include "confdefs.h"
19320
19321                 #include <stdio.h>
19322                 #include <stdlib.h>
19323                 #include <math.h>
19324
19325 int
19326 main (void)
19327 {
19328 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19329   ;
19330   return 0;
19331 }
19332 _ACEOF
19333 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19334 if { (eval echo "$as_me:19334: \"$ac_link\"") >&5
19335   (eval $ac_link) 2>&5
19336   ac_status=$?
19337   echo "$as_me:19337: \$? = $ac_status" >&5
19338   (exit "$ac_status"); } &&
19339          { ac_try='test -s "conftest$ac_exeext"'
19340   { (eval echo "$as_me:19340: \"$ac_try\"") >&5
19341   (eval $ac_try) 2>&5
19342   ac_status=$?
19343   echo "$as_me:19343: \$? = $ac_status" >&5
19344   (exit "$ac_status"); }; }; then
19345   cf_cv_have_libm=yes
19346 else
19347   echo "$as_me: failed program was:" >&5
19348 cat "conftest.$ac_ext" >&5
19349 cf_cv_have_libm=no
19350 fi
19351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19352 fi
19353 echo "$as_me:19353: result: $cf_cv_have_libm" >&5
19354 echo "${ECHO_T}$cf_cv_have_libm" >&6
19355         LIBS="$cf_save_LIBS"
19356
19357         if test "$cf_cv_have_libm" = yes
19358         then
19359                 MATH_LIB=-lm
19360         fi
19361 else
19362         cf_cv_have_libm=yes
19363 fi
19364
19365 if test "$cf_cv_have_libm" = yes
19366 then
19367
19368 cat >>confdefs.h <<\EOF
19369 #define HAVE_MATH_FUNCS 1
19370 EOF
19371
19372 fi
19373
19374 ###     Checks for header files.
19375 echo "$as_me:19375: checking whether time.h and sys/time.h may both be included" >&5
19376 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19377 if test "${ac_cv_header_time+set}" = set; then
19378   echo $ECHO_N "(cached) $ECHO_C" >&6
19379 else
19380   cat >"conftest.$ac_ext" <<_ACEOF
19381 #line 19381 "configure"
19382 #include "confdefs.h"
19383 #include <sys/types.h>
19384 #include <sys/time.h>
19385 #include <time.h>
19386
19387 int
19388 main (void)
19389 {
19390 if ((struct tm *) 0)
19391 return 0;
19392   ;
19393   return 0;
19394 }
19395 _ACEOF
19396 rm -f "conftest.$ac_objext"
19397 if { (eval echo "$as_me:19397: \"$ac_compile\"") >&5
19398   (eval $ac_compile) 2>&5
19399   ac_status=$?
19400   echo "$as_me:19400: \$? = $ac_status" >&5
19401   (exit "$ac_status"); } &&
19402          { ac_try='test -s "conftest.$ac_objext"'
19403   { (eval echo "$as_me:19403: \"$ac_try\"") >&5
19404   (eval $ac_try) 2>&5
19405   ac_status=$?
19406   echo "$as_me:19406: \$? = $ac_status" >&5
19407   (exit "$ac_status"); }; }; then
19408   ac_cv_header_time=yes
19409 else
19410   echo "$as_me: failed program was:" >&5
19411 cat "conftest.$ac_ext" >&5
19412 ac_cv_header_time=no
19413 fi
19414 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19415 fi
19416 echo "$as_me:19416: result: $ac_cv_header_time" >&5
19417 echo "${ECHO_T}$ac_cv_header_time" >&6
19418 if test $ac_cv_header_time = yes; then
19419
19420 cat >>confdefs.h <<\EOF
19421 #define TIME_WITH_SYS_TIME 1
19422 EOF
19423
19424 fi
19425
19426 cf_regex_func=no
19427 cf_regex_libs=
19428 case "$host_os" in
19429 (mingw*)
19430         # -lsystre -ltre -lintl -liconv
19431         echo "$as_me:19431: checking for regcomp in -lsystre" >&5
19432 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19433 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19434   echo $ECHO_N "(cached) $ECHO_C" >&6
19435 else
19436   ac_check_lib_save_LIBS=$LIBS
19437 LIBS="-lsystre  $LIBS"
19438 cat >"conftest.$ac_ext" <<_ACEOF
19439 #line 19439 "configure"
19440 #include "confdefs.h"
19441
19442 /* Override any gcc2 internal prototype to avoid an error.  */
19443 #ifdef __cplusplus
19444 extern "C"
19445 #endif
19446 /* We use char because int might match the return type of a gcc2
19447    builtin and then its argument prototype would still apply.  */
19448 char regcomp ();
19449 int
19450 main (void)
19451 {
19452 regcomp ();
19453   ;
19454   return 0;
19455 }
19456 _ACEOF
19457 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19458 if { (eval echo "$as_me:19458: \"$ac_link\"") >&5
19459   (eval $ac_link) 2>&5
19460   ac_status=$?
19461   echo "$as_me:19461: \$? = $ac_status" >&5
19462   (exit "$ac_status"); } &&
19463          { ac_try='test -s "conftest$ac_exeext"'
19464   { (eval echo "$as_me:19464: \"$ac_try\"") >&5
19465   (eval $ac_try) 2>&5
19466   ac_status=$?
19467   echo "$as_me:19467: \$? = $ac_status" >&5
19468   (exit "$ac_status"); }; }; then
19469   ac_cv_lib_systre_regcomp=yes
19470 else
19471   echo "$as_me: failed program was:" >&5
19472 cat "conftest.$ac_ext" >&5
19473 ac_cv_lib_systre_regcomp=no
19474 fi
19475 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19476 LIBS=$ac_check_lib_save_LIBS
19477 fi
19478 echo "$as_me:19478: result: $ac_cv_lib_systre_regcomp" >&5
19479 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19480 if test "$ac_cv_lib_systre_regcomp" = yes; then
19481
19482                 echo "$as_me:19482: checking for libiconv_open in -liconv" >&5
19483 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19484 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19485   echo $ECHO_N "(cached) $ECHO_C" >&6
19486 else
19487   ac_check_lib_save_LIBS=$LIBS
19488 LIBS="-liconv  $LIBS"
19489 cat >"conftest.$ac_ext" <<_ACEOF
19490 #line 19490 "configure"
19491 #include "confdefs.h"
19492
19493 /* Override any gcc2 internal prototype to avoid an error.  */
19494 #ifdef __cplusplus
19495 extern "C"
19496 #endif
19497 /* We use char because int might match the return type of a gcc2
19498    builtin and then its argument prototype would still apply.  */
19499 char libiconv_open ();
19500 int
19501 main (void)
19502 {
19503 libiconv_open ();
19504   ;
19505   return 0;
19506 }
19507 _ACEOF
19508 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19509 if { (eval echo "$as_me:19509: \"$ac_link\"") >&5
19510   (eval $ac_link) 2>&5
19511   ac_status=$?
19512   echo "$as_me:19512: \$? = $ac_status" >&5
19513   (exit "$ac_status"); } &&
19514          { ac_try='test -s "conftest$ac_exeext"'
19515   { (eval echo "$as_me:19515: \"$ac_try\"") >&5
19516   (eval $ac_try) 2>&5
19517   ac_status=$?
19518   echo "$as_me:19518: \$? = $ac_status" >&5
19519   (exit "$ac_status"); }; }; then
19520   ac_cv_lib_iconv_libiconv_open=yes
19521 else
19522   echo "$as_me: failed program was:" >&5
19523 cat "conftest.$ac_ext" >&5
19524 ac_cv_lib_iconv_libiconv_open=no
19525 fi
19526 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19527 LIBS=$ac_check_lib_save_LIBS
19528 fi
19529 echo "$as_me:19529: result: $ac_cv_lib_iconv_libiconv_open" >&5
19530 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19531 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19532
19533 cf_add_libs="$LIBS"
19534 # reverse order
19535 cf_add_0lib=
19536 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19537 # filter duplicates
19538 for cf_add_1lib in $cf_add_0lib; do
19539         for cf_add_2lib in $cf_add_libs; do
19540                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19541                         cf_add_1lib=
19542                         break
19543                 fi
19544         done
19545         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19546 done
19547 LIBS="$cf_add_libs"
19548
19549 fi
19550
19551                 echo "$as_me:19551: checking for libintl_gettext in -lintl" >&5
19552 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19553 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19554   echo $ECHO_N "(cached) $ECHO_C" >&6
19555 else
19556   ac_check_lib_save_LIBS=$LIBS
19557 LIBS="-lintl  $LIBS"
19558 cat >"conftest.$ac_ext" <<_ACEOF
19559 #line 19559 "configure"
19560 #include "confdefs.h"
19561
19562 /* Override any gcc2 internal prototype to avoid an error.  */
19563 #ifdef __cplusplus
19564 extern "C"
19565 #endif
19566 /* We use char because int might match the return type of a gcc2
19567    builtin and then its argument prototype would still apply.  */
19568 char libintl_gettext ();
19569 int
19570 main (void)
19571 {
19572 libintl_gettext ();
19573   ;
19574   return 0;
19575 }
19576 _ACEOF
19577 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19578 if { (eval echo "$as_me:19578: \"$ac_link\"") >&5
19579   (eval $ac_link) 2>&5
19580   ac_status=$?
19581   echo "$as_me:19581: \$? = $ac_status" >&5
19582   (exit "$ac_status"); } &&
19583          { ac_try='test -s "conftest$ac_exeext"'
19584   { (eval echo "$as_me:19584: \"$ac_try\"") >&5
19585   (eval $ac_try) 2>&5
19586   ac_status=$?
19587   echo "$as_me:19587: \$? = $ac_status" >&5
19588   (exit "$ac_status"); }; }; then
19589   ac_cv_lib_intl_libintl_gettext=yes
19590 else
19591   echo "$as_me: failed program was:" >&5
19592 cat "conftest.$ac_ext" >&5
19593 ac_cv_lib_intl_libintl_gettext=no
19594 fi
19595 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19596 LIBS=$ac_check_lib_save_LIBS
19597 fi
19598 echo "$as_me:19598: result: $ac_cv_lib_intl_libintl_gettext" >&5
19599 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19600 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19601
19602 cf_add_libs="$LIBS"
19603 # reverse order
19604 cf_add_0lib=
19605 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19606 # filter duplicates
19607 for cf_add_1lib in $cf_add_0lib; do
19608         for cf_add_2lib in $cf_add_libs; do
19609                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19610                         cf_add_1lib=
19611                         break
19612                 fi
19613         done
19614         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19615 done
19616 LIBS="$cf_add_libs"
19617
19618 fi
19619
19620                 echo "$as_me:19620: checking for tre_regcomp in -ltre" >&5
19621 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19622 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19623   echo $ECHO_N "(cached) $ECHO_C" >&6
19624 else
19625   ac_check_lib_save_LIBS=$LIBS
19626 LIBS="-ltre  $LIBS"
19627 cat >"conftest.$ac_ext" <<_ACEOF
19628 #line 19628 "configure"
19629 #include "confdefs.h"
19630
19631 /* Override any gcc2 internal prototype to avoid an error.  */
19632 #ifdef __cplusplus
19633 extern "C"
19634 #endif
19635 /* We use char because int might match the return type of a gcc2
19636    builtin and then its argument prototype would still apply.  */
19637 char tre_regcomp ();
19638 int
19639 main (void)
19640 {
19641 tre_regcomp ();
19642   ;
19643   return 0;
19644 }
19645 _ACEOF
19646 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19647 if { (eval echo "$as_me:19647: \"$ac_link\"") >&5
19648   (eval $ac_link) 2>&5
19649   ac_status=$?
19650   echo "$as_me:19650: \$? = $ac_status" >&5
19651   (exit "$ac_status"); } &&
19652          { ac_try='test -s "conftest$ac_exeext"'
19653   { (eval echo "$as_me:19653: \"$ac_try\"") >&5
19654   (eval $ac_try) 2>&5
19655   ac_status=$?
19656   echo "$as_me:19656: \$? = $ac_status" >&5
19657   (exit "$ac_status"); }; }; then
19658   ac_cv_lib_tre_tre_regcomp=yes
19659 else
19660   echo "$as_me: failed program was:" >&5
19661 cat "conftest.$ac_ext" >&5
19662 ac_cv_lib_tre_tre_regcomp=no
19663 fi
19664 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19665 LIBS=$ac_check_lib_save_LIBS
19666 fi
19667 echo "$as_me:19667: result: $ac_cv_lib_tre_tre_regcomp" >&5
19668 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19669 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19670
19671 cf_add_libs="$LIBS"
19672 # reverse order
19673 cf_add_0lib=
19674 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19675 # filter duplicates
19676 for cf_add_1lib in $cf_add_0lib; do
19677         for cf_add_2lib in $cf_add_libs; do
19678                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19679                         cf_add_1lib=
19680                         break
19681                 fi
19682         done
19683         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19684 done
19685 LIBS="$cf_add_libs"
19686
19687 fi
19688
19689 cf_add_libs="$LIBS"
19690 # reverse order
19691 cf_add_0lib=
19692 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19693 # filter duplicates
19694 for cf_add_1lib in $cf_add_0lib; do
19695         for cf_add_2lib in $cf_add_libs; do
19696                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19697                         cf_add_1lib=
19698                         break
19699                 fi
19700         done
19701         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19702 done
19703 LIBS="$cf_add_libs"
19704
19705                 cf_regex_func=regcomp
19706
19707 else
19708
19709                 echo "$as_me:19709: checking for regcomp in -lgnurx" >&5
19710 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19711 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19712   echo $ECHO_N "(cached) $ECHO_C" >&6
19713 else
19714   ac_check_lib_save_LIBS=$LIBS
19715 LIBS="-lgnurx  $LIBS"
19716 cat >"conftest.$ac_ext" <<_ACEOF
19717 #line 19717 "configure"
19718 #include "confdefs.h"
19719
19720 /* Override any gcc2 internal prototype to avoid an error.  */
19721 #ifdef __cplusplus
19722 extern "C"
19723 #endif
19724 /* We use char because int might match the return type of a gcc2
19725    builtin and then its argument prototype would still apply.  */
19726 char regcomp ();
19727 int
19728 main (void)
19729 {
19730 regcomp ();
19731   ;
19732   return 0;
19733 }
19734 _ACEOF
19735 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19736 if { (eval echo "$as_me:19736: \"$ac_link\"") >&5
19737   (eval $ac_link) 2>&5
19738   ac_status=$?
19739   echo "$as_me:19739: \$? = $ac_status" >&5
19740   (exit "$ac_status"); } &&
19741          { ac_try='test -s "conftest$ac_exeext"'
19742   { (eval echo "$as_me:19742: \"$ac_try\"") >&5
19743   (eval $ac_try) 2>&5
19744   ac_status=$?
19745   echo "$as_me:19745: \$? = $ac_status" >&5
19746   (exit "$ac_status"); }; }; then
19747   ac_cv_lib_gnurx_regcomp=yes
19748 else
19749   echo "$as_me: failed program was:" >&5
19750 cat "conftest.$ac_ext" >&5
19751 ac_cv_lib_gnurx_regcomp=no
19752 fi
19753 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19754 LIBS=$ac_check_lib_save_LIBS
19755 fi
19756 echo "$as_me:19756: result: $ac_cv_lib_gnurx_regcomp" >&5
19757 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19758 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19759
19760 cf_add_libs="$LIBS"
19761 # reverse order
19762 cf_add_0lib=
19763 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19764 # filter duplicates
19765 for cf_add_1lib in $cf_add_0lib; do
19766         for cf_add_2lib in $cf_add_libs; do
19767                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19768                         cf_add_1lib=
19769                         break
19770                 fi
19771         done
19772         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19773 done
19774 LIBS="$cf_add_libs"
19775
19776                         cf_regex_func=regcomp
19777 fi
19778
19779 fi
19780
19781         ;;
19782 (*)
19783         cf_regex_libs="regex re"
19784         echo "$as_me:19784: checking for regcomp" >&5
19785 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19786 if test "${ac_cv_func_regcomp+set}" = set; then
19787   echo $ECHO_N "(cached) $ECHO_C" >&6
19788 else
19789   cat >"conftest.$ac_ext" <<_ACEOF
19790 #line 19790 "configure"
19791 #include "confdefs.h"
19792 #define regcomp autoconf_temporary
19793 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19794 #undef regcomp
19795
19796 #ifdef __cplusplus
19797 extern "C"
19798 #endif
19799
19800 /* We use char because int might match the return type of a gcc2
19801    builtin and then its argument prototype would still apply.  */
19802 char regcomp (void);
19803
19804 int
19805 main (void)
19806 {
19807
19808 /* The GNU C library defines stubs for functions which it implements
19809     to always fail with ENOSYS.  Some functions are actually named
19810     something starting with __ and the normal name is an alias.  */
19811 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19812 #error found stub for regcomp
19813 #endif
19814
19815         return regcomp ();
19816   ;
19817   return 0;
19818 }
19819 _ACEOF
19820 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19821 if { (eval echo "$as_me:19821: \"$ac_link\"") >&5
19822   (eval $ac_link) 2>&5
19823   ac_status=$?
19824   echo "$as_me:19824: \$? = $ac_status" >&5
19825   (exit "$ac_status"); } &&
19826          { ac_try='test -s "conftest$ac_exeext"'
19827   { (eval echo "$as_me:19827: \"$ac_try\"") >&5
19828   (eval $ac_try) 2>&5
19829   ac_status=$?
19830   echo "$as_me:19830: \$? = $ac_status" >&5
19831   (exit "$ac_status"); }; }; then
19832   ac_cv_func_regcomp=yes
19833 else
19834   echo "$as_me: failed program was:" >&5
19835 cat "conftest.$ac_ext" >&5
19836 ac_cv_func_regcomp=no
19837 fi
19838 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19839 fi
19840 echo "$as_me:19840: result: $ac_cv_func_regcomp" >&5
19841 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19842 if test "$ac_cv_func_regcomp" = yes; then
19843   cf_regex_func=regcomp
19844 else
19845
19846                 for cf_regex_lib in $cf_regex_libs
19847                 do
19848                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19849 echo "$as_me:19849: checking for regcomp in -l$cf_regex_lib" >&5
19850 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19851 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19852   echo $ECHO_N "(cached) $ECHO_C" >&6
19853 else
19854   ac_check_lib_save_LIBS=$LIBS
19855 LIBS="-l$cf_regex_lib  $LIBS"
19856 cat >"conftest.$ac_ext" <<_ACEOF
19857 #line 19857 "configure"
19858 #include "confdefs.h"
19859
19860 /* Override any gcc2 internal prototype to avoid an error.  */
19861 #ifdef __cplusplus
19862 extern "C"
19863 #endif
19864 /* We use char because int might match the return type of a gcc2
19865    builtin and then its argument prototype would still apply.  */
19866 char regcomp ();
19867 int
19868 main (void)
19869 {
19870 regcomp ();
19871   ;
19872   return 0;
19873 }
19874 _ACEOF
19875 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19876 if { (eval echo "$as_me:19876: \"$ac_link\"") >&5
19877   (eval $ac_link) 2>&5
19878   ac_status=$?
19879   echo "$as_me:19879: \$? = $ac_status" >&5
19880   (exit "$ac_status"); } &&
19881          { ac_try='test -s "conftest$ac_exeext"'
19882   { (eval echo "$as_me:19882: \"$ac_try\"") >&5
19883   (eval $ac_try) 2>&5
19884   ac_status=$?
19885   echo "$as_me:19885: \$? = $ac_status" >&5
19886   (exit "$ac_status"); }; }; then
19887   eval "$as_ac_Lib=yes"
19888 else
19889   echo "$as_me: failed program was:" >&5
19890 cat "conftest.$ac_ext" >&5
19891 eval "$as_ac_Lib=no"
19892 fi
19893 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19894 LIBS=$ac_check_lib_save_LIBS
19895 fi
19896 echo "$as_me:19896: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19897 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19898 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19899
19900 cf_add_libs="$LIBS"
19901 # reverse order
19902 cf_add_0lib=
19903 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19904 # filter duplicates
19905 for cf_add_1lib in $cf_add_0lib; do
19906         for cf_add_2lib in $cf_add_libs; do
19907                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19908                         cf_add_1lib=
19909                         break
19910                 fi
19911         done
19912         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19913 done
19914 LIBS="$cf_add_libs"
19915
19916                                         cf_regex_func=regcomp
19917                                         break
19918 fi
19919
19920                 done
19921
19922 fi
19923
19924         ;;
19925 esac
19926
19927 if test "$cf_regex_func" = no ; then
19928         echo "$as_me:19928: checking for compile" >&5
19929 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19930 if test "${ac_cv_func_compile+set}" = set; then
19931   echo $ECHO_N "(cached) $ECHO_C" >&6
19932 else
19933   cat >"conftest.$ac_ext" <<_ACEOF
19934 #line 19934 "configure"
19935 #include "confdefs.h"
19936 #define compile autoconf_temporary
19937 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19938 #undef compile
19939
19940 #ifdef __cplusplus
19941 extern "C"
19942 #endif
19943
19944 /* We use char because int might match the return type of a gcc2
19945    builtin and then its argument prototype would still apply.  */
19946 char compile (void);
19947
19948 int
19949 main (void)
19950 {
19951
19952 /* The GNU C library defines stubs for functions which it implements
19953     to always fail with ENOSYS.  Some functions are actually named
19954     something starting with __ and the normal name is an alias.  */
19955 #if defined (__stub_compile) || defined (__stub___compile)
19956 #error found stub for compile
19957 #endif
19958
19959         return compile ();
19960   ;
19961   return 0;
19962 }
19963 _ACEOF
19964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19965 if { (eval echo "$as_me:19965: \"$ac_link\"") >&5
19966   (eval $ac_link) 2>&5
19967   ac_status=$?
19968   echo "$as_me:19968: \$? = $ac_status" >&5
19969   (exit "$ac_status"); } &&
19970          { ac_try='test -s "conftest$ac_exeext"'
19971   { (eval echo "$as_me:19971: \"$ac_try\"") >&5
19972   (eval $ac_try) 2>&5
19973   ac_status=$?
19974   echo "$as_me:19974: \$? = $ac_status" >&5
19975   (exit "$ac_status"); }; }; then
19976   ac_cv_func_compile=yes
19977 else
19978   echo "$as_me: failed program was:" >&5
19979 cat "conftest.$ac_ext" >&5
19980 ac_cv_func_compile=no
19981 fi
19982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19983 fi
19984 echo "$as_me:19984: result: $ac_cv_func_compile" >&5
19985 echo "${ECHO_T}$ac_cv_func_compile" >&6
19986 if test "$ac_cv_func_compile" = yes; then
19987   cf_regex_func=compile
19988 else
19989
19990                 echo "$as_me:19990: checking for compile in -lgen" >&5
19991 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19992 if test "${ac_cv_lib_gen_compile+set}" = set; then
19993   echo $ECHO_N "(cached) $ECHO_C" >&6
19994 else
19995   ac_check_lib_save_LIBS=$LIBS
19996 LIBS="-lgen  $LIBS"
19997 cat >"conftest.$ac_ext" <<_ACEOF
19998 #line 19998 "configure"
19999 #include "confdefs.h"
20000
20001 /* Override any gcc2 internal prototype to avoid an error.  */
20002 #ifdef __cplusplus
20003 extern "C"
20004 #endif
20005 /* We use char because int might match the return type of a gcc2
20006    builtin and then its argument prototype would still apply.  */
20007 char compile ();
20008 int
20009 main (void)
20010 {
20011 compile ();
20012   ;
20013   return 0;
20014 }
20015 _ACEOF
20016 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20017 if { (eval echo "$as_me:20017: \"$ac_link\"") >&5
20018   (eval $ac_link) 2>&5
20019   ac_status=$?
20020   echo "$as_me:20020: \$? = $ac_status" >&5
20021   (exit "$ac_status"); } &&
20022          { ac_try='test -s "conftest$ac_exeext"'
20023   { (eval echo "$as_me:20023: \"$ac_try\"") >&5
20024   (eval $ac_try) 2>&5
20025   ac_status=$?
20026   echo "$as_me:20026: \$? = $ac_status" >&5
20027   (exit "$ac_status"); }; }; then
20028   ac_cv_lib_gen_compile=yes
20029 else
20030   echo "$as_me: failed program was:" >&5
20031 cat "conftest.$ac_ext" >&5
20032 ac_cv_lib_gen_compile=no
20033 fi
20034 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20035 LIBS=$ac_check_lib_save_LIBS
20036 fi
20037 echo "$as_me:20037: result: $ac_cv_lib_gen_compile" >&5
20038 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20039 if test "$ac_cv_lib_gen_compile" = yes; then
20040
20041 cf_add_libs="$LIBS"
20042 # reverse order
20043 cf_add_0lib=
20044 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20045 # filter duplicates
20046 for cf_add_1lib in $cf_add_0lib; do
20047         for cf_add_2lib in $cf_add_libs; do
20048                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20049                         cf_add_1lib=
20050                         break
20051                 fi
20052         done
20053         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20054 done
20055 LIBS="$cf_add_libs"
20056
20057                                 cf_regex_func=compile
20058 fi
20059
20060 fi
20061
20062 fi
20063
20064 if test "$cf_regex_func" = no ; then
20065         { echo "$as_me:20065: WARNING: cannot find regular expression library" >&5
20066 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20067 fi
20068
20069 echo "$as_me:20069: checking for regular-expression headers" >&5
20070 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20071 if test "${cf_cv_regex_hdrs+set}" = set; then
20072   echo $ECHO_N "(cached) $ECHO_C" >&6
20073 else
20074
20075 cf_cv_regex_hdrs=no
20076 case "$cf_regex_func" in
20077 (compile)
20078         for cf_regex_hdr in regexp.h regexpr.h
20079         do
20080                 cat >"conftest.$ac_ext" <<_ACEOF
20081 #line 20081 "configure"
20082 #include "confdefs.h"
20083 #include <$cf_regex_hdr>
20084 int
20085 main (void)
20086 {
20087
20088                         char *p = compile("", "", "", 0);
20089                         int x = step("", "");
20090                         (void)p;
20091                         (void)x;
20092
20093   ;
20094   return 0;
20095 }
20096 _ACEOF
20097 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20098 if { (eval echo "$as_me:20098: \"$ac_link\"") >&5
20099   (eval $ac_link) 2>&5
20100   ac_status=$?
20101   echo "$as_me:20101: \$? = $ac_status" >&5
20102   (exit "$ac_status"); } &&
20103          { ac_try='test -s "conftest$ac_exeext"'
20104   { (eval echo "$as_me:20104: \"$ac_try\"") >&5
20105   (eval $ac_try) 2>&5
20106   ac_status=$?
20107   echo "$as_me:20107: \$? = $ac_status" >&5
20108   (exit "$ac_status"); }; }; then
20109
20110                         cf_cv_regex_hdrs=$cf_regex_hdr
20111                         break
20112
20113 else
20114   echo "$as_me: failed program was:" >&5
20115 cat "conftest.$ac_ext" >&5
20116 fi
20117 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20118         done
20119         ;;
20120 (*)
20121         for cf_regex_hdr in regex.h
20122         do
20123                 cat >"conftest.$ac_ext" <<_ACEOF
20124 #line 20124 "configure"
20125 #include "confdefs.h"
20126 #include <sys/types.h>
20127 #include <$cf_regex_hdr>
20128 int
20129 main (void)
20130 {
20131
20132                         regex_t *p = 0;
20133                         int x = regcomp(p, "", 0);
20134                         int y = regexec(p, "", 0, 0, 0);
20135                         (void)x;
20136                         (void)y;
20137                         regfree(p);
20138
20139   ;
20140   return 0;
20141 }
20142 _ACEOF
20143 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20144 if { (eval echo "$as_me:20144: \"$ac_link\"") >&5
20145   (eval $ac_link) 2>&5
20146   ac_status=$?
20147   echo "$as_me:20147: \$? = $ac_status" >&5
20148   (exit "$ac_status"); } &&
20149          { ac_try='test -s "conftest$ac_exeext"'
20150   { (eval echo "$as_me:20150: \"$ac_try\"") >&5
20151   (eval $ac_try) 2>&5
20152   ac_status=$?
20153   echo "$as_me:20153: \$? = $ac_status" >&5
20154   (exit "$ac_status"); }; }; then
20155
20156                         cf_cv_regex_hdrs=$cf_regex_hdr
20157                         break
20158
20159 else
20160   echo "$as_me: failed program was:" >&5
20161 cat "conftest.$ac_ext" >&5
20162 fi
20163 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20164         done
20165         ;;
20166 esac
20167
20168 fi
20169 echo "$as_me:20169: result: $cf_cv_regex_hdrs" >&5
20170 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20171
20172 case "$cf_cv_regex_hdrs" in
20173         (no)            { echo "$as_me:20173: WARNING: no regular expression header found" >&5
20174 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20175         (regex.h)
20176 cat >>confdefs.h <<\EOF
20177 #define HAVE_REGEX_H_FUNCS 1
20178 EOF
20179  ;;
20180         (regexp.h)
20181 cat >>confdefs.h <<\EOF
20182 #define HAVE_REGEXP_H_FUNCS 1
20183 EOF
20184  ;;
20185         (regexpr.h)
20186 cat >>confdefs.h <<\EOF
20187 #define HAVE_REGEXPR_H_FUNCS 1
20188 EOF
20189  ;;
20190 esac
20191
20192 for ac_header in \
20193 fcntl.h \
20194 getopt.h \
20195 limits.h \
20196 locale.h \
20197 math.h \
20198 poll.h \
20199 sys/auxv.h \
20200 sys/ioctl.h \
20201 sys/param.h \
20202 sys/poll.h \
20203 sys/select.h \
20204 sys/time.h \
20205 sys/times.h \
20206 unistd.h \
20207 wctype.h \
20208
20209 do
20210 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20211 echo "$as_me:20211: checking for $ac_header" >&5
20212 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20213 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20214   echo $ECHO_N "(cached) $ECHO_C" >&6
20215 else
20216   cat >"conftest.$ac_ext" <<_ACEOF
20217 #line 20217 "configure"
20218 #include "confdefs.h"
20219 #include <$ac_header>
20220 _ACEOF
20221 if { (eval echo "$as_me:20221: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20222   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20223   ac_status=$?
20224   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20225   rm -f conftest.er1
20226   cat conftest.err >&5
20227   echo "$as_me:20227: \$? = $ac_status" >&5
20228   (exit "$ac_status"); } >/dev/null; then
20229   if test -s conftest.err; then
20230     ac_cpp_err=$ac_c_preproc_warn_flag
20231   else
20232     ac_cpp_err=
20233   fi
20234 else
20235   ac_cpp_err=yes
20236 fi
20237 if test -z "$ac_cpp_err"; then
20238   eval "$as_ac_Header=yes"
20239 else
20240   echo "$as_me: failed program was:" >&5
20241   cat "conftest.$ac_ext" >&5
20242   eval "$as_ac_Header=no"
20243 fi
20244 rm -f conftest.err "conftest.$ac_ext"
20245 fi
20246 echo "$as_me:20246: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20247 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20248 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20249   cat >>confdefs.h <<EOF
20250 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20251 EOF
20252
20253 fi
20254 done
20255
20256 for ac_header in unistd.h getopt.h
20257 do
20258 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20259 echo "$as_me:20259: checking for $ac_header" >&5
20260 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20261 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20262   echo $ECHO_N "(cached) $ECHO_C" >&6
20263 else
20264   cat >"conftest.$ac_ext" <<_ACEOF
20265 #line 20265 "configure"
20266 #include "confdefs.h"
20267 #include <$ac_header>
20268 _ACEOF
20269 if { (eval echo "$as_me:20269: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20270   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20271   ac_status=$?
20272   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20273   rm -f conftest.er1
20274   cat conftest.err >&5
20275   echo "$as_me:20275: \$? = $ac_status" >&5
20276   (exit "$ac_status"); } >/dev/null; then
20277   if test -s conftest.err; then
20278     ac_cpp_err=$ac_c_preproc_warn_flag
20279   else
20280     ac_cpp_err=
20281   fi
20282 else
20283   ac_cpp_err=yes
20284 fi
20285 if test -z "$ac_cpp_err"; then
20286   eval "$as_ac_Header=yes"
20287 else
20288   echo "$as_me: failed program was:" >&5
20289   cat "conftest.$ac_ext" >&5
20290   eval "$as_ac_Header=no"
20291 fi
20292 rm -f conftest.err "conftest.$ac_ext"
20293 fi
20294 echo "$as_me:20294: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20295 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20296 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20297   cat >>confdefs.h <<EOF
20298 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20299 EOF
20300
20301 fi
20302 done
20303
20304 echo "$as_me:20304: checking for header declaring getopt variables" >&5
20305 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20306 if test "${cf_cv_getopt_header+set}" = set; then
20307   echo $ECHO_N "(cached) $ECHO_C" >&6
20308 else
20309
20310 cf_cv_getopt_header=none
20311 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20312 do
20313 cat >"conftest.$ac_ext" <<_ACEOF
20314 #line 20314 "configure"
20315 #include "confdefs.h"
20316
20317 #include <$cf_header>
20318 int
20319 main (void)
20320 {
20321 int x = optind; char *y = optarg; (void)x; (void)y
20322   ;
20323   return 0;
20324 }
20325 _ACEOF
20326 rm -f "conftest.$ac_objext"
20327 if { (eval echo "$as_me:20327: \"$ac_compile\"") >&5
20328   (eval $ac_compile) 2>&5
20329   ac_status=$?
20330   echo "$as_me:20330: \$? = $ac_status" >&5
20331   (exit "$ac_status"); } &&
20332          { ac_try='test -s "conftest.$ac_objext"'
20333   { (eval echo "$as_me:20333: \"$ac_try\"") >&5
20334   (eval $ac_try) 2>&5
20335   ac_status=$?
20336   echo "$as_me:20336: \$? = $ac_status" >&5
20337   (exit "$ac_status"); }; }; then
20338   cf_cv_getopt_header=$cf_header
20339  break
20340 else
20341   echo "$as_me: failed program was:" >&5
20342 cat "conftest.$ac_ext" >&5
20343 fi
20344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20345 done
20346
20347 fi
20348 echo "$as_me:20348: result: $cf_cv_getopt_header" >&5
20349 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20350 if test "$cf_cv_getopt_header" != none ; then
20351
20352 cat >>confdefs.h <<\EOF
20353 #define HAVE_GETOPT_HEADER 1
20354 EOF
20355
20356 fi
20357 if test "$cf_cv_getopt_header" = getopt.h ; then
20358
20359 cat >>confdefs.h <<\EOF
20360 #define NEED_GETOPT_H 1
20361 EOF
20362
20363 fi
20364
20365 echo "$as_me:20365: checking if external environ is declared" >&5
20366 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20367 if test "${cf_cv_dcl_environ+set}" = set; then
20368   echo $ECHO_N "(cached) $ECHO_C" >&6
20369 else
20370
20371     cat >"conftest.$ac_ext" <<_ACEOF
20372 #line 20372 "configure"
20373 #include "confdefs.h"
20374
20375 $ac_includes_default
20376 int
20377 main (void)
20378 {
20379 void* x = (void*) environ; (void)x
20380   ;
20381   return 0;
20382 }
20383 _ACEOF
20384 rm -f "conftest.$ac_objext"
20385 if { (eval echo "$as_me:20385: \"$ac_compile\"") >&5
20386   (eval $ac_compile) 2>&5
20387   ac_status=$?
20388   echo "$as_me:20388: \$? = $ac_status" >&5
20389   (exit "$ac_status"); } &&
20390          { ac_try='test -s "conftest.$ac_objext"'
20391   { (eval echo "$as_me:20391: \"$ac_try\"") >&5
20392   (eval $ac_try) 2>&5
20393   ac_status=$?
20394   echo "$as_me:20394: \$? = $ac_status" >&5
20395   (exit "$ac_status"); }; }; then
20396   cf_cv_dcl_environ=yes
20397 else
20398   echo "$as_me: failed program was:" >&5
20399 cat "conftest.$ac_ext" >&5
20400 cf_cv_dcl_environ=no
20401 fi
20402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20403
20404 fi
20405 echo "$as_me:20405: result: $cf_cv_dcl_environ" >&5
20406 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20407
20408 if test "$cf_cv_dcl_environ" = no ; then
20409
20410 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20411
20412     cat >>confdefs.h <<EOF
20413 #define $cf_result 1
20414 EOF
20415
20416 fi
20417
20418 # It's possible (for near-UNIX clones) that the data doesn't exist
20419
20420 echo "$as_me:20420: checking if external environ exists" >&5
20421 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20422 if test "${cf_cv_have_environ+set}" = set; then
20423   echo $ECHO_N "(cached) $ECHO_C" >&6
20424 else
20425
20426         cat >"conftest.$ac_ext" <<_ACEOF
20427 #line 20427 "configure"
20428 #include "confdefs.h"
20429
20430 #undef environ
20431 extern int environ;
20432
20433 int
20434 main (void)
20435 {
20436 environ = 2
20437   ;
20438   return 0;
20439 }
20440 _ACEOF
20441 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20442 if { (eval echo "$as_me:20442: \"$ac_link\"") >&5
20443   (eval $ac_link) 2>&5
20444   ac_status=$?
20445   echo "$as_me:20445: \$? = $ac_status" >&5
20446   (exit "$ac_status"); } &&
20447          { ac_try='test -s "conftest$ac_exeext"'
20448   { (eval echo "$as_me:20448: \"$ac_try\"") >&5
20449   (eval $ac_try) 2>&5
20450   ac_status=$?
20451   echo "$as_me:20451: \$? = $ac_status" >&5
20452   (exit "$ac_status"); }; }; then
20453   cf_cv_have_environ=yes
20454 else
20455   echo "$as_me: failed program was:" >&5
20456 cat "conftest.$ac_ext" >&5
20457 cf_cv_have_environ=no
20458 fi
20459 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20460
20461 fi
20462 echo "$as_me:20462: result: $cf_cv_have_environ" >&5
20463 echo "${ECHO_T}$cf_cv_have_environ" >&6
20464
20465 if test "$cf_cv_have_environ" = yes ; then
20466
20467 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20468
20469         cat >>confdefs.h <<EOF
20470 #define $cf_result 1
20471 EOF
20472
20473 fi
20474
20475 echo "$as_me:20475: checking for getenv" >&5
20476 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20477 if test "${ac_cv_func_getenv+set}" = set; then
20478   echo $ECHO_N "(cached) $ECHO_C" >&6
20479 else
20480   cat >"conftest.$ac_ext" <<_ACEOF
20481 #line 20481 "configure"
20482 #include "confdefs.h"
20483 #define getenv autoconf_temporary
20484 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20485 #undef getenv
20486
20487 #ifdef __cplusplus
20488 extern "C"
20489 #endif
20490
20491 /* We use char because int might match the return type of a gcc2
20492    builtin and then its argument prototype would still apply.  */
20493 char getenv (void);
20494
20495 int
20496 main (void)
20497 {
20498
20499 /* The GNU C library defines stubs for functions which it implements
20500     to always fail with ENOSYS.  Some functions are actually named
20501     something starting with __ and the normal name is an alias.  */
20502 #if defined (__stub_getenv) || defined (__stub___getenv)
20503 #error found stub for getenv
20504 #endif
20505
20506         return getenv ();
20507   ;
20508   return 0;
20509 }
20510 _ACEOF
20511 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20512 if { (eval echo "$as_me:20512: \"$ac_link\"") >&5
20513   (eval $ac_link) 2>&5
20514   ac_status=$?
20515   echo "$as_me:20515: \$? = $ac_status" >&5
20516   (exit "$ac_status"); } &&
20517          { ac_try='test -s "conftest$ac_exeext"'
20518   { (eval echo "$as_me:20518: \"$ac_try\"") >&5
20519   (eval $ac_try) 2>&5
20520   ac_status=$?
20521   echo "$as_me:20521: \$? = $ac_status" >&5
20522   (exit "$ac_status"); }; }; then
20523   ac_cv_func_getenv=yes
20524 else
20525   echo "$as_me: failed program was:" >&5
20526 cat "conftest.$ac_ext" >&5
20527 ac_cv_func_getenv=no
20528 fi
20529 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20530 fi
20531 echo "$as_me:20531: result: $ac_cv_func_getenv" >&5
20532 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20533
20534 for ac_func in putenv setenv strdup
20535 do
20536 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20537 echo "$as_me:20537: checking for $ac_func" >&5
20538 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20539 if eval "test \"\${$as_ac_var+set}\" = set"; then
20540   echo $ECHO_N "(cached) $ECHO_C" >&6
20541 else
20542   cat >"conftest.$ac_ext" <<_ACEOF
20543 #line 20543 "configure"
20544 #include "confdefs.h"
20545 #define $ac_func autoconf_temporary
20546 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20547 #undef $ac_func
20548
20549 #ifdef __cplusplus
20550 extern "C"
20551 #endif
20552
20553 /* We use char because int might match the return type of a gcc2
20554    builtin and then its argument prototype would still apply.  */
20555 char $ac_func (void);
20556
20557 int
20558 main (void)
20559 {
20560
20561 /* The GNU C library defines stubs for functions which it implements
20562     to always fail with ENOSYS.  Some functions are actually named
20563     something starting with __ and the normal name is an alias.  */
20564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20565 #error found stub for $ac_func
20566 #endif
20567
20568         return $ac_func ();
20569   ;
20570   return 0;
20571 }
20572 _ACEOF
20573 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20574 if { (eval echo "$as_me:20574: \"$ac_link\"") >&5
20575   (eval $ac_link) 2>&5
20576   ac_status=$?
20577   echo "$as_me:20577: \$? = $ac_status" >&5
20578   (exit "$ac_status"); } &&
20579          { ac_try='test -s "conftest$ac_exeext"'
20580   { (eval echo "$as_me:20580: \"$ac_try\"") >&5
20581   (eval $ac_try) 2>&5
20582   ac_status=$?
20583   echo "$as_me:20583: \$? = $ac_status" >&5
20584   (exit "$ac_status"); }; }; then
20585   eval "$as_ac_var=yes"
20586 else
20587   echo "$as_me: failed program was:" >&5
20588 cat "conftest.$ac_ext" >&5
20589 eval "$as_ac_var=no"
20590 fi
20591 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20592 fi
20593 echo "$as_me:20593: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20594 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20595 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20596   cat >>confdefs.h <<EOF
20597 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20598 EOF
20599
20600 fi
20601 done
20602
20603 echo "$as_me:20603: checking if getenv returns consistent values" >&5
20604 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20605 if test "${cf_cv_consistent_getenv+set}" = set; then
20606   echo $ECHO_N "(cached) $ECHO_C" >&6
20607 else
20608
20609 if test "$cross_compiling" = yes; then
20610   cf_cv_consistent_getenv=unknown
20611 else
20612   cat >"conftest.$ac_ext" <<_ACEOF
20613 #line 20613 "configure"
20614 #include "confdefs.h"
20615
20616 $ac_includes_default
20617
20618 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20619 extern char **environ;  /* POSIX, but some systems are not... */
20620 #endif
20621
20622 #if defined(HAVE_STRDUP)
20623 #define str_alloc(s) strdup(s)
20624 #else
20625 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20626 #endif
20627
20628 static void set_value(const char *name, const char *value)
20629 {
20630 #if defined(HAVE_SETENV)
20631         setenv(name, value, 1);
20632 #elif defined(HAVE_PUTENV)
20633         char buffer[1024];
20634         sprintf(buffer, "%s=%s", name, value);
20635         putenv(str_alloc(buffer));
20636 #else
20637 #error neither putenv/setenv found
20638 #endif
20639 }
20640 int main(void)
20641 {
20642         int pass;
20643         size_t numenv, limit, j;
20644         char **mynames;
20645         char **myvalues;
20646         char **mypointer;
20647         char *equals;
20648         for (numenv = 0; environ[numenv]; ++numenv) ;
20649         limit = numenv + 10;
20650         mynames = (char **) calloc(limit + 1, sizeof(char *));
20651         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20652         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20653 #if defined(HAVE_ENVIRON)
20654         for (j = 0; environ[j]; ++j) {
20655                 mynames[j] = str_alloc(environ[j]);
20656                 equals = strchr(mynames[j], '=');
20657                 if (equals != 0) {
20658                         *equals++ = '\\0';
20659                         myvalues[j] = str_alloc(equals);
20660                 } else {
20661                         myvalues[j] = str_alloc("");
20662                 }
20663         }
20664 #endif
20665         for (j = numenv; j < limit; ++j) {
20666                 char name[80];
20667                 char value[80];
20668                 size_t found;
20669                 size_t k = 0;
20670                 do {
20671                         size_t jk;
20672                         found = 0;
20673                         sprintf(name, "TERM%lu", (unsigned long) k);
20674                         for (jk = 0; jk < j; ++jk) {
20675                                 if (!strcmp(name, mynames[jk])) {
20676                                         found = 1;
20677                                         ++k;
20678                                         break;
20679                                 }
20680                         }
20681                 } while (found);
20682                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20683                 set_value(name, value);
20684                 mynames[j] = str_alloc(name);
20685                 myvalues[j] = str_alloc(value);
20686         }
20687         for (pass = 0; pass < 3; ++pass) {
20688                 for (j = 0; j < limit; ++j) {
20689                         char *value = getenv(mynames[j]);
20690                         if (pass) {
20691                                 if (value == 0) {
20692                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20693                                         ${cf_cv_main_return:-return}(1);
20694                                 } else if (value != mypointer[j]) {
20695                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20696                                         ${cf_cv_main_return:-return}(1);
20697                                 } else if (strcmp(value, myvalues[j])) {
20698                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20699                                         ${cf_cv_main_return:-return}(1);
20700                                 }
20701                         } else {
20702                                 size_t k;
20703                                 mypointer[j] = value;
20704                                 for (k = 0; k < j; ++k) {
20705                                         if (mypointer[j] == mypointer[k]) {
20706                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20707                                                 ${cf_cv_main_return:-return}(1);
20708                                         }
20709                                 }
20710                         }
20711                 }
20712         }
20713         ${cf_cv_main_return:-return}(0);
20714 }
20715
20716 _ACEOF
20717 rm -f "conftest$ac_exeext"
20718 if { (eval echo "$as_me:20718: \"$ac_link\"") >&5
20719   (eval $ac_link) 2>&5
20720   ac_status=$?
20721   echo "$as_me:20721: \$? = $ac_status" >&5
20722   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20723   { (eval echo "$as_me:20723: \"$ac_try\"") >&5
20724   (eval $ac_try) 2>&5
20725   ac_status=$?
20726   echo "$as_me:20726: \$? = $ac_status" >&5
20727   (exit "$ac_status"); }; }; then
20728   cf_cv_consistent_getenv=yes
20729 else
20730   echo "$as_me: program exited with status $ac_status" >&5
20731 echo "$as_me: failed program was:" >&5
20732 cat "conftest.$ac_ext" >&5
20733 cf_cv_consistent_getenv=no
20734 fi
20735 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20736 fi
20737
20738 fi
20739 echo "$as_me:20739: result: $cf_cv_consistent_getenv" >&5
20740 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20741
20742 if test "x$cf_cv_consistent_getenv" = xno
20743 then
20744
20745 cat >>confdefs.h <<\EOF
20746 #define HAVE_CONSISTENT_GETENV 1
20747 EOF
20748
20749 fi
20750
20751 if test "x$cf_cv_consistent_getenv" = xno && \
20752         test "x$cf_with_trace" = xyes
20753 then
20754         { echo "$as_me:20754: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20755 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20756 fi
20757
20758 echo "$as_me:20758: checking if sys/time.h works with sys/select.h" >&5
20759 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20760 if test "${cf_cv_sys_time_select+set}" = set; then
20761   echo $ECHO_N "(cached) $ECHO_C" >&6
20762 else
20763
20764 cat >"conftest.$ac_ext" <<_ACEOF
20765 #line 20765 "configure"
20766 #include "confdefs.h"
20767
20768 #include <sys/types.h>
20769 #ifdef HAVE_SYS_TIME_H
20770 #include <sys/time.h>
20771 #endif
20772 #ifdef HAVE_SYS_SELECT_H
20773 #include <sys/select.h>
20774 #endif
20775
20776 int
20777 main (void)
20778 {
20779
20780   ;
20781   return 0;
20782 }
20783 _ACEOF
20784 rm -f "conftest.$ac_objext"
20785 if { (eval echo "$as_me:20785: \"$ac_compile\"") >&5
20786   (eval $ac_compile) 2>&5
20787   ac_status=$?
20788   echo "$as_me:20788: \$? = $ac_status" >&5
20789   (exit "$ac_status"); } &&
20790          { ac_try='test -s "conftest.$ac_objext"'
20791   { (eval echo "$as_me:20791: \"$ac_try\"") >&5
20792   (eval $ac_try) 2>&5
20793   ac_status=$?
20794   echo "$as_me:20794: \$? = $ac_status" >&5
20795   (exit "$ac_status"); }; }; then
20796   cf_cv_sys_time_select=yes
20797 else
20798   echo "$as_me: failed program was:" >&5
20799 cat "conftest.$ac_ext" >&5
20800 cf_cv_sys_time_select=no
20801 fi
20802 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20803
20804 fi
20805
20806 echo "$as_me:20806: result: $cf_cv_sys_time_select" >&5
20807 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20808 test "$cf_cv_sys_time_select" = yes &&
20809 cat >>confdefs.h <<\EOF
20810 #define HAVE_SYS_TIME_SELECT 1
20811 EOF
20812
20813 ###     checks for compiler characteristics
20814 ac_ext=c
20815 ac_cpp='$CPP $CPPFLAGS'
20816 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20817 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20818 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20819 ac_main_return="return"
20820
20821 echo "$as_me:20821: checking for an ANSI C-conforming const" >&5
20822 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20823 if test "${ac_cv_c_const+set}" = set; then
20824   echo $ECHO_N "(cached) $ECHO_C" >&6
20825 else
20826   cat >"conftest.$ac_ext" <<_ACEOF
20827 #line 20827 "configure"
20828 #include "confdefs.h"
20829
20830 int
20831 main (void)
20832 {
20833 /* FIXME: Include the comments suggested by Paul. */
20834 #ifndef __cplusplus
20835   /* Ultrix mips cc rejects this.  */
20836   typedef int charset[2];
20837   const charset x;
20838   /* SunOS 4.1.1 cc rejects this.  */
20839   char const *const *ccp;
20840   char **p;
20841   /* NEC SVR4.0.2 mips cc rejects this.  */
20842   struct point {int x, y;};
20843   static struct point const zero = {0,0};
20844   /* AIX XL C 1.02.0.0 rejects this.
20845      It does not let you subtract one const X* pointer from another in
20846      an arm of an if-expression whose if-part is not a constant
20847      expression */
20848   const char *g = "string";
20849   ccp = &g + (g ? g-g : 0);
20850   /* HPUX 7.0 cc rejects these. */
20851   ++ccp;
20852   p = (char**) ccp;
20853   ccp = (char const *const *) p;
20854   { /* SCO 3.2v4 cc rejects this.  */
20855     char *t;
20856     char const *s = 0 ? (char *) 0 : (char const *) 0;
20857
20858     *t++ = 0;
20859   }
20860   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20861     int x[] = {25, 17};
20862     const int *foo = &x[0];
20863     ++foo;
20864   }
20865   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20866     typedef const int *iptr;
20867     iptr p = 0;
20868     ++p;
20869   }
20870   { /* AIX XL C 1.02.0.0 rejects this saying
20871        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20872     struct s { int j; const int *ap[3]; };
20873     struct s *b; b->j = 5;
20874   }
20875   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20876     const int foo = 10;
20877   }
20878 #endif
20879
20880   ;
20881   return 0;
20882 }
20883 _ACEOF
20884 rm -f "conftest.$ac_objext"
20885 if { (eval echo "$as_me:20885: \"$ac_compile\"") >&5
20886   (eval $ac_compile) 2>&5
20887   ac_status=$?
20888   echo "$as_me:20888: \$? = $ac_status" >&5
20889   (exit "$ac_status"); } &&
20890          { ac_try='test -s "conftest.$ac_objext"'
20891   { (eval echo "$as_me:20891: \"$ac_try\"") >&5
20892   (eval $ac_try) 2>&5
20893   ac_status=$?
20894   echo "$as_me:20894: \$? = $ac_status" >&5
20895   (exit "$ac_status"); }; }; then
20896   ac_cv_c_const=yes
20897 else
20898   echo "$as_me: failed program was:" >&5
20899 cat "conftest.$ac_ext" >&5
20900 ac_cv_c_const=no
20901 fi
20902 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20903 fi
20904 echo "$as_me:20904: result: $ac_cv_c_const" >&5
20905 echo "${ECHO_T}$ac_cv_c_const" >&6
20906 if test $ac_cv_c_const = no; then
20907
20908 cat >>confdefs.h <<\EOF
20909 #define const
20910 EOF
20911
20912 fi
20913
20914 echo "$as_me:20914: checking for inline" >&5
20915 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20916 if test "${ac_cv_c_inline+set}" = set; then
20917   echo $ECHO_N "(cached) $ECHO_C" >&6
20918 else
20919   ac_cv_c_inline=no
20920 for ac_kw in inline __inline__ __inline; do
20921   cat >"conftest.$ac_ext" <<_ACEOF
20922 #line 20922 "configure"
20923 #include "confdefs.h"
20924 #ifndef __cplusplus
20925 static $ac_kw int static_foo () {return 0; }
20926 $ac_kw int foo () {return 0; }
20927 #endif
20928
20929 _ACEOF
20930 rm -f "conftest.$ac_objext"
20931 if { (eval echo "$as_me:20931: \"$ac_compile\"") >&5
20932   (eval $ac_compile) 2>&5
20933   ac_status=$?
20934   echo "$as_me:20934: \$? = $ac_status" >&5
20935   (exit "$ac_status"); } &&
20936          { ac_try='test -s "conftest.$ac_objext"'
20937   { (eval echo "$as_me:20937: \"$ac_try\"") >&5
20938   (eval $ac_try) 2>&5
20939   ac_status=$?
20940   echo "$as_me:20940: \$? = $ac_status" >&5
20941   (exit "$ac_status"); }; }; then
20942   ac_cv_c_inline=$ac_kw; break
20943 else
20944   echo "$as_me: failed program was:" >&5
20945 cat "conftest.$ac_ext" >&5
20946 fi
20947 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20948 done
20949
20950 fi
20951 echo "$as_me:20951: result: $ac_cv_c_inline" >&5
20952 echo "${ECHO_T}$ac_cv_c_inline" >&6
20953 case $ac_cv_c_inline in
20954   inline | yes) ;;
20955   no)
20956 cat >>confdefs.h <<\EOF
20957 #define inline
20958 EOF
20959  ;;
20960   *)  cat >>confdefs.h <<EOF
20961 #define inline $ac_cv_c_inline
20962 EOF
20963  ;;
20964 esac
20965
20966 NCURSES_INLINE=
20967 if test "$ac_cv_c_inline" != no ; then
20968         NCURSES_INLINE=inline
20969         if test "$INTEL_COMPILER" = yes
20970         then
20971                 :
20972         elif test "$CLANG_COMPILER" = yes
20973         then
20974                 :
20975         elif test "$GCC" = yes
20976         then
20977                 echo "$as_me:20977: checking if $CC supports options to tune inlining" >&5
20978 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20979 if test "${cf_cv_gcc_inline+set}" = set; then
20980   echo $ECHO_N "(cached) $ECHO_C" >&6
20981 else
20982
20983                 cf_save_CFLAGS=$CFLAGS
20984                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20985                 cat >"conftest.$ac_ext" <<_ACEOF
20986 #line 20986 "configure"
20987 #include "confdefs.h"
20988 inline int foo(void) { return 1; }
20989 int
20990 main (void)
20991 {
20992 ${cf_cv_main_return:-return} foo()
20993   ;
20994   return 0;
20995 }
20996 _ACEOF
20997 rm -f "conftest.$ac_objext"
20998 if { (eval echo "$as_me:20998: \"$ac_compile\"") >&5
20999   (eval $ac_compile) 2>&5
21000   ac_status=$?
21001   echo "$as_me:21001: \$? = $ac_status" >&5
21002   (exit "$ac_status"); } &&
21003          { ac_try='test -s "conftest.$ac_objext"'
21004   { (eval echo "$as_me:21004: \"$ac_try\"") >&5
21005   (eval $ac_try) 2>&5
21006   ac_status=$?
21007   echo "$as_me:21007: \$? = $ac_status" >&5
21008   (exit "$ac_status"); }; }; then
21009   cf_cv_gcc_inline=yes
21010 else
21011   echo "$as_me: failed program was:" >&5
21012 cat "conftest.$ac_ext" >&5
21013 cf_cv_gcc_inline=no
21014 fi
21015 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21016                 CFLAGS=$cf_save_CFLAGS
21017
21018 fi
21019 echo "$as_me:21019: result: $cf_cv_gcc_inline" >&5
21020 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21021                 if test "$cf_cv_gcc_inline" = yes ; then
21022
21023 cf_fix_cppflags=no
21024 cf_new_cflags=
21025 cf_new_cppflags=
21026 cf_new_extra_cppflags=
21027
21028 for cf_add_cflags in --param max-inline-insns-single=1200
21029 do
21030 case "$cf_fix_cppflags" in
21031 (no)
21032         case "$cf_add_cflags" in
21033         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21034                 case "$cf_add_cflags" in
21035                 (-D*)
21036                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21037
21038                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21039                                 && test -z "${cf_tst_cflags}" \
21040                                 && cf_fix_cppflags=yes
21041
21042                         if test "$cf_fix_cppflags" = yes ; then
21043
21044         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21045         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21046
21047                                 continue
21048                         elif test "${cf_tst_cflags}" = "\"'" ; then
21049
21050         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21051         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21052
21053                                 continue
21054                         fi
21055                         ;;
21056                 esac
21057                 case "$CPPFLAGS" in
21058                 (*$cf_add_cflags)
21059                         ;;
21060                 (*)
21061                         case "$cf_add_cflags" in
21062                         (-D*)
21063                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21064
21065 CPPFLAGS=`echo "$CPPFLAGS" | \
21066         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21067                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21068
21069                                 ;;
21070                         esac
21071
21072         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21073         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21074
21075                         ;;
21076                 esac
21077                 ;;
21078         (*)
21079
21080         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21081         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21082
21083                 ;;
21084         esac
21085         ;;
21086 (yes)
21087
21088         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21089         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21090
21091         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21092
21093         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21094                 && test -z "${cf_tst_cflags}" \
21095                 && cf_fix_cppflags=no
21096         ;;
21097 esac
21098 done
21099
21100 if test -n "$cf_new_cflags" ; then
21101
21102         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21103         CFLAGS="${CFLAGS}$cf_new_cflags"
21104
21105 fi
21106
21107 if test -n "$cf_new_cppflags" ; then
21108
21109         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21110         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21111
21112 fi
21113
21114 if test -n "$cf_new_extra_cppflags" ; then
21115
21116         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21117         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21118
21119 fi
21120
21121                 fi
21122         fi
21123 fi
21124
21125 echo "$as_me:21125: checking for signal global datatype" >&5
21126 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21127 if test "${cf_cv_sig_atomic_t+set}" = set; then
21128   echo $ECHO_N "(cached) $ECHO_C" >&6
21129 else
21130
21131         for cf_type in \
21132                 "volatile sig_atomic_t" \
21133                 "sig_atomic_t" \
21134                 "int"
21135         do
21136         cat >"conftest.$ac_ext" <<_ACEOF
21137 #line 21137 "configure"
21138 #include "confdefs.h"
21139
21140 #include <sys/types.h>
21141 #include <signal.h>
21142 #include <stdio.h>
21143
21144 extern $cf_type x;
21145 $cf_type x;
21146 static void handler(int sig)
21147 {
21148         (void)sig;
21149         x = 5;
21150 }
21151 int
21152 main (void)
21153 {
21154 signal(SIGINT, handler);
21155                  x = 1
21156   ;
21157   return 0;
21158 }
21159 _ACEOF
21160 rm -f "conftest.$ac_objext"
21161 if { (eval echo "$as_me:21161: \"$ac_compile\"") >&5
21162   (eval $ac_compile) 2>&5
21163   ac_status=$?
21164   echo "$as_me:21164: \$? = $ac_status" >&5
21165   (exit "$ac_status"); } &&
21166          { ac_try='test -s "conftest.$ac_objext"'
21167   { (eval echo "$as_me:21167: \"$ac_try\"") >&5
21168   (eval $ac_try) 2>&5
21169   ac_status=$?
21170   echo "$as_me:21170: \$? = $ac_status" >&5
21171   (exit "$ac_status"); }; }; then
21172   cf_cv_sig_atomic_t=$cf_type
21173 else
21174   echo "$as_me: failed program was:" >&5
21175 cat "conftest.$ac_ext" >&5
21176 cf_cv_sig_atomic_t=no
21177 fi
21178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21179                 test "$cf_cv_sig_atomic_t" != no && break
21180         done
21181
21182 fi
21183
21184 echo "$as_me:21184: result: $cf_cv_sig_atomic_t" >&5
21185 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21186 test "$cf_cv_sig_atomic_t" != no &&
21187 cat >>confdefs.h <<EOF
21188 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21189 EOF
21190
21191 if test "$NCURSES_CHTYPE" = auto ; then
21192
21193 echo "$as_me:21193: checking for type of chtype" >&5
21194 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21195 if test "${cf_cv_typeof_chtype+set}" = set; then
21196   echo $ECHO_N "(cached) $ECHO_C" >&6
21197 else
21198
21199                 if test "$cross_compiling" = yes; then
21200   cf_cv_typeof_chtype=long
21201 else
21202   cat >"conftest.$ac_ext" <<_ACEOF
21203 #line 21203 "configure"
21204 #include "confdefs.h"
21205
21206 $ac_includes_default
21207 #define WANT_BITS 31
21208 int main(void)
21209 {
21210         FILE *fp = fopen("cf_test.out", "w");
21211         if (fp != 0) {
21212                 char *result = "long";
21213                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21214                         int n;
21215                         unsigned int x, y;
21216                         for (n = 0; n < WANT_BITS; n++) {
21217                                 x = (1 << n);
21218                                 y = (x >> n);
21219                                 if (y != 1 || x == 0) {
21220                                         x = 0;
21221                                         break;
21222                                 }
21223                         }
21224                         /*
21225                          * If x is nonzero, an int is big enough for the bits
21226                          * that we want.
21227                          */
21228                         result = (x != 0) ? "int" : "long";
21229                 }
21230                 fputs(result, fp);
21231                 fclose(fp);
21232         }
21233         ${cf_cv_main_return:-return}(0);
21234 }
21235
21236 _ACEOF
21237 rm -f "conftest$ac_exeext"
21238 if { (eval echo "$as_me:21238: \"$ac_link\"") >&5
21239   (eval $ac_link) 2>&5
21240   ac_status=$?
21241   echo "$as_me:21241: \$? = $ac_status" >&5
21242   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21243   { (eval echo "$as_me:21243: \"$ac_try\"") >&5
21244   (eval $ac_try) 2>&5
21245   ac_status=$?
21246   echo "$as_me:21246: \$? = $ac_status" >&5
21247   (exit "$ac_status"); }; }; then
21248   cf_cv_typeof_chtype=`cat cf_test.out`
21249 else
21250   echo "$as_me: program exited with status $ac_status" >&5
21251 echo "$as_me: failed program was:" >&5
21252 cat "conftest.$ac_ext" >&5
21253 cf_cv_typeof_chtype=long
21254 fi
21255 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21256 fi
21257                 rm -f cf_test.out
21258
21259 fi
21260
21261 echo "$as_me:21261: result: $cf_cv_typeof_chtype" >&5
21262 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21263
21264 cat >>confdefs.h <<EOF
21265 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21266 EOF
21267
21268 else
21269         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21270 fi
21271 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21272
21273 echo "$as_me:21273: checking if unsigned literals are legal" >&5
21274 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21275 if test "${cf_cv_unsigned_literals+set}" = set; then
21276   echo $ECHO_N "(cached) $ECHO_C" >&6
21277 else
21278
21279         cat >"conftest.$ac_ext" <<_ACEOF
21280 #line 21280 "configure"
21281 #include "confdefs.h"
21282
21283 int
21284 main (void)
21285 {
21286 long x = 1L + 1UL + 1U + 1
21287   ;
21288   return 0;
21289 }
21290 _ACEOF
21291 rm -f "conftest.$ac_objext"
21292 if { (eval echo "$as_me:21292: \"$ac_compile\"") >&5
21293   (eval $ac_compile) 2>&5
21294   ac_status=$?
21295   echo "$as_me:21295: \$? = $ac_status" >&5
21296   (exit "$ac_status"); } &&
21297          { ac_try='test -s "conftest.$ac_objext"'
21298   { (eval echo "$as_me:21298: \"$ac_try\"") >&5
21299   (eval $ac_try) 2>&5
21300   ac_status=$?
21301   echo "$as_me:21301: \$? = $ac_status" >&5
21302   (exit "$ac_status"); }; }; then
21303   cf_cv_unsigned_literals=yes
21304 else
21305   echo "$as_me: failed program was:" >&5
21306 cat "conftest.$ac_ext" >&5
21307 cf_cv_unsigned_literals=no
21308 fi
21309 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21310
21311 fi
21312
21313 echo "$as_me:21313: result: $cf_cv_unsigned_literals" >&5
21314 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21315
21316 cf_cv_1UL="1"
21317 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21318 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21319
21320 if test "$NCURSES_MMASK_T" = auto ; then
21321         cf_cv_typeof_mmask_t=long
21322 else
21323         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21324 fi
21325 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21326
21327 ###     Checks for external-data
21328
21329 echo "$as_me:21329: checking if external errno is declared" >&5
21330 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21331 if test "${cf_cv_dcl_errno+set}" = set; then
21332   echo $ECHO_N "(cached) $ECHO_C" >&6
21333 else
21334
21335         cat >"conftest.$ac_ext" <<_ACEOF
21336 #line 21336 "configure"
21337 #include "confdefs.h"
21338
21339 $ac_includes_default
21340 #include <errno.h>
21341 int
21342 main (void)
21343 {
21344 int x = (int) errno; (void)x
21345   ;
21346   return 0;
21347 }
21348 _ACEOF
21349 rm -f "conftest.$ac_objext"
21350 if { (eval echo "$as_me:21350: \"$ac_compile\"") >&5
21351   (eval $ac_compile) 2>&5
21352   ac_status=$?
21353   echo "$as_me:21353: \$? = $ac_status" >&5
21354   (exit "$ac_status"); } &&
21355          { ac_try='test -s "conftest.$ac_objext"'
21356   { (eval echo "$as_me:21356: \"$ac_try\"") >&5
21357   (eval $ac_try) 2>&5
21358   ac_status=$?
21359   echo "$as_me:21359: \$? = $ac_status" >&5
21360   (exit "$ac_status"); }; }; then
21361   cf_cv_dcl_errno=yes
21362 else
21363   echo "$as_me: failed program was:" >&5
21364 cat "conftest.$ac_ext" >&5
21365 cf_cv_dcl_errno=no
21366 fi
21367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21368
21369 fi
21370 echo "$as_me:21370: result: $cf_cv_dcl_errno" >&5
21371 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21372
21373 if test "$cf_cv_dcl_errno" = no ; then
21374
21375 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21376
21377         cat >>confdefs.h <<EOF
21378 #define $cf_result 1
21379 EOF
21380
21381 fi
21382
21383 # It's possible (for near-UNIX clones) that the data doesn't exist
21384
21385 echo "$as_me:21385: checking if external errno exists" >&5
21386 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21387 if test "${cf_cv_have_errno+set}" = set; then
21388   echo $ECHO_N "(cached) $ECHO_C" >&6
21389 else
21390
21391         cat >"conftest.$ac_ext" <<_ACEOF
21392 #line 21392 "configure"
21393 #include "confdefs.h"
21394
21395 #undef errno
21396 extern int errno;
21397
21398 int
21399 main (void)
21400 {
21401 errno = 2
21402   ;
21403   return 0;
21404 }
21405 _ACEOF
21406 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21407 if { (eval echo "$as_me:21407: \"$ac_link\"") >&5
21408   (eval $ac_link) 2>&5
21409   ac_status=$?
21410   echo "$as_me:21410: \$? = $ac_status" >&5
21411   (exit "$ac_status"); } &&
21412          { ac_try='test -s "conftest$ac_exeext"'
21413   { (eval echo "$as_me:21413: \"$ac_try\"") >&5
21414   (eval $ac_try) 2>&5
21415   ac_status=$?
21416   echo "$as_me:21416: \$? = $ac_status" >&5
21417   (exit "$ac_status"); }; }; then
21418   cf_cv_have_errno=yes
21419 else
21420   echo "$as_me: failed program was:" >&5
21421 cat "conftest.$ac_ext" >&5
21422 cf_cv_have_errno=no
21423 fi
21424 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21425
21426 fi
21427 echo "$as_me:21427: result: $cf_cv_have_errno" >&5
21428 echo "${ECHO_T}$cf_cv_have_errno" >&6
21429
21430 if test "$cf_cv_have_errno" = yes ; then
21431
21432 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21433
21434         cat >>confdefs.h <<EOF
21435 #define $cf_result 1
21436 EOF
21437
21438 fi
21439
21440 echo "$as_me:21440: checking if data-only library module links" >&5
21441 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21442 if test "${cf_cv_link_dataonly+set}" = set; then
21443   echo $ECHO_N "(cached) $ECHO_C" >&6
21444 else
21445
21446         rm -f conftest.a
21447         cat >conftest.$ac_ext <<EOF
21448 #line 21448 "configure"
21449 int     testdata[3] = { 123, 456, 789 };
21450 EOF
21451         if { (eval echo "$as_me:21451: \"$ac_compile\"") >&5
21452   (eval $ac_compile) 2>&5
21453   ac_status=$?
21454   echo "$as_me:21454: \$? = $ac_status" >&5
21455   (exit "$ac_status"); } ; then
21456                 mv conftest.o data.o && \
21457                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21458         fi
21459         rm -f conftest.$ac_ext data.o
21460         cat >conftest.$ac_ext <<EOF
21461 #line 21461 "configure"
21462 int     testfunc(void)
21463 {
21464 #if defined(NeXT)
21465         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21466 #else
21467         extern int testdata[3];
21468         return testdata[0] == 123
21469            &&  testdata[1] == 456
21470            &&  testdata[2] == 789;
21471 #endif
21472 }
21473 EOF
21474         if { (eval echo "$as_me:21474: \"$ac_compile\"") >&5
21475   (eval $ac_compile) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit "$ac_status"); }; then
21479                 mv conftest.o func.o && \
21480                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21481         fi
21482         rm -f conftest.$ac_ext func.o
21483         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21484         cf_saveLIBS="$LIBS"
21485         LIBS="conftest.a $LIBS"
21486         if test "$cross_compiling" = yes; then
21487   cf_cv_link_dataonly=unknown
21488 else
21489   cat >"conftest.$ac_ext" <<_ACEOF
21490 #line 21490 "configure"
21491 #include "confdefs.h"
21492
21493         int main(void)
21494         {
21495                 extern int testfunc();
21496                 ${cf_cv_main_return:-return} (!testfunc());
21497         }
21498
21499 _ACEOF
21500 rm -f "conftest$ac_exeext"
21501 if { (eval echo "$as_me:21501: \"$ac_link\"") >&5
21502   (eval $ac_link) 2>&5
21503   ac_status=$?
21504   echo "$as_me:21504: \$? = $ac_status" >&5
21505   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21506   { (eval echo "$as_me:21506: \"$ac_try\"") >&5
21507   (eval $ac_try) 2>&5
21508   ac_status=$?
21509   echo "$as_me:21509: \$? = $ac_status" >&5
21510   (exit "$ac_status"); }; }; then
21511   cf_cv_link_dataonly=yes
21512 else
21513   echo "$as_me: program exited with status $ac_status" >&5
21514 echo "$as_me: failed program was:" >&5
21515 cat "conftest.$ac_ext" >&5
21516 cf_cv_link_dataonly=no
21517 fi
21518 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21519 fi
21520         LIBS="$cf_saveLIBS"
21521
21522 fi
21523
21524 echo "$as_me:21524: result: $cf_cv_link_dataonly" >&5
21525 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21526
21527 if test "$cf_cv_link_dataonly" = no ; then
21528
21529 cat >>confdefs.h <<\EOF
21530 #define BROKEN_LINKER 1
21531 EOF
21532
21533         BROKEN_LINKER=1
21534 fi
21535
21536 ###     Checks for library functions.
21537
21538 echo "$as_me:21538: checking for clock_gettime" >&5
21539 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21540 if test "${cf_cv_func_clock_gettime+set}" = set; then
21541   echo $ECHO_N "(cached) $ECHO_C" >&6
21542 else
21543
21544                 cat >"conftest.$ac_ext" <<_ACEOF
21545 #line 21545 "configure"
21546 #include "confdefs.h"
21547 #include <time.h>
21548 int
21549 main (void)
21550 {
21551 struct timespec ts;
21552                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21553   ;
21554   return 0;
21555 }
21556 _ACEOF
21557 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21558 if { (eval echo "$as_me:21558: \"$ac_link\"") >&5
21559   (eval $ac_link) 2>&5
21560   ac_status=$?
21561   echo "$as_me:21561: \$? = $ac_status" >&5
21562   (exit "$ac_status"); } &&
21563          { ac_try='test -s "conftest$ac_exeext"'
21564   { (eval echo "$as_me:21564: \"$ac_try\"") >&5
21565   (eval $ac_try) 2>&5
21566   ac_status=$?
21567   echo "$as_me:21567: \$? = $ac_status" >&5
21568   (exit "$ac_status"); }; }; then
21569   cf_cv_func_clock_gettime=yes
21570 else
21571   echo "$as_me: failed program was:" >&5
21572 cat "conftest.$ac_ext" >&5
21573 cf_cv_func_clock_gettime=no
21574 fi
21575 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21576
21577 fi
21578 echo "$as_me:21578: result: $cf_cv_func_clock_gettime" >&5
21579 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21580
21581 if test "$cf_cv_func_clock_gettime" = yes
21582 then
21583
21584 cat >>confdefs.h <<\EOF
21585 #define HAVE_CLOCK_GETTIME 1
21586 EOF
21587
21588 else
21589 echo "$as_me:21589: checking for gettimeofday" >&5
21590 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21591 if test "${ac_cv_func_gettimeofday+set}" = set; then
21592   echo $ECHO_N "(cached) $ECHO_C" >&6
21593 else
21594   cat >"conftest.$ac_ext" <<_ACEOF
21595 #line 21595 "configure"
21596 #include "confdefs.h"
21597 #define gettimeofday autoconf_temporary
21598 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21599 #undef gettimeofday
21600
21601 #ifdef __cplusplus
21602 extern "C"
21603 #endif
21604
21605 /* We use char because int might match the return type of a gcc2
21606    builtin and then its argument prototype would still apply.  */
21607 char gettimeofday (void);
21608
21609 int
21610 main (void)
21611 {
21612
21613 /* The GNU C library defines stubs for functions which it implements
21614     to always fail with ENOSYS.  Some functions are actually named
21615     something starting with __ and the normal name is an alias.  */
21616 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21617 #error found stub for gettimeofday
21618 #endif
21619
21620         return gettimeofday ();
21621   ;
21622   return 0;
21623 }
21624 _ACEOF
21625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21626 if { (eval echo "$as_me:21626: \"$ac_link\"") >&5
21627   (eval $ac_link) 2>&5
21628   ac_status=$?
21629   echo "$as_me:21629: \$? = $ac_status" >&5
21630   (exit "$ac_status"); } &&
21631          { ac_try='test -s "conftest$ac_exeext"'
21632   { (eval echo "$as_me:21632: \"$ac_try\"") >&5
21633   (eval $ac_try) 2>&5
21634   ac_status=$?
21635   echo "$as_me:21635: \$? = $ac_status" >&5
21636   (exit "$ac_status"); }; }; then
21637   ac_cv_func_gettimeofday=yes
21638 else
21639   echo "$as_me: failed program was:" >&5
21640 cat "conftest.$ac_ext" >&5
21641 ac_cv_func_gettimeofday=no
21642 fi
21643 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21644 fi
21645 echo "$as_me:21645: result: $ac_cv_func_gettimeofday" >&5
21646 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21647 if test "$ac_cv_func_gettimeofday" = yes; then
21648
21649 cat >>confdefs.h <<\EOF
21650 #define HAVE_GETTIMEOFDAY 1
21651 EOF
21652
21653 else
21654
21655 echo "$as_me:21655: checking for gettimeofday in -lbsd" >&5
21656 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21657 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21658   echo $ECHO_N "(cached) $ECHO_C" >&6
21659 else
21660   ac_check_lib_save_LIBS=$LIBS
21661 LIBS="-lbsd  $LIBS"
21662 cat >"conftest.$ac_ext" <<_ACEOF
21663 #line 21663 "configure"
21664 #include "confdefs.h"
21665
21666 /* Override any gcc2 internal prototype to avoid an error.  */
21667 #ifdef __cplusplus
21668 extern "C"
21669 #endif
21670 /* We use char because int might match the return type of a gcc2
21671    builtin and then its argument prototype would still apply.  */
21672 char gettimeofday ();
21673 int
21674 main (void)
21675 {
21676 gettimeofday ();
21677   ;
21678   return 0;
21679 }
21680 _ACEOF
21681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21682 if { (eval echo "$as_me:21682: \"$ac_link\"") >&5
21683   (eval $ac_link) 2>&5
21684   ac_status=$?
21685   echo "$as_me:21685: \$? = $ac_status" >&5
21686   (exit "$ac_status"); } &&
21687          { ac_try='test -s "conftest$ac_exeext"'
21688   { (eval echo "$as_me:21688: \"$ac_try\"") >&5
21689   (eval $ac_try) 2>&5
21690   ac_status=$?
21691   echo "$as_me:21691: \$? = $ac_status" >&5
21692   (exit "$ac_status"); }; }; then
21693   ac_cv_lib_bsd_gettimeofday=yes
21694 else
21695   echo "$as_me: failed program was:" >&5
21696 cat "conftest.$ac_ext" >&5
21697 ac_cv_lib_bsd_gettimeofday=no
21698 fi
21699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21700 LIBS=$ac_check_lib_save_LIBS
21701 fi
21702 echo "$as_me:21702: result: $ac_cv_lib_bsd_gettimeofday" >&5
21703 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21704 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21705
21706 cat >>confdefs.h <<\EOF
21707 #define HAVE_GETTIMEOFDAY 1
21708 EOF
21709
21710 cf_add_libs="$LIBS"
21711 # reverse order
21712 cf_add_0lib=
21713 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21714 # filter duplicates
21715 for cf_add_1lib in $cf_add_0lib; do
21716         for cf_add_2lib in $cf_add_libs; do
21717                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21718                         cf_add_1lib=
21719                         break
21720                 fi
21721         done
21722         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21723 done
21724 LIBS="$cf_add_libs"
21725
21726 fi
21727
21728 fi
21729 fi
21730
21731 for ac_func in \
21732 fpathconf \
21733 getcwd \
21734 getauxval \
21735 getegid \
21736 geteuid \
21737 getopt \
21738 getuid \
21739 issetugid \
21740 localeconv \
21741 poll \
21742 putenv \
21743 remove \
21744 select \
21745 setbuf \
21746 setbuffer \
21747 setenv \
21748 setfsuid \
21749 setvbuf \
21750 sigaction \
21751 sigvec \
21752 snprintf \
21753 strdup \
21754 strstr \
21755 sysconf \
21756 tcgetpgrp \
21757 times \
21758 tsearch \
21759 vsnprintf \
21760
21761 do
21762 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21763 echo "$as_me:21763: checking for $ac_func" >&5
21764 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21765 if eval "test \"\${$as_ac_var+set}\" = set"; then
21766   echo $ECHO_N "(cached) $ECHO_C" >&6
21767 else
21768   cat >"conftest.$ac_ext" <<_ACEOF
21769 #line 21769 "configure"
21770 #include "confdefs.h"
21771 #define $ac_func autoconf_temporary
21772 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21773 #undef $ac_func
21774
21775 #ifdef __cplusplus
21776 extern "C"
21777 #endif
21778
21779 /* We use char because int might match the return type of a gcc2
21780    builtin and then its argument prototype would still apply.  */
21781 char $ac_func (void);
21782
21783 int
21784 main (void)
21785 {
21786
21787 /* The GNU C library defines stubs for functions which it implements
21788     to always fail with ENOSYS.  Some functions are actually named
21789     something starting with __ and the normal name is an alias.  */
21790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21791 #error found stub for $ac_func
21792 #endif
21793
21794         return $ac_func ();
21795   ;
21796   return 0;
21797 }
21798 _ACEOF
21799 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21800 if { (eval echo "$as_me:21800: \"$ac_link\"") >&5
21801   (eval $ac_link) 2>&5
21802   ac_status=$?
21803   echo "$as_me:21803: \$? = $ac_status" >&5
21804   (exit "$ac_status"); } &&
21805          { ac_try='test -s "conftest$ac_exeext"'
21806   { (eval echo "$as_me:21806: \"$ac_try\"") >&5
21807   (eval $ac_try) 2>&5
21808   ac_status=$?
21809   echo "$as_me:21809: \$? = $ac_status" >&5
21810   (exit "$ac_status"); }; }; then
21811   eval "$as_ac_var=yes"
21812 else
21813   echo "$as_me: failed program was:" >&5
21814 cat "conftest.$ac_ext" >&5
21815 eval "$as_ac_var=no"
21816 fi
21817 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21818 fi
21819 echo "$as_me:21819: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21820 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21821 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21822   cat >>confdefs.h <<EOF
21823 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21824 EOF
21825
21826 fi
21827 done
21828
21829 echo "$as_me:21829: checking if _PATH_TTYS is defined in ttyent.h" >&5
21830 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21831 if test "${cf_cv_PATH_TTYS+set}" = set; then
21832   echo $ECHO_N "(cached) $ECHO_C" >&6
21833 else
21834
21835 cat >"conftest.$ac_ext" <<_ACEOF
21836 #line 21836 "configure"
21837 #include "confdefs.h"
21838
21839 #include <stdio.h>
21840 #include <ttyent.h>
21841 int
21842 main (void)
21843 {
21844
21845 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21846   ;
21847   return 0;
21848 }
21849 _ACEOF
21850 rm -f "conftest.$ac_objext"
21851 if { (eval echo "$as_me:21851: \"$ac_compile\"") >&5
21852   (eval $ac_compile) 2>&5
21853   ac_status=$?
21854   echo "$as_me:21854: \$? = $ac_status" >&5
21855   (exit "$ac_status"); } &&
21856          { ac_try='test -s "conftest.$ac_objext"'
21857   { (eval echo "$as_me:21857: \"$ac_try\"") >&5
21858   (eval $ac_try) 2>&5
21859   ac_status=$?
21860   echo "$as_me:21860: \$? = $ac_status" >&5
21861   (exit "$ac_status"); }; }; then
21862   cf_cv_PATH_TTYS=yes
21863 else
21864   echo "$as_me: failed program was:" >&5
21865 cat "conftest.$ac_ext" >&5
21866 cf_cv_PATH_TTYS=no
21867 fi
21868 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21869 fi
21870 echo "$as_me:21870: result: $cf_cv_PATH_TTYS" >&5
21871 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21872
21873 if test $cf_cv_PATH_TTYS = no
21874 then
21875         for cf_ttys in /etc/ttytype /etc/ttys
21876         do
21877                 if test -f $cf_ttys
21878                 then
21879                         cf_cv_PATH_TTYS=maybe
21880
21881 cat >>confdefs.h <<\EOF
21882 #define _PATH_TTYS $cf_ttys
21883 EOF
21884
21885                         break
21886                 fi
21887         done
21888 fi
21889
21890 if test $cf_cv_PATH_TTYS != no
21891 then
21892         echo "$as_me:21892: checking if _PATH_TTYS file exists" >&5
21893 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21894 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21895   echo $ECHO_N "(cached) $ECHO_C" >&6
21896 else
21897
21898                 if test "$cross_compiling" = yes; then
21899   cf_cv_have_PATH_TTYS=unknown
21900 else
21901   cat >"conftest.$ac_ext" <<_ACEOF
21902 #line 21902 "configure"
21903 #include "confdefs.h"
21904
21905 $ac_includes_default
21906
21907 #include <ttyent.h>
21908
21909 int main(void) {
21910         FILE *fp = fopen(_PATH_TTYS, "r");
21911         ${cf_cv_main_return:-return} (fp == 0);
21912 }
21913 _ACEOF
21914 rm -f "conftest$ac_exeext"
21915 if { (eval echo "$as_me:21915: \"$ac_link\"") >&5
21916   (eval $ac_link) 2>&5
21917   ac_status=$?
21918   echo "$as_me:21918: \$? = $ac_status" >&5
21919   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21920   { (eval echo "$as_me:21920: \"$ac_try\"") >&5
21921   (eval $ac_try) 2>&5
21922   ac_status=$?
21923   echo "$as_me:21923: \$? = $ac_status" >&5
21924   (exit "$ac_status"); }; }; then
21925   cf_cv_have_PATH_TTYS=yes
21926 else
21927   echo "$as_me: program exited with status $ac_status" >&5
21928 echo "$as_me: failed program was:" >&5
21929 cat "conftest.$ac_ext" >&5
21930 cf_cv_have_PATH_TTYS=no
21931 fi
21932 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21933 fi
21934 fi
21935 echo "$as_me:21935: result: $cf_cv_have_PATH_TTYS" >&5
21936 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21937         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21938 fi
21939
21940 if test $cf_cv_PATH_TTYS != no
21941 then
21942
21943 cat >>confdefs.h <<\EOF
21944 #define HAVE_PATH_TTYS 1
21945 EOF
21946
21947         echo "$as_me:21947: checking for getttynam" >&5
21948 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21949 if test "${cf_cv_func_getttynam+set}" = set; then
21950   echo $ECHO_N "(cached) $ECHO_C" >&6
21951 else
21952
21953                 cat >"conftest.$ac_ext" <<_ACEOF
21954 #line 21954 "configure"
21955 #include "confdefs.h"
21956 #include <ttyent.h>
21957 int
21958 main (void)
21959 {
21960 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
21961   ;
21962   return 0;
21963 }
21964 _ACEOF
21965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21966 if { (eval echo "$as_me:21966: \"$ac_link\"") >&5
21967   (eval $ac_link) 2>&5
21968   ac_status=$?
21969   echo "$as_me:21969: \$? = $ac_status" >&5
21970   (exit "$ac_status"); } &&
21971          { ac_try='test -s "conftest$ac_exeext"'
21972   { (eval echo "$as_me:21972: \"$ac_try\"") >&5
21973   (eval $ac_try) 2>&5
21974   ac_status=$?
21975   echo "$as_me:21975: \$? = $ac_status" >&5
21976   (exit "$ac_status"); }; }; then
21977   cf_cv_func_getttynam=yes
21978 else
21979   echo "$as_me: failed program was:" >&5
21980 cat "conftest.$ac_ext" >&5
21981 cf_cv_func_getttynam=no
21982 fi
21983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21984 fi
21985 echo "$as_me:21985: result: $cf_cv_func_getttynam" >&5
21986 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
21987         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
21988 #define HAVE_GETTTYNAM 1
21989 EOF
21990
21991 fi
21992
21993 if test "x$ac_cv_func_getopt" = xno && \
21994    test "x$cf_with_progs$cf_with_tests" != xnono; then
21995         { { echo "$as_me:21995: error: getopt is required for building programs" >&5
21996 echo "$as_me: error: getopt is required for building programs" >&2;}
21997    { (exit 1); exit 1; }; }
21998 fi
21999
22000 if test "x$with_safe_sprintf" = xyes
22001 then
22002         if test "x$ac_cv_func_vsnprintf" = xyes
22003         then
22004                 { echo "$as_me:22004: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22005 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22006         else
22007
22008 cat >>confdefs.h <<\EOF
22009 #define USE_SAFE_SPRINTF 1
22010 EOF
22011
22012         fi
22013 fi
22014
22015 if test "x$with_getcap" = "xyes" ; then
22016
22017 echo "$as_me:22017: checking for terminal-capability database functions" >&5
22018 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22019 if test "${cf_cv_cgetent+set}" = set; then
22020   echo $ECHO_N "(cached) $ECHO_C" >&6
22021 else
22022
22023 cat >"conftest.$ac_ext" <<_ACEOF
22024 #line 22024 "configure"
22025 #include "confdefs.h"
22026
22027 $ac_includes_default
22028 int
22029 main (void)
22030 {
22031
22032         char temp[128];
22033         char *buf = temp;
22034         char *db_array = temp;
22035         cgetent(&buf, &db_array, "vt100");
22036         cgetcap(buf, "tc", '=');
22037         cgetmatch(buf, "tc");
22038
22039   ;
22040   return 0;
22041 }
22042 _ACEOF
22043 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22044 if { (eval echo "$as_me:22044: \"$ac_link\"") >&5
22045   (eval $ac_link) 2>&5
22046   ac_status=$?
22047   echo "$as_me:22047: \$? = $ac_status" >&5
22048   (exit "$ac_status"); } &&
22049          { ac_try='test -s "conftest$ac_exeext"'
22050   { (eval echo "$as_me:22050: \"$ac_try\"") >&5
22051   (eval $ac_try) 2>&5
22052   ac_status=$?
22053   echo "$as_me:22053: \$? = $ac_status" >&5
22054   (exit "$ac_status"); }; }; then
22055   cf_cv_cgetent=yes
22056 else
22057   echo "$as_me: failed program was:" >&5
22058 cat "conftest.$ac_ext" >&5
22059 cf_cv_cgetent=no
22060 fi
22061 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22062
22063 fi
22064 echo "$as_me:22064: result: $cf_cv_cgetent" >&5
22065 echo "${ECHO_T}$cf_cv_cgetent" >&6
22066
22067 if test "$cf_cv_cgetent" = yes
22068 then
22069
22070 cat >>confdefs.h <<\EOF
22071 #define HAVE_BSD_CGETENT 1
22072 EOF
22073
22074 echo "$as_me:22074: checking if cgetent uses const parameter" >&5
22075 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22076 if test "${cf_cv_cgetent_const+set}" = set; then
22077   echo $ECHO_N "(cached) $ECHO_C" >&6
22078 else
22079
22080 cat >"conftest.$ac_ext" <<_ACEOF
22081 #line 22081 "configure"
22082 #include "confdefs.h"
22083
22084 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22085 $ac_includes_default
22086 int
22087 main (void)
22088 {
22089
22090         char temp[128];
22091         char *buf = temp;
22092 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22093         const char *db_array = temp;
22094         cgetent(&buf, &db_array, "vt100");
22095 #endif
22096         cgetcap(buf, "tc", '=');
22097         cgetmatch(buf, "tc");
22098
22099   ;
22100   return 0;
22101 }
22102 _ACEOF
22103 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22104 if { (eval echo "$as_me:22104: \"$ac_link\"") >&5
22105   (eval $ac_link) 2>&5
22106   ac_status=$?
22107   echo "$as_me:22107: \$? = $ac_status" >&5
22108   (exit "$ac_status"); } &&
22109          { ac_try='test -s "conftest$ac_exeext"'
22110   { (eval echo "$as_me:22110: \"$ac_try\"") >&5
22111   (eval $ac_try) 2>&5
22112   ac_status=$?
22113   echo "$as_me:22113: \$? = $ac_status" >&5
22114   (exit "$ac_status"); }; }; then
22115   cf_cv_cgetent_const=yes
22116 else
22117   echo "$as_me: failed program was:" >&5
22118 cat "conftest.$ac_ext" >&5
22119 cf_cv_cgetent_const=no
22120 fi
22121 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22122
22123 fi
22124 echo "$as_me:22124: result: $cf_cv_cgetent_const" >&5
22125 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22126         if test "$cf_cv_cgetent_const" = yes
22127         then
22128
22129 cat >>confdefs.h <<EOF
22130 #define CGETENT_CONST const
22131 EOF
22132
22133         fi
22134 fi
22135
22136 fi
22137
22138 echo "$as_me:22138: checking for isascii" >&5
22139 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22140 if test "${cf_cv_have_isascii+set}" = set; then
22141   echo $ECHO_N "(cached) $ECHO_C" >&6
22142 else
22143
22144         cat >"conftest.$ac_ext" <<_ACEOF
22145 #line 22145 "configure"
22146 #include "confdefs.h"
22147 #include <ctype.h>
22148 int
22149 main (void)
22150 {
22151 int x = isascii(' ')
22152   ;
22153   return 0;
22154 }
22155 _ACEOF
22156 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22157 if { (eval echo "$as_me:22157: \"$ac_link\"") >&5
22158   (eval $ac_link) 2>&5
22159   ac_status=$?
22160   echo "$as_me:22160: \$? = $ac_status" >&5
22161   (exit "$ac_status"); } &&
22162          { ac_try='test -s "conftest$ac_exeext"'
22163   { (eval echo "$as_me:22163: \"$ac_try\"") >&5
22164   (eval $ac_try) 2>&5
22165   ac_status=$?
22166   echo "$as_me:22166: \$? = $ac_status" >&5
22167   (exit "$ac_status"); }; }; then
22168   cf_cv_have_isascii=yes
22169 else
22170   echo "$as_me: failed program was:" >&5
22171 cat "conftest.$ac_ext" >&5
22172 cf_cv_have_isascii=no
22173 fi
22174 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22175
22176 fi
22177 echo "$as_me:22177: result: $cf_cv_have_isascii" >&5
22178 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22179 test "$cf_cv_have_isascii" = yes &&
22180 cat >>confdefs.h <<\EOF
22181 #define HAVE_ISASCII 1
22182 EOF
22183
22184 if test "$ac_cv_func_sigaction" = yes; then
22185 echo "$as_me:22185: checking whether sigaction needs _POSIX_SOURCE" >&5
22186 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22187 cat >"conftest.$ac_ext" <<_ACEOF
22188 #line 22188 "configure"
22189 #include "confdefs.h"
22190
22191 #include <sys/types.h>
22192 #include <signal.h>
22193 int
22194 main (void)
22195 {
22196 struct sigaction act
22197   ;
22198   return 0;
22199 }
22200 _ACEOF
22201 rm -f "conftest.$ac_objext"
22202 if { (eval echo "$as_me:22202: \"$ac_compile\"") >&5
22203   (eval $ac_compile) 2>&5
22204   ac_status=$?
22205   echo "$as_me:22205: \$? = $ac_status" >&5
22206   (exit "$ac_status"); } &&
22207          { ac_try='test -s "conftest.$ac_objext"'
22208   { (eval echo "$as_me:22208: \"$ac_try\"") >&5
22209   (eval $ac_try) 2>&5
22210   ac_status=$?
22211   echo "$as_me:22211: \$? = $ac_status" >&5
22212   (exit "$ac_status"); }; }; then
22213   sigact_bad=no
22214 else
22215   echo "$as_me: failed program was:" >&5
22216 cat "conftest.$ac_ext" >&5
22217
22218 cat >"conftest.$ac_ext" <<_ACEOF
22219 #line 22219 "configure"
22220 #include "confdefs.h"
22221
22222 #define _POSIX_SOURCE
22223 #include <sys/types.h>
22224 #include <signal.h>
22225 int
22226 main (void)
22227 {
22228 struct sigaction act
22229   ;
22230   return 0;
22231 }
22232 _ACEOF
22233 rm -f "conftest.$ac_objext"
22234 if { (eval echo "$as_me:22234: \"$ac_compile\"") >&5
22235   (eval $ac_compile) 2>&5
22236   ac_status=$?
22237   echo "$as_me:22237: \$? = $ac_status" >&5
22238   (exit "$ac_status"); } &&
22239          { ac_try='test -s "conftest.$ac_objext"'
22240   { (eval echo "$as_me:22240: \"$ac_try\"") >&5
22241   (eval $ac_try) 2>&5
22242   ac_status=$?
22243   echo "$as_me:22243: \$? = $ac_status" >&5
22244   (exit "$ac_status"); }; }; then
22245   sigact_bad=yes
22246
22247 cat >>confdefs.h <<\EOF
22248 #define _POSIX_SOURCE 1
22249 EOF
22250
22251 else
22252   echo "$as_me: failed program was:" >&5
22253 cat "conftest.$ac_ext" >&5
22254 sigact_bad=unknown
22255 fi
22256 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22257 fi
22258 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22259 echo "$as_me:22259: result: $sigact_bad" >&5
22260 echo "${ECHO_T}$sigact_bad" >&6
22261 fi
22262
22263 echo "$as_me:22263: checking if nanosleep really works" >&5
22264 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22265 if test "${cf_cv_func_nanosleep+set}" = set; then
22266   echo $ECHO_N "(cached) $ECHO_C" >&6
22267 else
22268
22269 if test "$cross_compiling" = yes; then
22270   cf_cv_func_nanosleep=unknown
22271 else
22272   cat >"conftest.$ac_ext" <<_ACEOF
22273 #line 22273 "configure"
22274 #include "confdefs.h"
22275
22276 $ac_includes_default
22277
22278 #include <errno.h>
22279 #include <time.h>
22280
22281 #ifdef HAVE_SYS_TIME_H
22282 #include <sys/time.h>
22283 #endif
22284
22285 int main(void) {
22286         struct timespec ts1, ts2;
22287         int code;
22288         ts1.tv_sec  = 0;
22289         ts1.tv_nsec = 750000000;
22290         ts2.tv_sec  = 0;
22291         ts2.tv_nsec = 0;
22292         errno = 0;
22293         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22294         ${cf_cv_main_return:-return}(code != 0);
22295 }
22296
22297 _ACEOF
22298 rm -f "conftest$ac_exeext"
22299 if { (eval echo "$as_me:22299: \"$ac_link\"") >&5
22300   (eval $ac_link) 2>&5
22301   ac_status=$?
22302   echo "$as_me:22302: \$? = $ac_status" >&5
22303   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22304   { (eval echo "$as_me:22304: \"$ac_try\"") >&5
22305   (eval $ac_try) 2>&5
22306   ac_status=$?
22307   echo "$as_me:22307: \$? = $ac_status" >&5
22308   (exit "$ac_status"); }; }; then
22309   cf_cv_func_nanosleep=yes
22310 else
22311   echo "$as_me: program exited with status $ac_status" >&5
22312 echo "$as_me: failed program was:" >&5
22313 cat "conftest.$ac_ext" >&5
22314 cf_cv_func_nanosleep=no
22315 fi
22316 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22317 fi
22318 fi
22319 echo "$as_me:22319: result: $cf_cv_func_nanosleep" >&5
22320 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22321
22322 test "$cf_cv_func_nanosleep" = "yes" &&
22323 cat >>confdefs.h <<\EOF
22324 #define HAVE_NANOSLEEP 1
22325 EOF
22326
22327 for ac_header in \
22328 termio.h \
22329 termios.h \
22330 unistd.h \
22331 sys/ioctl.h \
22332 sys/termio.h \
22333
22334 do
22335 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22336 echo "$as_me:22336: checking for $ac_header" >&5
22337 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22338 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22339   echo $ECHO_N "(cached) $ECHO_C" >&6
22340 else
22341   cat >"conftest.$ac_ext" <<_ACEOF
22342 #line 22342 "configure"
22343 #include "confdefs.h"
22344 #include <$ac_header>
22345 _ACEOF
22346 if { (eval echo "$as_me:22346: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22347   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22348   ac_status=$?
22349   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22350   rm -f conftest.er1
22351   cat conftest.err >&5
22352   echo "$as_me:22352: \$? = $ac_status" >&5
22353   (exit "$ac_status"); } >/dev/null; then
22354   if test -s conftest.err; then
22355     ac_cpp_err=$ac_c_preproc_warn_flag
22356   else
22357     ac_cpp_err=
22358   fi
22359 else
22360   ac_cpp_err=yes
22361 fi
22362 if test -z "$ac_cpp_err"; then
22363   eval "$as_ac_Header=yes"
22364 else
22365   echo "$as_me: failed program was:" >&5
22366   cat "conftest.$ac_ext" >&5
22367   eval "$as_ac_Header=no"
22368 fi
22369 rm -f conftest.err "conftest.$ac_ext"
22370 fi
22371 echo "$as_me:22371: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22372 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22373 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22374   cat >>confdefs.h <<EOF
22375 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22376 EOF
22377
22378 fi
22379 done
22380
22381 if test "$ac_cv_header_termios_h" = yes ; then
22382         case "$CFLAGS $CPPFLAGS" in
22383         (*-D_POSIX_SOURCE*)
22384                 termios_bad=dunno ;;
22385         (*)     termios_bad=maybe ;;
22386         esac
22387         if test "$termios_bad" = maybe ; then
22388         echo "$as_me:22388: checking whether termios.h needs _POSIX_SOURCE" >&5
22389 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22390         cat >"conftest.$ac_ext" <<_ACEOF
22391 #line 22391 "configure"
22392 #include "confdefs.h"
22393 #include <termios.h>
22394 int
22395 main (void)
22396 {
22397 struct termios foo; int x = foo.c_iflag = 1; (void)x
22398   ;
22399   return 0;
22400 }
22401 _ACEOF
22402 rm -f "conftest.$ac_objext"
22403 if { (eval echo "$as_me:22403: \"$ac_compile\"") >&5
22404   (eval $ac_compile) 2>&5
22405   ac_status=$?
22406   echo "$as_me:22406: \$? = $ac_status" >&5
22407   (exit "$ac_status"); } &&
22408          { ac_try='test -s "conftest.$ac_objext"'
22409   { (eval echo "$as_me:22409: \"$ac_try\"") >&5
22410   (eval $ac_try) 2>&5
22411   ac_status=$?
22412   echo "$as_me:22412: \$? = $ac_status" >&5
22413   (exit "$ac_status"); }; }; then
22414   termios_bad=no
22415 else
22416   echo "$as_me: failed program was:" >&5
22417 cat "conftest.$ac_ext" >&5
22418
22419                 cat >"conftest.$ac_ext" <<_ACEOF
22420 #line 22420 "configure"
22421 #include "confdefs.h"
22422
22423 #define _POSIX_SOURCE
22424 #include <termios.h>
22425 int
22426 main (void)
22427 {
22428 struct termios foo; int x = foo.c_iflag = 2; (void)x
22429   ;
22430   return 0;
22431 }
22432 _ACEOF
22433 rm -f "conftest.$ac_objext"
22434 if { (eval echo "$as_me:22434: \"$ac_compile\"") >&5
22435   (eval $ac_compile) 2>&5
22436   ac_status=$?
22437   echo "$as_me:22437: \$? = $ac_status" >&5
22438   (exit "$ac_status"); } &&
22439          { ac_try='test -s "conftest.$ac_objext"'
22440   { (eval echo "$as_me:22440: \"$ac_try\"") >&5
22441   (eval $ac_try) 2>&5
22442   ac_status=$?
22443   echo "$as_me:22443: \$? = $ac_status" >&5
22444   (exit "$ac_status"); }; }; then
22445   termios_bad=unknown
22446 else
22447   echo "$as_me: failed program was:" >&5
22448 cat "conftest.$ac_ext" >&5
22449 termios_bad=yes
22450 cat >>confdefs.h <<\EOF
22451 #define _POSIX_SOURCE 1
22452 EOF
22453
22454 fi
22455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22456
22457 fi
22458 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22459         echo "$as_me:22459: result: $termios_bad" >&5
22460 echo "${ECHO_T}$termios_bad" >&6
22461         fi
22462 fi
22463
22464 echo "$as_me:22464: checking for tcgetattr" >&5
22465 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22466 if test "${cf_cv_have_tcgetattr+set}" = set; then
22467   echo $ECHO_N "(cached) $ECHO_C" >&6
22468 else
22469
22470 cat >"conftest.$ac_ext" <<_ACEOF
22471 #line 22471 "configure"
22472 #include "confdefs.h"
22473
22474 #include <sys/types.h>
22475 #ifdef HAVE_UNISTD_H
22476 #include <unistd.h>
22477 #endif
22478 #ifdef HAVE_TERMIOS_H
22479 #include <termios.h>
22480 #define TTY struct termios
22481 #else
22482 #ifdef HAVE_TERMIO_H
22483 #include <termio.h>
22484 #define TTY struct termio
22485 #endif
22486 #endif
22487
22488 int
22489 main (void)
22490 {
22491
22492 TTY foo;
22493 tcgetattr(1, &foo);
22494   ;
22495   return 0;
22496 }
22497 _ACEOF
22498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22499 if { (eval echo "$as_me:22499: \"$ac_link\"") >&5
22500   (eval $ac_link) 2>&5
22501   ac_status=$?
22502   echo "$as_me:22502: \$? = $ac_status" >&5
22503   (exit "$ac_status"); } &&
22504          { ac_try='test -s "conftest$ac_exeext"'
22505   { (eval echo "$as_me:22505: \"$ac_try\"") >&5
22506   (eval $ac_try) 2>&5
22507   ac_status=$?
22508   echo "$as_me:22508: \$? = $ac_status" >&5
22509   (exit "$ac_status"); }; }; then
22510   cf_cv_have_tcgetattr=yes
22511 else
22512   echo "$as_me: failed program was:" >&5
22513 cat "conftest.$ac_ext" >&5
22514 cf_cv_have_tcgetattr=no
22515 fi
22516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22517 fi
22518 echo "$as_me:22518: result: $cf_cv_have_tcgetattr" >&5
22519 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22520 test "$cf_cv_have_tcgetattr" = yes &&
22521 cat >>confdefs.h <<\EOF
22522 #define HAVE_TCGETATTR 1
22523 EOF
22524
22525 echo "$as_me:22525: checking for vsscanf function or workaround" >&5
22526 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22527 if test "${cf_cv_func_vsscanf+set}" = set; then
22528   echo $ECHO_N "(cached) $ECHO_C" >&6
22529 else
22530
22531 cat >"conftest.$ac_ext" <<_ACEOF
22532 #line 22532 "configure"
22533 #include "confdefs.h"
22534
22535 #include <stdarg.h>
22536 #include <stdio.h>
22537 int
22538 main (void)
22539 {
22540
22541         va_list ap;
22542         vsscanf("from", "%d", ap)
22543   ;
22544   return 0;
22545 }
22546 _ACEOF
22547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22548 if { (eval echo "$as_me:22548: \"$ac_link\"") >&5
22549   (eval $ac_link) 2>&5
22550   ac_status=$?
22551   echo "$as_me:22551: \$? = $ac_status" >&5
22552   (exit "$ac_status"); } &&
22553          { ac_try='test -s "conftest$ac_exeext"'
22554   { (eval echo "$as_me:22554: \"$ac_try\"") >&5
22555   (eval $ac_try) 2>&5
22556   ac_status=$?
22557   echo "$as_me:22557: \$? = $ac_status" >&5
22558   (exit "$ac_status"); }; }; then
22559   cf_cv_func_vsscanf=vsscanf
22560 else
22561   echo "$as_me: failed program was:" >&5
22562 cat "conftest.$ac_ext" >&5
22563
22564 cat >"conftest.$ac_ext" <<_ACEOF
22565 #line 22565 "configure"
22566 #include "confdefs.h"
22567
22568 #include <stdarg.h>
22569 #include <stdio.h>
22570 int
22571 main (void)
22572 {
22573
22574         FILE strbuf;
22575         char *str = "from";
22576
22577         strbuf._flag = _IOREAD;
22578         strbuf._ptr = strbuf._base = (unsigned char *) str;
22579         strbuf._cnt = strlen(str);
22580         strbuf._file = _NFILE;
22581         return (vfscanf(&strbuf, "%d", ap))
22582   ;
22583   return 0;
22584 }
22585 _ACEOF
22586 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22587 if { (eval echo "$as_me:22587: \"$ac_link\"") >&5
22588   (eval $ac_link) 2>&5
22589   ac_status=$?
22590   echo "$as_me:22590: \$? = $ac_status" >&5
22591   (exit "$ac_status"); } &&
22592          { ac_try='test -s "conftest$ac_exeext"'
22593   { (eval echo "$as_me:22593: \"$ac_try\"") >&5
22594   (eval $ac_try) 2>&5
22595   ac_status=$?
22596   echo "$as_me:22596: \$? = $ac_status" >&5
22597   (exit "$ac_status"); }; }; then
22598   cf_cv_func_vsscanf=vfscanf
22599 else
22600   echo "$as_me: failed program was:" >&5
22601 cat "conftest.$ac_ext" >&5
22602
22603 cat >"conftest.$ac_ext" <<_ACEOF
22604 #line 22604 "configure"
22605 #include "confdefs.h"
22606
22607 #include <stdarg.h>
22608 #include <stdio.h>
22609 int
22610 main (void)
22611 {
22612
22613         FILE strbuf;
22614         char *str = "from";
22615
22616         strbuf._flag = _IOREAD;
22617         strbuf._ptr = strbuf._base = (unsigned char *) str;
22618         strbuf._cnt = strlen(str);
22619         strbuf._file = _NFILE;
22620         return (_doscan(&strbuf, "%d", ap))
22621   ;
22622   return 0;
22623 }
22624 _ACEOF
22625 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22626 if { (eval echo "$as_me:22626: \"$ac_link\"") >&5
22627   (eval $ac_link) 2>&5
22628   ac_status=$?
22629   echo "$as_me:22629: \$? = $ac_status" >&5
22630   (exit "$ac_status"); } &&
22631          { ac_try='test -s "conftest$ac_exeext"'
22632   { (eval echo "$as_me:22632: \"$ac_try\"") >&5
22633   (eval $ac_try) 2>&5
22634   ac_status=$?
22635   echo "$as_me:22635: \$? = $ac_status" >&5
22636   (exit "$ac_status"); }; }; then
22637   cf_cv_func_vsscanf=_doscan
22638 else
22639   echo "$as_me: failed program was:" >&5
22640 cat "conftest.$ac_ext" >&5
22641
22642 cf_cv_func_vsscanf=no
22643 fi
22644 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22645 fi
22646 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22647 fi
22648 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22649 fi
22650 echo "$as_me:22650: result: $cf_cv_func_vsscanf" >&5
22651 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22652
22653 case "$cf_cv_func_vsscanf" in
22654 (vsscanf)
22655 cat >>confdefs.h <<\EOF
22656 #define HAVE_VSSCANF 1
22657 EOF
22658 ;;
22659 (vfscanf)
22660 cat >>confdefs.h <<\EOF
22661 #define HAVE_VFSCANF 1
22662 EOF
22663 ;;
22664 (_doscan)
22665 cat >>confdefs.h <<\EOF
22666 #define HAVE__DOSCAN 1
22667 EOF
22668 ;;
22669 esac
22670
22671 for ac_header in \
22672 unistd.h \
22673
22674 do
22675 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22676 echo "$as_me:22676: checking for $ac_header" >&5
22677 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22678 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22679   echo $ECHO_N "(cached) $ECHO_C" >&6
22680 else
22681   cat >"conftest.$ac_ext" <<_ACEOF
22682 #line 22682 "configure"
22683 #include "confdefs.h"
22684 #include <$ac_header>
22685 _ACEOF
22686 if { (eval echo "$as_me:22686: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22687   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22688   ac_status=$?
22689   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22690   rm -f conftest.er1
22691   cat conftest.err >&5
22692   echo "$as_me:22692: \$? = $ac_status" >&5
22693   (exit "$ac_status"); } >/dev/null; then
22694   if test -s conftest.err; then
22695     ac_cpp_err=$ac_c_preproc_warn_flag
22696   else
22697     ac_cpp_err=
22698   fi
22699 else
22700   ac_cpp_err=yes
22701 fi
22702 if test -z "$ac_cpp_err"; then
22703   eval "$as_ac_Header=yes"
22704 else
22705   echo "$as_me: failed program was:" >&5
22706   cat "conftest.$ac_ext" >&5
22707   eval "$as_ac_Header=no"
22708 fi
22709 rm -f conftest.err "conftest.$ac_ext"
22710 fi
22711 echo "$as_me:22711: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22712 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22713 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22714   cat >>confdefs.h <<EOF
22715 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22716 EOF
22717
22718 fi
22719 done
22720
22721 echo "$as_me:22721: checking for working mkstemp" >&5
22722 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22723 if test "${cf_cv_func_mkstemp+set}" = set; then
22724   echo $ECHO_N "(cached) $ECHO_C" >&6
22725 else
22726
22727 rm -rf ./conftest*
22728 if test "$cross_compiling" = yes; then
22729   cf_cv_func_mkstemp=maybe
22730 else
22731   cat >"conftest.$ac_ext" <<_ACEOF
22732 #line 22732 "configure"
22733 #include "confdefs.h"
22734
22735 $ac_includes_default
22736
22737 int main(void)
22738 {
22739         char *tmpl = "conftestXXXXXX";
22740         char name[2][80];
22741         int n;
22742         int result = 0;
22743         int fd;
22744         struct stat sb;
22745
22746         umask(077);
22747         for (n = 0; n < 2; ++n) {
22748                 strcpy(name[n], tmpl);
22749                 if ((fd = mkstemp(name[n])) >= 0) {
22750                         if (!strcmp(name[n], tmpl)
22751                          || stat(name[n], &sb) != 0
22752                          || (sb.st_mode & S_IFMT) != S_IFREG
22753                          || (sb.st_mode & 077) != 0) {
22754                                 result = 1;
22755                         }
22756                         close(fd);
22757                 }
22758         }
22759         if (result == 0
22760          && !strcmp(name[0], name[1]))
22761                 result = 1;
22762         ${cf_cv_main_return:-return}(result);
22763 }
22764
22765 _ACEOF
22766 rm -f "conftest$ac_exeext"
22767 if { (eval echo "$as_me:22767: \"$ac_link\"") >&5
22768   (eval $ac_link) 2>&5
22769   ac_status=$?
22770   echo "$as_me:22770: \$? = $ac_status" >&5
22771   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22772   { (eval echo "$as_me:22772: \"$ac_try\"") >&5
22773   (eval $ac_try) 2>&5
22774   ac_status=$?
22775   echo "$as_me:22775: \$? = $ac_status" >&5
22776   (exit "$ac_status"); }; }; then
22777   cf_cv_func_mkstemp=yes
22778
22779 else
22780   echo "$as_me: program exited with status $ac_status" >&5
22781 echo "$as_me: failed program was:" >&5
22782 cat "conftest.$ac_ext" >&5
22783 cf_cv_func_mkstemp=no
22784
22785 fi
22786 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22787 fi
22788
22789 fi
22790 echo "$as_me:22790: result: $cf_cv_func_mkstemp" >&5
22791 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22792 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22793         echo "$as_me:22793: checking for mkstemp" >&5
22794 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22795 if test "${ac_cv_func_mkstemp+set}" = set; then
22796   echo $ECHO_N "(cached) $ECHO_C" >&6
22797 else
22798   cat >"conftest.$ac_ext" <<_ACEOF
22799 #line 22799 "configure"
22800 #include "confdefs.h"
22801 #define mkstemp autoconf_temporary
22802 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22803 #undef mkstemp
22804
22805 #ifdef __cplusplus
22806 extern "C"
22807 #endif
22808
22809 /* We use char because int might match the return type of a gcc2
22810    builtin and then its argument prototype would still apply.  */
22811 char mkstemp (void);
22812
22813 int
22814 main (void)
22815 {
22816
22817 /* The GNU C library defines stubs for functions which it implements
22818     to always fail with ENOSYS.  Some functions are actually named
22819     something starting with __ and the normal name is an alias.  */
22820 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22821 #error found stub for mkstemp
22822 #endif
22823
22824         return mkstemp ();
22825   ;
22826   return 0;
22827 }
22828 _ACEOF
22829 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22830 if { (eval echo "$as_me:22830: \"$ac_link\"") >&5
22831   (eval $ac_link) 2>&5
22832   ac_status=$?
22833   echo "$as_me:22833: \$? = $ac_status" >&5
22834   (exit "$ac_status"); } &&
22835          { ac_try='test -s "conftest$ac_exeext"'
22836   { (eval echo "$as_me:22836: \"$ac_try\"") >&5
22837   (eval $ac_try) 2>&5
22838   ac_status=$?
22839   echo "$as_me:22839: \$? = $ac_status" >&5
22840   (exit "$ac_status"); }; }; then
22841   ac_cv_func_mkstemp=yes
22842 else
22843   echo "$as_me: failed program was:" >&5
22844 cat "conftest.$ac_ext" >&5
22845 ac_cv_func_mkstemp=no
22846 fi
22847 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22848 fi
22849 echo "$as_me:22849: result: $ac_cv_func_mkstemp" >&5
22850 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22851
22852 fi
22853 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22854
22855 cat >>confdefs.h <<\EOF
22856 #define HAVE_MKSTEMP 1
22857 EOF
22858
22859 fi
22860
22861 # setup for prototype of fallback for vsscanf()
22862
22863 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22864         HAVE_VSSCANF=1
22865 else
22866         HAVE_VSSCANF=0
22867 fi
22868
22869 if test "x$cross_compiling" = xyes ; then
22870         { echo "$as_me:22870: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22871 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22872 else
22873         echo "$as_me:22873: checking whether setvbuf arguments are reversed" >&5
22874 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22875 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22876   echo $ECHO_N "(cached) $ECHO_C" >&6
22877 else
22878   if test "$cross_compiling" = yes; then
22879   { { echo "$as_me:22879: error: cannot run test program while cross compiling" >&5
22880 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22881    { (exit 1); exit 1; }; }
22882 else
22883   cat >"conftest.$ac_ext" <<_ACEOF
22884 #line 22884 "configure"
22885 #include "confdefs.h"
22886 #include <stdio.h>
22887 /* If setvbuf has the reversed format, exit 0. */
22888 int
22889 main (void)
22890 {
22891   /* This call has the arguments reversed.
22892      A reversed system may check and see that the address of main
22893      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22894   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22895     $ac_main_return(1);
22896   putc('\r', stdout);
22897   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22898 }
22899 _ACEOF
22900 rm -f "conftest$ac_exeext"
22901 if { (eval echo "$as_me:22901: \"$ac_link\"") >&5
22902   (eval $ac_link) 2>&5
22903   ac_status=$?
22904   echo "$as_me:22904: \$? = $ac_status" >&5
22905   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22906   { (eval echo "$as_me:22906: \"$ac_try\"") >&5
22907   (eval $ac_try) 2>&5
22908   ac_status=$?
22909   echo "$as_me:22909: \$? = $ac_status" >&5
22910   (exit "$ac_status"); }; }; then
22911   ac_cv_func_setvbuf_reversed=yes
22912 else
22913   echo "$as_me: program exited with status $ac_status" >&5
22914 echo "$as_me: failed program was:" >&5
22915 cat "conftest.$ac_ext" >&5
22916 ac_cv_func_setvbuf_reversed=no
22917 fi
22918 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22919 fi
22920 rm -f core ./core.* ./*.core
22921 fi
22922 echo "$as_me:22922: result: $ac_cv_func_setvbuf_reversed" >&5
22923 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22924 if test $ac_cv_func_setvbuf_reversed = yes; then
22925
22926 cat >>confdefs.h <<\EOF
22927 #define SETVBUF_REVERSED 1
22928 EOF
22929
22930 fi
22931
22932 fi
22933 echo "$as_me:22933: checking for intptr_t" >&5
22934 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22935 if test "${ac_cv_type_intptr_t+set}" = set; then
22936   echo $ECHO_N "(cached) $ECHO_C" >&6
22937 else
22938   cat >"conftest.$ac_ext" <<_ACEOF
22939 #line 22939 "configure"
22940 #include "confdefs.h"
22941 $ac_includes_default
22942 int
22943 main (void)
22944 {
22945 if ((intptr_t *) 0)
22946   return 0;
22947 if (sizeof (intptr_t))
22948   return 0;
22949   ;
22950   return 0;
22951 }
22952 _ACEOF
22953 rm -f "conftest.$ac_objext"
22954 if { (eval echo "$as_me:22954: \"$ac_compile\"") >&5
22955   (eval $ac_compile) 2>&5
22956   ac_status=$?
22957   echo "$as_me:22957: \$? = $ac_status" >&5
22958   (exit "$ac_status"); } &&
22959          { ac_try='test -s "conftest.$ac_objext"'
22960   { (eval echo "$as_me:22960: \"$ac_try\"") >&5
22961   (eval $ac_try) 2>&5
22962   ac_status=$?
22963   echo "$as_me:22963: \$? = $ac_status" >&5
22964   (exit "$ac_status"); }; }; then
22965   ac_cv_type_intptr_t=yes
22966 else
22967   echo "$as_me: failed program was:" >&5
22968 cat "conftest.$ac_ext" >&5
22969 ac_cv_type_intptr_t=no
22970 fi
22971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22972 fi
22973 echo "$as_me:22973: result: $ac_cv_type_intptr_t" >&5
22974 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22975 if test "$ac_cv_type_intptr_t" = yes; then
22976   :
22977 else
22978
22979 cat >>confdefs.h <<EOF
22980 #define intptr_t long
22981 EOF
22982
22983 fi
22984
22985 echo "$as_me:22985: checking for ssize_t" >&5
22986 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22987 if test "${ac_cv_type_ssize_t+set}" = set; then
22988   echo $ECHO_N "(cached) $ECHO_C" >&6
22989 else
22990   cat >"conftest.$ac_ext" <<_ACEOF
22991 #line 22991 "configure"
22992 #include "confdefs.h"
22993 $ac_includes_default
22994 int
22995 main (void)
22996 {
22997 if ((ssize_t *) 0)
22998   return 0;
22999 if (sizeof (ssize_t))
23000   return 0;
23001   ;
23002   return 0;
23003 }
23004 _ACEOF
23005 rm -f "conftest.$ac_objext"
23006 if { (eval echo "$as_me:23006: \"$ac_compile\"") >&5
23007   (eval $ac_compile) 2>&5
23008   ac_status=$?
23009   echo "$as_me:23009: \$? = $ac_status" >&5
23010   (exit "$ac_status"); } &&
23011          { ac_try='test -s "conftest.$ac_objext"'
23012   { (eval echo "$as_me:23012: \"$ac_try\"") >&5
23013   (eval $ac_try) 2>&5
23014   ac_status=$?
23015   echo "$as_me:23015: \$? = $ac_status" >&5
23016   (exit "$ac_status"); }; }; then
23017   ac_cv_type_ssize_t=yes
23018 else
23019   echo "$as_me: failed program was:" >&5
23020 cat "conftest.$ac_ext" >&5
23021 ac_cv_type_ssize_t=no
23022 fi
23023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23024 fi
23025 echo "$as_me:23025: result: $ac_cv_type_ssize_t" >&5
23026 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23027 if test "$ac_cv_type_ssize_t" = yes; then
23028   :
23029 else
23030
23031 cat >>confdefs.h <<EOF
23032 #define ssize_t int
23033 EOF
23034
23035 fi
23036
23037 echo "$as_me:23037: checking for type sigaction_t" >&5
23038 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23039 if test "${cf_cv_type_sigaction+set}" = set; then
23040   echo $ECHO_N "(cached) $ECHO_C" >&6
23041 else
23042
23043         cat >"conftest.$ac_ext" <<_ACEOF
23044 #line 23044 "configure"
23045 #include "confdefs.h"
23046
23047 #include <signal.h>
23048 int
23049 main (void)
23050 {
23051 sigaction_t x
23052   ;
23053   return 0;
23054 }
23055 _ACEOF
23056 rm -f "conftest.$ac_objext"
23057 if { (eval echo "$as_me:23057: \"$ac_compile\"") >&5
23058   (eval $ac_compile) 2>&5
23059   ac_status=$?
23060   echo "$as_me:23060: \$? = $ac_status" >&5
23061   (exit "$ac_status"); } &&
23062          { ac_try='test -s "conftest.$ac_objext"'
23063   { (eval echo "$as_me:23063: \"$ac_try\"") >&5
23064   (eval $ac_try) 2>&5
23065   ac_status=$?
23066   echo "$as_me:23066: \$? = $ac_status" >&5
23067   (exit "$ac_status"); }; }; then
23068   cf_cv_type_sigaction=yes
23069 else
23070   echo "$as_me: failed program was:" >&5
23071 cat "conftest.$ac_ext" >&5
23072 cf_cv_type_sigaction=no
23073 fi
23074 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23075 fi
23076
23077 echo "$as_me:23077: result: $cf_cv_type_sigaction" >&5
23078 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23079 test "$cf_cv_type_sigaction" = yes &&
23080 cat >>confdefs.h <<\EOF
23081 #define HAVE_TYPE_SIGACTION 1
23082 EOF
23083
23084 echo "$as_me:23084: checking declaration of size-change" >&5
23085 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23086 if test "${cf_cv_sizechange+set}" = set; then
23087   echo $ECHO_N "(cached) $ECHO_C" >&6
23088 else
23089
23090         cf_cv_sizechange=unknown
23091         cf_save_CPPFLAGS="$CPPFLAGS"
23092
23093 for cf_opts in "" "NEED_PTEM_H"
23094 do
23095
23096         CPPFLAGS="$cf_save_CPPFLAGS"
23097         if test -n "$cf_opts"
23098         then
23099
23100         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23101         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23102
23103         fi
23104         cat >"conftest.$ac_ext" <<_ACEOF
23105 #line 23105 "configure"
23106 #include "confdefs.h"
23107 #include <sys/types.h>
23108 #ifdef HAVE_TERMIOS_H
23109 #include <termios.h>
23110 #else
23111 #ifdef HAVE_TERMIO_H
23112 #include <termio.h>
23113 #endif
23114 #endif
23115
23116 #ifdef NEED_PTEM_H
23117 /* This is a workaround for SCO:  they neglected to define struct winsize in
23118  * termios.h -- it is only in termio.h and ptem.h
23119  */
23120 #include <sys/stream.h>
23121 #include <sys/ptem.h>
23122 #endif
23123
23124 #ifdef HAVE_SYS_IOCTL_H
23125 #include <sys/ioctl.h>
23126 #endif
23127
23128 int
23129 main (void)
23130 {
23131
23132 #ifdef TIOCGSIZE
23133         struct ttysize win;     /* SunOS 3.0... */
23134         int y = win.ts_lines = 2;
23135         int x = win.ts_cols = 1;
23136         (void)y;
23137         (void)x;
23138 #else
23139 #ifdef TIOCGWINSZ
23140         struct winsize win;     /* everything else */
23141         int y = win.ws_row = 2;
23142         int x = win.ws_col = 1;
23143         (void)y;
23144         (void)x;
23145 #else
23146         no TIOCGSIZE or TIOCGWINSZ
23147 #endif /* TIOCGWINSZ */
23148 #endif /* TIOCGSIZE */
23149
23150   ;
23151   return 0;
23152 }
23153 _ACEOF
23154 rm -f "conftest.$ac_objext"
23155 if { (eval echo "$as_me:23155: \"$ac_compile\"") >&5
23156   (eval $ac_compile) 2>&5
23157   ac_status=$?
23158   echo "$as_me:23158: \$? = $ac_status" >&5
23159   (exit "$ac_status"); } &&
23160          { ac_try='test -s "conftest.$ac_objext"'
23161   { (eval echo "$as_me:23161: \"$ac_try\"") >&5
23162   (eval $ac_try) 2>&5
23163   ac_status=$?
23164   echo "$as_me:23164: \$? = $ac_status" >&5
23165   (exit "$ac_status"); }; }; then
23166   cf_cv_sizechange=yes
23167 else
23168   echo "$as_me: failed program was:" >&5
23169 cat "conftest.$ac_ext" >&5
23170 cf_cv_sizechange=no
23171 fi
23172 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23173
23174         CPPFLAGS="$cf_save_CPPFLAGS"
23175         if test "$cf_cv_sizechange" = yes ; then
23176                 echo "size-change succeeded ($cf_opts)" >&5
23177                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23178                 break
23179         fi
23180 done
23181
23182 fi
23183 echo "$as_me:23183: result: $cf_cv_sizechange" >&5
23184 echo "${ECHO_T}$cf_cv_sizechange" >&6
23185 if test "$cf_cv_sizechange" != no ; then
23186
23187 cat >>confdefs.h <<\EOF
23188 #define HAVE_SIZECHANGE 1
23189 EOF
23190
23191         case "$cf_cv_sizechange" in
23192         (NEED*)
23193                 cat >>confdefs.h <<EOF
23194 #define $cf_cv_sizechange  1
23195 EOF
23196
23197                 ;;
23198         esac
23199 fi
23200
23201 echo "$as_me:23201: checking for memmove" >&5
23202 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23203 if test "${ac_cv_func_memmove+set}" = set; then
23204   echo $ECHO_N "(cached) $ECHO_C" >&6
23205 else
23206   cat >"conftest.$ac_ext" <<_ACEOF
23207 #line 23207 "configure"
23208 #include "confdefs.h"
23209 #define memmove autoconf_temporary
23210 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23211 #undef memmove
23212
23213 #ifdef __cplusplus
23214 extern "C"
23215 #endif
23216
23217 /* We use char because int might match the return type of a gcc2
23218    builtin and then its argument prototype would still apply.  */
23219 char memmove (void);
23220
23221 int
23222 main (void)
23223 {
23224
23225 /* The GNU C library defines stubs for functions which it implements
23226     to always fail with ENOSYS.  Some functions are actually named
23227     something starting with __ and the normal name is an alias.  */
23228 #if defined (__stub_memmove) || defined (__stub___memmove)
23229 #error found stub for memmove
23230 #endif
23231
23232         return memmove ();
23233   ;
23234   return 0;
23235 }
23236 _ACEOF
23237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23238 if { (eval echo "$as_me:23238: \"$ac_link\"") >&5
23239   (eval $ac_link) 2>&5
23240   ac_status=$?
23241   echo "$as_me:23241: \$? = $ac_status" >&5
23242   (exit "$ac_status"); } &&
23243          { ac_try='test -s "conftest$ac_exeext"'
23244   { (eval echo "$as_me:23244: \"$ac_try\"") >&5
23245   (eval $ac_try) 2>&5
23246   ac_status=$?
23247   echo "$as_me:23247: \$? = $ac_status" >&5
23248   (exit "$ac_status"); }; }; then
23249   ac_cv_func_memmove=yes
23250 else
23251   echo "$as_me: failed program was:" >&5
23252 cat "conftest.$ac_ext" >&5
23253 ac_cv_func_memmove=no
23254 fi
23255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23256 fi
23257 echo "$as_me:23257: result: $ac_cv_func_memmove" >&5
23258 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23259 if test "$ac_cv_func_memmove" = yes; then
23260   :
23261 else
23262
23263 echo "$as_me:23263: checking for bcopy" >&5
23264 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23265 if test "${ac_cv_func_bcopy+set}" = set; then
23266   echo $ECHO_N "(cached) $ECHO_C" >&6
23267 else
23268   cat >"conftest.$ac_ext" <<_ACEOF
23269 #line 23269 "configure"
23270 #include "confdefs.h"
23271 #define bcopy autoconf_temporary
23272 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23273 #undef bcopy
23274
23275 #ifdef __cplusplus
23276 extern "C"
23277 #endif
23278
23279 /* We use char because int might match the return type of a gcc2
23280    builtin and then its argument prototype would still apply.  */
23281 char bcopy (void);
23282
23283 int
23284 main (void)
23285 {
23286
23287 /* The GNU C library defines stubs for functions which it implements
23288     to always fail with ENOSYS.  Some functions are actually named
23289     something starting with __ and the normal name is an alias.  */
23290 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23291 #error found stub for bcopy
23292 #endif
23293
23294         return bcopy ();
23295   ;
23296   return 0;
23297 }
23298 _ACEOF
23299 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23300 if { (eval echo "$as_me:23300: \"$ac_link\"") >&5
23301   (eval $ac_link) 2>&5
23302   ac_status=$?
23303   echo "$as_me:23303: \$? = $ac_status" >&5
23304   (exit "$ac_status"); } &&
23305          { ac_try='test -s "conftest$ac_exeext"'
23306   { (eval echo "$as_me:23306: \"$ac_try\"") >&5
23307   (eval $ac_try) 2>&5
23308   ac_status=$?
23309   echo "$as_me:23309: \$? = $ac_status" >&5
23310   (exit "$ac_status"); }; }; then
23311   ac_cv_func_bcopy=yes
23312 else
23313   echo "$as_me: failed program was:" >&5
23314 cat "conftest.$ac_ext" >&5
23315 ac_cv_func_bcopy=no
23316 fi
23317 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23318 fi
23319 echo "$as_me:23319: result: $ac_cv_func_bcopy" >&5
23320 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23321 if test "$ac_cv_func_bcopy" = yes; then
23322
23323         echo "$as_me:23323: checking if bcopy does overlapping moves" >&5
23324 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23325 if test "${cf_cv_good_bcopy+set}" = set; then
23326   echo $ECHO_N "(cached) $ECHO_C" >&6
23327 else
23328
23329                 if test "$cross_compiling" = yes; then
23330   cf_cv_good_bcopy=unknown
23331 else
23332   cat >"conftest.$ac_ext" <<_ACEOF
23333 #line 23333 "configure"
23334 #include "confdefs.h"
23335
23336 $ac_includes_default
23337
23338 int main(void) {
23339         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23340         char temp[40];
23341         bcopy(data, temp, sizeof(data));
23342         bcopy(temp+10, temp, 15);
23343         bcopy(temp+5, temp+15, 10);
23344         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23345 }
23346
23347 _ACEOF
23348 rm -f "conftest$ac_exeext"
23349 if { (eval echo "$as_me:23349: \"$ac_link\"") >&5
23350   (eval $ac_link) 2>&5
23351   ac_status=$?
23352   echo "$as_me:23352: \$? = $ac_status" >&5
23353   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23354   { (eval echo "$as_me:23354: \"$ac_try\"") >&5
23355   (eval $ac_try) 2>&5
23356   ac_status=$?
23357   echo "$as_me:23357: \$? = $ac_status" >&5
23358   (exit "$ac_status"); }; }; then
23359   cf_cv_good_bcopy=yes
23360 else
23361   echo "$as_me: program exited with status $ac_status" >&5
23362 echo "$as_me: failed program was:" >&5
23363 cat "conftest.$ac_ext" >&5
23364 cf_cv_good_bcopy=no
23365 fi
23366 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23367 fi
23368
23369 fi
23370 echo "$as_me:23370: result: $cf_cv_good_bcopy" >&5
23371 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23372
23373 else
23374   cf_cv_good_bcopy=no
23375 fi
23376
23377         if test "$cf_cv_good_bcopy" = yes ; then
23378
23379 cat >>confdefs.h <<\EOF
23380 #define USE_OK_BCOPY 1
23381 EOF
23382
23383         else
23384
23385 cat >>confdefs.h <<\EOF
23386 #define USE_MY_MEMMOVE 1
23387 EOF
23388
23389         fi
23390
23391 fi
23392
23393 tty >/dev/null 2>&1 || {
23394 for ac_func in posix_openpt
23395 do
23396 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23397 echo "$as_me:23397: checking for $ac_func" >&5
23398 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23399 if eval "test \"\${$as_ac_var+set}\" = set"; then
23400   echo $ECHO_N "(cached) $ECHO_C" >&6
23401 else
23402   cat >"conftest.$ac_ext" <<_ACEOF
23403 #line 23403 "configure"
23404 #include "confdefs.h"
23405 #define $ac_func autoconf_temporary
23406 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23407 #undef $ac_func
23408
23409 #ifdef __cplusplus
23410 extern "C"
23411 #endif
23412
23413 /* We use char because int might match the return type of a gcc2
23414    builtin and then its argument prototype would still apply.  */
23415 char $ac_func (void);
23416
23417 int
23418 main (void)
23419 {
23420
23421 /* The GNU C library defines stubs for functions which it implements
23422     to always fail with ENOSYS.  Some functions are actually named
23423     something starting with __ and the normal name is an alias.  */
23424 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23425 #error found stub for $ac_func
23426 #endif
23427
23428         return $ac_func ();
23429   ;
23430   return 0;
23431 }
23432 _ACEOF
23433 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23434 if { (eval echo "$as_me:23434: \"$ac_link\"") >&5
23435   (eval $ac_link) 2>&5
23436   ac_status=$?
23437   echo "$as_me:23437: \$? = $ac_status" >&5
23438   (exit "$ac_status"); } &&
23439          { ac_try='test -s "conftest$ac_exeext"'
23440   { (eval echo "$as_me:23440: \"$ac_try\"") >&5
23441   (eval $ac_try) 2>&5
23442   ac_status=$?
23443   echo "$as_me:23443: \$? = $ac_status" >&5
23444   (exit "$ac_status"); }; }; then
23445   eval "$as_ac_var=yes"
23446 else
23447   echo "$as_me: failed program was:" >&5
23448 cat "conftest.$ac_ext" >&5
23449 eval "$as_ac_var=no"
23450 fi
23451 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23452 fi
23453 echo "$as_me:23453: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23454 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23455 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23456   cat >>confdefs.h <<EOF
23457 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23458 EOF
23459
23460 fi
23461 done
23462  }
23463 echo "$as_me:23463: checking if poll really works" >&5
23464 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23465 if test "${cf_cv_working_poll+set}" = set; then
23466   echo $ECHO_N "(cached) $ECHO_C" >&6
23467 else
23468
23469 if test "$cross_compiling" = yes; then
23470   cf_cv_working_poll=unknown
23471 else
23472   cat >"conftest.$ac_ext" <<_ACEOF
23473 #line 23473 "configure"
23474 #include "confdefs.h"
23475
23476 $ac_includes_default
23477
23478 #include <fcntl.h>
23479
23480 #ifdef HAVE_POLL_H
23481 #include <poll.h>
23482 #else
23483 #include <sys/poll.h>
23484 #endif
23485
23486 int main(void) {
23487         struct pollfd myfds;
23488         int ret;
23489
23490         /* check for Darwin bug with respect to "devices" */
23491         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23492         if (myfds.fd < 0)
23493                 myfds.fd = 0;
23494         myfds.events = POLLIN;
23495         myfds.revents = 0;
23496
23497         ret = poll(&myfds, 1, 100);
23498
23499         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23500                 ret = -1;
23501         } else {
23502                 int fd = 0;
23503                 if (!isatty(fd)) {
23504                         fd = open("/dev/tty", 2);       /* O_RDWR */
23505                 }
23506 #ifdef HAVE_POSIX_OPENPT
23507                 if (fd < 0) {
23508                         fd = posix_openpt(O_RDWR);
23509                 }
23510 #endif
23511
23512                 if (fd >= 0) {
23513                         /* also check with standard input */
23514                         myfds.fd = fd;
23515                         myfds.events = POLLIN;
23516                         myfds.revents = 0;
23517                         ret = poll(&myfds, 1, 100);
23518                 } else {
23519                         ret = -1;
23520                 }
23521         }
23522         ${cf_cv_main_return:-return}(ret < 0);
23523 }
23524 _ACEOF
23525 rm -f "conftest$ac_exeext"
23526 if { (eval echo "$as_me:23526: \"$ac_link\"") >&5
23527   (eval $ac_link) 2>&5
23528   ac_status=$?
23529   echo "$as_me:23529: \$? = $ac_status" >&5
23530   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23531   { (eval echo "$as_me:23531: \"$ac_try\"") >&5
23532   (eval $ac_try) 2>&5
23533   ac_status=$?
23534   echo "$as_me:23534: \$? = $ac_status" >&5
23535   (exit "$ac_status"); }; }; then
23536   cf_cv_working_poll=yes
23537 else
23538   echo "$as_me: program exited with status $ac_status" >&5
23539 echo "$as_me: failed program was:" >&5
23540 cat "conftest.$ac_ext" >&5
23541 cf_cv_working_poll=no
23542 fi
23543 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23544 fi
23545 fi
23546 echo "$as_me:23546: result: $cf_cv_working_poll" >&5
23547 echo "${ECHO_T}$cf_cv_working_poll" >&6
23548 test "$cf_cv_working_poll" = "yes" &&
23549 cat >>confdefs.h <<\EOF
23550 #define HAVE_WORKING_POLL 1
23551 EOF
23552
23553 echo "$as_me:23553: checking for va_copy" >&5
23554 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23555 if test "${cf_cv_have_va_copy+set}" = set; then
23556   echo $ECHO_N "(cached) $ECHO_C" >&6
23557 else
23558
23559 cat >"conftest.$ac_ext" <<_ACEOF
23560 #line 23560 "configure"
23561 #include "confdefs.h"
23562
23563 #include <stdarg.h>
23564
23565 int
23566 main (void)
23567 {
23568
23569         static va_list dst;
23570         static va_list src;
23571         va_copy(dst, src)
23572   ;
23573   return 0;
23574 }
23575 _ACEOF
23576 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23577 if { (eval echo "$as_me:23577: \"$ac_link\"") >&5
23578   (eval $ac_link) 2>&5
23579   ac_status=$?
23580   echo "$as_me:23580: \$? = $ac_status" >&5
23581   (exit "$ac_status"); } &&
23582          { ac_try='test -s "conftest$ac_exeext"'
23583   { (eval echo "$as_me:23583: \"$ac_try\"") >&5
23584   (eval $ac_try) 2>&5
23585   ac_status=$?
23586   echo "$as_me:23586: \$? = $ac_status" >&5
23587   (exit "$ac_status"); }; }; then
23588   cf_cv_have_va_copy=yes
23589 else
23590   echo "$as_me: failed program was:" >&5
23591 cat "conftest.$ac_ext" >&5
23592 cf_cv_have_va_copy=no
23593 fi
23594 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23595 fi
23596 echo "$as_me:23596: result: $cf_cv_have_va_copy" >&5
23597 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23598
23599 if test "$cf_cv_have_va_copy" = yes;
23600 then
23601
23602 cat >>confdefs.h <<\EOF
23603 #define HAVE_VA_COPY 1
23604 EOF
23605
23606 else # !cf_cv_have_va_copy
23607
23608 echo "$as_me:23608: checking for __va_copy" >&5
23609 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23610 if test "${cf_cv_have___va_copy+set}" = set; then
23611   echo $ECHO_N "(cached) $ECHO_C" >&6
23612 else
23613
23614 cat >"conftest.$ac_ext" <<_ACEOF
23615 #line 23615 "configure"
23616 #include "confdefs.h"
23617
23618 #include <stdarg.h>
23619
23620 int
23621 main (void)
23622 {
23623
23624         static va_list dst;
23625         static va_list src;
23626         __va_copy(dst, src)
23627   ;
23628   return 0;
23629 }
23630 _ACEOF
23631 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23632 if { (eval echo "$as_me:23632: \"$ac_link\"") >&5
23633   (eval $ac_link) 2>&5
23634   ac_status=$?
23635   echo "$as_me:23635: \$? = $ac_status" >&5
23636   (exit "$ac_status"); } &&
23637          { ac_try='test -s "conftest$ac_exeext"'
23638   { (eval echo "$as_me:23638: \"$ac_try\"") >&5
23639   (eval $ac_try) 2>&5
23640   ac_status=$?
23641   echo "$as_me:23641: \$? = $ac_status" >&5
23642   (exit "$ac_status"); }; }; then
23643   cf_cv_have___va_copy=yes
23644 else
23645   echo "$as_me: failed program was:" >&5
23646 cat "conftest.$ac_ext" >&5
23647 cf_cv_have___va_copy=no
23648 fi
23649 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23650 fi
23651 echo "$as_me:23651: result: $cf_cv_have___va_copy" >&5
23652 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23653
23654 if test "$cf_cv_have___va_copy" = yes
23655 then
23656
23657 cat >>confdefs.h <<\EOF
23658 #define HAVE___VA_COPY 1
23659 EOF
23660
23661 else # !cf_cv_have___va_copy
23662
23663 echo "$as_me:23663: checking for __builtin_va_copy" >&5
23664 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23665 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23666   echo $ECHO_N "(cached) $ECHO_C" >&6
23667 else
23668
23669 cat >"conftest.$ac_ext" <<_ACEOF
23670 #line 23670 "configure"
23671 #include "confdefs.h"
23672
23673 #include <stdarg.h>
23674
23675 int
23676 main (void)
23677 {
23678
23679         static va_list dst;
23680         static va_list src;
23681         __builtin_va_copy(dst, src)
23682   ;
23683   return 0;
23684 }
23685 _ACEOF
23686 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23687 if { (eval echo "$as_me:23687: \"$ac_link\"") >&5
23688   (eval $ac_link) 2>&5
23689   ac_status=$?
23690   echo "$as_me:23690: \$? = $ac_status" >&5
23691   (exit "$ac_status"); } &&
23692          { ac_try='test -s "conftest$ac_exeext"'
23693   { (eval echo "$as_me:23693: \"$ac_try\"") >&5
23694   (eval $ac_try) 2>&5
23695   ac_status=$?
23696   echo "$as_me:23696: \$? = $ac_status" >&5
23697   (exit "$ac_status"); }; }; then
23698   cf_cv_have___builtin_va_copy=yes
23699 else
23700   echo "$as_me: failed program was:" >&5
23701 cat "conftest.$ac_ext" >&5
23702 cf_cv_have___builtin_va_copy=no
23703 fi
23704 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23705 fi
23706 echo "$as_me:23706: result: $cf_cv_have___builtin_va_copy" >&5
23707 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23708
23709 test "$cf_cv_have___builtin_va_copy" = yes &&
23710
23711 cat >>confdefs.h <<\EOF
23712 #define HAVE___BUILTIN_VA_COPY 1
23713 EOF
23714
23715 fi # cf_cv_have___va_copy
23716
23717 fi # cf_cv_have_va_copy
23718
23719 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23720 (*yes*)
23721         ;;
23722
23723 (*)
23724         echo "$as_me:23724: checking if we can simply copy va_list" >&5
23725 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23726 if test "${cf_cv_pointer_va_list+set}" = set; then
23727   echo $ECHO_N "(cached) $ECHO_C" >&6
23728 else
23729
23730 cat >"conftest.$ac_ext" <<_ACEOF
23731 #line 23731 "configure"
23732 #include "confdefs.h"
23733
23734 #include <stdarg.h>
23735
23736 int
23737 main (void)
23738 {
23739
23740         va_list dst;
23741         va_list src;
23742         dst = src
23743   ;
23744   return 0;
23745 }
23746 _ACEOF
23747 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23748 if { (eval echo "$as_me:23748: \"$ac_link\"") >&5
23749   (eval $ac_link) 2>&5
23750   ac_status=$?
23751   echo "$as_me:23751: \$? = $ac_status" >&5
23752   (exit "$ac_status"); } &&
23753          { ac_try='test -s "conftest$ac_exeext"'
23754   { (eval echo "$as_me:23754: \"$ac_try\"") >&5
23755   (eval $ac_try) 2>&5
23756   ac_status=$?
23757   echo "$as_me:23757: \$? = $ac_status" >&5
23758   (exit "$ac_status"); }; }; then
23759   cf_cv_pointer_va_list=yes
23760 else
23761   echo "$as_me: failed program was:" >&5
23762 cat "conftest.$ac_ext" >&5
23763 cf_cv_pointer_va_list=no
23764 fi
23765 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23766 fi
23767 echo "$as_me:23767: result: $cf_cv_pointer_va_list" >&5
23768 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23769
23770         if test "$cf_cv_pointer_va_list" = no
23771         then
23772                 echo "$as_me:23772: checking if we can copy va_list indirectly" >&5
23773 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23774 if test "${cf_cv_array_va_list+set}" = set; then
23775   echo $ECHO_N "(cached) $ECHO_C" >&6
23776 else
23777
23778 cat >"conftest.$ac_ext" <<_ACEOF
23779 #line 23779 "configure"
23780 #include "confdefs.h"
23781
23782 #include <stdarg.h>
23783
23784 int
23785 main (void)
23786 {
23787
23788         va_list dst;
23789         va_list src;
23790         *dst = *src
23791   ;
23792   return 0;
23793 }
23794 _ACEOF
23795 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23796 if { (eval echo "$as_me:23796: \"$ac_link\"") >&5
23797   (eval $ac_link) 2>&5
23798   ac_status=$?
23799   echo "$as_me:23799: \$? = $ac_status" >&5
23800   (exit "$ac_status"); } &&
23801          { ac_try='test -s "conftest$ac_exeext"'
23802   { (eval echo "$as_me:23802: \"$ac_try\"") >&5
23803   (eval $ac_try) 2>&5
23804   ac_status=$?
23805   echo "$as_me:23805: \$? = $ac_status" >&5
23806   (exit "$ac_status"); }; }; then
23807   cf_cv_array_va_list=yes
23808 else
23809   echo "$as_me: failed program was:" >&5
23810 cat "conftest.$ac_ext" >&5
23811 cf_cv_array_va_list=no
23812 fi
23813 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23814 fi
23815 echo "$as_me:23815: result: $cf_cv_array_va_list" >&5
23816 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23817                 test "$cf_cv_array_va_list" = yes &&
23818 cat >>confdefs.h <<\EOF
23819 #define ARRAY_VA_LIST 1
23820 EOF
23821
23822         fi
23823         ;;
23824 esac
23825
23826 echo "$as_me:23826: checking for pid_t" >&5
23827 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23828 if test "${ac_cv_type_pid_t+set}" = set; then
23829   echo $ECHO_N "(cached) $ECHO_C" >&6
23830 else
23831   cat >"conftest.$ac_ext" <<_ACEOF
23832 #line 23832 "configure"
23833 #include "confdefs.h"
23834 $ac_includes_default
23835 int
23836 main (void)
23837 {
23838 if ((pid_t *) 0)
23839   return 0;
23840 if (sizeof (pid_t))
23841   return 0;
23842   ;
23843   return 0;
23844 }
23845 _ACEOF
23846 rm -f "conftest.$ac_objext"
23847 if { (eval echo "$as_me:23847: \"$ac_compile\"") >&5
23848   (eval $ac_compile) 2>&5
23849   ac_status=$?
23850   echo "$as_me:23850: \$? = $ac_status" >&5
23851   (exit "$ac_status"); } &&
23852          { ac_try='test -s "conftest.$ac_objext"'
23853   { (eval echo "$as_me:23853: \"$ac_try\"") >&5
23854   (eval $ac_try) 2>&5
23855   ac_status=$?
23856   echo "$as_me:23856: \$? = $ac_status" >&5
23857   (exit "$ac_status"); }; }; then
23858   ac_cv_type_pid_t=yes
23859 else
23860   echo "$as_me: failed program was:" >&5
23861 cat "conftest.$ac_ext" >&5
23862 ac_cv_type_pid_t=no
23863 fi
23864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23865 fi
23866 echo "$as_me:23866: result: $ac_cv_type_pid_t" >&5
23867 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23868 if test "$ac_cv_type_pid_t" = yes; then
23869   :
23870 else
23871
23872 cat >>confdefs.h <<EOF
23873 #define pid_t int
23874 EOF
23875
23876 fi
23877
23878 for ac_header in unistd.h vfork.h
23879 do
23880 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23881 echo "$as_me:23881: checking for $ac_header" >&5
23882 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23883 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23884   echo $ECHO_N "(cached) $ECHO_C" >&6
23885 else
23886   cat >"conftest.$ac_ext" <<_ACEOF
23887 #line 23887 "configure"
23888 #include "confdefs.h"
23889 #include <$ac_header>
23890 _ACEOF
23891 if { (eval echo "$as_me:23891: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23892   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23893   ac_status=$?
23894   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23895   rm -f conftest.er1
23896   cat conftest.err >&5
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); } >/dev/null; then
23899   if test -s conftest.err; then
23900     ac_cpp_err=$ac_c_preproc_warn_flag
23901   else
23902     ac_cpp_err=
23903   fi
23904 else
23905   ac_cpp_err=yes
23906 fi
23907 if test -z "$ac_cpp_err"; then
23908   eval "$as_ac_Header=yes"
23909 else
23910   echo "$as_me: failed program was:" >&5
23911   cat "conftest.$ac_ext" >&5
23912   eval "$as_ac_Header=no"
23913 fi
23914 rm -f conftest.err "conftest.$ac_ext"
23915 fi
23916 echo "$as_me:23916: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23917 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23918 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23919   cat >>confdefs.h <<EOF
23920 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23921 EOF
23922
23923 fi
23924 done
23925
23926 for ac_func in fork vfork
23927 do
23928 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23929 echo "$as_me:23929: checking for $ac_func" >&5
23930 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23931 if eval "test \"\${$as_ac_var+set}\" = set"; then
23932   echo $ECHO_N "(cached) $ECHO_C" >&6
23933 else
23934   cat >"conftest.$ac_ext" <<_ACEOF
23935 #line 23935 "configure"
23936 #include "confdefs.h"
23937 #define $ac_func autoconf_temporary
23938 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23939 #undef $ac_func
23940
23941 #ifdef __cplusplus
23942 extern "C"
23943 #endif
23944
23945 /* We use char because int might match the return type of a gcc2
23946    builtin and then its argument prototype would still apply.  */
23947 char $ac_func (void);
23948
23949 int
23950 main (void)
23951 {
23952
23953 /* The GNU C library defines stubs for functions which it implements
23954     to always fail with ENOSYS.  Some functions are actually named
23955     something starting with __ and the normal name is an alias.  */
23956 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23957 #error found stub for $ac_func
23958 #endif
23959
23960         return $ac_func ();
23961   ;
23962   return 0;
23963 }
23964 _ACEOF
23965 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23966 if { (eval echo "$as_me:23966: \"$ac_link\"") >&5
23967   (eval $ac_link) 2>&5
23968   ac_status=$?
23969   echo "$as_me:23969: \$? = $ac_status" >&5
23970   (exit "$ac_status"); } &&
23971          { ac_try='test -s "conftest$ac_exeext"'
23972   { (eval echo "$as_me:23972: \"$ac_try\"") >&5
23973   (eval $ac_try) 2>&5
23974   ac_status=$?
23975   echo "$as_me:23975: \$? = $ac_status" >&5
23976   (exit "$ac_status"); }; }; then
23977   eval "$as_ac_var=yes"
23978 else
23979   echo "$as_me: failed program was:" >&5
23980 cat "conftest.$ac_ext" >&5
23981 eval "$as_ac_var=no"
23982 fi
23983 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23984 fi
23985 echo "$as_me:23985: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23986 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23987 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23988   cat >>confdefs.h <<EOF
23989 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23990 EOF
23991
23992 fi
23993 done
23994
23995 ac_cv_func_fork_works=$ac_cv_func_fork
23996 if test "x$ac_cv_func_fork" = xyes; then
23997   echo "$as_me:23997: checking for working fork" >&5
23998 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23999 if test "${ac_cv_func_fork_works+set}" = set; then
24000   echo $ECHO_N "(cached) $ECHO_C" >&6
24001 else
24002   if test "$cross_compiling" = yes; then
24003   ac_cv_func_fork_works=cross
24004 else
24005   cat >"conftest.$ac_ext" <<_ACEOF
24006 /* By Rüdiger Kuhlmann. */
24007       #include <sys/types.h>
24008       #if HAVE_UNISTD_H
24009       # include <unistd.h>
24010       #endif
24011       /* Some systems only have a dummy stub for fork() */
24012       int main (void)
24013       {
24014         if (fork() < 0)
24015           $ac_main_return (1);
24016         $ac_main_return (0);
24017       }
24018 _ACEOF
24019 rm -f "conftest$ac_exeext"
24020 if { (eval echo "$as_me:24020: \"$ac_link\"") >&5
24021   (eval $ac_link) 2>&5
24022   ac_status=$?
24023   echo "$as_me:24023: \$? = $ac_status" >&5
24024   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24025   { (eval echo "$as_me:24025: \"$ac_try\"") >&5
24026   (eval $ac_try) 2>&5
24027   ac_status=$?
24028   echo "$as_me:24028: \$? = $ac_status" >&5
24029   (exit "$ac_status"); }; }; then
24030   ac_cv_func_fork_works=yes
24031 else
24032   echo "$as_me: program exited with status $ac_status" >&5
24033 echo "$as_me: failed program was:" >&5
24034 cat "conftest.$ac_ext" >&5
24035 ac_cv_func_fork_works=no
24036 fi
24037 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24038 fi
24039 fi
24040 echo "$as_me:24040: result: $ac_cv_func_fork_works" >&5
24041 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24042
24043 fi
24044 if test "x$ac_cv_func_fork_works" = xcross; then
24045   case $host in
24046     *-*-amigaos* | *-*-msdosdjgpp*)
24047       # Override, as these systems have only a dummy fork() stub
24048       ac_cv_func_fork_works=no
24049       ;;
24050     *)
24051       ac_cv_func_fork_works=yes
24052       ;;
24053   esac
24054   { echo "$as_me:24054: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24055 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24056 fi
24057 ac_cv_func_vfork_works=$ac_cv_func_vfork
24058 if test "x$ac_cv_func_vfork" = xyes; then
24059   echo "$as_me:24059: checking for working vfork" >&5
24060 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24061 if test "${ac_cv_func_vfork_works+set}" = set; then
24062   echo $ECHO_N "(cached) $ECHO_C" >&6
24063 else
24064   if test "$cross_compiling" = yes; then
24065   ac_cv_func_vfork_works=cross
24066 else
24067   cat >"conftest.$ac_ext" <<_ACEOF
24068 #line 24068 "configure"
24069 #include "confdefs.h"
24070 /* Thanks to Paul Eggert for this test.  */
24071 #include <stdio.h>
24072 #include <sys/types.h>
24073 #include <sys/stat.h>
24074 #if HAVE_UNISTD_H
24075 # include <unistd.h>
24076 #endif
24077 #if HAVE_VFORK_H
24078 # include <vfork.h>
24079 #endif
24080 /* On some sparc systems, changes by the child to local and incoming
24081    argument registers are propagated back to the parent.  The compiler
24082    is told about this with #include <vfork.h>, but some compilers
24083    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24084    static variable whose address is put into a register that is
24085    clobbered by the vfork.  */
24086 static
24087 sparc_address_test (int arg)
24088 {
24089   static pid_t child;
24090   if (!child) {
24091     child = vfork ();
24092     if (child < 0) {
24093       perror ("vfork");
24094       _exit(2);
24095     }
24096     if (!child) {
24097       arg = getpid();
24098       write(-1, "", 0);
24099       _exit (arg);
24100     }
24101   }
24102 }
24103
24104 int
24105 main (void)
24106 {
24107   pid_t parent = getpid ();
24108   pid_t child;
24109
24110   sparc_address_test ();
24111
24112   child = vfork ();
24113
24114   if (child == 0) {
24115     /* Here is another test for sparc vfork register problems.  This
24116        test uses lots of local variables, at least as many local
24117        variables as main has allocated so far including compiler
24118        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24119        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24120        reuse the register of parent for one of the local variables,
24121        since it will think that parent can't possibly be used any more
24122        in this routine.  Assigning to the local variable will thus
24123        munge parent in the parent process.  */
24124     pid_t
24125       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24126       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24127     /* Convince the compiler that p..p7 are live; otherwise, it might
24128        use the same hardware register for all 8 local variables.  */
24129     if (p != p1 || p != p2 || p != p3 || p != p4
24130         || p != p5 || p != p6 || p != p7)
24131       _exit(1);
24132
24133     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24134        from child file descriptors.  If the child closes a descriptor
24135        before it execs or exits, this munges the parent's descriptor
24136        as well.  Test for this by closing stdout in the child.  */
24137     _exit(close(fileno(stdout)) != 0);
24138   } else {
24139     int status;
24140     struct stat st;
24141
24142     while (wait(&status) != child)
24143       ;
24144     $ac_main_return(
24145          /* Was there some problem with vforking?  */
24146          child < 0
24147
24148          /* Did the child fail?  (This shouldn't happen.)  */
24149          || status
24150
24151          /* Did the vfork/compiler bug occur?  */
24152          || parent != getpid()
24153
24154          /* Did the file descriptor bug occur?  */
24155          || fstat(fileno(stdout), &st) != 0
24156          );
24157   }
24158 }
24159 _ACEOF
24160 rm -f "conftest$ac_exeext"
24161 if { (eval echo "$as_me:24161: \"$ac_link\"") >&5
24162   (eval $ac_link) 2>&5
24163   ac_status=$?
24164   echo "$as_me:24164: \$? = $ac_status" >&5
24165   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24166   { (eval echo "$as_me:24166: \"$ac_try\"") >&5
24167   (eval $ac_try) 2>&5
24168   ac_status=$?
24169   echo "$as_me:24169: \$? = $ac_status" >&5
24170   (exit "$ac_status"); }; }; then
24171   ac_cv_func_vfork_works=yes
24172 else
24173   echo "$as_me: program exited with status $ac_status" >&5
24174 echo "$as_me: failed program was:" >&5
24175 cat "conftest.$ac_ext" >&5
24176 ac_cv_func_vfork_works=no
24177 fi
24178 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24179 fi
24180 fi
24181 echo "$as_me:24181: result: $ac_cv_func_vfork_works" >&5
24182 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24183
24184 fi;
24185 if test "x$ac_cv_func_fork_works" = xcross; then
24186   ac_cv_func_vfork_works=ac_cv_func_vfork
24187   { echo "$as_me:24187: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24188 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24189 fi
24190
24191 if test "x$ac_cv_func_vfork_works" = xyes; then
24192
24193 cat >>confdefs.h <<\EOF
24194 #define HAVE_WORKING_VFORK 1
24195 EOF
24196
24197 else
24198
24199 cat >>confdefs.h <<\EOF
24200 #define vfork fork
24201 EOF
24202
24203 fi
24204 if test "x$ac_cv_func_fork_works" = xyes; then
24205
24206 cat >>confdefs.h <<\EOF
24207 #define HAVE_WORKING_FORK 1
24208 EOF
24209
24210 fi
24211
24212 echo "$as_me:24212: checking if fopen accepts explicit binary mode" >&5
24213 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24214 if test "${cf_cv_fopen_bin_r+set}" = set; then
24215   echo $ECHO_N "(cached) $ECHO_C" >&6
24216 else
24217
24218         if test "$cross_compiling" = yes; then
24219   cf_cv_fopen_bin_r=unknown
24220 else
24221   cat >"conftest.$ac_ext" <<_ACEOF
24222 #line 24222 "configure"
24223 #include "confdefs.h"
24224
24225 $ac_includes_default
24226
24227 int main(void)
24228 {
24229         FILE *fp = fopen("conftest.tmp", "wb");
24230         int rc = 0;
24231         if (fp != 0) {
24232                 int p, q;
24233                 for (p = 0; p < 256; ++p) {
24234                         fputc(p, fp);
24235                 }
24236                 fclose(fp);
24237                 fp = fopen("conftest.tmp", "rb");
24238                 if (fp != 0) {
24239                         for (p = 0; p < 256; ++p) {
24240                                 q = fgetc(fp);
24241                                 if (q != p) {
24242                                         rc = 1;
24243                                         break;
24244                                 }
24245                         }
24246                 } else {
24247                         rc = 1;
24248                 }
24249         } else {
24250                 rc = 1;
24251         }
24252         ${cf_cv_main_return:-return} (rc);
24253 }
24254
24255 _ACEOF
24256 rm -f "conftest$ac_exeext"
24257 if { (eval echo "$as_me:24257: \"$ac_link\"") >&5
24258   (eval $ac_link) 2>&5
24259   ac_status=$?
24260   echo "$as_me:24260: \$? = $ac_status" >&5
24261   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24262   { (eval echo "$as_me:24262: \"$ac_try\"") >&5
24263   (eval $ac_try) 2>&5
24264   ac_status=$?
24265   echo "$as_me:24265: \$? = $ac_status" >&5
24266   (exit "$ac_status"); }; }; then
24267   cf_cv_fopen_bin_r=yes
24268 else
24269   echo "$as_me: program exited with status $ac_status" >&5
24270 echo "$as_me: failed program was:" >&5
24271 cat "conftest.$ac_ext" >&5
24272 cf_cv_fopen_bin_r=no
24273 fi
24274 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24275 fi
24276
24277 fi
24278 echo "$as_me:24278: result: $cf_cv_fopen_bin_r" >&5
24279 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24280 test "x$cf_cv_fopen_bin_r" != xno &&
24281 cat >>confdefs.h <<\EOF
24282 #define USE_FOPEN_BIN_R 1
24283 EOF
24284
24285 # special check for test/ditto.c
24286
24287 echo "$as_me:24287: checking for openpty in -lutil" >&5
24288 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24289 if test "${ac_cv_lib_util_openpty+set}" = set; then
24290   echo $ECHO_N "(cached) $ECHO_C" >&6
24291 else
24292   ac_check_lib_save_LIBS=$LIBS
24293 LIBS="-lutil  $LIBS"
24294 cat >"conftest.$ac_ext" <<_ACEOF
24295 #line 24295 "configure"
24296 #include "confdefs.h"
24297
24298 /* Override any gcc2 internal prototype to avoid an error.  */
24299 #ifdef __cplusplus
24300 extern "C"
24301 #endif
24302 /* We use char because int might match the return type of a gcc2
24303    builtin and then its argument prototype would still apply.  */
24304 char openpty ();
24305 int
24306 main (void)
24307 {
24308 openpty ();
24309   ;
24310   return 0;
24311 }
24312 _ACEOF
24313 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24314 if { (eval echo "$as_me:24314: \"$ac_link\"") >&5
24315   (eval $ac_link) 2>&5
24316   ac_status=$?
24317   echo "$as_me:24317: \$? = $ac_status" >&5
24318   (exit "$ac_status"); } &&
24319          { ac_try='test -s "conftest$ac_exeext"'
24320   { (eval echo "$as_me:24320: \"$ac_try\"") >&5
24321   (eval $ac_try) 2>&5
24322   ac_status=$?
24323   echo "$as_me:24323: \$? = $ac_status" >&5
24324   (exit "$ac_status"); }; }; then
24325   ac_cv_lib_util_openpty=yes
24326 else
24327   echo "$as_me: failed program was:" >&5
24328 cat "conftest.$ac_ext" >&5
24329 ac_cv_lib_util_openpty=no
24330 fi
24331 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24332 LIBS=$ac_check_lib_save_LIBS
24333 fi
24334 echo "$as_me:24334: result: $ac_cv_lib_util_openpty" >&5
24335 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24336 if test "$ac_cv_lib_util_openpty" = yes; then
24337   cf_cv_lib_util=yes
24338 else
24339   cf_cv_lib_util=no
24340 fi
24341
24342 echo "$as_me:24342: checking for openpty header" >&5
24343 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24344 if test "${cf_cv_func_openpty+set}" = set; then
24345   echo $ECHO_N "(cached) $ECHO_C" >&6
24346 else
24347
24348         cf_save_LIBS="$LIBS"
24349         test "$cf_cv_lib_util" = yes && {
24350 cf_add_libs="$LIBS"
24351 # reverse order
24352 cf_add_0lib=
24353 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24354 # filter duplicates
24355 for cf_add_1lib in $cf_add_0lib; do
24356         for cf_add_2lib in $cf_add_libs; do
24357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24358                         cf_add_1lib=
24359                         break
24360                 fi
24361         done
24362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24363 done
24364 LIBS="$cf_add_libs"
24365  }
24366         for cf_header in pty.h libutil.h util.h
24367         do
24368         cat >"conftest.$ac_ext" <<_ACEOF
24369 #line 24369 "configure"
24370 #include "confdefs.h"
24371
24372 #include <$cf_header>
24373
24374 int
24375 main (void)
24376 {
24377
24378         int x = openpty((int *)0, (int *)0, (char *)0,
24379                                    (struct termios *)0, (struct winsize *)0);
24380
24381   ;
24382   return 0;
24383 }
24384 _ACEOF
24385 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24386 if { (eval echo "$as_me:24386: \"$ac_link\"") >&5
24387   (eval $ac_link) 2>&5
24388   ac_status=$?
24389   echo "$as_me:24389: \$? = $ac_status" >&5
24390   (exit "$ac_status"); } &&
24391          { ac_try='test -s "conftest$ac_exeext"'
24392   { (eval echo "$as_me:24392: \"$ac_try\"") >&5
24393   (eval $ac_try) 2>&5
24394   ac_status=$?
24395   echo "$as_me:24395: \$? = $ac_status" >&5
24396   (exit "$ac_status"); }; }; then
24397
24398                 cf_cv_func_openpty=$cf_header
24399                 break
24400
24401 else
24402   echo "$as_me: failed program was:" >&5
24403 cat "conftest.$ac_ext" >&5
24404
24405                 cf_cv_func_openpty=no
24406
24407 fi
24408 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24409         done
24410         LIBS="$cf_save_LIBS"
24411
24412 fi
24413 echo "$as_me:24413: result: $cf_cv_func_openpty" >&5
24414 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24415
24416 if test "$cf_cv_func_openpty" != no ; then
24417
24418 cat >>confdefs.h <<EOF
24419 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24420 EOF
24421
24422 cat >>confdefs.h <<\EOF
24423 #define USE_XTERM_PTY 1
24424 EOF
24425
24426         if test "x$cf_cv_lib_util" = xyes ; then
24427
24428 cf_add_libs="$TEST_LIBS"
24429 # reverse order
24430 cf_add_0lib=
24431 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24432 # filter duplicates
24433 for cf_add_1lib in $cf_add_0lib; do
24434         for cf_add_2lib in $cf_add_libs; do
24435                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24436                         cf_add_1lib=
24437                         break
24438                 fi
24439         done
24440         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24441 done
24442 TEST_LIBS="$cf_add_libs"
24443
24444         fi
24445 fi
24446
24447 if test "$with_hashed_db" != no ; then
24448
24449 cat >>confdefs.h <<\EOF
24450 #define USE_HASHED_DB 1
24451 EOF
24452
24453 case $with_hashed_db in
24454 (yes|*able*)
24455         ;;
24456 (*)
24457         if test -d "$with_hashed_db" ; then
24458
24459 if test -n "$with_hashed_db/include" ; then
24460   for cf_add_incdir in $with_hashed_db/include
24461   do
24462         while test "$cf_add_incdir" != /usr/include
24463         do
24464           if test -d "$cf_add_incdir"
24465           then
24466                 cf_have_incdir=no
24467                 if test -n "$CFLAGS$CPPFLAGS" ; then
24468                   # a loop is needed to ensure we can add subdirs of existing dirs
24469                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24470                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24471                           cf_have_incdir=yes; break
24472                         fi
24473                   done
24474                 fi
24475
24476                 if test "$cf_have_incdir" = no ; then
24477                   if test "$cf_add_incdir" = /usr/local/include ; then
24478                         if test "$GCC" = yes
24479                         then
24480                           cf_save_CPPFLAGS=$CPPFLAGS
24481
24482         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24483         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24484
24485                           cat >"conftest.$ac_ext" <<_ACEOF
24486 #line 24486 "configure"
24487 #include "confdefs.h"
24488 #include <stdio.h>
24489 int
24490 main (void)
24491 {
24492 printf("Hello")
24493   ;
24494   return 0;
24495 }
24496 _ACEOF
24497 rm -f "conftest.$ac_objext"
24498 if { (eval echo "$as_me:24498: \"$ac_compile\"") >&5
24499   (eval $ac_compile) 2>&5
24500   ac_status=$?
24501   echo "$as_me:24501: \$? = $ac_status" >&5
24502   (exit "$ac_status"); } &&
24503          { ac_try='test -s "conftest.$ac_objext"'
24504   { (eval echo "$as_me:24504: \"$ac_try\"") >&5
24505   (eval $ac_try) 2>&5
24506   ac_status=$?
24507   echo "$as_me:24507: \$? = $ac_status" >&5
24508   (exit "$ac_status"); }; }; then
24509   :
24510 else
24511   echo "$as_me: failed program was:" >&5
24512 cat "conftest.$ac_ext" >&5
24513 cf_have_incdir=yes
24514 fi
24515 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24516                           CPPFLAGS=$cf_save_CPPFLAGS
24517                         fi
24518                   fi
24519                 fi
24520
24521                 if test "$cf_have_incdir" = no ; then
24522                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24523
24524 echo "${as_me:-configure}:24524: testing adding $cf_add_incdir to include-path ..." 1>&5
24525
24526                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24527
24528                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24529                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24530                   cf_add_incdir="$cf_top_incdir"
24531                 else
24532                   break
24533                 fi
24534           else
24535                 break
24536           fi
24537         done
24538   done
24539 fi
24540
24541 if test -n "$with_hashed_db/lib" ; then
24542         for cf_add_libdir in $with_hashed_db/lib
24543         do
24544                 if test "$cf_add_libdir" = /usr/lib ; then
24545                         :
24546                 elif test -d "$cf_add_libdir"
24547                 then
24548                         cf_have_libdir=no
24549                         if test -n "$LDFLAGS$LIBS" ; then
24550                                 # a loop is needed to ensure we can add subdirs of existing dirs
24551                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24552                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24553                                                 cf_have_libdir=yes; break
24554                                         fi
24555                                 done
24556                         fi
24557                         if test "$cf_have_libdir" = no ; then
24558                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24559
24560 echo "${as_me:-configure}:24560: testing adding $cf_add_libdir to library-path ..." 1>&5
24561
24562                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24563                         fi
24564                 fi
24565         done
24566 fi
24567
24568         else
24569                 case "$with_hashed_db" in
24570                 (./*|../*|/*)
24571                         { echo "$as_me:24571: WARNING: no such directory $with_hashed_db" >&5
24572 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24573                         ;;
24574                 (*)
24575
24576 cf_search=
24577
24578 test "x$prefix" != "xNONE" && \
24579 test -d "$prefix" && \
24580  {
24581         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24582         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24583         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24584         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24585         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24586         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24587 }
24588
24589 for cf_subdir_prefix in \
24590         /usr \
24591         /usr/local \
24592         /usr/pkg \
24593         /opt \
24594         /opt/local \
24595         $HOME
24596 do
24597
24598 test "x$cf_subdir_prefix" != "x$prefix" && \
24599 test -d "$cf_subdir_prefix" && \
24600 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24601         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24602         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24603         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24604         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24605         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24606         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"
24607 }
24608
24609 done
24610
24611         for cf_item in $cf_search
24612         do
24613                 case "$cf_item" in
24614                 (*/$with_hashed_db)
24615
24616 if test -n "$cf_item" ; then
24617   for cf_add_incdir in $cf_item
24618   do
24619         while test "$cf_add_incdir" != /usr/include
24620         do
24621           if test -d "$cf_add_incdir"
24622           then
24623                 cf_have_incdir=no
24624                 if test -n "$CFLAGS$CPPFLAGS" ; then
24625                   # a loop is needed to ensure we can add subdirs of existing dirs
24626                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24627                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24628                           cf_have_incdir=yes; break
24629                         fi
24630                   done
24631                 fi
24632
24633                 if test "$cf_have_incdir" = no ; then
24634                   if test "$cf_add_incdir" = /usr/local/include ; then
24635                         if test "$GCC" = yes
24636                         then
24637                           cf_save_CPPFLAGS=$CPPFLAGS
24638
24639         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24640         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24641
24642                           cat >"conftest.$ac_ext" <<_ACEOF
24643 #line 24643 "configure"
24644 #include "confdefs.h"
24645 #include <stdio.h>
24646 int
24647 main (void)
24648 {
24649 printf("Hello")
24650   ;
24651   return 0;
24652 }
24653 _ACEOF
24654 rm -f "conftest.$ac_objext"
24655 if { (eval echo "$as_me:24655: \"$ac_compile\"") >&5
24656   (eval $ac_compile) 2>&5
24657   ac_status=$?
24658   echo "$as_me:24658: \$? = $ac_status" >&5
24659   (exit "$ac_status"); } &&
24660          { ac_try='test -s "conftest.$ac_objext"'
24661   { (eval echo "$as_me:24661: \"$ac_try\"") >&5
24662   (eval $ac_try) 2>&5
24663   ac_status=$?
24664   echo "$as_me:24664: \$? = $ac_status" >&5
24665   (exit "$ac_status"); }; }; then
24666   :
24667 else
24668   echo "$as_me: failed program was:" >&5
24669 cat "conftest.$ac_ext" >&5
24670 cf_have_incdir=yes
24671 fi
24672 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24673                           CPPFLAGS=$cf_save_CPPFLAGS
24674                         fi
24675                   fi
24676                 fi
24677
24678                 if test "$cf_have_incdir" = no ; then
24679                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24680
24681 echo "${as_me:-configure}:24681: testing adding $cf_add_incdir to include-path ..." 1>&5
24682
24683                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24684
24685                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24686                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24687                   cf_add_incdir="$cf_top_incdir"
24688                 else
24689                   break
24690                 fi
24691           else
24692                 break
24693           fi
24694         done
24695   done
24696 fi
24697
24698                         ;;
24699                 esac
24700         done
24701
24702 cf_search=
24703
24704 test "x$prefix" != "xNONE" && \
24705 test -d "$prefix" && \
24706  {
24707         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24708         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24709         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24710         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24711         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24712         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24713 }
24714
24715 for cf_subdir_prefix in \
24716         /usr \
24717         /usr/local \
24718         /usr/pkg \
24719         /opt \
24720         /opt/local \
24721         $HOME
24722 do
24723
24724 test "x$cf_subdir_prefix" != "x$prefix" && \
24725 test -d "$cf_subdir_prefix" && \
24726 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24727         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24728         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24729         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24730         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24731         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24732         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"
24733 }
24734
24735 done
24736
24737         for cf_item in $cf_search
24738         do
24739                 case "$cf_item" in
24740                 (*/$with_hashed_db)
24741
24742 if test -n "$cf_item" ; then
24743         for cf_add_libdir in $cf_item
24744         do
24745                 if test "$cf_add_libdir" = /usr/lib ; then
24746                         :
24747                 elif test -d "$cf_add_libdir"
24748                 then
24749                         cf_have_libdir=no
24750                         if test -n "$LDFLAGS$LIBS" ; then
24751                                 # a loop is needed to ensure we can add subdirs of existing dirs
24752                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24753                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24754                                                 cf_have_libdir=yes; break
24755                                         fi
24756                                 done
24757                         fi
24758                         if test "$cf_have_libdir" = no ; then
24759                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24760
24761 echo "${as_me:-configure}:24761: testing adding $cf_add_libdir to library-path ..." 1>&5
24762
24763                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24764                         fi
24765                 fi
24766         done
24767 fi
24768
24769                         ;;
24770                 esac
24771         done
24772
24773                         ;;
24774                 esac
24775         fi
24776 esac
24777
24778 echo "$as_me:24778: checking for db.h" >&5
24779 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24780 if test "${ac_cv_header_db_h+set}" = set; then
24781   echo $ECHO_N "(cached) $ECHO_C" >&6
24782 else
24783   cat >"conftest.$ac_ext" <<_ACEOF
24784 #line 24784 "configure"
24785 #include "confdefs.h"
24786 #include <db.h>
24787 _ACEOF
24788 if { (eval echo "$as_me:24788: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24789   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24790   ac_status=$?
24791   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24792   rm -f conftest.er1
24793   cat conftest.err >&5
24794   echo "$as_me:24794: \$? = $ac_status" >&5
24795   (exit "$ac_status"); } >/dev/null; then
24796   if test -s conftest.err; then
24797     ac_cpp_err=$ac_c_preproc_warn_flag
24798   else
24799     ac_cpp_err=
24800   fi
24801 else
24802   ac_cpp_err=yes
24803 fi
24804 if test -z "$ac_cpp_err"; then
24805   ac_cv_header_db_h=yes
24806 else
24807   echo "$as_me: failed program was:" >&5
24808   cat "conftest.$ac_ext" >&5
24809   ac_cv_header_db_h=no
24810 fi
24811 rm -f conftest.err "conftest.$ac_ext"
24812 fi
24813 echo "$as_me:24813: result: $ac_cv_header_db_h" >&5
24814 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24815 if test "$ac_cv_header_db_h" = yes; then
24816
24817 echo "$as_me:24817: checking for version of db" >&5
24818 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24819 if test "${cf_cv_hashed_db_version+set}" = set; then
24820   echo $ECHO_N "(cached) $ECHO_C" >&6
24821 else
24822
24823 cf_cv_hashed_db_version=unknown
24824
24825 for cf_db_version in 1 2 3 4 5 6
24826 do
24827
24828 echo "${as_me:-configure}:24828: testing checking for db version $cf_db_version ..." 1>&5
24829
24830         cat >"conftest.$ac_ext" <<_ACEOF
24831 #line 24831 "configure"
24832 #include "confdefs.h"
24833
24834 $ac_includes_default
24835 #include <db.h>
24836
24837 #ifdef DB_VERSION_MAJOR
24838         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24839 #if $cf_db_version == DB_VERSION_MAJOR
24840         /* ok */
24841 #else
24842         #error $cf_db_version is not DB_VERSION_MAJOR
24843 #endif
24844 #else
24845 #if $cf_db_version == 1
24846         /* ok: assuming this is DB 1.8.5 */
24847 #else
24848         #error $cf_db_version is not 1
24849 #endif
24850 #endif
24851
24852 int
24853 main (void)
24854 {
24855 DBT *foo = 0
24856   ;
24857   return 0;
24858 }
24859 _ACEOF
24860 rm -f "conftest.$ac_objext"
24861 if { (eval echo "$as_me:24861: \"$ac_compile\"") >&5
24862   (eval $ac_compile) 2>&5
24863   ac_status=$?
24864   echo "$as_me:24864: \$? = $ac_status" >&5
24865   (exit "$ac_status"); } &&
24866          { ac_try='test -s "conftest.$ac_objext"'
24867   { (eval echo "$as_me:24867: \"$ac_try\"") >&5
24868   (eval $ac_try) 2>&5
24869   ac_status=$?
24870   echo "$as_me:24870: \$? = $ac_status" >&5
24871   (exit "$ac_status"); }; }; then
24872
24873         cf_cv_hashed_db_version=$cf_db_version
24874         break
24875
24876 else
24877   echo "$as_me: failed program was:" >&5
24878 cat "conftest.$ac_ext" >&5
24879 fi
24880 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24881 done
24882
24883 fi
24884 echo "$as_me:24884: result: $cf_cv_hashed_db_version" >&5
24885 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24886
24887 if test "$cf_cv_hashed_db_version" = unknown ; then
24888         { { echo "$as_me:24888: error: Cannot determine version of db" >&5
24889 echo "$as_me: error: Cannot determine version of db" >&2;}
24890    { (exit 1); exit 1; }; }
24891 else
24892
24893 echo "$as_me:24893: checking for db libraries" >&5
24894 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24895 if test "${cf_cv_hashed_db_libs+set}" = set; then
24896   echo $ECHO_N "(cached) $ECHO_C" >&6
24897 else
24898
24899 cf_cv_hashed_db_libs=unknown
24900 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24901 do
24902         cf_save_libs="$LIBS"
24903         if test -n "$cf_db_libs"; then
24904
24905 cf_add_libs="$LIBS"
24906 # reverse order
24907 cf_add_0lib=
24908 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24909 # filter duplicates
24910 for cf_add_1lib in $cf_add_0lib; do
24911         for cf_add_2lib in $cf_add_libs; do
24912                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24913                         cf_add_1lib=
24914                         break
24915                 fi
24916         done
24917         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24918 done
24919 LIBS="$cf_add_libs"
24920
24921         fi
24922
24923 echo "${as_me:-configure}:24923: testing checking for library $cf_db_libs ..." 1>&5
24924
24925         cat >"conftest.$ac_ext" <<_ACEOF
24926 #line 24926 "configure"
24927 #include "confdefs.h"
24928
24929 $ac_includes_default
24930 #include <db.h>
24931
24932 int
24933 main (void)
24934 {
24935
24936         char *path = "/tmp/foo";
24937 #ifdef DB_VERSION_MAJOR
24938 #if DB_VERSION_MAJOR >= 4
24939         DB *result = 0;
24940         db_create(&result, NULL, 0);
24941         result->open(result,
24942                 NULL,
24943                 path,
24944                 path,
24945                 DB_HASH,
24946                 DB_CREATE,
24947                 0644);
24948 #elif DB_VERSION_MAJOR >= 3
24949         DB *result = 0;
24950         db_create(&result, NULL, 0);
24951         result->open(result,
24952                 path,
24953                 path,
24954                 DB_HASH,
24955                 DB_CREATE,
24956                 0644);
24957 #elif DB_VERSION_MAJOR >= 2
24958         DB *result = 0;
24959         db_open(path,
24960                 DB_HASH,
24961                 DB_CREATE,
24962                 0644,
24963                 (DB_ENV *) 0,
24964                 (DB_INFO *) 0,
24965                 &result);
24966 #endif /* DB_VERSION_MAJOR */
24967 #else
24968         DB *result = dbopen(path,
24969                      2,
24970                      0644,
24971                      DB_HASH,
24972                      0);
24973 #endif
24974         ${cf_cv_main_return:-return}(result != 0)
24975
24976   ;
24977   return 0;
24978 }
24979 _ACEOF
24980 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24981 if { (eval echo "$as_me:24981: \"$ac_link\"") >&5
24982   (eval $ac_link) 2>&5
24983   ac_status=$?
24984   echo "$as_me:24984: \$? = $ac_status" >&5
24985   (exit "$ac_status"); } &&
24986          { ac_try='test -s "conftest$ac_exeext"'
24987   { (eval echo "$as_me:24987: \"$ac_try\"") >&5
24988   (eval $ac_try) 2>&5
24989   ac_status=$?
24990   echo "$as_me:24990: \$? = $ac_status" >&5
24991   (exit "$ac_status"); }; }; then
24992
24993         if test -n "$cf_db_libs" ; then
24994                 cf_cv_hashed_db_libs=$cf_db_libs
24995         else
24996                 cf_cv_hashed_db_libs=default
24997         fi
24998         LIBS="$cf_save_libs"
24999         break
25000
25001 else
25002   echo "$as_me: failed program was:" >&5
25003 cat "conftest.$ac_ext" >&5
25004 fi
25005 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25006         LIBS="$cf_save_libs"
25007 done
25008
25009 fi
25010 echo "$as_me:25010: result: $cf_cv_hashed_db_libs" >&5
25011 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25012
25013         if test "$cf_cv_hashed_db_libs" = unknown ; then
25014                 { { echo "$as_me:25014: error: Cannot determine library for db" >&5
25015 echo "$as_me: error: Cannot determine library for db" >&2;}
25016    { (exit 1); exit 1; }; }
25017         elif test "$cf_cv_hashed_db_libs" != default ; then
25018
25019 cf_add_libs="$LIBS"
25020 # reverse order
25021 cf_add_0lib=
25022 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25023 # filter duplicates
25024 for cf_add_1lib in $cf_add_0lib; do
25025         for cf_add_2lib in $cf_add_libs; do
25026                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25027                         cf_add_1lib=
25028                         break
25029                 fi
25030         done
25031         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25032 done
25033 LIBS="$cf_add_libs"
25034
25035         fi
25036 fi
25037
25038 else
25039
25040         { { echo "$as_me:25040: error: Cannot find db.h" >&5
25041 echo "$as_me: error: Cannot find db.h" >&2;}
25042    { (exit 1); exit 1; }; }
25043
25044 fi
25045
25046 fi
25047
25048 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25049         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25050         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25051 fi
25052
25053 # Just in case, check if the C compiler has a bool type.
25054
25055 echo "$as_me:25055: checking if we should include stdbool.h" >&5
25056 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25057
25058 if test "${cf_cv_header_stdbool_h+set}" = set; then
25059   echo $ECHO_N "(cached) $ECHO_C" >&6
25060 else
25061
25062         cat >"conftest.$ac_ext" <<_ACEOF
25063 #line 25063 "configure"
25064 #include "confdefs.h"
25065
25066 int
25067 main (void)
25068 {
25069 bool foo = false
25070   ;
25071   return 0;
25072 }
25073 _ACEOF
25074 rm -f "conftest.$ac_objext"
25075 if { (eval echo "$as_me:25075: \"$ac_compile\"") >&5
25076   (eval $ac_compile) 2>&5
25077   ac_status=$?
25078   echo "$as_me:25078: \$? = $ac_status" >&5
25079   (exit "$ac_status"); } &&
25080          { ac_try='test -s "conftest.$ac_objext"'
25081   { (eval echo "$as_me:25081: \"$ac_try\"") >&5
25082   (eval $ac_try) 2>&5
25083   ac_status=$?
25084   echo "$as_me:25084: \$? = $ac_status" >&5
25085   (exit "$ac_status"); }; }; then
25086   cf_cv_header_stdbool_h=0
25087 else
25088   echo "$as_me: failed program was:" >&5
25089 cat "conftest.$ac_ext" >&5
25090 cat >"conftest.$ac_ext" <<_ACEOF
25091 #line 25091 "configure"
25092 #include "confdefs.h"
25093
25094 #ifndef __BEOS__
25095 #include <stdbool.h>
25096 #endif
25097
25098 int
25099 main (void)
25100 {
25101 bool foo = false
25102   ;
25103   return 0;
25104 }
25105 _ACEOF
25106 rm -f "conftest.$ac_objext"
25107 if { (eval echo "$as_me:25107: \"$ac_compile\"") >&5
25108   (eval $ac_compile) 2>&5
25109   ac_status=$?
25110   echo "$as_me:25110: \$? = $ac_status" >&5
25111   (exit "$ac_status"); } &&
25112          { ac_try='test -s "conftest.$ac_objext"'
25113   { (eval echo "$as_me:25113: \"$ac_try\"") >&5
25114   (eval $ac_try) 2>&5
25115   ac_status=$?
25116   echo "$as_me:25116: \$? = $ac_status" >&5
25117   (exit "$ac_status"); }; }; then
25118   cf_cv_header_stdbool_h=1
25119 else
25120   echo "$as_me: failed program was:" >&5
25121 cat "conftest.$ac_ext" >&5
25122 cf_cv_header_stdbool_h=0
25123 fi
25124 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25125 fi
25126 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25127 fi
25128
25129 if test "$cf_cv_header_stdbool_h" = 1
25130 then    echo "$as_me:25130: result: yes" >&5
25131 echo "${ECHO_T}yes" >&6
25132 else    echo "$as_me:25132: result: no" >&5
25133 echo "${ECHO_T}no" >&6
25134 fi
25135
25136 echo "$as_me:25136: checking for builtin bool type" >&5
25137 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25138
25139 if test "${cf_cv_cc_bool_type+set}" = set; then
25140   echo $ECHO_N "(cached) $ECHO_C" >&6
25141 else
25142
25143         cat >"conftest.$ac_ext" <<_ACEOF
25144 #line 25144 "configure"
25145 #include "confdefs.h"
25146
25147 #include <stdio.h>
25148 #include <sys/types.h>
25149
25150 int
25151 main (void)
25152 {
25153 bool x = false
25154   ;
25155   return 0;
25156 }
25157 _ACEOF
25158 rm -f "conftest.$ac_objext"
25159 if { (eval echo "$as_me:25159: \"$ac_compile\"") >&5
25160   (eval $ac_compile) 2>&5
25161   ac_status=$?
25162   echo "$as_me:25162: \$? = $ac_status" >&5
25163   (exit "$ac_status"); } &&
25164          { ac_try='test -s "conftest.$ac_objext"'
25165   { (eval echo "$as_me:25165: \"$ac_try\"") >&5
25166   (eval $ac_try) 2>&5
25167   ac_status=$?
25168   echo "$as_me:25168: \$? = $ac_status" >&5
25169   (exit "$ac_status"); }; }; then
25170   cf_cv_cc_bool_type=1
25171 else
25172   echo "$as_me: failed program was:" >&5
25173 cat "conftest.$ac_ext" >&5
25174 cf_cv_cc_bool_type=0
25175 fi
25176 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25177
25178 fi
25179
25180 if test "$cf_cv_cc_bool_type" = 1
25181 then    echo "$as_me:25181: result: yes" >&5
25182 echo "${ECHO_T}yes" >&6
25183 else    echo "$as_me:25183: result: no" >&5
25184 echo "${ECHO_T}no" >&6
25185 fi
25186
25187 # Check for C++ compiler characteristics (and ensure that it's there!)
25188 if test -n "$CXX" ; then
25189         ac_ext=cc
25190 ac_cpp='$CXXCPP $CPPFLAGS'
25191 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25192 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25193 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25194 ac_main_return="return"
25195
25196 if test -n "$GXX" ; then
25197
25198         cf_save="$LIBS"
25199         LIBS="$LIBS $CXXLIBS"
25200         echo "$as_me:25200: checking if we already have C++ library" >&5
25201 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25202         cat >"conftest.$ac_ext" <<_ACEOF
25203 #line 25203 "configure"
25204 #include "confdefs.h"
25205
25206                         #include <iostream>
25207 int
25208 main (void)
25209 {
25210
25211                         std::cout << "Hello World!" << std::endl;
25212   ;
25213   return 0;
25214 }
25215 _ACEOF
25216 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25217 if { (eval echo "$as_me:25217: \"$ac_link\"") >&5
25218   (eval $ac_link) 2>&5
25219   ac_status=$?
25220   echo "$as_me:25220: \$? = $ac_status" >&5
25221   (exit "$ac_status"); } &&
25222          { ac_try='test -s "conftest$ac_exeext"'
25223   { (eval echo "$as_me:25223: \"$ac_try\"") >&5
25224   (eval $ac_try) 2>&5
25225   ac_status=$?
25226   echo "$as_me:25226: \$? = $ac_status" >&5
25227   (exit "$ac_status"); }; }; then
25228   cf_have_libstdcpp=yes
25229 else
25230   echo "$as_me: failed program was:" >&5
25231 cat "conftest.$ac_ext" >&5
25232 cf_have_libstdcpp=no
25233 fi
25234 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25235         echo "$as_me:25235: result: $cf_have_libstdcpp" >&5
25236 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25237         LIBS="$cf_save"
25238
25239         if test "$cf_have_libstdcpp" != yes
25240         then
25241                 case "$cf_cv_system_name" in
25242                 (os2*)
25243                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25244                                 cf_stdcpp_libname=stdcpp
25245                         else
25246                                 cf_stdcpp_libname=stdc++
25247                         fi
25248                         ;;
25249                 (*)
25250                         cf_stdcpp_libname=stdc++
25251                         ;;
25252                 esac
25253
25254                 echo "$as_me:25254: checking for library $cf_stdcpp_libname" >&5
25255 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25256 if test "${cf_cv_libstdcpp+set}" = set; then
25257   echo $ECHO_N "(cached) $ECHO_C" >&6
25258 else
25259
25260                         cf_save="$LIBS"
25261                         LIBS="$LIBS $CXXLIBS"
25262
25263 cf_add_libs="$LIBS"
25264 # reverse order
25265 cf_add_0lib=
25266 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25267 # filter duplicates
25268 for cf_add_1lib in $cf_add_0lib; do
25269         for cf_add_2lib in $cf_add_libs; do
25270                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25271                         cf_add_1lib=
25272                         break
25273                 fi
25274         done
25275         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25276 done
25277 LIBS="$cf_add_libs"
25278
25279                 cat >"conftest.$ac_ext" <<_ACEOF
25280 #line 25280 "configure"
25281 #include "confdefs.h"
25282
25283                                 #include <iostream>
25284 int
25285 main (void)
25286 {
25287
25288                                 std::cout << "Hello World!" << std::endl;
25289   ;
25290   return 0;
25291 }
25292 _ACEOF
25293 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25294 if { (eval echo "$as_me:25294: \"$ac_link\"") >&5
25295   (eval $ac_link) 2>&5
25296   ac_status=$?
25297   echo "$as_me:25297: \$? = $ac_status" >&5
25298   (exit "$ac_status"); } &&
25299          { ac_try='test -s "conftest$ac_exeext"'
25300   { (eval echo "$as_me:25300: \"$ac_try\"") >&5
25301   (eval $ac_try) 2>&5
25302   ac_status=$?
25303   echo "$as_me:25303: \$? = $ac_status" >&5
25304   (exit "$ac_status"); }; }; then
25305   cf_cv_libstdcpp=yes
25306 else
25307   echo "$as_me: failed program was:" >&5
25308 cat "conftest.$ac_ext" >&5
25309 cf_cv_libstdcpp=no
25310 fi
25311 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25312                         LIBS="$cf_save"
25313
25314 fi
25315 echo "$as_me:25315: result: $cf_cv_libstdcpp" >&5
25316 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25317                 test "$cf_cv_libstdcpp" = yes && {
25318 cf_add_libs="$CXXLIBS"
25319 # reverse order
25320 cf_add_0lib=
25321 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25322 # filter duplicates
25323 for cf_add_1lib in $cf_add_0lib; do
25324         for cf_add_2lib in $cf_add_libs; do
25325                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25326                         cf_add_1lib=
25327                         break
25328                 fi
25329         done
25330         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25331 done
25332 CXXLIBS="$cf_add_libs"
25333  }
25334         fi
25335 fi
25336
25337         echo "$as_me:25337: checking whether $CXX understands -c and -o together" >&5
25338 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25339 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25340   echo $ECHO_N "(cached) $ECHO_C" >&6
25341 else
25342
25343 cat > conftest.$ac_ext <<CF_EOF
25344 int main(void)
25345 {
25346         ${cf_cv_main_return:-return}(0);
25347 }
25348 CF_EOF
25349 # We do the test twice because some compilers refuse to overwrite an
25350 # existing .o file with -o, though they will create one.
25351 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25352 if { (eval echo "$as_me:25352: \"$ac_try\"") >&5
25353   (eval $ac_try) 2>&5
25354   ac_status=$?
25355   echo "$as_me:25355: \$? = $ac_status" >&5
25356   (exit "$ac_status"); } &&
25357   test -f conftest2.$ac_objext && { (eval echo "$as_me:25357: \"$ac_try\"") >&5
25358   (eval $ac_try) 2>&5
25359   ac_status=$?
25360   echo "$as_me:25360: \$? = $ac_status" >&5
25361   (exit "$ac_status"); };
25362 then
25363   eval cf_cv_prog_CXX_c_o=yes
25364 else
25365   eval cf_cv_prog_CXX_c_o=no
25366 fi
25367 rm -rf ./conftest*
25368
25369 fi
25370 if test "$cf_cv_prog_CXX_c_o" = yes; then
25371   echo "$as_me:25371: result: yes" >&5
25372 echo "${ECHO_T}yes" >&6
25373 else
25374   echo "$as_me:25374: result: no" >&5
25375 echo "${ECHO_T}no" >&6
25376 fi
25377
25378         case "$GXX_VERSION" in
25379         (1.*|2.[0-6]*|[1-9][0-9].*)
25380                 cf_cxx_library=yes
25381                 ;;
25382         (*-2.7*|2.7*)
25383
25384 cf_cxx_library=unknown
25385 case "$cf_cv_system_name" in
25386 (os2*)
25387         cf_gpp_libname=gpp
25388         ;;
25389 (*)
25390         cf_gpp_libname=g++
25391         ;;
25392 esac
25393 if test "$GXX" = yes; then
25394         echo "$as_me:25394: checking for lib$cf_gpp_libname" >&5
25395 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25396         cf_save="$LIBS"
25397
25398 cf_add_libs="$LIBS"
25399 # reverse order
25400 cf_add_0lib=
25401 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25402 # filter duplicates
25403 for cf_add_1lib in $cf_add_0lib; do
25404         for cf_add_2lib in $cf_add_libs; do
25405                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25406                         cf_add_1lib=
25407                         break
25408                 fi
25409         done
25410         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25411 done
25412 LIBS="$cf_add_libs"
25413
25414         cat >"conftest.$ac_ext" <<_ACEOF
25415 #line 25415 "configure"
25416 #include "confdefs.h"
25417
25418 #include <$cf_gpp_libname/builtin.h>
25419
25420 int
25421 main (void)
25422 {
25423 two_arg_error_handler_t foo2 = lib_error_handler
25424   ;
25425   return 0;
25426 }
25427 _ACEOF
25428 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25429 if { (eval echo "$as_me:25429: \"$ac_link\"") >&5
25430   (eval $ac_link) 2>&5
25431   ac_status=$?
25432   echo "$as_me:25432: \$? = $ac_status" >&5
25433   (exit "$ac_status"); } &&
25434          { ac_try='test -s "conftest$ac_exeext"'
25435   { (eval echo "$as_me:25435: \"$ac_try\"") >&5
25436   (eval $ac_try) 2>&5
25437   ac_status=$?
25438   echo "$as_me:25438: \$? = $ac_status" >&5
25439   (exit "$ac_status"); }; }; then
25440   cf_cxx_library=yes
25441
25442 cf_add_libs="$CXXLIBS"
25443 # reverse order
25444 cf_add_0lib=
25445 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25446 # filter duplicates
25447 for cf_add_1lib in $cf_add_0lib; do
25448         for cf_add_2lib in $cf_add_libs; do
25449                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25450                         cf_add_1lib=
25451                         break
25452                 fi
25453         done
25454         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25455 done
25456 CXXLIBS="$cf_add_libs"
25457
25458          if test "$cf_gpp_libname" = cpp ; then
25459
25460 cat >>confdefs.h <<\EOF
25461 #define HAVE_GPP_BUILTIN_H 1
25462 EOF
25463
25464          else
25465
25466 cat >>confdefs.h <<\EOF
25467 #define HAVE_GXX_BUILTIN_H 1
25468 EOF
25469
25470          fi
25471 else
25472   echo "$as_me: failed program was:" >&5
25473 cat "conftest.$ac_ext" >&5
25474 cat >"conftest.$ac_ext" <<_ACEOF
25475 #line 25475 "configure"
25476 #include "confdefs.h"
25477
25478 #include <builtin.h>
25479
25480 int
25481 main (void)
25482 {
25483 two_arg_error_handler_t foo2 = lib_error_handler
25484   ;
25485   return 0;
25486 }
25487 _ACEOF
25488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25489 if { (eval echo "$as_me:25489: \"$ac_link\"") >&5
25490   (eval $ac_link) 2>&5
25491   ac_status=$?
25492   echo "$as_me:25492: \$? = $ac_status" >&5
25493   (exit "$ac_status"); } &&
25494          { ac_try='test -s "conftest$ac_exeext"'
25495   { (eval echo "$as_me:25495: \"$ac_try\"") >&5
25496   (eval $ac_try) 2>&5
25497   ac_status=$?
25498   echo "$as_me:25498: \$? = $ac_status" >&5
25499   (exit "$ac_status"); }; }; then
25500   cf_cxx_library=yes
25501
25502 cf_add_libs="$CXXLIBS"
25503 # reverse order
25504 cf_add_0lib=
25505 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25506 # filter duplicates
25507 for cf_add_1lib in $cf_add_0lib; do
25508         for cf_add_2lib in $cf_add_libs; do
25509                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25510                         cf_add_1lib=
25511                         break
25512                 fi
25513         done
25514         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25515 done
25516 CXXLIBS="$cf_add_libs"
25517
25518 cat >>confdefs.h <<\EOF
25519 #define HAVE_BUILTIN_H 1
25520 EOF
25521
25522 else
25523   echo "$as_me: failed program was:" >&5
25524 cat "conftest.$ac_ext" >&5
25525 cf_cxx_library=no
25526 fi
25527 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25528 fi
25529 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25530         LIBS="$cf_save"
25531         echo "$as_me:25531: result: $cf_cxx_library" >&5
25532 echo "${ECHO_T}$cf_cxx_library" >&6
25533 fi
25534
25535                 ;;
25536         (*)
25537                 cf_cxx_library=no
25538                 ;;
25539         esac
25540
25541         ac_ext=cc
25542 ac_cpp='$CXXCPP $CPPFLAGS'
25543 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25544 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25545 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25546 ac_main_return="return"
25547 echo "$as_me:25547: checking how to run the C++ preprocessor" >&5
25548 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25549 if test -z "$CXXCPP"; then
25550   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25551   echo $ECHO_N "(cached) $ECHO_C" >&6
25552 else
25553       # Double quotes because CXXCPP needs to be expanded
25554     for CXXCPP in "$CXX -E" "/lib/cpp"
25555     do
25556       ac_preproc_ok=false
25557 for ac_cxx_preproc_warn_flag in '' yes
25558 do
25559   # Use a header file that comes with gcc, so configuring glibc
25560   # with a fresh cross-compiler works.
25561   # On the NeXT, cc -E runs the code through the compiler's parser,
25562   # not just through cpp. "Syntax error" is here to catch this case.
25563   cat >"conftest.$ac_ext" <<_ACEOF
25564 #line 25564 "configure"
25565 #include "confdefs.h"
25566 #include <assert.h>
25567                      Syntax error
25568 _ACEOF
25569 if { (eval echo "$as_me:25569: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25570   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25571   ac_status=$?
25572   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25573   rm -f conftest.er1
25574   cat conftest.err >&5
25575   echo "$as_me:25575: \$? = $ac_status" >&5
25576   (exit "$ac_status"); } >/dev/null; then
25577   if test -s conftest.err; then
25578     ac_cpp_err=$ac_cxx_preproc_warn_flag
25579   else
25580     ac_cpp_err=
25581   fi
25582 else
25583   ac_cpp_err=yes
25584 fi
25585 if test -z "$ac_cpp_err"; then
25586   :
25587 else
25588   echo "$as_me: failed program was:" >&5
25589   cat "conftest.$ac_ext" >&5
25590   # Broken: fails on valid input.
25591 continue
25592 fi
25593 rm -f conftest.err "conftest.$ac_ext"
25594
25595   # OK, works on sane cases.  Now check whether non-existent headers
25596   # can be detected and how.
25597   cat >"conftest.$ac_ext" <<_ACEOF
25598 #line 25598 "configure"
25599 #include "confdefs.h"
25600 #include <ac_nonexistent.h>
25601 _ACEOF
25602 if { (eval echo "$as_me:25602: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25603   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25604   ac_status=$?
25605   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25606   rm -f conftest.er1
25607   cat conftest.err >&5
25608   echo "$as_me:25608: \$? = $ac_status" >&5
25609   (exit "$ac_status"); } >/dev/null; then
25610   if test -s conftest.err; then
25611     ac_cpp_err=$ac_cxx_preproc_warn_flag
25612   else
25613     ac_cpp_err=
25614   fi
25615 else
25616   ac_cpp_err=yes
25617 fi
25618 if test -z "$ac_cpp_err"; then
25619   # Broken: success on invalid input.
25620 continue
25621 else
25622   echo "$as_me: failed program was:" >&5
25623   cat "conftest.$ac_ext" >&5
25624   # Passes both tests.
25625 ac_preproc_ok=:
25626 break
25627 fi
25628 rm -f conftest.err "conftest.$ac_ext"
25629
25630 done
25631 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25632 rm -f conftest.err "conftest.$ac_ext"
25633 if $ac_preproc_ok; then
25634   break
25635 fi
25636
25637     done
25638     ac_cv_prog_CXXCPP=$CXXCPP
25639
25640 fi
25641   CXXCPP=$ac_cv_prog_CXXCPP
25642 else
25643   ac_cv_prog_CXXCPP=$CXXCPP
25644 fi
25645 echo "$as_me:25645: result: $CXXCPP" >&5
25646 echo "${ECHO_T}$CXXCPP" >&6
25647 ac_preproc_ok=false
25648 for ac_cxx_preproc_warn_flag in '' yes
25649 do
25650   # Use a header file that comes with gcc, so configuring glibc
25651   # with a fresh cross-compiler works.
25652   # On the NeXT, cc -E runs the code through the compiler's parser,
25653   # not just through cpp. "Syntax error" is here to catch this case.
25654   cat >"conftest.$ac_ext" <<_ACEOF
25655 #line 25655 "configure"
25656 #include "confdefs.h"
25657 #include <assert.h>
25658                      Syntax error
25659 _ACEOF
25660 if { (eval echo "$as_me:25660: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25661   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25662   ac_status=$?
25663   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25664   rm -f conftest.er1
25665   cat conftest.err >&5
25666   echo "$as_me:25666: \$? = $ac_status" >&5
25667   (exit "$ac_status"); } >/dev/null; then
25668   if test -s conftest.err; then
25669     ac_cpp_err=$ac_cxx_preproc_warn_flag
25670   else
25671     ac_cpp_err=
25672   fi
25673 else
25674   ac_cpp_err=yes
25675 fi
25676 if test -z "$ac_cpp_err"; then
25677   :
25678 else
25679   echo "$as_me: failed program was:" >&5
25680   cat "conftest.$ac_ext" >&5
25681   # Broken: fails on valid input.
25682 continue
25683 fi
25684 rm -f conftest.err "conftest.$ac_ext"
25685
25686   # OK, works on sane cases.  Now check whether non-existent headers
25687   # can be detected and how.
25688   cat >"conftest.$ac_ext" <<_ACEOF
25689 #line 25689 "configure"
25690 #include "confdefs.h"
25691 #include <ac_nonexistent.h>
25692 _ACEOF
25693 if { (eval echo "$as_me:25693: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25694   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25695   ac_status=$?
25696   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25697   rm -f conftest.er1
25698   cat conftest.err >&5
25699   echo "$as_me:25699: \$? = $ac_status" >&5
25700   (exit "$ac_status"); } >/dev/null; then
25701   if test -s conftest.err; then
25702     ac_cpp_err=$ac_cxx_preproc_warn_flag
25703   else
25704     ac_cpp_err=
25705   fi
25706 else
25707   ac_cpp_err=yes
25708 fi
25709 if test -z "$ac_cpp_err"; then
25710   # Broken: success on invalid input.
25711 continue
25712 else
25713   echo "$as_me: failed program was:" >&5
25714   cat "conftest.$ac_ext" >&5
25715   # Passes both tests.
25716 ac_preproc_ok=:
25717 break
25718 fi
25719 rm -f conftest.err "conftest.$ac_ext"
25720
25721 done
25722 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25723 rm -f conftest.err "conftest.$ac_ext"
25724 if $ac_preproc_ok; then
25725   :
25726 else
25727   { { echo "$as_me:25727: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25728 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25729    { (exit 1); exit 1; }; }
25730 fi
25731
25732 ac_ext=cc
25733 ac_cpp='$CXXCPP $CPPFLAGS'
25734 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25735 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25736 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25737 ac_main_return="return"
25738
25739 for ac_header in typeinfo
25740 do
25741 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25742 echo "$as_me:25742: checking for $ac_header" >&5
25743 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25744 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25745   echo $ECHO_N "(cached) $ECHO_C" >&6
25746 else
25747   cat >"conftest.$ac_ext" <<_ACEOF
25748 #line 25748 "configure"
25749 #include "confdefs.h"
25750 #include <$ac_header>
25751 _ACEOF
25752 if { (eval echo "$as_me:25752: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25753   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25754   ac_status=$?
25755   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25756   rm -f conftest.er1
25757   cat conftest.err >&5
25758   echo "$as_me:25758: \$? = $ac_status" >&5
25759   (exit "$ac_status"); } >/dev/null; then
25760   if test -s conftest.err; then
25761     ac_cpp_err=$ac_cxx_preproc_warn_flag
25762   else
25763     ac_cpp_err=
25764   fi
25765 else
25766   ac_cpp_err=yes
25767 fi
25768 if test -z "$ac_cpp_err"; then
25769   eval "$as_ac_Header=yes"
25770 else
25771   echo "$as_me: failed program was:" >&5
25772   cat "conftest.$ac_ext" >&5
25773   eval "$as_ac_Header=no"
25774 fi
25775 rm -f conftest.err "conftest.$ac_ext"
25776 fi
25777 echo "$as_me:25777: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25778 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25779 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25780   cat >>confdefs.h <<EOF
25781 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25782 EOF
25783
25784 fi
25785 done
25786
25787 for ac_header in iostream
25788 do
25789 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25790 echo "$as_me:25790: checking for $ac_header" >&5
25791 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25792 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25793   echo $ECHO_N "(cached) $ECHO_C" >&6
25794 else
25795   cat >"conftest.$ac_ext" <<_ACEOF
25796 #line 25796 "configure"
25797 #include "confdefs.h"
25798 #include <$ac_header>
25799 _ACEOF
25800 if { (eval echo "$as_me:25800: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25801   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25802   ac_status=$?
25803   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25804   rm -f conftest.er1
25805   cat conftest.err >&5
25806   echo "$as_me:25806: \$? = $ac_status" >&5
25807   (exit "$ac_status"); } >/dev/null; then
25808   if test -s conftest.err; then
25809     ac_cpp_err=$ac_cxx_preproc_warn_flag
25810   else
25811     ac_cpp_err=
25812   fi
25813 else
25814   ac_cpp_err=yes
25815 fi
25816 if test -z "$ac_cpp_err"; then
25817   eval "$as_ac_Header=yes"
25818 else
25819   echo "$as_me: failed program was:" >&5
25820   cat "conftest.$ac_ext" >&5
25821   eval "$as_ac_Header=no"
25822 fi
25823 rm -f conftest.err "conftest.$ac_ext"
25824 fi
25825 echo "$as_me:25825: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25826 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25827 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25828   cat >>confdefs.h <<EOF
25829 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25830 EOF
25831
25832 fi
25833 done
25834
25835 if test x"$ac_cv_header_iostream" = xyes ; then
25836         echo "$as_me:25836: checking if iostream uses std-namespace" >&5
25837 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25838         cat >"conftest.$ac_ext" <<_ACEOF
25839 #line 25839 "configure"
25840 #include "confdefs.h"
25841
25842 #include <iostream>
25843 using std::endl;
25844 using std::cerr;
25845 int
25846 main (void)
25847 {
25848
25849 cerr << "testing" << endl;
25850
25851   ;
25852   return 0;
25853 }
25854 _ACEOF
25855 rm -f "conftest.$ac_objext"
25856 if { (eval echo "$as_me:25856: \"$ac_compile\"") >&5
25857   (eval $ac_compile) 2>&5
25858   ac_status=$?
25859   echo "$as_me:25859: \$? = $ac_status" >&5
25860   (exit "$ac_status"); } &&
25861          { ac_try='test -s "conftest.$ac_objext"'
25862   { (eval echo "$as_me:25862: \"$ac_try\"") >&5
25863   (eval $ac_try) 2>&5
25864   ac_status=$?
25865   echo "$as_me:25865: \$? = $ac_status" >&5
25866   (exit "$ac_status"); }; }; then
25867   cf_iostream_namespace=yes
25868 else
25869   echo "$as_me: failed program was:" >&5
25870 cat "conftest.$ac_ext" >&5
25871 cf_iostream_namespace=no
25872 fi
25873 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25874         echo "$as_me:25874: result: $cf_iostream_namespace" >&5
25875 echo "${ECHO_T}$cf_iostream_namespace" >&6
25876         if test "$cf_iostream_namespace" = yes ; then
25877
25878 cat >>confdefs.h <<\EOF
25879 #define IOSTREAM_NAMESPACE 1
25880 EOF
25881
25882         fi
25883 fi
25884
25885 echo "$as_me:25885: checking if we should include stdbool.h" >&5
25886 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25887
25888 if test "${cf_cv_header_stdbool_h+set}" = set; then
25889   echo $ECHO_N "(cached) $ECHO_C" >&6
25890 else
25891
25892         cat >"conftest.$ac_ext" <<_ACEOF
25893 #line 25893 "configure"
25894 #include "confdefs.h"
25895
25896 int
25897 main (void)
25898 {
25899 bool foo = false
25900   ;
25901   return 0;
25902 }
25903 _ACEOF
25904 rm -f "conftest.$ac_objext"
25905 if { (eval echo "$as_me:25905: \"$ac_compile\"") >&5
25906   (eval $ac_compile) 2>&5
25907   ac_status=$?
25908   echo "$as_me:25908: \$? = $ac_status" >&5
25909   (exit "$ac_status"); } &&
25910          { ac_try='test -s "conftest.$ac_objext"'
25911   { (eval echo "$as_me:25911: \"$ac_try\"") >&5
25912   (eval $ac_try) 2>&5
25913   ac_status=$?
25914   echo "$as_me:25914: \$? = $ac_status" >&5
25915   (exit "$ac_status"); }; }; then
25916   cf_cv_header_stdbool_h=0
25917 else
25918   echo "$as_me: failed program was:" >&5
25919 cat "conftest.$ac_ext" >&5
25920 cat >"conftest.$ac_ext" <<_ACEOF
25921 #line 25921 "configure"
25922 #include "confdefs.h"
25923
25924 #ifndef __BEOS__
25925 #include <stdbool.h>
25926 #endif
25927
25928 int
25929 main (void)
25930 {
25931 bool foo = false
25932   ;
25933   return 0;
25934 }
25935 _ACEOF
25936 rm -f "conftest.$ac_objext"
25937 if { (eval echo "$as_me:25937: \"$ac_compile\"") >&5
25938   (eval $ac_compile) 2>&5
25939   ac_status=$?
25940   echo "$as_me:25940: \$? = $ac_status" >&5
25941   (exit "$ac_status"); } &&
25942          { ac_try='test -s "conftest.$ac_objext"'
25943   { (eval echo "$as_me:25943: \"$ac_try\"") >&5
25944   (eval $ac_try) 2>&5
25945   ac_status=$?
25946   echo "$as_me:25946: \$? = $ac_status" >&5
25947   (exit "$ac_status"); }; }; then
25948   cf_cv_header_stdbool_h=1
25949 else
25950   echo "$as_me: failed program was:" >&5
25951 cat "conftest.$ac_ext" >&5
25952 cf_cv_header_stdbool_h=0
25953 fi
25954 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25955 fi
25956 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25957 fi
25958
25959 if test "$cf_cv_header_stdbool_h" = 1
25960 then    echo "$as_me:25960: result: yes" >&5
25961 echo "${ECHO_T}yes" >&6
25962 else    echo "$as_me:25962: result: no" >&5
25963 echo "${ECHO_T}no" >&6
25964 fi
25965
25966 echo "$as_me:25966: checking for builtin bool type" >&5
25967 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25968
25969 if test "${cf_cv_builtin_bool+set}" = set; then
25970   echo $ECHO_N "(cached) $ECHO_C" >&6
25971 else
25972
25973         cat >"conftest.$ac_ext" <<_ACEOF
25974 #line 25974 "configure"
25975 #include "confdefs.h"
25976
25977 #include <stdio.h>
25978 #include <sys/types.h>
25979
25980 int
25981 main (void)
25982 {
25983 bool x = false
25984   ;
25985   return 0;
25986 }
25987 _ACEOF
25988 rm -f "conftest.$ac_objext"
25989 if { (eval echo "$as_me:25989: \"$ac_compile\"") >&5
25990   (eval $ac_compile) 2>&5
25991   ac_status=$?
25992   echo "$as_me:25992: \$? = $ac_status" >&5
25993   (exit "$ac_status"); } &&
25994          { ac_try='test -s "conftest.$ac_objext"'
25995   { (eval echo "$as_me:25995: \"$ac_try\"") >&5
25996   (eval $ac_try) 2>&5
25997   ac_status=$?
25998   echo "$as_me:25998: \$? = $ac_status" >&5
25999   (exit "$ac_status"); }; }; then
26000   cf_cv_builtin_bool=1
26001 else
26002   echo "$as_me: failed program was:" >&5
26003 cat "conftest.$ac_ext" >&5
26004 cf_cv_builtin_bool=0
26005 fi
26006 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26007
26008 fi
26009
26010 if test "$cf_cv_builtin_bool" = 1
26011 then    echo "$as_me:26011: result: yes" >&5
26012 echo "${ECHO_T}yes" >&6
26013 else    echo "$as_me:26013: result: no" >&5
26014 echo "${ECHO_T}no" >&6
26015 fi
26016
26017 echo "$as_me:26017: checking for bool" >&5
26018 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26019 if test "${ac_cv_type_bool+set}" = set; then
26020   echo $ECHO_N "(cached) $ECHO_C" >&6
26021 else
26022   cat >"conftest.$ac_ext" <<_ACEOF
26023 #line 26023 "configure"
26024 #include "confdefs.h"
26025
26026 $ac_includes_default
26027
26028 #if defined(__cplusplus)
26029
26030 #ifdef HAVE_GXX_BUILTIN_H
26031 #include <g++/builtin.h>
26032 #elif HAVE_GPP_BUILTIN_H
26033 #include <gpp/builtin.h>
26034 #elif HAVE_BUILTIN_H
26035 #include <builtin.h>
26036 #endif
26037
26038 #else
26039
26040 #if $cf_cv_header_stdbool_h
26041 #include <stdbool.h>
26042 #endif
26043
26044 #endif
26045
26046 int
26047 main (void)
26048 {
26049 if ((bool *) 0)
26050   return 0;
26051 if (sizeof (bool))
26052   return 0;
26053   ;
26054   return 0;
26055 }
26056 _ACEOF
26057 rm -f "conftest.$ac_objext"
26058 if { (eval echo "$as_me:26058: \"$ac_compile\"") >&5
26059   (eval $ac_compile) 2>&5
26060   ac_status=$?
26061   echo "$as_me:26061: \$? = $ac_status" >&5
26062   (exit "$ac_status"); } &&
26063          { ac_try='test -s "conftest.$ac_objext"'
26064   { (eval echo "$as_me:26064: \"$ac_try\"") >&5
26065   (eval $ac_try) 2>&5
26066   ac_status=$?
26067   echo "$as_me:26067: \$? = $ac_status" >&5
26068   (exit "$ac_status"); }; }; then
26069   ac_cv_type_bool=yes
26070 else
26071   echo "$as_me: failed program was:" >&5
26072 cat "conftest.$ac_ext" >&5
26073 ac_cv_type_bool=no
26074 fi
26075 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26076 fi
26077 echo "$as_me:26077: result: $ac_cv_type_bool" >&5
26078 echo "${ECHO_T}$ac_cv_type_bool" >&6
26079
26080 echo "$as_me:26080: checking size of bool" >&5
26081 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26082 if test "${ac_cv_sizeof_bool+set}" = set; then
26083   echo $ECHO_N "(cached) $ECHO_C" >&6
26084 else
26085   if test "$ac_cv_type_bool" = yes; then
26086   if test "$cross_compiling" = yes; then
26087   # Depending upon the size, compute the lo and hi bounds.
26088 cat >"conftest.$ac_ext" <<_ACEOF
26089 #line 26089 "configure"
26090 #include "confdefs.h"
26091
26092 $ac_includes_default
26093
26094 #if defined(__cplusplus)
26095
26096 #ifdef HAVE_GXX_BUILTIN_H
26097 #include <g++/builtin.h>
26098 #elif HAVE_GPP_BUILTIN_H
26099 #include <gpp/builtin.h>
26100 #elif HAVE_BUILTIN_H
26101 #include <builtin.h>
26102 #endif
26103
26104 #else
26105
26106 #if $cf_cv_header_stdbool_h
26107 #include <stdbool.h>
26108 #endif
26109
26110 #endif
26111
26112 int
26113 main (void)
26114 {
26115 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26116   ;
26117   return 0;
26118 }
26119 _ACEOF
26120 rm -f "conftest.$ac_objext"
26121 if { (eval echo "$as_me:26121: \"$ac_compile\"") >&5
26122   (eval $ac_compile) 2>&5
26123   ac_status=$?
26124   echo "$as_me:26124: \$? = $ac_status" >&5
26125   (exit "$ac_status"); } &&
26126          { ac_try='test -s "conftest.$ac_objext"'
26127   { (eval echo "$as_me:26127: \"$ac_try\"") >&5
26128   (eval $ac_try) 2>&5
26129   ac_status=$?
26130   echo "$as_me:26130: \$? = $ac_status" >&5
26131   (exit "$ac_status"); }; }; then
26132   ac_lo=0 ac_mid=0
26133   while :; do
26134     cat >"conftest.$ac_ext" <<_ACEOF
26135 #line 26135 "configure"
26136 #include "confdefs.h"
26137
26138 $ac_includes_default
26139
26140 #if defined(__cplusplus)
26141
26142 #ifdef HAVE_GXX_BUILTIN_H
26143 #include <g++/builtin.h>
26144 #elif HAVE_GPP_BUILTIN_H
26145 #include <gpp/builtin.h>
26146 #elif HAVE_BUILTIN_H
26147 #include <builtin.h>
26148 #endif
26149
26150 #else
26151
26152 #if $cf_cv_header_stdbool_h
26153 #include <stdbool.h>
26154 #endif
26155
26156 #endif
26157
26158 int
26159 main (void)
26160 {
26161 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26162   ;
26163   return 0;
26164 }
26165 _ACEOF
26166 rm -f "conftest.$ac_objext"
26167 if { (eval echo "$as_me:26167: \"$ac_compile\"") >&5
26168   (eval $ac_compile) 2>&5
26169   ac_status=$?
26170   echo "$as_me:26170: \$? = $ac_status" >&5
26171   (exit "$ac_status"); } &&
26172          { ac_try='test -s "conftest.$ac_objext"'
26173   { (eval echo "$as_me:26173: \"$ac_try\"") >&5
26174   (eval $ac_try) 2>&5
26175   ac_status=$?
26176   echo "$as_me:26176: \$? = $ac_status" >&5
26177   (exit "$ac_status"); }; }; then
26178   ac_hi=$ac_mid; break
26179 else
26180   echo "$as_me: failed program was:" >&5
26181 cat "conftest.$ac_ext" >&5
26182 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26183 fi
26184 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26185   done
26186 else
26187   echo "$as_me: failed program was:" >&5
26188 cat "conftest.$ac_ext" >&5
26189 ac_hi=-1 ac_mid=-1
26190   while :; do
26191     cat >"conftest.$ac_ext" <<_ACEOF
26192 #line 26192 "configure"
26193 #include "confdefs.h"
26194
26195 $ac_includes_default
26196
26197 #if defined(__cplusplus)
26198
26199 #ifdef HAVE_GXX_BUILTIN_H
26200 #include <g++/builtin.h>
26201 #elif HAVE_GPP_BUILTIN_H
26202 #include <gpp/builtin.h>
26203 #elif HAVE_BUILTIN_H
26204 #include <builtin.h>
26205 #endif
26206
26207 #else
26208
26209 #if $cf_cv_header_stdbool_h
26210 #include <stdbool.h>
26211 #endif
26212
26213 #endif
26214
26215 int
26216 main (void)
26217 {
26218 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26219   ;
26220   return 0;
26221 }
26222 _ACEOF
26223 rm -f "conftest.$ac_objext"
26224 if { (eval echo "$as_me:26224: \"$ac_compile\"") >&5
26225   (eval $ac_compile) 2>&5
26226   ac_status=$?
26227   echo "$as_me:26227: \$? = $ac_status" >&5
26228   (exit "$ac_status"); } &&
26229          { ac_try='test -s "conftest.$ac_objext"'
26230   { (eval echo "$as_me:26230: \"$ac_try\"") >&5
26231   (eval $ac_try) 2>&5
26232   ac_status=$?
26233   echo "$as_me:26233: \$? = $ac_status" >&5
26234   (exit "$ac_status"); }; }; then
26235   ac_lo=$ac_mid; break
26236 else
26237   echo "$as_me: failed program was:" >&5
26238 cat "conftest.$ac_ext" >&5
26239 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26240 fi
26241 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26242   done
26243 fi
26244 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26245 # Binary search between lo and hi bounds.
26246 while test "x$ac_lo" != "x$ac_hi"; do
26247   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26248   cat >"conftest.$ac_ext" <<_ACEOF
26249 #line 26249 "configure"
26250 #include "confdefs.h"
26251
26252 $ac_includes_default
26253
26254 #if defined(__cplusplus)
26255
26256 #ifdef HAVE_GXX_BUILTIN_H
26257 #include <g++/builtin.h>
26258 #elif HAVE_GPP_BUILTIN_H
26259 #include <gpp/builtin.h>
26260 #elif HAVE_BUILTIN_H
26261 #include <builtin.h>
26262 #endif
26263
26264 #else
26265
26266 #if $cf_cv_header_stdbool_h
26267 #include <stdbool.h>
26268 #endif
26269
26270 #endif
26271
26272 int
26273 main (void)
26274 {
26275 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26276   ;
26277   return 0;
26278 }
26279 _ACEOF
26280 rm -f "conftest.$ac_objext"
26281 if { (eval echo "$as_me:26281: \"$ac_compile\"") >&5
26282   (eval $ac_compile) 2>&5
26283   ac_status=$?
26284   echo "$as_me:26284: \$? = $ac_status" >&5
26285   (exit "$ac_status"); } &&
26286          { ac_try='test -s "conftest.$ac_objext"'
26287   { (eval echo "$as_me:26287: \"$ac_try\"") >&5
26288   (eval $ac_try) 2>&5
26289   ac_status=$?
26290   echo "$as_me:26290: \$? = $ac_status" >&5
26291   (exit "$ac_status"); }; }; then
26292   ac_hi=$ac_mid
26293 else
26294   echo "$as_me: failed program was:" >&5
26295 cat "conftest.$ac_ext" >&5
26296 ac_lo=`expr "$ac_mid" + 1`
26297 fi
26298 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26299 done
26300 ac_cv_sizeof_bool=$ac_lo
26301 else
26302   if test "$cross_compiling" = yes; then
26303   { { echo "$as_me:26303: error: cannot run test program while cross compiling" >&5
26304 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26305    { (exit 1); exit 1; }; }
26306 else
26307   cat >"conftest.$ac_ext" <<_ACEOF
26308 #line 26308 "configure"
26309 #include "confdefs.h"
26310
26311 $ac_includes_default
26312
26313 #if defined(__cplusplus)
26314
26315 #ifdef HAVE_GXX_BUILTIN_H
26316 #include <g++/builtin.h>
26317 #elif HAVE_GPP_BUILTIN_H
26318 #include <gpp/builtin.h>
26319 #elif HAVE_BUILTIN_H
26320 #include <builtin.h>
26321 #endif
26322
26323 #else
26324
26325 #if $cf_cv_header_stdbool_h
26326 #include <stdbool.h>
26327 #endif
26328
26329 #endif
26330
26331 int
26332 main (void)
26333 {
26334 FILE *f = fopen ("conftest.val", "w");
26335 if (!f)
26336   $ac_main_return (1);
26337 fprintf (f, "%ld", (long)(sizeof (bool)));
26338 fclose (f);
26339   ;
26340   return 0;
26341 }
26342 _ACEOF
26343 rm -f "conftest$ac_exeext"
26344 if { (eval echo "$as_me:26344: \"$ac_link\"") >&5
26345   (eval $ac_link) 2>&5
26346   ac_status=$?
26347   echo "$as_me:26347: \$? = $ac_status" >&5
26348   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26349   { (eval echo "$as_me:26349: \"$ac_try\"") >&5
26350   (eval $ac_try) 2>&5
26351   ac_status=$?
26352   echo "$as_me:26352: \$? = $ac_status" >&5
26353   (exit "$ac_status"); }; }; then
26354   ac_cv_sizeof_bool=`cat conftest.val`
26355 else
26356   echo "$as_me: program exited with status $ac_status" >&5
26357 echo "$as_me: failed program was:" >&5
26358 cat "conftest.$ac_ext" >&5
26359 fi
26360 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26361 fi
26362 fi
26363 rm -f conftest.val
26364 else
26365   ac_cv_sizeof_bool=0
26366 fi
26367 fi
26368 echo "$as_me:26368: result: $ac_cv_sizeof_bool" >&5
26369 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26370 cat >>confdefs.h <<EOF
26371 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26372 EOF
26373
26374 echo "$as_me:26374: checking for type of bool" >&5
26375 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26376 if test "${cf_cv_type_of_bool+set}" = set; then
26377   echo $ECHO_N "(cached) $ECHO_C" >&6
26378 else
26379
26380         rm -f cf_test.out
26381         if test "$cross_compiling" = yes; then
26382
26383                 case x$ac_cv_sizeof_bool in
26384                 (x1) cf_cv_type_of_bool="unsigned char";;
26385                 (x2) cf_cv_type_of_bool="unsigned short";;
26386                 (x4) cf_cv_type_of_bool="unsigned int";;
26387                 (x8) cf_cv_type_of_bool="unsigned long";;
26388                 (*)  cf_cv_type_of_bool=unknown;;
26389                 esac
26390
26391 else
26392   cat >"conftest.$ac_ext" <<_ACEOF
26393 #line 26393 "configure"
26394 #include "confdefs.h"
26395
26396 $ac_includes_default
26397
26398 #if defined(__cplusplus)
26399
26400 #ifdef HAVE_GXX_BUILTIN_H
26401 #include <g++/builtin.h>
26402 #elif HAVE_GPP_BUILTIN_H
26403 #include <gpp/builtin.h>
26404 #elif HAVE_BUILTIN_H
26405 #include <builtin.h>
26406 #endif
26407
26408 #else
26409
26410 #if $cf_cv_header_stdbool_h
26411 #include <stdbool.h>
26412 #endif
26413
26414 #endif
26415
26416 int main(void)
26417 {
26418         FILE *fp = fopen("cf_test.out", "w");
26419         if (fp != 0) {
26420                 bool x = true;
26421                 if ((bool)(-x) >= 0)
26422                         fputs("unsigned ", fp);
26423                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26424                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26425                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26426                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26427                 fclose(fp);
26428         }
26429         ${cf_cv_main_return:-return}(0);
26430 }
26431
26432 _ACEOF
26433 rm -f "conftest$ac_exeext"
26434 if { (eval echo "$as_me:26434: \"$ac_link\"") >&5
26435   (eval $ac_link) 2>&5
26436   ac_status=$?
26437   echo "$as_me:26437: \$? = $ac_status" >&5
26438   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26439   { (eval echo "$as_me:26439: \"$ac_try\"") >&5
26440   (eval $ac_try) 2>&5
26441   ac_status=$?
26442   echo "$as_me:26442: \$? = $ac_status" >&5
26443   (exit "$ac_status"); }; }; then
26444   cf_cv_type_of_bool=`cat cf_test.out`
26445                  if test -z "$cf_cv_type_of_bool"; then
26446                    cf_cv_type_of_bool=unknown
26447                  fi
26448 else
26449   echo "$as_me: program exited with status $ac_status" >&5
26450 echo "$as_me: failed program was:" >&5
26451 cat "conftest.$ac_ext" >&5
26452 cf_cv_type_of_bool=unknown
26453 fi
26454 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26455 fi
26456         rm -f cf_test.out
26457
26458 fi
26459 echo "$as_me:26459: result: $cf_cv_type_of_bool" >&5
26460 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26461
26462 if test "$cf_cv_type_of_bool" = unknown ; then
26463         case .$NCURSES_BOOL in
26464         (.auto|.) NCURSES_BOOL=unsigned;;
26465         esac
26466         { echo "$as_me:26466: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26467 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26468         cf_cv_type_of_bool=$NCURSES_BOOL
26469 fi
26470
26471 echo "$as_me:26471: checking for special defines needed for etip.h" >&5
26472 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26473 cf_save_CXXFLAGS="$CXXFLAGS"
26474 cf_result="none"
26475
26476 # etip.h includes ncurses.h which includes ncurses_dll.h
26477 # But ncurses_dll.h is generated - fix here.
26478 test -d include || mkdir include
26479 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
26480
26481 for cf_math in "" MATH_H
26482 do
26483 for cf_excp in "" MATH_EXCEPTION
26484 do
26485         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26486         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26487         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26488 cat >"conftest.$ac_ext" <<_ACEOF
26489 #line 26489 "configure"
26490 #include "confdefs.h"
26491
26492 #include <etip.h.in>
26493
26494 int
26495 main (void)
26496 {
26497
26498   ;
26499   return 0;
26500 }
26501 _ACEOF
26502 rm -f "conftest.$ac_objext"
26503 if { (eval echo "$as_me:26503: \"$ac_compile\"") >&5
26504   (eval $ac_compile) 2>&5
26505   ac_status=$?
26506   echo "$as_me:26506: \$? = $ac_status" >&5
26507   (exit "$ac_status"); } &&
26508          { ac_try='test -s "conftest.$ac_objext"'
26509   { (eval echo "$as_me:26509: \"$ac_try\"") >&5
26510   (eval $ac_try) 2>&5
26511   ac_status=$?
26512   echo "$as_me:26512: \$? = $ac_status" >&5
26513   (exit "$ac_status"); }; }; then
26514
26515         test -n "$cf_math" && cat >>confdefs.h <<EOF
26516 #define ETIP_NEEDS_${cf_math} 1
26517 EOF
26518
26519         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26520 #define ETIP_NEEDS_${cf_excp} 1
26521 EOF
26522
26523         cf_result="$cf_math $cf_excp"
26524         break 2
26525
26526 else
26527   echo "$as_me: failed program was:" >&5
26528 cat "conftest.$ac_ext" >&5
26529 fi
26530 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26531 done
26532 done
26533 echo "$as_me:26533: result: $cf_result" >&5
26534 echo "${ECHO_T}$cf_result" >&6
26535 CXXFLAGS="$cf_save_CXXFLAGS"
26536
26537 if test -n "$CXX"; then
26538 echo "$as_me:26538: checking if $CXX accepts override keyword" >&5
26539 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26540 if test "${cf_cv_cpp_override+set}" = set; then
26541   echo $ECHO_N "(cached) $ECHO_C" >&6
26542 else
26543
26544         ac_ext=cc
26545 ac_cpp='$CXXCPP $CPPFLAGS'
26546 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26547 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26548 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26549 ac_main_return="return"
26550
26551         if test "$cross_compiling" = yes; then
26552   cf_cv_cpp_override=unknown
26553 else
26554   cat >"conftest.$ac_ext" <<_ACEOF
26555 #line 26555 "configure"
26556 #include "confdefs.h"
26557
26558 class base
26559 {
26560 public:
26561         virtual int foo(float x) = 0;
26562 };
26563
26564 class derived: public base
26565 {
26566 public:
26567         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26568 };
26569
26570 int main(void) { }
26571
26572 _ACEOF
26573 rm -f "conftest$ac_exeext"
26574 if { (eval echo "$as_me:26574: \"$ac_link\"") >&5
26575   (eval $ac_link) 2>&5
26576   ac_status=$?
26577   echo "$as_me:26577: \$? = $ac_status" >&5
26578   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26579   { (eval echo "$as_me:26579: \"$ac_try\"") >&5
26580   (eval $ac_try) 2>&5
26581   ac_status=$?
26582   echo "$as_me:26582: \$? = $ac_status" >&5
26583   (exit "$ac_status"); }; }; then
26584   cf_cv_cpp_override=yes
26585 else
26586   echo "$as_me: program exited with status $ac_status" >&5
26587 echo "$as_me: failed program was:" >&5
26588 cat "conftest.$ac_ext" >&5
26589 cf_cv_cpp_override=no
26590 fi
26591 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26592 fi
26593         ac_ext=cc
26594 ac_cpp='$CXXCPP $CPPFLAGS'
26595 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26596 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26597 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26598 ac_main_return="return"
26599
26600 fi
26601 echo "$as_me:26601: result: $cf_cv_cpp_override" >&5
26602 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26603 fi
26604 test "$cf_cv_cpp_override" = yes &&
26605 cat >>confdefs.h <<\EOF
26606 #define CPP_HAS_OVERRIDE 1
26607 EOF
26608
26609 if test -n "$CXX"; then
26610 echo "$as_me:26610: checking if $CXX accepts parameter initialization" >&5
26611 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26612 if test "${cf_cv_cpp_param_init+set}" = set; then
26613   echo $ECHO_N "(cached) $ECHO_C" >&6
26614 else
26615
26616         ac_ext=cc
26617 ac_cpp='$CXXCPP $CPPFLAGS'
26618 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26619 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26620 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26621 ac_main_return="return"
26622
26623         if test "$cross_compiling" = yes; then
26624   cf_cv_cpp_param_init=unknown
26625 else
26626   cat >"conftest.$ac_ext" <<_ACEOF
26627 #line 26627 "configure"
26628 #include "confdefs.h"
26629
26630 class TEST {
26631 private:
26632         int value;
26633 public:
26634         TEST(int x = 1);
26635         ~TEST();
26636 };
26637
26638 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26639 {
26640         value = x;
26641 }
26642 int main(void) { }
26643
26644 _ACEOF
26645 rm -f "conftest$ac_exeext"
26646 if { (eval echo "$as_me:26646: \"$ac_link\"") >&5
26647   (eval $ac_link) 2>&5
26648   ac_status=$?
26649   echo "$as_me:26649: \$? = $ac_status" >&5
26650   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26651   { (eval echo "$as_me:26651: \"$ac_try\"") >&5
26652   (eval $ac_try) 2>&5
26653   ac_status=$?
26654   echo "$as_me:26654: \$? = $ac_status" >&5
26655   (exit "$ac_status"); }; }; then
26656   cf_cv_cpp_param_init=yes
26657 else
26658   echo "$as_me: program exited with status $ac_status" >&5
26659 echo "$as_me: failed program was:" >&5
26660 cat "conftest.$ac_ext" >&5
26661 cf_cv_cpp_param_init=no
26662 fi
26663 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26664 fi
26665         ac_ext=cc
26666 ac_cpp='$CXXCPP $CPPFLAGS'
26667 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26668 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26669 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26670 ac_main_return="return"
26671
26672 fi
26673 echo "$as_me:26673: result: $cf_cv_cpp_param_init" >&5
26674 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26675 fi
26676 test "$cf_cv_cpp_param_init" = yes &&
26677 cat >>confdefs.h <<\EOF
26678 #define CPP_HAS_PARAM_INIT 1
26679 EOF
26680
26681 if test -n "$CXX"; then
26682
26683 echo "$as_me:26683: checking if $CXX accepts static_cast" >&5
26684 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26685 if test "${cf_cv_cpp_static_cast+set}" = set; then
26686   echo $ECHO_N "(cached) $ECHO_C" >&6
26687 else
26688
26689         ac_ext=cc
26690 ac_cpp='$CXXCPP $CPPFLAGS'
26691 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26692 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26693 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26694 ac_main_return="return"
26695
26696         cat >"conftest.$ac_ext" <<_ACEOF
26697 #line 26697 "configure"
26698 #include "confdefs.h"
26699
26700 class NCursesPanel
26701 {
26702 public:
26703   NCursesPanel(int nlines,
26704                int ncols,
26705                int begin_y = 0,
26706                int begin_x = 0)
26707   {
26708   }
26709   NCursesPanel();
26710   ~NCursesPanel();
26711 };
26712
26713 template<class T> class NCursesUserPanel : public NCursesPanel
26714 {
26715 public:
26716   NCursesUserPanel (int nlines,
26717                     int ncols,
26718                     int begin_y = 0,
26719                     int begin_x = 0,
26720                     const T* p_UserData = static_cast<T*>(0))
26721     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26722   {
26723   };
26724   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26725   {
26726   };
26727
26728   virtual ~NCursesUserPanel() {};
26729 };
26730
26731 int
26732 main (void)
26733 {
26734
26735         const char* p_UserData = static_cast<char*>(0)
26736   ;
26737   return 0;
26738 }
26739 _ACEOF
26740 rm -f "conftest.$ac_objext"
26741 if { (eval echo "$as_me:26741: \"$ac_compile\"") >&5
26742   (eval $ac_compile) 2>&5
26743   ac_status=$?
26744   echo "$as_me:26744: \$? = $ac_status" >&5
26745   (exit "$ac_status"); } &&
26746          { ac_try='test -s "conftest.$ac_objext"'
26747   { (eval echo "$as_me:26747: \"$ac_try\"") >&5
26748   (eval $ac_try) 2>&5
26749   ac_status=$?
26750   echo "$as_me:26750: \$? = $ac_status" >&5
26751   (exit "$ac_status"); }; }; then
26752   cf_cv_cpp_static_cast=yes
26753 else
26754   echo "$as_me: failed program was:" >&5
26755 cat "conftest.$ac_ext" >&5
26756 cf_cv_cpp_static_cast=no
26757 fi
26758 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26759
26760         ac_ext=cc
26761 ac_cpp='$CXXCPP $CPPFLAGS'
26762 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26763 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26764 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26765 ac_main_return="return"
26766
26767 fi
26768 echo "$as_me:26768: result: $cf_cv_cpp_static_cast" >&5
26769 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26770
26771 fi
26772
26773 test "$cf_cv_cpp_static_cast" = yes &&
26774 cat >>confdefs.h <<\EOF
26775 #define CPP_HAS_STATIC_CAST 1
26776 EOF
26777
26778         CXX_AR='$(AR)'
26779         CXX_ARFLAGS='$(ARFLAGS)'
26780         case "$cf_cv_system_name" in
26781         (irix*)
26782             if test "$GXX" != yes ; then
26783                 CXX_AR='$(CXX)'
26784                 CXX_ARFLAGS='-ar -o'
26785             fi
26786             ;;
26787         (sco3.2v5*)
26788             CXXLDFLAGS="-u main"
26789             ;;
26790         (solaris2*)
26791             if test "$GXX" != yes ; then
26792                 CXX_AR='$(CXX)'
26793                 CXX_ARFLAGS='-xar -o'
26794             fi
26795             ;;
26796         esac
26797
26798 else
26799         cf_cxx_library=no
26800         cf_cv_builtin_bool=1
26801
26802         # Just because we are not configuring against C++ right now does not
26803         # mean that a user will not want to use C++.  Some distributors disable
26804         # the C++ portion of this configuration as a shortcut (or just to avoid
26805         # compiling the demo in the c++ directory).  So we need a reasonable
26806         # default for the 'bool' type.
26807         #
26808         # Caveat: since the storage of the bool type is not standardized, it
26809         # may change.
26810
26811         if test "$NCURSES_BOOL" != auto ; then
26812                 cf_cv_type_of_bool=$NCURSES_BOOL
26813                 cf_cv_header_stdbool_h=0
26814         else
26815                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26816
26817 echo "$as_me:26817: checking for bool" >&5
26818 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26819 if test "${ac_cv_type_bool+set}" = set; then
26820   echo $ECHO_N "(cached) $ECHO_C" >&6
26821 else
26822   cat >"conftest.$ac_ext" <<_ACEOF
26823 #line 26823 "configure"
26824 #include "confdefs.h"
26825
26826 $ac_includes_default
26827
26828 #if defined(__cplusplus)
26829
26830 #ifdef HAVE_GXX_BUILTIN_H
26831 #include <g++/builtin.h>
26832 #elif HAVE_GPP_BUILTIN_H
26833 #include <gpp/builtin.h>
26834 #elif HAVE_BUILTIN_H
26835 #include <builtin.h>
26836 #endif
26837
26838 #else
26839
26840 #if $cf_cv_header_stdbool_h
26841 #include <stdbool.h>
26842 #endif
26843
26844 #endif
26845
26846 int
26847 main (void)
26848 {
26849 if ((bool *) 0)
26850   return 0;
26851 if (sizeof (bool))
26852   return 0;
26853   ;
26854   return 0;
26855 }
26856 _ACEOF
26857 rm -f "conftest.$ac_objext"
26858 if { (eval echo "$as_me:26858: \"$ac_compile\"") >&5
26859   (eval $ac_compile) 2>&5
26860   ac_status=$?
26861   echo "$as_me:26861: \$? = $ac_status" >&5
26862   (exit "$ac_status"); } &&
26863          { ac_try='test -s "conftest.$ac_objext"'
26864   { (eval echo "$as_me:26864: \"$ac_try\"") >&5
26865   (eval $ac_try) 2>&5
26866   ac_status=$?
26867   echo "$as_me:26867: \$? = $ac_status" >&5
26868   (exit "$ac_status"); }; }; then
26869   ac_cv_type_bool=yes
26870 else
26871   echo "$as_me: failed program was:" >&5
26872 cat "conftest.$ac_ext" >&5
26873 ac_cv_type_bool=no
26874 fi
26875 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26876 fi
26877 echo "$as_me:26877: result: $ac_cv_type_bool" >&5
26878 echo "${ECHO_T}$ac_cv_type_bool" >&6
26879
26880 echo "$as_me:26880: checking size of bool" >&5
26881 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26882 if test "${ac_cv_sizeof_bool+set}" = set; then
26883   echo $ECHO_N "(cached) $ECHO_C" >&6
26884 else
26885   if test "$ac_cv_type_bool" = yes; then
26886   if test "$cross_compiling" = yes; then
26887   # Depending upon the size, compute the lo and hi bounds.
26888 cat >"conftest.$ac_ext" <<_ACEOF
26889 #line 26889 "configure"
26890 #include "confdefs.h"
26891
26892 $ac_includes_default
26893
26894 #if defined(__cplusplus)
26895
26896 #ifdef HAVE_GXX_BUILTIN_H
26897 #include <g++/builtin.h>
26898 #elif HAVE_GPP_BUILTIN_H
26899 #include <gpp/builtin.h>
26900 #elif HAVE_BUILTIN_H
26901 #include <builtin.h>
26902 #endif
26903
26904 #else
26905
26906 #if $cf_cv_header_stdbool_h
26907 #include <stdbool.h>
26908 #endif
26909
26910 #endif
26911
26912 int
26913 main (void)
26914 {
26915 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26916   ;
26917   return 0;
26918 }
26919 _ACEOF
26920 rm -f "conftest.$ac_objext"
26921 if { (eval echo "$as_me:26921: \"$ac_compile\"") >&5
26922   (eval $ac_compile) 2>&5
26923   ac_status=$?
26924   echo "$as_me:26924: \$? = $ac_status" >&5
26925   (exit "$ac_status"); } &&
26926          { ac_try='test -s "conftest.$ac_objext"'
26927   { (eval echo "$as_me:26927: \"$ac_try\"") >&5
26928   (eval $ac_try) 2>&5
26929   ac_status=$?
26930   echo "$as_me:26930: \$? = $ac_status" >&5
26931   (exit "$ac_status"); }; }; then
26932   ac_lo=0 ac_mid=0
26933   while :; do
26934     cat >"conftest.$ac_ext" <<_ACEOF
26935 #line 26935 "configure"
26936 #include "confdefs.h"
26937
26938 $ac_includes_default
26939
26940 #if defined(__cplusplus)
26941
26942 #ifdef HAVE_GXX_BUILTIN_H
26943 #include <g++/builtin.h>
26944 #elif HAVE_GPP_BUILTIN_H
26945 #include <gpp/builtin.h>
26946 #elif HAVE_BUILTIN_H
26947 #include <builtin.h>
26948 #endif
26949
26950 #else
26951
26952 #if $cf_cv_header_stdbool_h
26953 #include <stdbool.h>
26954 #endif
26955
26956 #endif
26957
26958 int
26959 main (void)
26960 {
26961 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26962   ;
26963   return 0;
26964 }
26965 _ACEOF
26966 rm -f "conftest.$ac_objext"
26967 if { (eval echo "$as_me:26967: \"$ac_compile\"") >&5
26968   (eval $ac_compile) 2>&5
26969   ac_status=$?
26970   echo "$as_me:26970: \$? = $ac_status" >&5
26971   (exit "$ac_status"); } &&
26972          { ac_try='test -s "conftest.$ac_objext"'
26973   { (eval echo "$as_me:26973: \"$ac_try\"") >&5
26974   (eval $ac_try) 2>&5
26975   ac_status=$?
26976   echo "$as_me:26976: \$? = $ac_status" >&5
26977   (exit "$ac_status"); }; }; then
26978   ac_hi=$ac_mid; break
26979 else
26980   echo "$as_me: failed program was:" >&5
26981 cat "conftest.$ac_ext" >&5
26982 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26983 fi
26984 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26985   done
26986 else
26987   echo "$as_me: failed program was:" >&5
26988 cat "conftest.$ac_ext" >&5
26989 ac_hi=-1 ac_mid=-1
26990   while :; do
26991     cat >"conftest.$ac_ext" <<_ACEOF
26992 #line 26992 "configure"
26993 #include "confdefs.h"
26994
26995 $ac_includes_default
26996
26997 #if defined(__cplusplus)
26998
26999 #ifdef HAVE_GXX_BUILTIN_H
27000 #include <g++/builtin.h>
27001 #elif HAVE_GPP_BUILTIN_H
27002 #include <gpp/builtin.h>
27003 #elif HAVE_BUILTIN_H
27004 #include <builtin.h>
27005 #endif
27006
27007 #else
27008
27009 #if $cf_cv_header_stdbool_h
27010 #include <stdbool.h>
27011 #endif
27012
27013 #endif
27014
27015 int
27016 main (void)
27017 {
27018 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27019   ;
27020   return 0;
27021 }
27022 _ACEOF
27023 rm -f "conftest.$ac_objext"
27024 if { (eval echo "$as_me:27024: \"$ac_compile\"") >&5
27025   (eval $ac_compile) 2>&5
27026   ac_status=$?
27027   echo "$as_me:27027: \$? = $ac_status" >&5
27028   (exit "$ac_status"); } &&
27029          { ac_try='test -s "conftest.$ac_objext"'
27030   { (eval echo "$as_me:27030: \"$ac_try\"") >&5
27031   (eval $ac_try) 2>&5
27032   ac_status=$?
27033   echo "$as_me:27033: \$? = $ac_status" >&5
27034   (exit "$ac_status"); }; }; then
27035   ac_lo=$ac_mid; break
27036 else
27037   echo "$as_me: failed program was:" >&5
27038 cat "conftest.$ac_ext" >&5
27039 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27040 fi
27041 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27042   done
27043 fi
27044 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27045 # Binary search between lo and hi bounds.
27046 while test "x$ac_lo" != "x$ac_hi"; do
27047   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27048   cat >"conftest.$ac_ext" <<_ACEOF
27049 #line 27049 "configure"
27050 #include "confdefs.h"
27051
27052 $ac_includes_default
27053
27054 #if defined(__cplusplus)
27055
27056 #ifdef HAVE_GXX_BUILTIN_H
27057 #include <g++/builtin.h>
27058 #elif HAVE_GPP_BUILTIN_H
27059 #include <gpp/builtin.h>
27060 #elif HAVE_BUILTIN_H
27061 #include <builtin.h>
27062 #endif
27063
27064 #else
27065
27066 #if $cf_cv_header_stdbool_h
27067 #include <stdbool.h>
27068 #endif
27069
27070 #endif
27071
27072 int
27073 main (void)
27074 {
27075 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27076   ;
27077   return 0;
27078 }
27079 _ACEOF
27080 rm -f "conftest.$ac_objext"
27081 if { (eval echo "$as_me:27081: \"$ac_compile\"") >&5
27082   (eval $ac_compile) 2>&5
27083   ac_status=$?
27084   echo "$as_me:27084: \$? = $ac_status" >&5
27085   (exit "$ac_status"); } &&
27086          { ac_try='test -s "conftest.$ac_objext"'
27087   { (eval echo "$as_me:27087: \"$ac_try\"") >&5
27088   (eval $ac_try) 2>&5
27089   ac_status=$?
27090   echo "$as_me:27090: \$? = $ac_status" >&5
27091   (exit "$ac_status"); }; }; then
27092   ac_hi=$ac_mid
27093 else
27094   echo "$as_me: failed program was:" >&5
27095 cat "conftest.$ac_ext" >&5
27096 ac_lo=`expr "$ac_mid" + 1`
27097 fi
27098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27099 done
27100 ac_cv_sizeof_bool=$ac_lo
27101 else
27102   if test "$cross_compiling" = yes; then
27103   { { echo "$as_me:27103: error: cannot run test program while cross compiling" >&5
27104 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27105    { (exit 1); exit 1; }; }
27106 else
27107   cat >"conftest.$ac_ext" <<_ACEOF
27108 #line 27108 "configure"
27109 #include "confdefs.h"
27110
27111 $ac_includes_default
27112
27113 #if defined(__cplusplus)
27114
27115 #ifdef HAVE_GXX_BUILTIN_H
27116 #include <g++/builtin.h>
27117 #elif HAVE_GPP_BUILTIN_H
27118 #include <gpp/builtin.h>
27119 #elif HAVE_BUILTIN_H
27120 #include <builtin.h>
27121 #endif
27122
27123 #else
27124
27125 #if $cf_cv_header_stdbool_h
27126 #include <stdbool.h>
27127 #endif
27128
27129 #endif
27130
27131 int
27132 main (void)
27133 {
27134 FILE *f = fopen ("conftest.val", "w");
27135 if (!f)
27136   $ac_main_return (1);
27137 fprintf (f, "%ld", (long)(sizeof (bool)));
27138 fclose (f);
27139   ;
27140   return 0;
27141 }
27142 _ACEOF
27143 rm -f "conftest$ac_exeext"
27144 if { (eval echo "$as_me:27144: \"$ac_link\"") >&5
27145   (eval $ac_link) 2>&5
27146   ac_status=$?
27147   echo "$as_me:27147: \$? = $ac_status" >&5
27148   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27149   { (eval echo "$as_me:27149: \"$ac_try\"") >&5
27150   (eval $ac_try) 2>&5
27151   ac_status=$?
27152   echo "$as_me:27152: \$? = $ac_status" >&5
27153   (exit "$ac_status"); }; }; then
27154   ac_cv_sizeof_bool=`cat conftest.val`
27155 else
27156   echo "$as_me: program exited with status $ac_status" >&5
27157 echo "$as_me: failed program was:" >&5
27158 cat "conftest.$ac_ext" >&5
27159 fi
27160 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27161 fi
27162 fi
27163 rm -f conftest.val
27164 else
27165   ac_cv_sizeof_bool=0
27166 fi
27167 fi
27168 echo "$as_me:27168: result: $ac_cv_sizeof_bool" >&5
27169 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27170 cat >>confdefs.h <<EOF
27171 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27172 EOF
27173
27174 echo "$as_me:27174: checking for type of bool" >&5
27175 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27176 if test "${cf_cv_type_of_bool+set}" = set; then
27177   echo $ECHO_N "(cached) $ECHO_C" >&6
27178 else
27179
27180         rm -f cf_test.out
27181         if test "$cross_compiling" = yes; then
27182
27183                 case x$ac_cv_sizeof_bool in
27184                 (x1) cf_cv_type_of_bool="unsigned char";;
27185                 (x2) cf_cv_type_of_bool="unsigned short";;
27186                 (x4) cf_cv_type_of_bool="unsigned int";;
27187                 (x8) cf_cv_type_of_bool="unsigned long";;
27188                 (*)  cf_cv_type_of_bool=unknown;;
27189                 esac
27190
27191 else
27192   cat >"conftest.$ac_ext" <<_ACEOF
27193 #line 27193 "configure"
27194 #include "confdefs.h"
27195
27196 $ac_includes_default
27197
27198 #if defined(__cplusplus)
27199
27200 #ifdef HAVE_GXX_BUILTIN_H
27201 #include <g++/builtin.h>
27202 #elif HAVE_GPP_BUILTIN_H
27203 #include <gpp/builtin.h>
27204 #elif HAVE_BUILTIN_H
27205 #include <builtin.h>
27206 #endif
27207
27208 #else
27209
27210 #if $cf_cv_header_stdbool_h
27211 #include <stdbool.h>
27212 #endif
27213
27214 #endif
27215
27216 int main(void)
27217 {
27218         FILE *fp = fopen("cf_test.out", "w");
27219         if (fp != 0) {
27220                 bool x = true;
27221                 if ((bool)(-x) >= 0)
27222                         fputs("unsigned ", fp);
27223                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27224                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27225                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27226                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27227                 fclose(fp);
27228         }
27229         ${cf_cv_main_return:-return}(0);
27230 }
27231
27232 _ACEOF
27233 rm -f "conftest$ac_exeext"
27234 if { (eval echo "$as_me:27234: \"$ac_link\"") >&5
27235   (eval $ac_link) 2>&5
27236   ac_status=$?
27237   echo "$as_me:27237: \$? = $ac_status" >&5
27238   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27239   { (eval echo "$as_me:27239: \"$ac_try\"") >&5
27240   (eval $ac_try) 2>&5
27241   ac_status=$?
27242   echo "$as_me:27242: \$? = $ac_status" >&5
27243   (exit "$ac_status"); }; }; then
27244   cf_cv_type_of_bool=`cat cf_test.out`
27245                  if test -z "$cf_cv_type_of_bool"; then
27246                    cf_cv_type_of_bool=unknown
27247                  fi
27248 else
27249   echo "$as_me: program exited with status $ac_status" >&5
27250 echo "$as_me: failed program was:" >&5
27251 cat "conftest.$ac_ext" >&5
27252 cf_cv_type_of_bool=unknown
27253 fi
27254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27255 fi
27256         rm -f cf_test.out
27257
27258 fi
27259 echo "$as_me:27259: result: $cf_cv_type_of_bool" >&5
27260 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27261
27262 if test "$cf_cv_type_of_bool" = unknown ; then
27263         case .$NCURSES_BOOL in
27264         (.auto|.) NCURSES_BOOL=unsigned;;
27265         esac
27266         { echo "$as_me:27266: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27267 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27268         cf_cv_type_of_bool=$NCURSES_BOOL
27269 fi
27270
27271                 else
27272                         echo "$as_me:27272: checking for fallback type of bool" >&5
27273 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27274                         case "$host_cpu" in
27275                         (i?86)  cf_cv_type_of_bool=char ;;
27276                         (*)     cf_cv_type_of_bool=int  ;;
27277                         esac
27278                         echo "$as_me:27278: result: $cf_cv_type_of_bool" >&5
27279 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27280                 fi
27281         fi
27282 fi
27283
27284 # If the C compiler did not declare bool, and we did not determine that the C++
27285 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27286 # ncurses library use the same type as C++ bool.  Note that this allows one to
27287 # specify the type of bool in a configure-script option and postpone
27288 # integration with the C++ compiler provided that the types are compatible.
27289 USE_CXX_BOOL=1
27290 if test "$cf_cv_cc_bool_type" = 1
27291 then
27292         # oops: C has a bool.  Unlikely, but C++ could differ.
27293         USE_CXX_BOOL=0
27294 elif test "$cf_cv_builtin_bool" = 0
27295 then
27296         # C++ has no bool
27297         USE_CXX_BOOL=0
27298 else
27299         # this is the normal case
27300         USE_CXX_BOOL='defined(__cplusplus)'
27301 fi
27302
27303 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27304
27305         if test "$cf_with_ada" != "no" ; then
27306                 if test "$with_libtool" != "no"; then
27307                         { echo "$as_me:27307: WARNING: libtool does not support Ada - disabling feature" >&5
27308 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27309                         cf_with_ada=no
27310                 fi
27311         fi
27312
27313         if test "$cf_with_ada" != "no" ; then
27314
27315 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27316 do
27317
27318 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27319
27320         unset ac_cv_path_cf_TEMP_gnat
27321         unset cf_TEMP_gnat
27322         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27323 set dummy $cf_prog_gnat; ac_word=$2
27324 echo "$as_me:27324: checking for $ac_word" >&5
27325 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27326 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27327   echo $ECHO_N "(cached) $ECHO_C" >&6
27328 else
27329   case $cf_TEMP_gnat in
27330   [\\/]* | ?:[\\/]*)
27331   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27332   ;;
27333   *)
27334   ac_save_IFS=$IFS; IFS=$ac_path_separator
27335 ac_dummy="$PATH"
27336 for ac_dir in $ac_dummy; do
27337   IFS=$ac_save_IFS
27338   test -z "$ac_dir" && ac_dir=.
27339   if $as_executable_p "$ac_dir/$ac_word"; then
27340    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27341    echo "$as_me:27341: found $ac_dir/$ac_word" >&5
27342    break
27343 fi
27344 done
27345
27346   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27347   ;;
27348 esac
27349 fi
27350 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27351
27352 if test -n "$cf_TEMP_gnat"; then
27353   echo "$as_me:27353: result: $cf_TEMP_gnat" >&5
27354 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27355 else
27356   echo "$as_me:27356: result: no" >&5
27357 echo "${ECHO_T}no" >&6
27358 fi
27359
27360         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27361
27362         if test "x$cf_TEMP_gnat" != xno; then
27363                 unset cf_cv_gnat_version
27364                 unset cf_TEMP_gnat
27365
27366 echo "$as_me:27366: checking for $cf_prog_gnat version" >&5
27367 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27368 if test "${cf_cv_gnat_version+set}" = set; then
27369   echo $ECHO_N "(cached) $ECHO_C" >&6
27370 else
27371
27372 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27373         grep '[0-9].[0-9][0-9]*' |\
27374         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27375
27376 fi
27377 echo "$as_me:27377: result: $cf_cv_gnat_version" >&5
27378 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27379 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27380 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27381
27382         fi
27383         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27384
27385         unset cf_TEMP_gnat
27386         unset cf_cv_gnat_version
27387         unset ac_cv_path_cf_TEMP_gnat
27388 done
27389
27390 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27391         cf_ada_make=
27392         cf_cv_prog_gnat_correct=no
27393 else
27394         cf_ada_make=gnatmake
27395         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27396                 # gprconfig is newer than gnatmake; we can continue...
27397                 cf_ada_config="##"
27398         else
27399                 rm -rf ./conftest* ./*~conftest*
27400                 if mkdir conftest.src
27401                 then
27402                         cf_ada_config=""
27403                         cd conftest.src
27404                         for cf_gprconfig in Ada C
27405                         do
27406                                 echo "$as_me:27406: checking for gprconfig name for $cf_gprconfig" >&5
27407 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27408                                 if test "$cf_gprconfig" = C
27409                                 then
27410                                         for cf_gprconfig_param in \
27411                                                 "$cf_gprconfig,,,,GNATGCC" \
27412                                                 "$cf_gprconfig,,,,GCC" \
27413                                                 "$cf_gprconfig"
27414                                         do
27415                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27416                                                 test -n "$cf_gprconfig_value" && break
27417                                         done
27418                                 else
27419                                         cf_gprconfig_param=$cf_gprconfig
27420                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27421                                 fi
27422                                 if test -n "$cf_gprconfig_value"
27423                                 then
27424                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27425                                         echo "$as_me:27425: result: $cf_gprconfig_value" >&5
27426 echo "${ECHO_T}$cf_gprconfig_value" >&6
27427                                 else
27428                                         echo "$as_me:27428: result: missing" >&5
27429 echo "${ECHO_T}missing" >&6
27430                                         cf_ada_config="#"
27431                                         break
27432                                 fi
27433                         done
27434                         cd ..
27435                         rm -rf ./conftest* ./*~conftest*
27436                 fi
27437         fi
27438         if test "x$cf_ada_config" != "x#"
27439         then
27440
27441 echo "$as_me:27441: checking for gnat version" >&5
27442 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27443 if test "${cf_cv_gnat_version+set}" = set; then
27444   echo $ECHO_N "(cached) $ECHO_C" >&6
27445 else
27446
27447 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27448         grep '[0-9].[0-9][0-9]*' |\
27449         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27450
27451 fi
27452 echo "$as_me:27452: result: $cf_cv_gnat_version" >&5
27453 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27454 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27455
27456 case "$cf_cv_gnat_version" in
27457 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27458         cf_cv_prog_gnat_correct=yes
27459         ;;
27460 (*)
27461         { echo "$as_me:27461: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27462 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27463         cf_cv_prog_gnat_correct=no
27464         ;;
27465 esac
27466
27467                 # Extract the first word of "m4", so it can be a program name with args.
27468 set dummy m4; ac_word=$2
27469 echo "$as_me:27469: checking for $ac_word" >&5
27470 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27471 if test "${ac_cv_prog_M4_exists+set}" = set; then
27472   echo $ECHO_N "(cached) $ECHO_C" >&6
27473 else
27474   if test -n "$M4_exists"; then
27475   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27476 else
27477   ac_save_IFS=$IFS; IFS=$ac_path_separator
27478 ac_dummy="$PATH"
27479 for ac_dir in $ac_dummy; do
27480   IFS=$ac_save_IFS
27481   test -z "$ac_dir" && ac_dir=.
27482   $as_executable_p "$ac_dir/$ac_word" || continue
27483 ac_cv_prog_M4_exists="yes"
27484 echo "$as_me:27484: found $ac_dir/$ac_word" >&5
27485 break
27486 done
27487
27488   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27489 fi
27490 fi
27491 M4_exists=$ac_cv_prog_M4_exists
27492 if test -n "$M4_exists"; then
27493   echo "$as_me:27493: result: $M4_exists" >&5
27494 echo "${ECHO_T}$M4_exists" >&6
27495 else
27496   echo "$as_me:27496: result: no" >&5
27497 echo "${ECHO_T}no" >&6
27498 fi
27499
27500                 if test "$ac_cv_prog_M4_exists" = no; then
27501                         cf_cv_prog_gnat_correct=no
27502                         { echo "$as_me:27502: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27503 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27504                 fi
27505                 if test "$cf_cv_prog_gnat_correct" = yes; then
27506                         echo "$as_me:27506: checking if GNAT works" >&5
27507 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27508
27509 rm -rf ./conftest* ./*~conftest*
27510 cat >>conftest.ads <<CF_EOF
27511 procedure conftest;
27512 CF_EOF
27513 cat >>conftest.adb <<CF_EOF
27514 with Text_IO;
27515 with GNAT.OS_Lib;
27516 procedure conftest is
27517 begin
27518    Text_IO.Put ("Hello World");
27519    Text_IO.New_Line;
27520    GNAT.OS_Lib.OS_Exit (0);
27521 end conftest;
27522 CF_EOF
27523 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27524    if ( ./conftest 1>&5 2>&1 ) ; then
27525       cf_cv_prog_gnat_correct=yes
27526    else
27527       cf_cv_prog_gnat_correct=no
27528    fi
27529 else
27530    cf_cv_prog_gnat_correct=no
27531 fi
27532 rm -rf ./conftest* ./*~conftest*
27533
27534                         echo "$as_me:27534: result: $cf_cv_prog_gnat_correct" >&5
27535 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27536                 fi
27537         else
27538                 cf_cv_prog_gnat_correct=no
27539         fi
27540 fi
27541
27542                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27543
27544         ADAFLAGS="$ADAFLAGS -gnatpn"
27545
27546         echo "$as_me:27546: checking optimization options for ADAFLAGS" >&5
27547 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27548         case "$CFLAGS" in
27549         (*-g*)
27550
27551         ADAFLAGS="$ADAFLAGS -g"
27552
27553                 ;;
27554         esac
27555         case "$CFLAGS" in
27556         (*-O*)
27557                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27558
27559         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27560
27561                 ;;
27562         esac
27563         echo "$as_me:27563: result: $ADAFLAGS" >&5
27564 echo "${ECHO_T}$ADAFLAGS" >&6
27565
27566 echo "$as_me:27566: checking if GNATPREP supports -T option" >&5
27567 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27568 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27569   echo $ECHO_N "(cached) $ECHO_C" >&6
27570 else
27571
27572 cf_cv_gnatprep_opt_t=no
27573 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27574
27575 fi
27576 echo "$as_me:27576: result: $cf_cv_gnatprep_opt_t" >&5
27577 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27578 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27579
27580 echo "$as_me:27580: checking if GNAT supports generics" >&5
27581 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27582 case "$cf_cv_gnat_version" in
27583 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27584         cf_gnat_generics=yes
27585         ;;
27586 (*)
27587         cf_gnat_generics=no
27588         ;;
27589 esac
27590 echo "$as_me:27590: result: $cf_gnat_generics" >&5
27591 echo "${ECHO_T}$cf_gnat_generics" >&6
27592
27593 if test "$cf_gnat_generics" = yes
27594 then
27595         cf_compile_generics=generics
27596         cf_generic_objects="\${GENOBJS}"
27597 else
27598         cf_compile_generics=
27599         cf_generic_objects=
27600 fi
27601
27602 echo "$as_me:27602: checking if GNAT supports SIGINT" >&5
27603 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27604 if test "${cf_cv_gnat_sigint+set}" = set; then
27605   echo $ECHO_N "(cached) $ECHO_C" >&6
27606 else
27607
27608 rm -rf ./conftest* ./*~conftest*
27609 cat >>conftest.ads <<CF_EOF
27610 with Ada.Interrupts.Names;
27611
27612 package ConfTest is
27613
27614    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27615    pragma Unreserve_All_Interrupts;
27616    pragma Warnings (On);
27617
27618    protected Process is
27619       procedure Stop;
27620       function Continue return Boolean;
27621       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27622    private
27623       Done : Boolean := False;
27624    end Process;
27625
27626 end ConfTest;
27627 CF_EOF
27628 cat >>conftest.adb <<CF_EOF
27629 package body ConfTest is
27630    protected body Process is
27631       procedure Stop is
27632       begin
27633          Done := True;
27634       end Stop;
27635       function Continue return Boolean is
27636       begin
27637          return not Done;
27638       end Continue;
27639    end Process;
27640 end ConfTest;
27641 CF_EOF
27642 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27643       cf_cv_gnat_sigint=yes
27644 else
27645    cf_cv_gnat_sigint=no
27646 fi
27647 rm -rf ./conftest* ./*~conftest*
27648
27649 fi
27650 echo "$as_me:27650: result: $cf_cv_gnat_sigint" >&5
27651 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27652
27653 if test "$cf_cv_gnat_sigint" = yes ; then
27654         USE_GNAT_SIGINT=""
27655 else
27656         USE_GNAT_SIGINT="#"
27657 fi
27658
27659 cf_gnat_libraries=no
27660 cf_gnat_projects=no
27661
27662 if test "$enable_gnat_projects" != no ; then
27663 echo "$as_me:27663: checking if GNAT supports project files" >&5
27664 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27665 case "$cf_cv_gnat_version" in
27666 (3.[0-9]*)
27667         ;;
27668 (*)
27669         case "$cf_cv_system_name" in
27670         (cygwin*|msys*)
27671                 ;;
27672         (*)
27673                 rm -rf ./conftest* ./*~conftest*
27674                 if mkdir conftest.src conftest.bin conftest.lib
27675                 then
27676                         cd conftest.src
27677                         rm -rf ./conftest* ./*~conftest*
27678                         cat >>library.gpr <<CF_EOF
27679 project Library is
27680   Kind := External ("LIB_KIND");
27681   for Library_Name use "ConfTest";
27682   for Object_Dir use ".";
27683   for Library_ALI_Dir use External("LIBRARY_DIR");
27684   for Library_Version use External ("SONAME");
27685   for Library_Kind use Kind;
27686   for Library_Dir use External("BUILD_DIR");
27687   Source_Dir := External ("SOURCE_DIR");
27688   for Source_Dirs use (Source_Dir);
27689 end Library;
27690 CF_EOF
27691                         cat >>confpackage.ads <<CF_EOF
27692 package ConfPackage is
27693    procedure conftest;
27694 end ConfPackage;
27695 CF_EOF
27696                         cat >>confpackage.adb <<CF_EOF
27697 with Text_IO;
27698 package body ConfPackage is
27699    procedure conftest is
27700    begin
27701       Text_IO.Put ("Hello World");
27702       Text_IO.New_Line;
27703    end conftest;
27704 end ConfPackage;
27705 CF_EOF
27706                         if ( "$cf_ada_make" $ADAFLAGS \
27707                                         -Plibrary.gpr \
27708                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27709                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27710                                         -XSOURCE_DIR="`pwd`" \
27711                                         -XSONAME=libConfTest.so.1 \
27712                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27713                                 cf_gnat_projects=yes
27714                         fi
27715                         cd ..
27716                 fi
27717                 if test -f conftest.lib/confpackage.ali
27718                 then
27719                         cf_gnat_libraries=yes
27720                 fi
27721                 rm -rf ./conftest* ./*~conftest*
27722                 ;;
27723         esac
27724         ;;
27725 esac
27726 echo "$as_me:27726: result: $cf_gnat_projects" >&5
27727 echo "${ECHO_T}$cf_gnat_projects" >&6
27728 fi # enable_gnat_projects
27729
27730 if test "$cf_gnat_projects" = yes
27731 then
27732         echo "$as_me:27732: checking if GNAT supports libraries" >&5
27733 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27734         echo "$as_me:27734: result: $cf_gnat_libraries" >&5
27735 echo "${ECHO_T}$cf_gnat_libraries" >&6
27736 fi
27737
27738 USE_OLD_MAKERULES=""
27739 USE_GNAT_PROJECTS="#"
27740 USE_GNAT_MAKE_GPR="#"
27741 USE_GNAT_GPRBUILD="#"
27742
27743 if test "$cf_gnat_projects" = yes
27744 then
27745         USE_OLD_MAKERULES="#"
27746         USE_GNAT_PROJECTS=""
27747         if test "$cf_cv_VERSION_GPRBUILD" != no
27748         then
27749                 USE_GNAT_GPRBUILD=""
27750         elif test "$cf_cv_VERSION_GNATMAKE" != no
27751         then
27752                 USE_GNAT_MAKE_GPR=""
27753         else
27754                 { echo "$as_me:27754: WARNING: use old makefile rules since tools are missing" >&5
27755 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27756         fi
27757 fi
27758
27759 if test "$cf_gnat_libraries" = yes
27760 then
27761         USE_GNAT_LIBRARIES=""
27762 else
27763         USE_GNAT_LIBRARIES="#"
27764 fi
27765
27766 echo "$as_me:27766: checking for ada-compiler" >&5
27767 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27768
27769 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27770 if test "${with_ada_compiler+set}" = set; then
27771   withval="$with_ada_compiler"
27772   cf_ada_compiler=$withval
27773 else
27774   cf_ada_compiler=gnatmake
27775 fi;
27776
27777 echo "$as_me:27777: result: $cf_ada_compiler" >&5
27778 echo "${ECHO_T}$cf_ada_compiler" >&6
27779
27780                         cf_ada_package=terminal_interface
27781
27782 echo "$as_me:27782: checking for ada-include" >&5
27783 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27784
27785 # Check whether --with-ada-include or --without-ada-include was given.
27786 if test "${with_ada_include+set}" = set; then
27787   withval="$with_ada_include"
27788
27789 else
27790   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27791 fi; if test -n "$prefix/share/ada/adainclude" ; then
27792
27793 if test "x$prefix" != xNONE; then
27794         cf_path_syntax="$prefix"
27795 else
27796         cf_path_syntax="$ac_default_prefix"
27797 fi
27798
27799 case ".$withval" in
27800 (.\$\(*\)*|.\'*\'*)
27801         ;;
27802 (..|./*|.\\*)
27803         ;;
27804 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27805         ;;
27806 (.\$\{*prefix\}*|.\$\{*dir\}*)
27807         eval withval="$withval"
27808         case ".$withval" in
27809         (.NONE/*)
27810                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27811                 ;;
27812         esac
27813         ;;
27814 (.no|.NONE/*)
27815         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27816         ;;
27817 (*)
27818         { { echo "$as_me:27818: error: expected a pathname, not \"$withval\"" >&5
27819 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27820    { (exit 1); exit 1; }; }
27821         ;;
27822 esac
27823
27824 fi
27825 eval ADA_INCLUDE="$withval"
27826
27827 echo "$as_me:27827: result: $ADA_INCLUDE" >&5
27828 echo "${ECHO_T}$ADA_INCLUDE" >&6
27829
27830 echo "$as_me:27830: checking for ada-objects" >&5
27831 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27832
27833 # Check whether --with-ada-objects or --without-ada-objects was given.
27834 if test "${with_ada_objects+set}" = set; then
27835   withval="$with_ada_objects"
27836
27837 else
27838   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27839 fi; if test -n "$prefix/lib/ada/adalib" ; then
27840
27841 if test "x$prefix" != xNONE; then
27842         cf_path_syntax="$prefix"
27843 else
27844         cf_path_syntax="$ac_default_prefix"
27845 fi
27846
27847 case ".$withval" in
27848 (.\$\(*\)*|.\'*\'*)
27849         ;;
27850 (..|./*|.\\*)
27851         ;;
27852 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27853         ;;
27854 (.\$\{*prefix\}*|.\$\{*dir\}*)
27855         eval withval="$withval"
27856         case ".$withval" in
27857         (.NONE/*)
27858                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27859                 ;;
27860         esac
27861         ;;
27862 (.no|.NONE/*)
27863         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27864         ;;
27865 (*)
27866         { { echo "$as_me:27866: error: expected a pathname, not \"$withval\"" >&5
27867 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27868    { (exit 1); exit 1; }; }
27869         ;;
27870 esac
27871
27872 fi
27873 eval ADA_OBJECTS="$withval"
27874
27875 echo "$as_me:27875: result: $ADA_OBJECTS" >&5
27876 echo "${ECHO_T}$ADA_OBJECTS" >&6
27877
27878 echo "$as_me:27878: checking if an Ada95 shared-library should be built" >&5
27879 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27880
27881 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27882 if test "${with_ada_sharedlib+set}" = set; then
27883   withval="$with_ada_sharedlib"
27884   with_ada_sharedlib=$withval
27885 else
27886   with_ada_sharedlib=no
27887 fi;
27888 echo "$as_me:27888: result: $with_ada_sharedlib" >&5
27889 echo "${ECHO_T}$with_ada_sharedlib" >&6
27890
27891 if test "x$with_ada_sharedlib" != xno
27892 then
27893         if test "x$cf_gnat_projects" != xyes
27894         then
27895                 { echo "$as_me:27895: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27896 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27897                 with_ada_sharedlib=no
27898         fi
27899 fi
27900
27901 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27902 MAKE_ADA_SHAREDLIB="#"
27903
27904 if test "x$with_ada_sharedlib" != xno
27905 then
27906         MAKE_ADA_SHAREDLIB=
27907         if test "x$with_ada_sharedlib" != xyes
27908         then
27909                 ADA_SHAREDLIB="$with_ada_sharedlib"
27910         fi
27911 fi
27912
27913                         # allow the Ada binding to be renamed
27914
27915 echo "$as_me:27915: checking for ada-libname" >&5
27916 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27917
27918 # Check whether --with-ada-libname or --without-ada-libname was given.
27919 if test "${with_ada_libname+set}" = set; then
27920   withval="$with_ada_libname"
27921   ADA_LIBNAME=$withval
27922 else
27923   ADA_LIBNAME=AdaCurses
27924 fi;
27925 case "x$ADA_LIBNAME" in
27926 (x|xyes|xno)
27927         ADA_LIBNAME=AdaCurses
27928         ;;
27929 esac
27930
27931 echo "$as_me:27931: result: $ADA_LIBNAME" >&5
27932 echo "${ECHO_T}$ADA_LIBNAME" >&6
27933
27934                 fi
27935         fi
27936 else
27937         cf_with_ada=no
27938 fi
27939
27940 # do this "late" to avoid conflict with header-checks
27941 if test "x$with_widec" = xyes ; then
27942         echo "$as_me:27942: checking for wchar_t" >&5
27943 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27944 if test "${ac_cv_type_wchar_t+set}" = set; then
27945   echo $ECHO_N "(cached) $ECHO_C" >&6
27946 else
27947   cat >"conftest.$ac_ext" <<_ACEOF
27948 #line 27948 "configure"
27949 #include "confdefs.h"
27950 $ac_includes_default
27951 int
27952 main (void)
27953 {
27954 if ((wchar_t *) 0)
27955   return 0;
27956 if (sizeof (wchar_t))
27957   return 0;
27958   ;
27959   return 0;
27960 }
27961 _ACEOF
27962 rm -f "conftest.$ac_objext"
27963 if { (eval echo "$as_me:27963: \"$ac_compile\"") >&5
27964   (eval $ac_compile) 2>&5
27965   ac_status=$?
27966   echo "$as_me:27966: \$? = $ac_status" >&5
27967   (exit "$ac_status"); } &&
27968          { ac_try='test -s "conftest.$ac_objext"'
27969   { (eval echo "$as_me:27969: \"$ac_try\"") >&5
27970   (eval $ac_try) 2>&5
27971   ac_status=$?
27972   echo "$as_me:27972: \$? = $ac_status" >&5
27973   (exit "$ac_status"); }; }; then
27974   ac_cv_type_wchar_t=yes
27975 else
27976   echo "$as_me: failed program was:" >&5
27977 cat "conftest.$ac_ext" >&5
27978 ac_cv_type_wchar_t=no
27979 fi
27980 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27981 fi
27982 echo "$as_me:27982: result: $ac_cv_type_wchar_t" >&5
27983 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27984
27985 echo "$as_me:27985: checking size of wchar_t" >&5
27986 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27987 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27988   echo $ECHO_N "(cached) $ECHO_C" >&6
27989 else
27990   if test "$ac_cv_type_wchar_t" = yes; then
27991   if test "$cross_compiling" = yes; then
27992   # Depending upon the size, compute the lo and hi bounds.
27993 cat >"conftest.$ac_ext" <<_ACEOF
27994 #line 27994 "configure"
27995 #include "confdefs.h"
27996 $ac_includes_default
27997 int
27998 main (void)
27999 {
28000 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28001   ;
28002   return 0;
28003 }
28004 _ACEOF
28005 rm -f "conftest.$ac_objext"
28006 if { (eval echo "$as_me:28006: \"$ac_compile\"") >&5
28007   (eval $ac_compile) 2>&5
28008   ac_status=$?
28009   echo "$as_me:28009: \$? = $ac_status" >&5
28010   (exit "$ac_status"); } &&
28011          { ac_try='test -s "conftest.$ac_objext"'
28012   { (eval echo "$as_me:28012: \"$ac_try\"") >&5
28013   (eval $ac_try) 2>&5
28014   ac_status=$?
28015   echo "$as_me:28015: \$? = $ac_status" >&5
28016   (exit "$ac_status"); }; }; then
28017   ac_lo=0 ac_mid=0
28018   while :; do
28019     cat >"conftest.$ac_ext" <<_ACEOF
28020 #line 28020 "configure"
28021 #include "confdefs.h"
28022 $ac_includes_default
28023 int
28024 main (void)
28025 {
28026 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28027   ;
28028   return 0;
28029 }
28030 _ACEOF
28031 rm -f "conftest.$ac_objext"
28032 if { (eval echo "$as_me:28032: \"$ac_compile\"") >&5
28033   (eval $ac_compile) 2>&5
28034   ac_status=$?
28035   echo "$as_me:28035: \$? = $ac_status" >&5
28036   (exit "$ac_status"); } &&
28037          { ac_try='test -s "conftest.$ac_objext"'
28038   { (eval echo "$as_me:28038: \"$ac_try\"") >&5
28039   (eval $ac_try) 2>&5
28040   ac_status=$?
28041   echo "$as_me:28041: \$? = $ac_status" >&5
28042   (exit "$ac_status"); }; }; then
28043   ac_hi=$ac_mid; break
28044 else
28045   echo "$as_me: failed program was:" >&5
28046 cat "conftest.$ac_ext" >&5
28047 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28048 fi
28049 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28050   done
28051 else
28052   echo "$as_me: failed program was:" >&5
28053 cat "conftest.$ac_ext" >&5
28054 ac_hi=-1 ac_mid=-1
28055   while :; do
28056     cat >"conftest.$ac_ext" <<_ACEOF
28057 #line 28057 "configure"
28058 #include "confdefs.h"
28059 $ac_includes_default
28060 int
28061 main (void)
28062 {
28063 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28064   ;
28065   return 0;
28066 }
28067 _ACEOF
28068 rm -f "conftest.$ac_objext"
28069 if { (eval echo "$as_me:28069: \"$ac_compile\"") >&5
28070   (eval $ac_compile) 2>&5
28071   ac_status=$?
28072   echo "$as_me:28072: \$? = $ac_status" >&5
28073   (exit "$ac_status"); } &&
28074          { ac_try='test -s "conftest.$ac_objext"'
28075   { (eval echo "$as_me:28075: \"$ac_try\"") >&5
28076   (eval $ac_try) 2>&5
28077   ac_status=$?
28078   echo "$as_me:28078: \$? = $ac_status" >&5
28079   (exit "$ac_status"); }; }; then
28080   ac_lo=$ac_mid; break
28081 else
28082   echo "$as_me: failed program was:" >&5
28083 cat "conftest.$ac_ext" >&5
28084 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28085 fi
28086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28087   done
28088 fi
28089 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28090 # Binary search between lo and hi bounds.
28091 while test "x$ac_lo" != "x$ac_hi"; do
28092   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28093   cat >"conftest.$ac_ext" <<_ACEOF
28094 #line 28094 "configure"
28095 #include "confdefs.h"
28096 $ac_includes_default
28097 int
28098 main (void)
28099 {
28100 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28101   ;
28102   return 0;
28103 }
28104 _ACEOF
28105 rm -f "conftest.$ac_objext"
28106 if { (eval echo "$as_me:28106: \"$ac_compile\"") >&5
28107   (eval $ac_compile) 2>&5
28108   ac_status=$?
28109   echo "$as_me:28109: \$? = $ac_status" >&5
28110   (exit "$ac_status"); } &&
28111          { ac_try='test -s "conftest.$ac_objext"'
28112   { (eval echo "$as_me:28112: \"$ac_try\"") >&5
28113   (eval $ac_try) 2>&5
28114   ac_status=$?
28115   echo "$as_me:28115: \$? = $ac_status" >&5
28116   (exit "$ac_status"); }; }; then
28117   ac_hi=$ac_mid
28118 else
28119   echo "$as_me: failed program was:" >&5
28120 cat "conftest.$ac_ext" >&5
28121 ac_lo=`expr "$ac_mid" + 1`
28122 fi
28123 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28124 done
28125 ac_cv_sizeof_wchar_t=$ac_lo
28126 else
28127   if test "$cross_compiling" = yes; then
28128   { { echo "$as_me:28128: error: cannot run test program while cross compiling" >&5
28129 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28130    { (exit 1); exit 1; }; }
28131 else
28132   cat >"conftest.$ac_ext" <<_ACEOF
28133 #line 28133 "configure"
28134 #include "confdefs.h"
28135 $ac_includes_default
28136 int
28137 main (void)
28138 {
28139 FILE *f = fopen ("conftest.val", "w");
28140 if (!f)
28141   $ac_main_return (1);
28142 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28143 fclose (f);
28144   ;
28145   return 0;
28146 }
28147 _ACEOF
28148 rm -f "conftest$ac_exeext"
28149 if { (eval echo "$as_me:28149: \"$ac_link\"") >&5
28150   (eval $ac_link) 2>&5
28151   ac_status=$?
28152   echo "$as_me:28152: \$? = $ac_status" >&5
28153   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28154   { (eval echo "$as_me:28154: \"$ac_try\"") >&5
28155   (eval $ac_try) 2>&5
28156   ac_status=$?
28157   echo "$as_me:28157: \$? = $ac_status" >&5
28158   (exit "$ac_status"); }; }; then
28159   ac_cv_sizeof_wchar_t=`cat conftest.val`
28160 else
28161   echo "$as_me: program exited with status $ac_status" >&5
28162 echo "$as_me: failed program was:" >&5
28163 cat "conftest.$ac_ext" >&5
28164 fi
28165 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28166 fi
28167 fi
28168 rm -f conftest.val
28169 else
28170   ac_cv_sizeof_wchar_t=0
28171 fi
28172 fi
28173 echo "$as_me:28173: result: $ac_cv_sizeof_wchar_t" >&5
28174 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28175 cat >>confdefs.h <<EOF
28176 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28177 EOF
28178
28179         # cross-compiling to mingw can run into the problem that attempting to
28180         # link with the regex library fails, causing the test to not set this to
28181         # a number.  "recent" autoconf does not address this problem either -TD
28182         if test -z "$ac_cv_sizeof_wchar_t"
28183         then
28184                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28185
28186 echo "${as_me:-configure}:28186: testing test failed (assume 2) ..." 1>&5
28187
28188                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28189                 mv confdefs.tmp confdefs.h
28190                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28191         fi
28192 fi
28193
28194 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28195 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28196 ###
28197 ### ticlib modules may be a separate library, otherwise contained in termlib.
28198 ### termlib modules may be a separate library, otherwise contained in ncurses.
28199 ###
28200 ### The of "+" or " " between the tokens controls the way the script
28201 ### chooses to split module lists into libraries.
28202 ###
28203 ### (see CF_LIB_RULES).
28204 echo "$as_me:28204: checking for library subsets" >&5
28205 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28206 LIB_SUBSETS=
28207
28208 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28209         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28210         if test "$with_ticlib" != no ; then
28211                 LIB_SUBSETS="${LIB_SUBSETS} "
28212         else
28213                 LIB_SUBSETS="${LIB_SUBSETS}+"
28214         fi
28215 fi
28216
28217 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28218 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28219
28220 if test "$with_termlib" != no ; then
28221         LIB_SUBSETS="${LIB_SUBSETS} "
28222 else
28223         LIB_SUBSETS="${LIB_SUBSETS}+"
28224 fi
28225
28226 LIB_SUBSETS="${LIB_SUBSETS}base"
28227
28228 # Most term-driver calls are to tinfo, but some like init_pair are to the
28229 # base library (so it resides in base).
28230 if test "$with_term_driver" != no ; then
28231         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28232         case "$cf_cv_system_name" in
28233         (*mingw32*|*mingw64*)
28234                 if test "x$with_exp_win32" = xyes ; then
28235                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28236                 else
28237                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28238                 fi
28239                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28240                 ;;
28241         (*)
28242                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28243                 ;;
28244         esac
28245 elif test "x$with_exp_win32" = xyes ; then
28246         case "$cf_cv_system_name" in
28247         (*mingw32*|*mingw64*)
28248                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28249                 ;;
28250         (*)
28251                 ;;
28252         esac
28253 fi
28254
28255 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28256 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28257
28258 echo "$as_me:28258: result: $LIB_SUBSETS" >&5
28259 echo "${ECHO_T}$LIB_SUBSETS" >&6
28260
28261 ### Construct the list of include-directories to be generated
28262
28263 if test "$srcdir" != "."; then
28264         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28265 fi
28266 CPPFLAGS="-I../include $CPPFLAGS"
28267 if test "$srcdir" != "."; then
28268         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28269 fi
28270 CPPFLAGS="-I. $CPPFLAGS"
28271
28272 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28273 if test "$srcdir" != "."; then
28274         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28275 fi
28276 if test "$GCC" != yes; then
28277         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28278 elif test "$includedir" != "/usr/include"; then
28279         if test "$includedir" = '${prefix}/include' ; then
28280                 if test x$prefix != x/usr ; then
28281                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28282                 fi
28283         else
28284                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28285         fi
28286 fi
28287
28288 ### Build up pieces for makefile rules
28289 echo "$as_me:28289: checking default library suffix" >&5
28290 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28291
28292         case $DFT_LWR_MODEL in
28293         (libtool) DFT_ARG_SUFFIX=''   ;;
28294         (normal)  DFT_ARG_SUFFIX=''   ;;
28295         (debug)   DFT_ARG_SUFFIX='_g' ;;
28296         (profile) DFT_ARG_SUFFIX='_p' ;;
28297         (shared)  DFT_ARG_SUFFIX=''   ;;
28298         esac
28299         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28300 echo "$as_me:28300: result: $DFT_ARG_SUFFIX" >&5
28301 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28302
28303 echo "$as_me:28303: checking default library-dependency suffix" >&5
28304 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28305
28306         case X$DFT_LWR_MODEL in
28307         (Xlibtool)
28308                 DFT_LIB_SUFFIX='.la'
28309                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28310                 ;;
28311         (Xdebug)
28312                 case "$cf_cv_system_name" in
28313                 (*-msvc*)
28314                         DFT_LIB_SUFFIX='_g.lib'
28315                         ;;
28316                 (*)
28317                         DFT_LIB_SUFFIX='_g.a'
28318                         ;;
28319                 esac
28320                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28321                 ;;
28322         (Xprofile)
28323                 case "$cf_cv_system_name" in
28324                 (*-msvc*)
28325                         DFT_LIB_SUFFIX='_p.lib'
28326                         ;;
28327                 (*)
28328                         DFT_LIB_SUFFIX='_p.a'
28329                         ;;
28330                 esac
28331                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28332                 ;;
28333         (Xshared)
28334                 case "$cf_cv_system_name" in
28335                 (aix[5-7]*)
28336                         DFT_LIB_SUFFIX='.so'
28337                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28338                         ;;
28339                 (*-msvc*)
28340                         DFT_LIB_SUFFIX='.dll'
28341                         DFT_DEP_SUFFIX='.dll.lib'
28342                         ;;
28343                 (cygwin*|msys*|mingw*)
28344                         DFT_LIB_SUFFIX='.dll'
28345                         DFT_DEP_SUFFIX='.dll.a'
28346                         ;;
28347                 (darwin*)
28348                         DFT_LIB_SUFFIX='.dylib'
28349                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28350                         ;;
28351                 (hpux*)
28352                         case "$target" in
28353                         (ia64*)
28354                                 DFT_LIB_SUFFIX='.so'
28355                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28356                                 ;;
28357                         (*)
28358                                 DFT_LIB_SUFFIX='.sl'
28359                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28360                                 ;;
28361                         esac
28362                         ;;
28363                 (*)
28364                         DFT_LIB_SUFFIX='.so'
28365                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28366                         ;;
28367                 esac
28368                 ;;
28369         (*)
28370                 case "$target" in
28371                 (*-msvc*)
28372                         DFT_LIB_SUFFIX='.lib'
28373                         ;;
28374                 (*)
28375                         DFT_LIB_SUFFIX='.a'
28376                         ;;
28377                 esac
28378                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28379                 ;;
28380         esac
28381         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28382         then
28383                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28384                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28385         fi
28386 echo "$as_me:28386: result: $DFT_DEP_SUFFIX" >&5
28387 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28388
28389 echo "$as_me:28389: checking default object directory" >&5
28390 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28391
28392         case $DFT_LWR_MODEL in
28393         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28394         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28395         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28396         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28397         (shared)
28398                 case "$cf_cv_system_name" in
28399                 (cygwin|msys)
28400                         DFT_OBJ_SUBDIR='objects' ;;
28401                 (*)
28402                         DFT_OBJ_SUBDIR='obj_s' ;;
28403                 esac
28404         esac
28405 echo "$as_me:28405: result: $DFT_OBJ_SUBDIR" >&5
28406 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28407
28408 if test "x$cf_with_cxx" = xyes ; then
28409 echo "$as_me:28409: checking c++ library-dependency suffix" >&5
28410 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28411 if test "$with_libtool" != "no"; then
28412         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28413         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28414 elif test "$with_shared_cxx" != "no"; then
28415         # also for g++ users...
28416         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28417 else
28418         # we normally make a static library because C/C++ library rules differ
28419
28420         case Xnormal in
28421         (Xlibtool)
28422                 CXX_LIB_SUFFIX='.la'
28423                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28424                 ;;
28425         (Xdebug)
28426                 case "$cf_cv_system_name" in
28427                 (*-msvc*)
28428                         CXX_LIB_SUFFIX='_g.lib'
28429                         ;;
28430                 (*)
28431                         CXX_LIB_SUFFIX='_g.a'
28432                         ;;
28433                 esac
28434                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28435                 ;;
28436         (Xprofile)
28437                 case "$cf_cv_system_name" in
28438                 (*-msvc*)
28439                         CXX_LIB_SUFFIX='_p.lib'
28440                         ;;
28441                 (*)
28442                         CXX_LIB_SUFFIX='_p.a'
28443                         ;;
28444                 esac
28445                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28446                 ;;
28447         (Xshared)
28448                 case "$cf_cv_system_name" in
28449                 (aix[5-7]*)
28450                         CXX_LIB_SUFFIX='.so'
28451                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28452                         ;;
28453                 (*-msvc*)
28454                         CXX_LIB_SUFFIX='.dll'
28455                         CXX_DEP_SUFFIX='.dll.lib'
28456                         ;;
28457                 (cygwin*|msys*|mingw*)
28458                         CXX_LIB_SUFFIX='.dll'
28459                         CXX_DEP_SUFFIX='.dll.a'
28460                         ;;
28461                 (darwin*)
28462                         CXX_LIB_SUFFIX='.dylib'
28463                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28464                         ;;
28465                 (hpux*)
28466                         case "$target" in
28467                         (ia64*)
28468                                 CXX_LIB_SUFFIX='.so'
28469                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28470                                 ;;
28471                         (*)
28472                                 CXX_LIB_SUFFIX='.sl'
28473                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28474                                 ;;
28475                         esac
28476                         ;;
28477                 (*)
28478                         CXX_LIB_SUFFIX='.so'
28479                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28480                         ;;
28481                 esac
28482                 ;;
28483         (*)
28484                 case "$target" in
28485                 (*-msvc*)
28486                         CXX_LIB_SUFFIX='.lib'
28487                         ;;
28488                 (*)
28489                         CXX_LIB_SUFFIX='.a'
28490                         ;;
28491                 esac
28492                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28493                 ;;
28494         esac
28495         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28496         then
28497                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28498                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28499         fi
28500
28501 fi
28502 echo "$as_me:28502: result: $CXX_LIB_SUFFIX" >&5
28503 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28504
28505 fi
28506
28507 # do not want -ldl in build except as needed for -lncurses dependency
28508 if test "x$with_dlsym" = xyes ; then
28509 if test "$DFT_LWR_MODEL" = shared || \
28510    test "$DFT_LWR_MODEL" = libtool ; then
28511
28512 # remove dl library from $LIBS
28513 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28514
28515 fi
28516 fi
28517 ### Set up low-level terminfo dependencies for makefiles.
28518
28519 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28520 # do not need libdl
28521 TICS_LIST=
28522 if test "x$with_dlsym" = xyes ; then
28523
28524 # remove dl library from $SHLIB_LIST
28525 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28526
28527 fi
28528
28529 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28530 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28531 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28532 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28533 then
28534         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28535 fi
28536
28537 if test "$with_ticlib" != no ; then
28538
28539         if test "x$with_ticlib" != xyes ; then
28540                 TICS_NAME=$with_ticlib
28541                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28542                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28543                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28544                 TICS_LIB_SUFFIX="${with_ticlib}"
28545         else
28546                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28547                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28548                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28549                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28550         fi
28551         TICS_LDFLAGS="-L${LIB_DIR}"
28552         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28553 else
28554         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28555         TICS_LDFLAGS="-L${LIB_DIR}"
28556         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28557 fi
28558
28559 if test "$with_termlib" != no ; then
28560
28561         if test "x$with_termlib" != xyes ; then
28562                 TINFO_NAME=$with_termlib
28563                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28564                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28565                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28566                 TINFO_LIB_SUFFIX="${with_termlib}"
28567         else
28568                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28569                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28570                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28571                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28572         fi
28573
28574         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28575         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28576         if test "$DFT_LWR_MODEL" = "libtool"; then
28577                 TEST_ARGS="${TEST_DEPS}"
28578                 TEST_ARG2="${TEST_DEP2}"
28579                 TINFO_LDFLAGS="-L${LIB_DIR}"
28580                 TINFO_LIBS="$TEST_ARGS"
28581                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28582                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28583         else
28584                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28585                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28586                 if test "x$with_term_driver" != xno ; then
28587                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28588                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28589                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28590                 else
28591                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28592                         TINFO_LIBS="$TEST_ARGS"
28593                 fi
28594                 TINFO_LDFLAGS="-L${LIB_DIR}"
28595                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28596         fi
28597 else
28598         # the next lines are needed for linking libtic over libncurses
28599         TINFO_NAME=${LIB_NAME}
28600         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28601         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28602         if test "x$with_tic_depends" = xyes ; then
28603                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28604         else
28605                 TICS_LIST="$SHLIB_LIST"
28606         fi
28607
28608         TINFO_LDFLAGS="-L${LIB_DIR}"
28609         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28610 fi
28611
28612 if test "$DFT_LWR_MODEL" = shared ; then
28613         case "$cf_cv_system_name" in
28614         (cygwin*|msys*)
28615                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28616                 TINFO_SUFFIX=.dll
28617                 ;;
28618         esac
28619 fi
28620
28621 if test "x$with_dlsym" = xyes ; then
28622
28623 # remove dl library from $TICS_LIST
28624 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28625
28626 fi
28627
28628 if test "$DFT_LWR_MODEL" = "libtool"; then
28629         OBJEXT=lo
28630 fi
28631
28632 # needed for Ada95
28633 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28634
28635 case "$DFT_LWR_MODEL" in
28636 (normal|debug|profile)
28637
28638 if test "$GCC" = yes ; then
28639         case "$cf_cv_system_name" in
28640         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28641                 LDFLAGS_STATIC=
28642                 LDFLAGS_SHARED=
28643                 ;;
28644         (*)     # normally, except when broken
28645                 LDFLAGS_STATIC=-static
28646                 LDFLAGS_SHARED=-dynamic
28647                 ;;
28648         esac
28649 else
28650         case "$cf_cv_system_name" in
28651         (aix[4-7]*)     # from ld manpage
28652                 LDFLAGS_STATIC=-bstatic
28653                 LDFLAGS_SHARED=-bdynamic
28654                 ;;
28655         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28656                 # We could also use just "archive" and "shared".
28657                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28658                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28659                 ;;
28660         (irix*)         # from ld manpage IRIX64
28661                 LDFLAGS_STATIC=-Bstatic
28662                 LDFLAGS_SHARED=-Bdynamic
28663                 ;;
28664         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28665                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28666                 LDFLAGS_STATIC=-noso
28667                 LDFLAGS_SHARED=-so_archive
28668                 ;;
28669         (solaris2*)
28670                 LDFLAGS_STATIC=-Bstatic
28671                 LDFLAGS_SHARED=-Bdynamic
28672                 ;;
28673         esac
28674 fi
28675
28676 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28677 then
28678         echo "$as_me:28678: checking if linker supports switching between static/dynamic" >&5
28679 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28680
28681         rm -f libconftest.a
28682         cat >conftest.$ac_ext <<EOF
28683 #line 28683 "configure"
28684 #include <stdio.h>
28685 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28686 EOF
28687         if { (eval echo "$as_me:28687: \"$ac_compile\"") >&5
28688   (eval $ac_compile) 2>&5
28689   ac_status=$?
28690   echo "$as_me:28690: \$? = $ac_status" >&5
28691   (exit "$ac_status"); } ; then
28692                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28693                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28694         fi
28695         rm -f conftest.*
28696
28697         cf_save_LIBS="$LIBS"
28698
28699         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28700         cat >"conftest.$ac_ext" <<_ACEOF
28701 #line 28701 "configure"
28702 #include "confdefs.h"
28703
28704 #line 28704 "configure"
28705 #include <stdio.h>
28706 int cf_ldflags_static(FILE *fp);
28707
28708 int
28709 main (void)
28710 {
28711
28712         return cf_ldflags_static(stdin);
28713
28714   ;
28715   return 0;
28716 }
28717 _ACEOF
28718 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28719 if { (eval echo "$as_me:28719: \"$ac_link\"") >&5
28720   (eval $ac_link) 2>&5
28721   ac_status=$?
28722   echo "$as_me:28722: \$? = $ac_status" >&5
28723   (exit "$ac_status"); } &&
28724          { ac_try='test -s "conftest$ac_exeext"'
28725   { (eval echo "$as_me:28725: \"$ac_try\"") >&5
28726   (eval $ac_try) 2>&5
28727   ac_status=$?
28728   echo "$as_me:28728: \$? = $ac_status" >&5
28729   (exit "$ac_status"); }; }; then
28730
28731         # some linkers simply ignore the -dynamic
28732         case x`file "conftest$ac_exeext" 2>/dev/null` in
28733         (*static*)
28734                 cf_ldflags_static=no
28735                 ;;
28736         (*)
28737                 cf_ldflags_static=yes
28738                 ;;
28739         esac
28740
28741 else
28742   echo "$as_me: failed program was:" >&5
28743 cat "conftest.$ac_ext" >&5
28744 cf_ldflags_static=no
28745 fi
28746 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28747
28748         rm -f libconftest.*
28749         LIBS="$cf_save_LIBS"
28750
28751         echo "$as_me:28751: result: $cf_ldflags_static" >&5
28752 echo "${ECHO_T}$cf_ldflags_static" >&6
28753
28754         if test "$cf_ldflags_static" != yes
28755         then
28756                 LDFLAGS_STATIC=
28757                 LDFLAGS_SHARED=
28758         fi
28759 else
28760         LDFLAGS_STATIC=
28761         LDFLAGS_SHARED=
28762 fi
28763
28764         ;;
28765 esac
28766
28767 echo "$as_me:28767: checking where we will install curses.h" >&5
28768 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28769
28770 includesubdir=
28771 if test "$with_overwrite" = no && \
28772  { test "x$includedir" = 'x${prefix}/include' || \
28773    test "x$includedir" = "x${prefix}/include"; }
28774 then
28775         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28776 fi
28777 echo "$as_me:28777: result: ${includedir}${includesubdir}" >&5
28778 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28779
28780 ### Resolve a conflict between normal and wide-curses by forcing applications
28781 ### that will need libutf8 to add it to their configure script.
28782 if test "$with_overwrite" != no ; then
28783 if test "$NCURSES_LIBUTF8" = 1 ; then
28784         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28785         { echo "$as_me:28785: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28786 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28787 fi
28788 fi
28789 WITH_OVERWRITE=$with_overwrite
28790
28791 ### At least on MinGW a shared library build without libtool
28792 ### requires adding the additional libs to the link list.
28793 case "$cf_cv_system_name" in
28794 (*mingw32*|*mingw64*)
28795         if test "$DFT_LWR_MODEL" != "libtool"; then
28796            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28797         fi
28798         ;;
28799 *)      ;;
28800 esac
28801
28802 ### predefined stuff for the test programs
28803
28804 cat >>confdefs.h <<\EOF
28805 #define HAVE_SLK_COLOR 1
28806 EOF
28807
28808 # pkgsrc uses these
28809
28810 echo "$as_me:28810: checking for desired basename for form library" >&5
28811 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28812
28813 # Check whether --with-form-libname or --without-form-libname was given.
28814 if test "${with_form_libname+set}" = set; then
28815   withval="$with_form_libname"
28816   with_lib_basename=$withval
28817 else
28818   with_lib_basename=form
28819 fi;
28820 FORM_NAME="$with_lib_basename"
28821
28822 case "x$FORM_NAME" in
28823 (x|xno|xnone|xyes)
28824         FORM_NAME=form
28825         ;;
28826 (*)
28827         ;;
28828 esac
28829
28830 echo "$as_me:28830: result: $FORM_NAME" >&5
28831 echo "${ECHO_T}$FORM_NAME" >&6
28832
28833 echo "$as_me:28833: checking for desired basename for menu library" >&5
28834 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28835
28836 # Check whether --with-menu-libname or --without-menu-libname was given.
28837 if test "${with_menu_libname+set}" = set; then
28838   withval="$with_menu_libname"
28839   with_lib_basename=$withval
28840 else
28841   with_lib_basename=menu
28842 fi;
28843 MENU_NAME="$with_lib_basename"
28844
28845 case "x$MENU_NAME" in
28846 (x|xno|xnone|xyes)
28847         MENU_NAME=menu
28848         ;;
28849 (*)
28850         ;;
28851 esac
28852
28853 echo "$as_me:28853: result: $MENU_NAME" >&5
28854 echo "${ECHO_T}$MENU_NAME" >&6
28855
28856 echo "$as_me:28856: checking for desired basename for panel library" >&5
28857 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28858
28859 # Check whether --with-panel-libname or --without-panel-libname was given.
28860 if test "${with_panel_libname+set}" = set; then
28861   withval="$with_panel_libname"
28862   with_lib_basename=$withval
28863 else
28864   with_lib_basename=panel
28865 fi;
28866 PANEL_NAME="$with_lib_basename"
28867
28868 case "x$PANEL_NAME" in
28869 (x|xno|xnone|xyes)
28870         PANEL_NAME=panel
28871         ;;
28872 (*)
28873         ;;
28874 esac
28875
28876 echo "$as_me:28876: result: $PANEL_NAME" >&5
28877 echo "${ECHO_T}$PANEL_NAME" >&6
28878
28879 echo "$as_me:28879: checking for desired basename for cxx library" >&5
28880 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28881
28882 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28883 if test "${with_cxx_libname+set}" = set; then
28884   withval="$with_cxx_libname"
28885   with_lib_basename=$withval
28886 else
28887   with_lib_basename=ncurses++
28888 fi;
28889 CXX_NAME="$with_lib_basename"
28890
28891 case "x$CXX_NAME" in
28892 (x|xno|xnone|xyes)
28893         CXX_NAME=ncurses++
28894         ;;
28895 (*)
28896         ;;
28897 esac
28898
28899 echo "$as_me:28899: result: $CXX_NAME" >&5
28900 echo "${ECHO_T}$CXX_NAME" >&6
28901
28902 ### Construct the list of subdirectories for which we'll customize makefiles
28903 ### with the appropriate compile-rules.
28904
28905 echo "$as_me:28905: checking for src modules" >&5
28906 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28907
28908 # dependencies and linker-arguments for test-programs
28909 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28910 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28911 if test "$DFT_LWR_MODEL" = "libtool"; then
28912         TEST_ARGS="${TEST_DEPS}"
28913         TEST_ARG2="${TEST_DEP2}"
28914 else
28915         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28916         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28917 fi
28918
28919 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28920 cf_cv_src_modules=
28921 for cf_dir in $modules_to_build
28922 do
28923         if test -f "$srcdir/$cf_dir/modules" ; then
28924
28925                 if test -z "$cf_cv_src_modules"; then
28926                         cf_cv_src_modules=$cf_dir
28927                 else
28928                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28929                 fi
28930
28931                 # Make the ncurses_cfg.h file record the library interface files as
28932                 # well.  These are header files that are the same name as their
28933                 # directory.  Ncurses is the only library that does not follow
28934                 # that pattern.
28935                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28936
28937 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28938
28939                         cat >>confdefs.h <<EOF
28940 #define HAVE_${cf_have_include}_H 1
28941 EOF
28942
28943                         cat >>confdefs.h <<EOF
28944 #define HAVE_LIB${cf_have_include} 1
28945 EOF
28946
28947 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28948
28949 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28950
28951                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28952                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28953                         if test "$DFT_LWR_MODEL" = "libtool"; then
28954                                 TEST_ARGS="${TEST_DEPS}"
28955                                 TEST_ARG2="${TEST_DEP2}"
28956                         else
28957                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28958                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28959                         fi
28960                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28961                 fi
28962         fi
28963 done
28964 echo "$as_me:28964: result: $cf_cv_src_modules" >&5
28965 echo "${ECHO_T}$cf_cv_src_modules" >&6
28966
28967 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28968 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28969
28970 SRC_SUBDIRS=
28971 if test "x$cf_with_manpages" != xno ; then
28972         SRC_SUBDIRS="$SRC_SUBDIRS man"
28973 fi
28974 SRC_SUBDIRS="$SRC_SUBDIRS include"
28975 for cf_dir in $cf_cv_src_modules
28976 do
28977         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28978 done
28979 if test "x$cf_with_tests" != "xno" ; then
28980         SRC_SUBDIRS="$SRC_SUBDIRS test"
28981 fi
28982 # always make this, to install the ncurses-config script
28983 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28984 if test "$cf_with_cxx_binding" != no; then
28985         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28986         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28987 fi
28988
28989 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28990 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28991
28992 ADA_SUBDIRS=
28993 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28994         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28995         ADA_SUBDIRS="gen src"
28996         if test "x$cf_with_tests" != "xno" ; then
28997                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28998         fi
28999 fi
29000
29001 SUB_MAKEFILES=
29002 for cf_dir in $SRC_SUBDIRS
29003 do
29004         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29005 done
29006
29007 if test -n "$ADA_SUBDIRS"; then
29008         for cf_dir in $ADA_SUBDIRS
29009         do
29010                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29011         done
29012
29013 fi
29014
29015 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29016    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29017    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29018    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29019 fi
29020
29021 DIRS_TO_MAKE="lib"
29022 for cf_item in $cf_list_models
29023 do
29024
29025         case $cf_item in
29026         (libtool) cf_subdir='obj_lo'  ;;
29027         (normal)  cf_subdir='objects' ;;
29028         (debug)   cf_subdir='obj_g' ;;
29029         (profile) cf_subdir='obj_p' ;;
29030         (shared)
29031                 case "$cf_cv_system_name" in
29032                 (cygwin|msys)
29033                         cf_subdir='objects' ;;
29034                 (*)
29035                         cf_subdir='obj_s' ;;
29036                 esac
29037         esac
29038
29039         for cf_item2 in $DIRS_TO_MAKE
29040         do
29041                 test "$cf_item2" = "$cf_subdir" && break
29042         done
29043         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29044 done
29045 for cf_dir in $DIRS_TO_MAKE
29046 do
29047         test ! -d "$cf_dir" && mkdir "$cf_dir"
29048 done
29049
29050 # symbols that differ when compiling Ada95 by itself.
29051 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29052
29053 # values to use as strings
29054
29055 cat >>confdefs.h <<EOF
29056 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29057 EOF
29058
29059 cat >>confdefs.h <<EOF
29060 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29061 EOF
29062
29063 ### Define substitutions for header files to avoid name-pollution
29064
29065 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29066         HAVE_TCGETATTR=1
29067 else
29068         HAVE_TCGETATTR=0
29069 fi
29070
29071 if test "x$ac_cv_header_stdint_h" = xyes ; then
29072         HAVE_STDINT_H=1
29073 else
29074         HAVE_STDINT_H=0
29075 fi
29076
29077 if test "x$ac_cv_header_termio_h" = xyes ; then
29078         HAVE_TERMIO_H=1
29079 else
29080         HAVE_TERMIO_H=0
29081 fi
29082
29083 if test "x$ac_cv_header_termios_h" = xyes ; then
29084         HAVE_TERMIOS_H=1
29085 else
29086         HAVE_TERMIOS_H=0
29087 fi
29088
29089 ################################################################################
29090 test "x$use_database" = xyes && \
29091 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29092
29093 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29094 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29095
29096 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29097 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29098 fi
29099
29100 if test "x$cf_with_tests" != xno ; then
29101         MAKE_TESTS=
29102 else
29103         MAKE_TESTS="#"
29104 fi
29105
29106 ADAHTML_DIR=../../doc/html/ada
29107
29108 # workaround for OS/2 (20151017)
29109 case "$cf_cv_system_name" in
29110 (os2*)
29111         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29112         ;;
29113 (*)
29114         LIBTOOL_OPTS_CXX=
29115         ;;
29116 esac
29117
29118 # workaround for g++ versus Solaris (20131116)
29119 case "$cf_cv_system_name" in
29120 (solaris2*)
29121         case "x$CPPFLAGS" in
29122         (*-D_XOPEN_SOURCE_EXTENDED*)
29123                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29124
29125 echo "${as_me:-configure}:29125: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29126
29127                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29128                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29129                 ;;
29130         esac
29131         ;;
29132 esac
29133
29134 # Help to automatically enable the extended curses features when using either
29135 # the *-config or the ".pc" files by adding defines.
29136 echo "$as_me:29136: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
29137 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
29138 PKG_CFLAGS=
29139 for cf_loop1 in $CPPFLAGS_after_XOPEN
29140 do
29141         cf_found=no
29142         for cf_loop2 in $CPPFLAGS_before_XOPEN
29143         do
29144                 if test "x$cf_loop1" = "x$cf_loop2"
29145                 then
29146                         cf_found=yes
29147                         break
29148                 fi
29149         done
29150         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29151 done
29152 echo "$as_me:29152: result: $PKG_CFLAGS" >&5
29153 echo "${ECHO_T}$PKG_CFLAGS" >&6
29154
29155 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29156 case "x$NCURSES_OSPEED" in
29157 (*short*)
29158         cf_compatible=1
29159         ;;
29160 (*)
29161         cf_compatible=0
29162         ;;
29163 esac
29164
29165 cat >>confdefs.h <<EOF
29166 #define NCURSES_OSPEED_COMPAT $cf_compatible
29167 EOF
29168
29169 case "x$cf_cv_typeof_chtype" in
29170 (xshort|xint|xlong)
29171         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29172         ;;
29173 esac
29174
29175 case "x$cf_cv_typeof_mmask_t" in
29176 (xshort|xint|xlong)
29177         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29178         ;;
29179 esac
29180
29181 # substitute into misc/Makefile to suppress
29182 # (un)install.data from the
29183 # (un)install rules.
29184 if test "x$cf_with_db_install" = "xno"; then
29185         MISC_INSTALL_DATA=
29186         MISC_UNINSTALL_DATA=
29187 else
29188         MISC_INSTALL_DATA=install.data
29189         MISC_UNINSTALL_DATA=uninstall.data
29190 fi
29191
29192 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29193         MAKE_DATABASE="#"
29194 else
29195         MAKE_DATABASE="$MAKE_TERMINFO"
29196 fi
29197
29198 if test -n "$PACKAGE"
29199 then
29200         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29201         export PACKAGE
29202         echo "package: $PACKAGE"
29203 fi
29204
29205 UNALTERED_SYMS=
29206 cf_filter_syms=no
29207
29208 if test -n "$RESULTING_SYMS"
29209 then
29210         cf_filter_syms=$cf_dft_filter_syms
29211         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29212
29213 echo "${as_me:-configure}:29213: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29214
29215 fi
29216
29217 if test "x$WILDCARD_SYMS" = xno
29218 then
29219         cf_filter_syms=yes
29220 fi
29221
29222 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29223
29224 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29225 if test "$cf_filter_syms" = yes
29226 then
29227         RESULTING_SYMS=resulting.map
29228 fi
29229
29230 if test "x$cross_compiling" = xyes ; then
29231         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29232         CHECK_BUILD="#"
29233 else
29234         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29235         CHECK_BUILD=
29236 fi
29237
29238 # This is used for the *-config script and *.pc data files.
29239
29240 echo "$as_me:29240: checking for linker search path" >&5
29241 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29242 if test "${cf_cv_ld_searchpath+set}" = set; then
29243   echo $ECHO_N "(cached) $ECHO_C" >&6
29244 else
29245
29246 if test "$cross_compiling" != yes ; then
29247
29248 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29249 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29250
29251 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29252 # update the cache, which makes it run faster.
29253 test -z "$cf_pathlist" && \
29254         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29255
29256 test -z "$cf_pathlist" &&
29257         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29258
29259 # This works with OpenBSD 6.5, which lists only filenames
29260 test -z "$cf_pathlist" &&
29261         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29262
29263 if test -z "$cf_pathlist"
29264 then
29265         # dyld default path with MacOS
29266         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29267         then
29268                 # do this to bypass check
29269                 cf_cv_ld_searchpath='$HOME/lib'
29270                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29271         fi
29272 fi
29273
29274 if test -z "$cf_pathlist"
29275 then
29276         # Solaris is "SunOS"
29277         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29278         then
29279                 case x`(isainfo -b)` in
29280                 (x64)
29281                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29282                         ;;
29283                 (x32)
29284                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29285                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29286                         ;;
29287                 (*)
29288                         { echo "$as_me:29288: WARNING: problem with Solaris architecture" >&5
29289 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29290                         ;;
29291                 esac
29292         fi
29293 fi
29294
29295 if test -z "$cf_pathlist"
29296 then
29297         # HP-UX
29298         if test x"`uname -s`" = xHP-UX
29299         then
29300                 case x`getconf LONG_BIT` in
29301                 (x64)
29302                         cf_pathlist="/usr/lib/hpux64"
29303                         ;;
29304                 (x*)
29305                         cf_pathlist="/usr/lib/hpux32"
29306                         ;;
29307                 esac
29308         fi
29309 fi
29310
29311 fi
29312
29313 # If nothing else, assume it is conventional
29314 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29315
29316 # Finally, check that this is only directories
29317 for cf_path in $0 $cf_pathlist
29318 do
29319         if test -d "$cf_path"; then
29320                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29321                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29322         fi
29323 done
29324
29325 # Ensure that it is nonempty
29326 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29327
29328 fi
29329 echo "$as_me:29329: result: $cf_cv_ld_searchpath" >&5
29330 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29331
29332 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29333
29334 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"
29335 ac_config_commands="$ac_config_commands default"
29336 cat >confcache <<\_ACEOF
29337 # This file is a shell script that caches the results of configure
29338 # tests run on this system so they can be shared between configure
29339 # scripts and configure runs, see configure's option --config-cache.
29340 # It is not useful on other systems.  If it contains results you don't
29341 # want to keep, you may remove or edit it.
29342 #
29343 # config.status only pays attention to the cache file if you give it
29344 # the --recheck option to rerun configure.
29345 #
29346 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29347 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29348 # following values.
29349
29350 _ACEOF
29351
29352 # The following way of writing the cache mishandles newlines in values,
29353 # but we know of no workaround that is simple, portable, and efficient.
29354 # So, don't put newlines in cache variables' values.
29355 # Ultrix sh set writes to stderr and can't be redirected directly,
29356 # and sets the high bit in the cache file unless we assign to the vars.
29357 {
29358   (set) 2>&1 |
29359     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29360     *ac_space=\ *)
29361       # `set' does not quote correctly, so add quotes (double-quote
29362       # substitution turns \\\\ into \\, and sed turns \\ into \).
29363       sed -n \
29364         "s/'/'\\\\''/g;
29365           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29366       ;;
29367     *)
29368       # `set' quotes correctly as required by POSIX, so do not add quotes.
29369       sed -n \
29370         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29371       ;;
29372     esac;
29373 } |
29374   sed '
29375      t clear
29376      : clear
29377      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29378      t end
29379      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29380      : end' >>confcache
29381 if cmp -s $cache_file confcache; then :; else
29382   if test -w $cache_file; then
29383     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29384     cat confcache >$cache_file
29385   else
29386     echo "not updating unwritable cache $cache_file"
29387   fi
29388 fi
29389 rm -f confcache
29390
29391 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29392 # Let make expand exec_prefix.
29393 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29394
29395 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29396 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29397 # trailing colons and then remove the whole line if VPATH becomes empty
29398 # (actually we leave an empty line to preserve line numbers).
29399 if test "x$srcdir" = x.; then
29400   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29401 s/:*\$(srcdir):*/:/;
29402 s/:*\${srcdir}:*/:/;
29403 s/:*@srcdir@:*/:/;
29404 s/^\([^=]*=[    ]*\):*/\1/;
29405 s/:*$//;
29406 s/^[^=]*=[      ]*$//;
29407 }'
29408 fi
29409
29410 DEFS=-DHAVE_CONFIG_H
29411
29412 : "${CONFIG_STATUS=./config.status}"
29413 ac_clean_files_save=$ac_clean_files
29414 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29415 { echo "$as_me:29415: creating $CONFIG_STATUS" >&5
29416 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29417 cat >"$CONFIG_STATUS" <<_ACEOF
29418 #! $SHELL
29419 # Generated automatically by configure.
29420 # Run this file to recreate the current configuration.
29421 # Compiler output produced by configure, useful for debugging
29422 # configure, is in config.log if it exists.
29423
29424 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29425
29426 debug=false
29427 SHELL=\${CONFIG_SHELL-$SHELL}
29428 ac_cs_invocation="\$0 \$@"
29429
29430 CLICOLOR_FORCE= GREP_OPTIONS=
29431 unset CLICOLOR_FORCE GREP_OPTIONS
29432 _ACEOF
29433
29434 cat >>"$CONFIG_STATUS" <<\_ACEOF
29435 # Be Bourne compatible
29436 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29437   emulate sh
29438   NULLCMD=:
29439 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29440   set -o posix
29441 fi
29442
29443 # Name of the executable.
29444 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29445
29446 if expr a : '\(a\)' >/dev/null 2>&1; then
29447   as_expr="expr"
29448 else
29449   as_expr="false"
29450 fi
29451
29452 rm -f conf$$ conf$$.exe conf$$.file
29453 echo >conf$$.file
29454 if ln -s conf$$.file conf$$ 2>/dev/null; then
29455   # We could just check for DJGPP; but this test a) works b) is more generic
29456   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29457   if test -f conf$$.exe; then
29458     # Don't use ln at all; we don't have any links
29459     as_ln_s='cp -p'
29460   else
29461     as_ln_s='ln -s'
29462   fi
29463 elif ln conf$$.file conf$$ 2>/dev/null; then
29464   as_ln_s='ln'
29465 else
29466   as_ln_s='cp -p'
29467 fi
29468 rm -f conf$$ conf$$.exe conf$$.file
29469
29470 as_executable_p="test -f"
29471
29472 # Support unset when possible.
29473 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29474   as_unset="unset"
29475 else
29476   as_unset="false"
29477 fi
29478
29479 # NLS nuisances.
29480 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29481 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29482 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29483 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29484 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29485 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29486 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29487 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29488
29489 # IFS
29490 # We need space, tab and new line, in precisely that order.
29491 as_nl='
29492 '
29493 IFS="   $as_nl"
29494
29495 # CDPATH.
29496 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29497
29498 exec 6>&1
29499
29500 _ACEOF
29501
29502 # Files that config.status was made for.
29503 if test -n "$ac_config_files"; then
29504   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29505 fi
29506
29507 if test -n "$ac_config_headers"; then
29508   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29509 fi
29510
29511 if test -n "$ac_config_links"; then
29512   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29513 fi
29514
29515 if test -n "$ac_config_commands"; then
29516   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29517 fi
29518
29519 cat >>"$CONFIG_STATUS" <<\EOF
29520
29521 ac_cs_usage="\
29522 \`$as_me' instantiates files from templates according to the
29523 current configuration.
29524
29525 Usage: $0 [OPTIONS] [FILE]...
29526
29527   -h, --help       print this help, then exit
29528   -V, --version    print version number, then exit
29529   -d, --debug      don't remove temporary files
29530       --recheck    update $as_me by reconfiguring in the same conditions
29531   --file=FILE[:TEMPLATE]
29532                    instantiate the configuration file FILE
29533   --header=FILE[:TEMPLATE]
29534                    instantiate the configuration header FILE
29535
29536 Configuration files:
29537 $config_files
29538
29539 Configuration headers:
29540 $config_headers
29541
29542 Configuration commands:
29543 $config_commands
29544
29545 Report bugs to <dickey@invisible-island.net>."
29546 EOF
29547
29548 cat >>"$CONFIG_STATUS" <<EOF
29549 ac_cs_version="\\
29550 config.status
29551 configured by $0, generated by GNU Autoconf 2.52.20230903,
29552   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29553
29554 Copyright 2003-2022,2023        Thomas E. Dickey
29555 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29556 Free Software Foundation, Inc.
29557 This config.status script is free software; the Free Software Foundation
29558 gives unlimited permission to copy, distribute and modify it."
29559 srcdir="$srcdir"
29560 INSTALL="$INSTALL"
29561 EOF
29562
29563 cat >>"$CONFIG_STATUS" <<\EOF
29564 # If no file are specified by the user, then we need to provide default
29565 # value.  By we need to know if files were specified by the user.
29566 ac_need_defaults=:
29567 while test $# != 0
29568 do
29569   case $1 in
29570   --*=*)
29571     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29572     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29573     shift
29574     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29575     shift
29576     ;;
29577   -*);;
29578   *) # This is not an option, so the user has probably given explicit
29579      # arguments.
29580      ac_need_defaults=false;;
29581   esac
29582
29583   case $1 in
29584   # Handling of the options.
29585 EOF
29586 cat >>"$CONFIG_STATUS" <<EOF
29587   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29588     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29589     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29590 EOF
29591 cat >>"$CONFIG_STATUS" <<\EOF
29592   --version | --vers* | -V )
29593     echo "$ac_cs_version"; exit 0 ;;
29594   --he | --h)
29595     # Conflict between --help and --header
29596     { { echo "$as_me:29596: error: ambiguous option: $1
29597 Try \`$0 --help' for more information." >&5
29598 echo "$as_me: error: ambiguous option: $1
29599 Try \`$0 --help' for more information." >&2;}
29600    { (exit 1); exit 1; }; };;
29601   --help | --hel | -h )
29602     echo "$ac_cs_usage"; exit 0 ;;
29603   --debug | --d* | -d )
29604     debug=: ;;
29605   --file | --fil | --fi | --f )
29606     shift
29607     CONFIG_FILES="$CONFIG_FILES $1"
29608     ac_need_defaults=false;;
29609   --header | --heade | --head | --hea )
29610     shift
29611     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29612     ac_need_defaults=false;;
29613
29614   # This is an error.
29615   -*) { { echo "$as_me:29615: error: unrecognized option: $1
29616 Try \`$0 --help' for more information." >&5
29617 echo "$as_me: error: unrecognized option: $1
29618 Try \`$0 --help' for more information." >&2;}
29619    { (exit 1); exit 1; }; } ;;
29620
29621   *) ac_config_targets="$ac_config_targets $1" ;;
29622
29623   esac
29624   shift
29625 done
29626
29627 exec 5>>config.log
29628 cat >&5 << _ACEOF
29629
29630 ## ----------------------- ##
29631 ## Running config.status.  ##
29632 ## ----------------------- ##
29633
29634 This file was extended by $as_me 2.52.20230903, executed with
29635   CONFIG_FILES    = $CONFIG_FILES
29636   CONFIG_HEADERS  = $CONFIG_HEADERS
29637   CONFIG_LINKS    = $CONFIG_LINKS
29638   CONFIG_COMMANDS = $CONFIG_COMMANDS
29639   > "$ac_cs_invocation"
29640 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29641
29642 _ACEOF
29643 EOF
29644
29645 cat >>"$CONFIG_STATUS" <<EOF
29646 #
29647 # INIT-COMMANDS section.
29648 #
29649
29650 ### Special initialization commands, used to pass information from the
29651 ### configuration-run into config.status
29652
29653 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29654 AWK="$AWK"
29655 CXX_NAME="$CXX_NAME"
29656 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29657 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29658 ECHO_LD="$ECHO_LD"
29659 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29660 FORM_NAME="$FORM_NAME"
29661 LDCONFIG="$LDCONFIG"
29662 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29663 LIB_NAME="$LIB_NAME"
29664 LIB_PREFIX="$LIB_PREFIX"
29665 LIB_SUBSETS="$LIB_SUBSETS"
29666 LIB_SUFFIX="$LIB_SUFFIX"
29667 LIB_TRACING="$LIB_TRACING"
29668 LN_S="$LN_S"
29669 MAKE_TERMINFO="$MAKE_TERMINFO"
29670 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29671 MENU_NAME="$MENU_NAME"
29672 NCURSES_MAJOR="$NCURSES_MAJOR"
29673 NCURSES_MINOR="$NCURSES_MINOR"
29674 NCURSES_OSPEED="$NCURSES_OSPEED"
29675 NCURSES_PATCH="$NCURSES_PATCH"
29676 PANEL_NAME="$PANEL_NAME"
29677 SRC_SUBDIRS="$SRC_SUBDIRS"
29678 TERMINFO="$TERMINFO"
29679 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29680 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29681 TICS_NAME="$TICS_NAME"
29682 TICS_SUFFIX="$TICS_SUFFIX"
29683 TIC_PATH="$TIC_PATH"
29684 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29685 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29686 TINFO_NAME="$TINFO_NAME"
29687 TINFO_SUFFIX="$TINFO_SUFFIX"
29688 UNALTERED_SYMS="$UNALTERED_SYMS"
29689 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29690 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29691 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29692 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29693 WILDCARD_SYMS="$WILDCARD_SYMS"
29694 WITH_CURSES_H="$with_curses_h"
29695 WITH_ECHO="${enable_echo:=yes}"
29696 WITH_OVERWRITE="$with_overwrite"
29697 cf_LIST_MODELS="$cf_list_models"
29698 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29699 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29700 cf_cv_abi_default="$cf_cv_abi_default"
29701 cf_cv_abi_version="$cf_cv_abi_version"
29702 cf_cv_do_relink="$cf_cv_do_relink"
29703 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29704 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29705 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29706 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29707 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29708 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29709 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29710 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29711 cf_cv_rel_version="$cf_cv_rel_version"
29712 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29713 cf_cv_shared_soname='$cf_cv_shared_soname'
29714 cf_cv_shlib_version="$cf_cv_shlib_version"
29715 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29716 cf_cv_system_name="$cf_cv_system_name"
29717 cf_cv_term_driver="$with_term_driver"
29718 cf_with_ada="$cf_with_ada"
29719 cf_with_cxx_binding="$cf_with_cxx_binding"
29720 cf_with_db_install="$cf_with_db_install"
29721 cf_with_manpages="$cf_with_manpages"
29722 cf_with_tests="$cf_with_tests"
29723 host="$host"
29724 target="$target"
29725 verbose="$verbose"
29726 with_shared_cxx="$with_shared_cxx"
29727
29728 EOF
29729
29730 cat >>"$CONFIG_STATUS" <<\EOF
29731 for ac_config_target in $ac_config_targets
29732 do
29733   case "$ac_config_target" in
29734   # Handling of arguments.
29735   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29736   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29737   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29738   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29739   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29740   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29741   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29742   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29743   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29744   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29745   *) { { echo "$as_me:29745: error: invalid argument: $ac_config_target" >&5
29746 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29747    { (exit 1); exit 1; }; };;
29748   esac
29749 done
29750
29751 # If the user did not use the arguments to specify the items to instantiate,
29752 # then the envvar interface is used.  Set only those that are not.
29753 # We use the long form for the default assignment because of an extremely
29754 # bizarre bug on SunOS 4.1.3.
29755 if "$ac_need_defaults"; then
29756   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29757   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29758   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29759 fi
29760
29761 # Create a temporary directory, and hook for its removal unless debugging.
29762 $debug ||
29763 {
29764   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29765   trap '{ (exit 1); exit 1; }' 1 2 13 15
29766 }
29767
29768 # Create a (secure) tmp directory for tmp files.
29769 : "${TMPDIR=/tmp}"
29770 {
29771   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29772   test -n "$tmp" && test -d "$tmp"
29773 }  ||
29774 {
29775   tmp=$TMPDIR/cs$$-$RANDOM
29776   (umask 077 && mkdir "$tmp")
29777 } ||
29778 {
29779    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29780    { (exit 1); exit 1; }
29781 }
29782
29783 EOF
29784
29785 cat >>"$CONFIG_STATUS" <<EOF
29786
29787 #
29788 # CONFIG_FILES section.
29789 #
29790
29791 # No need to generate the scripts if there are no CONFIG_FILES.
29792 # This happens for instance when ./config.status config.h
29793 if test -n "\$CONFIG_FILES"; then
29794   # Protect against being on the right side of a sed subst in config.status.
29795   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29796    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29797 s,@SHELL@,$SHELL,;t t
29798 s,@exec_prefix@,$exec_prefix,;t t
29799 s,@prefix@,$prefix,;t t
29800 s,@program_transform_name@,$program_transform_name,;t t
29801 s,@bindir@,$bindir,;t t
29802 s,@sbindir@,$sbindir,;t t
29803 s,@libexecdir@,$libexecdir,;t t
29804 s,@datarootdir@,$datarootdir,;t t
29805 s,@datadir@,$datadir,;t t
29806 s,@sysconfdir@,$sysconfdir,;t t
29807 s,@sharedstatedir@,$sharedstatedir,;t t
29808 s,@localstatedir@,$localstatedir,;t t
29809 s,@runstatedir@,$runstatedir,;t t
29810 s,@libdir@,$libdir,;t t
29811 s,@includedir@,$includedir,;t t
29812 s,@oldincludedir@,$oldincludedir,;t t
29813 s,@infodir@,$infodir,;t t
29814 s,@mandir@,$mandir,;t t
29815 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29816 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29817 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29818 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29819 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29820 s,@build_alias@,$build_alias,;t t
29821 s,@host_alias@,$host_alias,;t t
29822 s,@target_alias@,$target_alias,;t t
29823 s,@ECHO_C@,$ECHO_C,;t t
29824 s,@ECHO_N@,$ECHO_N,;t t
29825 s,@ECHO_T@,$ECHO_T,;t t
29826 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29827 s,@DEFS@,$DEFS,;t t
29828 s,@LIBS@,$LIBS,;t t
29829 s,@top_builddir@,$top_builddir,;t t
29830 s,@GREP@,$GREP,;t t
29831 s,@EGREP@,$EGREP,;t t
29832 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29833 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29834 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29835 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29836 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29837 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29838 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29839 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29840 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29841 s,@VERSION@,$VERSION,;t t
29842 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29843 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29844 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29845 s,@PACKAGE@,$PACKAGE,;t t
29846 s,@build@,$build,;t t
29847 s,@build_cpu@,$build_cpu,;t t
29848 s,@build_vendor@,$build_vendor,;t t
29849 s,@build_os@,$build_os,;t t
29850 s,@host@,$host,;t t
29851 s,@host_cpu@,$host_cpu,;t t
29852 s,@host_vendor@,$host_vendor,;t t
29853 s,@host_os@,$host_os,;t t
29854 s,@target@,$target,;t t
29855 s,@target_cpu@,$target_cpu,;t t
29856 s,@target_vendor@,$target_vendor,;t t
29857 s,@target_os@,$target_os,;t t
29858 s,@FGREP@,$FGREP,;t t
29859 s,@CC@,$CC,;t t
29860 s,@CFLAGS@,$CFLAGS,;t t
29861 s,@LDFLAGS@,$LDFLAGS,;t t
29862 s,@CPPFLAGS@,$CPPFLAGS,;t t
29863 s,@ac_ct_CC@,$ac_ct_CC,;t t
29864 s,@EXEEXT@,$EXEEXT,;t t
29865 s,@OBJEXT@,$OBJEXT,;t t
29866 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29867 s,@CPP@,$CPP,;t t
29868 s,@LDCONFIG@,$LDCONFIG,;t t
29869 s,@CXX@,$CXX,;t t
29870 s,@CXXFLAGS@,$CXXFLAGS,;t t
29871 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29872 s,@AWK@,$AWK,;t t
29873 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29874 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29875 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29876 s,@LINT@,$LINT,;t t
29877 s,@LINT_OPTS@,$LINT_OPTS,;t t
29878 s,@LINT_LIBS@,$LINT_LIBS,;t t
29879 s,@LN_S@,$LN_S,;t t
29880 s,@cf_config_suffix@,$cf_config_suffix,;t t
29881 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29882 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29883 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29884 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29885 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29886 s,@SET_MAKE@,$SET_MAKE,;t t
29887 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29888 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29889 s,@CTAGS@,$CTAGS,;t t
29890 s,@ETAGS@,$ETAGS,;t t
29891 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29892 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29893 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29894 s,@RANLIB@,$RANLIB,;t t
29895 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29896 s,@LD@,$LD,;t t
29897 s,@ac_ct_LD@,$ac_ct_LD,;t t
29898 s,@AR@,$AR,;t t
29899 s,@ac_ct_AR@,$ac_ct_AR,;t t
29900 s,@NM@,$NM,;t t
29901 s,@ac_ct_NM@,$ac_ct_NM,;t t
29902 s,@ARFLAGS@,$ARFLAGS,;t t
29903 s,@DESTDIR@,$DESTDIR,;t t
29904 s,@BUILD_CC@,$BUILD_CC,;t t
29905 s,@BUILD_CPP@,$BUILD_CPP,;t t
29906 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29907 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29908 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29909 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29910 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29911 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29912 s,@cf_list_models@,$cf_list_models,;t t
29913 s,@ABI_VERSION@,$ABI_VERSION,;t t
29914 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29915 s,@LIBTOOL@,$LIBTOOL,;t t
29916 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29917 s,@LT_UNDEF@,$LT_UNDEF,;t t
29918 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29919 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29920 s,@LIB_CREATE@,$LIB_CREATE,;t t
29921 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29922 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29923 s,@LIB_PREP@,$LIB_PREP,;t t
29924 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29925 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29926 s,@LIB_LINK@,$LIB_LINK,;t t
29927 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29928 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29929 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29930 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29931 s,@TICS_NAME@,$TICS_NAME,;t t
29932 s,@TINFO_NAME@,$TINFO_NAME,;t t
29933 s,@LIB_NAME@,$LIB_NAME,;t t
29934 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29935 s,@CC_G_OPT@,$CC_G_OPT,;t t
29936 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29937 s,@LD_MODEL@,$LD_MODEL,;t t
29938 s,@shlibdir@,$shlibdir,;t t
29939 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29940 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29941 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29942 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29943 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29944 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29945 s,@LINK_PROGS@,$LINK_PROGS,;t t
29946 s,@LINK_TESTS@,$LINK_TESTS,;t t
29947 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29948 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29949 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29950 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29951 s,@RPATH_LIST@,$RPATH_LIST,;t t
29952 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29953 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29954 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29955 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29956 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29957 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29958 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29959 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29960 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29961 s,@TIC@,$TIC,;t t
29962 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29963 s,@INFOCMP@,$INFOCMP,;t t
29964 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29965 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29966 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29967 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29968 s,@XTERM_KBS@,$XTERM_KBS,;t t
29969 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29970 s,@TERMINFO@,$TERMINFO,;t t
29971 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29972 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29973 s,@TERMPATH@,$TERMPATH,;t t
29974 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29975 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29976 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29977 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29978 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29979 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29980 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29981 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29982 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29983 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29984 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29985 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29986 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29987 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29988 s,@RGB_PATH@,$RGB_PATH,;t t
29989 s,@no_x11_rgb@,$no_x11_rgb,;t t
29990 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29991 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29992 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29993 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29994 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29995 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29996 s,@cf_manpage_format@,$cf_manpage_format,;t t
29997 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
29998 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
29999 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30000 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30001 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30002 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30003 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30004 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30005 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30006 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30007 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30008 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30009 s,@PTHREAD@,$PTHREAD,;t t
30010 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30011 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30012 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30013 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30014 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30015 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30016 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30017 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30018 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30019 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30020 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30021 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30022 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30023 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30024 s,@ECHO_LT@,$ECHO_LT,;t t
30025 s,@ECHO_LD@,$ECHO_LD,;t t
30026 s,@RULE_CC@,$RULE_CC,;t t
30027 s,@SHOW_CC@,$SHOW_CC,;t t
30028 s,@ECHO_CC@,$ECHO_CC,;t t
30029 s,@ECHO_LINK@,$ECHO_LINK,;t t
30030 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30031 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30032 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30033 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30034 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30035 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30036 s,@ADAFLAGS@,$ADAFLAGS,;t t
30037 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30038 s,@ADA_TRACE@,$ADA_TRACE,;t t
30039 s,@MATH_LIB@,$MATH_LIB,;t t
30040 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30041 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30042 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30043 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30044 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30045 s,@TEST_LIBS@,$TEST_LIBS,;t t
30046 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30047 s,@CXXCPP@,$CXXCPP,;t t
30048 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30049 s,@CXX_AR@,$CXX_AR,;t t
30050 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30051 s,@CXXLIBS@,$CXXLIBS,;t t
30052 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30053 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30054 s,@M4_exists@,$M4_exists,;t t
30055 s,@cf_ada_make@,$cf_ada_make,;t t
30056 s,@cf_ada_config@,$cf_ada_config,;t t
30057 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30058 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30059 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30060 s,@cf_compile_generics@,$cf_compile_generics,;t t
30061 s,@cf_generic_objects@,$cf_generic_objects,;t t
30062 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30063 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30064 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30065 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30066 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30067 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30068 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30069 s,@cf_ada_package@,$cf_ada_package,;t t
30070 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30071 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30072 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30073 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30074 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30075 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30076 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30077 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30078 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30079 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30080 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30081 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30082 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30083 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30084 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30085 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30086 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30087 s,@TICS_LIBS@,$TICS_LIBS,;t t
30088 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30089 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30090 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30091 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30092 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30093 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30094 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30095 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30096 s,@includesubdir@,$includesubdir,;t t
30097 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30098 s,@TICS_LIST@,$TICS_LIST,;t t
30099 s,@TINFO_LIST@,$TINFO_LIST,;t t
30100 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30101 s,@FORM_NAME@,$FORM_NAME,;t t
30102 s,@MENU_NAME@,$MENU_NAME,;t t
30103 s,@PANEL_NAME@,$PANEL_NAME,;t t
30104 s,@CXX_NAME@,$CXX_NAME,;t t
30105 s,@TEST_ARGS@,$TEST_ARGS,;t t
30106 s,@TEST_DEPS@,$TEST_DEPS,;t t
30107 s,@TEST_ARG2@,$TEST_ARG2,;t t
30108 s,@TEST_DEP2@,$TEST_DEP2,;t t
30109 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30110 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30111 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30112 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30113 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30114 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30115 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30116 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30117 s,@cross_compiling@,$cross_compiling,;t t
30118 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30119 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30120 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30121 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30122 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30123 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30124 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30125 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30126 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30127 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30128 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30129 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30130 CEOF
30131
30132 EOF
30133
30134   cat >>"$CONFIG_STATUS" <<\EOF
30135   # Split the substitutions into bite-sized pieces for seds with
30136   # small command number limits, like on Digital OSF/1 and HP-UX.
30137   ac_max_sed_lines=48
30138   ac_sed_frag=1 # Number of current file.
30139   ac_beg=1 # First line for current file.
30140   ac_end=$ac_max_sed_lines # Line after last line for current file.
30141   ac_more_lines=:
30142   ac_sed_cmds=
30143   while "$ac_more_lines"; do
30144     if test "$ac_beg" -gt 1; then
30145       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30146     else
30147       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30148     fi
30149     if test ! -s "$tmp"/subs.frag; then
30150       ac_more_lines=false
30151     else
30152       # The purpose of the label and of the branching condition is to
30153       # speed up the sed processing (if there are no `@' at all, there
30154       # is no need to browse any of the substitutions).
30155       # These are the two extra sed commands mentioned above.
30156       (echo ':t
30157   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30158       # It is possible to make a multiline substitution using escaped newlines.
30159       # Ensure that we do not split the substitution between script fragments.
30160       ac_BEG=$ac_end
30161       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30162       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30163       if test -s "$tmp"/subs.next; then
30164         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30165         if test ! -s "$tmp"/subs.edit; then
30166           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30167           if test ! -s "$tmp"/subs.edit; then
30168             if test "$ac_beg" -gt 1; then
30169               ac_end=`expr "$ac_end" - 1`
30170               continue
30171             fi
30172           fi
30173         fi
30174       fi
30175
30176       if test -z "$ac_sed_cmds"; then
30177         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30178       else
30179         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30180       fi
30181       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30182       ac_beg=$ac_end
30183       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30184     fi
30185   done
30186   if test -z "$ac_sed_cmds"; then
30187     ac_sed_cmds="cat"
30188   fi
30189 fi # test -n "$CONFIG_FILES"
30190
30191 EOF
30192 cat >>"$CONFIG_STATUS" <<\EOF
30193 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30194   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30195   case "$ac_file" in
30196   - | *:- | *:-:* ) # input from stdin
30197         cat >"$tmp"/stdin
30198         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30199         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30200   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30201         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30202   * )   ac_file_in=$ac_file.in ;;
30203   esac
30204
30205   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30206   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30207          X"$ac_file" : 'X\(//\)[^/]' \| \
30208          X"$ac_file" : 'X\(//\)$' \| \
30209          X"$ac_file" : 'X\(/\)' \| \
30210          .     : '\(.\)' 2>/dev/null ||
30211 echo X"$ac_file" |
30212     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30213           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30214           /^X\(\/\/\)$/{ s//\1/; q; }
30215           /^X\(\/\).*/{ s//\1/; q; }
30216           s/.*/./; q'`
30217   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30218     { case "$ac_dir" in
30219   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30220   *)                      as_incr_dir=.;;
30221 esac
30222 as_dummy="$ac_dir"
30223 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30224   case $as_mkdir_dir in
30225     # Skip DOS drivespec
30226     ?:) as_incr_dir=$as_mkdir_dir ;;
30227     *)
30228       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30229       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30230     ;;
30231   esac
30232 done; }
30233
30234     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30235     # A "../" for each directory in $ac_dir_suffix.
30236     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30237   else
30238     ac_dir_suffix= ac_dots=
30239   fi
30240
30241   case "$srcdir" in
30242   .)  ac_srcdir=.
30243       if test -z "$ac_dots"; then
30244          ac_top_srcdir=.
30245       else
30246          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30247       fi ;;
30248   [\\/]* | ?:[\\/]* )
30249       ac_srcdir="$srcdir$ac_dir_suffix";
30250       ac_top_srcdir="$srcdir" ;;
30251   *) # Relative path.
30252     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30253     ac_top_srcdir="$ac_dots$srcdir" ;;
30254   esac
30255
30256   case $INSTALL in
30257   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30258   *) ac_INSTALL=$ac_dots$INSTALL ;;
30259   esac
30260
30261   if test x"$ac_file" != x-; then
30262     { echo "$as_me:30262: creating $ac_file" >&5
30263 echo "$as_me: creating $ac_file" >&6;}
30264     rm -f "$ac_file"
30265   fi
30266   # Let's still pretend it is `configure' which instantiates (i.e., don't
30267   # use $as_me), people would be surprised to read:
30268   #    /* config.h.  Generated automatically by config.status.  */
30269   configure_input="Generated automatically from `echo $ac_file_in |
30270                                                  sed 's,.*/,,'` by configure."
30271
30272   # First look for the input files in the build tree, otherwise in the
30273   # src tree.
30274   ac_file_inputs=`IFS=:
30275     for f in $ac_file_in; do
30276       case $f in
30277       -) echo "$tmp"/stdin ;;
30278       [\\/$]*)
30279          # Absolute (can't be DOS-style, as IFS=:)
30280          test -f "$f" || { { echo "$as_me:30280: error: cannot find input file: $f" >&5
30281 echo "$as_me: error: cannot find input file: $f" >&2;}
30282    { (exit 1); exit 1; }; }
30283          echo "$f";;
30284       *) # Relative
30285          if test -f "$f"; then
30286            # Build tree
30287            echo "$f"
30288          elif test -f "$srcdir/$f"; then
30289            # Source tree
30290            echo "$srcdir/$f"
30291          else
30292            # /dev/null tree
30293            { { echo "$as_me:30293: error: cannot find input file: $f" >&5
30294 echo "$as_me: error: cannot find input file: $f" >&2;}
30295    { (exit 1); exit 1; }; }
30296          fi;;
30297       esac
30298     done` || { (exit 1); exit 1; }
30299 EOF
30300 cat >>"$CONFIG_STATUS" <<\EOF
30301   ac_warn_datarootdir=no
30302   if test x"$ac_file" != x-; then
30303     for ac_item in $ac_file_inputs
30304     do
30305       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30306       if test -n "$ac_seen"; then
30307         ac_used=`grep '@datarootdir@' "$ac_item"`
30308         if test -z "$ac_used"; then
30309           { echo "$as_me:30309: WARNING: datarootdir was used implicitly but not set:
30310 $ac_seen" >&5
30311 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30312 $ac_seen" >&2;}
30313           ac_warn_datarootdir=yes
30314         fi
30315       fi
30316       ac_seen=`grep '${datarootdir}' "$ac_item"`
30317       if test -n "$ac_seen"; then
30318         { echo "$as_me:30318: WARNING: datarootdir was used explicitly but not set:
30319 $ac_seen" >&5
30320 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30321 $ac_seen" >&2;}
30322         ac_warn_datarootdir=yes
30323       fi
30324     done
30325   fi
30326
30327 if test "x$ac_warn_datarootdir" = xyes; then
30328   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30329 fi
30330
30331 EOF
30332 cat >>"$CONFIG_STATUS" <<EOF
30333   sed "$ac_vpsub
30334 $extrasub
30335 EOF
30336 cat >>"$CONFIG_STATUS" <<\EOF
30337 :t
30338 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30339 s,@configure_input@,$configure_input,;t t
30340 s,@srcdir@,$ac_srcdir,;t t
30341 s,@top_srcdir@,$ac_top_srcdir,;t t
30342 s,@INSTALL@,$ac_INSTALL,;t t
30343 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30344   rm -f "$tmp"/stdin
30345 EOF
30346 test -n "${FGREP}" || FGREP="grep -F"
30347 test -n "${EGREP}" || EGREP="grep -E"
30348 cat >>"$CONFIG_STATUS" <<EOF
30349   test -n "\${FGREP}" || FGREP="$FGREP"
30350   test -n "\${EGREP}" || EGREP="$EGREP"
30351 EOF
30352 cat >>"$CONFIG_STATUS" <<\EOF
30353   if test x"$ac_file" != x-; then
30354     cp "$tmp/out" "$ac_file"
30355
30356     for ac_name in prefix exec_prefix datarootdir
30357     do
30358         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30359         if test -n "$ac_seen"; then
30360             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30361             if test -z "$ac_init"; then
30362               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30363               { echo "$as_me:30363: WARNING: Variable $ac_name is used but was not set:
30364 $ac_seen" >&5
30365 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30366 $ac_seen" >&2;}
30367             fi
30368         fi
30369     done
30370     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30371     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30372     if test -s "$tmp"/out; then
30373       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30374       { echo "$as_me:30374: WARNING: Some variables may not be substituted:
30375 $ac_seen" >&5
30376 echo "$as_me: WARNING: Some variables may not be substituted:
30377 $ac_seen" >&2;}
30378     fi
30379   else
30380     cat "$tmp"/out
30381   fi
30382   rm -f "$tmp"/out
30383
30384 done
30385 EOF
30386 cat >>"$CONFIG_STATUS" <<\EOF
30387
30388 #
30389 # CONFIG_HEADER section.
30390 #
30391
30392 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30393 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30394 #
30395 # ac_d sets the value in "#define NAME VALUE" lines.
30396 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30397 ac_dB='[        ].*$,\1#\2'
30398 ac_dC=' '
30399 ac_dD=',;t'
30400 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30401 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30402 ac_iB='\([      ]\),\1#\2define\3'
30403 ac_iC=' '
30404 ac_iD='\4,;t'
30405 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30406 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30407 ac_uB='$,\1#\2define\3'
30408 ac_uC=' '
30409 ac_uD=',;t'
30410
30411 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30412   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30413   case "$ac_file" in
30414   - | *:- | *:-:* ) # input from stdin
30415         cat >"$tmp"/stdin
30416         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30417         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30418   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30419         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30420   * )   ac_file_in=$ac_file.in ;;
30421   esac
30422
30423   test x"$ac_file" != x- && { echo "$as_me:30423: creating $ac_file" >&5
30424 echo "$as_me: creating $ac_file" >&6;}
30425
30426   # First look for the input files in the build tree, otherwise in the
30427   # src tree.
30428   ac_file_inputs=`IFS=:
30429     for f in $ac_file_in; do
30430       case $f in
30431       -) echo "$tmp"/stdin ;;
30432       [\\/$]*)
30433          # Absolute (can't be DOS-style, as IFS=:)
30434          test -f "$f" || { { echo "$as_me:30434: error: cannot find input file: $f" >&5
30435 echo "$as_me: error: cannot find input file: $f" >&2;}
30436    { (exit 1); exit 1; }; }
30437          echo $f;;
30438       *) # Relative
30439          if test -f "$f"; then
30440            # Build tree
30441            echo $f
30442          elif test -f "$srcdir/$f"; then
30443            # Source tree
30444            echo "$srcdir/$f"
30445          else
30446            # /dev/null tree
30447            { { echo "$as_me:30447: error: cannot find input file: $f" >&5
30448 echo "$as_me: error: cannot find input file: $f" >&2;}
30449    { (exit 1); exit 1; }; }
30450          fi;;
30451       esac
30452     done` || { (exit 1); exit 1; }
30453   # Remove the trailing spaces.
30454   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30455
30456 EOF
30457
30458 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30459 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30460 # be either 'cat' or 'sort'.
30461 cat confdefs.h | uniq >conftest.vals
30462
30463 # Break up conftest.vals because some shells have a limit on
30464 # the size of here documents, and old seds have small limits too.
30465
30466 rm -f conftest.tail
30467 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30468 while grep . conftest.vals >/dev/null
30469 do
30470   # Write chunks of a limited-size here document to conftest.frag.
30471   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30472   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30473   echo 'CEOF' >> "$CONFIG_STATUS"
30474   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30475   rm -f conftest.vals
30476   mv conftest.tail conftest.vals
30477 done
30478 rm -f conftest.vals
30479
30480 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30481 # marker @DEFS@.
30482 echo '  cat >> conftest.edit <<CEOF
30483 /@DEFS@/r conftest.frag
30484 /@DEFS@/d
30485 CEOF
30486 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30487 rm -f "$tmp"/in
30488 mv "$tmp"/out "$tmp"/in
30489 rm -f conftest.edit conftest.frag
30490 ' >> "$CONFIG_STATUS"
30491
30492 cat >>"$CONFIG_STATUS" <<\EOF
30493   # Let's still pretend it is `configure' which instantiates (i.e., don't
30494   # use $as_me), people would be surprised to read:
30495   #    /* config.h.  Generated automatically by config.status.  */
30496   if test x"$ac_file" = x-; then
30497     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30498   else
30499     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30500   fi
30501   cat "$tmp"/in >>"$tmp"/config.h
30502   rm -f "$tmp"/in
30503   if test x"$ac_file" != x-; then
30504     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30505       { echo "$as_me:30505: $ac_file is unchanged" >&5
30506 echo "$as_me: $ac_file is unchanged" >&6;}
30507     else
30508       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30509          X"$ac_file" : 'X\(//\)[^/]' \| \
30510          X"$ac_file" : 'X\(//\)$' \| \
30511          X"$ac_file" : 'X\(/\)' \| \
30512          .     : '\(.\)' 2>/dev/null ||
30513 echo X"$ac_file" |
30514     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30515           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30516           /^X\(\/\/\)$/{ s//\1/; q; }
30517           /^X\(\/\).*/{ s//\1/; q; }
30518           s/.*/./; q'`
30519       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30520         { case "$ac_dir" in
30521   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30522   *)                      as_incr_dir=.;;
30523 esac
30524 as_dummy="$ac_dir"
30525 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30526   case $as_mkdir_dir in
30527     # Skip DOS drivespec
30528     ?:) as_incr_dir=$as_mkdir_dir ;;
30529     *)
30530       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30531       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30532     ;;
30533   esac
30534 done; }
30535
30536       fi
30537       rm -f "$ac_file"
30538       mv "$tmp/config.h" "$ac_file"
30539     fi
30540   else
30541     cat "$tmp"/config.h
30542     rm -f "$tmp"/config.h
30543   fi
30544 done
30545 EOF
30546 cat >>"$CONFIG_STATUS" <<\EOF
30547 #
30548 # CONFIG_COMMANDS section.
30549 #
30550 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30551   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30552   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30553
30554   case "$ac_dest" in
30555     default )
30556 if test "x$cf_with_tests" != xno ; then
30557
30558 for cf_dir in test
30559 do
30560         if test ! -d "$srcdir/$cf_dir" ; then
30561                 continue
30562         elif test -f "$srcdir/$cf_dir/programs" ; then
30563                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30564         fi
30565 done
30566
30567 fi
30568
30569 cf_prefix=$LIB_PREFIX
30570
30571 case "$cf_cv_shlib_version" in
30572 (cygdll|msysdll|mingw|msvcdll)
30573         TINFO_NAME=$TINFO_ARG_SUFFIX
30574         TINFO_SUFFIX=.dll
30575         ;;
30576 esac
30577
30578 if test -n "$TINFO_SUFFIX" ; then
30579         case "$TINFO_SUFFIX" in
30580         (tw*)
30581                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30582                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30583                 ;;
30584         (t*)
30585                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30586                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30587                 ;;
30588         (w*)
30589                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30590                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30591                 ;;
30592         esac
30593 fi
30594
30595 for cf_dir in $SRC_SUBDIRS
30596 do
30597         if test ! -d "$srcdir/$cf_dir" ; then
30598                 continue
30599         elif test -f "$srcdir/$cf_dir/modules" ; then
30600
30601                 SHARED_LIB=
30602                 Libs_To_Make=
30603                 cf_awk_program=
30604                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30605                 then
30606                         cf_awk_program="$cf_awk_program\
30607 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30608 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30609 "
30610                 fi
30611
30612                 if test "x$WILDCARD_SYMS" = xno
30613                 then
30614                         cf_awk_program="$cf_awk_program\
30615 /[      ]_\\*;/ { skip=1; next; }\
30616 "
30617                 fi
30618
30619                 if test "x$cf_awk_program" != "x"
30620                 then
30621                         cat >>$cf_dir/Makefile <<CF_EOF
30622
30623 # Generated by CF_LIB_RULES
30624 resulting.map: $UNALTERED_SYMS
30625         $AWK 'BEGIN { skip = 1; last=""; } \
30626 $cf_awk_program \
30627 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30628  skip = 0; last = \$\$0; } \
30629 END { print last; }' < "$UNALTERED_SYMS" >\$@
30630
30631 distclean::
30632         rm -f resulting.map
30633 CF_EOF
30634                 fi
30635
30636                 for cf_item in $cf_LIST_MODELS
30637                 do
30638
30639         case X$cf_item in
30640         (Xlibtool)
30641                 cf_suffix='.la'
30642                 cf_depsuf=$cf_suffix
30643                 ;;
30644         (Xdebug)
30645                 case "$cf_cv_system_name" in
30646                 (*-msvc*)
30647                         cf_suffix='_g.lib'
30648                         ;;
30649                 (*)
30650                         cf_suffix='_g.a'
30651                         ;;
30652                 esac
30653                 cf_depsuf=$cf_suffix
30654                 ;;
30655         (Xprofile)
30656                 case "$cf_cv_system_name" in
30657                 (*-msvc*)
30658                         cf_suffix='_p.lib'
30659                         ;;
30660                 (*)
30661                         cf_suffix='_p.a'
30662                         ;;
30663                 esac
30664                 cf_depsuf=$cf_suffix
30665                 ;;
30666         (Xshared)
30667                 case "$cf_cv_system_name" in
30668                 (aix[5-7]*)
30669                         cf_suffix='.so'
30670                         cf_depsuf=$cf_suffix
30671                         ;;
30672                 (*-msvc*)
30673                         cf_suffix='.dll'
30674                         cf_depsuf='.dll.lib'
30675                         ;;
30676                 (cygwin*|msys*|mingw*)
30677                         cf_suffix='.dll'
30678                         cf_depsuf='.dll.a'
30679                         ;;
30680                 (darwin*)
30681                         cf_suffix='.dylib'
30682                         cf_depsuf=$cf_suffix
30683                         ;;
30684                 (hpux*)
30685                         case "$target" in
30686                         (ia64*)
30687                                 cf_suffix='.so'
30688                                 cf_depsuf=$cf_suffix
30689                                 ;;
30690                         (*)
30691                                 cf_suffix='.sl'
30692                                 cf_depsuf=$cf_suffix
30693                                 ;;
30694                         esac
30695                         ;;
30696                 (*)
30697                         cf_suffix='.so'
30698                         cf_depsuf=$cf_suffix
30699                         ;;
30700                 esac
30701                 ;;
30702         (*)
30703                 case "$target" in
30704                 (*-msvc*)
30705                         cf_suffix='.lib'
30706                         ;;
30707                 (*)
30708                         cf_suffix='.a'
30709                         ;;
30710                 esac
30711                 cf_depsuf=$cf_suffix
30712                 ;;
30713         esac
30714         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30715         then
30716                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30717                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30718         fi
30719
30720                         if test "$cf_dir" = "c++"
30721                         then
30722
30723 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30724
30725 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30726
30727                         else
30728
30729 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30730
30731 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30732
30733                         fi
30734                         test -z "$cf_libname" && cf_libname="$cf_dir"
30735                         if test "$cf_item" = shared ; then
30736                                 if test -n "${LIB_SUFFIX}"
30737                                 then
30738                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30739                                 else
30740                                         cf_shared_suffix="$cf_suffix"
30741                                 fi
30742                                 if test "$cf_cv_do_symlinks" = yes ; then
30743                                         cf_version_name=
30744
30745                                         case "$cf_cv_shlib_version" in
30746                                         (rel)
30747                                                 cf_version_name=REL_VERSION
30748                                                 ;;
30749                                         (abi)
30750                                                 cf_version_name=ABI_VERSION
30751                                                 ;;
30752                                         esac
30753
30754                                         if test -n "$cf_version_name"
30755                                         then
30756                                                 case "$cf_cv_system_name" in
30757                                                 (darwin*)
30758                                                         # "w", etc?
30759                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30760                                                         ;;
30761                                                 (*)
30762                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30763                                                         ;;
30764                                                 esac
30765                                         fi
30766                                         if test -n "${USE_LIB_SUFFIX}"
30767                                         then
30768                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30769                                         else
30770                                                 cf_shared_suffix="$cf_suffix"
30771                                         fi
30772                                 fi
30773                                 # cygwin needs import library, and has unique naming convention
30774                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30775                                 # use 'cyg' prefix for shared lib.
30776                                 case "$cf_cv_shlib_version" in
30777                                 (cygdll)
30778                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30779                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30780                                         ;;
30781                                 (msysdll)
30782                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30783                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30784                                         ;;
30785                                 (mingw)
30786                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30787                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30788                                         ;;
30789                                 (msvcdll)
30790                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30791                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30792                                         ;;
30793                                 (*)
30794                                         cf_add_lib=
30795                                         ;;
30796                                 esac
30797                                 if test -n "$cf_add_lib"
30798                                 then
30799                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30800                                         continue
30801                                 fi
30802                         fi
30803                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30804                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30805                 done
30806
30807                 if test "$cf_dir" = ncurses ; then
30808                         cf_subsets="$LIB_SUBSETS"
30809                         cf_r_parts="$cf_subsets"
30810                         cf_liblist="$Libs_To_Make"
30811
30812                         while test -n "$cf_r_parts"
30813                         do
30814                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30815                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30816                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30817                                         cf_add_lib=
30818                                         case "$cf_l_parts" in
30819                                         (*termlib*)
30820                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30821                                                 ;;
30822                                         (*ticlib*)
30823                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30824                                                 ;;
30825                                         (*)
30826                                                 break
30827                                                 ;;
30828                                         esac
30829                                         if test -n "$cf_add_lib"; then
30830                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30831                                         fi
30832                                 else
30833                                         break
30834                                 fi
30835                         done
30836                 else
30837                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30838                 fi
30839
30840                 if test "$cf_dir" = c++; then
30841                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30842                                 cf_list=
30843                                 for cf_item in $Libs_To_Make
30844                                 do
30845                                         case "$cf_item" in
30846                                         (*.a)
30847                                                 ;;
30848                                         (*)
30849                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30850                                                 ;;
30851                                         esac
30852                                         for cf_test in $cf_list
30853                                         do
30854                                                 if test "$cf_test" = "$cf_item"
30855                                                 then
30856                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30857                                                         cf_item=
30858                                                         break
30859                                                 fi
30860                                         done
30861                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30862                                 done
30863                                 Libs_To_Make="$cf_list"
30864                         fi
30865                 fi
30866
30867                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30868                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30869                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30870                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30871
30872                 $AWK -f "$srcdir/mk-0th.awk" \
30873                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30874                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30875
30876                 for cf_subset in $cf_subsets
30877                 do
30878                         cf_subdirs=
30879                         for cf_item in $cf_LIST_MODELS
30880                         do
30881
30882                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30883
30884 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30885
30886                         CXX_MODEL=$cf_ITEM
30887                         if test "$CXX_MODEL" = SHARED; then
30888                                 case "$cf_cv_shlib_version" in
30889                                 (cygdll|msysdll|mingw|msvcdll)
30890                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30891
30892 echo "${as_me:-configure}:30892: testing overriding CXX_MODEL to SHARED ..." 1>&5
30893
30894                                         with_shared_cxx=yes
30895                                         ;;
30896                                 (*)
30897                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30898                                         ;;
30899                                 esac
30900                         fi
30901
30902         case X$cf_item in
30903         (Xlibtool)
30904                 cf_suffix='.la'
30905                 cf_depsuf=$cf_suffix
30906                 ;;
30907         (Xdebug)
30908                 case "$cf_cv_system_name" in
30909                 (*-msvc*)
30910                         cf_suffix='_g.lib'
30911                         ;;
30912                 (*)
30913                         cf_suffix='_g.a'
30914                         ;;
30915                 esac
30916                 cf_depsuf=$cf_suffix
30917                 ;;
30918         (Xprofile)
30919                 case "$cf_cv_system_name" in
30920                 (*-msvc*)
30921                         cf_suffix='_p.lib'
30922                         ;;
30923                 (*)
30924                         cf_suffix='_p.a'
30925                         ;;
30926                 esac
30927                 cf_depsuf=$cf_suffix
30928                 ;;
30929         (Xshared)
30930                 case "$cf_cv_system_name" in
30931                 (aix[5-7]*)
30932                         cf_suffix='.so'
30933                         cf_depsuf=$cf_suffix
30934                         ;;
30935                 (*-msvc*)
30936                         cf_suffix='.dll'
30937                         cf_depsuf='.dll.lib'
30938                         ;;
30939                 (cygwin*|msys*|mingw*)
30940                         cf_suffix='.dll'
30941                         cf_depsuf='.dll.a'
30942                         ;;
30943                 (darwin*)
30944                         cf_suffix='.dylib'
30945                         cf_depsuf=$cf_suffix
30946                         ;;
30947                 (hpux*)
30948                         case "$target" in
30949                         (ia64*)
30950                                 cf_suffix='.so'
30951                                 cf_depsuf=$cf_suffix
30952                                 ;;
30953                         (*)
30954                                 cf_suffix='.sl'
30955                                 cf_depsuf=$cf_suffix
30956                                 ;;
30957                         esac
30958                         ;;
30959                 (*)
30960                         cf_suffix='.so'
30961                         cf_depsuf=$cf_suffix
30962                         ;;
30963                 esac
30964                 ;;
30965         (*)
30966                 case "$target" in
30967                 (*-msvc*)
30968                         cf_suffix='.lib'
30969                         ;;
30970                 (*)
30971                         cf_suffix='.a'
30972                         ;;
30973                 esac
30974                 cf_depsuf=$cf_suffix
30975                 ;;
30976         esac
30977         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30978         then
30979                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30980                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30981         fi
30982
30983         case $cf_item in
30984         (libtool) cf_subdir='obj_lo'  ;;
30985         (normal)  cf_subdir='objects' ;;
30986         (debug)   cf_subdir='obj_g' ;;
30987         (profile) cf_subdir='obj_p' ;;
30988         (shared)
30989                 case "$cf_cv_system_name" in
30990                 (cygwin|msys)
30991                         cf_subdir='objects' ;;
30992                 (*)
30993                         cf_subdir='obj_s' ;;
30994                 esac
30995         esac
30996
30997                         # Test for case where we build libtinfo with a different name.
30998                         cf_libname=$cf_dir
30999                         if test "$cf_dir" = ncurses ; then
31000                                 case "$cf_subset" in
31001                                 (*base*)
31002                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31003                                         ;;
31004                                 (*termlib*)
31005                                         cf_libname=$TINFO_LIB_SUFFIX
31006                                         ;;
31007                                 (ticlib*)
31008                                         cf_libname=$TICS_LIB_SUFFIX
31009                                         ;;
31010                                 esac
31011                         elif test "$cf_dir" = c++ ; then
31012
31013 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31014
31015 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31016
31017                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31018                         else
31019
31020 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31021
31022 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31023
31024                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31025                         fi
31026                         if test -n "${USE_ARG_SUFFIX}" ; then
31027                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31028                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31029                         fi
31030
31031                         # These dependencies really are for development, not
31032                         # builds, but they are useful in porting, too.
31033                         cf_depend="../include/ncurses_cfg.h"
31034                         if test "$srcdir" = "."; then
31035                                 cf_reldir="."
31036                         else
31037                                 cf_reldir="\${srcdir}"
31038                         fi
31039
31040                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31041                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31042                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31043                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31044                         fi
31045
31046                         cf_dir_suffix=
31047                         old_cf_suffix="$cf_suffix"
31048                         if test "$cf_cv_shlib_version_infix" = yes ; then
31049                         if test -n "$USE_LIB_SUFFIX" ; then
31050                                 case "$USE_LIB_SUFFIX" in
31051                                 (tw*)
31052                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31053                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31054                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31055                                         ;;
31056                                 (t*)
31057                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31058                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31059                                         cf_dir_suffix=t$EXTRA_SUFFIX
31060                                         ;;
31061                                 (w*)
31062                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31063                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31064                                         cf_dir_suffix=w$EXTRA_SUFFIX
31065                                         ;;
31066                                 (*)
31067                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31068                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31069                                         cf_dir_suffix=$EXTRA_SUFFIX
31070                                         ;;
31071                                 esac
31072                         fi
31073                         fi
31074
31075                         $AWK -f "$srcdir/mk-1st.awk" \
31076                                 name=${cf_libname}${cf_dir_suffix} \
31077                                 traces=$LIB_TRACING \
31078                                 MODEL=$cf_ITEM \
31079                                 CXX_MODEL=$CXX_MODEL \
31080                                 LIB_SUFFIX=$LIB_SUFFIX \
31081                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31082                                 make_phony="${cf_cv_make_PHONY:-no}" \
31083                                 model=$cf_subdir \
31084                                 prefix=$cf_prefix \
31085                                 suffix=$cf_suffix \
31086                                 subset=$cf_subset \
31087                                 driver=$cf_cv_term_driver \
31088                                 SymLink="$LN_S" \
31089                                 TermlibRoot=$TINFO_NAME \
31090                                 TermlibSuffix=$TINFO_SUFFIX \
31091                                 ShlibVer=$cf_cv_shlib_version \
31092                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31093                                 ReLink=${cf_cv_do_relink:-no} \
31094                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31095                                 DoLinks=$cf_cv_do_symlinks \
31096                                 rmSoLocs=$cf_cv_rm_so_locs \
31097                                 ldconfig="$LDCONFIG" \
31098                                 overwrite=$WITH_OVERWRITE \
31099                                 depend="$cf_depend" \
31100                                 host="$host" \
31101                                 libtool_version="$LIBTOOL_VERSION" \
31102                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31103
31104                         cf_suffix="$old_cf_suffix"
31105
31106                         for cf_subdir2 in $cf_subdirs lib
31107                         do
31108                                 test "$cf_subdir" = "$cf_subdir2" && break
31109                         done
31110                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31111                         $AWK -f "$srcdir/mk-2nd.awk" \
31112                                 name=$cf_dir \
31113                                 traces=$LIB_TRACING \
31114                                 MODEL=$cf_ITEM \
31115                                 model=$cf_subdir \
31116                                 subset=$cf_subset \
31117                                 srcdir=$srcdir \
31118                                 echo=$WITH_ECHO \
31119                                 crenames=$cf_cv_prog_CC_c_o \
31120                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31121                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31122                         cf_subdirs="$cf_subdirs $cf_subdir"
31123                         done
31124                 done
31125         fi
31126
31127         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31128 done
31129
31130 echo >> Makefile
31131 echo '# generated by CF_LIB_RULES' >> Makefile
31132
31133 if test "x$cf_cv_make_PHONY" = xyes ; then
31134         cat >> Makefile <<-CF_EOF
31135
31136         .PHONY :        libs
31137         .PHONY :        lintlib
31138         .PHONY :        install.includes
31139         .PHONY :        uninstall.includes
31140         .PHONY :        install.libs
31141         .PHONY :        uninstall.libs
31142 CF_EOF
31143 fi
31144
31145 for cf_dir in $SRC_SUBDIRS
31146 do
31147         if test ! -d "$srcdir/$cf_dir" ; then
31148                 continue
31149         fi
31150
31151         if test -f "$cf_dir/Makefile" ; then
31152                 case "$cf_dir" in
31153                 (Ada95)
31154                         echo 'libs \' >> Makefile
31155                         echo 'install.libs \' >> Makefile
31156                         echo 'uninstall.libs ::' >> Makefile
31157                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31158                         ;;
31159                 esac
31160         fi
31161
31162         if test -f "$srcdir/$cf_dir/modules" ; then
31163
31164                 if test "x$cf_cv_make_PHONY" = xyes ; then
31165                         cat >> Makefile <<-CF_EOF
31166
31167                         .PHONY :        install.$cf_dir
31168                         .PHONY :        uninstall.$cf_dir
31169 CF_EOF
31170                 fi
31171
31172                 echo >> Makefile
31173                 if test -f "$srcdir/$cf_dir/headers" ; then
31174 cat >> Makefile <<CF_EOF
31175 install.includes \\
31176 uninstall.includes \\
31177 CF_EOF
31178                 fi
31179
31180 cat >> Makefile <<CF_EOF
31181 lint \\
31182 libs \\
31183 lintlib \\
31184 install.libs \\
31185 uninstall.libs \\
31186 install.$cf_dir \\
31187 uninstall.$cf_dir ::
31188         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31189 CF_EOF
31190         elif test -f "$srcdir/$cf_dir/headers" ; then
31191 cat >> Makefile <<CF_EOF
31192
31193 libs \\
31194 install.libs \\
31195 uninstall.libs \\
31196 install.includes \\
31197 uninstall.includes ::
31198         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31199 CF_EOF
31200 fi
31201 done
31202
31203 if test "x$cf_cv_make_PHONY" = xyes ; then
31204         cat >> Makefile <<-CF_EOF
31205
31206         .PHONY :        install.data
31207         .PHONY :        uninstall.data
31208 CF_EOF
31209 fi
31210
31211 if test "x$cf_with_db_install" = xyes; then
31212 cat >> Makefile <<CF_EOF
31213
31214 install.libs uninstall.libs \\
31215 install.data uninstall.data ::
31216 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31217 CF_EOF
31218 else
31219 cat >> Makefile <<CF_EOF
31220
31221 install.libs uninstall.libs ::
31222         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31223 CF_EOF
31224 fi
31225
31226 if test "x$cf_with_manpages" = xyes; then
31227
31228 if test "x$cf_cv_make_PHONY" = xyes ; then
31229         cat >> Makefile <<-CF_EOF
31230
31231         .PHONY :        install.man
31232         .PHONY :        uninstall.man
31233 CF_EOF
31234 fi
31235
31236 cat >> Makefile <<CF_EOF
31237
31238 install.man \\
31239 uninstall.man ::
31240         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31241 CF_EOF
31242 fi
31243
31244 cat >> Makefile <<CF_EOF
31245
31246 distclean ::
31247         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31248         rm -f headers.sh headers.sed mk_shared_lib.sh
31249         rm -f edit_man.* man_alias.* *.tmp
31250         rm -rf \${DIRS_TO_MAKE}
31251 CF_EOF
31252
31253 rm -f headers.sed headers.sh
31254
31255 echo creating headers.sh
31256 cat >headers.sh <<CF_EOF
31257 #! $SHELL
31258 # This shell script is generated by the 'configure' script.  It is invoked in a
31259 # subdirectory of the build tree.  It generates a sed-script in the parent
31260 # directory that is used to adjust includes for header files that reside in a
31261 # subdirectory of /usr/include, etc.
31262 PRG=""
31263 while test \$# != 3
31264 do
31265 PRG="\$PRG \$1"; shift
31266 done
31267 DST=\$1
31268 REF=\$2
31269 SRC=\$3
31270 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31271 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31272 echo installing \$SRC in \$DST
31273 CF_EOF
31274
31275 if test "$WITH_CURSES_H" = yes; then
31276         cat >>headers.sh <<CF_EOF
31277 case \$DST in
31278 (/*/include/*)
31279         END=\`basename \$DST\`
31280         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31281         do
31282                 NAME=\`basename \$i\`
31283                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31284         done
31285         ;;
31286 (*)
31287         echo "" >> \$TMPSED
31288         ;;
31289 esac
31290 CF_EOF
31291
31292 else
31293         cat >>headers.sh <<CF_EOF
31294 case \$DST in
31295 (/*/include/*)
31296         END=\`basename \$DST\`
31297         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31298         do
31299                 NAME=\`basename \$i\`
31300                 if test "\$NAME" = "curses.h"
31301                 then
31302                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31303                         NAME=ncurses.h
31304                 fi
31305                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31306         done
31307         ;;
31308 (*)
31309         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31310         ;;
31311 esac
31312 CF_EOF
31313 fi
31314 cat >>headers.sh <<CF_EOF
31315 rm -f \$TMPSRC
31316 sed -f \$TMPSED \$SRC > \$TMPSRC
31317 NAME=\`basename \$SRC\`
31318 CF_EOF
31319 if test "$WITH_CURSES_H" != yes; then
31320         cat >>headers.sh <<CF_EOF
31321 test "\$NAME" = "curses.h" && NAME=ncurses.h
31322 CF_EOF
31323 fi
31324 cat >>headers.sh <<CF_EOF
31325 # Just in case someone gzip'd manpages, remove the conflicting copy.
31326 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31327
31328 eval \$PRG \$TMPSRC \$DST/\$NAME
31329 rm -f \$TMPSRC \$TMPSED
31330 CF_EOF
31331
31332 chmod 0755 headers.sh
31333
31334 for cf_dir in $SRC_SUBDIRS
31335 do
31336         if test ! -d "$srcdir/$cf_dir" ; then
31337                 continue
31338         fi
31339
31340         if test -f "$srcdir/$cf_dir/headers" ; then
31341                 $AWK -f "$srcdir/mk-hdr.awk" \
31342                         subset="$LIB_SUBSETS" \
31343                         compat="$WITH_CURSES_H" \
31344                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31345         fi
31346
31347         if test -f "$srcdir/$cf_dir/modules" ; then
31348                 if test "$cf_dir" != "c++" ; then
31349                         if test "x$cf_cv_make_PHONY" = xyes ; then
31350                                 cat >> $cf_dir/Makefile <<-CF_EOF
31351
31352                                 .PHONY :        depend
31353 CF_EOF
31354                         fi
31355
31356                         cat >>$cf_dir/Makefile <<"CF_EOF"
31357 depend : ${AUTO_SRC}
31358         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31359
31360 # DO NOT DELETE THIS LINE -- make depend depends on it.
31361 CF_EOF
31362                 fi
31363         fi
31364 done
31365
31366 if test "$MANPAGE_RENAMES" != no ; then
31367         # Construct a sed-script to perform renaming within man-pages
31368         test -n "$verbose" && echo "creating edit_man.sed"
31369         test ! -d man && mkdir man
31370         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31371 fi
31372
31373 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31374 if test -z "$USE_OLD_MAKERULES" ; then
31375         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31376 fi
31377 fi
31378  ;;
31379   esac
31380 done
31381 EOF
31382
31383 cat >>"$CONFIG_STATUS" <<\EOF
31384
31385 { (exit 0); exit 0; }
31386 EOF
31387 chmod +x "$CONFIG_STATUS"
31388 ac_clean_files=$ac_clean_files_save
31389
31390 # configure is writing to config.log, and then calls config.status.
31391 # config.status does its own redirection, appending to config.log.
31392 # Unfortunately, on DOS this fails, as config.log is still kept open
31393 # by configure, so config.status won't be able to write to it; its
31394 # output is simply discarded.  So we exec the FD to /dev/null,
31395 # effectively closing config.log, so it can be properly (re)opened and
31396 # appended to by config.status.  When coming back to configure, we
31397 # need to make the FD available again.
31398 if test "$no_create" != yes; then
31399   ac_cs_success=:
31400   exec 5>/dev/null
31401   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31402   exec 5>>config.log
31403   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31404   # would make configure fail if this is the last instruction.
31405   "$ac_cs_success" || { (exit 1); exit 1; }
31406 fi
31407 ${MAKE:-make} preinstall