]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.4 - patch 20231125
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.772 .
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  name ncurses*X-config file with X
729   --with-pkg-config[=CMD] enable/disable use of pkg-config and its name CMD
730   --with-pkg-config-libdir[=XXX] use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix[=XXX]  suffix pkg-config files with XXX
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix=DESTDIR use DESTDIR as installation directory prefix
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version[={rel|abi}] use release or ABI version in shared library file names
756   --with-libtool-opts[=XXX] give libtool additional options XXX
757   --with-export-syms[=SYM-FILE] limit symbols exported by libtool to those listed in SYM-FILE
758   --with-versioned-syms[=MAP-FILE] version ELF shared library symbols per MAP-FILE
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix[=X] append extra suffix X to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs[=XXX]  specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --disable-setuid-environ restrict setuid use of ncurses environment variables
789   --enable-symlinks       make tic use symbolic links not hard links
790   --enable-broken_linker  compile with broken-linker support code
791   --enable-bsdpad         recognize BSD-style prefix padding
792   --disable-widec         compile without wide character and UTF-8 support
793   --disable-lp64          allow chtype to be long (ignore _LP64)
794   --disable-largefile     omit support for large files
795   --disable-tparm-varargs compile tparm() without varargs interface
796   --disable-tic-depends   link tic library without explicit dependency on ncurses library
797   --enable-wattr-macros   enable wattr* macros
798   --with-x11-rgb=FILE     obtain X11 color definitions from FILE (default: EPREFIX/lib/X11/rgb.txt)
799   --with-bool=TYPE        fall back to TYPE for curses 'bool' typedef
800   --with-caps=alt         compile with alternate Caps file
801   --with-chtype=TYPE      override type of chtype
802   --with-ospeed=TYPE      override type of ospeed variable
803   --with-mmask-t=TYPE     override type of mmask_t
804   --with-ccharw-max=XXX   override size CCHARW_MAX
805   --enable-signed-char    use signed chars for Boolean array in term.h
806   --with-tparm-arg=TYPE   override parameter type of tparm
807   --with-rcs-ids          compile-in RCS identifiers
808 Options to Specify How Manpages are Installed:
809   --with-manpage-format   specify manpage-format: gzip/compress/bzip2/xz,
810                           BSDI/normal and optionally formatted/catonly,
811                           e.g., gzip,formatted
812   --with-manpage-renames  specify manpage-renaming
813   --with-manpage-aliases  specify manpage-aliases using .so
814   --with-manpage-symlinks specify manpage-aliases using symlinks
815   --with-manpage-tbl      specify manpage processing with tbl
816 Extensions:
817   --disable-ext-funcs     disable function-extensions
818   --enable-sp-funcs       enable SCREEN-extensions
819   --enable-term-driver    enable terminal-driver
820   --enable-const          compile with extra/non-standard const
821   --enable-ext-colors     compile for 256-color support
822   --enable-ext-mouse      compile for extended mouse-encoding
823   --enable-ext-putwin     compile with extended putwin/screendump
824   --enable-no-padding     compile with $NCURSES_NO_PADDING code
825   --enable-sigwinch       compile with SIGWINCH handler
826   --enable-tcap-names     compile with user-definable terminal capabilities
827 Reentrant Code:
828   --with-pthread          use POSIX thread library
829   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
830   --enable-weak-symbols   enable weak-symbols for pthreads
831   --enable-reentrant      compile with reentrant code
832   --disable-opaque-curses do not make WINDOW, etc., structures opaque
833   --disable-opaque-form   do not make form library structures opaque
834   --disable-opaque-menu   do not make menu library structures opaque
835   --disable-opaque-panel  do not make panel library structures opaque
836   --with-wrap-prefix=XXX  override prefix used for public variables
837 Development Code:
838   --without-develop       disable development options
839   --enable-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] use CMD as Ada95 compiler (default: gnatmake)
870   --with-ada-include=DIR  find Ada95 includes in DIR (default: PREFIX/share/ada/adainclude)
871   --with-ada-objects=DIR  find Ada95 objects in DIR (default: PREFIX/lib/ada/adalib)
872   --with-ada-sharedlib    build Ada95 shared library; requires GNAT project support
873   --with-ada-libname[=XXX]  use XXX as Ada95 library name
874 Library basenames for pkgsrc:
875   --with-form-libname[=XXX] override ifelse(,,form,) basename of library
876   --with-menu-libname[=XXX] override ifelse(,,menu,) basename of library
877   --with-panel-libname[=XXX] override ifelse(,,panel,) basename of library
878   --with-cxx-libname[=XXX] override ifelse(ncurses++,,cxx,ncurses++) basename of library
879
880 Some influential environment variables:
881   CC          C compiler command
882   CFLAGS      C compiler flags
883   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
884               nonstandard directory <lib dir>
885   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
886               headers in a nonstandard directory <include dir>
887   CPP         C preprocessor
888   CXX         C++ compiler command
889   CXXFLAGS    C++ compiler flags
890   CXXCPP      C++ preprocessor
891
892 Use these variables to override the choices made by `configure' or to help
893 it to find libraries and programs with nonstandard names/locations.
894
895 EOF
896 fi
897
898 if test "$ac_init_help" = "recursive"; then
899   # If there are subdirs, report their specific --help.
900   ac_popdir=`pwd`
901   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
902     cd "$ac_subdir"
903     # A "../" for each directory in /$ac_subdir.
904     ac_dots=`echo "$ac_subdir" |
905              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
906
907     case "$srcdir" in
908     .) # No --srcdir option.  We are building in place.
909       ac_sub_srcdir="$srcdir" ;;
910     [\\/]* | ?:[\\/]* ) # Absolute path.
911       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
912     *) # Relative path.
913       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
914     esac
915
916     # Check for guested configure; otherwise get Cygnus style configure.
917     if test -f "$ac_sub_srcdir/configure.gnu"; then
918       echo
919       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
920     elif test -f "$ac_sub_srcdir/configure"; then
921       echo
922       $SHELL "$ac_sub_srcdir/configure" --help=recursive
923     elif test -f "$ac_sub_srcdir/configure.ac" ||
924            test -f "$ac_sub_srcdir/configure.in"; then
925       echo
926       "$ac_configure" --help
927     else
928       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
929     fi
930     cd "$ac_popdir"
931   done
932 fi
933
934 test -n "$ac_init_help" && exit 0
935 if "$ac_init_version"; then
936   cat <<\EOF
937
938 Copyright 2003-2022,2023        Thomas E. Dickey
939 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
940 Free Software Foundation, Inc.
941 This configure script is free software; the Free Software Foundation
942 gives unlimited permission to copy, distribute and modify it.
943 EOF
944   exit 0
945 fi
946 exec 5>config.log
947 cat >&5 <<EOF
948 This file contains any messages produced by compilers while
949 running configure, to aid debugging if configure makes a mistake.
950
951 It was created by $as_me, which was
952 generated by GNU Autoconf 2.52.20230903.  Invocation command line was
953
954   $ $0 $@
955
956 EOF
957 {
958 cat <<_ASUNAME
959 ## ---------- ##
960 ## Platform.  ##
961 ## ---------- ##
962
963 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
964 uname -m = `(uname -m) 2>/dev/null || echo unknown`
965 uname -r = `(uname -r) 2>/dev/null || echo unknown`
966 uname -s = `(uname -s) 2>/dev/null || echo unknown`
967 uname -v = `(uname -v) 2>/dev/null || echo unknown`
968
969 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
970 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
971
972 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
973 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
974 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
975 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
976 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
977 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
978 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
979
980 PATH = $PATH
981
982 _ASUNAME
983 } >&5
984
985 cat >&5 <<EOF
986 ## ------------ ##
987 ## Core tests.  ##
988 ## ------------ ##
989
990 EOF
991
992 # Keep a trace of the command line.
993 # Strip out --no-create and --no-recursion so they do not pile up.
994 # Also quote any args containing shell meta-characters.
995 ac_configure_args=
996 ac_sep=
997 for ac_arg
998 do
999   case "$ac_arg" in
1000   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1001   | --no-cr | --no-c) ;;
1002   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1003   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
1004   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1005     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1006     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1007     ac_sep=" " ;;
1008   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1009      ac_sep=" " ;;
1010   esac
1011   # Get rid of the leading space.
1012 done
1013
1014 # When interrupted or exit'd, cleanup temporary files, and complete
1015 # config.log.  We remove comments because anyway the quotes in there
1016 # would cause problems or look ugly.
1017 trap 'exit_status=$?
1018   # Save into config.log some information that might help in debugging.
1019   echo >&5
1020   echo "## ----------------- ##" >&5
1021   echo "## Cache variables.  ##" >&5
1022   echo "## ----------------- ##" >&5
1023   echo >&5
1024   # The following way of writing the cache mishandles newlines in values,
1025 {
1026   (set) 2>&1 |
1027     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1028     *ac_space=\ *)
1029       sed -n \
1030         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1031           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1032       ;;
1033     *)
1034       sed -n \
1035         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1036       ;;
1037     esac;
1038 } >&5
1039   sed "/^$/d" confdefs.h >conftest.log
1040   if test -s conftest.log; then
1041     echo >&5
1042     echo "## ------------ ##" >&5
1043     echo "## confdefs.h.  ##" >&5
1044     echo "## ------------ ##" >&5
1045     echo >&5
1046     cat conftest.log >&5
1047   fi
1048   (echo; echo) >&5
1049   test "$ac_signal" != 0 &&
1050     echo "$as_me: caught signal $ac_signal" >&5
1051   echo "$as_me: exit $exit_status" >&5
1052   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1053     exit $exit_status
1054      ' 0
1055 for ac_signal in 1 2 13 15; do
1056   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1057 done
1058 ac_signal=0
1059
1060 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1061 rm -rf conftest* confdefs.h
1062 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1063 echo >confdefs.h
1064
1065 # Let the site file select an alternate cache file if it wants to.
1066 # Prefer explicitly selected file to automatically selected ones.
1067 if test -z "$CONFIG_SITE"; then
1068   if test "x$prefix" != xNONE; then
1069     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1070   else
1071     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1072   fi
1073 fi
1074 for ac_site_file in $CONFIG_SITE; do
1075   if test -r "$ac_site_file"; then
1076     { echo "$as_me:1076: loading site script $ac_site_file" >&5
1077 echo "$as_me: loading site script $ac_site_file" >&6;}
1078     cat "$ac_site_file" >&5
1079     . "$ac_site_file"
1080   fi
1081 done
1082
1083 if test -r "$cache_file"; then
1084   # Some versions of bash will fail to source /dev/null (special
1085   # files actually), so we avoid doing that.
1086   if test -f "$cache_file"; then
1087     { echo "$as_me:1087: loading cache $cache_file" >&5
1088 echo "$as_me: loading cache $cache_file" >&6;}
1089     case $cache_file in
1090       [\\/]* | ?:[\\/]* ) . $cache_file;;
1091       *)                      . ./$cache_file;;
1092     esac
1093   fi
1094 else
1095   { echo "$as_me:1095: creating cache $cache_file" >&5
1096 echo "$as_me: creating cache $cache_file" >&6;}
1097   >$cache_file
1098 fi
1099
1100 # Check that the precious variables saved in the cache have kept the same
1101 # value.
1102 ac_cache_corrupted=false
1103 for ac_var in `(set) 2>&1 |
1104                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1105   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1106   eval ac_new_set=\$ac_env_${ac_var}_set
1107   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1108   eval ac_new_val="\$ac_env_${ac_var}_value"
1109   case "$ac_old_set,$ac_new_set" in
1110     set,)
1111       { echo "$as_me:1111: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1112 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1113       ac_cache_corrupted=: ;;
1114     ,set)
1115       { echo "$as_me:1115: error: \`$ac_var' was not set in the previous run" >&5
1116 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1117       ac_cache_corrupted=: ;;
1118     ,);;
1119     *)
1120       if test "x$ac_old_val" != "x$ac_new_val"; then
1121         { echo "$as_me:1121: error: \`$ac_var' has changed since the previous run:" >&5
1122 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1123         { echo "$as_me:1123:   former value:  $ac_old_val" >&5
1124 echo "$as_me:   former value:  $ac_old_val" >&2;}
1125         { echo "$as_me:1125:   current value: $ac_new_val" >&5
1126 echo "$as_me:   current value: $ac_new_val" >&2;}
1127         ac_cache_corrupted=:
1128       fi;;
1129   esac
1130   # Pass precious variables to config.status.  It doesn't matter if
1131   # we pass some twice (in addition to the command line arguments).
1132   if test "$ac_new_set" = set; then
1133     case "$ac_new_val" in
1134     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1135       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1136       ac_configure_args="$ac_configure_args '$ac_arg'"
1137       ;;
1138     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1139        ;;
1140     esac
1141   fi
1142 done
1143 if "$ac_cache_corrupted"; then
1144   { echo "$as_me:1144: error: changes in the environment can compromise the build" >&5
1145 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1146   { { echo "$as_me:1146: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1147 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1148    { (exit 1); exit 1; }; }
1149 fi
1150
1151 ac_ext=c
1152 ac_cpp='$CPP $CPPFLAGS'
1153 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1154 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1155 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1156 ac_main_return="return"
1157
1158 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1159   *c*,-n*) ECHO_N=
1160            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1161            ECHO_T='     '
1162            ;;
1163   *c*,*  ) ECHO_N=-n
1164            ECHO_C=
1165            ECHO_T=
1166            ;;
1167   *)       ECHO_N=
1168            ECHO_C='\c'
1169            ECHO_T=
1170            ;;
1171 esac
1172 echo "#! $SHELL" >conftest.sh
1173 echo  "exit 0"   >>conftest.sh
1174 chmod +x conftest.sh
1175 if { (echo "$as_me:1175: PATH=\".;.\"; conftest.sh") >&5
1176   (PATH=".;."; conftest.sh) 2>&5
1177   ac_status=$?
1178   echo "$as_me:1178: \$? = $ac_status" >&5
1179   (exit "$ac_status"); }; then
1180   ac_path_separator=';'
1181 else
1182   ac_path_separator=:
1183 fi
1184 PATH_SEPARATOR="$ac_path_separator"
1185 rm -f conftest.sh
1186
1187 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1188
1189 top_builddir=`pwd`
1190
1191 for ac_prog in ggrep grep
1192 do
1193   # Extract the first word of "$ac_prog", so it can be a program name with args.
1194 set dummy $ac_prog; ac_word=$2
1195 echo "$as_me:1195: checking for $ac_word" >&5
1196 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1197 if test "${ac_cv_prog_GREP+set}" = set; then
1198   echo $ECHO_N "(cached) $ECHO_C" >&6
1199 else
1200   if test -n "$GREP"; then
1201   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1202 else
1203   ac_save_IFS=$IFS; IFS=$ac_path_separator
1204 ac_dummy="$PATH"
1205 for ac_dir in $ac_dummy; do
1206   IFS=$ac_save_IFS
1207   test -z "$ac_dir" && ac_dir=.
1208   $as_executable_p "$ac_dir/$ac_word" || continue
1209 ac_cv_prog_GREP="$ac_prog"
1210 echo "$as_me:1210: found $ac_dir/$ac_word" >&5
1211 break
1212 done
1213
1214 fi
1215 fi
1216 GREP=$ac_cv_prog_GREP
1217 if test -n "$GREP"; then
1218   echo "$as_me:1218: result: $GREP" >&5
1219 echo "${ECHO_T}$GREP" >&6
1220 else
1221   echo "$as_me:1221: result: no" >&5
1222 echo "${ECHO_T}no" >&6
1223 fi
1224
1225   test -n "$GREP" && break
1226 done
1227 test -n "$GREP" || GREP=": "
1228
1229 echo "$as_me:1229: checking for egrep" >&5
1230 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1231 if test "${ac_cv_path_EGREP+set}" = set; then
1232   echo $ECHO_N "(cached) $ECHO_C" >&6
1233 else
1234   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1235    then ac_cv_path_EGREP="$GREP -E"
1236    else
1237      for ac_prog in gegrep egrep
1238 do
1239   # Extract the first word of "$ac_prog", so it can be a program name with args.
1240 set dummy $ac_prog; ac_word=$2
1241 echo "$as_me:1241: checking for $ac_word" >&5
1242 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1243 if test "${ac_cv_path_EGREP+set}" = set; then
1244   echo $ECHO_N "(cached) $ECHO_C" >&6
1245 else
1246   case $EGREP in
1247   [\\/]* | ?:[\\/]*)
1248   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1249   ;;
1250   *)
1251   ac_save_IFS=$IFS; IFS=$ac_path_separator
1252 ac_dummy="$PATH"
1253 for ac_dir in $ac_dummy; do
1254   IFS=$ac_save_IFS
1255   test -z "$ac_dir" && ac_dir=.
1256   if $as_executable_p "$ac_dir/$ac_word"; then
1257    ac_cv_path_EGREP="$ac_dir/$ac_word"
1258    echo "$as_me:1258: found $ac_dir/$ac_word" >&5
1259    break
1260 fi
1261 done
1262
1263   ;;
1264 esac
1265 fi
1266 EGREP=$ac_cv_path_EGREP
1267
1268 if test -n "$EGREP"; then
1269   echo "$as_me:1269: result: $EGREP" >&5
1270 echo "${ECHO_T}$EGREP" >&6
1271 else
1272   echo "$as_me:1272: result: no" >&5
1273 echo "${ECHO_T}no" >&6
1274 fi
1275
1276   test -n "$EGREP" && break
1277 done
1278 test -n "$EGREP" || EGREP=": "
1279
1280      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1280: error: cannot find workable egrep" >&5
1281 echo "$as_me: error: cannot find workable egrep" >&2;}
1282    { (exit 1); exit 1; }; }
1283    fi
1284 fi
1285 echo "$as_me:1285: result: $ac_cv_path_EGREP" >&5
1286 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1287  EGREP="$ac_cv_path_EGREP"
1288
1289 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1290 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1291 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1292 cf_cv_abi_version=${NCURSES_MAJOR}
1293 cf_cv_abi_default=${NCURSES_MAJOR}
1294 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1295 cf_cv_timestamp=`date`
1296 echo "$as_me:1296: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&5
1297 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_default ($cf_cv_timestamp)" >&6
1298
1299 if test -f "$srcdir/VERSION" ; then
1300         echo "$as_me:1300: checking for package version" >&5
1301 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1302
1303         # if there are not enough fields, cut returns the last one...
1304         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1305         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1306         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1307
1308         # this is how CF_BUNDLED_INTL uses $VERSION:
1309         VERSION="$cf_field1"
1310
1311         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1312         test -z "$VERSION_MAJOR" && { { echo "$as_me:1312: error: missing major-version" >&5
1313 echo "$as_me: error: missing major-version" >&2;}
1314    { (exit 1); exit 1; }; }
1315
1316         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1317         test -z "$VERSION_MINOR" && { { echo "$as_me:1317: error: missing minor-version" >&5
1318 echo "$as_me: error: missing minor-version" >&2;}
1319    { (exit 1); exit 1; }; }
1320
1321         echo "$as_me:1321: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1322 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1323
1324         echo "$as_me:1324: checking for package patch date" >&5
1325 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1326         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1327         case .$VERSION_PATCH in
1328         (.)
1329                 { { echo "$as_me:1329: error: missing patch-date $VERSION_PATCH" >&5
1330 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1331    { (exit 1); exit 1; }; }
1332                 ;;
1333         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1334                 ;;
1335         (*)
1336                 { { echo "$as_me:1336: error: illegal patch-date $VERSION_PATCH" >&5
1337 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1338    { (exit 1); exit 1; }; }
1339                 ;;
1340         esac
1341         echo "$as_me:1341: result: $VERSION_PATCH" >&5
1342 echo "${ECHO_T}$VERSION_PATCH" >&6
1343 else
1344         { { echo "$as_me:1344: error: did not find $srcdir/VERSION" >&5
1345 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1346    { (exit 1); exit 1; }; }
1347 fi
1348
1349 # show the actual data that we have for versions:
1350 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1351
1352 echo "${as_me:-configure}:1352: testing ABI VERSION $VERSION ..." 1>&5
1353
1354 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1355
1356 echo "${as_me:-configure}:1356: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1357
1358 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1359
1360 echo "${as_me:-configure}:1360: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1361
1362 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1363
1364 echo "${as_me:-configure}:1364: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1365
1366         cf_PACKAGE=NCURSES
1367         PACKAGE=ncurses
1368
1369 cat >>confdefs.h <<EOF
1370 #define PACKAGE "$PACKAGE"
1371 EOF
1372
1373 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1374
1375         cat >>confdefs.h <<EOF
1376 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1377 EOF
1378
1379         cat >>confdefs.h <<EOF
1380 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1381 EOF
1382
1383 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1384
1385 # Check whether --with-rel-version or --without-rel-version was given.
1386 if test "${with_rel_version+set}" = set; then
1387   withval="$with_rel_version"
1388   { echo "$as_me:1388: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1389 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1390  cf_cv_rel_version=$withval
1391 fi;
1392
1393  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1394  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1395  test -n "NCURSES_MINOR" || NCURSES_MINOR=0
1396
1397 if test -n "$NCURSES_MAJOR" ; then
1398   case `echo "$NCURSES_MAJOR" | sed -e 's/^[0-9]*$/0/g'` in
1399   (0)
1400         ;;
1401   (*)
1402         { { echo "$as_me:1402: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1403 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1404    { (exit 1); exit 1; }; }
1405         ;;
1406   esac
1407 else
1408   { { echo "$as_me:1408: error: Release major-version value is empty" >&5
1409 echo "$as_me: error: Release major-version value is empty" >&2;}
1410    { (exit 1); exit 1; }; }
1411 fi
1412
1413 if test -n "$NCURSES_MINOR" ; then
1414   case `echo "$NCURSES_MINOR" | sed -e 's/^[0-9]*$/0/g'` in
1415   (0)
1416         ;;
1417   (*)
1418         { { echo "$as_me:1418: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1419 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1420    { (exit 1); exit 1; }; }
1421         ;;
1422   esac
1423 else
1424   { { echo "$as_me:1424: error: Release minor-version value is empty" >&5
1425 echo "$as_me: error: Release minor-version value is empty" >&2;}
1426    { (exit 1); exit 1; }; }
1427 fi
1428
1429 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1430
1431 # Check whether --with-abi-version or --without-abi-version was given.
1432 if test "${with_abi_version+set}" = set; then
1433   withval="$with_abi_version"
1434
1435         if test "x$cf_cv_abi_version" != "x$withval"
1436         then
1437                 { echo "$as_me:1437: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1438 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1439                 case "$cf_cv_rel_version" in
1440                 (5.*)
1441                         cf_cv_rel_version=$withval.0
1442                         ;;
1443                 (6.*)
1444                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1445                         ;;
1446                 esac
1447         fi
1448         cf_cv_abi_version=$withval
1449 fi;
1450
1451 if test -n "$cf_cv_abi_version" ; then
1452   case `echo "$cf_cv_abi_version" | sed -e 's/^[0-9]*$/0/g'` in
1453   (0)
1454         ;;
1455   (*)
1456         { { echo "$as_me:1456: error: ABI version is not a number: $cf_cv_abi_version" >&5
1457 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1458    { (exit 1); exit 1; }; }
1459         ;;
1460   esac
1461 else
1462   { { echo "$as_me:1462: error: ABI version value is empty" >&5
1463 echo "$as_me: error: ABI version value is empty" >&2;}
1464    { (exit 1); exit 1; }; }
1465 fi
1466
1467 cf_cv_abi_default=$cf_cv_abi_version
1468
1469 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1470 then
1471         case "$cf_cv_rel_version" in
1472         (5.*)
1473                 cf_cv_rel_version=$with_abi_version.0
1474                 ;;
1475         esac
1476 fi
1477
1478 ac_aux_dir=
1479 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1480   if test -f "$ac_dir/install-sh"; then
1481     ac_aux_dir=$ac_dir
1482     ac_install_sh="$ac_aux_dir/install-sh -c"
1483     break
1484   elif test -f "$ac_dir/install.sh"; then
1485     ac_aux_dir=$ac_dir
1486     ac_install_sh="$ac_aux_dir/install.sh -c"
1487     break
1488   elif test -f "$ac_dir/shtool"; then
1489     ac_aux_dir=$ac_dir
1490     ac_install_sh="$ac_aux_dir/shtool install -c"
1491     break
1492   fi
1493 done
1494 if test -z "$ac_aux_dir"; then
1495   { { echo "$as_me:1495: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1496 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1497    { (exit 1); exit 1; }; }
1498 fi
1499 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1500 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1501 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1502
1503 # Make sure we can run config.sub.
1504 $ac_config_sub sun4 >/dev/null 2>&1 ||
1505   { { echo "$as_me:1505: error: cannot run $ac_config_sub" >&5
1506 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1507    { (exit 1); exit 1; }; }
1508
1509 echo "$as_me:1509: checking build system type" >&5
1510 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1511 if test "${ac_cv_build+set}" = set; then
1512   echo $ECHO_N "(cached) $ECHO_C" >&6
1513 else
1514   ac_cv_build_alias=$build_alias
1515 test -z "$ac_cv_build_alias" &&
1516   ac_cv_build_alias=`$ac_config_guess`
1517 test -z "$ac_cv_build_alias" &&
1518   { { echo "$as_me:1518: error: cannot guess build type; you must specify one" >&5
1519 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1520    { (exit 1); exit 1; }; }
1521 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1522   { { echo "$as_me:1522: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1523 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1524    { (exit 1); exit 1; }; }
1525
1526 fi
1527 echo "$as_me:1527: result: $ac_cv_build" >&5
1528 echo "${ECHO_T}$ac_cv_build" >&6
1529 build=$ac_cv_build
1530 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1531 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1532 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1533
1534 echo "$as_me:1534: checking host system type" >&5
1535 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1536 if test "${ac_cv_host+set}" = set; then
1537   echo $ECHO_N "(cached) $ECHO_C" >&6
1538 else
1539   ac_cv_host_alias=$host_alias
1540 test -z "$ac_cv_host_alias" &&
1541   ac_cv_host_alias=$ac_cv_build_alias
1542 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1543   { { echo "$as_me:1543: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1544 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1545    { (exit 1); exit 1; }; }
1546
1547 fi
1548 echo "$as_me:1548: result: $ac_cv_host" >&5
1549 echo "${ECHO_T}$ac_cv_host" >&6
1550 host=$ac_cv_host
1551 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1552 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1553 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1554
1555 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1556         echo "$as_me:1556: checking target system type" >&5
1557 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1558 if test "${ac_cv_target+set}" = set; then
1559   echo $ECHO_N "(cached) $ECHO_C" >&6
1560 else
1561   ac_cv_target_alias=$target_alias
1562 test "x$ac_cv_target_alias" = "x" &&
1563   ac_cv_target_alias=$ac_cv_host_alias
1564 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1565   { { echo "$as_me:1565: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1566 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1567    { (exit 1); exit 1; }; }
1568
1569 fi
1570 echo "$as_me:1570: result: $ac_cv_target" >&5
1571 echo "${ECHO_T}$ac_cv_target" >&6
1572 target=$ac_cv_target
1573 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1574 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1575 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1576
1577 # The aliases save the names the user supplied, while $host etc.
1578 # will get canonicalized.
1579 test -n "$target_alias" &&
1580   test "$program_prefix$program_suffix$program_transform_name" = \
1581     NONENONEs,x,x, &&
1582   program_prefix=${target_alias}-
1583         system_name="$host_os"
1584 else
1585         system_name="`(uname -s -r) 2>/dev/null`"
1586         if test -z "$system_name" ; then
1587                 system_name="`(hostname) 2>/dev/null`"
1588         fi
1589 fi
1590 test -n "$system_name" &&
1591 cat >>confdefs.h <<EOF
1592 #define SYSTEM_NAME "$system_name"
1593 EOF
1594
1595 if test "${cf_cv_system_name+set}" = set; then
1596   echo $ECHO_N "(cached) $ECHO_C" >&6
1597 else
1598   cf_cv_system_name="$system_name"
1599 fi
1600
1601 test -z "$system_name" && system_name="$cf_cv_system_name"
1602 test -n "$cf_cv_system_name" && echo "$as_me:1602: result: Configuring for $cf_cv_system_name" >&5
1603 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1604
1605 if test ".$system_name" != ".$cf_cv_system_name" ; then
1606         echo "$as_me:1606: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1607 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1608         { { echo "$as_me:1608: error: \"Please remove config.cache and try again.\"" >&5
1609 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1610    { (exit 1); exit 1; }; }
1611 fi
1612
1613 # Check whether --with-system-type or --without-system-type was given.
1614 if test "${with_system_type+set}" = set; then
1615   withval="$with_system_type"
1616   { echo "$as_me:1616: WARNING: overriding system type to $withval" >&5
1617 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1618         cf_cv_system_name=$withval
1619         host_os=$withval
1620
1621 fi;
1622
1623 ###     Save the given $CFLAGS to allow user-override.
1624 cf_user_CFLAGS="$CFLAGS"
1625
1626 ###     Default install-location
1627 echo "$as_me:1627: checking for fgrep" >&5
1628 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1629 if test "${ac_cv_path_FGREP+set}" = set; then
1630   echo $ECHO_N "(cached) $ECHO_C" >&6
1631 else
1632   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1633    then ac_cv_path_FGREP="$GREP -F"
1634    else
1635      for ac_prog in gfgrep fgrep
1636 do
1637   # Extract the first word of "$ac_prog", so it can be a program name with args.
1638 set dummy $ac_prog; ac_word=$2
1639 echo "$as_me:1639: checking for $ac_word" >&5
1640 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1641 if test "${ac_cv_path_FGREP+set}" = set; then
1642   echo $ECHO_N "(cached) $ECHO_C" >&6
1643 else
1644   case $FGREP in
1645   [\\/]* | ?:[\\/]*)
1646   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1647   ;;
1648   *)
1649   ac_save_IFS=$IFS; IFS=$ac_path_separator
1650 ac_dummy="$PATH"
1651 for ac_dir in $ac_dummy; do
1652   IFS=$ac_save_IFS
1653   test -z "$ac_dir" && ac_dir=.
1654   if $as_executable_p "$ac_dir/$ac_word"; then
1655    ac_cv_path_FGREP="$ac_dir/$ac_word"
1656    echo "$as_me:1656: found $ac_dir/$ac_word" >&5
1657    break
1658 fi
1659 done
1660
1661   ;;
1662 esac
1663 fi
1664 FGREP=$ac_cv_path_FGREP
1665
1666 if test -n "$FGREP"; then
1667   echo "$as_me:1667: result: $FGREP" >&5
1668 echo "${ECHO_T}$FGREP" >&6
1669 else
1670   echo "$as_me:1670: result: no" >&5
1671 echo "${ECHO_T}no" >&6
1672 fi
1673
1674   test -n "$FGREP" && break
1675 done
1676 test -n "$FGREP" || FGREP=": "
1677
1678      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1678: error: cannot find workable fgrep" >&5
1679 echo "$as_me: error: cannot find workable fgrep" >&2;}
1680    { (exit 1); exit 1; }; }
1681    fi
1682 fi
1683 echo "$as_me:1683: result: $ac_cv_path_FGREP" >&5
1684 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1685  FGREP="$ac_cv_path_FGREP"
1686
1687 echo "$as_me:1687: checking for prefix" >&5
1688 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1689 if test "x$prefix" = "xNONE" ; then
1690         case "$cf_cv_system_name" in
1691                 # non-vendor systems don't have a conflict
1692         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1693                 prefix=/usr
1694                 ;;
1695         (*)     prefix=$ac_default_prefix
1696                 ;;
1697         esac
1698 fi
1699 echo "$as_me:1699: result: $prefix" >&5
1700 echo "${ECHO_T}$prefix" >&6
1701
1702 if test "x$prefix" = "xNONE" ; then
1703 echo "$as_me:1703: checking for default include-directory" >&5
1704 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1705 test -n "$verbose" && echo 1>&6
1706 for cf_symbol in \
1707         "$includedir" \
1708         "$includedir/ncurses" \
1709         "$prefix/include" \
1710         "$prefix/include/ncurses" \
1711         /usr/local/include \
1712         /usr/local/include/ncurses \
1713         /usr/include \
1714         /usr/include/ncurses
1715 do
1716         cf_dir=`eval echo "$cf_symbol"`
1717         if test -f "$cf_dir/curses.h" ; then
1718         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1719                 includedir="$cf_symbol"
1720                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1721                 break
1722         fi
1723         fi
1724         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1725 done
1726 echo "$as_me:1726: result: $includedir" >&5
1727 echo "${ECHO_T}$includedir" >&6
1728 fi
1729
1730 ### Defaults for ncurses ABI
1731
1732 # ABI 5 defaults:
1733 cf_dft_ccharw_max=5
1734 cf_dft_chtype=auto
1735 cf_dft_ext_colors=no
1736 cf_dft_ext_const=no
1737 cf_dft_ext_mouse=no
1738 cf_dft_ext_putwin=no
1739 cf_dft_ext_spfuncs=no
1740 cf_dft_filter_syms=no
1741 cf_dft_interop=no
1742 cf_dft_mmask_t=auto
1743 cf_dft_opaque_curses=no
1744 cf_dft_ordinate_type=short
1745 cf_dft_signed_char=no
1746 cf_dft_tparm_arg=long
1747 cf_dft_widec=no
1748 cf_dft_with_lp64=no
1749
1750 # ABI 6 default differences from ABI 5:
1751 case x$cf_cv_abi_default in
1752 (x[6789])
1753         cf_dft_chtype=uint32_t
1754         cf_dft_ext_colors=yes
1755         cf_dft_ext_const=yes
1756         cf_dft_ext_mouse=yes
1757         cf_dft_ext_putwin=yes
1758         cf_dft_ext_spfuncs=yes
1759         cf_dft_filter_syms=yes
1760         cf_dft_interop=yes
1761         cf_dft_mmask_t=uint32_t
1762         cf_dft_opaque_curses=yes
1763         cf_dft_tparm_arg=intptr_t
1764         cf_dft_widec=yes
1765         cf_dft_with_lp64=yes
1766         ;;
1767 esac
1768
1769 # ABI 7 default differences from ABI 6:
1770 case x$cf_cv_abi_default in
1771 (x[789])
1772         cf_dft_ccharw_max=6
1773         cf_dft_mmask_t=uint64_t
1774         cf_dft_ordinate_type=int
1775         cf_dft_signed_char=yes
1776         # also: remove the wgetch-events feature in ABI 7
1777         ;;
1778 esac
1779
1780 ### override ABI version, e.g., packagers
1781
1782 # Check whether --with-abi-altered or --without-abi-altered was given.
1783 if test "${with_abi_altered+set}" = set; then
1784   withval="$with_abi_altered"
1785
1786 if test -n "$withval" ; then
1787   case `echo "$withval" | sed -e 's/^[0-9]*$/0/g'` in
1788   (0)
1789         ;;
1790   (*)
1791         { { echo "$as_me:1791: error: ABI altered is not a number: $withval" >&5
1792 echo "$as_me: error: ABI altered is not a number: $withval" >&2;}
1793    { (exit 1); exit 1; }; }
1794         ;;
1795   esac
1796 else
1797   { { echo "$as_me:1797: error: ABI altered value is empty" >&5
1798 echo "$as_me: error: ABI altered value is empty" >&2;}
1799    { (exit 1); exit 1; }; }
1800 fi
1801
1802         if test "$cf_cv_abi_version" != "$withval"
1803         then
1804                 { echo "$as_me:1804: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&5
1805 echo "$as_me: WARNING: altering visible ABI from $cf_cv_abi_version to $withval" >&2;}
1806                 cf_cv_abi_version=$withval
1807         fi
1808
1809 fi;
1810
1811 ###     Checks for programs.
1812
1813 # Check whether --with-ada or --without-ada was given.
1814 if test "${with_ada+set}" = set; then
1815   withval="$with_ada"
1816   cf_with_ada=$withval
1817 else
1818   cf_with_ada=yes
1819 fi;
1820
1821 if test "x$cf_with_ada" = xyes
1822 then
1823         cf_prog_cc="gnatgcc gcc cc"
1824 else
1825         cf_prog_cc="gcc cc"
1826 fi
1827
1828 ac_ext=c
1829 ac_cpp='$CPP $CPPFLAGS'
1830 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1831 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1832 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1833 ac_main_return="return"
1834 if test -n "$ac_tool_prefix"; then
1835   for ac_prog in $cf_prog_cc
1836   do
1837     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1838 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1839 echo "$as_me:1839: checking for $ac_word" >&5
1840 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1841 if test "${ac_cv_prog_CC+set}" = set; then
1842   echo $ECHO_N "(cached) $ECHO_C" >&6
1843 else
1844   if test -n "$CC"; then
1845   ac_cv_prog_CC="$CC" # Let the user override the test.
1846 else
1847   ac_save_IFS=$IFS; IFS=$ac_path_separator
1848 ac_dummy="$PATH"
1849 for ac_dir in $ac_dummy; do
1850   IFS=$ac_save_IFS
1851   test -z "$ac_dir" && ac_dir=.
1852   $as_executable_p "$ac_dir/$ac_word" || continue
1853 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1854 echo "$as_me:1854: found $ac_dir/$ac_word" >&5
1855 break
1856 done
1857
1858 fi
1859 fi
1860 CC=$ac_cv_prog_CC
1861 if test -n "$CC"; then
1862   echo "$as_me:1862: result: $CC" >&5
1863 echo "${ECHO_T}$CC" >&6
1864 else
1865   echo "$as_me:1865: result: no" >&5
1866 echo "${ECHO_T}no" >&6
1867 fi
1868
1869     test -n "$CC" && break
1870   done
1871 fi
1872 if test -z "$CC"; then
1873   ac_ct_CC=$CC
1874   for ac_prog in $cf_prog_cc
1875 do
1876   # Extract the first word of "$ac_prog", so it can be a program name with args.
1877 set dummy $ac_prog; ac_word=$2
1878 echo "$as_me:1878: checking for $ac_word" >&5
1879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1880 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1881   echo $ECHO_N "(cached) $ECHO_C" >&6
1882 else
1883   if test -n "$ac_ct_CC"; then
1884   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1885 else
1886   ac_save_IFS=$IFS; IFS=$ac_path_separator
1887 ac_dummy="$PATH"
1888 for ac_dir in $ac_dummy; do
1889   IFS=$ac_save_IFS
1890   test -z "$ac_dir" && ac_dir=.
1891   $as_executable_p "$ac_dir/$ac_word" || continue
1892 ac_cv_prog_ac_ct_CC="$ac_prog"
1893 echo "$as_me:1893: found $ac_dir/$ac_word" >&5
1894 break
1895 done
1896
1897 fi
1898 fi
1899 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1900 if test -n "$ac_ct_CC"; then
1901   echo "$as_me:1901: result: $ac_ct_CC" >&5
1902 echo "${ECHO_T}$ac_ct_CC" >&6
1903 else
1904   echo "$as_me:1904: result: no" >&5
1905 echo "${ECHO_T}no" >&6
1906 fi
1907
1908   test -n "$ac_ct_CC" && break
1909 done
1910
1911   CC=$ac_ct_CC
1912 fi
1913
1914 test -z "$CC" && { { echo "$as_me:1914: error: no acceptable cc found in \$PATH" >&5
1915 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1916    { (exit 1); exit 1; }; }
1917
1918 # Provide some information about the compiler.
1919 echo "$as_me:1919:" \
1920      "checking for C compiler version" >&5
1921 ac_compiler=`set X $ac_compile; echo "$2"`
1922 { (eval echo "$as_me:1922: \"$ac_compiler --version </dev/null >&5\"") >&5
1923   (eval $ac_compiler --version </dev/null >&5) 2>&5
1924   ac_status=$?
1925   echo "$as_me:1925: \$? = $ac_status" >&5
1926   (exit "$ac_status"); }
1927 { (eval echo "$as_me:1927: \"$ac_compiler -v </dev/null >&5\"") >&5
1928   (eval $ac_compiler -v </dev/null >&5) 2>&5
1929   ac_status=$?
1930   echo "$as_me:1930: \$? = $ac_status" >&5
1931   (exit "$ac_status"); }
1932 { (eval echo "$as_me:1932: \"$ac_compiler -V </dev/null >&5\"") >&5
1933   (eval $ac_compiler -V </dev/null >&5) 2>&5
1934   ac_status=$?
1935   echo "$as_me:1935: \$? = $ac_status" >&5
1936   (exit "$ac_status"); }
1937
1938 cat >"conftest.$ac_ext" <<_ACEOF
1939 #line 1939 "configure"
1940 #include "confdefs.h"
1941
1942 int
1943 main (void)
1944 {
1945
1946   ;
1947   return 0;
1948 }
1949 _ACEOF
1950 ac_clean_files_save=$ac_clean_files
1951 ac_clean_files="$ac_clean_files a.out a.exe"
1952 # Try to create an executable without -o first, disregard a.out.
1953 # It will help us diagnose broken compilers, and finding out an intuition
1954 # of exeext.
1955 echo "$as_me:1955: checking for C compiler default output" >&5
1956 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1957 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1958 if { (eval echo "$as_me:1958: \"$ac_link_default\"") >&5
1959   (eval $ac_link_default) 2>&5
1960   ac_status=$?
1961   echo "$as_me:1961: \$? = $ac_status" >&5
1962   (exit "$ac_status"); }; then
1963   # Find the output, starting from the most likely.  This scheme is
1964 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1965 # resort.
1966 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1967                 ls a.out conftest 2>/dev/null;
1968                 ls a.* conftest.* 2>/dev/null`; do
1969   case $ac_file in
1970     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1971     a.out ) # We found the default executable, but exeext='' is most
1972             # certainly right.
1973             break;;
1974     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1975           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1976           export ac_cv_exeext
1977           break;;
1978     * ) break;;
1979   esac
1980 done
1981 else
1982   echo "$as_me: failed program was:" >&5
1983 cat "conftest.$ac_ext" >&5
1984 { { echo "$as_me:1984: error: C compiler cannot create executables" >&5
1985 echo "$as_me: error: C compiler cannot create executables" >&2;}
1986    { (exit 77); exit 77; }; }
1987 fi
1988
1989 ac_exeext=$ac_cv_exeext
1990 echo "$as_me:1990: result: $ac_file" >&5
1991 echo "${ECHO_T}$ac_file" >&6
1992
1993 # Check the compiler produces executables we can run.  If not, either
1994 # the compiler is broken, or we cross compile.
1995 echo "$as_me:1995: checking whether the C compiler works" >&5
1996 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1997 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1998 # If not cross compiling, check that we can run a simple program.
1999 if test "$cross_compiling" != yes; then
2000   if { ac_try='./$ac_file'
2001   { (eval echo "$as_me:2001: \"$ac_try\"") >&5
2002   (eval $ac_try) 2>&5
2003   ac_status=$?
2004   echo "$as_me:2004: \$? = $ac_status" >&5
2005   (exit "$ac_status"); }; }; then
2006     cross_compiling=no
2007   else
2008     if test "$cross_compiling" = maybe; then
2009         cross_compiling=yes
2010     else
2011         { { echo "$as_me:2011: error: cannot run C compiled programs.
2012 If you meant to cross compile, use \`--host'." >&5
2013 echo "$as_me: error: cannot run C compiled programs.
2014 If you meant to cross compile, use \`--host'." >&2;}
2015    { (exit 1); exit 1; }; }
2016     fi
2017   fi
2018 fi
2019 echo "$as_me:2019: result: yes" >&5
2020 echo "${ECHO_T}yes" >&6
2021
2022 rm -f a.out a.exe "conftest$ac_cv_exeext"
2023 ac_clean_files=$ac_clean_files_save
2024 # Check the compiler produces executables we can run.  If not, either
2025 # the compiler is broken, or we cross compile.
2026 echo "$as_me:2026: checking whether we are cross compiling" >&5
2027 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
2028 echo "$as_me:2028: result: $cross_compiling" >&5
2029 echo "${ECHO_T}$cross_compiling" >&6
2030
2031 echo "$as_me:2031: checking for executable suffix" >&5
2032 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
2033 if { (eval echo "$as_me:2033: \"$ac_link\"") >&5
2034   (eval $ac_link) 2>&5
2035   ac_status=$?
2036   echo "$as_me:2036: \$? = $ac_status" >&5
2037   (exit "$ac_status"); }; then
2038   # If both `conftest.exe' and `conftest' are `present' (well, observable)
2039 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
2040 # work properly (i.e., refer to `conftest.exe'), while it won't with
2041 # `rm'.
2042 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
2043   case $ac_file in
2044     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
2045     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2046           export ac_cv_exeext
2047           break;;
2048     * ) break;;
2049   esac
2050 done
2051 else
2052   { { echo "$as_me:2052: error: cannot compute EXEEXT: cannot compile and link" >&5
2053 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
2054    { (exit 1); exit 1; }; }
2055 fi
2056
2057 rm -f "conftest$ac_cv_exeext"
2058 echo "$as_me:2058: result: $ac_cv_exeext" >&5
2059 echo "${ECHO_T}$ac_cv_exeext" >&6
2060
2061 rm -f "conftest.$ac_ext"
2062 EXEEXT=$ac_cv_exeext
2063 ac_exeext=$EXEEXT
2064 echo "$as_me:2064: checking for object suffix" >&5
2065 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2066 if test "${ac_cv_objext+set}" = set; then
2067   echo $ECHO_N "(cached) $ECHO_C" >&6
2068 else
2069   cat >"conftest.$ac_ext" <<_ACEOF
2070 #line 2070 "configure"
2071 #include "confdefs.h"
2072
2073 int
2074 main (void)
2075 {
2076
2077   ;
2078   return 0;
2079 }
2080 _ACEOF
2081 rm -f conftest.o conftest.obj
2082 if { (eval echo "$as_me:2082: \"$ac_compile\"") >&5
2083   (eval $ac_compile) 2>&5
2084   ac_status=$?
2085   echo "$as_me:2085: \$? = $ac_status" >&5
2086   (exit "$ac_status"); }; then
2087   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2088   case $ac_file in
2089     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2090     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2091        break;;
2092   esac
2093 done
2094 else
2095   echo "$as_me: failed program was:" >&5
2096 cat "conftest.$ac_ext" >&5
2097 { { echo "$as_me:2097: error: cannot compute OBJEXT: cannot compile" >&5
2098 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2099    { (exit 1); exit 1; }; }
2100 fi
2101
2102 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2103 fi
2104 echo "$as_me:2104: result: $ac_cv_objext" >&5
2105 echo "${ECHO_T}$ac_cv_objext" >&6
2106 OBJEXT=$ac_cv_objext
2107 ac_objext=$OBJEXT
2108 echo "$as_me:2108: checking whether we are using the GNU C compiler" >&5
2109 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2110 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2111   echo $ECHO_N "(cached) $ECHO_C" >&6
2112 else
2113   cat >"conftest.$ac_ext" <<_ACEOF
2114 #line 2114 "configure"
2115 #include "confdefs.h"
2116
2117 int
2118 main (void)
2119 {
2120 #ifndef __GNUC__
2121        choke me
2122 #endif
2123
2124   ;
2125   return 0;
2126 }
2127 _ACEOF
2128 rm -f "conftest.$ac_objext"
2129 if { (eval echo "$as_me:2129: \"$ac_compile\"") >&5
2130   (eval $ac_compile) 2>&5
2131   ac_status=$?
2132   echo "$as_me:2132: \$? = $ac_status" >&5
2133   (exit "$ac_status"); } &&
2134          { ac_try='test -s "conftest.$ac_objext"'
2135   { (eval echo "$as_me:2135: \"$ac_try\"") >&5
2136   (eval $ac_try) 2>&5
2137   ac_status=$?
2138   echo "$as_me:2138: \$? = $ac_status" >&5
2139   (exit "$ac_status"); }; }; then
2140   ac_compiler_gnu=yes
2141 else
2142   echo "$as_me: failed program was:" >&5
2143 cat "conftest.$ac_ext" >&5
2144 ac_compiler_gnu=no
2145 fi
2146 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2147 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2148
2149 fi
2150 echo "$as_me:2150: result: $ac_cv_c_compiler_gnu" >&5
2151 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2152 GCC=`test $ac_compiler_gnu = yes && echo yes`
2153 ac_test_CFLAGS=${CFLAGS+set}
2154 ac_save_CFLAGS=$CFLAGS
2155 CFLAGS="-g"
2156 echo "$as_me:2156: checking whether $CC accepts -g" >&5
2157 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2158 if test "${ac_cv_prog_cc_g+set}" = set; then
2159   echo $ECHO_N "(cached) $ECHO_C" >&6
2160 else
2161   cat >"conftest.$ac_ext" <<_ACEOF
2162 #line 2162 "configure"
2163 #include "confdefs.h"
2164
2165 int
2166 main (void)
2167 {
2168
2169   ;
2170   return 0;
2171 }
2172 _ACEOF
2173 rm -f "conftest.$ac_objext"
2174 if { (eval echo "$as_me:2174: \"$ac_compile\"") >&5
2175   (eval $ac_compile) 2>&5
2176   ac_status=$?
2177   echo "$as_me:2177: \$? = $ac_status" >&5
2178   (exit "$ac_status"); } &&
2179          { ac_try='test -s "conftest.$ac_objext"'
2180   { (eval echo "$as_me:2180: \"$ac_try\"") >&5
2181   (eval $ac_try) 2>&5
2182   ac_status=$?
2183   echo "$as_me:2183: \$? = $ac_status" >&5
2184   (exit "$ac_status"); }; }; then
2185   ac_cv_prog_cc_g=yes
2186 else
2187   echo "$as_me: failed program was:" >&5
2188 cat "conftest.$ac_ext" >&5
2189 ac_cv_prog_cc_g=no
2190 fi
2191 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2192 fi
2193 echo "$as_me:2193: result: $ac_cv_prog_cc_g" >&5
2194 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2195 if test "$ac_test_CFLAGS" = set; then
2196   CFLAGS=$ac_save_CFLAGS
2197 elif test $ac_cv_prog_cc_g = yes; then
2198   if test "$GCC" = yes; then
2199     CFLAGS="-g -O2"
2200   else
2201     CFLAGS="-g"
2202   fi
2203 else
2204   if test "$GCC" = yes; then
2205     CFLAGS="-O2"
2206   else
2207     CFLAGS=
2208   fi
2209 fi
2210 # Some people use a C++ compiler to compile C.  Since we use `exit',
2211 # in C++ we need to declare it.  In case someone uses the same compiler
2212 # for both compiling C and C++ we need to have the C++ compiler decide
2213 # the declaration of exit, since it's the most demanding environment.
2214 cat >"conftest.$ac_ext" <<_ACEOF
2215 #ifndef __cplusplus
2216   choke me
2217 #endif
2218 _ACEOF
2219 rm -f "conftest.$ac_objext"
2220 if { (eval echo "$as_me:2220: \"$ac_compile\"") >&5
2221   (eval $ac_compile) 2>&5
2222   ac_status=$?
2223   echo "$as_me:2223: \$? = $ac_status" >&5
2224   (exit "$ac_status"); } &&
2225          { ac_try='test -s "conftest.$ac_objext"'
2226   { (eval echo "$as_me:2226: \"$ac_try\"") >&5
2227   (eval $ac_try) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); }; }; then
2231   for ac_declaration in \
2232    ''\
2233    '#include <stdlib.h>' \
2234    'extern "C" void std::exit (int) throw (); using std::exit;' \
2235    'extern "C" void std::exit (int); using std::exit;' \
2236    'extern "C" void exit (int) throw ();' \
2237    'extern "C" void exit (int);' \
2238    'void exit (int);'
2239 do
2240   cat >"conftest.$ac_ext" <<_ACEOF
2241 #line 2241 "configure"
2242 #include "confdefs.h"
2243 #include <stdlib.h>
2244 $ac_declaration
2245 int
2246 main (void)
2247 {
2248 exit (42);
2249   ;
2250   return 0;
2251 }
2252 _ACEOF
2253 rm -f "conftest.$ac_objext"
2254 if { (eval echo "$as_me:2254: \"$ac_compile\"") >&5
2255   (eval $ac_compile) 2>&5
2256   ac_status=$?
2257   echo "$as_me:2257: \$? = $ac_status" >&5
2258   (exit "$ac_status"); } &&
2259          { ac_try='test -s "conftest.$ac_objext"'
2260   { (eval echo "$as_me:2260: \"$ac_try\"") >&5
2261   (eval $ac_try) 2>&5
2262   ac_status=$?
2263   echo "$as_me:2263: \$? = $ac_status" >&5
2264   (exit "$ac_status"); }; }; then
2265   :
2266 else
2267   echo "$as_me: failed program was:" >&5
2268 cat "conftest.$ac_ext" >&5
2269 continue
2270 fi
2271 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2272   cat >"conftest.$ac_ext" <<_ACEOF
2273 #line 2273 "configure"
2274 #include "confdefs.h"
2275 $ac_declaration
2276 int
2277 main (void)
2278 {
2279 exit (42);
2280   ;
2281   return 0;
2282 }
2283 _ACEOF
2284 rm -f "conftest.$ac_objext"
2285 if { (eval echo "$as_me:2285: \"$ac_compile\"") >&5
2286   (eval $ac_compile) 2>&5
2287   ac_status=$?
2288   echo "$as_me:2288: \$? = $ac_status" >&5
2289   (exit "$ac_status"); } &&
2290          { ac_try='test -s "conftest.$ac_objext"'
2291   { (eval echo "$as_me:2291: \"$ac_try\"") >&5
2292   (eval $ac_try) 2>&5
2293   ac_status=$?
2294   echo "$as_me:2294: \$? = $ac_status" >&5
2295   (exit "$ac_status"); }; }; then
2296   break
2297 else
2298   echo "$as_me: failed program was:" >&5
2299 cat "conftest.$ac_ext" >&5
2300 fi
2301 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2302 done
2303 rm -rf conftest*
2304 if test -n "$ac_declaration"; then
2305   echo '#ifdef __cplusplus' >>confdefs.h
2306   echo "$ac_declaration"    >>confdefs.h
2307   echo '#endif'             >>confdefs.h
2308 fi
2309
2310 else
2311   echo "$as_me: failed program was:" >&5
2312 cat "conftest.$ac_ext" >&5
2313 fi
2314 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2315 ac_ext=c
2316 ac_cpp='$CPP $CPPFLAGS'
2317 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2318 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2319 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2320 ac_main_return="return"
2321
2322 GCC_VERSION=none
2323 if test "$GCC" = yes ; then
2324         echo "$as_me:2324: checking version of $CC" >&5
2325 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2326         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2327         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2328         echo "$as_me:2328: result: $GCC_VERSION" >&5
2329 echo "${ECHO_T}$GCC_VERSION" >&6
2330 fi
2331
2332 INTEL_COMPILER=no
2333
2334 if test "$GCC" = yes ; then
2335         case "$host_os" in
2336         (linux*|gnu*)
2337                 echo "$as_me:2337: checking if this is really Intel C compiler" >&5
2338 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2339                 cf_save_CFLAGS="$CFLAGS"
2340                 CFLAGS="$CFLAGS -no-gcc"
2341                 cat >"conftest.$ac_ext" <<_ACEOF
2342 #line 2342 "configure"
2343 #include "confdefs.h"
2344
2345 int
2346 main (void)
2347 {
2348
2349 #ifdef __INTEL_COMPILER
2350 #else
2351 #error __INTEL_COMPILER is not defined
2352 #endif
2353
2354   ;
2355   return 0;
2356 }
2357 _ACEOF
2358 rm -f "conftest.$ac_objext"
2359 if { (eval echo "$as_me:2359: \"$ac_compile\"") >&5
2360   (eval $ac_compile) 2>&5
2361   ac_status=$?
2362   echo "$as_me:2362: \$? = $ac_status" >&5
2363   (exit "$ac_status"); } &&
2364          { ac_try='test -s "conftest.$ac_objext"'
2365   { (eval echo "$as_me:2365: \"$ac_try\"") >&5
2366   (eval $ac_try) 2>&5
2367   ac_status=$?
2368   echo "$as_me:2368: \$? = $ac_status" >&5
2369   (exit "$ac_status"); }; }; then
2370   INTEL_COMPILER=yes
2371 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2372
2373 else
2374   echo "$as_me: failed program was:" >&5
2375 cat "conftest.$ac_ext" >&5
2376 fi
2377 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2378                 CFLAGS="$cf_save_CFLAGS"
2379                 echo "$as_me:2379: result: $INTEL_COMPILER" >&5
2380 echo "${ECHO_T}$INTEL_COMPILER" >&6
2381                 ;;
2382         esac
2383 fi
2384
2385 CLANG_COMPILER=no
2386
2387 if test "$GCC" = yes ; then
2388         echo "$as_me:2388: checking if this is really Clang C compiler" >&5
2389 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2390         cf_save_CFLAGS="$CFLAGS"
2391         cat >"conftest.$ac_ext" <<_ACEOF
2392 #line 2392 "configure"
2393 #include "confdefs.h"
2394
2395 int
2396 main (void)
2397 {
2398
2399 #ifdef __clang__
2400 #else
2401 #error __clang__ is not defined
2402 #endif
2403
2404   ;
2405   return 0;
2406 }
2407 _ACEOF
2408 rm -f "conftest.$ac_objext"
2409 if { (eval echo "$as_me:2409: \"$ac_compile\"") >&5
2410   (eval $ac_compile) 2>&5
2411   ac_status=$?
2412   echo "$as_me:2412: \$? = $ac_status" >&5
2413   (exit "$ac_status"); } &&
2414          { ac_try='test -s "conftest.$ac_objext"'
2415   { (eval echo "$as_me:2415: \"$ac_try\"") >&5
2416   (eval $ac_try) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); }; }; then
2420   CLANG_COMPILER=yes
2421
2422 else
2423   echo "$as_me: failed program was:" >&5
2424 cat "conftest.$ac_ext" >&5
2425 fi
2426 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2427         CFLAGS="$cf_save_CFLAGS"
2428         echo "$as_me:2428: result: $CLANG_COMPILER" >&5
2429 echo "${ECHO_T}$CLANG_COMPILER" >&6
2430 fi
2431
2432 CLANG_VERSION=none
2433
2434 if test "x$CLANG_COMPILER" = "xyes" ; then
2435         case "$CC" in
2436         (c[1-9][0-9]|*/c[1-9][0-9])
2437                 { echo "$as_me:2437: WARNING: replacing broken compiler alias $CC" >&5
2438 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2439                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2440                 CC=clang
2441                 ;;
2442         esac
2443
2444         echo "$as_me:2444: checking version of $CC" >&5
2445 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2446         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.].*//'`"
2447         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2448         echo "$as_me:2448: result: $CLANG_VERSION" >&5
2449 echo "${ECHO_T}$CLANG_VERSION" >&6
2450
2451         for cf_clang_opt in \
2452                 -Qunused-arguments \
2453                 -Wno-error=implicit-function-declaration
2454         do
2455                 echo "$as_me:2455: checking if option $cf_clang_opt works" >&5
2456 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2457                 cf_save_CFLAGS="$CFLAGS"
2458                 CFLAGS="$CFLAGS $cf_clang_opt"
2459                 cat >"conftest.$ac_ext" <<_ACEOF
2460 #line 2460 "configure"
2461 #include "confdefs.h"
2462
2463                         #include <stdio.h>
2464 int
2465 main (void)
2466 {
2467
2468                         printf("hello!\\n");
2469   ;
2470   return 0;
2471 }
2472 _ACEOF
2473 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2474 if { (eval echo "$as_me:2474: \"$ac_link\"") >&5
2475   (eval $ac_link) 2>&5
2476   ac_status=$?
2477   echo "$as_me:2477: \$? = $ac_status" >&5
2478   (exit "$ac_status"); } &&
2479          { ac_try='test -s "conftest$ac_exeext"'
2480   { (eval echo "$as_me:2480: \"$ac_try\"") >&5
2481   (eval $ac_try) 2>&5
2482   ac_status=$?
2483   echo "$as_me:2483: \$? = $ac_status" >&5
2484   (exit "$ac_status"); }; }; then
2485
2486                         cf_clang_optok=yes
2487 else
2488   echo "$as_me: failed program was:" >&5
2489 cat "conftest.$ac_ext" >&5
2490
2491                         cf_clang_optok=no
2492 fi
2493 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2494                 echo "$as_me:2494: result: $cf_clang_optok" >&5
2495 echo "${ECHO_T}$cf_clang_optok" >&6
2496                 CFLAGS="$cf_save_CFLAGS"
2497                 if test "$cf_clang_optok" = yes; then
2498                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2499
2500 echo "${as_me:-configure}:2500: testing adding option $cf_clang_opt ..." 1>&5
2501
2502         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2503         CFLAGS="${CFLAGS}$cf_clang_opt"
2504
2505                 fi
2506         done
2507 fi
2508
2509 echo "$as_me:2509: checking for $CC option to accept ANSI C" >&5
2510 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2511 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2512   echo $ECHO_N "(cached) $ECHO_C" >&6
2513 else
2514   ac_cv_prog_cc_stdc=no
2515 ac_save_CC=$CC
2516 cat >"conftest.$ac_ext" <<_ACEOF
2517 #line 2517 "configure"
2518 #include "confdefs.h"
2519 #include <stdarg.h>
2520 #include <stdio.h>
2521 #include <sys/types.h>
2522 #include <sys/stat.h>
2523 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2524 struct buf { int x; };
2525 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2526 static char *e (char **p, int i)
2527 {
2528   return p[i];
2529 }
2530 static char *f (char * (*g) (char **, int), char **p, ...)
2531 {
2532   char *s;
2533   va_list v;
2534   va_start (v,p);
2535   s = g (p, va_arg (v,int));
2536   va_end (v);
2537   return s;
2538 }
2539 int test (int i, double x);
2540 struct s1 {int (*f) (int a);};
2541 struct s2 {int (*f) (double a);};
2542 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2543 int argc;
2544 char **argv;
2545 int
2546 main (void)
2547 {
2548 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2549   ;
2550   return 0;
2551 }
2552 _ACEOF
2553 # Don't try gcc -ansi; that turns off useful extensions and
2554 # breaks some systems' header files.
2555 # AIX                   -qlanglvl=ansi
2556 # Ultrix and OSF/1      -std1
2557 # HP-UX 10.20 and later -Ae
2558 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2559 # SVR4                  -Xc -D__EXTENSIONS__
2560 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2561 do
2562   CC="$ac_save_CC $ac_arg"
2563   rm -f "conftest.$ac_objext"
2564 if { (eval echo "$as_me:2564: \"$ac_compile\"") >&5
2565   (eval $ac_compile) 2>&5
2566   ac_status=$?
2567   echo "$as_me:2567: \$? = $ac_status" >&5
2568   (exit "$ac_status"); } &&
2569          { ac_try='test -s "conftest.$ac_objext"'
2570   { (eval echo "$as_me:2570: \"$ac_try\"") >&5
2571   (eval $ac_try) 2>&5
2572   ac_status=$?
2573   echo "$as_me:2573: \$? = $ac_status" >&5
2574   (exit "$ac_status"); }; }; then
2575   ac_cv_prog_cc_stdc=$ac_arg
2576 break
2577 else
2578   echo "$as_me: failed program was:" >&5
2579 cat "conftest.$ac_ext" >&5
2580 fi
2581 rm -f "conftest.$ac_objext"
2582 done
2583 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2584 CC=$ac_save_CC
2585
2586 fi
2587
2588 case "x$ac_cv_prog_cc_stdc" in
2589   x|xno)
2590     echo "$as_me:2590: result: none needed" >&5
2591 echo "${ECHO_T}none needed" >&6 ;;
2592   *)
2593     echo "$as_me:2593: result: $ac_cv_prog_cc_stdc" >&5
2594 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2595     CC="$CC $ac_cv_prog_cc_stdc" ;;
2596 esac
2597
2598 # This should have been defined by AC_PROG_CC
2599 : "${CC:=cc}"
2600
2601 echo "$as_me:2601: checking \$CFLAGS variable" >&5
2602 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2603 case "x$CFLAGS" in
2604 (*-[IUD]*)
2605         echo "$as_me:2605: result: broken" >&5
2606 echo "${ECHO_T}broken" >&6
2607         { echo "$as_me:2607: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2608 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2609         cf_flags="$CFLAGS"
2610         CFLAGS=
2611         for cf_arg in $cf_flags
2612         do
2613
2614 cf_fix_cppflags=no
2615 cf_new_cflags=
2616 cf_new_cppflags=
2617 cf_new_extra_cppflags=
2618
2619 for cf_add_cflags in $cf_arg
2620 do
2621 case "$cf_fix_cppflags" in
2622 (no)
2623         case "$cf_add_cflags" in
2624         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2625                 case "$cf_add_cflags" in
2626                 (-D*)
2627                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2628
2629                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2630                                 && test -z "${cf_tst_cflags}" \
2631                                 && cf_fix_cppflags=yes
2632
2633                         if test "$cf_fix_cppflags" = yes ; then
2634
2635         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2636         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2637
2638                                 continue
2639                         elif test "${cf_tst_cflags}" = "\"'" ; then
2640
2641         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2642         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2643
2644                                 continue
2645                         fi
2646                         ;;
2647                 esac
2648                 case "$CPPFLAGS" in
2649                 (*$cf_add_cflags)
2650                         ;;
2651                 (*)
2652                         case "$cf_add_cflags" in
2653                         (-D*)
2654                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2655
2656 CPPFLAGS=`echo "$CPPFLAGS" | \
2657         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2658                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2659
2660                                 ;;
2661                         esac
2662
2663         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2664         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2665
2666                         ;;
2667                 esac
2668                 ;;
2669         (*)
2670
2671         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2672         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2673
2674                 ;;
2675         esac
2676         ;;
2677 (yes)
2678
2679         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2680         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2681
2682         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2683
2684         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2685                 && test -z "${cf_tst_cflags}" \
2686                 && cf_fix_cppflags=no
2687         ;;
2688 esac
2689 done
2690
2691 if test -n "$cf_new_cflags" ; then
2692
2693         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2694         CFLAGS="${CFLAGS}$cf_new_cflags"
2695
2696 fi
2697
2698 if test -n "$cf_new_cppflags" ; then
2699
2700         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2701         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2702
2703 fi
2704
2705 if test -n "$cf_new_extra_cppflags" ; then
2706
2707         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2708         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2709
2710 fi
2711
2712         done
2713         ;;
2714 (*)
2715         echo "$as_me:2715: result: ok" >&5
2716 echo "${ECHO_T}ok" >&6
2717         ;;
2718 esac
2719
2720 echo "$as_me:2720: checking \$CC variable" >&5
2721 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2722 case "$CC" in
2723 (*[\ \  ]-*)
2724         echo "$as_me:2724: result: broken" >&5
2725 echo "${ECHO_T}broken" >&6
2726         { echo "$as_me:2726: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2727 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2728         # humor him...
2729         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2730         cf_flags=`echo "$CC" | sed -e "s%^$cf_prog%%"`
2731         CC="$cf_prog"
2732         for cf_arg in $cf_flags
2733         do
2734                 case "x$cf_arg" in
2735                 (x-[IUDfgOW]*)
2736
2737 cf_fix_cppflags=no
2738 cf_new_cflags=
2739 cf_new_cppflags=
2740 cf_new_extra_cppflags=
2741
2742 for cf_add_cflags in $cf_arg
2743 do
2744 case "$cf_fix_cppflags" in
2745 (no)
2746         case "$cf_add_cflags" in
2747         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2748                 case "$cf_add_cflags" in
2749                 (-D*)
2750                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2751
2752                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2753                                 && test -z "${cf_tst_cflags}" \
2754                                 && cf_fix_cppflags=yes
2755
2756                         if test "$cf_fix_cppflags" = yes ; then
2757
2758         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2759         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2760
2761                                 continue
2762                         elif test "${cf_tst_cflags}" = "\"'" ; then
2763
2764         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2765         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2766
2767                                 continue
2768                         fi
2769                         ;;
2770                 esac
2771                 case "$CPPFLAGS" in
2772                 (*$cf_add_cflags)
2773                         ;;
2774                 (*)
2775                         case "$cf_add_cflags" in
2776                         (-D*)
2777                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2778
2779 CPPFLAGS=`echo "$CPPFLAGS" | \
2780         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2781                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2782
2783                                 ;;
2784                         esac
2785
2786         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2787         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2788
2789                         ;;
2790                 esac
2791                 ;;
2792         (*)
2793
2794         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2795         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2796
2797                 ;;
2798         esac
2799         ;;
2800 (yes)
2801
2802         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2803         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2804
2805         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2806
2807         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2808                 && test -z "${cf_tst_cflags}" \
2809                 && cf_fix_cppflags=no
2810         ;;
2811 esac
2812 done
2813
2814 if test -n "$cf_new_cflags" ; then
2815
2816         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2817         CFLAGS="${CFLAGS}$cf_new_cflags"
2818
2819 fi
2820
2821 if test -n "$cf_new_cppflags" ; then
2822
2823         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2824         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2825
2826 fi
2827
2828 if test -n "$cf_new_extra_cppflags" ; then
2829
2830         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2831         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2832
2833 fi
2834
2835                         ;;
2836                 (*)
2837                         CC="$CC $cf_arg"
2838                         ;;
2839                 esac
2840         done
2841         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2842
2843 echo "${as_me:-configure}:2843: testing resulting CC: '$CC' ..." 1>&5
2844
2845         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2846
2847 echo "${as_me:-configure}:2847: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2848
2849         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2850
2851 echo "${as_me:-configure}:2851: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2852
2853         ;;
2854 (*)
2855         echo "$as_me:2855: result: ok" >&5
2856 echo "${ECHO_T}ok" >&6
2857         ;;
2858 esac
2859
2860 ac_ext=c
2861 ac_cpp='$CPP $CPPFLAGS'
2862 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2863 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2864 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2865 ac_main_return="return"
2866 echo "$as_me:2866: checking how to run the C preprocessor" >&5
2867 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2868 # On Suns, sometimes $CPP names a directory.
2869 if test -n "$CPP" && test -d "$CPP"; then
2870   CPP=
2871 fi
2872 if test -z "$CPP"; then
2873   if test "${ac_cv_prog_CPP+set}" = set; then
2874   echo $ECHO_N "(cached) $ECHO_C" >&6
2875 else
2876       # Double quotes because CPP needs to be expanded
2877     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2878     do
2879       ac_preproc_ok=false
2880 for ac_c_preproc_warn_flag in '' yes
2881 do
2882   # Use a header file that comes with gcc, so configuring glibc
2883   # with a fresh cross-compiler works.
2884   # On the NeXT, cc -E runs the code through the compiler's parser,
2885   # not just through cpp. "Syntax error" is here to catch this case.
2886   cat >"conftest.$ac_ext" <<_ACEOF
2887 #line 2887 "configure"
2888 #include "confdefs.h"
2889 #include <assert.h>
2890                      Syntax error
2891 _ACEOF
2892 if { (eval echo "$as_me:2892: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2893   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2894   ac_status=$?
2895   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2896   rm -f conftest.er1
2897   cat conftest.err >&5
2898   echo "$as_me:2898: \$? = $ac_status" >&5
2899   (exit "$ac_status"); } >/dev/null; then
2900   if test -s conftest.err; then
2901     ac_cpp_err=$ac_c_preproc_warn_flag
2902   else
2903     ac_cpp_err=
2904   fi
2905 else
2906   ac_cpp_err=yes
2907 fi
2908 if test -z "$ac_cpp_err"; then
2909   :
2910 else
2911   echo "$as_me: failed program was:" >&5
2912   cat "conftest.$ac_ext" >&5
2913   # Broken: fails on valid input.
2914 continue
2915 fi
2916 rm -f conftest.err "conftest.$ac_ext"
2917
2918   # OK, works on sane cases.  Now check whether non-existent headers
2919   # can be detected and how.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <ac_nonexistent.h>
2924 _ACEOF
2925 if { (eval echo "$as_me:2925: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2926   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2927   ac_status=$?
2928   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2929   rm -f conftest.er1
2930   cat conftest.err >&5
2931   echo "$as_me:2931: \$? = $ac_status" >&5
2932   (exit "$ac_status"); } >/dev/null; then
2933   if test -s conftest.err; then
2934     ac_cpp_err=$ac_c_preproc_warn_flag
2935   else
2936     ac_cpp_err=
2937   fi
2938 else
2939   ac_cpp_err=yes
2940 fi
2941 if test -z "$ac_cpp_err"; then
2942   # Broken: success on invalid input.
2943 continue
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Passes both tests.
2948 ac_preproc_ok=:
2949 break
2950 fi
2951 rm -f conftest.err "conftest.$ac_ext"
2952
2953 done
2954 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2955 rm -f conftest.err "conftest.$ac_ext"
2956 if $ac_preproc_ok; then
2957   break
2958 fi
2959
2960     done
2961     ac_cv_prog_CPP=$CPP
2962
2963 fi
2964   CPP=$ac_cv_prog_CPP
2965 else
2966   ac_cv_prog_CPP=$CPP
2967 fi
2968 echo "$as_me:2968: result: $CPP" >&5
2969 echo "${ECHO_T}$CPP" >&6
2970 ac_preproc_ok=false
2971 for ac_c_preproc_warn_flag in '' yes
2972 do
2973   # Use a header file that comes with gcc, so configuring glibc
2974   # with a fresh cross-compiler works.
2975   # On the NeXT, cc -E runs the code through the compiler's parser,
2976   # not just through cpp. "Syntax error" is here to catch this case.
2977   cat >"conftest.$ac_ext" <<_ACEOF
2978 #line 2978 "configure"
2979 #include "confdefs.h"
2980 #include <assert.h>
2981                      Syntax error
2982 _ACEOF
2983 if { (eval echo "$as_me:2983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2984   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2985   ac_status=$?
2986   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2987   rm -f conftest.er1
2988   cat conftest.err >&5
2989   echo "$as_me:2989: \$? = $ac_status" >&5
2990   (exit "$ac_status"); } >/dev/null; then
2991   if test -s conftest.err; then
2992     ac_cpp_err=$ac_c_preproc_warn_flag
2993   else
2994     ac_cpp_err=
2995   fi
2996 else
2997   ac_cpp_err=yes
2998 fi
2999 if test -z "$ac_cpp_err"; then
3000   :
3001 else
3002   echo "$as_me: failed program was:" >&5
3003   cat "conftest.$ac_ext" >&5
3004   # Broken: fails on valid input.
3005 continue
3006 fi
3007 rm -f conftest.err "conftest.$ac_ext"
3008
3009   # OK, works on sane cases.  Now check whether non-existent headers
3010   # can be detected and how.
3011   cat >"conftest.$ac_ext" <<_ACEOF
3012 #line 3012 "configure"
3013 #include "confdefs.h"
3014 #include <ac_nonexistent.h>
3015 _ACEOF
3016 if { (eval echo "$as_me:3016: \"$ac_cpp "conftest.$ac_ext"\"") >&5
3017   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
3018   ac_status=$?
3019   $EGREP -v '^ *\+' conftest.er1 >conftest.err
3020   rm -f conftest.er1
3021   cat conftest.err >&5
3022   echo "$as_me:3022: \$? = $ac_status" >&5
3023   (exit "$ac_status"); } >/dev/null; then
3024   if test -s conftest.err; then
3025     ac_cpp_err=$ac_c_preproc_warn_flag
3026   else
3027     ac_cpp_err=
3028   fi
3029 else
3030   ac_cpp_err=yes
3031 fi
3032 if test -z "$ac_cpp_err"; then
3033   # Broken: success on invalid input.
3034 continue
3035 else
3036   echo "$as_me: failed program was:" >&5
3037   cat "conftest.$ac_ext" >&5
3038   # Passes both tests.
3039 ac_preproc_ok=:
3040 break
3041 fi
3042 rm -f conftest.err "conftest.$ac_ext"
3043
3044 done
3045 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3046 rm -f conftest.err "conftest.$ac_ext"
3047 if $ac_preproc_ok; then
3048   :
3049 else
3050   { { echo "$as_me:3050: error: C preprocessor \"$CPP\" fails sanity check" >&5
3051 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
3052    { (exit 1); exit 1; }; }
3053 fi
3054
3055 ac_ext=c
3056 ac_cpp='$CPP $CPPFLAGS'
3057 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3058 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3059 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3060 ac_main_return="return"
3061
3062 if test $ac_cv_c_compiler_gnu = yes; then
3063     echo "$as_me:3063: checking whether $CC needs -traditional" >&5
3064 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3065 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3066   echo $ECHO_N "(cached) $ECHO_C" >&6
3067 else
3068     ac_pattern="Autoconf.*'x'"
3069   cat >"conftest.$ac_ext" <<_ACEOF
3070 #line 3070 "configure"
3071 #include "confdefs.h"
3072 #include <sgtty.h>
3073 int Autoconf = TIOCGETP;
3074 _ACEOF
3075 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3076   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3077   ac_cv_prog_gcc_traditional=yes
3078 else
3079   ac_cv_prog_gcc_traditional=no
3080 fi
3081 rm -rf conftest*
3082
3083   if test $ac_cv_prog_gcc_traditional = no; then
3084     cat >"conftest.$ac_ext" <<_ACEOF
3085 #line 3085 "configure"
3086 #include "confdefs.h"
3087 #include <termio.h>
3088 int Autoconf = TCGETA;
3089 _ACEOF
3090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3091   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3092   ac_cv_prog_gcc_traditional=yes
3093 fi
3094 rm -rf conftest*
3095
3096   fi
3097 fi
3098 echo "$as_me:3098: result: $ac_cv_prog_gcc_traditional" >&5
3099 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3100   if test $ac_cv_prog_gcc_traditional = yes; then
3101     CC="$CC -traditional"
3102   fi
3103 fi
3104
3105 echo "$as_me:3105: checking whether $CC understands -c and -o together" >&5
3106 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3107 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3108   echo $ECHO_N "(cached) $ECHO_C" >&6
3109 else
3110
3111 cat > conftest.$ac_ext <<CF_EOF
3112 int main(void)
3113 {
3114         ${cf_cv_main_return:-return}(0);
3115 }
3116 CF_EOF
3117 # We do the test twice because some compilers refuse to overwrite an
3118 # existing .o file with -o, though they will create one.
3119 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3120 if { (eval echo "$as_me:3120: \"$ac_try\"") >&5
3121   (eval $ac_try) 2>&5
3122   ac_status=$?
3123   echo "$as_me:3123: \$? = $ac_status" >&5
3124   (exit "$ac_status"); } &&
3125   test -f conftest2.$ac_objext && { (eval echo "$as_me:3125: \"$ac_try\"") >&5
3126   (eval $ac_try) 2>&5
3127   ac_status=$?
3128   echo "$as_me:3128: \$? = $ac_status" >&5
3129   (exit "$ac_status"); };
3130 then
3131   eval cf_cv_prog_CC_c_o=yes
3132 else
3133   eval cf_cv_prog_CC_c_o=no
3134 fi
3135 rm -rf ./conftest*
3136
3137 fi
3138 if test "$cf_cv_prog_CC_c_o" = yes; then
3139   echo "$as_me:3139: result: yes" >&5
3140 echo "${ECHO_T}yes" >&6
3141 else
3142   echo "$as_me:3142: result: no" >&5
3143 echo "${ECHO_T}no" >&6
3144 fi
3145
3146 if test "$cross_compiling" = yes ; then
3147         LDCONFIG=:
3148 else
3149         case "$cf_cv_system_name" in
3150         (dragonfly*|mirbsd*|freebsd*)
3151                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3152                 ;;
3153         (*) LDPATH=$PATH:/sbin:/usr/sbin
3154                 # Extract the first word of "ldconfig", so it can be a program name with args.
3155 set dummy ldconfig; ac_word=$2
3156 echo "$as_me:3156: checking for $ac_word" >&5
3157 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3158 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3159   echo $ECHO_N "(cached) $ECHO_C" >&6
3160 else
3161   case $LDCONFIG in
3162   [\\/]* | ?:[\\/]*)
3163   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3164   ;;
3165   *)
3166   ac_save_IFS=$IFS; IFS=$ac_path_separator
3167 ac_dummy="$LDPATH"
3168 for ac_dir in $ac_dummy; do
3169   IFS=$ac_save_IFS
3170   test -z "$ac_dir" && ac_dir=.
3171   if $as_executable_p "$ac_dir/$ac_word"; then
3172    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3173    echo "$as_me:3173: found $ac_dir/$ac_word" >&5
3174    break
3175 fi
3176 done
3177
3178   ;;
3179 esac
3180 fi
3181 LDCONFIG=$ac_cv_path_LDCONFIG
3182
3183 if test -n "$LDCONFIG"; then
3184   echo "$as_me:3184: result: $LDCONFIG" >&5
3185 echo "${ECHO_T}$LDCONFIG" >&6
3186 else
3187   echo "$as_me:3187: result: no" >&5
3188 echo "${ECHO_T}no" >&6
3189 fi
3190
3191                 ;;
3192         esac
3193 fi
3194
3195 echo "$as_me:3195: checking if you want to ensure bool is consistent with C++" >&5
3196 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3197
3198 # Check whether --with-cxx or --without-cxx was given.
3199 if test "${with_cxx+set}" = set; then
3200   withval="$with_cxx"
3201   cf_with_cxx=$withval
3202 else
3203   cf_with_cxx=yes
3204 fi;
3205 echo "$as_me:3205: result: $cf_with_cxx" >&5
3206 echo "${ECHO_T}$cf_with_cxx" >&6
3207 if test "X$cf_with_cxx" = Xno ; then
3208         CXX=""
3209         GXX=""
3210 else
3211         # with autoconf 2.13, we can change the error to a warning:
3212                 ac_ext=cc
3213 ac_cpp='$CXXCPP $CPPFLAGS'
3214 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3215 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3216 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3217 ac_main_return="return"
3218 if test -n "$ac_tool_prefix"; then
3219   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3220   do
3221     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3222 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3223 echo "$as_me:3223: checking for $ac_word" >&5
3224 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3225 if test "${ac_cv_prog_CXX+set}" = set; then
3226   echo $ECHO_N "(cached) $ECHO_C" >&6
3227 else
3228   if test -n "$CXX"; then
3229   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3230 else
3231   ac_save_IFS=$IFS; IFS=$ac_path_separator
3232 ac_dummy="$PATH"
3233 for ac_dir in $ac_dummy; do
3234   IFS=$ac_save_IFS
3235   test -z "$ac_dir" && ac_dir=.
3236   $as_executable_p "$ac_dir/$ac_word" || continue
3237 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3238 echo "$as_me:3238: found $ac_dir/$ac_word" >&5
3239 break
3240 done
3241
3242 fi
3243 fi
3244 CXX=$ac_cv_prog_CXX
3245 if test -n "$CXX"; then
3246   echo "$as_me:3246: result: $CXX" >&5
3247 echo "${ECHO_T}$CXX" >&6
3248 else
3249   echo "$as_me:3249: result: no" >&5
3250 echo "${ECHO_T}no" >&6
3251 fi
3252
3253     test -n "$CXX" && break
3254   done
3255 fi
3256 if test -z "$CXX"; then
3257   ac_ct_CXX=$CXX
3258   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3259 do
3260   # Extract the first word of "$ac_prog", so it can be a program name with args.
3261 set dummy $ac_prog; ac_word=$2
3262 echo "$as_me:3262: checking for $ac_word" >&5
3263 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3264 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   if test -n "$ac_ct_CXX"; then
3268   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3269 else
3270   ac_save_IFS=$IFS; IFS=$ac_path_separator
3271 ac_dummy="$PATH"
3272 for ac_dir in $ac_dummy; do
3273   IFS=$ac_save_IFS
3274   test -z "$ac_dir" && ac_dir=.
3275   $as_executable_p "$ac_dir/$ac_word" || continue
3276 ac_cv_prog_ac_ct_CXX="$ac_prog"
3277 echo "$as_me:3277: found $ac_dir/$ac_word" >&5
3278 break
3279 done
3280
3281 fi
3282 fi
3283 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3284 if test -n "$ac_ct_CXX"; then
3285   echo "$as_me:3285: result: $ac_ct_CXX" >&5
3286 echo "${ECHO_T}$ac_ct_CXX" >&6
3287 else
3288   echo "$as_me:3288: result: no" >&5
3289 echo "${ECHO_T}no" >&6
3290 fi
3291
3292   test -n "$ac_ct_CXX" && break
3293 done
3294 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3295
3296   CXX=$ac_ct_CXX
3297 fi
3298
3299 # Provide some information about the compiler.
3300 echo "$as_me:3300:" \
3301      "checking for C++ compiler version" >&5
3302 ac_compiler=`set X $ac_compile; echo $2`
3303 { (eval echo "$as_me:3303: \"$ac_compiler --version </dev/null >&5\"") >&5
3304   (eval $ac_compiler --version </dev/null >&5) 2>&5
3305   ac_status=$?
3306   echo "$as_me:3306: \$? = $ac_status" >&5
3307   (exit "$ac_status"); }
3308 { (eval echo "$as_me:3308: \"$ac_compiler -v </dev/null >&5\"") >&5
3309   (eval $ac_compiler -v </dev/null >&5) 2>&5
3310   ac_status=$?
3311   echo "$as_me:3311: \$? = $ac_status" >&5
3312   (exit "$ac_status"); }
3313 { (eval echo "$as_me:3313: \"$ac_compiler -V </dev/null >&5\"") >&5
3314   (eval $ac_compiler -V </dev/null >&5) 2>&5
3315   ac_status=$?
3316   echo "$as_me:3316: \$? = $ac_status" >&5
3317   (exit "$ac_status"); }
3318
3319 echo "$as_me:3319: checking whether we are using the GNU C++ compiler" >&5
3320 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3321 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3322   echo $ECHO_N "(cached) $ECHO_C" >&6
3323 else
3324   cat >"conftest.$ac_ext" <<_ACEOF
3325 #line 3325 "configure"
3326 #include "confdefs.h"
3327
3328 int
3329 main (void)
3330 {
3331 #ifndef __GNUC__
3332        choke me
3333 #endif
3334
3335   ;
3336   return 0;
3337 }
3338 _ACEOF
3339 rm -f "conftest.$ac_objext"
3340 if { (eval echo "$as_me:3340: \"$ac_compile\"") >&5
3341   (eval $ac_compile) 2>&5
3342   ac_status=$?
3343   echo "$as_me:3343: \$? = $ac_status" >&5
3344   (exit "$ac_status"); } &&
3345          { ac_try='test -s "conftest.$ac_objext"'
3346   { (eval echo "$as_me:3346: \"$ac_try\"") >&5
3347   (eval $ac_try) 2>&5
3348   ac_status=$?
3349   echo "$as_me:3349: \$? = $ac_status" >&5
3350   (exit "$ac_status"); }; }; then
3351   ac_compiler_gnu=yes
3352 else
3353   echo "$as_me: failed program was:" >&5
3354 cat "conftest.$ac_ext" >&5
3355 ac_compiler_gnu=no
3356 fi
3357 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3358 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3359
3360 fi
3361 echo "$as_me:3361: result: $ac_cv_cxx_compiler_gnu" >&5
3362 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3363 GXX=`test $ac_compiler_gnu = yes && echo yes`
3364 ac_test_CXXFLAGS=${CXXFLAGS+set}
3365 ac_save_CXXFLAGS=$CXXFLAGS
3366 CXXFLAGS="-g"
3367 echo "$as_me:3367: checking whether $CXX accepts -g" >&5
3368 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3369 if test "${ac_cv_prog_cxx_g+set}" = set; then
3370   echo $ECHO_N "(cached) $ECHO_C" >&6
3371 else
3372   cat >"conftest.$ac_ext" <<_ACEOF
3373 #line 3373 "configure"
3374 #include "confdefs.h"
3375
3376 int
3377 main (void)
3378 {
3379
3380   ;
3381   return 0;
3382 }
3383 _ACEOF
3384 rm -f "conftest.$ac_objext"
3385 if { (eval echo "$as_me:3385: \"$ac_compile\"") >&5
3386   (eval $ac_compile) 2>&5
3387   ac_status=$?
3388   echo "$as_me:3388: \$? = $ac_status" >&5
3389   (exit "$ac_status"); } &&
3390          { ac_try='test -s "conftest.$ac_objext"'
3391   { (eval echo "$as_me:3391: \"$ac_try\"") >&5
3392   (eval $ac_try) 2>&5
3393   ac_status=$?
3394   echo "$as_me:3394: \$? = $ac_status" >&5
3395   (exit "$ac_status"); }; }; then
3396   ac_cv_prog_cxx_g=yes
3397 else
3398   echo "$as_me: failed program was:" >&5
3399 cat "conftest.$ac_ext" >&5
3400 ac_cv_prog_cxx_g=no
3401 fi
3402 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3403 fi
3404 echo "$as_me:3404: result: $ac_cv_prog_cxx_g" >&5
3405 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3406 if test "$ac_test_CXXFLAGS" = set; then
3407   CXXFLAGS=$ac_save_CXXFLAGS
3408 elif test $ac_cv_prog_cxx_g = yes; then
3409   if test "$GXX" = yes; then
3410     CXXFLAGS="-g -O2"
3411   else
3412     CXXFLAGS="-g"
3413   fi
3414 else
3415   if test "$GXX" = yes; then
3416     CXXFLAGS="-O2"
3417   else
3418     CXXFLAGS=
3419   fi
3420 fi
3421 for ac_declaration in \
3422    ''\
3423    '#include <stdlib.h>' \
3424    'extern "C" void std::exit (int) throw (); using std::exit;' \
3425    'extern "C" void std::exit (int); using std::exit;' \
3426    'extern "C" void exit (int) throw ();' \
3427    'extern "C" void exit (int);' \
3428    'void exit (int);'
3429 do
3430   cat >"conftest.$ac_ext" <<_ACEOF
3431 #line 3431 "configure"
3432 #include "confdefs.h"
3433 #include <stdlib.h>
3434 $ac_declaration
3435 int
3436 main (void)
3437 {
3438 exit (42);
3439   ;
3440   return 0;
3441 }
3442 _ACEOF
3443 rm -f "conftest.$ac_objext"
3444 if { (eval echo "$as_me:3444: \"$ac_compile\"") >&5
3445   (eval $ac_compile) 2>&5
3446   ac_status=$?
3447   echo "$as_me:3447: \$? = $ac_status" >&5
3448   (exit "$ac_status"); } &&
3449          { ac_try='test -s "conftest.$ac_objext"'
3450   { (eval echo "$as_me:3450: \"$ac_try\"") >&5
3451   (eval $ac_try) 2>&5
3452   ac_status=$?
3453   echo "$as_me:3453: \$? = $ac_status" >&5
3454   (exit "$ac_status"); }; }; then
3455   :
3456 else
3457   echo "$as_me: failed program was:" >&5
3458 cat "conftest.$ac_ext" >&5
3459 continue
3460 fi
3461 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3462   cat >"conftest.$ac_ext" <<_ACEOF
3463 #line 3463 "configure"
3464 #include "confdefs.h"
3465 $ac_declaration
3466 int
3467 main (void)
3468 {
3469 exit (42);
3470   ;
3471   return 0;
3472 }
3473 _ACEOF
3474 rm -f "conftest.$ac_objext"
3475 if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476   (eval $ac_compile) 2>&5
3477   ac_status=$?
3478   echo "$as_me:3478: \$? = $ac_status" >&5
3479   (exit "$ac_status"); } &&
3480          { ac_try='test -s "conftest.$ac_objext"'
3481   { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482   (eval $ac_try) 2>&5
3483   ac_status=$?
3484   echo "$as_me:3484: \$? = $ac_status" >&5
3485   (exit "$ac_status"); }; }; then
3486   break
3487 else
3488   echo "$as_me: failed program was:" >&5
3489 cat "conftest.$ac_ext" >&5
3490 fi
3491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3492 done
3493 rm -rf conftest*
3494 if test -n "$ac_declaration"; then
3495   echo '#ifdef __cplusplus' >>confdefs.h
3496   echo "$ac_declaration"    >>confdefs.h
3497   echo '#endif'             >>confdefs.h
3498 fi
3499
3500 ac_ext=c
3501 ac_cpp='$CPP $CPPFLAGS'
3502 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3503 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3504 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3505 ac_main_return="return"
3506
3507         ac_ext=cc
3508 ac_cpp='$CXXCPP $CPPFLAGS'
3509 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3510 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3511 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3512 ac_main_return="return"
3513
3514         if test "x$cf_with_cxx" != xno
3515         then
3516                 # Several of the C++ configurations do not work, particularly when
3517                 # cross-compiling (20140913 -TD)
3518                 echo "$as_me:3518: checking if $CXX works" >&5
3519 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3520
3521                 save_CPPFLAGS="$CPPFLAGS"
3522                 eval cf_includedir=${includedir}
3523                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3524
3525 cat >"conftest.$ac_ext" <<_ACEOF
3526 #line 3526 "configure"
3527 #include "confdefs.h"
3528
3529 #include <stdlib.h>
3530 #include <stdio.h>
3531
3532 int
3533 main (void)
3534 {
3535
3536                 printf("Hello world!\n")
3537
3538   ;
3539   return 0;
3540 }
3541 _ACEOF
3542 rm -f "conftest.$ac_objext"
3543 if { (eval echo "$as_me:3543: \"$ac_compile\"") >&5
3544   (eval $ac_compile) 2>&5
3545   ac_status=$?
3546   echo "$as_me:3546: \$? = $ac_status" >&5
3547   (exit "$ac_status"); } &&
3548          { ac_try='test -s "conftest.$ac_objext"'
3549   { (eval echo "$as_me:3549: \"$ac_try\"") >&5
3550   (eval $ac_try) 2>&5
3551   ac_status=$?
3552   echo "$as_me:3552: \$? = $ac_status" >&5
3553   (exit "$ac_status"); }; }; then
3554   cf_cxx_works=yes
3555 else
3556   echo "$as_me: failed program was:" >&5
3557 cat "conftest.$ac_ext" >&5
3558 cf_cxx_works=no
3559 fi
3560 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3561                 CPPFLAGS="$save_CPPFLAGS"
3562
3563                 echo "$as_me:3563: result: $cf_cxx_works" >&5
3564 echo "${ECHO_T}$cf_cxx_works" >&6
3565                 if test "x$cf_cxx_works" = xno
3566                 then
3567                         { echo "$as_me:3567: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3568 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3569                         cf_with_cxx=no; CXX=""; GXX="";
3570                 fi
3571         fi
3572         ac_ext=c
3573 ac_cpp='$CPP $CPPFLAGS'
3574 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3575 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3576 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3577 ac_main_return="return"
3578
3579         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3580         if test "$CXX" = "g++" ; then
3581                 # Extract the first word of "g++", so it can be a program name with args.
3582 set dummy g++; ac_word=$2
3583 echo "$as_me:3583: checking for $ac_word" >&5
3584 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3585 if test "${ac_cv_path_CXX+set}" = set; then
3586   echo $ECHO_N "(cached) $ECHO_C" >&6
3587 else
3588   case $CXX in
3589   [\\/]* | ?:[\\/]*)
3590   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3591   ;;
3592   *)
3593   ac_save_IFS=$IFS; IFS=$ac_path_separator
3594 ac_dummy="$PATH"
3595 for ac_dir in $ac_dummy; do
3596   IFS=$ac_save_IFS
3597   test -z "$ac_dir" && ac_dir=.
3598   if $as_executable_p "$ac_dir/$ac_word"; then
3599    ac_cv_path_CXX="$ac_dir/$ac_word"
3600    echo "$as_me:3600: found $ac_dir/$ac_word" >&5
3601    break
3602 fi
3603 done
3604
3605   ;;
3606 esac
3607 fi
3608 CXX=$ac_cv_path_CXX
3609
3610 if test -n "$CXX"; then
3611   echo "$as_me:3611: result: $CXX" >&5
3612 echo "${ECHO_T}$CXX" >&6
3613 else
3614   echo "$as_me:3614: result: no" >&5
3615 echo "${ECHO_T}no" >&6
3616 fi
3617
3618         fi
3619         case "x$CXX" in
3620         (x|xg++)
3621                 { echo "$as_me:3621: WARNING: You don't have any C++ compiler, too bad" >&5
3622 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3623                 cf_with_cxx=no; CXX=""; GXX="";
3624                 ;;
3625         esac
3626 fi
3627
3628 GXX_VERSION=none
3629 if test "$GXX" = yes; then
3630         echo "$as_me:3630: checking version of ${CXX:-g++}" >&5
3631 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3632         GXX_VERSION="`${CXX:-g++} --version 2>/dev/null | sed -e '2,$d' -e 's/^[^(]*([^)][^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3633         if test -z "$GXX_VERSION"
3634         then
3635                 GXX_VERSION=unknown
3636                 GXX=no
3637         fi
3638         echo "$as_me:3638: result: $GXX_VERSION" >&5
3639 echo "${ECHO_T}$GXX_VERSION" >&6
3640 fi
3641
3642 case "$GXX_VERSION" in
3643 ([1-9][0-9].*)
3644         ;;
3645 (1.*|2.[0-6]*)
3646         { echo "$as_me:3646: WARNING: templates do not work" >&5
3647 echo "$as_me: WARNING: templates do not work" >&2;}
3648         ;;
3649 esac
3650
3651 echo "$as_me:3651: checking if you want to build C++ binding and demo" >&5
3652 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3653
3654 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3655 if test "${with_cxx_binding+set}" = set; then
3656   withval="$with_cxx_binding"
3657   cf_with_cxx_binding=$withval
3658 else
3659   cf_with_cxx_binding=$cf_with_cxx
3660 fi;
3661 echo "$as_me:3661: result: $cf_with_cxx_binding" >&5
3662 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3663
3664 echo "$as_me:3664: checking if you want to build with Ada" >&5
3665 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3666 echo "$as_me:3666: result: $cf_with_ada" >&5
3667 echo "${ECHO_T}$cf_with_ada" >&6
3668
3669 echo "$as_me:3669: checking if you want to install terminal database" >&5
3670 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3671
3672 # Check whether --enable-db-install or --disable-db-install was given.
3673 if test "${enable_db_install+set}" = set; then
3674   enableval="$enable_db_install"
3675   cf_with_db_install=$enableval
3676 else
3677   cf_with_db_install=yes
3678 fi;
3679 echo "$as_me:3679: result: $cf_with_db_install" >&5
3680 echo "${ECHO_T}$cf_with_db_install" >&6
3681
3682 echo "$as_me:3682: checking if you want to install manpages" >&5
3683 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3684
3685 # Check whether --with-manpages or --without-manpages was given.
3686 if test "${with_manpages+set}" = set; then
3687   withval="$with_manpages"
3688   cf_with_manpages=$withval
3689 else
3690   cf_with_manpages=yes
3691 fi;
3692 echo "$as_me:3692: result: $cf_with_manpages" >&5
3693 echo "${ECHO_T}$cf_with_manpages" >&6
3694
3695 echo "$as_me:3695: checking if you want to build programs such as tic" >&5
3696 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3697
3698 # Check whether --with-progs or --without-progs was given.
3699 if test "${with_progs+set}" = set; then
3700   withval="$with_progs"
3701   cf_with_progs=$withval
3702 else
3703   cf_with_progs=yes
3704 fi;
3705 echo "$as_me:3705: result: $cf_with_progs" >&5
3706 echo "${ECHO_T}$cf_with_progs" >&6
3707
3708 echo "$as_me:3708: checking if you want to build test-programs" >&5
3709 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3710
3711 # Check whether --with-tests or --without-tests was given.
3712 if test "${with_tests+set}" = set; then
3713   withval="$with_tests"
3714   cf_with_tests=$withval
3715 else
3716   cf_with_tests=yes
3717 fi;
3718 echo "$as_me:3718: result: $cf_with_tests" >&5
3719 echo "${ECHO_T}$cf_with_tests" >&6
3720
3721 echo "$as_me:3721: checking if you wish to install curses.h" >&5
3722 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3723
3724 # Check whether --with-curses-h or --without-curses-h was given.
3725 if test "${with_curses_h+set}" = set; then
3726   withval="$with_curses_h"
3727   with_curses_h=$withval
3728 else
3729   with_curses_h=yes
3730 fi;
3731 echo "$as_me:3731: result: $with_curses_h" >&5
3732 echo "${ECHO_T}$with_curses_h" >&6
3733
3734 modules_to_build="ncurses"
3735 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3736 modules_to_build="$modules_to_build panel menu form"
3737
3738 test "$program_prefix" != NONE &&
3739   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3740 # Use a double $ so make ignores it.
3741 test "$program_suffix" != NONE &&
3742   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3743 # Double any \ or $.  echo might interpret backslashes.
3744 # By default was `s,x,x', remove it if useless.
3745 cat <<\_ACEOF >conftest.sed
3746 s/[\\$]/&&/g;s/;s,x,x,$//
3747 _ACEOF
3748 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3749 rm conftest.sed
3750
3751 for ac_prog in mawk gawk nawk awk
3752 do
3753   # Extract the first word of "$ac_prog", so it can be a program name with args.
3754 set dummy $ac_prog; ac_word=$2
3755 echo "$as_me:3755: checking for $ac_word" >&5
3756 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3757 if test "${ac_cv_prog_AWK+set}" = set; then
3758   echo $ECHO_N "(cached) $ECHO_C" >&6
3759 else
3760   if test -n "$AWK"; then
3761   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3762 else
3763   ac_save_IFS=$IFS; IFS=$ac_path_separator
3764 ac_dummy="$PATH"
3765 for ac_dir in $ac_dummy; do
3766   IFS=$ac_save_IFS
3767   test -z "$ac_dir" && ac_dir=.
3768   $as_executable_p "$ac_dir/$ac_word" || continue
3769 ac_cv_prog_AWK="$ac_prog"
3770 echo "$as_me:3770: found $ac_dir/$ac_word" >&5
3771 break
3772 done
3773
3774 fi
3775 fi
3776 AWK=$ac_cv_prog_AWK
3777 if test -n "$AWK"; then
3778   echo "$as_me:3778: result: $AWK" >&5
3779 echo "${ECHO_T}$AWK" >&6
3780 else
3781   echo "$as_me:3781: result: no" >&5
3782 echo "${ECHO_T}no" >&6
3783 fi
3784
3785   test -n "$AWK" && break
3786 done
3787
3788 test -z "$AWK" && { { echo "$as_me:3788: error: No awk program found" >&5
3789 echo "$as_me: error: No awk program found" >&2;}
3790    { (exit 1); exit 1; }; }
3791
3792 # Find a good install program.  We prefer a C program (faster),
3793 # so one script is as good as another.  But avoid the broken or
3794 # incompatible versions:
3795 # SysV /etc/install, /usr/sbin/install
3796 # SunOS /usr/etc/install
3797 # IRIX /sbin/install
3798 # AIX /bin/install
3799 # AmigaOS /C/install, which installs bootblocks on floppy discs
3800 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3801 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3802 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3803 # ./install, which can be erroneously created by make from ./install.sh.
3804 echo "$as_me:3804: checking for a BSD compatible install" >&5
3805 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3806 if test -z "$INSTALL"; then
3807 if test "${ac_cv_path_install+set}" = set; then
3808   echo $ECHO_N "(cached) $ECHO_C" >&6
3809 else
3810     ac_save_IFS=$IFS; IFS=$ac_path_separator
3811   for ac_dir in $PATH; do
3812     IFS=$ac_save_IFS
3813     # Account for people who put trailing slashes in PATH elements.
3814     case $ac_dir/ in
3815     / | ./ | .// | /cC/* \
3816     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3817     | /usr/ucb/* ) ;;
3818     *)
3819       # OSF1 and SCO ODT 3.0 have their own names for install.
3820       # Don't use installbsd from OSF since it installs stuff as root
3821       # by default.
3822       for ac_prog in ginstall scoinst install; do
3823         if $as_executable_p "$ac_dir/$ac_prog"; then
3824           if test $ac_prog = install &&
3825             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3826             # AIX install.  It has an incompatible calling convention.
3827             :
3828           elif test $ac_prog = install &&
3829             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3830             # program-specific install script used by HP pwplus--don't use.
3831             :
3832           else
3833             ac_cv_path_install="$ac_dir/$ac_prog -c"
3834             break 2
3835           fi
3836         fi
3837       done
3838       ;;
3839     esac
3840   done
3841
3842 fi
3843   if test "${ac_cv_path_install+set}" = set; then
3844     INSTALL=$ac_cv_path_install
3845   else
3846     # As a last resort, use the slow shell script.  We don't cache a
3847     # path for INSTALL within a source directory, because that will
3848     # break other packages using the cache if that directory is
3849     # removed, or if the path is relative.
3850     INSTALL=$ac_install_sh
3851   fi
3852 fi
3853 echo "$as_me:3853: result: $INSTALL" >&5
3854 echo "${ECHO_T}$INSTALL" >&6
3855
3856 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3857 # It thinks the first close brace ends the variable substitution.
3858 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3859
3860 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3861
3862 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3863
3864 case $INSTALL in
3865 (/*)
3866         ;;
3867 (*)
3868         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3869         test -z "$cf_dir" && cf_dir=.
3870         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3871         ;;
3872 esac
3873
3874 for ac_prog in lint cppcheck splint
3875 do
3876   # Extract the first word of "$ac_prog", so it can be a program name with args.
3877 set dummy $ac_prog; ac_word=$2
3878 echo "$as_me:3878: checking for $ac_word" >&5
3879 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3880 if test "${ac_cv_prog_LINT+set}" = set; then
3881   echo $ECHO_N "(cached) $ECHO_C" >&6
3882 else
3883   if test -n "$LINT"; then
3884   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3885 else
3886   ac_save_IFS=$IFS; IFS=$ac_path_separator
3887 ac_dummy="$PATH"
3888 for ac_dir in $ac_dummy; do
3889   IFS=$ac_save_IFS
3890   test -z "$ac_dir" && ac_dir=.
3891   $as_executable_p "$ac_dir/$ac_word" || continue
3892 ac_cv_prog_LINT="$ac_prog"
3893 echo "$as_me:3893: found $ac_dir/$ac_word" >&5
3894 break
3895 done
3896
3897 fi
3898 fi
3899 LINT=$ac_cv_prog_LINT
3900 if test -n "$LINT"; then
3901   echo "$as_me:3901: result: $LINT" >&5
3902 echo "${ECHO_T}$LINT" >&6
3903 else
3904   echo "$as_me:3904: result: no" >&5
3905 echo "${ECHO_T}no" >&6
3906 fi
3907
3908   test -n "$LINT" && break
3909 done
3910
3911 case "x$LINT" in
3912 (xcppcheck|x*/cppcheck)
3913         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3914         ;;
3915 esac
3916
3917 echo "$as_me:3917: checking whether ln -s works" >&5
3918 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3919 LN_S=$as_ln_s
3920 if test "$LN_S" = "ln -s"; then
3921   echo "$as_me:3921: result: yes" >&5
3922 echo "${ECHO_T}yes" >&6
3923 else
3924   echo "$as_me:3924: result: no, using $LN_S" >&5
3925 echo "${ECHO_T}no, using $LN_S" >&6
3926 fi
3927
3928 echo "$as_me:3928: checking if $LN_S -f options work" >&5
3929 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3930
3931 rm -f conf$$.src conf$$dst
3932 echo >conf$$.dst
3933 echo first >conf$$.src
3934 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3935         cf_prog_ln_sf=yes
3936 else
3937         cf_prog_ln_sf=no
3938 fi
3939 rm -f conf$$.dst conf$$src
3940 echo "$as_me:3940: result: $cf_prog_ln_sf" >&5
3941 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3942
3943 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3944
3945 echo "$as_me:3945: checking for long file names" >&5
3946 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3947 if test "${ac_cv_sys_long_file_names+set}" = set; then
3948   echo $ECHO_N "(cached) $ECHO_C" >&6
3949 else
3950   ac_cv_sys_long_file_names=yes
3951 # Test for long file names in all the places we know might matter:
3952 #      .                the current directory, where building will happen
3953 #      $prefix/lib      where we will be installing things
3954 #      $exec_prefix/lib likewise
3955 # eval it to expand exec_prefix.
3956 #      $TMPDIR          if set, where it might want to write temporary files
3957 # if $TMPDIR is not set:
3958 #      /tmp             where it might want to write temporary files
3959 #      /var/tmp         likewise
3960 #      /usr/tmp         likewise
3961 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3962   ac_tmpdirs=$TMPDIR
3963 else
3964   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3965 fi
3966 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3967   test -d "$ac_dir" || continue
3968   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3969   ac_xdir=$ac_dir/cf$$
3970   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3971   ac_tf1=$ac_xdir/conftest9012345
3972   ac_tf2=$ac_xdir/conftest9012346
3973   (echo 1 >"$ac_tf1") 2>/dev/null
3974   (echo 2 >"$ac_tf2") 2>/dev/null
3975   ac_val=`cat "$ac_tf1" 2>/dev/null`
3976   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3977     ac_cv_sys_long_file_names=no
3978     rm -rf "$ac_xdir" 2>/dev/null
3979     break
3980   fi
3981   rm -rf "$ac_xdir" 2>/dev/null
3982 done
3983 fi
3984 echo "$as_me:3984: result: $ac_cv_sys_long_file_names" >&5
3985 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3986 if test "$ac_cv_sys_long_file_names" = yes; then
3987
3988 cat >>confdefs.h <<\EOF
3989 #define HAVE_LONG_FILE_NAMES 1
3990 EOF
3991
3992 fi
3993
3994 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3995 # of package conflict.
3996 cf_config_suffix=
3997
3998 # Check whether --with-config-suffix or --without-config-suffix was given.
3999 if test "${with_config_suffix+set}" = set; then
4000   withval="$with_config_suffix"
4001   case "x$withval" in
4002         (xyes|xno)
4003                 { echo "$as_me:4003: WARNING: expected a value for config-suffix option" >&5
4004 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
4005                 ;;
4006         (*)     cf_config_suffix="$withval"
4007                 ;;
4008         esac
4009 fi;
4010
4011 # If we find pkg-config, check if we should install the ".pc" files.
4012
4013 echo "$as_me:4013: checking if you want to use pkg-config" >&5
4014 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
4015
4016 # Check whether --with-pkg-config or --without-pkg-config was given.
4017 if test "${with_pkg_config+set}" = set; then
4018   withval="$with_pkg_config"
4019   cf_pkg_config=$withval
4020 else
4021   cf_pkg_config=yes
4022 fi;
4023 echo "$as_me:4023: result: $cf_pkg_config" >&5
4024 echo "${ECHO_T}$cf_pkg_config" >&6
4025
4026 case "$cf_pkg_config" in
4027 (no)
4028         PKG_CONFIG=none
4029         ;;
4030 (yes)
4031
4032 if test -n "$ac_tool_prefix"; then
4033   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4034 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4035 echo "$as_me:4035: checking for $ac_word" >&5
4036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4037 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4038   echo $ECHO_N "(cached) $ECHO_C" >&6
4039 else
4040   case $PKG_CONFIG in
4041   [\\/]* | ?:[\\/]*)
4042   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4043   ;;
4044   *)
4045   ac_save_IFS=$IFS; IFS=$ac_path_separator
4046 ac_dummy="$PATH"
4047 for ac_dir in $ac_dummy; do
4048   IFS=$ac_save_IFS
4049   test -z "$ac_dir" && ac_dir=.
4050   if $as_executable_p "$ac_dir/$ac_word"; then
4051    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4052    echo "$as_me:4052: found $ac_dir/$ac_word" >&5
4053    break
4054 fi
4055 done
4056
4057   ;;
4058 esac
4059 fi
4060 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4061
4062 if test -n "$PKG_CONFIG"; then
4063   echo "$as_me:4063: result: $PKG_CONFIG" >&5
4064 echo "${ECHO_T}$PKG_CONFIG" >&6
4065 else
4066   echo "$as_me:4066: result: no" >&5
4067 echo "${ECHO_T}no" >&6
4068 fi
4069
4070 fi
4071 if test -z "$ac_cv_path_PKG_CONFIG"; then
4072   ac_pt_PKG_CONFIG=$PKG_CONFIG
4073   # Extract the first word of "pkg-config", so it can be a program name with args.
4074 set dummy pkg-config; ac_word=$2
4075 echo "$as_me:4075: checking for $ac_word" >&5
4076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4077 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4078   echo $ECHO_N "(cached) $ECHO_C" >&6
4079 else
4080   case $ac_pt_PKG_CONFIG in
4081   [\\/]* | ?:[\\/]*)
4082   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4083   ;;
4084   *)
4085   ac_save_IFS=$IFS; IFS=$ac_path_separator
4086 ac_dummy="$PATH"
4087 for ac_dir in $ac_dummy; do
4088   IFS=$ac_save_IFS
4089   test -z "$ac_dir" && ac_dir=.
4090   if $as_executable_p "$ac_dir/$ac_word"; then
4091    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4092    echo "$as_me:4092: found $ac_dir/$ac_word" >&5
4093    break
4094 fi
4095 done
4096
4097   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4098   ;;
4099 esac
4100 fi
4101 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4102
4103 if test -n "$ac_pt_PKG_CONFIG"; then
4104   echo "$as_me:4104: result: $ac_pt_PKG_CONFIG" >&5
4105 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4106 else
4107   echo "$as_me:4107: result: no" >&5
4108 echo "${ECHO_T}no" >&6
4109 fi
4110
4111   PKG_CONFIG=$ac_pt_PKG_CONFIG
4112 else
4113   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4114 fi
4115
4116         ;;
4117 (*)
4118         PKG_CONFIG=$withval
4119         ;;
4120 esac
4121
4122 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4123 if test "$PKG_CONFIG" != none ; then
4124
4125 if test "x$prefix" != xNONE; then
4126         cf_path_syntax="$prefix"
4127 else
4128         cf_path_syntax="$ac_default_prefix"
4129 fi
4130
4131 case ".$PKG_CONFIG" in
4132 (.\$\(*\)*|.\'*\'*)
4133         ;;
4134 (..|./*|.\\*)
4135         ;;
4136 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4137         ;;
4138 (.\$\{*prefix\}*|.\$\{*dir\}*)
4139         eval PKG_CONFIG="$PKG_CONFIG"
4140         case ".$PKG_CONFIG" in
4141         (.NONE/*)
4142                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4143                 ;;
4144         esac
4145         ;;
4146 (.no|.NONE/*)
4147         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4148         ;;
4149 (*)
4150         { { echo "$as_me:4150: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4151 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4152    { (exit 1); exit 1; }; }
4153         ;;
4154 esac
4155
4156 elif test "x$cf_pkg_config" != xno ; then
4157         { echo "$as_me:4157: WARNING: pkg-config is not installed" >&5
4158 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4159 fi
4160
4161 case "$PKG_CONFIG" in
4162 (no|none|yes)
4163         echo "$as_me:4163: checking for pkg-config library directory" >&5
4164 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4165         ;;
4166 (*)
4167         echo "$as_me:4167: checking for $PKG_CONFIG library directory" >&5
4168 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4169         ;;
4170 esac
4171
4172 # if $PKG_CONFIG_LIBDIR is set, try to use that
4173 if test -n "$PKG_CONFIG_PATH"; then
4174         cf_search_path=`echo "$PKG_CONFIG_PATH" | sed -e 's/:/ /g' -e 's,^[     ]*,,' -e 's,[   ]*$,,'`
4175 elif test -n "$PKG_CONFIG_LIBDIR"; then
4176         cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,' -e 's,[   ]*$,,'`
4177 else
4178         cf_search_path=auto
4179 fi
4180
4181 # if the option is used, let that override.  otherwise default to "libdir"
4182
4183 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4184 if test "${with_pkg_config_libdir+set}" = set; then
4185   withval="$with_pkg_config_libdir"
4186   cf_search_path=$withval
4187 else
4188   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4189 fi;
4190
4191 case "x$cf_search_path" in
4192 (xlibdir)
4193         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4194         echo "$as_me:4194: result: $PKG_CONFIG_LIBDIR" >&5
4195 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4196         cf_search_path=
4197         ;;
4198 (x)
4199         ;;
4200 (x/*\ *)
4201         PKG_CONFIG_LIBDIR=
4202         ;;
4203 (x/*)
4204         PKG_CONFIG_LIBDIR="$cf_search_path"
4205         echo "$as_me:4205: result: $PKG_CONFIG_LIBDIR" >&5
4206 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4207         cf_search_path=
4208         ;;
4209 (xyes|xauto)
4210         echo "$as_me:4210: result: auto" >&5
4211 echo "${ECHO_T}auto" >&6
4212         cf_search_path=
4213         # Look for the library directory using the same prefix as the executable
4214         echo "$as_me:4214: checking for search-list" >&5
4215 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4216         if test "x$PKG_CONFIG" != xnone
4217         then
4218                 # works for pkg-config since version 0.24 (2009)
4219                 # works for pkgconf since version 0.8.3 (2012)
4220                 for cf_pkg_program in \
4221                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4222                         pkg-config \
4223                         pkgconf
4224                 do
4225                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4226                         test -n "$cf_search_path" && break
4227                 done
4228
4229                 # works for pkg-config since import in 2005 of original 2001 HP code.
4230                 test -z "$cf_search_path" && \
4231                 cf_search_path=`
4232                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4233 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4234         sub(\"^[^']*'\",\"\"); \
4235         sub(\"'.*\",\"\"); \
4236         printf \" %s\", \\$0; } \
4237 { next; } \
4238 "`
4239         fi
4240
4241         echo "$as_me:4241: result: $cf_search_path" >&5
4242 echo "${ECHO_T}$cf_search_path" >&6
4243         ;;
4244 (*)
4245         { { echo "$as_me:4245: error: Unexpected option value: $cf_search_path" >&5
4246 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4247    { (exit 1); exit 1; }; }
4248         ;;
4249 esac
4250
4251 if test -n "$cf_search_path"
4252 then
4253         echo "$as_me:4253: checking for first directory" >&5
4254 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4255         cf_pkg_config_path=none
4256         for cf_config in $cf_search_path
4257         do
4258                 if test -d "$cf_config"
4259                 then
4260                         cf_pkg_config_path=$cf_config
4261                         break
4262                 fi
4263         done
4264         echo "$as_me:4264: result: $cf_pkg_config_path" >&5
4265 echo "${ECHO_T}$cf_pkg_config_path" >&6
4266
4267         if test "x$cf_pkg_config_path" != xnone ; then
4268                 # limit this to the first directory found
4269                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4270         fi
4271
4272         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4273         then
4274                 echo "$as_me:4274: checking for workaround" >&5
4275 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4276                 if test "$prefix" = "NONE" ; then
4277                         cf_prefix="$ac_default_prefix"
4278                 else
4279                         cf_prefix="$prefix"
4280                 fi
4281                 eval cf_libdir=$libdir
4282                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4283                 cf_backup=
4284                 for cf_config in $cf_search_path
4285                 do
4286                         case $cf_config in
4287                         $cf_libdir/pkgconfig)
4288                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4289                                 break
4290                                 ;;
4291                         *)
4292                                 test -z "$cf_backup" && cf_backup=$cf_config
4293                                 ;;
4294                         esac
4295                 done
4296                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4297                 echo "$as_me:4297: result: $PKG_CONFIG_LIBDIR" >&5
4298 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4299         fi
4300 fi
4301
4302 if test "x$PKG_CONFIG" != xnone
4303 then
4304         echo "$as_me:4304: checking if we should install .pc files for $PKG_CONFIG" >&5
4305 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4306 else
4307         echo "$as_me:4307: checking if we should install .pc files" >&5
4308 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4309 fi
4310
4311 # Check whether --enable-pc-files or --disable-pc-files was given.
4312 if test "${enable_pc_files+set}" = set; then
4313   enableval="$enable_pc_files"
4314   enable_pc_files=$enableval
4315 else
4316   enable_pc_files=no
4317 fi;
4318 echo "$as_me:4318: result: $enable_pc_files" >&5
4319 echo "${ECHO_T}$enable_pc_files" >&6
4320
4321 if test "x$enable_pc_files" != xno
4322 then
4323         MAKE_PC_FILES=
4324         case "x$PKG_CONFIG_LIBDIR" in
4325         (xno|xnone|xyes|x)
4326                 { echo "$as_me:4326: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4327 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4328                 ;;
4329         (*)
4330                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4331
4332 if test "x$prefix" != xNONE; then
4333         cf_path_syntax="$prefix"
4334 else
4335         cf_path_syntax="$ac_default_prefix"
4336 fi
4337
4338 case ".$cf_pkg_config_libdir" in
4339 (.\$\(*\)*|.\'*\'*)
4340         ;;
4341 (..|./*|.\\*)
4342         ;;
4343 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4344         ;;
4345 (.\$\{*prefix\}*|.\$\{*dir\}*)
4346         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4347         case ".$cf_pkg_config_libdir" in
4348         (.NONE/*)
4349                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4350                 ;;
4351         esac
4352         ;;
4353 (.no|.NONE/*)
4354         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4355         ;;
4356 (*)
4357         { { echo "$as_me:4357: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4358 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4359    { (exit 1); exit 1; }; }
4360         ;;
4361 esac
4362
4363                 ;;
4364         esac
4365 else
4366         MAKE_PC_FILES="#"
4367 fi
4368
4369 if test -z "$MAKE_PC_FILES"
4370 then
4371         echo "$as_me:4371: checking for suffix to add to pkg-config files" >&5
4372 echo $ECHO_N "checking for suffix to add to pkg-config files... $ECHO_C" >&6
4373
4374 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4375 if test "${with_pc_suffix+set}" = set; then
4376   withval="$with_pc_suffix"
4377   case "x$withval" in
4378         (xyes|xno)
4379                 PC_MODULE_SUFFIX=
4380                 ;;
4381         (*)     PC_MODULE_SUFFIX="$withval"
4382                 ;;
4383         esac
4384 fi;
4385         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4386         echo "$as_me:4386: result: $PC_MODULE_SUFFIX" >&5
4387 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4388         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4389
4390 fi
4391
4392 echo "$as_me:4392: checking if we should assume mixed-case filenames" >&5
4393 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4394
4395 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4396 if test "${enable_mixed_case+set}" = set; then
4397   enableval="$enable_mixed_case"
4398   enable_mixedcase=$enableval
4399 else
4400   enable_mixedcase=auto
4401 fi;
4402 echo "$as_me:4402: result: $enable_mixedcase" >&5
4403 echo "${ECHO_T}$enable_mixedcase" >&6
4404 if test "$enable_mixedcase" = "auto" ; then
4405
4406 echo "$as_me:4406: checking if filesystem supports mixed-case filenames" >&5
4407 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4408 if test "${cf_cv_mixedcase+set}" = set; then
4409   echo $ECHO_N "(cached) $ECHO_C" >&6
4410 else
4411
4412 if test "$cross_compiling" = yes ; then
4413         case "$target_alias" in
4414         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4415                 cf_cv_mixedcase=no
4416                 ;;
4417         (*)
4418                 cf_cv_mixedcase=yes
4419                 ;;
4420         esac
4421 else
4422         rm -f conftest CONFTEST
4423         echo test >conftest
4424         if test -f CONFTEST ; then
4425                 cf_cv_mixedcase=no
4426         else
4427                 cf_cv_mixedcase=yes
4428         fi
4429         rm -f conftest CONFTEST
4430 fi
4431
4432 fi
4433 echo "$as_me:4433: result: $cf_cv_mixedcase" >&5
4434 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4435 test "$cf_cv_mixedcase" = yes &&
4436 cat >>confdefs.h <<\EOF
4437 #define MIXEDCASE_FILENAMES 1
4438 EOF
4439
4440 else
4441         cf_cv_mixedcase=$enable_mixedcase
4442         if test "x$enable_mixedcase" = "xyes" ; then
4443
4444 cat >>confdefs.h <<\EOF
4445 #define MIXEDCASE_FILENAMES 1
4446 EOF
4447
4448         fi
4449 fi
4450
4451 # do this after mixed-case option (tags/TAGS is not as important as tic).
4452 echo "$as_me:4452: checking whether ${MAKE-make} sets \${MAKE}" >&5
4453 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4454 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4455 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4456   echo $ECHO_N "(cached) $ECHO_C" >&6
4457 else
4458   cat >conftest.make <<\EOF
4459 all:
4460         @echo 'ac_maketemp="${MAKE}"'
4461 EOF
4462 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4463 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4464 if test -n "$ac_maketemp"; then
4465   eval ac_cv_prog_make_${ac_make}_set=yes
4466 else
4467   eval ac_cv_prog_make_${ac_make}_set=no
4468 fi
4469 rm -f conftest.make
4470 fi
4471 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4472   echo "$as_me:4472: result: yes" >&5
4473 echo "${ECHO_T}yes" >&6
4474   SET_MAKE=
4475 else
4476   echo "$as_me:4476: result: no" >&5
4477 echo "${ECHO_T}no" >&6
4478   SET_MAKE="MAKE=${MAKE-make}"
4479 fi
4480
4481 echo "$as_me:4481: checking for \".PHONY\" make-support" >&5
4482 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4483 if test "${cf_cv_make_PHONY+set}" = set; then
4484   echo $ECHO_N "(cached) $ECHO_C" >&6
4485 else
4486
4487         rm -rf conftest*
4488         (
4489                 mkdir conftest || exit 1
4490                 cd conftest
4491                 cat >makefile <<'CF_EOF'
4492 .PHONY: always
4493 DATA=0
4494 always: always.out
4495         @echo "** making $@ $(DATA)"
4496 once: once.out
4497         @echo "** making $@ $(DATA)"
4498 always.out:
4499         @echo "** making $@ $(DATA)"
4500         echo $(DATA) > $@
4501 once.out:
4502         @echo "** making $@ $(DATA)"
4503         echo $(DATA) > $@
4504 CF_EOF
4505                 for cf_data in 1 2 3
4506                 do
4507                         ${MAKE:-make} always DATA=$cf_data
4508                         ${MAKE:-make} once   DATA=$cf_data
4509                         ${MAKE:-make} -t always once
4510                         if test -f always ; then
4511                                 echo "no (case 1)" > ../conftest.tmp
4512                         elif test ! -f always.out ; then
4513                                 echo "no (case 2)" > ../conftest.tmp
4514                         elif test ! -f once.out ; then
4515                                 echo "no (case 3)" > ../conftest.tmp
4516                         elif ! cmp -s always.out once.out ; then
4517                                 echo "no (case 4)" > ../conftest.tmp
4518                                 diff always.out once.out
4519                         else
4520                                 cf_check="`cat always.out`"
4521                                 if test "x$cf_check" != "x$cf_data" ; then
4522                                         echo "no (case 5)" > ../conftest.tmp
4523                                 else
4524                                         echo yes > ../conftest.tmp
4525                                         rm -f ./*.out
4526                                         continue
4527                                 fi
4528                         fi
4529                         break
4530                 done
4531         ) >&5 2>&1
4532         cf_cv_make_PHONY="`cat conftest.tmp`"
4533         rm -rf conftest*
4534
4535 fi
4536 echo "$as_me:4536: result: $cf_cv_make_PHONY" >&5
4537 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4538 MAKE_NO_PHONY="#"
4539 MAKE_PHONY="#"
4540 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4541 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4542
4543 for ac_prog in exctags ctags
4544 do
4545   # Extract the first word of "$ac_prog", so it can be a program name with args.
4546 set dummy $ac_prog; ac_word=$2
4547 echo "$as_me:4547: checking for $ac_word" >&5
4548 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4549 if test "${ac_cv_prog_CTAGS+set}" = set; then
4550   echo $ECHO_N "(cached) $ECHO_C" >&6
4551 else
4552   if test -n "$CTAGS"; then
4553   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4554 else
4555   ac_save_IFS=$IFS; IFS=$ac_path_separator
4556 ac_dummy="$PATH"
4557 for ac_dir in $ac_dummy; do
4558   IFS=$ac_save_IFS
4559   test -z "$ac_dir" && ac_dir=.
4560   $as_executable_p "$ac_dir/$ac_word" || continue
4561 ac_cv_prog_CTAGS="$ac_prog"
4562 echo "$as_me:4562: found $ac_dir/$ac_word" >&5
4563 break
4564 done
4565
4566 fi
4567 fi
4568 CTAGS=$ac_cv_prog_CTAGS
4569 if test -n "$CTAGS"; then
4570   echo "$as_me:4570: result: $CTAGS" >&5
4571 echo "${ECHO_T}$CTAGS" >&6
4572 else
4573   echo "$as_me:4573: result: no" >&5
4574 echo "${ECHO_T}no" >&6
4575 fi
4576
4577   test -n "$CTAGS" && break
4578 done
4579
4580 for ac_prog in exetags etags
4581 do
4582   # Extract the first word of "$ac_prog", so it can be a program name with args.
4583 set dummy $ac_prog; ac_word=$2
4584 echo "$as_me:4584: checking for $ac_word" >&5
4585 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4586 if test "${ac_cv_prog_ETAGS+set}" = set; then
4587   echo $ECHO_N "(cached) $ECHO_C" >&6
4588 else
4589   if test -n "$ETAGS"; then
4590   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4591 else
4592   ac_save_IFS=$IFS; IFS=$ac_path_separator
4593 ac_dummy="$PATH"
4594 for ac_dir in $ac_dummy; do
4595   IFS=$ac_save_IFS
4596   test -z "$ac_dir" && ac_dir=.
4597   $as_executable_p "$ac_dir/$ac_word" || continue
4598 ac_cv_prog_ETAGS="$ac_prog"
4599 echo "$as_me:4599: found $ac_dir/$ac_word" >&5
4600 break
4601 done
4602
4603 fi
4604 fi
4605 ETAGS=$ac_cv_prog_ETAGS
4606 if test -n "$ETAGS"; then
4607   echo "$as_me:4607: result: $ETAGS" >&5
4608 echo "${ECHO_T}$ETAGS" >&6
4609 else
4610   echo "$as_me:4610: result: no" >&5
4611 echo "${ECHO_T}no" >&6
4612 fi
4613
4614   test -n "$ETAGS" && break
4615 done
4616
4617 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4618 set dummy ${CTAGS:-ctags}; ac_word=$2
4619 echo "$as_me:4619: checking for $ac_word" >&5
4620 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4621 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4622   echo $ECHO_N "(cached) $ECHO_C" >&6
4623 else
4624   if test -n "$MAKE_LOWER_TAGS"; then
4625   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4626 else
4627   ac_save_IFS=$IFS; IFS=$ac_path_separator
4628 ac_dummy="$PATH"
4629 for ac_dir in $ac_dummy; do
4630   IFS=$ac_save_IFS
4631   test -z "$ac_dir" && ac_dir=.
4632   $as_executable_p "$ac_dir/$ac_word" || continue
4633 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4634 echo "$as_me:4634: found $ac_dir/$ac_word" >&5
4635 break
4636 done
4637
4638   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4639 fi
4640 fi
4641 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4642 if test -n "$MAKE_LOWER_TAGS"; then
4643   echo "$as_me:4643: result: $MAKE_LOWER_TAGS" >&5
4644 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4645 else
4646   echo "$as_me:4646: result: no" >&5
4647 echo "${ECHO_T}no" >&6
4648 fi
4649
4650 if test "$cf_cv_mixedcase" = yes ; then
4651         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4652 set dummy ${ETAGS:-etags}; ac_word=$2
4653 echo "$as_me:4653: checking for $ac_word" >&5
4654 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4655 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4656   echo $ECHO_N "(cached) $ECHO_C" >&6
4657 else
4658   if test -n "$MAKE_UPPER_TAGS"; then
4659   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4660 else
4661   ac_save_IFS=$IFS; IFS=$ac_path_separator
4662 ac_dummy="$PATH"
4663 for ac_dir in $ac_dummy; do
4664   IFS=$ac_save_IFS
4665   test -z "$ac_dir" && ac_dir=.
4666   $as_executable_p "$ac_dir/$ac_word" || continue
4667 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4668 echo "$as_me:4668: found $ac_dir/$ac_word" >&5
4669 break
4670 done
4671
4672   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4673 fi
4674 fi
4675 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4676 if test -n "$MAKE_UPPER_TAGS"; then
4677   echo "$as_me:4677: result: $MAKE_UPPER_TAGS" >&5
4678 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4679 else
4680   echo "$as_me:4680: result: no" >&5
4681 echo "${ECHO_T}no" >&6
4682 fi
4683
4684 else
4685         MAKE_UPPER_TAGS=no
4686 fi
4687
4688 if test "$MAKE_UPPER_TAGS" = yes ; then
4689         MAKE_UPPER_TAGS=
4690 else
4691         MAKE_UPPER_TAGS="#"
4692 fi
4693
4694 if test "$MAKE_LOWER_TAGS" = yes ; then
4695         MAKE_LOWER_TAGS=
4696 else
4697         MAKE_LOWER_TAGS="#"
4698 fi
4699
4700 echo "$as_me:4700: checking for makeflags variable" >&5
4701 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4702 if test "${cf_cv_makeflags+set}" = set; then
4703   echo $ECHO_N "(cached) $ECHO_C" >&6
4704 else
4705
4706         cf_cv_makeflags=''
4707         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4708         do
4709                 cat >cf_makeflags.tmp <<CF_EOF
4710 SHELL = $SHELL
4711 all :
4712         @ echo '.$cf_option'
4713 CF_EOF
4714                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4715                 case "$cf_result" in
4716                 (.*k|.*kw)
4717                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4718                         case "$cf_result" in
4719                         (.*CC=*)        cf_cv_makeflags=
4720                                 ;;
4721                         (*)     cf_cv_makeflags=$cf_option
4722                                 ;;
4723                         esac
4724                         break
4725                         ;;
4726                 (.-)
4727                         ;;
4728                 (*)
4729
4730 echo "${as_me:-configure}:4730: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4731
4732                         ;;
4733                 esac
4734         done
4735         rm -f cf_makeflags.tmp
4736
4737 fi
4738 echo "$as_me:4738: result: $cf_cv_makeflags" >&5
4739 echo "${ECHO_T}$cf_cv_makeflags" >&6
4740
4741 if test -n "$ac_tool_prefix"; then
4742   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4743 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4744 echo "$as_me:4744: checking for $ac_word" >&5
4745 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4746 if test "${ac_cv_prog_RANLIB+set}" = set; then
4747   echo $ECHO_N "(cached) $ECHO_C" >&6
4748 else
4749   if test -n "$RANLIB"; then
4750   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4751 else
4752   ac_save_IFS=$IFS; IFS=$ac_path_separator
4753 ac_dummy="$PATH"
4754 for ac_dir in $ac_dummy; do
4755   IFS=$ac_save_IFS
4756   test -z "$ac_dir" && ac_dir=.
4757   $as_executable_p "$ac_dir/$ac_word" || continue
4758 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4759 echo "$as_me:4759: found $ac_dir/$ac_word" >&5
4760 break
4761 done
4762
4763 fi
4764 fi
4765 RANLIB=$ac_cv_prog_RANLIB
4766 if test -n "$RANLIB"; then
4767   echo "$as_me:4767: result: $RANLIB" >&5
4768 echo "${ECHO_T}$RANLIB" >&6
4769 else
4770   echo "$as_me:4770: result: no" >&5
4771 echo "${ECHO_T}no" >&6
4772 fi
4773
4774 fi
4775 if test -z "$ac_cv_prog_RANLIB"; then
4776   ac_ct_RANLIB=$RANLIB
4777   # Extract the first word of "ranlib", so it can be a program name with args.
4778 set dummy ranlib; ac_word=$2
4779 echo "$as_me:4779: checking for $ac_word" >&5
4780 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4781 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4782   echo $ECHO_N "(cached) $ECHO_C" >&6
4783 else
4784   if test -n "$ac_ct_RANLIB"; then
4785   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4786 else
4787   ac_save_IFS=$IFS; IFS=$ac_path_separator
4788 ac_dummy="$PATH"
4789 for ac_dir in $ac_dummy; do
4790   IFS=$ac_save_IFS
4791   test -z "$ac_dir" && ac_dir=.
4792   $as_executable_p "$ac_dir/$ac_word" || continue
4793 ac_cv_prog_ac_ct_RANLIB="ranlib"
4794 echo "$as_me:4794: found $ac_dir/$ac_word" >&5
4795 break
4796 done
4797
4798   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4799 fi
4800 fi
4801 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4802 if test -n "$ac_ct_RANLIB"; then
4803   echo "$as_me:4803: result: $ac_ct_RANLIB" >&5
4804 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4805 else
4806   echo "$as_me:4806: result: no" >&5
4807 echo "${ECHO_T}no" >&6
4808 fi
4809
4810   RANLIB=$ac_ct_RANLIB
4811 else
4812   RANLIB="$ac_cv_prog_RANLIB"
4813 fi
4814
4815 if test -n "$ac_tool_prefix"; then
4816   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4817 set dummy ${ac_tool_prefix}ld; ac_word=$2
4818 echo "$as_me:4818: checking for $ac_word" >&5
4819 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4820 if test "${ac_cv_prog_LD+set}" = set; then
4821   echo $ECHO_N "(cached) $ECHO_C" >&6
4822 else
4823   if test -n "$LD"; then
4824   ac_cv_prog_LD="$LD" # Let the user override the test.
4825 else
4826   ac_save_IFS=$IFS; IFS=$ac_path_separator
4827 ac_dummy="$PATH"
4828 for ac_dir in $ac_dummy; do
4829   IFS=$ac_save_IFS
4830   test -z "$ac_dir" && ac_dir=.
4831   $as_executable_p "$ac_dir/$ac_word" || continue
4832 ac_cv_prog_LD="${ac_tool_prefix}ld"
4833 echo "$as_me:4833: found $ac_dir/$ac_word" >&5
4834 break
4835 done
4836
4837 fi
4838 fi
4839 LD=$ac_cv_prog_LD
4840 if test -n "$LD"; then
4841   echo "$as_me:4841: result: $LD" >&5
4842 echo "${ECHO_T}$LD" >&6
4843 else
4844   echo "$as_me:4844: result: no" >&5
4845 echo "${ECHO_T}no" >&6
4846 fi
4847
4848 fi
4849 if test -z "$ac_cv_prog_LD"; then
4850   ac_ct_LD=$LD
4851   # Extract the first word of "ld", so it can be a program name with args.
4852 set dummy ld; ac_word=$2
4853 echo "$as_me:4853: checking for $ac_word" >&5
4854 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4855 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4856   echo $ECHO_N "(cached) $ECHO_C" >&6
4857 else
4858   if test -n "$ac_ct_LD"; then
4859   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4860 else
4861   ac_save_IFS=$IFS; IFS=$ac_path_separator
4862 ac_dummy="$PATH"
4863 for ac_dir in $ac_dummy; do
4864   IFS=$ac_save_IFS
4865   test -z "$ac_dir" && ac_dir=.
4866   $as_executable_p "$ac_dir/$ac_word" || continue
4867 ac_cv_prog_ac_ct_LD="ld"
4868 echo "$as_me:4868: found $ac_dir/$ac_word" >&5
4869 break
4870 done
4871
4872   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4873 fi
4874 fi
4875 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4876 if test -n "$ac_ct_LD"; then
4877   echo "$as_me:4877: result: $ac_ct_LD" >&5
4878 echo "${ECHO_T}$ac_ct_LD" >&6
4879 else
4880   echo "$as_me:4880: result: no" >&5
4881 echo "${ECHO_T}no" >&6
4882 fi
4883
4884   LD=$ac_ct_LD
4885 else
4886   LD="$ac_cv_prog_LD"
4887 fi
4888
4889 if test -n "$ac_tool_prefix"; then
4890   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4891 set dummy ${ac_tool_prefix}ar; ac_word=$2
4892 echo "$as_me:4892: checking for $ac_word" >&5
4893 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4894 if test "${ac_cv_prog_AR+set}" = set; then
4895   echo $ECHO_N "(cached) $ECHO_C" >&6
4896 else
4897   if test -n "$AR"; then
4898   ac_cv_prog_AR="$AR" # Let the user override the test.
4899 else
4900   ac_save_IFS=$IFS; IFS=$ac_path_separator
4901 ac_dummy="$PATH"
4902 for ac_dir in $ac_dummy; do
4903   IFS=$ac_save_IFS
4904   test -z "$ac_dir" && ac_dir=.
4905   $as_executable_p "$ac_dir/$ac_word" || continue
4906 ac_cv_prog_AR="${ac_tool_prefix}ar"
4907 echo "$as_me:4907: found $ac_dir/$ac_word" >&5
4908 break
4909 done
4910
4911 fi
4912 fi
4913 AR=$ac_cv_prog_AR
4914 if test -n "$AR"; then
4915   echo "$as_me:4915: result: $AR" >&5
4916 echo "${ECHO_T}$AR" >&6
4917 else
4918   echo "$as_me:4918: result: no" >&5
4919 echo "${ECHO_T}no" >&6
4920 fi
4921
4922 fi
4923 if test -z "$ac_cv_prog_AR"; then
4924   ac_ct_AR=$AR
4925   # Extract the first word of "ar", so it can be a program name with args.
4926 set dummy ar; ac_word=$2
4927 echo "$as_me:4927: checking for $ac_word" >&5
4928 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4929 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4930   echo $ECHO_N "(cached) $ECHO_C" >&6
4931 else
4932   if test -n "$ac_ct_AR"; then
4933   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4934 else
4935   ac_save_IFS=$IFS; IFS=$ac_path_separator
4936 ac_dummy="$PATH"
4937 for ac_dir in $ac_dummy; do
4938   IFS=$ac_save_IFS
4939   test -z "$ac_dir" && ac_dir=.
4940   $as_executable_p "$ac_dir/$ac_word" || continue
4941 ac_cv_prog_ac_ct_AR="ar"
4942 echo "$as_me:4942: found $ac_dir/$ac_word" >&5
4943 break
4944 done
4945
4946   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4947 fi
4948 fi
4949 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4950 if test -n "$ac_ct_AR"; then
4951   echo "$as_me:4951: result: $ac_ct_AR" >&5
4952 echo "${ECHO_T}$ac_ct_AR" >&6
4953 else
4954   echo "$as_me:4954: result: no" >&5
4955 echo "${ECHO_T}no" >&6
4956 fi
4957
4958   AR=$ac_ct_AR
4959 else
4960   AR="$ac_cv_prog_AR"
4961 fi
4962
4963 if test -n "$ac_tool_prefix"; then
4964   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4965 set dummy ${ac_tool_prefix}nm; ac_word=$2
4966 echo "$as_me:4966: checking for $ac_word" >&5
4967 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4968 if test "${ac_cv_prog_NM+set}" = set; then
4969   echo $ECHO_N "(cached) $ECHO_C" >&6
4970 else
4971   if test -n "$NM"; then
4972   ac_cv_prog_NM="$NM" # Let the user override the test.
4973 else
4974   ac_save_IFS=$IFS; IFS=$ac_path_separator
4975 ac_dummy="$PATH"
4976 for ac_dir in $ac_dummy; do
4977   IFS=$ac_save_IFS
4978   test -z "$ac_dir" && ac_dir=.
4979   $as_executable_p "$ac_dir/$ac_word" || continue
4980 ac_cv_prog_NM="${ac_tool_prefix}nm"
4981 echo "$as_me:4981: found $ac_dir/$ac_word" >&5
4982 break
4983 done
4984
4985 fi
4986 fi
4987 NM=$ac_cv_prog_NM
4988 if test -n "$NM"; then
4989   echo "$as_me:4989: result: $NM" >&5
4990 echo "${ECHO_T}$NM" >&6
4991 else
4992   echo "$as_me:4992: result: no" >&5
4993 echo "${ECHO_T}no" >&6
4994 fi
4995
4996 fi
4997 if test -z "$ac_cv_prog_NM"; then
4998   ac_ct_NM=$NM
4999   # Extract the first word of "nm", so it can be a program name with args.
5000 set dummy nm; ac_word=$2
5001 echo "$as_me:5001: checking for $ac_word" >&5
5002 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5003 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
5004   echo $ECHO_N "(cached) $ECHO_C" >&6
5005 else
5006   if test -n "$ac_ct_NM"; then
5007   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
5008 else
5009   ac_save_IFS=$IFS; IFS=$ac_path_separator
5010 ac_dummy="$PATH"
5011 for ac_dir in $ac_dummy; do
5012   IFS=$ac_save_IFS
5013   test -z "$ac_dir" && ac_dir=.
5014   $as_executable_p "$ac_dir/$ac_word" || continue
5015 ac_cv_prog_ac_ct_NM="nm"
5016 echo "$as_me:5016: found $ac_dir/$ac_word" >&5
5017 break
5018 done
5019
5020   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
5021 fi
5022 fi
5023 ac_ct_NM=$ac_cv_prog_ac_ct_NM
5024 if test -n "$ac_ct_NM"; then
5025   echo "$as_me:5025: result: $ac_ct_NM" >&5
5026 echo "${ECHO_T}$ac_ct_NM" >&6
5027 else
5028   echo "$as_me:5028: result: no" >&5
5029 echo "${ECHO_T}no" >&6
5030 fi
5031
5032   NM=$ac_ct_NM
5033 else
5034   NM="$ac_cv_prog_NM"
5035 fi
5036
5037 if test -n "$ac_tool_prefix"; then
5038   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5039 set dummy ${ac_tool_prefix}ar; ac_word=$2
5040 echo "$as_me:5040: checking for $ac_word" >&5
5041 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5042 if test "${ac_cv_prog_AR+set}" = set; then
5043   echo $ECHO_N "(cached) $ECHO_C" >&6
5044 else
5045   if test -n "$AR"; then
5046   ac_cv_prog_AR="$AR" # Let the user override the test.
5047 else
5048   ac_save_IFS=$IFS; IFS=$ac_path_separator
5049 ac_dummy="$PATH"
5050 for ac_dir in $ac_dummy; do
5051   IFS=$ac_save_IFS
5052   test -z "$ac_dir" && ac_dir=.
5053   $as_executable_p "$ac_dir/$ac_word" || continue
5054 ac_cv_prog_AR="${ac_tool_prefix}ar"
5055 echo "$as_me:5055: found $ac_dir/$ac_word" >&5
5056 break
5057 done
5058
5059 fi
5060 fi
5061 AR=$ac_cv_prog_AR
5062 if test -n "$AR"; then
5063   echo "$as_me:5063: result: $AR" >&5
5064 echo "${ECHO_T}$AR" >&6
5065 else
5066   echo "$as_me:5066: result: no" >&5
5067 echo "${ECHO_T}no" >&6
5068 fi
5069
5070 fi
5071 if test -z "$ac_cv_prog_AR"; then
5072   ac_ct_AR=$AR
5073   # Extract the first word of "ar", so it can be a program name with args.
5074 set dummy ar; ac_word=$2
5075 echo "$as_me:5075: checking for $ac_word" >&5
5076 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5077 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5078   echo $ECHO_N "(cached) $ECHO_C" >&6
5079 else
5080   if test -n "$ac_ct_AR"; then
5081   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5082 else
5083   ac_save_IFS=$IFS; IFS=$ac_path_separator
5084 ac_dummy="$PATH"
5085 for ac_dir in $ac_dummy; do
5086   IFS=$ac_save_IFS
5087   test -z "$ac_dir" && ac_dir=.
5088   $as_executable_p "$ac_dir/$ac_word" || continue
5089 ac_cv_prog_ac_ct_AR="ar"
5090 echo "$as_me:5090: found $ac_dir/$ac_word" >&5
5091 break
5092 done
5093
5094   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5095 fi
5096 fi
5097 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5098 if test -n "$ac_ct_AR"; then
5099   echo "$as_me:5099: result: $ac_ct_AR" >&5
5100 echo "${ECHO_T}$ac_ct_AR" >&6
5101 else
5102   echo "$as_me:5102: result: no" >&5
5103 echo "${ECHO_T}no" >&6
5104 fi
5105
5106   AR=$ac_ct_AR
5107 else
5108   AR="$ac_cv_prog_AR"
5109 fi
5110
5111 echo "$as_me:5111: checking for options to update archives" >&5
5112 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5113 if test "${cf_cv_ar_flags+set}" = set; then
5114   echo $ECHO_N "(cached) $ECHO_C" >&6
5115 else
5116
5117         case "$cf_cv_system_name" in
5118         (*-msvc*)
5119                 cf_cv_ar_flags=''
5120                 cat >mk_static_lib.sh <<-EOF
5121                 #!$SHELL
5122                 MSVC_BIN="$AR"
5123                 out="\$1"
5124                 shift
5125                 exec \$MSVC_BIN -out:"\$out" \$@
5126                 EOF
5127                 chmod +x mk_static_lib.sh
5128                 AR=`pwd`/mk_static_lib.sh
5129                 ;;
5130         (*)
5131                 cf_cv_ar_flags=unknown
5132                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5133                 do
5134
5135                         # check if $ARFLAGS already contains this choice
5136                         if test "x$ARFLAGS" != "x" ; then
5137                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5138                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5139                                         cf_cv_ar_flags=
5140                                         break
5141                                 fi
5142                         fi
5143
5144                         rm -f "conftest.$ac_cv_objext"
5145                         rm -f conftest.a
5146
5147                         cat >"conftest.$ac_ext" <<EOF
5148 #line 5148 "configure"
5149 int     testdata[3] = { 123, 456, 789 };
5150 EOF
5151                         if { (eval echo "$as_me:5151: \"$ac_compile\"") >&5
5152   (eval $ac_compile) 2>&5
5153   ac_status=$?
5154   echo "$as_me:5154: \$? = $ac_status" >&5
5155   (exit "$ac_status"); } ; then
5156                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5157                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5158                                 if test -f conftest.a ; then
5159                                         cf_cv_ar_flags="$cf_ar_flags"
5160                                         break
5161                                 fi
5162                         else
5163                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5164
5165 echo "${as_me:-configure}:5165: testing cannot compile test-program ..." 1>&5
5166
5167                                 break
5168                         fi
5169                 done
5170                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5171                 ;;
5172         esac
5173
5174 fi
5175 echo "$as_me:5175: result: $cf_cv_ar_flags" >&5
5176 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5177
5178 if test -n "$ARFLAGS" ; then
5179         if test -n "$cf_cv_ar_flags" ; then
5180                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5181         fi
5182 else
5183         ARFLAGS=$cf_cv_ar_flags
5184 fi
5185
5186 echo "$as_me:5186: checking for an installation directory prefix" >&5
5187 echo $ECHO_N "checking for an installation directory prefix... $ECHO_C" >&6
5188
5189 # Check whether --with-install-prefix or --without-install-prefix was given.
5190 if test "${with_install_prefix+set}" = set; then
5191   withval="$with_install_prefix"
5192   case "x$withval" in
5193         (xyes|xno)
5194                 ;;
5195         (*)     DESTDIR="$withval"
5196                 ;;
5197         esac
5198 fi;
5199 echo "$as_me:5199: result: ${DESTDIR:-(none)}" >&5
5200 echo "${ECHO_T}${DESTDIR:-(none)}" >&6
5201
5202 ###############################################################################
5203
5204 # If we're cross-compiling, allow the user to override the tools and their
5205 # options.  The configure script is oriented toward identifying the host
5206 # compiler, etc., but we need a build compiler to generate parts of the source.
5207
5208 case "$cf_cv_system_name" in
5209 (*-msvc*)
5210         LDFLAGS="$LDFLAGS user32.lib"
5211         export LDFLAGS
5212         ;;
5213 esac
5214
5215 if test "$cross_compiling" = yes ; then
5216
5217         # defaults that we might want to override
5218         : ${BUILD_CFLAGS:=''}
5219         : ${BUILD_CPPFLAGS:=''}
5220         : ${BUILD_LDFLAGS:=''}
5221         : ${BUILD_LIBS:=''}
5222         : ${BUILD_EXEEXT:='$x'}
5223         : ${BUILD_OBJEXT:='o'}
5224
5225 # Check whether --with-build-cc or --without-build-cc was given.
5226 if test "${with_build_cc+set}" = set; then
5227   withval="$with_build_cc"
5228   BUILD_CC="$withval"
5229 else
5230   for ac_prog in gcc clang c99 c89 cc cl
5231 do
5232   # Extract the first word of "$ac_prog", so it can be a program name with args.
5233 set dummy $ac_prog; ac_word=$2
5234 echo "$as_me:5234: checking for $ac_word" >&5
5235 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5236 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5237   echo $ECHO_N "(cached) $ECHO_C" >&6
5238 else
5239   if test -n "$BUILD_CC"; then
5240   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5241 else
5242   ac_save_IFS=$IFS; IFS=$ac_path_separator
5243 ac_dummy="$PATH"
5244 for ac_dir in $ac_dummy; do
5245   IFS=$ac_save_IFS
5246   test -z "$ac_dir" && ac_dir=.
5247   $as_executable_p "$ac_dir/$ac_word" || continue
5248 ac_cv_prog_BUILD_CC="$ac_prog"
5249 echo "$as_me:5249: found $ac_dir/$ac_word" >&5
5250 break
5251 done
5252
5253 fi
5254 fi
5255 BUILD_CC=$ac_cv_prog_BUILD_CC
5256 if test -n "$BUILD_CC"; then
5257   echo "$as_me:5257: result: $BUILD_CC" >&5
5258 echo "${ECHO_T}$BUILD_CC" >&6
5259 else
5260   echo "$as_me:5260: result: no" >&5
5261 echo "${ECHO_T}no" >&6
5262 fi
5263
5264   test -n "$BUILD_CC" && break
5265 done
5266 test -n "$BUILD_CC" || BUILD_CC="none"
5267
5268 fi;
5269         echo "$as_me:5269: checking for native build C compiler" >&5
5270 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5271         echo "$as_me:5271: result: $BUILD_CC" >&5
5272 echo "${ECHO_T}$BUILD_CC" >&6
5273
5274         echo "$as_me:5274: checking for native build C preprocessor" >&5
5275 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5276
5277 # Check whether --with-build-cpp or --without-build-cpp was given.
5278 if test "${with_build_cpp+set}" = set; then
5279   withval="$with_build_cpp"
5280   BUILD_CPP="$withval"
5281 else
5282   BUILD_CPP='${BUILD_CC} -E'
5283 fi;
5284         echo "$as_me:5284: result: $BUILD_CPP" >&5
5285 echo "${ECHO_T}$BUILD_CPP" >&6
5286
5287         echo "$as_me:5287: checking for native build C flags" >&5
5288 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5289
5290 # Check whether --with-build-cflags or --without-build-cflags was given.
5291 if test "${with_build_cflags+set}" = set; then
5292   withval="$with_build_cflags"
5293   BUILD_CFLAGS="$withval"
5294 fi;
5295         echo "$as_me:5295: result: $BUILD_CFLAGS" >&5
5296 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5297
5298         echo "$as_me:5298: checking for native build C preprocessor-flags" >&5
5299 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5300
5301 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5302 if test "${with_build_cppflags+set}" = set; then
5303   withval="$with_build_cppflags"
5304   BUILD_CPPFLAGS="$withval"
5305 fi;
5306         echo "$as_me:5306: result: $BUILD_CPPFLAGS" >&5
5307 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5308
5309         echo "$as_me:5309: checking for native build linker-flags" >&5
5310 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5311
5312 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5313 if test "${with_build_ldflags+set}" = set; then
5314   withval="$with_build_ldflags"
5315   BUILD_LDFLAGS="$withval"
5316 fi;
5317         echo "$as_me:5317: result: $BUILD_LDFLAGS" >&5
5318 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5319
5320         echo "$as_me:5320: checking for native build linker-libraries" >&5
5321 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5322
5323 # Check whether --with-build-libs or --without-build-libs was given.
5324 if test "${with_build_libs+set}" = set; then
5325   withval="$with_build_libs"
5326   BUILD_LIBS="$withval"
5327 fi;
5328         echo "$as_me:5328: result: $BUILD_LIBS" >&5
5329 echo "${ECHO_T}$BUILD_LIBS" >&6
5330
5331         # this assumes we're on Unix.
5332         BUILD_EXEEXT=
5333         BUILD_OBJEXT=o
5334
5335         : ${BUILD_CC:='${CC}'}
5336
5337         echo "$as_me:5337: checking if the build-compiler \"$BUILD_CC\" works" >&5
5338 echo $ECHO_N "checking if the build-compiler \"$BUILD_CC\" works... $ECHO_C" >&6
5339
5340         cf_save_crossed=$cross_compiling
5341         cf_save_ac_link=$ac_link
5342         cross_compiling=no
5343         cf_build_cppflags=$BUILD_CPPFLAGS
5344         test "$cf_build_cppflags" = "#" && cf_build_cppflags=
5345         ac_link='$BUILD_CC -o "conftest$ac_exeext" $BUILD_CFLAGS $cf_build_cppflags $BUILD_LDFLAGS "conftest.$ac_ext" $BUILD_LIBS >&5'
5346
5347         if test "$cross_compiling" = yes; then
5348   cf_ok_build_cc=unknown
5349 else
5350   cat >"conftest.$ac_ext" <<_ACEOF
5351 #line 5351 "configure"
5352 #include "confdefs.h"
5353 #include <stdio.h>
5354                 int main(int argc, char *argv[])
5355                 {
5356                         ${cf_cv_main_return:-return}(argc < 0 || argv == 0 || argv[0] == 0);
5357                 }
5358
5359 _ACEOF
5360 rm -f "conftest$ac_exeext"
5361 if { (eval echo "$as_me:5361: \"$ac_link\"") >&5
5362   (eval $ac_link) 2>&5
5363   ac_status=$?
5364   echo "$as_me:5364: \$? = $ac_status" >&5
5365   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5366   { (eval echo "$as_me:5366: \"$ac_try\"") >&5
5367   (eval $ac_try) 2>&5
5368   ac_status=$?
5369   echo "$as_me:5369: \$? = $ac_status" >&5
5370   (exit "$ac_status"); }; }; then
5371   cf_ok_build_cc=yes
5372 else
5373   echo "$as_me: program exited with status $ac_status" >&5
5374 echo "$as_me: failed program was:" >&5
5375 cat "conftest.$ac_ext" >&5
5376 cf_ok_build_cc=no
5377 fi
5378 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5379 fi
5380
5381         cross_compiling=$cf_save_crossed
5382         ac_link=$cf_save_ac_link
5383
5384         echo "$as_me:5384: result: $cf_ok_build_cc" >&5
5385 echo "${ECHO_T}$cf_ok_build_cc" >&6
5386
5387         if test "$cf_ok_build_cc" != yes
5388         then
5389                 { { echo "$as_me:5389: error: Cross-build requires two compilers.
5390 Use --with-build-cc to specify the native compiler." >&5
5391 echo "$as_me: error: Cross-build requires two compilers.
5392 Use --with-build-cc to specify the native compiler." >&2;}
5393    { (exit 1); exit 1; }; }
5394         fi
5395
5396 else
5397         : ${BUILD_CC:='${CC}'}
5398         : ${BUILD_CPP:='${CPP}'}
5399         : ${BUILD_CFLAGS:='${CFLAGS}'}
5400         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5401         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5402         : ${BUILD_LIBS:='${LIBS}'}
5403         : ${BUILD_EXEEXT:='$x'}
5404         : ${BUILD_OBJEXT:='o'}
5405 fi
5406
5407 ###############################################################################
5408
5409 ### Options to allow the user to specify the set of libraries which are used.
5410 ### Use "--without-normal --with-shared" to allow the default model to be
5411 ### shared, for example.
5412 cf_list_models=""
5413
5414 echo "$as_me:5414: checking if libtool -version-number should be used" >&5
5415 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5416
5417 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5418 if test "${enable_libtool_version+set}" = set; then
5419   enableval="$enable_libtool_version"
5420   test "$enableval" != no && enableval=yes
5421         if test "$enableval" != "yes" ; then
5422     cf_libtool_version=no
5423         else
5424                 cf_libtool_version=yes
5425         fi
5426 else
5427   enableval=yes
5428         cf_libtool_version=yes
5429
5430 fi;
5431 echo "$as_me:5431: result: $cf_libtool_version" >&5
5432 echo "${ECHO_T}$cf_libtool_version" >&6
5433
5434 if test "$cf_libtool_version" = yes ; then
5435         LIBTOOL_VERSION="-version-number"
5436 else
5437         LIBTOOL_VERSION="-version-info"
5438         case "x$VERSION" in
5439         (x)
5440                 { echo "$as_me:5440: WARNING: VERSION was not set" >&5
5441 echo "$as_me: WARNING: VERSION was not set" >&2;}
5442                 ;;
5443         (x*.*.*)
5444                 ABI_VERSION="$VERSION"
5445                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5446
5447 echo "${as_me:-configure}:5447: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5448
5449                 ;;
5450         (x*:*:*)
5451                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5452                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5453
5454 echo "${as_me:-configure}:5454: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5455
5456                 ;;
5457         (*)
5458                 { echo "$as_me:5458: WARNING: unexpected VERSION value: $VERSION" >&5
5459 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5460                 ;;
5461         esac
5462 fi
5463
5464 LIBTOOL=
5465
5466 # common library maintenance symbols that are convenient for libtool scripts:
5467 LIB_CREATE='${AR} -cr'
5468 LIB_OBJECT='${OBJECTS}'
5469 LIB_SUFFIX=.a
5470 LIB_PREP="$RANLIB"
5471
5472 # symbols used to prop libtool up to enable it to determine what it should be
5473 # doing:
5474 LIB_CLEAN=
5475 LIB_COMPILE=
5476 LIB_LINK='${CC}'
5477 LIB_INSTALL=
5478 LIB_UNINSTALL=
5479
5480 echo "$as_me:5480: checking if you want to build libraries with libtool" >&5
5481 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5482
5483 # Check whether --with-libtool or --without-libtool was given.
5484 if test "${with_libtool+set}" = set; then
5485   withval="$with_libtool"
5486   with_libtool=$withval
5487 else
5488   with_libtool=no
5489 fi;
5490 echo "$as_me:5490: result: $with_libtool" >&5
5491 echo "${ECHO_T}$with_libtool" >&6
5492 if test "$with_libtool" != "no"; then
5493
5494         if test "$with_libtool" != "yes" ; then
5495
5496 if test "x$prefix" != xNONE; then
5497         cf_path_syntax="$prefix"
5498 else
5499         cf_path_syntax="$ac_default_prefix"
5500 fi
5501
5502 case ".$with_libtool" in
5503 (.\$\(*\)*|.\'*\'*)
5504         ;;
5505 (..|./*|.\\*)
5506         ;;
5507 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5508         ;;
5509 (.\$\{*prefix\}*|.\$\{*dir\}*)
5510         eval with_libtool="$with_libtool"
5511         case ".$with_libtool" in
5512         (.NONE/*)
5513                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5514                 ;;
5515         esac
5516         ;;
5517 (.no|.NONE/*)
5518         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5519         ;;
5520 (*)
5521         { { echo "$as_me:5521: error: expected a pathname, not \"$with_libtool\"" >&5
5522 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5523    { (exit 1); exit 1; }; }
5524         ;;
5525 esac
5526
5527                 LIBTOOL=$with_libtool
5528         else
5529                 if test -n "$ac_tool_prefix"; then
5530   for ac_prog in libtool glibtool
5531   do
5532     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5533 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5534 echo "$as_me:5534: checking for $ac_word" >&5
5535 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5536 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5537   echo $ECHO_N "(cached) $ECHO_C" >&6
5538 else
5539   if test -n "$LIBTOOL"; then
5540   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5541 else
5542   ac_save_IFS=$IFS; IFS=$ac_path_separator
5543 ac_dummy="$PATH"
5544 for ac_dir in $ac_dummy; do
5545   IFS=$ac_save_IFS
5546   test -z "$ac_dir" && ac_dir=.
5547   $as_executable_p "$ac_dir/$ac_word" || continue
5548 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5549 echo "$as_me:5549: found $ac_dir/$ac_word" >&5
5550 break
5551 done
5552
5553 fi
5554 fi
5555 LIBTOOL=$ac_cv_prog_LIBTOOL
5556 if test -n "$LIBTOOL"; then
5557   echo "$as_me:5557: result: $LIBTOOL" >&5
5558 echo "${ECHO_T}$LIBTOOL" >&6
5559 else
5560   echo "$as_me:5560: result: no" >&5
5561 echo "${ECHO_T}no" >&6
5562 fi
5563
5564     test -n "$LIBTOOL" && break
5565   done
5566 fi
5567 if test -z "$LIBTOOL"; then
5568   ac_ct_LIBTOOL=$LIBTOOL
5569   for ac_prog in libtool glibtool
5570 do
5571   # Extract the first word of "$ac_prog", so it can be a program name with args.
5572 set dummy $ac_prog; ac_word=$2
5573 echo "$as_me:5573: checking for $ac_word" >&5
5574 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5575 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5576   echo $ECHO_N "(cached) $ECHO_C" >&6
5577 else
5578   if test -n "$ac_ct_LIBTOOL"; then
5579   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5580 else
5581   ac_save_IFS=$IFS; IFS=$ac_path_separator
5582 ac_dummy="$PATH"
5583 for ac_dir in $ac_dummy; do
5584   IFS=$ac_save_IFS
5585   test -z "$ac_dir" && ac_dir=.
5586   $as_executable_p "$ac_dir/$ac_word" || continue
5587 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5588 echo "$as_me:5588: found $ac_dir/$ac_word" >&5
5589 break
5590 done
5591
5592 fi
5593 fi
5594 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5595 if test -n "$ac_ct_LIBTOOL"; then
5596   echo "$as_me:5596: result: $ac_ct_LIBTOOL" >&5
5597 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5598 else
5599   echo "$as_me:5599: result: no" >&5
5600 echo "${ECHO_T}no" >&6
5601 fi
5602
5603   test -n "$ac_ct_LIBTOOL" && break
5604 done
5605 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5606
5607   LIBTOOL=$ac_ct_LIBTOOL
5608 fi
5609
5610 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5611 then
5612         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.].*//'`
5613 else
5614         cf_cv_libtool_version=
5615 fi
5616 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5617
5618                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5619                 then
5620
5621 unset ac_cv_prog_ac_ct_LIBTOOL
5622 unset ac_ct_LIBTOOL
5623 unset LIBTOOL
5624
5625                         if test -n "$ac_tool_prefix"; then
5626   for ac_prog in glibtool
5627   do
5628     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5629 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5630 echo "$as_me:5630: checking for $ac_word" >&5
5631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5632 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5633   echo $ECHO_N "(cached) $ECHO_C" >&6
5634 else
5635   if test -n "$LIBTOOL"; then
5636   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5637 else
5638   ac_save_IFS=$IFS; IFS=$ac_path_separator
5639 ac_dummy="$PATH"
5640 for ac_dir in $ac_dummy; do
5641   IFS=$ac_save_IFS
5642   test -z "$ac_dir" && ac_dir=.
5643   $as_executable_p "$ac_dir/$ac_word" || continue
5644 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5645 echo "$as_me:5645: found $ac_dir/$ac_word" >&5
5646 break
5647 done
5648
5649 fi
5650 fi
5651 LIBTOOL=$ac_cv_prog_LIBTOOL
5652 if test -n "$LIBTOOL"; then
5653   echo "$as_me:5653: result: $LIBTOOL" >&5
5654 echo "${ECHO_T}$LIBTOOL" >&6
5655 else
5656   echo "$as_me:5656: result: no" >&5
5657 echo "${ECHO_T}no" >&6
5658 fi
5659
5660     test -n "$LIBTOOL" && break
5661   done
5662 fi
5663 if test -z "$LIBTOOL"; then
5664   ac_ct_LIBTOOL=$LIBTOOL
5665   for ac_prog in glibtool
5666 do
5667   # Extract the first word of "$ac_prog", so it can be a program name with args.
5668 set dummy $ac_prog; ac_word=$2
5669 echo "$as_me:5669: checking for $ac_word" >&5
5670 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5671 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5672   echo $ECHO_N "(cached) $ECHO_C" >&6
5673 else
5674   if test -n "$ac_ct_LIBTOOL"; then
5675   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5676 else
5677   ac_save_IFS=$IFS; IFS=$ac_path_separator
5678 ac_dummy="$PATH"
5679 for ac_dir in $ac_dummy; do
5680   IFS=$ac_save_IFS
5681   test -z "$ac_dir" && ac_dir=.
5682   $as_executable_p "$ac_dir/$ac_word" || continue
5683 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5684 echo "$as_me:5684: found $ac_dir/$ac_word" >&5
5685 break
5686 done
5687
5688 fi
5689 fi
5690 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5691 if test -n "$ac_ct_LIBTOOL"; then
5692   echo "$as_me:5692: result: $ac_ct_LIBTOOL" >&5
5693 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5694 else
5695   echo "$as_me:5695: result: no" >&5
5696 echo "${ECHO_T}no" >&6
5697 fi
5698
5699   test -n "$ac_ct_LIBTOOL" && break
5700 done
5701 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5702
5703   LIBTOOL=$ac_ct_LIBTOOL
5704 fi
5705
5706 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5707 then
5708         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.].*//'`
5709 else
5710         cf_cv_libtool_version=
5711 fi
5712 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5713
5714                 fi
5715         fi
5716         if test -z "$LIBTOOL" ; then
5717                 { { echo "$as_me:5717: error: Cannot find libtool" >&5
5718 echo "$as_me: error: Cannot find libtool" >&2;}
5719    { (exit 1); exit 1; }; }
5720         fi
5721         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5722         LIB_OBJECT='${OBJECTS:.o=.lo}'
5723         LIB_SUFFIX=.la
5724         LIB_CLEAN='${LIBTOOL} --mode=clean'
5725         LIB_COMPILE='${LIBTOOL} --mode=compile'
5726         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5727         LIB_INSTALL='${LIBTOOL} --mode=install'
5728         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5729         LIB_PREP=:
5730
5731 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5732 then
5733         echo "$as_me:5733: checking version of $LIBTOOL" >&5
5734 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5735
5736 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5737 then
5738         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.].*//'`
5739 else
5740         cf_cv_libtool_version=
5741 fi
5742 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5743
5744         echo "$as_me:5744: result: $cf_cv_libtool_version" >&5
5745 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5746         if test -n "$cf_cv_libtool_version"
5747         then
5748                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5749                 case "x$cf_check_libtool_version" in
5750                 (*...GNU-libtool...*)
5751                         ;;
5752                 (*)
5753                         { { echo "$as_me:5753: error: This is not GNU libtool" >&5
5754 echo "$as_me: error: This is not GNU libtool" >&2;}
5755    { (exit 1); exit 1; }; }
5756                         ;;
5757                 esac
5758         else
5759                 { { echo "$as_me:5759: error: No version found for $LIBTOOL" >&5
5760 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5761    { (exit 1); exit 1; }; }
5762         fi
5763 else
5764         { { echo "$as_me:5764: error: GNU libtool has not been found" >&5
5765 echo "$as_me: error: GNU libtool has not been found" >&2;}
5766    { (exit 1); exit 1; }; }
5767 fi
5768
5769         # special hack to add -no-undefined (which libtool should do for itself)
5770         LT_UNDEF=
5771         case "$cf_cv_system_name" in
5772         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5773                 LT_UNDEF=-no-undefined
5774                 ;;
5775         esac
5776
5777         # special hack to add --tag option for C++ compiler
5778         case "$cf_cv_libtool_version" in
5779         (1.[5-9]*|[2-9].[0-9.a-z]*)
5780                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5781                 LIBTOOL="$LIBTOOL --tag=CC"
5782                 ;;
5783         (*)
5784                 LIBTOOL_CXX="$LIBTOOL"
5785                 ;;
5786         esac
5787 else
5788         LIBTOOL=""
5789         LIBTOOL_CXX=""
5790 fi
5791
5792 test -z "$LIBTOOL" && ECHO_LT=
5793
5794 if test "$with_libtool" != "no" ; then
5795
5796 cf_list_models="$cf_list_models libtool"
5797
5798 else
5799
5800 echo "$as_me:5800: checking if you want to build shared libraries" >&5
5801 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5802
5803 # Check whether --with-shared or --without-shared was given.
5804 if test "${with_shared+set}" = set; then
5805   withval="$with_shared"
5806   with_shared=$withval
5807 else
5808   with_shared=no
5809 fi;
5810 echo "$as_me:5810: result: $with_shared" >&5
5811 echo "${ECHO_T}$with_shared" >&6
5812 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5813
5814 echo "$as_me:5814: checking if you want to build static libraries" >&5
5815 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5816
5817 # Check whether --with-normal or --without-normal was given.
5818 if test "${with_normal+set}" = set; then
5819   withval="$with_normal"
5820   with_normal=$withval
5821 else
5822   with_normal=yes
5823 fi;
5824 echo "$as_me:5824: result: $with_normal" >&5
5825 echo "${ECHO_T}$with_normal" >&6
5826 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5827
5828 echo "$as_me:5828: checking if you want to build debug libraries" >&5
5829 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5830
5831 # Check whether --with-debug or --without-debug was given.
5832 if test "${with_debug+set}" = set; then
5833   withval="$with_debug"
5834   with_debug=$withval
5835 else
5836   with_debug=yes
5837 fi;
5838 echo "$as_me:5838: result: $with_debug" >&5
5839 echo "${ECHO_T}$with_debug" >&6
5840 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5841
5842 echo "$as_me:5842: checking if you want to build profiling libraries" >&5
5843 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5844
5845 # Check whether --with-profile or --without-profile was given.
5846 if test "${with_profile+set}" = set; then
5847   withval="$with_profile"
5848   with_profile=$withval
5849 else
5850   with_profile=no
5851 fi;
5852 echo "$as_me:5852: result: $with_profile" >&5
5853 echo "${ECHO_T}$with_profile" >&6
5854 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5855
5856 fi
5857
5858 if test "X$cf_with_cxx_binding" != Xno; then
5859 if test "x$with_shared" = "xyes"; then
5860 echo "$as_me:5860: checking if you want to build C++ shared libraries" >&5
5861 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5862
5863 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5864 if test "${with_cxx_shared+set}" = set; then
5865   withval="$with_cxx_shared"
5866   with_shared_cxx=$withval
5867 else
5868   with_shared_cxx=no
5869 fi;
5870 echo "$as_me:5870: result: $with_shared_cxx" >&5
5871 echo "${ECHO_T}$with_shared_cxx" >&6
5872 fi
5873 fi
5874
5875 ###############################################################################
5876
5877 echo "$as_me:5877: checking for specified models" >&5
5878 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5879 test -z "$cf_list_models" && cf_list_models=normal
5880 test "$with_libtool" != "no" && cf_list_models=libtool
5881 echo "$as_me:5881: result: $cf_list_models" >&5
5882 echo "${ECHO_T}$cf_list_models" >&6
5883
5884 ### Use the first model as the default, and save its suffix for use in building
5885 ### up test-applications.
5886 echo "$as_me:5886: checking for default model" >&5
5887 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5888 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5889 echo "$as_me:5889: result: $DFT_LWR_MODEL" >&5
5890 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5891
5892 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5893
5894 TICS_NAME=tic
5895
5896 TINFO_NAME=tinfo
5897
5898 LIB_NAME=ncurses
5899
5900 LIB_DIR=../lib
5901 LIB_2ND=../../lib
5902
5903 echo "$as_me:5903: checking if you want to have a library-prefix" >&5
5904 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5905
5906 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5907 if test "${with_lib_prefix+set}" = set; then
5908   withval="$with_lib_prefix"
5909   with_lib_prefix=$withval
5910 else
5911   with_lib_prefix=auto
5912 fi;
5913 echo "$as_me:5913: result: $with_lib_prefix" >&5
5914 echo "${ECHO_T}$with_lib_prefix" >&6
5915
5916 if test "$with_lib_prefix" = auto
5917 then
5918
5919         case "$cf_cv_system_name" in
5920         (OS/2*|os2*)
5921                 if test "$DFT_LWR_MODEL" = libtool; then
5922                         LIB_PREFIX='lib'
5923                 else
5924                         LIB_PREFIX=''
5925                 fi
5926                 ;;
5927         (*-msvc*)
5928                 LIB_PREFIX=''
5929                 ;;
5930         (*)     LIB_PREFIX='lib'
5931                 ;;
5932         esac
5933 cf_prefix=$LIB_PREFIX
5934
5935 elif test "$with_lib_prefix" = no
5936 then
5937         LIB_PREFIX=
5938 else
5939         LIB_PREFIX=$with_lib_prefix
5940 fi
5941
5942 LIB_SUFFIX=
5943
5944         echo "$as_me:5944: checking for PATH separator" >&5
5945 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5946         case "$cf_cv_system_name" in
5947         (os2*)  PATH_SEPARATOR=';'  ;;
5948         (*)     ${PATH_SEPARATOR:=':'}  ;;
5949         esac
5950
5951         echo "$as_me:5951: result: $PATH_SEPARATOR" >&5
5952 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5953
5954 # headers needed for checks...
5955 echo "$as_me:5955: checking for ANSI C header files" >&5
5956 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5957 if test "${ac_cv_header_stdc+set}" = set; then
5958   echo $ECHO_N "(cached) $ECHO_C" >&6
5959 else
5960   cat >"conftest.$ac_ext" <<_ACEOF
5961 #line 5961 "configure"
5962 #include "confdefs.h"
5963 #include <stdlib.h>
5964 #include <stdarg.h>
5965 #include <string.h>
5966 #include <float.h>
5967
5968 _ACEOF
5969 if { (eval echo "$as_me:5969: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5970   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5971   ac_status=$?
5972   $EGREP -v '^ *\+' conftest.er1 >conftest.err
5973   rm -f conftest.er1
5974   cat conftest.err >&5
5975   echo "$as_me:5975: \$? = $ac_status" >&5
5976   (exit "$ac_status"); } >/dev/null; then
5977   if test -s conftest.err; then
5978     ac_cpp_err=$ac_c_preproc_warn_flag
5979   else
5980     ac_cpp_err=
5981   fi
5982 else
5983   ac_cpp_err=yes
5984 fi
5985 if test -z "$ac_cpp_err"; then
5986   ac_cv_header_stdc=yes
5987 else
5988   echo "$as_me: failed program was:" >&5
5989   cat "conftest.$ac_ext" >&5
5990   ac_cv_header_stdc=no
5991 fi
5992 rm -f conftest.err "conftest.$ac_ext"
5993
5994 if test $ac_cv_header_stdc = yes; then
5995   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5996   cat >"conftest.$ac_ext" <<_ACEOF
5997 #line 5997 "configure"
5998 #include "confdefs.h"
5999 #include <string.h>
6000
6001 _ACEOF
6002 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6003   $EGREP "memchr" >/dev/null 2>&1; then
6004   :
6005 else
6006   ac_cv_header_stdc=no
6007 fi
6008 rm -rf conftest*
6009
6010 fi
6011
6012 if test $ac_cv_header_stdc = yes; then
6013   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6014   cat >"conftest.$ac_ext" <<_ACEOF
6015 #line 6015 "configure"
6016 #include "confdefs.h"
6017 #include <stdlib.h>
6018
6019 _ACEOF
6020 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6021   $EGREP "free" >/dev/null 2>&1; then
6022   :
6023 else
6024   ac_cv_header_stdc=no
6025 fi
6026 rm -rf conftest*
6027
6028 fi
6029
6030 if test $ac_cv_header_stdc = yes; then
6031   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6032   if test "$cross_compiling" = yes; then
6033   :
6034 else
6035   cat >"conftest.$ac_ext" <<_ACEOF
6036 #line 6036 "configure"
6037 #include "confdefs.h"
6038 #include <ctype.h>
6039 #if ((' ' & 0x0FF) == 0x020)
6040 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6041 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6042 #else
6043 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
6044                      || ('j' <= (c) && (c) <= 'r') \
6045                      || ('s' <= (c) && (c) <= 'z'))
6046 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6047 #endif
6048
6049 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6050 int
6051 main (void)
6052 {
6053   int i;
6054   for (i = 0; i < 256; i++)
6055     if (XOR (islower (i), ISLOWER (i))
6056         || toupper (i) != TOUPPER (i))
6057       $ac_main_return(2);
6058   $ac_main_return (0);
6059 }
6060 _ACEOF
6061 rm -f "conftest$ac_exeext"
6062 if { (eval echo "$as_me:6062: \"$ac_link\"") >&5
6063   (eval $ac_link) 2>&5
6064   ac_status=$?
6065   echo "$as_me:6065: \$? = $ac_status" >&5
6066   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6067   { (eval echo "$as_me:6067: \"$ac_try\"") >&5
6068   (eval $ac_try) 2>&5
6069   ac_status=$?
6070   echo "$as_me:6070: \$? = $ac_status" >&5
6071   (exit "$ac_status"); }; }; then
6072   :
6073 else
6074   echo "$as_me: program exited with status $ac_status" >&5
6075 echo "$as_me: failed program was:" >&5
6076 cat "conftest.$ac_ext" >&5
6077 ac_cv_header_stdc=no
6078 fi
6079 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6080 fi
6081 fi
6082 fi
6083 echo "$as_me:6083: result: $ac_cv_header_stdc" >&5
6084 echo "${ECHO_T}$ac_cv_header_stdc" >&6
6085 if test $ac_cv_header_stdc = yes; then
6086
6087 cat >>confdefs.h <<\EOF
6088 #define STDC_HEADERS 1
6089 EOF
6090
6091 fi
6092
6093 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6094
6095 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6096                   inttypes.h stdint.h unistd.h
6097 do
6098 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6099 echo "$as_me:6099: checking for $ac_header" >&5
6100 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6101 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6102   echo $ECHO_N "(cached) $ECHO_C" >&6
6103 else
6104   cat >"conftest.$ac_ext" <<_ACEOF
6105 #line 6105 "configure"
6106 #include "confdefs.h"
6107 $ac_includes_default
6108 #include <$ac_header>
6109 _ACEOF
6110 rm -f "conftest.$ac_objext"
6111 if { (eval echo "$as_me:6111: \"$ac_compile\"") >&5
6112   (eval $ac_compile) 2>&5
6113   ac_status=$?
6114   echo "$as_me:6114: \$? = $ac_status" >&5
6115   (exit "$ac_status"); } &&
6116          { ac_try='test -s "conftest.$ac_objext"'
6117   { (eval echo "$as_me:6117: \"$ac_try\"") >&5
6118   (eval $ac_try) 2>&5
6119   ac_status=$?
6120   echo "$as_me:6120: \$? = $ac_status" >&5
6121   (exit "$ac_status"); }; }; then
6122   eval "$as_ac_Header=yes"
6123 else
6124   echo "$as_me: failed program was:" >&5
6125 cat "conftest.$ac_ext" >&5
6126 eval "$as_ac_Header=no"
6127 fi
6128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6129 fi
6130 echo "$as_me:6130: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6131 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6132 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6133   cat >>confdefs.h <<EOF
6134 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6135 EOF
6136
6137 fi
6138 done
6139
6140 echo "$as_me:6140: checking whether exit is declared" >&5
6141 echo $ECHO_N "checking whether exit is declared... $ECHO_C" >&6
6142 if test "${ac_cv_have_decl_exit+set}" = set; then
6143   echo $ECHO_N "(cached) $ECHO_C" >&6
6144 else
6145   cat >"conftest.$ac_ext" <<_ACEOF
6146 #line 6146 "configure"
6147 #include "confdefs.h"
6148 $ac_includes_default
6149 int
6150 main (void)
6151 {
6152 #ifndef exit
6153   char *p = (char *) exit; (void) p;
6154 #endif
6155
6156   ;
6157   return 0;
6158 }
6159 _ACEOF
6160 rm -f "conftest.$ac_objext"
6161 if { (eval echo "$as_me:6161: \"$ac_compile\"") >&5
6162   (eval $ac_compile) 2>&5
6163   ac_status=$?
6164   echo "$as_me:6164: \$? = $ac_status" >&5
6165   (exit "$ac_status"); } &&
6166          { ac_try='test -s "conftest.$ac_objext"'
6167   { (eval echo "$as_me:6167: \"$ac_try\"") >&5
6168   (eval $ac_try) 2>&5
6169   ac_status=$?
6170   echo "$as_me:6170: \$? = $ac_status" >&5
6171   (exit "$ac_status"); }; }; then
6172   ac_cv_have_decl_exit=yes
6173 else
6174   echo "$as_me: failed program was:" >&5
6175 cat "conftest.$ac_ext" >&5
6176 ac_cv_have_decl_exit=no
6177 fi
6178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6179 fi
6180 echo "$as_me:6180: result: $ac_cv_have_decl_exit" >&5
6181 echo "${ECHO_T}$ac_cv_have_decl_exit" >&6
6182
6183 ac_header_dirent=no
6184 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
6185   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6186 echo "$as_me:6186: checking for $ac_hdr that defines DIR" >&5
6187 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
6188 if eval "test \"\${$as_ac_Header+set}\" = set"; then
6189   echo $ECHO_N "(cached) $ECHO_C" >&6
6190 else
6191   cat >"conftest.$ac_ext" <<_ACEOF
6192 #line 6192 "configure"
6193 #include "confdefs.h"
6194 #include <sys/types.h>
6195 #include <$ac_hdr>
6196
6197 int
6198 main (void)
6199 {
6200 if ((DIR *) 0)
6201 return 0;
6202   ;
6203   return 0;
6204 }
6205 _ACEOF
6206 rm -f "conftest.$ac_objext"
6207 if { (eval echo "$as_me:6207: \"$ac_compile\"") >&5
6208   (eval $ac_compile) 2>&5
6209   ac_status=$?
6210   echo "$as_me:6210: \$? = $ac_status" >&5
6211   (exit "$ac_status"); } &&
6212          { ac_try='test -s "conftest.$ac_objext"'
6213   { (eval echo "$as_me:6213: \"$ac_try\"") >&5
6214   (eval $ac_try) 2>&5
6215   ac_status=$?
6216   echo "$as_me:6216: \$? = $ac_status" >&5
6217   (exit "$ac_status"); }; }; then
6218   eval "$as_ac_Header=yes"
6219 else
6220   echo "$as_me: failed program was:" >&5
6221 cat "conftest.$ac_ext" >&5
6222 eval "$as_ac_Header=no"
6223 fi
6224 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6225 fi
6226 echo "$as_me:6226: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6227 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6228 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6229   cat >>confdefs.h <<EOF
6230 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
6231 EOF
6232
6233 ac_header_dirent=$ac_hdr; break
6234 fi
6235
6236 done
6237 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6238 if test $ac_header_dirent = dirent.h; then
6239   echo "$as_me:6239: checking for opendir in -ldir" >&5
6240 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
6241 if test "${ac_cv_lib_dir_opendir+set}" = set; then
6242   echo $ECHO_N "(cached) $ECHO_C" >&6
6243 else
6244   ac_check_lib_save_LIBS=$LIBS
6245 LIBS="-ldir  $LIBS"
6246 cat >"conftest.$ac_ext" <<_ACEOF
6247 #line 6247 "configure"
6248 #include "confdefs.h"
6249
6250 /* Override any gcc2 internal prototype to avoid an error.  */
6251 #ifdef __cplusplus
6252 extern "C"
6253 #endif
6254 /* We use char because int might match the return type of a gcc2
6255    builtin and then its argument prototype would still apply.  */
6256 char opendir ();
6257 int
6258 main (void)
6259 {
6260 opendir ();
6261   ;
6262   return 0;
6263 }
6264 _ACEOF
6265 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6266 if { (eval echo "$as_me:6266: \"$ac_link\"") >&5
6267   (eval $ac_link) 2>&5
6268   ac_status=$?
6269   echo "$as_me:6269: \$? = $ac_status" >&5
6270   (exit "$ac_status"); } &&
6271          { ac_try='test -s "conftest$ac_exeext"'
6272   { (eval echo "$as_me:6272: \"$ac_try\"") >&5
6273   (eval $ac_try) 2>&5
6274   ac_status=$?
6275   echo "$as_me:6275: \$? = $ac_status" >&5
6276   (exit "$ac_status"); }; }; then
6277   ac_cv_lib_dir_opendir=yes
6278 else
6279   echo "$as_me: failed program was:" >&5
6280 cat "conftest.$ac_ext" >&5
6281 ac_cv_lib_dir_opendir=no
6282 fi
6283 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6284 LIBS=$ac_check_lib_save_LIBS
6285 fi
6286 echo "$as_me:6286: result: $ac_cv_lib_dir_opendir" >&5
6287 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
6288 if test "$ac_cv_lib_dir_opendir" = yes; then
6289   LIBS="$LIBS -ldir"
6290 fi
6291
6292 else
6293   echo "$as_me:6293: checking for opendir in -lx" >&5
6294 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
6295 if test "${ac_cv_lib_x_opendir+set}" = set; then
6296   echo $ECHO_N "(cached) $ECHO_C" >&6
6297 else
6298   ac_check_lib_save_LIBS=$LIBS
6299 LIBS="-lx  $LIBS"
6300 cat >"conftest.$ac_ext" <<_ACEOF
6301 #line 6301 "configure"
6302 #include "confdefs.h"
6303
6304 /* Override any gcc2 internal prototype to avoid an error.  */
6305 #ifdef __cplusplus
6306 extern "C"
6307 #endif
6308 /* We use char because int might match the return type of a gcc2
6309    builtin and then its argument prototype would still apply.  */
6310 char opendir ();
6311 int
6312 main (void)
6313 {
6314 opendir ();
6315   ;
6316   return 0;
6317 }
6318 _ACEOF
6319 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6320 if { (eval echo "$as_me:6320: \"$ac_link\"") >&5
6321   (eval $ac_link) 2>&5
6322   ac_status=$?
6323   echo "$as_me:6323: \$? = $ac_status" >&5
6324   (exit "$ac_status"); } &&
6325          { ac_try='test -s "conftest$ac_exeext"'
6326   { (eval echo "$as_me:6326: \"$ac_try\"") >&5
6327   (eval $ac_try) 2>&5
6328   ac_status=$?
6329   echo "$as_me:6329: \$? = $ac_status" >&5
6330   (exit "$ac_status"); }; }; then
6331   ac_cv_lib_x_opendir=yes
6332 else
6333   echo "$as_me: failed program was:" >&5
6334 cat "conftest.$ac_ext" >&5
6335 ac_cv_lib_x_opendir=no
6336 fi
6337 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6338 LIBS=$ac_check_lib_save_LIBS
6339 fi
6340 echo "$as_me:6340: result: $ac_cv_lib_x_opendir" >&5
6341 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
6342 if test "$ac_cv_lib_x_opendir" = yes; then
6343   LIBS="$LIBS -lx"
6344 fi
6345
6346 fi
6347
6348 ###############################################################################
6349
6350 echo "$as_me:6350: checking if you want to build a separate terminfo library" >&5
6351 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
6352
6353 # Check whether --with-termlib or --without-termlib was given.
6354 if test "${with_termlib+set}" = set; then
6355   withval="$with_termlib"
6356   with_termlib=$withval
6357 else
6358   with_termlib=no
6359 fi;
6360 echo "$as_me:6360: result: $with_termlib" >&5
6361 echo "${ECHO_T}$with_termlib" >&6
6362
6363 echo "$as_me:6363: checking if you want to build a separate tic library" >&5
6364 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
6365
6366 # Check whether --with-ticlib or --without-ticlib was given.
6367 if test "${with_ticlib+set}" = set; then
6368   withval="$with_ticlib"
6369   with_ticlib=$withval
6370 else
6371   with_ticlib=no
6372 fi;
6373 echo "$as_me:6373: result: $with_ticlib" >&5
6374 echo "${ECHO_T}$with_ticlib" >&6
6375
6376 if test X"$CC_G_OPT" = X"" ; then
6377         CC_G_OPT='-g'
6378         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
6379 fi
6380
6381 if test X"$CXX_G_OPT" = X"" ; then
6382         CXX_G_OPT='-g'
6383         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
6384 fi
6385
6386 echo "$as_me:6386: checking for default loader flags" >&5
6387 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
6388 case "$DFT_LWR_MODEL" in
6389 (libtool) LD_MODEL=''   ;;
6390 (normal)  LD_MODEL=''   ;;
6391 (debug)   LD_MODEL=$CC_G_OPT ;;
6392 (profile) LD_MODEL='-pg';;
6393 (shared)  LD_MODEL=''   ;;
6394 esac
6395 echo "$as_me:6395: result: ${LD_MODEL:-(none)}" >&5
6396 echo "${ECHO_T}${LD_MODEL:-(none)}" >&6
6397
6398 case "$DFT_LWR_MODEL" in
6399 (shared)
6400
6401 echo "$as_me:6401: checking if rpath option should be used" >&5
6402 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
6403
6404 # Check whether --enable-rpath or --disable-rpath was given.
6405 if test "${enable_rpath+set}" = set; then
6406   enableval="$enable_rpath"
6407   cf_cv_enable_rpath=$enableval
6408 else
6409   cf_cv_enable_rpath=no
6410 fi;
6411 echo "$as_me:6411: result: $cf_cv_enable_rpath" >&5
6412 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
6413
6414 echo "$as_me:6414: checking if shared libraries should be relinked during install" >&5
6415 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
6416
6417 # Check whether --enable-relink or --disable-relink was given.
6418 if test "${enable_relink+set}" = set; then
6419   enableval="$enable_relink"
6420   cf_cv_do_relink=$enableval
6421 else
6422   cf_cv_do_relink=yes
6423 fi;
6424 echo "$as_me:6424: result: $cf_cv_do_relink" >&5
6425 echo "${ECHO_T}$cf_cv_do_relink" >&6
6426         ;;
6427 esac
6428
6429 # we will build libraries one-level down.
6430 rel_builddir=..
6431
6432 LD_RPATH_OPT=
6433 if test "x$cf_cv_enable_rpath" != xno
6434 then
6435         echo "$as_me:6435: checking for an rpath option" >&5
6436 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
6437         case "$cf_cv_system_name" in
6438         (irix*)
6439                 if test "$GCC" = yes; then
6440                         LD_RPATH_OPT="-Wl,-rpath,"
6441                 else
6442                         LD_RPATH_OPT="-rpath "
6443                 fi
6444                 ;;
6445         (linux*|gnu*|k*bsd*-gnu|freebsd*)
6446                 LD_RPATH_OPT="-Wl,-rpath,"
6447                 ;;
6448         (openbsd[2-9].*|mirbsd*)
6449                 LD_RPATH_OPT="-Wl,-rpath,"
6450                 ;;
6451         (dragonfly*)
6452                 LD_RPATH_OPT="-rpath "
6453                 ;;
6454         (netbsd*)
6455                 LD_RPATH_OPT="-Wl,-rpath,"
6456                 ;;
6457         (osf*|mls+*)
6458                 LD_RPATH_OPT="-rpath "
6459                 ;;
6460         (solaris2*)
6461                 LD_RPATH_OPT="-R"
6462                 ;;
6463         (*)
6464                 ;;
6465         esac
6466         echo "$as_me:6466: result: $LD_RPATH_OPT" >&5
6467 echo "${ECHO_T}$LD_RPATH_OPT" >&6
6468
6469         case "x$LD_RPATH_OPT" in
6470         (x-R*)
6471                 echo "$as_me:6471: checking if we need a space after rpath option" >&5
6472 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
6473                 cf_save_LIBS="$LIBS"
6474
6475 cf_add_libs="$LIBS"
6476 # reverse order
6477 cf_add_0lib=
6478 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6479 # filter duplicates
6480 for cf_add_1lib in $cf_add_0lib; do
6481         for cf_add_2lib in $cf_add_libs; do
6482                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6483                         cf_add_1lib=
6484                         break
6485                 fi
6486         done
6487         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6488 done
6489 LIBS="$cf_add_libs"
6490
6491                 cat >"conftest.$ac_ext" <<_ACEOF
6492 #line 6492 "configure"
6493 #include "confdefs.h"
6494
6495 int
6496 main (void)
6497 {
6498
6499   ;
6500   return 0;
6501 }
6502 _ACEOF
6503 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6504 if { (eval echo "$as_me:6504: \"$ac_link\"") >&5
6505   (eval $ac_link) 2>&5
6506   ac_status=$?
6507   echo "$as_me:6507: \$? = $ac_status" >&5
6508   (exit "$ac_status"); } &&
6509          { ac_try='test -s "conftest$ac_exeext"'
6510   { (eval echo "$as_me:6510: \"$ac_try\"") >&5
6511   (eval $ac_try) 2>&5
6512   ac_status=$?
6513   echo "$as_me:6513: \$? = $ac_status" >&5
6514   (exit "$ac_status"); }; }; then
6515   cf_rpath_space=no
6516 else
6517   echo "$as_me: failed program was:" >&5
6518 cat "conftest.$ac_ext" >&5
6519 cf_rpath_space=yes
6520 fi
6521 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6522                 LIBS="$cf_save_LIBS"
6523                 echo "$as_me:6523: result: $cf_rpath_space" >&5
6524 echo "${ECHO_T}$cf_rpath_space" >&6
6525                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6526                 ;;
6527         esac
6528 fi
6529
6530         RM_SHARED_OPTS=
6531         LOCAL_LDFLAGS=
6532         LOCAL_LDFLAGS2=
6533         LD_SHARED_OPTS=
6534         INSTALL_LIB="-m 644"
6535         : ${rel_builddir:=.}
6536
6537         shlibdir=$libdir
6538
6539         MAKE_DLLS="#"
6540
6541         cf_cv_do_symlinks=no
6542         cf_ld_rpath_opt=
6543         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6544
6545         echo "$as_me:6545: checking whether to use release or ABI version in shared library file names" >&5
6546 echo $ECHO_N "checking whether to use release or ABI version in shared library file names... $ECHO_C" >&6
6547
6548 # Check whether --with-shlib-version or --without-shlib-version was given.
6549 if test "${with_shlib_version+set}" = set; then
6550   withval="$with_shlib_version"
6551   test -z "$withval" && withval=auto
6552         case "$withval" in
6553         (yes)
6554                 cf_cv_shlib_version=auto
6555                 ;;
6556         (rel|abi|auto)
6557                 cf_cv_shlib_version=$withval
6558                 ;;
6559         (*)
6560                 echo "$as_me:6560: result: $withval" >&5
6561 echo "${ECHO_T}$withval" >&6
6562                 { { echo "$as_me:6562: error: option value must be one of: rel, abi, or auto" >&5
6563 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6564    { (exit 1); exit 1; }; }
6565                 ;;
6566         esac
6567
6568 else
6569   cf_cv_shlib_version=auto
6570 fi;
6571         echo "$as_me:6571: result: $cf_cv_shlib_version" >&5
6572 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6573
6574         cf_cv_rm_so_locs=no
6575         cf_try_cflags=
6576
6577         # Some less-capable ports of gcc support only -fpic
6578         CC_SHARED_OPTS=
6579
6580         cf_try_fPIC=no
6581         if test "$GCC" = yes
6582         then
6583                 cf_try_fPIC=yes
6584         else
6585                 case "$cf_cv_system_name" in
6586                 (*linux*)       # e.g., PGI compiler
6587                         cf_try_fPIC=yes
6588                         ;;
6589                 esac
6590         fi
6591
6592         if test "$cf_try_fPIC" = yes
6593         then
6594                 echo "$as_me:6594: checking which $CC option to use" >&5
6595 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6596                 cf_save_CFLAGS="$CFLAGS"
6597                 for CC_SHARED_OPTS in -fPIC -fpic ''
6598                 do
6599                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6600                         cat >"conftest.$ac_ext" <<_ACEOF
6601 #line 6601 "configure"
6602 #include "confdefs.h"
6603 #include <stdio.h>
6604 int
6605 main (void)
6606 {
6607 int x = 1
6608   ;
6609   return 0;
6610 }
6611 _ACEOF
6612 rm -f "conftest.$ac_objext"
6613 if { (eval echo "$as_me:6613: \"$ac_compile\"") >&5
6614   (eval $ac_compile) 2>&5
6615   ac_status=$?
6616   echo "$as_me:6616: \$? = $ac_status" >&5
6617   (exit "$ac_status"); } &&
6618          { ac_try='test -s "conftest.$ac_objext"'
6619   { (eval echo "$as_me:6619: \"$ac_try\"") >&5
6620   (eval $ac_try) 2>&5
6621   ac_status=$?
6622   echo "$as_me:6622: \$? = $ac_status" >&5
6623   (exit "$ac_status"); }; }; then
6624   break
6625 else
6626   echo "$as_me: failed program was:" >&5
6627 cat "conftest.$ac_ext" >&5
6628 fi
6629 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6630                 done
6631                 echo "$as_me:6631: result: $CC_SHARED_OPTS" >&5
6632 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6633                 CFLAGS="$cf_save_CFLAGS"
6634         fi
6635
6636         cf_cv_shlib_version_infix=no
6637
6638         case "$cf_cv_system_name" in
6639         (aix4.3-9*|aix[5-7]*)
6640                 if test "$GCC" = yes; then
6641                         CC_SHARED_OPTS='-Wl,-brtl'
6642                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6643                 else
6644                         CC_SHARED_OPTS='-brtl'
6645                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6646                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6647                 fi
6648                 ;;
6649         (beos*)
6650                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6651                 ;;
6652         (cygwin*)
6653                 CC_SHARED_OPTS=
6654                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6655                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6656                 cf_cv_shlib_version=cygdll
6657                 cf_cv_shlib_version_infix=cygdll
6658                 shlibdir=$bindir
6659                 MAKE_DLLS=
6660                 cat >mk_shared_lib.sh <<-CF_EOF
6661                 #!$SHELL
6662                 SHARED_LIB=\$1
6663                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6664                 shift
6665                 cat <<-EOF
6666                 Linking shared library
6667                 ** SHARED_LIB \$SHARED_LIB
6668                 ** IMPORT_LIB \$IMPORT_LIB
6669 EOF
6670                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6671 CF_EOF
6672                 chmod +x mk_shared_lib.sh
6673                 ;;
6674         (msys*)
6675                 CC_SHARED_OPTS=
6676                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6677                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6678                 cf_cv_shlib_version=msysdll
6679                 cf_cv_shlib_version_infix=msysdll
6680                 shlibdir=$bindir
6681                 MAKE_DLLS=
6682                 cat >mk_shared_lib.sh <<-CF_EOF
6683                 #!$SHELL
6684                 SHARED_LIB=\$1
6685                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6686                 shift
6687                 cat <<-EOF
6688                 Linking shared library
6689                 ** SHARED_LIB \$SHARED_LIB
6690                 ** IMPORT_LIB \$IMPORT_LIB
6691 EOF
6692                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6693 CF_EOF
6694                 chmod +x mk_shared_lib.sh
6695                 ;;
6696         (darwin*)
6697                 cf_try_cflags="no-cpp-precomp"
6698                 CC_SHARED_OPTS="-dynamic"
6699                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6700                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6701                 cf_cv_shlib_version_infix=yes
6702                 echo "$as_me:6702: checking if ld -search_paths_first works" >&5
6703 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6704 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6705   echo $ECHO_N "(cached) $ECHO_C" >&6
6706 else
6707
6708                         cf_save_LDFLAGS=$LDFLAGS
6709                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6710                         cat >"conftest.$ac_ext" <<_ACEOF
6711 #line 6711 "configure"
6712 #include "confdefs.h"
6713
6714 int
6715 main (void)
6716 {
6717 int i;
6718   ;
6719   return 0;
6720 }
6721 _ACEOF
6722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6723 if { (eval echo "$as_me:6723: \"$ac_link\"") >&5
6724   (eval $ac_link) 2>&5
6725   ac_status=$?
6726   echo "$as_me:6726: \$? = $ac_status" >&5
6727   (exit "$ac_status"); } &&
6728          { ac_try='test -s "conftest$ac_exeext"'
6729   { (eval echo "$as_me:6729: \"$ac_try\"") >&5
6730   (eval $ac_try) 2>&5
6731   ac_status=$?
6732   echo "$as_me:6732: \$? = $ac_status" >&5
6733   (exit "$ac_status"); }; }; then
6734   cf_cv_ldflags_search_paths_first=yes
6735 else
6736   echo "$as_me: failed program was:" >&5
6737 cat "conftest.$ac_ext" >&5
6738 cf_cv_ldflags_search_paths_first=no
6739 fi
6740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6741                                 LDFLAGS=$cf_save_LDFLAGS
6742 fi
6743 echo "$as_me:6743: result: $cf_cv_ldflags_search_paths_first" >&5
6744 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6745                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6746                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6747                 fi
6748                 ;;
6749         (haiku*)
6750
6751         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6752         if test "$cf_cv_shlib_version" = rel; then
6753                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6754         else
6755                 cf_cv_shared_soname='`basename $@`'
6756         fi
6757
6758                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6759                 ;;
6760         (hpux[7-8]*)
6761                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6762                 if test "$GCC" != yes; then
6763                         CC_SHARED_OPTS='+Z'
6764                 fi
6765                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6766                 INSTALL_LIB="-m 555"
6767                 ;;
6768         (hpux*)
6769                 # (tested with gcc 2.7.2 -- I don't have c89)
6770                 if test "$GCC" = yes; then
6771                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6772                 else
6773                         CC_SHARED_OPTS='+Z'
6774                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6775                 fi
6776                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6777                 # HP-UX shared libraries must be executable, and should be
6778                 # readonly to exploit a quirk in the memory manager.
6779                 INSTALL_LIB="-m 555"
6780                 ;;
6781         (interix*)
6782                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6783                 if test "$cf_cv_shlib_version" = rel; then
6784                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6785                 else
6786                         cf_shared_soname='`basename $@`'
6787                 fi
6788                 CC_SHARED_OPTS=
6789                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6790                 ;;
6791         (irix*)
6792                 if test "$cf_cv_enable_rpath" = yes ; then
6793                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6794                 fi
6795                 # tested with IRIX 5.2 and 'cc'.
6796                 if test "$GCC" != yes; then
6797                         CC_SHARED_OPTS='-KPIC'
6798                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6799                 else
6800                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6801                 fi
6802                 cf_cv_rm_so_locs=yes
6803                 ;;
6804         (linux*|gnu*|k*bsd*-gnu)
6805                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6806                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6807                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6808                 fi
6809                 if test "$cf_cv_enable_rpath" = yes ; then
6810                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6811                 fi
6812
6813         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6814         if test "$cf_cv_shlib_version" = rel; then
6815                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6816         else
6817                 cf_cv_shared_soname='`basename $@`'
6818         fi
6819
6820                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6821                 ;;
6822         (mingw*msvc*)
6823                 cf_cv_shlib_version=msvcdll
6824                 cf_cv_shlib_version_infix=msvcdll
6825                 shlibdir=$bindir
6826                 MAKE_DLLS=
6827                 if test "$DFT_LWR_MODEL" = "shared" ; then
6828                         LOCAL_LDFLAGS="-link -dll"
6829                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6830                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6831                 fi
6832                 CC_SHARED_OPTS=
6833                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6834                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6835                 cat >mk_shared_lib.sh <<-CF_EOF
6836                 #!$SHELL
6837                 SHARED_LIB=\$1
6838                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6839                 shift
6840                 my_ld=\$1
6841                 shift
6842                 cat <<-EOF
6843                 Linking shared library
6844                 ** SHARED LIB \$SHARED_LIB
6845                 ** IMPORT_LIB \$IMPORT_LIB
6846 EOF
6847                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6848                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6849                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6850 CF_EOF
6851                 chmod +x mk_shared_lib.sh
6852                 cat >mk_prog.sh <<-CF_EOF
6853                 #!$SHELL
6854                 shift
6855                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6856                 LD="$LD"
6857                 clopts=()
6858                 ldopts=("/subsystem:console")
6859                 libs=()
6860                 isdll=0
6861                 while test \$# -gt 0; do
6862                         case "\$1" in
6863                                 -link)
6864                                         # ignore -link argument
6865                                         ;;
6866                                 -M[TD] | -M[TD]d)
6867                                         # ignore runtime-library option
6868                                         ;;
6869                                 -dll)
6870                                         isdll=1
6871                                         ;;
6872                                 -W* | -w*)
6873                                         # ignore warnings
6874                                         ;;
6875                                 -D*)
6876                                         clopts+=("\$1")
6877                                         ;;
6878                                 -I*)
6879                                         clopts+=("\$1")
6880                                         ;;
6881                                 -l*)
6882                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6883                                         ;;
6884                                 -L*)
6885                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6886                                         ;;
6887                                 *.obj | *.o)
6888                                         ldopts+=("\$1")
6889                                         ;;
6890                                 -Wl,*)
6891                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6892                                                 ldopts+=("\${linkarg}")
6893                                         done
6894                                         ;;
6895                                 *.lib)
6896                                         ldopts+=("\$1")
6897                                         ;;
6898                                 -o)
6899                                         shift
6900                                         ldopts+=("-out:\$1")
6901                                         ;;
6902                                 *)
6903                                         clopts+=("\$1")
6904                                         ldopts+=("\$1")
6905                                         ;;
6906                         esac
6907                         shift
6908                 done
6909                 if [ "\$isdll" -ne 0 ]; then
6910                         for lib in \${libs[*]}; do
6911                                 ldopts+=("\$lib.dll.lib")
6912                         done
6913                 else
6914                         for lib in \${libs[*]}; do
6915                                 ldopts+=("\$lib.lib")
6916                         done
6917                 fi
6918                 cat <<-EOF
6919                 Creating program
6920                 ** ld options:   "\${ldopts[@]}"
6921 EOF
6922                 exec \$LD \${ldopts[@]}
6923 CF_EOF
6924                 chmod +x mk_prog.sh
6925                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6926                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6927                 ;;
6928         (mingw*)
6929                 cf_cv_shlib_version=mingw
6930                 cf_cv_shlib_version_infix=mingw
6931                 shlibdir=$bindir
6932                 MAKE_DLLS=
6933                 if test "$DFT_LWR_MODEL" = "shared" ; then
6934                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6935                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6936                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6937                 fi
6938                 CC_SHARED_OPTS=
6939                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6940                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6941                 cat >mk_shared_lib.sh <<-CF_EOF
6942                 #!$SHELL
6943                 SHARED_LIB=\$1
6944                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6945                 shift
6946                 cat <<-EOF
6947                 Linking shared library
6948                 ** SHARED_LIB \$SHARED_LIB
6949                 ** IMPORT_LIB \$IMPORT_LIB
6950 EOF
6951                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6952 CF_EOF
6953                 chmod +x mk_shared_lib.sh
6954                 ;;
6955         (openbsd[2-9].*|mirbsd*)
6956                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6957                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6958                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6959                 fi
6960                 if test "$cf_cv_enable_rpath" = yes ; then
6961                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6962                 fi
6963                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6964
6965         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6966         if test "$cf_cv_shlib_version" = rel; then
6967                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6968         else
6969                 cf_cv_shared_soname='`basename $@`'
6970         fi
6971
6972                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6973                 ;;
6974         (nskJ*)
6975                 CC_SHARED_OPTS=
6976                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6977                 ;;
6978         (nskL*)
6979                 CC_SHARED_OPTS=
6980                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6981                 ;;
6982         (nto-qnx*|openbsd*|freebsd[12].*)
6983                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6984                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6985                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6986                 ;;
6987         (dragonfly*|freebsd*)
6988                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6989                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6990                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6991                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6992                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6993                 fi
6994
6995         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6996         if test "$cf_cv_shlib_version" = rel; then
6997                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6998         else
6999                 cf_cv_shared_soname='`basename $@`'
7000         fi
7001
7002                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
7003                 ;;
7004         (netbsd*)
7005                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
7006                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
7007                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
7008                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7009                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
7010                         if test "$cf_cv_shlib_version" = auto; then
7011                         if test -f /usr/libexec/ld.elf_so; then
7012                                 cf_cv_shlib_version=abi
7013                         else
7014                                 cf_cv_shlib_version=rel
7015                         fi
7016                         fi
7017
7018         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7019         if test "$cf_cv_shlib_version" = rel; then
7020                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7021         else
7022                 cf_cv_shared_soname='`basename $@`'
7023         fi
7024
7025                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
7026                 else
7027                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
7028                 fi
7029                 ;;
7030         (osf*|mls+*)
7031                 # tested with OSF/1 V3.2 and 'cc'
7032                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
7033                 # link with shared libs).
7034                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
7035                 case "$host_os" in
7036                 (osf4*)
7037                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
7038                         ;;
7039                 esac
7040                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
7041                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
7042                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
7043                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7044                 fi
7045                 cf_cv_rm_so_locs=yes
7046                 ;;
7047         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
7048                 # tested with osr5.0.5
7049                 if test "$GCC" != yes; then
7050                         CC_SHARED_OPTS='-belf -KPIC'
7051                 fi
7052                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
7053                 if test "$cf_cv_enable_rpath" = yes ; then
7054                         # only way is to set LD_RUN_PATH but no switch for it
7055                         RUN_PATH=$libdir
7056                 fi
7057                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7058                 LINK_PROGS='LD_RUN_PATH=${libdir}'
7059                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
7060                 ;;
7061         (sunos4*)
7062                 # tested with SunOS 4.1.1 and gcc 2.7.0
7063                 if test "$GCC" != yes; then
7064                         CC_SHARED_OPTS='-KPIC'
7065                 fi
7066                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
7067                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7068                 ;;
7069         (solaris2*)
7070                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
7071                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
7072                 if test "$DFT_LWR_MODEL" = "shared" ; then
7073                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
7074                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
7075                 fi
7076                 if test "$cf_cv_enable_rpath" = yes ; then
7077                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
7078                 fi
7079
7080         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
7081         if test "$cf_cv_shlib_version" = rel; then
7082                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
7083         else
7084                 cf_cv_shared_soname='`basename $@`'
7085         fi
7086
7087                 if test "$GCC" != yes; then
7088                         cf_save_CFLAGS="$CFLAGS"
7089                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
7090                         do
7091                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
7092                                 cat >"conftest.$ac_ext" <<_ACEOF
7093 #line 7093 "configure"
7094 #include "confdefs.h"
7095 #include <stdio.h>
7096 int
7097 main (void)
7098 {
7099 printf("Hello\\n");
7100   ;
7101   return 0;
7102 }
7103 _ACEOF
7104 rm -f "conftest.$ac_objext"
7105 if { (eval echo "$as_me:7105: \"$ac_compile\"") >&5
7106   (eval $ac_compile) 2>&5
7107   ac_status=$?
7108   echo "$as_me:7108: \$? = $ac_status" >&5
7109   (exit "$ac_status"); } &&
7110          { ac_try='test -s "conftest.$ac_objext"'
7111   { (eval echo "$as_me:7111: \"$ac_try\"") >&5
7112   (eval $ac_try) 2>&5
7113   ac_status=$?
7114   echo "$as_me:7114: \$? = $ac_status" >&5
7115   (exit "$ac_status"); }; }; then
7116   break
7117 else
7118   echo "$as_me: failed program was:" >&5
7119 cat "conftest.$ac_ext" >&5
7120 fi
7121 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7122                         done
7123                         CFLAGS="$cf_save_CFLAGS"
7124                         CC_SHARED_OPTS=$cf_shared_opts
7125                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
7126                 else
7127                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
7128                 fi
7129                 ;;
7130         (sysv5uw7*|unix_sv*)
7131                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
7132                 if test "$GCC" != yes; then
7133                         CC_SHARED_OPTS='-KPIC'
7134                 fi
7135                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
7136                 ;;
7137         (*)
7138                 CC_SHARED_OPTS='unknown'
7139                 MK_SHARED_LIB='echo unknown'
7140                 ;;
7141         esac
7142
7143         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
7144         case "$cf_cv_shlib_version" in
7145         (rel|abi)
7146                 case "$MK_SHARED_LIB" in
7147                 (*'-o $@')
7148                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
7149                         ;;
7150                 (*)
7151                         { echo "$as_me:7151: WARNING: ignored --with-shlib-version" >&5
7152 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
7153                         ;;
7154                 esac
7155                 ;;
7156         esac
7157
7158         if test -n "$cf_try_cflags"
7159         then
7160 cat > conftest.$ac_ext <<EOF
7161 #line 7161 "${as_me:-configure}"
7162 #include <stdio.h>
7163 int main(int argc, char *argv[])
7164 {
7165         printf("hello\\n");
7166         return (argv[argc-1] == 0) ;
7167 }
7168 EOF
7169                 cf_save_CFLAGS="$CFLAGS"
7170                 for cf_opt in $cf_try_cflags
7171                 do
7172                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
7173                         echo "$as_me:7173: checking if CFLAGS option -$cf_opt works" >&5
7174 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
7175                         if { (eval echo "$as_me:7175: \"$ac_compile\"") >&5
7176   (eval $ac_compile) 2>&5
7177   ac_status=$?
7178   echo "$as_me:7178: \$? = $ac_status" >&5
7179   (exit "$ac_status"); }; then
7180                                 echo "$as_me:7180: result: yes" >&5
7181 echo "${ECHO_T}yes" >&6
7182                                 cf_save_CFLAGS="$CFLAGS"
7183                         else
7184                                 echo "$as_me:7184: result: no" >&5
7185 echo "${ECHO_T}no" >&6
7186                         fi
7187                 done
7188                 CFLAGS="$cf_save_CFLAGS"
7189         fi
7190
7191         # RPATH_LIST is a colon-separated list of directories
7192         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
7193         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
7194
7195         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
7196
7197         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
7198
7199 echo "${as_me:-configure}:7199: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
7200
7201         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7202
7203 echo "${as_me:-configure}:7203: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7204
7205 for model in $cf_list_models ; do
7206         case "$model" in
7207         (libtool)
7208
7209 echo "$as_me:7209: checking for additional libtool options" >&5
7210 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
7211
7212 # Check whether --with-libtool-opts or --without-libtool-opts was given.
7213 if test "${with_libtool_opts+set}" = set; then
7214   withval="$with_libtool_opts"
7215   with_libtool_opts=$withval
7216 else
7217   with_libtool_opts=no
7218 fi;
7219 echo "$as_me:7219: result: $with_libtool_opts" >&5
7220 echo "${ECHO_T}$with_libtool_opts" >&6
7221
7222 case .$with_libtool_opts in
7223 (.yes|.no|.)
7224         ;;
7225 (*)
7226         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
7227         ;;
7228 esac
7229
7230 echo "$as_me:7230: checking if exported-symbols file should be used" >&5
7231 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
7232
7233 # Check whether --with-export-syms or --without-export-syms was given.
7234 if test "${with_export_syms+set}" = set; then
7235   withval="$with_export_syms"
7236   with_export_syms=$withval
7237 else
7238   with_export_syms=no
7239 fi;
7240 if test "x$with_export_syms" = xyes
7241 then
7242         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
7243
7244 fi
7245 echo "$as_me:7245: result: $with_export_syms" >&5
7246 echo "${ECHO_T}$with_export_syms" >&6
7247 if test "x$with_export_syms" != xno
7248 then
7249         EXPORT_SYMS="-export-symbols $with_export_syms"
7250
7251 fi
7252
7253                 ;;
7254         (shared)
7255                 if test "$CC_SHARED_OPTS" = "unknown"; then
7256                         { { echo "$as_me:7256: error: Shared libraries are not supported in this version" >&5
7257 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
7258    { (exit 1); exit 1; }; }
7259                 fi
7260                 # workaround for inept transition to PIE vs PIC...
7261                 echo "$as_me:7261: checking if current CFLAGS link properly" >&5
7262 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
7263                 cat >"conftest.$ac_ext" <<_ACEOF
7264 #line 7264 "configure"
7265 #include "confdefs.h"
7266 #include <stdio.h>
7267 int
7268 main (void)
7269 {
7270 printf("Hello work\\n");
7271   ;
7272   return 0;
7273 }
7274 _ACEOF
7275 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7276 if { (eval echo "$as_me:7276: \"$ac_link\"") >&5
7277   (eval $ac_link) 2>&5
7278   ac_status=$?
7279   echo "$as_me:7279: \$? = $ac_status" >&5
7280   (exit "$ac_status"); } &&
7281          { ac_try='test -s "conftest$ac_exeext"'
7282   { (eval echo "$as_me:7282: \"$ac_try\"") >&5
7283   (eval $ac_try) 2>&5
7284   ac_status=$?
7285   echo "$as_me:7285: \$? = $ac_status" >&5
7286   (exit "$ac_status"); }; }; then
7287   cf_cflags_work=yes
7288 else
7289   echo "$as_me: failed program was:" >&5
7290 cat "conftest.$ac_ext" >&5
7291 cf_cflags_work=no
7292 fi
7293 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7294                 echo "$as_me:7294: result: $cf_cflags_work" >&5
7295 echo "${ECHO_T}$cf_cflags_work" >&6
7296                 if test "$cf_cflags_work" = no
7297                 then
7298                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
7299
7300 echo "${as_me:-configure}:7300: testing try to work around by appending shared-options ..." 1>&5
7301
7302                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
7303                 fi
7304
7305 echo "$as_me:7305: checking if versioned-symbols file should be used" >&5
7306 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
7307
7308 # Check whether --with-versioned-syms or --without-versioned-syms was given.
7309 if test "${with_versioned_syms+set}" = set; then
7310   withval="$with_versioned_syms"
7311   with_versioned_syms=$withval
7312 else
7313   with_versioned_syms=no
7314 fi;
7315 case "x$with_versioned_syms" in
7316 (xyes)
7317         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
7318
7319         ;;
7320 (xno)
7321         ;;
7322 (x/*)
7323         test -f "$with_versioned_syms" || { { echo "$as_me:7323: error: expected a filename: $with_versioned_syms" >&5
7324 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7325    { (exit 1); exit 1; }; }
7326         ;;
7327 (*)
7328         test -f "$with_versioned_syms" || { { echo "$as_me:7328: error: expected a filename: $with_versioned_syms" >&5
7329 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
7330    { (exit 1); exit 1; }; }
7331         with_versioned_syms=`pwd`/"$with_versioned_syms"
7332         ;;
7333 esac
7334 echo "$as_me:7334: result: $with_versioned_syms" >&5
7335 echo "${ECHO_T}$with_versioned_syms" >&6
7336
7337 RESULTING_SYMS=
7338 VERSIONED_SYMS=
7339 WILDCARD_SYMS=
7340
7341 if test "x$with_versioned_syms" != xno
7342 then
7343         RESULTING_SYMS=$with_versioned_syms
7344         case "x$MK_SHARED_LIB" in
7345         (*-Wl,*)
7346                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
7347                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
7348                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7349
7350 echo "${as_me:-configure}:7350: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7351
7352                 ;;
7353         (*-dy\ *)
7354                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
7355                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
7356                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
7357
7358 echo "${as_me:-configure}:7358: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
7359
7360                 ;;
7361         (*)
7362                 { echo "$as_me:7362: WARNING: this system does not support versioned-symbols" >&5
7363 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
7364                 ;;
7365         esac
7366
7367         # Linux ld can selectively override scope, e.g., of symbols beginning with
7368         # "_" by first declaring some as global, and then using a wildcard to
7369         # declare the others as local.  Some other loaders cannot do this.  Check
7370         # by constructing a (very) simple shared library and inspecting its
7371         # symbols.
7372         if test "x$VERSIONED_SYMS" != "x"
7373         then
7374                 echo "$as_me:7374: checking if wildcards can be used to selectively omit symbols" >&5
7375 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
7376                 WILDCARD_SYMS=no
7377
7378                 # make sources
7379                 rm -f conftest.*
7380
7381                 cat >conftest.ver <<EOF
7382 module_1.0 {
7383 global:
7384         globalf1;
7385 local:
7386         localf1;
7387 };
7388 module_2.0 {
7389 global:
7390         globalf2;
7391 local:
7392         localf2;
7393         _*;
7394 } module_1.0;
7395 submodule_1.0 {
7396 global:
7397         subglobalf1;
7398         _ismissing;
7399 local:
7400         sublocalf1;
7401 };
7402 submodule_2.0 {
7403 global:
7404         subglobalf2;
7405 local:
7406         sublocalf2;
7407         _*;
7408 } submodule_1.0;
7409 EOF
7410                 cat >conftest.$ac_ext <<EOF
7411 #line 7411 "configure"
7412 int     _ismissing(void) { return 1; }
7413 int     _localf1(void) { return 1; }
7414 int     _localf2(void) { return 2; }
7415 int     globalf1(void) { return 1; }
7416 int     globalf2(void) { return 2; }
7417 int     _sublocalf1(void) { return 1; }
7418 int     _sublocalf2(void) { return 2; }
7419 int     subglobalf1(void) { return 1; }
7420 int     subglobalf2(void) { return 2; }
7421 EOF
7422                 cat >conftest.mk <<EOF
7423 CC=${CC}
7424 CFLAGS=${CFLAGS}
7425 CPPFLAGS=${CPPFLAGS}
7426 LDFLAGS=${LDFLAGS}
7427 LIBS=${LIBS}
7428 VERSIONED_SYMS=${VERSIONED_SYMS}
7429 RESULTING_SYMS=conftest.ver
7430 MK_SHARED_LIB=${MK_SHARED_LIB}
7431 conftest.so: conftest.$ac_cv_objext
7432                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
7433 EOF
7434
7435                 # compile source, make library
7436                 if make -f conftest.mk 2>&5 >/dev/null
7437                 then
7438                         # test for missing symbol in either Data or Text section
7439                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
7440                         test -n "$cf_missing" && WILDCARD_SYMS=yes
7441                 fi
7442                 echo "$as_me:7442: result: $WILDCARD_SYMS" >&5
7443 echo "${ECHO_T}$WILDCARD_SYMS" >&6
7444                 rm -f conftest.*
7445         fi
7446 fi
7447
7448                 ;;
7449         esac
7450 done
7451
7452 ### Checks for special libraries, must be done up-front.
7453 SHLIB_LIST=""
7454
7455 echo "$as_me:7455: checking if you want to link with the GPM mouse library" >&5
7456 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
7457
7458 # Check whether --with-gpm or --without-gpm was given.
7459 if test "${with_gpm+set}" = set; then
7460   withval="$with_gpm"
7461   with_gpm=$withval
7462 else
7463   with_gpm=maybe
7464 fi;
7465 echo "$as_me:7465: result: $with_gpm" >&5
7466 echo "${ECHO_T}$with_gpm" >&6
7467
7468 if test "$with_gpm" != no ; then
7469         echo "$as_me:7469: checking for gpm.h" >&5
7470 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
7471 if test "${ac_cv_header_gpm_h+set}" = set; then
7472   echo $ECHO_N "(cached) $ECHO_C" >&6
7473 else
7474   cat >"conftest.$ac_ext" <<_ACEOF
7475 #line 7475 "configure"
7476 #include "confdefs.h"
7477 #include <gpm.h>
7478 _ACEOF
7479 if { (eval echo "$as_me:7479: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7480   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7481   ac_status=$?
7482   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7483   rm -f conftest.er1
7484   cat conftest.err >&5
7485   echo "$as_me:7485: \$? = $ac_status" >&5
7486   (exit "$ac_status"); } >/dev/null; then
7487   if test -s conftest.err; then
7488     ac_cpp_err=$ac_c_preproc_warn_flag
7489   else
7490     ac_cpp_err=
7491   fi
7492 else
7493   ac_cpp_err=yes
7494 fi
7495 if test -z "$ac_cpp_err"; then
7496   ac_cv_header_gpm_h=yes
7497 else
7498   echo "$as_me: failed program was:" >&5
7499   cat "conftest.$ac_ext" >&5
7500   ac_cv_header_gpm_h=no
7501 fi
7502 rm -f conftest.err "conftest.$ac_ext"
7503 fi
7504 echo "$as_me:7504: result: $ac_cv_header_gpm_h" >&5
7505 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7506 if test "$ac_cv_header_gpm_h" = yes; then
7507
7508 cat >>confdefs.h <<\EOF
7509 #define HAVE_GPM_H 1
7510 EOF
7511
7512                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7513                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7514
7515 echo "${as_me:-configure}:7515: testing assuming we really have GPM library ..." 1>&5
7516
7517 cat >>confdefs.h <<\EOF
7518 #define HAVE_LIBGPM 1
7519 EOF
7520
7521                         with_gpm=yes
7522                 else
7523                         echo "$as_me:7523: checking for Gpm_Open in -lgpm" >&5
7524 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7525 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7526   echo $ECHO_N "(cached) $ECHO_C" >&6
7527 else
7528   ac_check_lib_save_LIBS=$LIBS
7529 LIBS="-lgpm  $LIBS"
7530 cat >"conftest.$ac_ext" <<_ACEOF
7531 #line 7531 "configure"
7532 #include "confdefs.h"
7533
7534 /* Override any gcc2 internal prototype to avoid an error.  */
7535 #ifdef __cplusplus
7536 extern "C"
7537 #endif
7538 /* We use char because int might match the return type of a gcc2
7539    builtin and then its argument prototype would still apply.  */
7540 char Gpm_Open ();
7541 int
7542 main (void)
7543 {
7544 Gpm_Open ();
7545   ;
7546   return 0;
7547 }
7548 _ACEOF
7549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7550 if { (eval echo "$as_me:7550: \"$ac_link\"") >&5
7551   (eval $ac_link) 2>&5
7552   ac_status=$?
7553   echo "$as_me:7553: \$? = $ac_status" >&5
7554   (exit "$ac_status"); } &&
7555          { ac_try='test -s "conftest$ac_exeext"'
7556   { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557   (eval $ac_try) 2>&5
7558   ac_status=$?
7559   echo "$as_me:7559: \$? = $ac_status" >&5
7560   (exit "$ac_status"); }; }; then
7561   ac_cv_lib_gpm_Gpm_Open=yes
7562 else
7563   echo "$as_me: failed program was:" >&5
7564 cat "conftest.$ac_ext" >&5
7565 ac_cv_lib_gpm_Gpm_Open=no
7566 fi
7567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7568 LIBS=$ac_check_lib_save_LIBS
7569 fi
7570 echo "$as_me:7570: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7571 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7572 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7573   with_gpm=yes
7574 else
7575
7576                                 if test "$with_gpm" = maybe; then
7577                                         { echo "$as_me:7577: WARNING: Cannot link with GPM library" >&5
7578 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7579                                         with_gpm=no
7580                                 else
7581                                         { { echo "$as_me:7581: error: Cannot link with GPM library" >&5
7582 echo "$as_me: error: Cannot link with GPM library" >&2;}
7583    { (exit 1); exit 1; }; }
7584                                 fi
7585
7586 fi
7587
7588                 fi
7589
7590 else
7591
7592                 test "$with_gpm" != maybe && { echo "$as_me:7592: WARNING: Cannot find GPM header" >&5
7593 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7594                 with_gpm=no
7595
7596 fi
7597
7598 fi
7599
7600 if test "$with_gpm" != no ; then
7601         echo "$as_me:7601: checking if you want to load GPM dynamically" >&5
7602 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7603
7604 # Check whether --with-dlsym or --without-dlsym was given.
7605 if test "${with_dlsym+set}" = set; then
7606   withval="$with_dlsym"
7607   with_dlsym=$withval
7608 else
7609   with_dlsym=yes
7610 fi;
7611         echo "$as_me:7611: result: $with_dlsym" >&5
7612 echo "${ECHO_T}$with_dlsym" >&6
7613         if test "x$with_dlsym" = xyes ; then
7614
7615 cf_have_dlsym=no
7616 echo "$as_me:7616: checking for dlsym" >&5
7617 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7618 if test "${ac_cv_func_dlsym+set}" = set; then
7619   echo $ECHO_N "(cached) $ECHO_C" >&6
7620 else
7621   cat >"conftest.$ac_ext" <<_ACEOF
7622 #line 7622 "configure"
7623 #include "confdefs.h"
7624 #define dlsym autoconf_temporary
7625 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7626 #undef dlsym
7627
7628 #ifdef __cplusplus
7629 extern "C"
7630 #endif
7631
7632 /* We use char because int might match the return type of a gcc2
7633    builtin and then its argument prototype would still apply.  */
7634 char dlsym (void);
7635
7636 int
7637 main (void)
7638 {
7639
7640 /* The GNU C library defines stubs for functions which it implements
7641     to always fail with ENOSYS.  Some functions are actually named
7642     something starting with __ and the normal name is an alias.  */
7643 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7644 #error found stub for dlsym
7645 #endif
7646
7647         return dlsym ();
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7653 if { (eval echo "$as_me:7653: \"$ac_link\"") >&5
7654   (eval $ac_link) 2>&5
7655   ac_status=$?
7656   echo "$as_me:7656: \$? = $ac_status" >&5
7657   (exit "$ac_status"); } &&
7658          { ac_try='test -s "conftest$ac_exeext"'
7659   { (eval echo "$as_me:7659: \"$ac_try\"") >&5
7660   (eval $ac_try) 2>&5
7661   ac_status=$?
7662   echo "$as_me:7662: \$? = $ac_status" >&5
7663   (exit "$ac_status"); }; }; then
7664   ac_cv_func_dlsym=yes
7665 else
7666   echo "$as_me: failed program was:" >&5
7667 cat "conftest.$ac_ext" >&5
7668 ac_cv_func_dlsym=no
7669 fi
7670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7671 fi
7672 echo "$as_me:7672: result: $ac_cv_func_dlsym" >&5
7673 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7674 if test "$ac_cv_func_dlsym" = yes; then
7675   cf_have_dlsym=yes
7676 else
7677
7678 cf_have_libdl=no
7679 echo "$as_me:7679: checking for dlsym in -ldl" >&5
7680 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7681 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7682   echo $ECHO_N "(cached) $ECHO_C" >&6
7683 else
7684   ac_check_lib_save_LIBS=$LIBS
7685 LIBS="-ldl  $LIBS"
7686 cat >"conftest.$ac_ext" <<_ACEOF
7687 #line 7687 "configure"
7688 #include "confdefs.h"
7689
7690 /* Override any gcc2 internal prototype to avoid an error.  */
7691 #ifdef __cplusplus
7692 extern "C"
7693 #endif
7694 /* We use char because int might match the return type of a gcc2
7695    builtin and then its argument prototype would still apply.  */
7696 char dlsym ();
7697 int
7698 main (void)
7699 {
7700 dlsym ();
7701   ;
7702   return 0;
7703 }
7704 _ACEOF
7705 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7706 if { (eval echo "$as_me:7706: \"$ac_link\"") >&5
7707   (eval $ac_link) 2>&5
7708   ac_status=$?
7709   echo "$as_me:7709: \$? = $ac_status" >&5
7710   (exit "$ac_status"); } &&
7711          { ac_try='test -s "conftest$ac_exeext"'
7712   { (eval echo "$as_me:7712: \"$ac_try\"") >&5
7713   (eval $ac_try) 2>&5
7714   ac_status=$?
7715   echo "$as_me:7715: \$? = $ac_status" >&5
7716   (exit "$ac_status"); }; }; then
7717   ac_cv_lib_dl_dlsym=yes
7718 else
7719   echo "$as_me: failed program was:" >&5
7720 cat "conftest.$ac_ext" >&5
7721 ac_cv_lib_dl_dlsym=no
7722 fi
7723 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7724 LIBS=$ac_check_lib_save_LIBS
7725 fi
7726 echo "$as_me:7726: result: $ac_cv_lib_dl_dlsym" >&5
7727 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7728 if test "$ac_cv_lib_dl_dlsym" = yes; then
7729
7730         cf_have_dlsym=yes
7731         cf_have_libdl=yes
7732 fi
7733
7734 fi
7735
7736 if test "$cf_have_dlsym" = yes ; then
7737         test "$cf_have_libdl" = yes && {
7738 cf_add_libs="$LIBS"
7739 # reverse order
7740 cf_add_0lib=
7741 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7742 # filter duplicates
7743 for cf_add_1lib in $cf_add_0lib; do
7744         for cf_add_2lib in $cf_add_libs; do
7745                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7746                         cf_add_1lib=
7747                         break
7748                 fi
7749         done
7750         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7751 done
7752 LIBS="$cf_add_libs"
7753  }
7754
7755         echo "$as_me:7755: checking whether able to link to dl*() functions" >&5
7756 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7757         cat >"conftest.$ac_ext" <<_ACEOF
7758 #line 7758 "configure"
7759 #include "confdefs.h"
7760 #include <dlfcn.h>
7761 int
7762 main (void)
7763 {
7764
7765                 void *obj;
7766                 if ((obj = dlopen("filename", 0)) != 0) {
7767                         if (dlsym(obj, "symbolname") == 0) {
7768                         dlclose(obj);
7769                         }
7770                 }
7771   ;
7772   return 0;
7773 }
7774 _ACEOF
7775 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7776 if { (eval echo "$as_me:7776: \"$ac_link\"") >&5
7777   (eval $ac_link) 2>&5
7778   ac_status=$?
7779   echo "$as_me:7779: \$? = $ac_status" >&5
7780   (exit "$ac_status"); } &&
7781          { ac_try='test -s "conftest$ac_exeext"'
7782   { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783   (eval $ac_try) 2>&5
7784   ac_status=$?
7785   echo "$as_me:7785: \$? = $ac_status" >&5
7786   (exit "$ac_status"); }; }; then
7787
7788 cat >>confdefs.h <<\EOF
7789 #define HAVE_LIBDL 1
7790 EOF
7791
7792 else
7793   echo "$as_me: failed program was:" >&5
7794 cat "conftest.$ac_ext" >&5
7795
7796                 { { echo "$as_me:7796: error: Cannot link test program for libdl" >&5
7797 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7798    { (exit 1); exit 1; }; }
7799 fi
7800 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7801         echo "$as_me:7801: result: ok" >&5
7802 echo "${ECHO_T}ok" >&6
7803 else
7804         { { echo "$as_me:7804: error: Cannot find dlsym function" >&5
7805 echo "$as_me: error: Cannot find dlsym function" >&2;}
7806    { (exit 1); exit 1; }; }
7807 fi
7808
7809                 if test "x$with_gpm" != xyes ; then
7810                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7811
7812 echo "${as_me:-configure}:7812: testing assuming soname for gpm is $with_gpm ..." 1>&5
7813
7814                         cf_cv_gpm_soname="$with_gpm"
7815                 else
7816
7817 echo "$as_me:7817: checking for soname of gpm library" >&5
7818 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7819 if test "${cf_cv_gpm_soname+set}" = set; then
7820   echo $ECHO_N "(cached) $ECHO_C" >&6
7821 else
7822
7823 cf_cv_gpm_soname=unknown
7824 if test "$cross_compiling" != yes ; then
7825 cat >conftest.$ac_ext <<CF_EOF
7826 #include <gpm.h>
7827 int main(void)
7828 {
7829 if (Gpm_Open(0,0)) Gpm_Close();
7830         ${cf_cv_main_return:-return}(0);
7831 }
7832 CF_EOF
7833 cf_save_LIBS="$LIBS"
7834
7835 cf_add_libs="$LIBS"
7836 # reverse order
7837 cf_add_0lib=
7838 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7839 # filter duplicates
7840 for cf_add_1lib in $cf_add_0lib; do
7841         for cf_add_2lib in $cf_add_libs; do
7842                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7843                         cf_add_1lib=
7844                         break
7845                 fi
7846         done
7847         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7848 done
7849 LIBS="$cf_add_libs"
7850
7851         if { (eval echo "$as_me:7851: \"$ac_compile\"") >&5
7852   (eval $ac_compile) 2>&5
7853   ac_status=$?
7854   echo "$as_me:7854: \$? = $ac_status" >&5
7855   (exit "$ac_status"); } ; then
7856                 if { (eval echo "$as_me:7856: \"$ac_link\"") >&5
7857   (eval $ac_link) 2>&5
7858   ac_status=$?
7859   echo "$as_me:7859: \$? = $ac_status" >&5
7860   (exit "$ac_status"); } ; then
7861                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7862                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7863                 fi
7864         fi
7865 rm -rf ./conftest*
7866 LIBS="$cf_save_LIBS"
7867 fi
7868
7869 fi
7870 echo "$as_me:7870: result: $cf_cv_gpm_soname" >&5
7871 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7872
7873                 fi
7874                 test "$cf_cv_gpm_soname" != "unknown" &&
7875 cat >>confdefs.h <<EOF
7876 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7877 EOF
7878
7879                 SHLIB_LIST="-ldl $SHLIB_LIST"
7880
7881 cf_add_libs="$PRIVATE_LIBS"
7882 # reverse order
7883 cf_add_0lib=
7884 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7885 # filter duplicates
7886 for cf_add_1lib in $cf_add_0lib; do
7887         for cf_add_2lib in $cf_add_libs; do
7888                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7889                         cf_add_1lib=
7890                         break
7891                 fi
7892         done
7893         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7894 done
7895 PRIVATE_LIBS="$cf_add_libs"
7896
7897         else
7898                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7899
7900 cf_add_libs="$TEST_LIBS"
7901 # reverse order
7902 cf_add_0lib=
7903 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7904 # filter duplicates
7905 for cf_add_1lib in $cf_add_0lib; do
7906         for cf_add_2lib in $cf_add_libs; do
7907                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7908                         cf_add_1lib=
7909                         break
7910                 fi
7911         done
7912         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7913 done
7914 TEST_LIBS="$cf_add_libs"
7915
7916 cf_add_libs="$PRIVATE_LIBS"
7917 # reverse order
7918 cf_add_0lib=
7919 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7920 # filter duplicates
7921 for cf_add_1lib in $cf_add_0lib; do
7922         for cf_add_2lib in $cf_add_libs; do
7923                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7924                         cf_add_1lib=
7925                         break
7926                 fi
7927         done
7928         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7929 done
7930 PRIVATE_LIBS="$cf_add_libs"
7931
7932         fi
7933
7934 cat >>confdefs.h <<\EOF
7935 #define HAVE_LIBGPM 1
7936 EOF
7937
7938 echo "$as_me:7938: checking for Gpm_Wgetch in -lgpm" >&5
7939 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7940 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7941   echo $ECHO_N "(cached) $ECHO_C" >&6
7942 else
7943   ac_check_lib_save_LIBS=$LIBS
7944 LIBS="-lgpm  $LIBS"
7945 cat >"conftest.$ac_ext" <<_ACEOF
7946 #line 7946 "configure"
7947 #include "confdefs.h"
7948
7949 /* Override any gcc2 internal prototype to avoid an error.  */
7950 #ifdef __cplusplus
7951 extern "C"
7952 #endif
7953 /* We use char because int might match the return type of a gcc2
7954    builtin and then its argument prototype would still apply.  */
7955 char Gpm_Wgetch ();
7956 int
7957 main (void)
7958 {
7959 Gpm_Wgetch ();
7960   ;
7961   return 0;
7962 }
7963 _ACEOF
7964 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7965 if { (eval echo "$as_me:7965: \"$ac_link\"") >&5
7966   (eval $ac_link) 2>&5
7967   ac_status=$?
7968   echo "$as_me:7968: \$? = $ac_status" >&5
7969   (exit "$ac_status"); } &&
7970          { ac_try='test -s "conftest$ac_exeext"'
7971   { (eval echo "$as_me:7971: \"$ac_try\"") >&5
7972   (eval $ac_try) 2>&5
7973   ac_status=$?
7974   echo "$as_me:7974: \$? = $ac_status" >&5
7975   (exit "$ac_status"); }; }; then
7976   ac_cv_lib_gpm_Gpm_Wgetch=yes
7977 else
7978   echo "$as_me: failed program was:" >&5
7979 cat "conftest.$ac_ext" >&5
7980 ac_cv_lib_gpm_Gpm_Wgetch=no
7981 fi
7982 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7983 LIBS=$ac_check_lib_save_LIBS
7984 fi
7985 echo "$as_me:7985: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7986 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7987 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7988
7989 echo "$as_me:7989: checking if GPM is weakly bound to curses library" >&5
7990 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7991 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7992   echo $ECHO_N "(cached) $ECHO_C" >&6
7993 else
7994
7995 cf_cv_check_gpm_wgetch=unknown
7996 if test "$cross_compiling" != yes ; then
7997
7998 cat >conftest.$ac_ext <<CF_EOF
7999 #include <gpm.h>
8000 int main(void)
8001 {
8002         Gpm_Wgetch();
8003         ${cf_cv_main_return:-return}(0);
8004 }
8005 CF_EOF
8006
8007         cf_save_LIBS="$LIBS"
8008         # This only works if we can look at the symbol table.  If a shared
8009         # library is stripped for install, we cannot use that.  So we're forced
8010         # to rely on the static library, noting that some packagers may not
8011         # include it.
8012         LIBS="-static -lgpm -dynamic $LIBS"
8013         if { (eval echo "$as_me:8013: \"$ac_compile\"") >&5
8014   (eval $ac_compile) 2>&5
8015   ac_status=$?
8016   echo "$as_me:8016: \$? = $ac_status" >&5
8017   (exit "$ac_status"); } ; then
8018                 if { (eval echo "$as_me:8018: \"$ac_link\"") >&5
8019   (eval $ac_link) 2>&5
8020   ac_status=$?
8021   echo "$as_me:8021: \$? = $ac_status" >&5
8022   (exit "$ac_status"); } ; then
8023                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
8024                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
8025                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
8026                 fi
8027         fi
8028         rm -rf ./conftest*
8029         LIBS="$cf_save_LIBS"
8030 fi
8031
8032 fi
8033 echo "$as_me:8033: result: $cf_cv_check_gpm_wgetch" >&5
8034 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
8035
8036 if test "$cf_cv_check_gpm_wgetch" != yes ; then
8037         { echo "$as_me:8037: WARNING: GPM library is already linked with curses - read the FAQ" >&5
8038 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
8039 fi
8040
8041 fi
8042
8043 fi
8044
8045 echo "$as_me:8045: checking if you want to use PCRE2 for regular-expressions" >&5
8046 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
8047
8048 # Check whether --with-pcre2 or --without-pcre2 was given.
8049 if test "${with_pcre2+set}" = set; then
8050   withval="$with_pcre2"
8051
8052 fi;
8053 test -z "$with_pcre2" && with_pcre2=no
8054 echo "$as_me:8054: result: $with_pcre2" >&5
8055 echo "${ECHO_T}$with_pcre2" >&6
8056
8057 if test "x$with_pcre2" != xno ; then
8058         cf_with_pcre2_ok=no
8059         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
8060         do
8061
8062 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
8063         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
8064
8065 echo "${as_me:-configure}:8065: testing found package $cf_with_pcre2 ..." 1>&5
8066
8067         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
8068         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
8069         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
8070
8071 echo "${as_me:-configure}:8071: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
8072
8073         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
8074
8075 echo "${as_me:-configure}:8075: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
8076
8077 cf_fix_cppflags=no
8078 cf_new_cflags=
8079 cf_new_cppflags=
8080 cf_new_extra_cppflags=
8081
8082 for cf_add_cflags in $cf_pkgconfig_incs
8083 do
8084 case "$cf_fix_cppflags" in
8085 (no)
8086         case "$cf_add_cflags" in
8087         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
8088                 case "$cf_add_cflags" in
8089                 (-D*)
8090                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
8091
8092                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8093                                 && test -z "${cf_tst_cflags}" \
8094                                 && cf_fix_cppflags=yes
8095
8096                         if test "$cf_fix_cppflags" = yes ; then
8097
8098         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8099         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8100
8101                                 continue
8102                         elif test "${cf_tst_cflags}" = "\"'" ; then
8103
8104         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8105         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8106
8107                                 continue
8108                         fi
8109                         ;;
8110                 esac
8111                 case "$CPPFLAGS" in
8112                 (*$cf_add_cflags)
8113                         ;;
8114                 (*)
8115                         case "$cf_add_cflags" in
8116                         (-D*)
8117                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
8118
8119 CPPFLAGS=`echo "$CPPFLAGS" | \
8120         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
8121                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
8122
8123                                 ;;
8124                         esac
8125
8126         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
8127         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
8128
8129                         ;;
8130                 esac
8131                 ;;
8132         (*)
8133
8134         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
8135         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
8136
8137                 ;;
8138         esac
8139         ;;
8140 (yes)
8141
8142         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
8143         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
8144
8145         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
8146
8147         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
8148                 && test -z "${cf_tst_cflags}" \
8149                 && cf_fix_cppflags=no
8150         ;;
8151 esac
8152 done
8153
8154 if test -n "$cf_new_cflags" ; then
8155
8156         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
8157         CFLAGS="${CFLAGS}$cf_new_cflags"
8158
8159 fi
8160
8161 if test -n "$cf_new_cppflags" ; then
8162
8163         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8164         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
8165
8166 fi
8167
8168 if test -n "$cf_new_extra_cppflags" ; then
8169
8170         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
8171         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
8172
8173 fi
8174
8175 cf_add_libs="$LIBS"
8176 # reverse order
8177 cf_add_0lib=
8178 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8179 # filter duplicates
8180 for cf_add_1lib in $cf_add_0lib; do
8181         for cf_add_2lib in $cf_add_libs; do
8182                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8183                         cf_add_1lib=
8184                         break
8185                 fi
8186         done
8187         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8188 done
8189 LIBS="$cf_add_libs"
8190
8191         cf_with_pcre2_ok=yes; break
8192 else
8193         cf_pkgconfig_incs=
8194         cf_pkgconfig_libs=
8195         :
8196 fi
8197
8198         done
8199         cf_with_pcre2_ok=yes || { { echo "$as_me:8199: error: Cannot find PCRE2 library" >&5
8200 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
8201    { (exit 1); exit 1; }; }
8202
8203 cat >>confdefs.h <<\EOF
8204 #define HAVE_LIB_PCRE2 1
8205 EOF
8206
8207         # if pkgconfig gave no results, look for the libraries directly
8208         case "$LIBS" in
8209         (*pcre2-posix*|*pcreposix*)
8210                 ;;
8211         (*)
8212                 echo "$as_me:8212: checking for regcomp in -lpcre2-posix" >&5
8213 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
8214 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
8215   echo $ECHO_N "(cached) $ECHO_C" >&6
8216 else
8217   ac_check_lib_save_LIBS=$LIBS
8218 LIBS="-lpcre2-posix  $LIBS"
8219 cat >"conftest.$ac_ext" <<_ACEOF
8220 #line 8220 "configure"
8221 #include "confdefs.h"
8222
8223 /* Override any gcc2 internal prototype to avoid an error.  */
8224 #ifdef __cplusplus
8225 extern "C"
8226 #endif
8227 /* We use char because int might match the return type of a gcc2
8228    builtin and then its argument prototype would still apply.  */
8229 char regcomp ();
8230 int
8231 main (void)
8232 {
8233 regcomp ();
8234   ;
8235   return 0;
8236 }
8237 _ACEOF
8238 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8239 if { (eval echo "$as_me:8239: \"$ac_link\"") >&5
8240   (eval $ac_link) 2>&5
8241   ac_status=$?
8242   echo "$as_me:8242: \$? = $ac_status" >&5
8243   (exit "$ac_status"); } &&
8244          { ac_try='test -s "conftest$ac_exeext"'
8245   { (eval echo "$as_me:8245: \"$ac_try\"") >&5
8246   (eval $ac_try) 2>&5
8247   ac_status=$?
8248   echo "$as_me:8248: \$? = $ac_status" >&5
8249   (exit "$ac_status"); }; }; then
8250   ac_cv_lib_pcre2_posix_regcomp=yes
8251 else
8252   echo "$as_me: failed program was:" >&5
8253 cat "conftest.$ac_ext" >&5
8254 ac_cv_lib_pcre2_posix_regcomp=no
8255 fi
8256 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8257 LIBS=$ac_check_lib_save_LIBS
8258 fi
8259 echo "$as_me:8259: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
8260 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
8261 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
8262
8263 cf_add_libs="$LIBS"
8264 # reverse order
8265 cf_add_0lib=
8266 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8267 # filter duplicates
8268 for cf_add_1lib in $cf_add_0lib; do
8269         for cf_add_2lib in $cf_add_libs; do
8270                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8271                         cf_add_1lib=
8272                         break
8273                 fi
8274         done
8275         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8276 done
8277 LIBS="$cf_add_libs"
8278
8279 else
8280   echo "$as_me:8280: checking for regcomp in -lpcreposix" >&5
8281 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
8282 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
8283   echo $ECHO_N "(cached) $ECHO_C" >&6
8284 else
8285   ac_check_lib_save_LIBS=$LIBS
8286 LIBS="-lpcreposix  $LIBS"
8287 cat >"conftest.$ac_ext" <<_ACEOF
8288 #line 8288 "configure"
8289 #include "confdefs.h"
8290
8291 /* Override any gcc2 internal prototype to avoid an error.  */
8292 #ifdef __cplusplus
8293 extern "C"
8294 #endif
8295 /* We use char because int might match the return type of a gcc2
8296    builtin and then its argument prototype would still apply.  */
8297 char regcomp ();
8298 int
8299 main (void)
8300 {
8301 regcomp ();
8302   ;
8303   return 0;
8304 }
8305 _ACEOF
8306 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8307 if { (eval echo "$as_me:8307: \"$ac_link\"") >&5
8308   (eval $ac_link) 2>&5
8309   ac_status=$?
8310   echo "$as_me:8310: \$? = $ac_status" >&5
8311   (exit "$ac_status"); } &&
8312          { ac_try='test -s "conftest$ac_exeext"'
8313   { (eval echo "$as_me:8313: \"$ac_try\"") >&5
8314   (eval $ac_try) 2>&5
8315   ac_status=$?
8316   echo "$as_me:8316: \$? = $ac_status" >&5
8317   (exit "$ac_status"); }; }; then
8318   ac_cv_lib_pcreposix_regcomp=yes
8319 else
8320   echo "$as_me: failed program was:" >&5
8321 cat "conftest.$ac_ext" >&5
8322 ac_cv_lib_pcreposix_regcomp=no
8323 fi
8324 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8325 LIBS=$ac_check_lib_save_LIBS
8326 fi
8327 echo "$as_me:8327: result: $ac_cv_lib_pcreposix_regcomp" >&5
8328 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
8329 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
8330
8331 cf_add_libs="$LIBS"
8332 # reverse order
8333 cf_add_0lib=
8334 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8335 # filter duplicates
8336 for cf_add_1lib in $cf_add_0lib; do
8337         for cf_add_2lib in $cf_add_libs; do
8338                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8339                         cf_add_1lib=
8340                         break
8341                 fi
8342         done
8343         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8344 done
8345 LIBS="$cf_add_libs"
8346
8347 else
8348   { { echo "$as_me:8348: error: Cannot find PCRE2 POSIX library" >&5
8349 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
8350    { (exit 1); exit 1; }; }
8351 fi
8352
8353 fi
8354
8355                 ;;
8356         esac
8357
8358         # either way, check for the library header files
8359
8360 for ac_header in pcre2posix.h pcreposix.h
8361 do
8362 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8363 echo "$as_me:8363: checking for $ac_header" >&5
8364 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8365 if eval "test \"\${$as_ac_Header+set}\" = set"; then
8366   echo $ECHO_N "(cached) $ECHO_C" >&6
8367 else
8368   cat >"conftest.$ac_ext" <<_ACEOF
8369 #line 8369 "configure"
8370 #include "confdefs.h"
8371 #include <$ac_header>
8372 _ACEOF
8373 if { (eval echo "$as_me:8373: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8374   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8375   ac_status=$?
8376   $EGREP -v '^ *\+' conftest.er1 >conftest.err
8377   rm -f conftest.er1
8378   cat conftest.err >&5
8379   echo "$as_me:8379: \$? = $ac_status" >&5
8380   (exit "$ac_status"); } >/dev/null; then
8381   if test -s conftest.err; then
8382     ac_cpp_err=$ac_c_preproc_warn_flag
8383   else
8384     ac_cpp_err=
8385   fi
8386 else
8387   ac_cpp_err=yes
8388 fi
8389 if test -z "$ac_cpp_err"; then
8390   eval "$as_ac_Header=yes"
8391 else
8392   echo "$as_me: failed program was:" >&5
8393   cat "conftest.$ac_ext" >&5
8394   eval "$as_ac_Header=no"
8395 fi
8396 rm -f conftest.err "conftest.$ac_ext"
8397 fi
8398 echo "$as_me:8398: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8399 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8400 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8401   cat >>confdefs.h <<EOF
8402 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8403 EOF
8404
8405 fi
8406 done
8407
8408 for ac_func in PCRE2regcomp
8409 do
8410 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8411 echo "$as_me:8411: checking for $ac_func" >&5
8412 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8413 if eval "test \"\${$as_ac_var+set}\" = set"; then
8414   echo $ECHO_N "(cached) $ECHO_C" >&6
8415 else
8416   cat >"conftest.$ac_ext" <<_ACEOF
8417 #line 8417 "configure"
8418 #include "confdefs.h"
8419 #define $ac_func autoconf_temporary
8420 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
8421 #undef $ac_func
8422
8423 #ifdef __cplusplus
8424 extern "C"
8425 #endif
8426
8427 /* We use char because int might match the return type of a gcc2
8428    builtin and then its argument prototype would still apply.  */
8429 char $ac_func (void);
8430
8431 int
8432 main (void)
8433 {
8434
8435 /* The GNU C library defines stubs for functions which it implements
8436     to always fail with ENOSYS.  Some functions are actually named
8437     something starting with __ and the normal name is an alias.  */
8438 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8439 #error found stub for $ac_func
8440 #endif
8441
8442         return $ac_func ();
8443   ;
8444   return 0;
8445 }
8446 _ACEOF
8447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8448 if { (eval echo "$as_me:8448: \"$ac_link\"") >&5
8449   (eval $ac_link) 2>&5
8450   ac_status=$?
8451   echo "$as_me:8451: \$? = $ac_status" >&5
8452   (exit "$ac_status"); } &&
8453          { ac_try='test -s "conftest$ac_exeext"'
8454   { (eval echo "$as_me:8454: \"$ac_try\"") >&5
8455   (eval $ac_try) 2>&5
8456   ac_status=$?
8457   echo "$as_me:8457: \$? = $ac_status" >&5
8458   (exit "$ac_status"); }; }; then
8459   eval "$as_ac_var=yes"
8460 else
8461   echo "$as_me: failed program was:" >&5
8462 cat "conftest.$ac_ext" >&5
8463 eval "$as_ac_var=no"
8464 fi
8465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8466 fi
8467 echo "$as_me:8467: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8468 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8469 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8470   cat >>confdefs.h <<EOF
8471 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8472 EOF
8473
8474 fi
8475 done
8476
8477 fi
8478
8479 # not everyone has "test -c"
8480 if test -c /dev/sysmouse 2>/dev/null ; then
8481 echo "$as_me:8481: checking if you want to use sysmouse" >&5
8482 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
8483
8484 # Check whether --with-sysmouse or --without-sysmouse was given.
8485 if test "${with_sysmouse+set}" = set; then
8486   withval="$with_sysmouse"
8487   cf_with_sysmouse=$withval
8488 else
8489   cf_with_sysmouse=maybe
8490 fi;
8491         if test "$cf_with_sysmouse" != no ; then
8492         cat >"conftest.$ac_ext" <<_ACEOF
8493 #line 8493 "configure"
8494 #include "confdefs.h"
8495
8496 #include <osreldate.h>
8497 #if (__FreeBSD_version >= 400017)
8498 #include <sys/consio.h>
8499 #include <sys/fbio.h>
8500 #else
8501 #include <machine/console.h>
8502 #endif
8503
8504 int
8505 main (void)
8506 {
8507
8508         struct mouse_info the_mouse;
8509         ioctl(0, CONS_MOUSECTL, &the_mouse);
8510
8511   ;
8512   return 0;
8513 }
8514 _ACEOF
8515 rm -f "conftest.$ac_objext"
8516 if { (eval echo "$as_me:8516: \"$ac_compile\"") >&5
8517   (eval $ac_compile) 2>&5
8518   ac_status=$?
8519   echo "$as_me:8519: \$? = $ac_status" >&5
8520   (exit "$ac_status"); } &&
8521          { ac_try='test -s "conftest.$ac_objext"'
8522   { (eval echo "$as_me:8522: \"$ac_try\"") >&5
8523   (eval $ac_try) 2>&5
8524   ac_status=$?
8525   echo "$as_me:8525: \$? = $ac_status" >&5
8526   (exit "$ac_status"); }; }; then
8527   cf_with_sysmouse=yes
8528 else
8529   echo "$as_me: failed program was:" >&5
8530 cat "conftest.$ac_ext" >&5
8531 cf_with_sysmouse=no
8532 fi
8533 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8534         fi
8535 echo "$as_me:8535: result: $cf_with_sysmouse" >&5
8536 echo "${ECHO_T}$cf_with_sysmouse" >&6
8537 test "$cf_with_sysmouse" = yes &&
8538 cat >>confdefs.h <<\EOF
8539 #define USE_SYSMOUSE 1
8540 EOF
8541
8542 fi
8543
8544 # pretend that ncurses==ncursesw==ncursest
8545 echo "$as_me:8545: checking if you want to disable library suffixes" >&5
8546 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8547
8548 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8549 if test "${enable_lib_suffixes+set}" = set; then
8550   enableval="$enable_lib_suffixes"
8551   test "$enableval" != no && enableval=yes
8552         if test "$enableval" != "yes" ; then
8553     disable_lib_suffixes=yes
8554         else
8555                 disable_lib_suffixes=no
8556         fi
8557 else
8558   enableval=yes
8559         disable_lib_suffixes=no
8560
8561 fi;
8562 echo "$as_me:8562: result: $disable_lib_suffixes" >&5
8563 echo "${ECHO_T}$disable_lib_suffixes" >&6
8564
8565 ### If we're building with rpath, try to link non-standard libs that way too.
8566 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8567
8568 echo "$as_me:8568: checking if rpath-hack should be disabled" >&5
8569 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8570
8571 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8572 if test "${enable_rpath_hack+set}" = set; then
8573   enableval="$enable_rpath_hack"
8574   test "$enableval" != no && enableval=yes
8575         if test "$enableval" != "yes" ; then
8576     enable_rpath_hack=no
8577         else
8578                 enable_rpath_hack=yes
8579         fi
8580 else
8581   enableval=yes
8582         enable_rpath_hack=yes
8583
8584 fi;
8585 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8586 echo "$as_me:8586: result: $cf_disable_rpath_hack" >&5
8587 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8588
8589 if test "$enable_rpath_hack" = yes ; then
8590
8591 echo "$as_me:8591: checking for updated LDFLAGS" >&5
8592 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8593 if test -n "$LD_RPATH_OPT" ; then
8594         echo "$as_me:8594: result: maybe" >&5
8595 echo "${ECHO_T}maybe" >&6
8596
8597         for ac_prog in ldd
8598 do
8599   # Extract the first word of "$ac_prog", so it can be a program name with args.
8600 set dummy $ac_prog; ac_word=$2
8601 echo "$as_me:8601: checking for $ac_word" >&5
8602 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8603 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8604   echo $ECHO_N "(cached) $ECHO_C" >&6
8605 else
8606   if test -n "$cf_ldd_prog"; then
8607   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8608 else
8609   ac_save_IFS=$IFS; IFS=$ac_path_separator
8610 ac_dummy="$PATH"
8611 for ac_dir in $ac_dummy; do
8612   IFS=$ac_save_IFS
8613   test -z "$ac_dir" && ac_dir=.
8614   $as_executable_p "$ac_dir/$ac_word" || continue
8615 ac_cv_prog_cf_ldd_prog="$ac_prog"
8616 echo "$as_me:8616: found $ac_dir/$ac_word" >&5
8617 break
8618 done
8619
8620 fi
8621 fi
8622 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8623 if test -n "$cf_ldd_prog"; then
8624   echo "$as_me:8624: result: $cf_ldd_prog" >&5
8625 echo "${ECHO_T}$cf_ldd_prog" >&6
8626 else
8627   echo "$as_me:8627: result: no" >&5
8628 echo "${ECHO_T}no" >&6
8629 fi
8630
8631   test -n "$cf_ldd_prog" && break
8632 done
8633 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8634
8635         cf_rpath_list="/usr/lib /lib"
8636         if test "$cf_ldd_prog" != no
8637         then
8638                 cf_rpath_oops=
8639
8640 cat >"conftest.$ac_ext" <<_ACEOF
8641 #line 8641 "configure"
8642 #include "confdefs.h"
8643 #include <stdio.h>
8644 int
8645 main (void)
8646 {
8647 printf("Hello");
8648   ;
8649   return 0;
8650 }
8651 _ACEOF
8652 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8653 if { (eval echo "$as_me:8653: \"$ac_link\"") >&5
8654   (eval $ac_link) 2>&5
8655   ac_status=$?
8656   echo "$as_me:8656: \$? = $ac_status" >&5
8657   (exit "$ac_status"); } &&
8658          { ac_try='test -s "conftest$ac_exeext"'
8659   { (eval echo "$as_me:8659: \"$ac_try\"") >&5
8660   (eval $ac_try) 2>&5
8661   ac_status=$?
8662   echo "$as_me:8662: \$? = $ac_status" >&5
8663   (exit "$ac_status"); }; }; then
8664   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8665                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8666 else
8667   echo "$as_me: failed program was:" >&5
8668 cat "conftest.$ac_ext" >&5
8669 fi
8670 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8671
8672                 # If we passed the link-test, but get a "not found" on a given library,
8673                 # this could be due to inept reconfiguration of gcc to make it only
8674                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8675                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8676                 # /usr/local libraries.
8677                 if test -n "$cf_rpath_oops"
8678                 then
8679                         for cf_rpath_src in $cf_rpath_oops
8680                         do
8681                                 for cf_rpath_dir in \
8682                                         /usr/local \
8683                                         /usr/pkg \
8684                                         /opt/sfw
8685                                 do
8686                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8687                                         then
8688                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8689
8690 echo "${as_me:-configure}:8690: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8691
8692                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8693                                                 break
8694                                         fi
8695                                 done
8696                         done
8697                 fi
8698         fi
8699
8700         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8701
8702 echo "${as_me:-configure}:8702: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8703
8704 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8705
8706 echo "${as_me:-configure}:8706: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8707
8708 cf_rpath_dst=
8709 for cf_rpath_src in $LDFLAGS
8710 do
8711         case "$cf_rpath_src" in
8712         (-L*)
8713
8714                 # check if this refers to a directory which we will ignore
8715                 cf_rpath_skip=no
8716                 if test -n "$cf_rpath_list"
8717                 then
8718                         for cf_rpath_item in $cf_rpath_list
8719                         do
8720                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8721                                 then
8722                                         cf_rpath_skip=yes
8723                                         break
8724                                 fi
8725                         done
8726                 fi
8727
8728                 if test "$cf_rpath_skip" = no
8729                 then
8730                         # transform the option
8731                         if test "$LD_RPATH_OPT" = "-R " ; then
8732                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8733                         else
8734                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8735                         fi
8736
8737                         # if we have not already added this, add it now
8738                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8739                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8740                         then
8741                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8742
8743 echo "${as_me:-configure}:8743: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8744
8745                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8746                         fi
8747                 fi
8748                 ;;
8749         esac
8750         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8751 done
8752 LDFLAGS=$cf_rpath_dst
8753
8754 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8755
8756 echo "${as_me:-configure}:8756: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8757
8758 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8759
8760 echo "${as_me:-configure}:8760: testing ...checking LIBS $LIBS ..." 1>&5
8761
8762 cf_rpath_dst=
8763 for cf_rpath_src in $LIBS
8764 do
8765         case "$cf_rpath_src" in
8766         (-L*)
8767
8768                 # check if this refers to a directory which we will ignore
8769                 cf_rpath_skip=no
8770                 if test -n "$cf_rpath_list"
8771                 then
8772                         for cf_rpath_item in $cf_rpath_list
8773                         do
8774                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8775                                 then
8776                                         cf_rpath_skip=yes
8777                                         break
8778                                 fi
8779                         done
8780                 fi
8781
8782                 if test "$cf_rpath_skip" = no
8783                 then
8784                         # transform the option
8785                         if test "$LD_RPATH_OPT" = "-R " ; then
8786                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8787                         else
8788                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8789                         fi
8790
8791                         # if we have not already added this, add it now
8792                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8793                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8794                         then
8795                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8796
8797 echo "${as_me:-configure}:8797: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8798
8799                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8800                         fi
8801                 fi
8802                 ;;
8803         esac
8804         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8805 done
8806 LIBS=$cf_rpath_dst
8807
8808 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8809
8810 echo "${as_me:-configure}:8810: testing ...checked LIBS $LIBS ..." 1>&5
8811
8812         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8813
8814 echo "${as_me:-configure}:8814: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8815
8816 else
8817         echo "$as_me:8817: result: no" >&5
8818 echo "${ECHO_T}no" >&6
8819 fi
8820
8821 fi
8822
8823 fi
8824
8825 ### Depending on the system, someone may use rpath to build ncurses but not
8826 # want users of the package to rely upon that feature.  Give those people an
8827 # option to suppress that detail from EXTRA_LDFLAGS.
8828 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8829 if test -n "$EXTRA_PKG_LDFLAGS"
8830 then
8831         echo "$as_me:8831: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8832 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8833
8834 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8835 if test "${enable_pkg_ldflags+set}" = set; then
8836   enableval="$enable_pkg_ldflags"
8837   test "$enableval" != no && enableval=yes
8838         if test "$enableval" != "yes" ; then
8839     disable_pkg_ldflags=yes
8840         else
8841                 disable_pkg_ldflags=no
8842         fi
8843 else
8844   enableval=yes
8845         disable_pkg_ldflags=no
8846
8847 fi;
8848         echo "$as_me:8848: result: $disable_pkg_ldflags" >&5
8849 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8850         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8851 fi
8852
8853 ###############################################################################
8854
8855 ###     use option --with-extra-suffix to append suffix to headers and libraries
8856 echo "$as_me:8856: checking for extra suffix to append to header/library paths" >&5
8857 echo $ECHO_N "checking for extra suffix to append to header/library paths... $ECHO_C" >&6
8858 EXTRA_SUFFIX=
8859
8860 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8861 if test "${with_extra_suffix+set}" = set; then
8862   withval="$with_extra_suffix"
8863   case x$withval in
8864         (xno)
8865                 ;;
8866         (xyes|x)
8867                 EXTRA_SUFFIX=$cf_cv_abi_version
8868                 ;;
8869         (*)
8870                 EXTRA_SUFFIX=$withval
8871                 ;;
8872         esac
8873
8874 fi;
8875 echo "$as_me:8875: result: ${EXTRA_SUFFIX:-(none)}" >&5
8876 echo "${ECHO_T}${EXTRA_SUFFIX:-(none)}" >&6
8877
8878 ###     use option --disable-overwrite to leave out the link to -lcurses
8879 echo "$as_me:8879: checking if you wish to install ncurses overwriting curses" >&5
8880 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8881
8882 # Check whether --enable-overwrite or --disable-overwrite was given.
8883 if test "${enable_overwrite+set}" = set; then
8884   enableval="$enable_overwrite"
8885   with_overwrite=$enableval
8886 else
8887   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8888 fi;
8889 echo "$as_me:8889: result: $with_overwrite" >&5
8890 echo "${ECHO_T}$with_overwrite" >&6
8891
8892 echo "$as_me:8892: checking if external terminfo-database is used" >&5
8893 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8894
8895 # Check whether --enable-database or --disable-database was given.
8896 if test "${enable_database+set}" = set; then
8897   enableval="$enable_database"
8898   use_database=$enableval
8899 else
8900   use_database=yes
8901 fi;
8902 echo "$as_me:8902: result: $use_database" >&5
8903 echo "${ECHO_T}$use_database" >&6
8904
8905 case "$host_os" in
8906 (os2*)
8907         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8908         ;;
8909 (*)
8910         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8911         ;;
8912 esac
8913
8914 NCURSES_USE_DATABASE=0
8915 if test "$use_database" != no ; then
8916         NCURSES_USE_DATABASE=1
8917
8918         echo "$as_me:8918: checking which terminfo source-file will be installed" >&5
8919 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8920
8921 # Check whether --with-database or --without-database was given.
8922 if test "${with_database+set}" = set; then
8923   withval="$with_database"
8924   TERMINFO_SRC=$withval
8925 fi;
8926         echo "$as_me:8926: result: $TERMINFO_SRC" >&5
8927 echo "${ECHO_T}$TERMINFO_SRC" >&6
8928
8929         echo "$as_me:8929: checking whether to use hashed database instead of directory/tree" >&5
8930 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8931
8932 # Check whether --with-hashed-db or --without-hashed-db was given.
8933 if test "${with_hashed_db+set}" = set; then
8934   withval="$with_hashed_db"
8935
8936 else
8937   with_hashed_db=no
8938 fi;
8939         echo "$as_me:8939: result: $with_hashed_db" >&5
8940 echo "${ECHO_T}$with_hashed_db" >&6
8941 else
8942         with_hashed_db=no
8943 fi
8944
8945 echo "$as_me:8945: checking for list of fallback terminal descriptions" >&5
8946 echo $ECHO_N "checking for list of fallback terminal descriptions... $ECHO_C" >&6
8947
8948 # Check whether --with-fallbacks or --without-fallbacks was given.
8949 if test "${with_fallbacks+set}" = set; then
8950   withval="$with_fallbacks"
8951   with_fallback=$withval
8952 else
8953   with_fallback=
8954 fi;
8955 echo "$as_me:8955: result: ${with_fallback:-(none)}" >&5
8956 echo "${ECHO_T}${with_fallback:-(none)}" >&6
8957
8958 case ".$with_fallback" in
8959 (.|.no)
8960         FALLBACK_LIST=
8961         ;;
8962 (.yes)
8963         { echo "$as_me:8963: WARNING: expected a list of terminal descriptions" >&5
8964 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8965         ;;
8966 (*)
8967         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8968         ;;
8969 esac
8970
8971 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8972 # tree for generating the terminal descriptions that will be compiled into the
8973 # library.  If your toolchain is old, it may not handle current terminal
8974 # databases.  Use configure-options to point to the tools which will be used,
8975 # rather than the first ones found on the $PATH.
8976 if test -n "$ac_tool_prefix"; then
8977   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8978 set dummy ${ac_tool_prefix}tic; ac_word=$2
8979 echo "$as_me:8979: checking for $ac_word" >&5
8980 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8981 if test "${ac_cv_prog_TIC+set}" = set; then
8982   echo $ECHO_N "(cached) $ECHO_C" >&6
8983 else
8984   if test -n "$TIC"; then
8985   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8986 else
8987   ac_save_IFS=$IFS; IFS=$ac_path_separator
8988 ac_dummy="$PATH"
8989 for ac_dir in $ac_dummy; do
8990   IFS=$ac_save_IFS
8991   test -z "$ac_dir" && ac_dir=.
8992   $as_executable_p "$ac_dir/$ac_word" || continue
8993 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8994 echo "$as_me:8994: found $ac_dir/$ac_word" >&5
8995 break
8996 done
8997
8998 fi
8999 fi
9000 TIC=$ac_cv_prog_TIC
9001 if test -n "$TIC"; then
9002   echo "$as_me:9002: result: $TIC" >&5
9003 echo "${ECHO_T}$TIC" >&6
9004 else
9005   echo "$as_me:9005: result: no" >&5
9006 echo "${ECHO_T}no" >&6
9007 fi
9008
9009 fi
9010 if test -z "$ac_cv_prog_TIC"; then
9011   ac_ct_TIC=$TIC
9012   # Extract the first word of "tic", so it can be a program name with args.
9013 set dummy tic; ac_word=$2
9014 echo "$as_me:9014: checking for $ac_word" >&5
9015 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9016 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
9017   echo $ECHO_N "(cached) $ECHO_C" >&6
9018 else
9019   if test -n "$ac_ct_TIC"; then
9020   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
9021 else
9022   ac_save_IFS=$IFS; IFS=$ac_path_separator
9023 ac_dummy="$PATH"
9024 for ac_dir in $ac_dummy; do
9025   IFS=$ac_save_IFS
9026   test -z "$ac_dir" && ac_dir=.
9027   $as_executable_p "$ac_dir/$ac_word" || continue
9028 ac_cv_prog_ac_ct_TIC="tic"
9029 echo "$as_me:9029: found $ac_dir/$ac_word" >&5
9030 break
9031 done
9032
9033 fi
9034 fi
9035 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
9036 if test -n "$ac_ct_TIC"; then
9037   echo "$as_me:9037: result: $ac_ct_TIC" >&5
9038 echo "${ECHO_T}$ac_ct_TIC" >&6
9039 else
9040   echo "$as_me:9040: result: no" >&5
9041 echo "${ECHO_T}no" >&6
9042 fi
9043
9044   TIC=$ac_ct_TIC
9045 else
9046   TIC="$ac_cv_prog_TIC"
9047 fi
9048
9049 if test -n "$ac_tool_prefix"; then
9050   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
9051 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
9052 echo "$as_me:9052: checking for $ac_word" >&5
9053 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9054 if test "${ac_cv_prog_INFOCMP+set}" = set; then
9055   echo $ECHO_N "(cached) $ECHO_C" >&6
9056 else
9057   if test -n "$INFOCMP"; then
9058   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
9059 else
9060   ac_save_IFS=$IFS; IFS=$ac_path_separator
9061 ac_dummy="$PATH"
9062 for ac_dir in $ac_dummy; do
9063   IFS=$ac_save_IFS
9064   test -z "$ac_dir" && ac_dir=.
9065   $as_executable_p "$ac_dir/$ac_word" || continue
9066 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
9067 echo "$as_me:9067: found $ac_dir/$ac_word" >&5
9068 break
9069 done
9070
9071 fi
9072 fi
9073 INFOCMP=$ac_cv_prog_INFOCMP
9074 if test -n "$INFOCMP"; then
9075   echo "$as_me:9075: result: $INFOCMP" >&5
9076 echo "${ECHO_T}$INFOCMP" >&6
9077 else
9078   echo "$as_me:9078: result: no" >&5
9079 echo "${ECHO_T}no" >&6
9080 fi
9081
9082 fi
9083 if test -z "$ac_cv_prog_INFOCMP"; then
9084   ac_ct_INFOCMP=$INFOCMP
9085   # Extract the first word of "infocmp", so it can be a program name with args.
9086 set dummy infocmp; ac_word=$2
9087 echo "$as_me:9087: checking for $ac_word" >&5
9088 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9089 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
9090   echo $ECHO_N "(cached) $ECHO_C" >&6
9091 else
9092   if test -n "$ac_ct_INFOCMP"; then
9093   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
9094 else
9095   ac_save_IFS=$IFS; IFS=$ac_path_separator
9096 ac_dummy="$PATH"
9097 for ac_dir in $ac_dummy; do
9098   IFS=$ac_save_IFS
9099   test -z "$ac_dir" && ac_dir=.
9100   $as_executable_p "$ac_dir/$ac_word" || continue
9101 ac_cv_prog_ac_ct_INFOCMP="infocmp"
9102 echo "$as_me:9102: found $ac_dir/$ac_word" >&5
9103 break
9104 done
9105
9106 fi
9107 fi
9108 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
9109 if test -n "$ac_ct_INFOCMP"; then
9110   echo "$as_me:9110: result: $ac_ct_INFOCMP" >&5
9111 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
9112 else
9113   echo "$as_me:9113: result: no" >&5
9114 echo "${ECHO_T}no" >&6
9115 fi
9116
9117   INFOCMP=$ac_ct_INFOCMP
9118 else
9119   INFOCMP="$ac_cv_prog_INFOCMP"
9120 fi
9121
9122 if test -n "$FALLBACK_LIST"
9123 then
9124
9125 # Check whether --with-tic-path or --without-tic-path was given.
9126 if test "${with_tic_path+set}" = set; then
9127   withval="$with_tic_path"
9128   echo "$as_me:9128: checking for tic program for fallbacks" >&5
9129 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
9130                 TIC=$withval
9131                 echo "$as_me:9131: result: $TIC" >&5
9132 echo "${ECHO_T}$TIC" >&6
9133
9134 if test "x$prefix" != xNONE; then
9135         cf_path_syntax="$prefix"
9136 else
9137         cf_path_syntax="$ac_default_prefix"
9138 fi
9139
9140 case ".$TIC" in
9141 (.\$\(*\)*|.\'*\'*)
9142         ;;
9143 (..|./*|.\\*)
9144         ;;
9145 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9146         ;;
9147 (.\$\{*prefix\}*|.\$\{*dir\}*)
9148         eval TIC="$TIC"
9149         case ".$TIC" in
9150         (.NONE/*)
9151                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9152                 ;;
9153         esac
9154         ;;
9155 (.no|.NONE/*)
9156         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
9157         ;;
9158 (*)
9159         { { echo "$as_me:9159: error: expected a pathname, not \"$TIC\"" >&5
9160 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
9161    { (exit 1); exit 1; }; }
9162         ;;
9163 esac
9164
9165 else
9166
9167 test -z "$TIC" && TIC="tic"
9168 for ac_prog in $TIC tic
9169 do
9170   # Extract the first word of "$ac_prog", so it can be a program name with args.
9171 set dummy $ac_prog; ac_word=$2
9172 echo "$as_me:9172: checking for $ac_word" >&5
9173 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9174 if test "${ac_cv_path_TIC+set}" = set; then
9175   echo $ECHO_N "(cached) $ECHO_C" >&6
9176 else
9177   case $TIC in
9178   [\\/]* | ?:[\\/]*)
9179   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
9180   ;;
9181   *)
9182   ac_save_IFS=$IFS; IFS=$ac_path_separator
9183 ac_dummy="$PATH:/usr/local/ncurses/bin"
9184 for ac_dir in $ac_dummy; do
9185   IFS=$ac_save_IFS
9186   test -z "$ac_dir" && ac_dir=.
9187   if $as_executable_p "$ac_dir/$ac_word"; then
9188    ac_cv_path_TIC="$ac_dir/$ac_word"
9189    echo "$as_me:9189: found $ac_dir/$ac_word" >&5
9190    break
9191 fi
9192 done
9193
9194   ;;
9195 esac
9196 fi
9197 TIC=$ac_cv_path_TIC
9198
9199 if test -n "$TIC"; then
9200   echo "$as_me:9200: result: $TIC" >&5
9201 echo "${ECHO_T}$TIC" >&6
9202 else
9203   echo "$as_me:9203: result: no" >&5
9204 echo "${ECHO_T}no" >&6
9205 fi
9206
9207   test -n "$TIC" && break
9208 done
9209 test -n "$TIC" || TIC="$TIC"
9210
9211 cf_path_prog=""
9212 cf_path_args=""
9213 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9214 for cf_temp in $ac_cv_path_TIC
9215 do
9216         if test -z "$cf_path_prog" ; then
9217                 if test "$with_full_paths" = yes ; then
9218
9219 if test "x$prefix" != xNONE; then
9220         cf_path_syntax="$prefix"
9221 else
9222         cf_path_syntax="$ac_default_prefix"
9223 fi
9224
9225 case ".$cf_temp" in
9226 (.\$\(*\)*|.\'*\'*)
9227         ;;
9228 (..|./*|.\\*)
9229         ;;
9230 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9231         ;;
9232 (.\$\{*prefix\}*|.\$\{*dir\}*)
9233         eval cf_temp="$cf_temp"
9234         case ".$cf_temp" in
9235         (.NONE/*)
9236                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9237                 ;;
9238         esac
9239         ;;
9240 (.no|.NONE/*)
9241         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9242         ;;
9243 (*)
9244         break
9245         ;;
9246 esac
9247
9248                         cf_path_prog="$cf_temp"
9249                 else
9250                         cf_path_prog="`basename "$cf_temp"`"
9251                 fi
9252         elif test -z "$cf_path_args" ; then
9253                 cf_path_args="$cf_temp"
9254         else
9255                 cf_path_args="$cf_path_args $cf_temp"
9256         fi
9257 done
9258 IFS="$cf_save_ifs"
9259
9260 if test -n "$cf_path_prog" ; then
9261
9262 echo "${as_me:-configure}:9262: testing defining path for ${cf_path_prog} ..." 1>&5
9263
9264 cat >>confdefs.h <<EOF
9265 #define TIC_PATH "$cf_path_prog"
9266 EOF
9267
9268         test -n "$cf_path_args" &&
9269 cat >>confdefs.h <<EOF
9270 #define TIC_ARGS "$cf_path_args"
9271 EOF
9272
9273 fi
9274
9275                 if test -z "$TIC"
9276                 then
9277                         { echo "$as_me:9277: WARNING: no tic program found for fallbacks" >&5
9278 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
9279                 fi
9280
9281 fi;
9282
9283 # Check whether --with-infocmp-path or --without-infocmp-path was given.
9284 if test "${with_infocmp_path+set}" = set; then
9285   withval="$with_infocmp_path"
9286   echo "$as_me:9286: checking for infocmp program for fallbacks" >&5
9287 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
9288                 INFOCMP=$withval
9289                 echo "$as_me:9289: result: $INFOCMP" >&5
9290 echo "${ECHO_T}$INFOCMP" >&6
9291
9292 if test "x$prefix" != xNONE; then
9293         cf_path_syntax="$prefix"
9294 else
9295         cf_path_syntax="$ac_default_prefix"
9296 fi
9297
9298 case ".$INFOCMP" in
9299 (.\$\(*\)*|.\'*\'*)
9300         ;;
9301 (..|./*|.\\*)
9302         ;;
9303 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9304         ;;
9305 (.\$\{*prefix\}*|.\$\{*dir\}*)
9306         eval INFOCMP="$INFOCMP"
9307         case ".$INFOCMP" in
9308         (.NONE/*)
9309                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9310                 ;;
9311         esac
9312         ;;
9313 (.no|.NONE/*)
9314         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
9315         ;;
9316 (*)
9317         { { echo "$as_me:9317: error: expected a pathname, not \"$INFOCMP\"" >&5
9318 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
9319    { (exit 1); exit 1; }; }
9320         ;;
9321 esac
9322
9323 else
9324
9325 test -z "$INFOCMP" && INFOCMP="infocmp"
9326 for ac_prog in $INFOCMP infocmp
9327 do
9328   # Extract the first word of "$ac_prog", so it can be a program name with args.
9329 set dummy $ac_prog; ac_word=$2
9330 echo "$as_me:9330: checking for $ac_word" >&5
9331 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9332 if test "${ac_cv_path_INFOCMP+set}" = set; then
9333   echo $ECHO_N "(cached) $ECHO_C" >&6
9334 else
9335   case $INFOCMP in
9336   [\\/]* | ?:[\\/]*)
9337   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
9338   ;;
9339   *)
9340   ac_save_IFS=$IFS; IFS=$ac_path_separator
9341 ac_dummy="$PATH:/usr/local/ncurses/bin"
9342 for ac_dir in $ac_dummy; do
9343   IFS=$ac_save_IFS
9344   test -z "$ac_dir" && ac_dir=.
9345   if $as_executable_p "$ac_dir/$ac_word"; then
9346    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
9347    echo "$as_me:9347: found $ac_dir/$ac_word" >&5
9348    break
9349 fi
9350 done
9351
9352   ;;
9353 esac
9354 fi
9355 INFOCMP=$ac_cv_path_INFOCMP
9356
9357 if test -n "$INFOCMP"; then
9358   echo "$as_me:9358: result: $INFOCMP" >&5
9359 echo "${ECHO_T}$INFOCMP" >&6
9360 else
9361   echo "$as_me:9361: result: no" >&5
9362 echo "${ECHO_T}no" >&6
9363 fi
9364
9365   test -n "$INFOCMP" && break
9366 done
9367 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
9368
9369 cf_path_prog=""
9370 cf_path_args=""
9371 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
9372 for cf_temp in $ac_cv_path_INFOCMP
9373 do
9374         if test -z "$cf_path_prog" ; then
9375                 if test "$with_full_paths" = yes ; then
9376
9377 if test "x$prefix" != xNONE; then
9378         cf_path_syntax="$prefix"
9379 else
9380         cf_path_syntax="$ac_default_prefix"
9381 fi
9382
9383 case ".$cf_temp" in
9384 (.\$\(*\)*|.\'*\'*)
9385         ;;
9386 (..|./*|.\\*)
9387         ;;
9388 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9389         ;;
9390 (.\$\{*prefix\}*|.\$\{*dir\}*)
9391         eval cf_temp="$cf_temp"
9392         case ".$cf_temp" in
9393         (.NONE/*)
9394                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9395                 ;;
9396         esac
9397         ;;
9398 (.no|.NONE/*)
9399         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
9400         ;;
9401 (*)
9402         break
9403         ;;
9404 esac
9405
9406                         cf_path_prog="$cf_temp"
9407                 else
9408                         cf_path_prog="`basename "$cf_temp"`"
9409                 fi
9410         elif test -z "$cf_path_args" ; then
9411                 cf_path_args="$cf_temp"
9412         else
9413                 cf_path_args="$cf_path_args $cf_temp"
9414         fi
9415 done
9416 IFS="$cf_save_ifs"
9417
9418 if test -n "$cf_path_prog" ; then
9419
9420 echo "${as_me:-configure}:9420: testing defining path for ${cf_path_prog} ..." 1>&5
9421
9422 cat >>confdefs.h <<EOF
9423 #define INFOCMP_PATH "$cf_path_prog"
9424 EOF
9425
9426         test -n "$cf_path_args" &&
9427 cat >>confdefs.h <<EOF
9428 #define INFOCMP_ARGS "$cf_path_args"
9429 EOF
9430
9431 fi
9432
9433                 if test -z "$INFOCMP"
9434                 then
9435                         { echo "$as_me:9435: WARNING: no infocmp program found for fallbacks" >&5
9436 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
9437                 fi
9438
9439 fi;
9440
9441         test -z "$TIC" && FALLBACK_LIST=
9442         test -z "$INFOCMP" && FALLBACK_LIST=
9443         if test -z "$FALLBACK_LIST"
9444         then
9445                 { echo "$as_me:9445: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
9446 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
9447         fi
9448 fi
9449
9450 USE_FALLBACKS=
9451 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
9452
9453 echo "$as_me:9453: checking if you want modern xterm or antique" >&5
9454 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
9455
9456 # Check whether --with-xterm-new or --without-xterm-new was given.
9457 if test "${with_xterm_new+set}" = set; then
9458   withval="$with_xterm_new"
9459   with_xterm_new=$withval
9460 else
9461   with_xterm_new=yes
9462 fi;
9463 case "$with_xterm_new" in
9464 (no) with_xterm_new=xterm-old;;
9465 (*)      with_xterm_new=xterm-new;;
9466 esac
9467 echo "$as_me:9467: result: $with_xterm_new" >&5
9468 echo "${ECHO_T}$with_xterm_new" >&6
9469 WHICH_XTERM=$with_xterm_new
9470
9471 case $host_os in
9472 (*linux-gnu|*cygwin|*mingw32|*msys)
9473         want_xterm_kbs=DEL
9474         ;;
9475 (*)
9476         want_xterm_kbs=BS
9477         ;;
9478 esac
9479
9480 echo "$as_me:9480: checking if xterm backspace sends BS or DEL" >&5
9481 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
9482
9483 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
9484 if test "${with_xterm_kbs+set}" = set; then
9485   withval="$with_xterm_kbs"
9486   with_xterm_kbs=$withval
9487 else
9488   with_xterm_kbs=auto
9489 fi;
9490 case x$with_xterm_kbs in
9491 (xyes|xno|xBS|xbs|x8)
9492         with_xterm_kbs=BS
9493         ;;
9494 (xDEL|xdel|x127)
9495         with_xterm_kbs=DEL
9496         ;;
9497 (xauto)
9498         with_xterm_kbs=$want_xterm_kbs
9499         ;;
9500 (*)
9501         with_xterm_kbs=$withval
9502         ;;
9503 esac
9504 echo "$as_me:9504: result: $with_xterm_kbs" >&5
9505 echo "${ECHO_T}$with_xterm_kbs" >&6
9506 XTERM_KBS=$with_xterm_kbs
9507
9508 if test "x$with_xterm_kbs" != "x$want_xterm_kbs"
9509 then
9510         { echo "$as_me:9510: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&5
9511 echo "$as_me: WARNING: expected --with-xterm-kbs=$want_xterm_kbs for $host_os, have $with_xterm_kbs" >&2;}
9512 fi
9513
9514 MAKE_TERMINFO=
9515 if test "$use_database" = no ; then
9516         TERMINFO="${datadir}/terminfo"
9517         MAKE_TERMINFO="#"
9518 else
9519
9520 echo "$as_me:9520: checking for list of terminfo directories" >&5
9521 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9522
9523 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9524 if test "${with_terminfo_dirs+set}" = set; then
9525   withval="$with_terminfo_dirs"
9526
9527 else
9528   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9529 fi;
9530 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9531 cf_dst_path=
9532 for cf_src_path in $withval
9533 do
9534
9535 if test "x$prefix" != xNONE; then
9536         cf_path_syntax="$prefix"
9537 else
9538         cf_path_syntax="$ac_default_prefix"
9539 fi
9540
9541 case ".$cf_src_path" in
9542 (.\$\(*\)*|.\'*\'*)
9543         ;;
9544 (..|./*|.\\*)
9545         ;;
9546 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9547         ;;
9548 (.\$\{*prefix\}*|.\$\{*dir\}*)
9549         eval cf_src_path="$cf_src_path"
9550         case ".$cf_src_path" in
9551         (.NONE/*)
9552                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9553                 ;;
9554         esac
9555         ;;
9556 (.no|.NONE/*)
9557         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9558         ;;
9559 (*)
9560         { { echo "$as_me:9560: error: expected a pathname, not \"$cf_src_path\"" >&5
9561 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9562    { (exit 1); exit 1; }; }
9563         ;;
9564 esac
9565
9566   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9567   cf_dst_path="${cf_dst_path}${cf_src_path}"
9568 done
9569 IFS="$ac_save_ifs"
9570
9571 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9572 # so we have to check/work around.  We do prefer the result of "eval"...
9573 eval cf_dst_eval="$cf_dst_path"
9574 case "x$cf_dst_eval" in
9575 (xNONE*)
9576         TERMINFO_DIRS=$cf_dst_path
9577         ;;
9578 (*)
9579         TERMINFO_DIRS="$cf_dst_eval"
9580         ;;
9581 esac
9582
9583 echo "$as_me:9583: result: $TERMINFO_DIRS" >&5
9584 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9585 test -n "$TERMINFO_DIRS" &&
9586 cat >>confdefs.h <<EOF
9587 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9588 EOF
9589
9590 case "x$TERMINFO" in
9591 x???:*)
9592         { echo "$as_me:9592: WARNING: ignoring non-directory/file TERMINFO value" >&5
9593 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9594         unset TERMINFO
9595         ;;
9596 esac
9597
9598 echo "$as_me:9598: checking for default terminfo directory" >&5
9599 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9600
9601 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9602 if test "${with_default_terminfo_dir+set}" = set; then
9603   withval="$with_default_terminfo_dir"
9604
9605 else
9606   withval="${TERMINFO:-${datadir}/terminfo}"
9607 fi; if test -n "${datadir}/terminfo" ; then
9608
9609 if test "x$prefix" != xNONE; then
9610         cf_path_syntax="$prefix"
9611 else
9612         cf_path_syntax="$ac_default_prefix"
9613 fi
9614
9615 case ".$withval" in
9616 (.\$\(*\)*|.\'*\'*)
9617         ;;
9618 (..|./*|.\\*)
9619         ;;
9620 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9621         ;;
9622 (.\$\{*prefix\}*|.\$\{*dir\}*)
9623         eval withval="$withval"
9624         case ".$withval" in
9625         (.NONE/*)
9626                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9627                 ;;
9628         esac
9629         ;;
9630 (.no|.NONE/*)
9631         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9632         ;;
9633 (*)
9634         { { echo "$as_me:9634: error: expected a pathname, not \"$withval\"" >&5
9635 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9636    { (exit 1); exit 1; }; }
9637         ;;
9638 esac
9639
9640 fi
9641 eval TERMINFO="$withval"
9642
9643 echo "$as_me:9643: result: $TERMINFO" >&5
9644 echo "${ECHO_T}$TERMINFO" >&6
9645
9646 cat >>confdefs.h <<EOF
9647 #define TERMINFO "$TERMINFO"
9648 EOF
9649
9650 fi
9651
9652 ###     use option --disable-big-core to make tic run on small machines
9653 ###     We need 4Mb, check if we can allocate 50% more than that.
9654 echo "$as_me:9654: checking if big-core option selected" >&5
9655 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9656
9657 # Check whether --enable-big-core or --disable-big-core was given.
9658 if test "${enable_big_core+set}" = set; then
9659   enableval="$enable_big_core"
9660   with_big_core=$enableval
9661 else
9662   if test "$cross_compiling" = yes; then
9663   with_big_core=no
9664 else
9665   cat >"conftest.$ac_ext" <<_ACEOF
9666 #line 9666 "configure"
9667 #include "confdefs.h"
9668
9669 #include <stdlib.h>
9670 #include <string.h>
9671 int main() {
9672         unsigned long n = 6000000L;
9673         char *s = malloc(n);
9674         if (s != 0)
9675                 s[0] = s[n-1] = 0;
9676         ${cf_cv_main_return:-return}(s == 0);
9677 }
9678 _ACEOF
9679 rm -f "conftest$ac_exeext"
9680 if { (eval echo "$as_me:9680: \"$ac_link\"") >&5
9681   (eval $ac_link) 2>&5
9682   ac_status=$?
9683   echo "$as_me:9683: \$? = $ac_status" >&5
9684   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9685   { (eval echo "$as_me:9685: \"$ac_try\"") >&5
9686   (eval $ac_try) 2>&5
9687   ac_status=$?
9688   echo "$as_me:9688: \$? = $ac_status" >&5
9689   (exit "$ac_status"); }; }; then
9690   with_big_core=yes
9691 else
9692   echo "$as_me: program exited with status $ac_status" >&5
9693 echo "$as_me: failed program was:" >&5
9694 cat "conftest.$ac_ext" >&5
9695 with_big_core=no
9696 fi
9697 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9698 fi
9699 fi;
9700 echo "$as_me:9700: result: $with_big_core" >&5
9701 echo "${ECHO_T}$with_big_core" >&6
9702 test "x$with_big_core" = "xyes" &&
9703 cat >>confdefs.h <<\EOF
9704 #define HAVE_BIG_CORE 1
9705 EOF
9706
9707 ### ISO C only guarantees 512-char strings, we have tables which load faster
9708 ### when constructed using "big" strings.  More than the C compiler, the awk
9709 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9710 echo "$as_me:9710: checking if big-strings option selected" >&5
9711 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9712
9713 # Check whether --enable-big-strings or --disable-big-strings was given.
9714 if test "${enable_big_strings+set}" = set; then
9715   enableval="$enable_big_strings"
9716   with_big_strings=$enableval
9717 else
9718
9719         case x$AWK in
9720         (x)
9721                 eval with_big_strings=no
9722                 ;;
9723         (*)
9724                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9725                         | $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
9726                         eval with_big_strings=yes
9727                 else
9728                         eval with_big_strings=no
9729                 fi
9730                 ;;
9731         esac
9732
9733 fi;
9734 echo "$as_me:9734: result: $with_big_strings" >&5
9735 echo "${ECHO_T}$with_big_strings" >&6
9736
9737 USE_BIG_STRINGS=0
9738 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9739
9740 ###     use option --enable-termcap to compile in the termcap fallback support
9741 echo "$as_me:9741: checking if you want termcap-fallback support" >&5
9742 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9743
9744 # Check whether --enable-termcap or --disable-termcap was given.
9745 if test "${enable_termcap+set}" = set; then
9746   enableval="$enable_termcap"
9747   with_termcap=$enableval
9748 else
9749   with_termcap=no
9750 fi;
9751 echo "$as_me:9751: result: $with_termcap" >&5
9752 echo "${ECHO_T}$with_termcap" >&6
9753
9754 NCURSES_USE_TERMCAP=0
9755 if test "x$with_termcap" != "xyes" ; then
9756         if test "$use_database" = no ; then
9757                 if test -z "$with_fallback" ; then
9758                         { { echo "$as_me:9758: error: You have disabled the database w/o specifying fallbacks" >&5
9759 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9760    { (exit 1); exit 1; }; }
9761                 fi
9762         fi
9763
9764 cat >>confdefs.h <<\EOF
9765 #define PURE_TERMINFO 1
9766 EOF
9767
9768 else
9769
9770         if test "$with_ticlib" != no ; then
9771                 { { echo "$as_me:9771: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9772 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9773    { (exit 1); exit 1; }; }
9774         fi
9775
9776         NCURSES_USE_TERMCAP=1
9777         echo "$as_me:9777: checking for list of termcap files" >&5
9778 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9779
9780 # Check whether --with-termpath or --without-termpath was given.
9781 if test "${with_termpath+set}" = set; then
9782   withval="$with_termpath"
9783
9784 else
9785   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9786 fi;
9787 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9788 cf_dst_path=
9789 for cf_src_path in $withval
9790 do
9791
9792 if test "x$prefix" != xNONE; then
9793         cf_path_syntax="$prefix"
9794 else
9795         cf_path_syntax="$ac_default_prefix"
9796 fi
9797
9798 case ".$cf_src_path" in
9799 (.\$\(*\)*|.\'*\'*)
9800         ;;
9801 (..|./*|.\\*)
9802         ;;
9803 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9804         ;;
9805 (.\$\{*prefix\}*|.\$\{*dir\}*)
9806         eval cf_src_path="$cf_src_path"
9807         case ".$cf_src_path" in
9808         (.NONE/*)
9809                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9810                 ;;
9811         esac
9812         ;;
9813 (.no|.NONE/*)
9814         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9815         ;;
9816 (*)
9817         { { echo "$as_me:9817: error: expected a pathname, not \"$cf_src_path\"" >&5
9818 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9819    { (exit 1); exit 1; }; }
9820         ;;
9821 esac
9822
9823   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9824   cf_dst_path="${cf_dst_path}${cf_src_path}"
9825 done
9826 IFS="$ac_save_ifs"
9827
9828 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9829 # so we have to check/work around.  We do prefer the result of "eval"...
9830 eval cf_dst_eval="$cf_dst_path"
9831 case "x$cf_dst_eval" in
9832 (xNONE*)
9833         TERMPATH=$cf_dst_path
9834         ;;
9835 (*)
9836         TERMPATH="$cf_dst_eval"
9837         ;;
9838 esac
9839
9840         echo "$as_me:9840: result: $TERMPATH" >&5
9841 echo "${ECHO_T}$TERMPATH" >&6
9842         test -n "$TERMPATH" &&
9843 cat >>confdefs.h <<EOF
9844 #define TERMPATH "$TERMPATH"
9845 EOF
9846
9847         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9848         echo "$as_me:9848: checking if fast termcap-loader is needed" >&5
9849 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9850
9851 # Check whether --enable-getcap or --disable-getcap was given.
9852 if test "${enable_getcap+set}" = set; then
9853   enableval="$enable_getcap"
9854   with_getcap=$enableval
9855 else
9856   with_getcap=no
9857 fi;
9858         echo "$as_me:9858: result: $with_getcap" >&5
9859 echo "${ECHO_T}$with_getcap" >&6
9860         test "x$with_getcap" = "xyes" &&
9861 cat >>confdefs.h <<\EOF
9862 #define USE_GETCAP 1
9863 EOF
9864
9865         echo "$as_me:9865: checking if translated termcaps will be cached in ~/.terminfo" >&5
9866 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9867
9868 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9869 if test "${enable_getcap_cache+set}" = set; then
9870   enableval="$enable_getcap_cache"
9871   with_getcap_cache=$enableval
9872 else
9873   with_getcap_cache=no
9874 fi;
9875         echo "$as_me:9875: result: $with_getcap_cache" >&5
9876 echo "${ECHO_T}$with_getcap_cache" >&6
9877         test "x$with_getcap_cache" = "xyes" &&
9878 cat >>confdefs.h <<\EOF
9879 #define USE_GETCAP_CACHE 1
9880 EOF
9881
9882 fi
9883
9884 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9885 echo "$as_me:9885: checking if ~/.terminfo is wanted" >&5
9886 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9887
9888 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9889 if test "${enable_home_terminfo+set}" = set; then
9890   enableval="$enable_home_terminfo"
9891   with_home_terminfo=$enableval
9892 else
9893   with_home_terminfo=yes
9894 fi;
9895 echo "$as_me:9895: result: $with_home_terminfo" >&5
9896 echo "${ECHO_T}$with_home_terminfo" >&6
9897 test "x$with_home_terminfo" = "xyes" &&
9898 cat >>confdefs.h <<\EOF
9899 #define USE_HOME_TERMINFO 1
9900 EOF
9901
9902 echo "$as_me:9902: checking if you want to permit root to use ncurses environment variables" >&5
9903 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9904
9905 # Check whether --enable-root-environ or --disable-root-environ was given.
9906 if test "${enable_root_environ+set}" = set; then
9907   enableval="$enable_root_environ"
9908   with_root_environ=$enableval
9909 else
9910   with_root_environ=yes
9911 fi;
9912 echo "$as_me:9912: result: $with_root_environ" >&5
9913 echo "${ECHO_T}$with_root_environ" >&6
9914 test "x$with_root_environ" = xyes &&
9915 cat >>confdefs.h <<\EOF
9916 #define USE_ROOT_ENVIRON 1
9917 EOF
9918
9919 echo "$as_me:9919: checking if you want to permit setuid programs to access all files" >&5
9920 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9921
9922 # Check whether --enable-root-access or --disable-root-access was given.
9923 if test "${enable_root_access+set}" = set; then
9924   enableval="$enable_root_access"
9925   with_root_access=$enableval
9926 else
9927   with_root_access=yes
9928 fi;
9929 echo "$as_me:9929: result: $with_root_access" >&5
9930 echo "${ECHO_T}$with_root_access" >&6
9931 test "x$with_root_access" = xyes &&
9932 cat >>confdefs.h <<\EOF
9933 #define USE_ROOT_ACCESS 1
9934 EOF
9935
9936 echo "$as_me:9936: checking if you want to permit setuid use of ncurses environment variables" >&5
9937 echo $ECHO_N "checking if you want to permit setuid use of ncurses environment variables... $ECHO_C" >&6
9938
9939 # Check whether --enable-setuid-environ or --disable-setuid-environ was given.
9940 if test "${enable_setuid_environ+set}" = set; then
9941   enableval="$enable_setuid_environ"
9942   with_setuid_environ=$enableval
9943 else
9944   with_setuid_environ=$with_root_environ
9945 fi;
9946 echo "$as_me:9946: result: $with_setuid_environ" >&5
9947 echo "${ECHO_T}$with_setuid_environ" >&6
9948 test "x$with_setuid_environ" = xyes &&
9949 cat >>confdefs.h <<\EOF
9950 #define USE_SETUID_ENVIRON 1
9951 EOF
9952
9953 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9954 ###   to reduce storage requirements for the terminfo database.
9955
9956 for ac_header in \
9957 unistd.h \
9958
9959 do
9960 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9961 echo "$as_me:9961: checking for $ac_header" >&5
9962 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9963 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9964   echo $ECHO_N "(cached) $ECHO_C" >&6
9965 else
9966   cat >"conftest.$ac_ext" <<_ACEOF
9967 #line 9967 "configure"
9968 #include "confdefs.h"
9969 #include <$ac_header>
9970 _ACEOF
9971 if { (eval echo "$as_me:9971: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9972   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9973   ac_status=$?
9974   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9975   rm -f conftest.er1
9976   cat conftest.err >&5
9977   echo "$as_me:9977: \$? = $ac_status" >&5
9978   (exit "$ac_status"); } >/dev/null; then
9979   if test -s conftest.err; then
9980     ac_cpp_err=$ac_c_preproc_warn_flag
9981   else
9982     ac_cpp_err=
9983   fi
9984 else
9985   ac_cpp_err=yes
9986 fi
9987 if test -z "$ac_cpp_err"; then
9988   eval "$as_ac_Header=yes"
9989 else
9990   echo "$as_me: failed program was:" >&5
9991   cat "conftest.$ac_ext" >&5
9992   eval "$as_ac_Header=no"
9993 fi
9994 rm -f conftest.err "conftest.$ac_ext"
9995 fi
9996 echo "$as_me:9996: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9997 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9998 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9999   cat >>confdefs.h <<EOF
10000 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10001 EOF
10002
10003 fi
10004 done
10005
10006 for ac_func in \
10007         remove \
10008         unlink
10009 do
10010 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10011 echo "$as_me:10011: checking for $ac_func" >&5
10012 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10013 if eval "test \"\${$as_ac_var+set}\" = set"; then
10014   echo $ECHO_N "(cached) $ECHO_C" >&6
10015 else
10016   cat >"conftest.$ac_ext" <<_ACEOF
10017 #line 10017 "configure"
10018 #include "confdefs.h"
10019 #define $ac_func autoconf_temporary
10020 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10021 #undef $ac_func
10022
10023 #ifdef __cplusplus
10024 extern "C"
10025 #endif
10026
10027 /* We use char because int might match the return type of a gcc2
10028    builtin and then its argument prototype would still apply.  */
10029 char $ac_func (void);
10030
10031 int
10032 main (void)
10033 {
10034
10035 /* The GNU C library defines stubs for functions which it implements
10036     to always fail with ENOSYS.  Some functions are actually named
10037     something starting with __ and the normal name is an alias.  */
10038 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10039 #error found stub for $ac_func
10040 #endif
10041
10042         return $ac_func ();
10043   ;
10044   return 0;
10045 }
10046 _ACEOF
10047 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10048 if { (eval echo "$as_me:10048: \"$ac_link\"") >&5
10049   (eval $ac_link) 2>&5
10050   ac_status=$?
10051   echo "$as_me:10051: \$? = $ac_status" >&5
10052   (exit "$ac_status"); } &&
10053          { ac_try='test -s "conftest$ac_exeext"'
10054   { (eval echo "$as_me:10054: \"$ac_try\"") >&5
10055   (eval $ac_try) 2>&5
10056   ac_status=$?
10057   echo "$as_me:10057: \$? = $ac_status" >&5
10058   (exit "$ac_status"); }; }; then
10059   eval "$as_ac_var=yes"
10060 else
10061   echo "$as_me: failed program was:" >&5
10062 cat "conftest.$ac_ext" >&5
10063 eval "$as_ac_var=no"
10064 fi
10065 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10066 fi
10067 echo "$as_me:10067: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10068 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10069 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10070   cat >>confdefs.h <<EOF
10071 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10072 EOF
10073
10074 fi
10075 done
10076
10077 if test "$cross_compiling" = yes ; then
10078
10079 for ac_func in \
10080                 link \
10081                 symlink
10082 do
10083 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10084 echo "$as_me:10084: checking for $ac_func" >&5
10085 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10086 if eval "test \"\${$as_ac_var+set}\" = set"; then
10087   echo $ECHO_N "(cached) $ECHO_C" >&6
10088 else
10089   cat >"conftest.$ac_ext" <<_ACEOF
10090 #line 10090 "configure"
10091 #include "confdefs.h"
10092 #define $ac_func autoconf_temporary
10093 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
10094 #undef $ac_func
10095
10096 #ifdef __cplusplus
10097 extern "C"
10098 #endif
10099
10100 /* We use char because int might match the return type of a gcc2
10101    builtin and then its argument prototype would still apply.  */
10102 char $ac_func (void);
10103
10104 int
10105 main (void)
10106 {
10107
10108 /* The GNU C library defines stubs for functions which it implements
10109     to always fail with ENOSYS.  Some functions are actually named
10110     something starting with __ and the normal name is an alias.  */
10111 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10112 #error found stub for $ac_func
10113 #endif
10114
10115         return $ac_func ();
10116   ;
10117   return 0;
10118 }
10119 _ACEOF
10120 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10121 if { (eval echo "$as_me:10121: \"$ac_link\"") >&5
10122   (eval $ac_link) 2>&5
10123   ac_status=$?
10124   echo "$as_me:10124: \$? = $ac_status" >&5
10125   (exit "$ac_status"); } &&
10126          { ac_try='test -s "conftest$ac_exeext"'
10127   { (eval echo "$as_me:10127: \"$ac_try\"") >&5
10128   (eval $ac_try) 2>&5
10129   ac_status=$?
10130   echo "$as_me:10130: \$? = $ac_status" >&5
10131   (exit "$ac_status"); }; }; then
10132   eval "$as_ac_var=yes"
10133 else
10134   echo "$as_me: failed program was:" >&5
10135 cat "conftest.$ac_ext" >&5
10136 eval "$as_ac_var=no"
10137 fi
10138 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10139 fi
10140 echo "$as_me:10140: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10141 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10142 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10143   cat >>confdefs.h <<EOF
10144 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10145 EOF
10146
10147 fi
10148 done
10149
10150 else
10151         echo "$as_me:10151: checking if link/symlink functions work" >&5
10152 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
10153 if test "${cf_cv_link_funcs+set}" = set; then
10154   echo $ECHO_N "(cached) $ECHO_C" >&6
10155 else
10156
10157                 cf_cv_link_funcs=
10158                 for cf_func in link symlink ; do
10159                         if test "$cross_compiling" = yes; then
10160
10161                         eval 'ac_cv_func_'$cf_func'=error'
10162 else
10163   cat >"conftest.$ac_ext" <<_ACEOF
10164 #line 10164 "configure"
10165 #include "confdefs.h"
10166
10167 $ac_includes_default
10168
10169 int main(void)
10170 {
10171         int fail = 0;
10172         char *src = "conftest.tmp";
10173         char *dst = "conftest.chk";
10174         struct stat src_sb, dst_sb;
10175         FILE *fp = fopen(src, "w");
10176         if (fp == 0) { fail = 3; } else {
10177                 fclose(fp); stat(src, &src_sb);
10178                 if ($cf_func(src, dst) < 0) {
10179                         fail = 1;
10180                 } else if (stat(dst, &dst_sb) < 0) {
10181                         fail = 2;
10182                 } else {
10183                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
10184                         if (diff < 0) diff = -diff;
10185                         if (diff > 2) fail = 3;
10186                 }
10187         }
10188 #ifdef HAVE_UNLINK
10189         unlink(dst); unlink(src);
10190 #else
10191         remove(dst); remove(src);
10192 #endif
10193         ${cf_cv_main_return:-return} (fail);
10194 }
10195
10196 _ACEOF
10197 rm -f "conftest$ac_exeext"
10198 if { (eval echo "$as_me:10198: \"$ac_link\"") >&5
10199   (eval $ac_link) 2>&5
10200   ac_status=$?
10201   echo "$as_me:10201: \$? = $ac_status" >&5
10202   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
10203   { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204   (eval $ac_try) 2>&5
10205   ac_status=$?
10206   echo "$as_me:10206: \$? = $ac_status" >&5
10207   (exit "$ac_status"); }; }; then
10208
10209                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
10210                         eval 'ac_cv_func_'$cf_func'=yes'
10211 else
10212   echo "$as_me: program exited with status $ac_status" >&5
10213 echo "$as_me: failed program was:" >&5
10214 cat "conftest.$ac_ext" >&5
10215
10216                         eval 'ac_cv_func_'$cf_func'=no'
10217 fi
10218 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
10219 fi
10220                 done
10221                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
10222
10223 fi
10224 echo "$as_me:10224: result: $cf_cv_link_funcs" >&5
10225 echo "${ECHO_T}$cf_cv_link_funcs" >&6
10226         test "$ac_cv_func_link"    = yes &&
10227 cat >>confdefs.h <<\EOF
10228 #define HAVE_LINK 1
10229 EOF
10230
10231         test "$ac_cv_func_symlink" = yes &&
10232 cat >>confdefs.h <<\EOF
10233 #define HAVE_SYMLINK 1
10234 EOF
10235
10236 fi
10237
10238 with_links=no
10239 with_symlinks=no
10240
10241 # soft links (symbolic links) are useful for some systems where hard links do
10242 # not work, or to make it simpler to copy terminfo trees around.
10243 if test "x$ac_cv_func_symlink" = xyes ; then
10244         echo "$as_me:10244: checking if tic should use symbolic links" >&5
10245 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
10246
10247 # Check whether --enable-symlinks or --disable-symlinks was given.
10248 if test "${enable_symlinks+set}" = set; then
10249   enableval="$enable_symlinks"
10250   with_symlinks=$enableval
10251 else
10252   with_symlinks=no
10253 fi;
10254         echo "$as_me:10254: result: $with_symlinks" >&5
10255 echo "${ECHO_T}$with_symlinks" >&6
10256 fi
10257
10258 # If we have hard links and did not choose to use soft links instead, there is
10259 # no reason to make this choice optional - use the hard links.
10260 if test "$with_symlinks" = no ; then
10261         echo "$as_me:10261: checking if tic should use hard links" >&5
10262 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
10263         if test "x$ac_cv_func_link" = xyes ; then
10264                 with_links=yes
10265         else
10266                 with_links=no
10267         fi
10268         echo "$as_me:10268: result: $with_links" >&5
10269 echo "${ECHO_T}$with_links" >&6
10270 fi
10271
10272 test "x$with_links" = xyes &&
10273 cat >>confdefs.h <<\EOF
10274 #define USE_LINKS 1
10275 EOF
10276
10277 test "x$with_symlinks" = xyes &&
10278 cat >>confdefs.h <<\EOF
10279 #define USE_SYMLINKS 1
10280 EOF
10281
10282 ###   use option --enable-broken-linker to force on use of broken-linker support
10283
10284 echo "$as_me:10284: checking if you want broken-linker support code" >&5
10285 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
10286
10287 # Check whether --enable-broken_linker or --disable-broken_linker was given.
10288 if test "${enable_broken_linker+set}" = set; then
10289   enableval="$enable_broken_linker"
10290   with_broken_linker=$enableval
10291 else
10292   with_broken_linker=no
10293 fi;
10294 echo "$as_me:10294: result: $with_broken_linker" >&5
10295 echo "${ECHO_T}$with_broken_linker" >&6
10296
10297 : "${BROKEN_LINKER:=0}"
10298 if test "x$with_broken_linker" = xyes ; then
10299
10300 cat >>confdefs.h <<\EOF
10301 #define BROKEN_LINKER 1
10302 EOF
10303
10304         BROKEN_LINKER=1
10305 fi
10306
10307 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
10308 echo "$as_me:10308: checking if tputs should process BSD-style prefix padding" >&5
10309 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
10310
10311 # Check whether --enable-bsdpad or --disable-bsdpad was given.
10312 if test "${enable_bsdpad+set}" = set; then
10313   enableval="$enable_bsdpad"
10314   with_bsdpad=$enableval
10315 else
10316   with_bsdpad=no
10317 fi;
10318 echo "$as_me:10318: result: $with_bsdpad" >&5
10319 echo "${ECHO_T}$with_bsdpad" >&6
10320 test "x$with_bsdpad" = xyes &&
10321 cat >>confdefs.h <<\EOF
10322 #define BSD_TPUTS 1
10323 EOF
10324
10325 ###   use option --enable-widec to turn on use of wide-character support
10326 NCURSES_CH_T=chtype
10327 NCURSES_LIBUTF8=0
10328
10329 NEED_WCHAR_H=0
10330 NCURSES_MBSTATE_T=0
10331 NCURSES_WCHAR_T=0
10332 NCURSES_WINT_T=0
10333
10334 # Check to define _XOPEN_SOURCE "automatically"
10335 CPPFLAGS_before_XOPEN="$CPPFLAGS"
10336
10337 echo "$as_me:10337: checking if the POSIX test-macros are already defined" >&5
10338 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
10339 if test "${cf_cv_posix_visible+set}" = set; then
10340   echo $ECHO_N "(cached) $ECHO_C" >&6
10341 else
10342
10343 cat >"conftest.$ac_ext" <<_ACEOF
10344 #line 10344 "configure"
10345 #include "confdefs.h"
10346 #include <stdio.h>
10347 int
10348 main (void)
10349 {
10350
10351 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
10352         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
10353         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
10354         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
10355 #error conflicting symbols found
10356 #endif
10357
10358   ;
10359   return 0;
10360 }
10361 _ACEOF
10362 rm -f "conftest.$ac_objext"
10363 if { (eval echo "$as_me:10363: \"$ac_compile\"") >&5
10364   (eval $ac_compile) 2>&5
10365   ac_status=$?
10366   echo "$as_me:10366: \$? = $ac_status" >&5
10367   (exit "$ac_status"); } &&
10368          { ac_try='test -s "conftest.$ac_objext"'
10369   { (eval echo "$as_me:10369: \"$ac_try\"") >&5
10370   (eval $ac_try) 2>&5
10371   ac_status=$?
10372   echo "$as_me:10372: \$? = $ac_status" >&5
10373   (exit "$ac_status"); }; }; then
10374   cf_cv_posix_visible=no
10375 else
10376   echo "$as_me: failed program was:" >&5
10377 cat "conftest.$ac_ext" >&5
10378 cf_cv_posix_visible=yes
10379 fi
10380 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10381
10382 fi
10383 echo "$as_me:10383: result: $cf_cv_posix_visible" >&5
10384 echo "${ECHO_T}$cf_cv_posix_visible" >&6
10385
10386 if test "$cf_cv_posix_visible" = no; then
10387
10388 cf_XOPEN_SOURCE=600
10389 cf_POSIX_C_SOURCE=199506L
10390 cf_xopen_source=
10391
10392 case "$host_os" in
10393 (aix[4-7]*)
10394         cf_xopen_source="-D_ALL_SOURCE"
10395         ;;
10396 (darwin[0-8].*)
10397         cf_xopen_source="-D_APPLE_C_SOURCE"
10398         ;;
10399 (darwin*)
10400         cf_xopen_source="-D_DARWIN_C_SOURCE"
10401         cf_XOPEN_SOURCE=
10402         ;;
10403 (freebsd*|dragonfly*|midnightbsd*)
10404         # 5.x headers associate
10405         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
10406         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
10407         cf_POSIX_C_SOURCE=200112L
10408         cf_XOPEN_SOURCE=600
10409         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10410         ;;
10411 (hpux11*)
10412         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
10413         ;;
10414 (hpux*)
10415         cf_xopen_source="-D_HPUX_SOURCE"
10416         ;;
10417 (irix[56].*)
10418         cf_xopen_source="-D_SGI_SOURCE"
10419         cf_XOPEN_SOURCE=
10420         ;;
10421 (linux*gnu|linux*gnuabi64|linux*gnuabin32|linux*gnueabi|linux*gnueabihf|linux*gnux32|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin|msys|mingw*|linux*uclibc)
10422
10423 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
10424
10425 echo "$as_me:10425: checking if this is the GNU C library" >&5
10426 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
10427 if test "${cf_cv_gnu_library+set}" = set; then
10428   echo $ECHO_N "(cached) $ECHO_C" >&6
10429 else
10430
10431 cat >"conftest.$ac_ext" <<_ACEOF
10432 #line 10432 "configure"
10433 #include "confdefs.h"
10434 #include <sys/types.h>
10435 int
10436 main (void)
10437 {
10438
10439         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
10440                 return 0;
10441         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
10442                 return 0;
10443         #else
10444         #       error not GNU C library
10445         #endif
10446   ;
10447   return 0;
10448 }
10449 _ACEOF
10450 rm -f "conftest.$ac_objext"
10451 if { (eval echo "$as_me:10451: \"$ac_compile\"") >&5
10452   (eval $ac_compile) 2>&5
10453   ac_status=$?
10454   echo "$as_me:10454: \$? = $ac_status" >&5
10455   (exit "$ac_status"); } &&
10456          { ac_try='test -s "conftest.$ac_objext"'
10457   { (eval echo "$as_me:10457: \"$ac_try\"") >&5
10458   (eval $ac_try) 2>&5
10459   ac_status=$?
10460   echo "$as_me:10460: \$? = $ac_status" >&5
10461   (exit "$ac_status"); }; }; then
10462   cf_cv_gnu_library=yes
10463 else
10464   echo "$as_me: failed program was:" >&5
10465 cat "conftest.$ac_ext" >&5
10466 cf_cv_gnu_library=no
10467 fi
10468 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10469
10470 fi
10471 echo "$as_me:10471: result: $cf_cv_gnu_library" >&5
10472 echo "${ECHO_T}$cf_cv_gnu_library" >&6
10473
10474 if test x$cf_cv_gnu_library = xyes; then
10475
10476         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
10477         # was changed to help a little.  newlib incorporated the change about 4
10478         # years later.
10479         echo "$as_me:10479: checking if _DEFAULT_SOURCE can be used as a basis" >&5
10480 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
10481 if test "${cf_cv_gnu_library_219+set}" = set; then
10482   echo $ECHO_N "(cached) $ECHO_C" >&6
10483 else
10484
10485                 cf_save="$CPPFLAGS"
10486
10487         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10488         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10489
10490                 cat >"conftest.$ac_ext" <<_ACEOF
10491 #line 10491 "configure"
10492 #include "confdefs.h"
10493 #include <sys/types.h>
10494 int
10495 main (void)
10496 {
10497
10498                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
10499                                 return 0;
10500                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
10501                                 return 0;
10502                         #else
10503                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
10504                         #endif
10505   ;
10506   return 0;
10507 }
10508 _ACEOF
10509 rm -f "conftest.$ac_objext"
10510 if { (eval echo "$as_me:10510: \"$ac_compile\"") >&5
10511   (eval $ac_compile) 2>&5
10512   ac_status=$?
10513   echo "$as_me:10513: \$? = $ac_status" >&5
10514   (exit "$ac_status"); } &&
10515          { ac_try='test -s "conftest.$ac_objext"'
10516   { (eval echo "$as_me:10516: \"$ac_try\"") >&5
10517   (eval $ac_try) 2>&5
10518   ac_status=$?
10519   echo "$as_me:10519: \$? = $ac_status" >&5
10520   (exit "$ac_status"); }; }; then
10521   cf_cv_gnu_library_219=yes
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat "conftest.$ac_ext" >&5
10525 cf_cv_gnu_library_219=no
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528                 CPPFLAGS="$cf_save"
10529
10530 fi
10531 echo "$as_me:10531: result: $cf_cv_gnu_library_219" >&5
10532 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10533
10534         if test "x$cf_cv_gnu_library_219" = xyes; then
10535                 cf_save="$CPPFLAGS"
10536                 echo "$as_me:10536: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10537 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10538 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10539   echo $ECHO_N "(cached) $ECHO_C" >&6
10540 else
10541
10542 cf_fix_cppflags=no
10543 cf_new_cflags=
10544 cf_new_cppflags=
10545 cf_new_extra_cppflags=
10546
10547 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10548 do
10549 case "$cf_fix_cppflags" in
10550 (no)
10551         case "$cf_add_cflags" in
10552         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10553                 case "$cf_add_cflags" in
10554                 (-D*)
10555                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10556
10557                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10558                                 && test -z "${cf_tst_cflags}" \
10559                                 && cf_fix_cppflags=yes
10560
10561                         if test "$cf_fix_cppflags" = yes ; then
10562
10563         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566                                 continue
10567                         elif test "${cf_tst_cflags}" = "\"'" ; then
10568
10569         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10570         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10571
10572                                 continue
10573                         fi
10574                         ;;
10575                 esac
10576                 case "$CPPFLAGS" in
10577                 (*$cf_add_cflags)
10578                         ;;
10579                 (*)
10580                         case "$cf_add_cflags" in
10581                         (-D*)
10582                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10583
10584 CPPFLAGS=`echo "$CPPFLAGS" | \
10585         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10586                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10587
10588                                 ;;
10589                         esac
10590
10591         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10592         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10593
10594                         ;;
10595                 esac
10596                 ;;
10597         (*)
10598
10599         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10600         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10601
10602                 ;;
10603         esac
10604         ;;
10605 (yes)
10606
10607         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10608         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10609
10610         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10611
10612         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10613                 && test -z "${cf_tst_cflags}" \
10614                 && cf_fix_cppflags=no
10615         ;;
10616 esac
10617 done
10618
10619 if test -n "$cf_new_cflags" ; then
10620
10621         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10622         CFLAGS="${CFLAGS}$cf_new_cflags"
10623
10624 fi
10625
10626 if test -n "$cf_new_cppflags" ; then
10627
10628         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10629         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10630
10631 fi
10632
10633 if test -n "$cf_new_extra_cppflags" ; then
10634
10635         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10636         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10637
10638 fi
10639
10640                         cat >"conftest.$ac_ext" <<_ACEOF
10641 #line 10641 "configure"
10642 #include "confdefs.h"
10643
10644                                 #include <limits.h>
10645                                 #include <sys/types.h>
10646
10647 int
10648 main (void)
10649 {
10650
10651                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10652                                         return 0;
10653                                 #else
10654                                 #       error GNU C library is too old
10655                                 #endif
10656   ;
10657   return 0;
10658 }
10659 _ACEOF
10660 rm -f "conftest.$ac_objext"
10661 if { (eval echo "$as_me:10661: \"$ac_compile\"") >&5
10662   (eval $ac_compile) 2>&5
10663   ac_status=$?
10664   echo "$as_me:10664: \$? = $ac_status" >&5
10665   (exit "$ac_status"); } &&
10666          { ac_try='test -s "conftest.$ac_objext"'
10667   { (eval echo "$as_me:10667: \"$ac_try\"") >&5
10668   (eval $ac_try) 2>&5
10669   ac_status=$?
10670   echo "$as_me:10670: \$? = $ac_status" >&5
10671   (exit "$ac_status"); }; }; then
10672   cf_cv_gnu_dftsrc_219=yes
10673 else
10674   echo "$as_me: failed program was:" >&5
10675 cat "conftest.$ac_ext" >&5
10676 cf_cv_gnu_dftsrc_219=no
10677 fi
10678 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10679
10680 fi
10681 echo "$as_me:10681: result: $cf_cv_gnu_dftsrc_219" >&5
10682 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10683                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10684         else
10685                 cf_cv_gnu_dftsrc_219=maybe
10686         fi
10687
10688         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10689
10690                 echo "$as_me:10690: checking if we must define _GNU_SOURCE" >&5
10691 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10692 if test "${cf_cv_gnu_source+set}" = set; then
10693   echo $ECHO_N "(cached) $ECHO_C" >&6
10694 else
10695
10696                 cat >"conftest.$ac_ext" <<_ACEOF
10697 #line 10697 "configure"
10698 #include "confdefs.h"
10699 #include <sys/types.h>
10700 int
10701 main (void)
10702 {
10703
10704                         #ifndef _XOPEN_SOURCE
10705                         #error  expected _XOPEN_SOURCE to be defined
10706                         #endif
10707   ;
10708   return 0;
10709 }
10710 _ACEOF
10711 rm -f "conftest.$ac_objext"
10712 if { (eval echo "$as_me:10712: \"$ac_compile\"") >&5
10713   (eval $ac_compile) 2>&5
10714   ac_status=$?
10715   echo "$as_me:10715: \$? = $ac_status" >&5
10716   (exit "$ac_status"); } &&
10717          { ac_try='test -s "conftest.$ac_objext"'
10718   { (eval echo "$as_me:10718: \"$ac_try\"") >&5
10719   (eval $ac_try) 2>&5
10720   ac_status=$?
10721   echo "$as_me:10721: \$? = $ac_status" >&5
10722   (exit "$ac_status"); }; }; then
10723   cf_cv_gnu_source=no
10724 else
10725   echo "$as_me: failed program was:" >&5
10726 cat "conftest.$ac_ext" >&5
10727 cf_save="$CPPFLAGS"
10728
10729 cf_fix_cppflags=no
10730 cf_new_cflags=
10731 cf_new_cppflags=
10732 cf_new_extra_cppflags=
10733
10734 for cf_add_cflags in -D_GNU_SOURCE
10735 do
10736 case "$cf_fix_cppflags" in
10737 (no)
10738         case "$cf_add_cflags" in
10739         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10740                 case "$cf_add_cflags" in
10741                 (-D*)
10742                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10743
10744                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10745                                 && test -z "${cf_tst_cflags}" \
10746                                 && cf_fix_cppflags=yes
10747
10748                         if test "$cf_fix_cppflags" = yes ; then
10749
10750         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10751         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10752
10753                                 continue
10754                         elif test "${cf_tst_cflags}" = "\"'" ; then
10755
10756         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10757         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10758
10759                                 continue
10760                         fi
10761                         ;;
10762                 esac
10763                 case "$CPPFLAGS" in
10764                 (*$cf_add_cflags)
10765                         ;;
10766                 (*)
10767                         case "$cf_add_cflags" in
10768                         (-D*)
10769                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10770
10771 CPPFLAGS=`echo "$CPPFLAGS" | \
10772         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10773                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10774
10775                                 ;;
10776                         esac
10777
10778         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10779         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10780
10781                         ;;
10782                 esac
10783                 ;;
10784         (*)
10785
10786         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10787         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10788
10789                 ;;
10790         esac
10791         ;;
10792 (yes)
10793
10794         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10795         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10796
10797         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10798
10799         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10800                 && test -z "${cf_tst_cflags}" \
10801                 && cf_fix_cppflags=no
10802         ;;
10803 esac
10804 done
10805
10806 if test -n "$cf_new_cflags" ; then
10807
10808         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10809         CFLAGS="${CFLAGS}$cf_new_cflags"
10810
10811 fi
10812
10813 if test -n "$cf_new_cppflags" ; then
10814
10815         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10816         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10817
10818 fi
10819
10820 if test -n "$cf_new_extra_cppflags" ; then
10821
10822         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10823         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10824
10825 fi
10826
10827                          cat >"conftest.$ac_ext" <<_ACEOF
10828 #line 10828 "configure"
10829 #include "confdefs.h"
10830 #include <sys/types.h>
10831 int
10832 main (void)
10833 {
10834
10835                                 #ifdef _XOPEN_SOURCE
10836                                 #error  expected _XOPEN_SOURCE to be undefined
10837                                 #endif
10838   ;
10839   return 0;
10840 }
10841 _ACEOF
10842 rm -f "conftest.$ac_objext"
10843 if { (eval echo "$as_me:10843: \"$ac_compile\"") >&5
10844   (eval $ac_compile) 2>&5
10845   ac_status=$?
10846   echo "$as_me:10846: \$? = $ac_status" >&5
10847   (exit "$ac_status"); } &&
10848          { ac_try='test -s "conftest.$ac_objext"'
10849   { (eval echo "$as_me:10849: \"$ac_try\"") >&5
10850   (eval $ac_try) 2>&5
10851   ac_status=$?
10852   echo "$as_me:10852: \$? = $ac_status" >&5
10853   (exit "$ac_status"); }; }; then
10854   cf_cv_gnu_source=no
10855 else
10856   echo "$as_me: failed program was:" >&5
10857 cat "conftest.$ac_ext" >&5
10858 cf_cv_gnu_source=yes
10859 fi
10860 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10861                         CPPFLAGS="$cf_save"
10862
10863 fi
10864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10865
10866 fi
10867 echo "$as_me:10867: result: $cf_cv_gnu_source" >&5
10868 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10869
10870                 if test "$cf_cv_gnu_source" = yes
10871                 then
10872                 echo "$as_me:10872: checking if we should also define _DEFAULT_SOURCE" >&5
10873 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10874 if test "${cf_cv_default_source+set}" = set; then
10875   echo $ECHO_N "(cached) $ECHO_C" >&6
10876 else
10877
10878         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10879         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10880
10881                         cat >"conftest.$ac_ext" <<_ACEOF
10882 #line 10882 "configure"
10883 #include "confdefs.h"
10884 #include <sys/types.h>
10885 int
10886 main (void)
10887 {
10888
10889                                 #ifdef _DEFAULT_SOURCE
10890                                 #error  expected _DEFAULT_SOURCE to be undefined
10891                                 #endif
10892   ;
10893   return 0;
10894 }
10895 _ACEOF
10896 rm -f "conftest.$ac_objext"
10897 if { (eval echo "$as_me:10897: \"$ac_compile\"") >&5
10898   (eval $ac_compile) 2>&5
10899   ac_status=$?
10900   echo "$as_me:10900: \$? = $ac_status" >&5
10901   (exit "$ac_status"); } &&
10902          { ac_try='test -s "conftest.$ac_objext"'
10903   { (eval echo "$as_me:10903: \"$ac_try\"") >&5
10904   (eval $ac_try) 2>&5
10905   ac_status=$?
10906   echo "$as_me:10906: \$? = $ac_status" >&5
10907   (exit "$ac_status"); }; }; then
10908   cf_cv_default_source=no
10909 else
10910   echo "$as_me: failed program was:" >&5
10911 cat "conftest.$ac_ext" >&5
10912 cf_cv_default_source=yes
10913 fi
10914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10915
10916 fi
10917 echo "$as_me:10917: result: $cf_cv_default_source" >&5
10918 echo "${ECHO_T}$cf_cv_default_source" >&6
10919                         if test "$cf_cv_default_source" = yes
10920                         then
10921
10922         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10923         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10924
10925                         fi
10926                 fi
10927         fi
10928
10929 fi
10930
10931         ;;
10932 (minix*)
10933         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10934         ;;
10935 (mirbsd*)
10936         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10937         cf_XOPEN_SOURCE=
10938
10939 if test "$cf_cv_posix_visible" = no; then
10940
10941 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10942
10943 cf_save_CFLAGS="$CFLAGS"
10944 cf_save_CPPFLAGS="$CPPFLAGS"
10945
10946 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10947         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10948                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10949
10950 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10951         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10952                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10953
10954 echo "$as_me:10954: checking if we should define _POSIX_C_SOURCE" >&5
10955 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10956 if test "${cf_cv_posix_c_source+set}" = set; then
10957   echo $ECHO_N "(cached) $ECHO_C" >&6
10958 else
10959
10960 echo "${as_me:-configure}:10960: testing if the symbol is already defined go no further ..." 1>&5
10961
10962         cat >"conftest.$ac_ext" <<_ACEOF
10963 #line 10963 "configure"
10964 #include "confdefs.h"
10965 #include <sys/types.h>
10966 int
10967 main (void)
10968 {
10969
10970 #ifndef _POSIX_C_SOURCE
10971 #error _POSIX_C_SOURCE is not defined
10972 #endif
10973   ;
10974   return 0;
10975 }
10976 _ACEOF
10977 rm -f "conftest.$ac_objext"
10978 if { (eval echo "$as_me:10978: \"$ac_compile\"") >&5
10979   (eval $ac_compile) 2>&5
10980   ac_status=$?
10981   echo "$as_me:10981: \$? = $ac_status" >&5
10982   (exit "$ac_status"); } &&
10983          { ac_try='test -s "conftest.$ac_objext"'
10984   { (eval echo "$as_me:10984: \"$ac_try\"") >&5
10985   (eval $ac_try) 2>&5
10986   ac_status=$?
10987   echo "$as_me:10987: \$? = $ac_status" >&5
10988   (exit "$ac_status"); }; }; then
10989   cf_cv_posix_c_source=no
10990 else
10991   echo "$as_me: failed program was:" >&5
10992 cat "conftest.$ac_ext" >&5
10993 cf_want_posix_source=no
10994          case .$cf_POSIX_C_SOURCE in
10995          (.[12]??*)
10996                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10997                 ;;
10998          (.2)
10999                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11000                 cf_want_posix_source=yes
11001                 ;;
11002          (.*)
11003                 cf_want_posix_source=yes
11004                 ;;
11005          esac
11006          if test "$cf_want_posix_source" = yes ; then
11007                 cat >"conftest.$ac_ext" <<_ACEOF
11008 #line 11008 "configure"
11009 #include "confdefs.h"
11010 #include <sys/types.h>
11011 int
11012 main (void)
11013 {
11014
11015 #ifdef _POSIX_SOURCE
11016 #error _POSIX_SOURCE is defined
11017 #endif
11018   ;
11019   return 0;
11020 }
11021 _ACEOF
11022 rm -f "conftest.$ac_objext"
11023 if { (eval echo "$as_me:11023: \"$ac_compile\"") >&5
11024   (eval $ac_compile) 2>&5
11025   ac_status=$?
11026   echo "$as_me:11026: \$? = $ac_status" >&5
11027   (exit "$ac_status"); } &&
11028          { ac_try='test -s "conftest.$ac_objext"'
11029   { (eval echo "$as_me:11029: \"$ac_try\"") >&5
11030   (eval $ac_try) 2>&5
11031   ac_status=$?
11032   echo "$as_me:11032: \$? = $ac_status" >&5
11033   (exit "$ac_status"); }; }; then
11034   :
11035 else
11036   echo "$as_me: failed program was:" >&5
11037 cat "conftest.$ac_ext" >&5
11038 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11039 fi
11040 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11041          fi
11042
11043 echo "${as_me:-configure}:11043: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11044
11045          CFLAGS="$cf_trim_CFLAGS"
11046          CPPFLAGS="$cf_trim_CPPFLAGS"
11047
11048         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11049         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11050
11051 echo "${as_me:-configure}:11051: testing if the second compile does not leave our definition intact error ..." 1>&5
11052
11053          cat >"conftest.$ac_ext" <<_ACEOF
11054 #line 11054 "configure"
11055 #include "confdefs.h"
11056 #include <sys/types.h>
11057 int
11058 main (void)
11059 {
11060
11061 #ifndef _POSIX_C_SOURCE
11062 #error _POSIX_C_SOURCE is not defined
11063 #endif
11064   ;
11065   return 0;
11066 }
11067 _ACEOF
11068 rm -f "conftest.$ac_objext"
11069 if { (eval echo "$as_me:11069: \"$ac_compile\"") >&5
11070   (eval $ac_compile) 2>&5
11071   ac_status=$?
11072   echo "$as_me:11072: \$? = $ac_status" >&5
11073   (exit "$ac_status"); } &&
11074          { ac_try='test -s "conftest.$ac_objext"'
11075   { (eval echo "$as_me:11075: \"$ac_try\"") >&5
11076   (eval $ac_try) 2>&5
11077   ac_status=$?
11078   echo "$as_me:11078: \$? = $ac_status" >&5
11079   (exit "$ac_status"); }; }; then
11080   :
11081 else
11082   echo "$as_me: failed program was:" >&5
11083 cat "conftest.$ac_ext" >&5
11084 cf_cv_posix_c_source=no
11085 fi
11086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11087          CFLAGS="$cf_save_CFLAGS"
11088          CPPFLAGS="$cf_save_CPPFLAGS"
11089
11090 fi
11091 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11092
11093 fi
11094 echo "$as_me:11094: result: $cf_cv_posix_c_source" >&5
11095 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11096
11097 if test "$cf_cv_posix_c_source" != no ; then
11098         CFLAGS="$cf_trim_CFLAGS"
11099         CPPFLAGS="$cf_trim_CPPFLAGS"
11100
11101 cf_fix_cppflags=no
11102 cf_new_cflags=
11103 cf_new_cppflags=
11104 cf_new_extra_cppflags=
11105
11106 for cf_add_cflags in $cf_cv_posix_c_source
11107 do
11108 case "$cf_fix_cppflags" in
11109 (no)
11110         case "$cf_add_cflags" in
11111         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11112                 case "$cf_add_cflags" in
11113                 (-D*)
11114                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11115
11116                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11117                                 && test -z "${cf_tst_cflags}" \
11118                                 && cf_fix_cppflags=yes
11119
11120                         if test "$cf_fix_cppflags" = yes ; then
11121
11122         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11123         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11124
11125                                 continue
11126                         elif test "${cf_tst_cflags}" = "\"'" ; then
11127
11128         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11129         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11130
11131                                 continue
11132                         fi
11133                         ;;
11134                 esac
11135                 case "$CPPFLAGS" in
11136                 (*$cf_add_cflags)
11137                         ;;
11138                 (*)
11139                         case "$cf_add_cflags" in
11140                         (-D*)
11141                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11142
11143 CPPFLAGS=`echo "$CPPFLAGS" | \
11144         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11145                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11146
11147                                 ;;
11148                         esac
11149
11150         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11151         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11152
11153                         ;;
11154                 esac
11155                 ;;
11156         (*)
11157
11158         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11159         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11160
11161                 ;;
11162         esac
11163         ;;
11164 (yes)
11165
11166         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11167         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11168
11169         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11170
11171         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11172                 && test -z "${cf_tst_cflags}" \
11173                 && cf_fix_cppflags=no
11174         ;;
11175 esac
11176 done
11177
11178 if test -n "$cf_new_cflags" ; then
11179
11180         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11181         CFLAGS="${CFLAGS}$cf_new_cflags"
11182
11183 fi
11184
11185 if test -n "$cf_new_cppflags" ; then
11186
11187         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11188         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11189
11190 fi
11191
11192 if test -n "$cf_new_extra_cppflags" ; then
11193
11194         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11195         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11196
11197 fi
11198
11199 fi
11200
11201 fi # cf_cv_posix_visible
11202
11203         ;;
11204 (netbsd*)
11205         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
11206         ;;
11207 (openbsd[6-9]*)
11208         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
11209         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
11210         # Abusing the conformance level is a workaround.
11211         { echo "$as_me:11211: WARNING: this system does not provide usable locale support" >&5
11212 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
11213         cf_xopen_source="-D_BSD_SOURCE"
11214         cf_XOPEN_SOURCE=700
11215         ;;
11216 (openbsd[4-5]*)
11217         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
11218         cf_xopen_source="-D_BSD_SOURCE"
11219         cf_XOPEN_SOURCE=600
11220         ;;
11221 (openbsd*)
11222         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
11223         ;;
11224 (osf[45]*)
11225         cf_xopen_source="-D_OSF_SOURCE"
11226         ;;
11227 (nto-qnx*)
11228         cf_xopen_source="-D_QNX_SOURCE"
11229         ;;
11230 (sco*)
11231         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
11232         ;;
11233 (solaris2.*)
11234         cf_xopen_source="-D__EXTENSIONS__"
11235         cf_cv_xopen_source=broken
11236         ;;
11237 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
11238         cf_XOPEN_SOURCE=
11239         cf_POSIX_C_SOURCE=
11240         ;;
11241 (*)
11242
11243 echo "$as_me:11243: checking if we should define _XOPEN_SOURCE" >&5
11244 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11245 if test "${cf_cv_xopen_source+set}" = set; then
11246   echo $ECHO_N "(cached) $ECHO_C" >&6
11247 else
11248
11249         cat >"conftest.$ac_ext" <<_ACEOF
11250 #line 11250 "configure"
11251 #include "confdefs.h"
11252
11253 $ac_includes_default
11254
11255 int
11256 main (void)
11257 {
11258
11259 #ifndef _XOPEN_SOURCE
11260 #error _XOPEN_SOURCE is not defined
11261 #endif
11262
11263   ;
11264   return 0;
11265 }
11266 _ACEOF
11267 rm -f "conftest.$ac_objext"
11268 if { (eval echo "$as_me:11268: \"$ac_compile\"") >&5
11269   (eval $ac_compile) 2>&5
11270   ac_status=$?
11271   echo "$as_me:11271: \$? = $ac_status" >&5
11272   (exit "$ac_status"); } &&
11273          { ac_try='test -s "conftest.$ac_objext"'
11274   { (eval echo "$as_me:11274: \"$ac_try\"") >&5
11275   (eval $ac_try) 2>&5
11276   ac_status=$?
11277   echo "$as_me:11277: \$? = $ac_status" >&5
11278   (exit "$ac_status"); }; }; then
11279   cf_cv_xopen_source=no
11280 else
11281   echo "$as_me: failed program was:" >&5
11282 cat "conftest.$ac_ext" >&5
11283 cf_save="$CPPFLAGS"
11284
11285         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11286         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11287
11288          cat >"conftest.$ac_ext" <<_ACEOF
11289 #line 11289 "configure"
11290 #include "confdefs.h"
11291
11292 $ac_includes_default
11293
11294 int
11295 main (void)
11296 {
11297
11298 #ifndef _XOPEN_SOURCE
11299 #error _XOPEN_SOURCE is not defined
11300 #endif
11301
11302   ;
11303   return 0;
11304 }
11305 _ACEOF
11306 rm -f "conftest.$ac_objext"
11307 if { (eval echo "$as_me:11307: \"$ac_compile\"") >&5
11308   (eval $ac_compile) 2>&5
11309   ac_status=$?
11310   echo "$as_me:11310: \$? = $ac_status" >&5
11311   (exit "$ac_status"); } &&
11312          { ac_try='test -s "conftest.$ac_objext"'
11313   { (eval echo "$as_me:11313: \"$ac_try\"") >&5
11314   (eval $ac_try) 2>&5
11315   ac_status=$?
11316   echo "$as_me:11316: \$? = $ac_status" >&5
11317   (exit "$ac_status"); }; }; then
11318   cf_cv_xopen_source=no
11319 else
11320   echo "$as_me: failed program was:" >&5
11321 cat "conftest.$ac_ext" >&5
11322 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11323 fi
11324 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11325                 CPPFLAGS="$cf_save"
11326
11327 fi
11328 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11329
11330 fi
11331 echo "$as_me:11331: result: $cf_cv_xopen_source" >&5
11332 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11333
11334 if test "$cf_cv_xopen_source" != no ; then
11335
11336 CFLAGS=`echo "$CFLAGS" | \
11337         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11338                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11339
11340 CPPFLAGS=`echo "$CPPFLAGS" | \
11341         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11342                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11343
11344         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11345
11346 for cf_add_cflags in $cf_temp_xopen_source
11347 do
11348         case "x$cf_add_cflags" in
11349         (x-[DU]*)
11350
11351 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11352 while true
11353 do
11354         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'`
11355         test "$CFLAGS" != "$cf_old_cflag" || break
11356
11357         CFLAGS="$cf_old_cflag"
11358 done
11359
11360 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11361 while true
11362 do
11363         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'`
11364         test "$CPPFLAGS" != "$cf_old_cflag" || break
11365
11366         CPPFLAGS="$cf_old_cflag"
11367 done
11368
11369                 ;;
11370         esac
11371
11372 cf_fix_cppflags=no
11373 cf_new_cflags=
11374 cf_new_cppflags=
11375 cf_new_extra_cppflags=
11376
11377 for cf_add_cflags in $cf_add_cflags
11378 do
11379 case "$cf_fix_cppflags" in
11380 (no)
11381         case "$cf_add_cflags" in
11382         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11383                 case "$cf_add_cflags" in
11384                 (-D*)
11385                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11386
11387                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11388                                 && test -z "${cf_tst_cflags}" \
11389                                 && cf_fix_cppflags=yes
11390
11391                         if test "$cf_fix_cppflags" = yes ; then
11392
11393         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11394         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11395
11396                                 continue
11397                         elif test "${cf_tst_cflags}" = "\"'" ; then
11398
11399         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11400         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11401
11402                                 continue
11403                         fi
11404                         ;;
11405                 esac
11406                 case "$CPPFLAGS" in
11407                 (*$cf_add_cflags)
11408                         ;;
11409                 (*)
11410                         case "$cf_add_cflags" in
11411                         (-D*)
11412                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11413
11414 CPPFLAGS=`echo "$CPPFLAGS" | \
11415         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11416                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11417
11418                                 ;;
11419                         esac
11420
11421         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11422         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11423
11424                         ;;
11425                 esac
11426                 ;;
11427         (*)
11428
11429         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11430         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11431
11432                 ;;
11433         esac
11434         ;;
11435 (yes)
11436
11437         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11438         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11439
11440         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11441
11442         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11443                 && test -z "${cf_tst_cflags}" \
11444                 && cf_fix_cppflags=no
11445         ;;
11446 esac
11447 done
11448
11449 if test -n "$cf_new_cflags" ; then
11450
11451         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11452         CFLAGS="${CFLAGS}$cf_new_cflags"
11453
11454 fi
11455
11456 if test -n "$cf_new_cppflags" ; then
11457
11458         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11459         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11460
11461 fi
11462
11463 if test -n "$cf_new_extra_cppflags" ; then
11464
11465         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11466         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11467
11468 fi
11469
11470 done
11471
11472 fi
11473
11474         cf_save_xopen_cppflags="$CPPFLAGS"
11475
11476 if test "$cf_cv_posix_visible" = no; then
11477
11478 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11479
11480 cf_save_CFLAGS="$CFLAGS"
11481 cf_save_CPPFLAGS="$CPPFLAGS"
11482
11483 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11484         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11485                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11486
11487 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11488         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
11489                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
11490
11491 echo "$as_me:11491: checking if we should define _POSIX_C_SOURCE" >&5
11492 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11493 if test "${cf_cv_posix_c_source+set}" = set; then
11494   echo $ECHO_N "(cached) $ECHO_C" >&6
11495 else
11496
11497 echo "${as_me:-configure}:11497: testing if the symbol is already defined go no further ..." 1>&5
11498
11499         cat >"conftest.$ac_ext" <<_ACEOF
11500 #line 11500 "configure"
11501 #include "confdefs.h"
11502 #include <sys/types.h>
11503 int
11504 main (void)
11505 {
11506
11507 #ifndef _POSIX_C_SOURCE
11508 #error _POSIX_C_SOURCE is not defined
11509 #endif
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 rm -f "conftest.$ac_objext"
11515 if { (eval echo "$as_me:11515: \"$ac_compile\"") >&5
11516   (eval $ac_compile) 2>&5
11517   ac_status=$?
11518   echo "$as_me:11518: \$? = $ac_status" >&5
11519   (exit "$ac_status"); } &&
11520          { ac_try='test -s "conftest.$ac_objext"'
11521   { (eval echo "$as_me:11521: \"$ac_try\"") >&5
11522   (eval $ac_try) 2>&5
11523   ac_status=$?
11524   echo "$as_me:11524: \$? = $ac_status" >&5
11525   (exit "$ac_status"); }; }; then
11526   cf_cv_posix_c_source=no
11527 else
11528   echo "$as_me: failed program was:" >&5
11529 cat "conftest.$ac_ext" >&5
11530 cf_want_posix_source=no
11531          case .$cf_POSIX_C_SOURCE in
11532          (.[12]??*)
11533                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11534                 ;;
11535          (.2)
11536                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11537                 cf_want_posix_source=yes
11538                 ;;
11539          (.*)
11540                 cf_want_posix_source=yes
11541                 ;;
11542          esac
11543          if test "$cf_want_posix_source" = yes ; then
11544                 cat >"conftest.$ac_ext" <<_ACEOF
11545 #line 11545 "configure"
11546 #include "confdefs.h"
11547 #include <sys/types.h>
11548 int
11549 main (void)
11550 {
11551
11552 #ifdef _POSIX_SOURCE
11553 #error _POSIX_SOURCE is defined
11554 #endif
11555   ;
11556   return 0;
11557 }
11558 _ACEOF
11559 rm -f "conftest.$ac_objext"
11560 if { (eval echo "$as_me:11560: \"$ac_compile\"") >&5
11561   (eval $ac_compile) 2>&5
11562   ac_status=$?
11563   echo "$as_me:11563: \$? = $ac_status" >&5
11564   (exit "$ac_status"); } &&
11565          { ac_try='test -s "conftest.$ac_objext"'
11566   { (eval echo "$as_me:11566: \"$ac_try\"") >&5
11567   (eval $ac_try) 2>&5
11568   ac_status=$?
11569   echo "$as_me:11569: \$? = $ac_status" >&5
11570   (exit "$ac_status"); }; }; then
11571   :
11572 else
11573   echo "$as_me: failed program was:" >&5
11574 cat "conftest.$ac_ext" >&5
11575 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11576 fi
11577 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11578          fi
11579
11580 echo "${as_me:-configure}:11580: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11581
11582          CFLAGS="$cf_trim_CFLAGS"
11583          CPPFLAGS="$cf_trim_CPPFLAGS"
11584
11585         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11586         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11587
11588 echo "${as_me:-configure}:11588: testing if the second compile does not leave our definition intact error ..." 1>&5
11589
11590          cat >"conftest.$ac_ext" <<_ACEOF
11591 #line 11591 "configure"
11592 #include "confdefs.h"
11593 #include <sys/types.h>
11594 int
11595 main (void)
11596 {
11597
11598 #ifndef _POSIX_C_SOURCE
11599 #error _POSIX_C_SOURCE is not defined
11600 #endif
11601   ;
11602   return 0;
11603 }
11604 _ACEOF
11605 rm -f "conftest.$ac_objext"
11606 if { (eval echo "$as_me:11606: \"$ac_compile\"") >&5
11607   (eval $ac_compile) 2>&5
11608   ac_status=$?
11609   echo "$as_me:11609: \$? = $ac_status" >&5
11610   (exit "$ac_status"); } &&
11611          { ac_try='test -s "conftest.$ac_objext"'
11612   { (eval echo "$as_me:11612: \"$ac_try\"") >&5
11613   (eval $ac_try) 2>&5
11614   ac_status=$?
11615   echo "$as_me:11615: \$? = $ac_status" >&5
11616   (exit "$ac_status"); }; }; then
11617   :
11618 else
11619   echo "$as_me: failed program was:" >&5
11620 cat "conftest.$ac_ext" >&5
11621 cf_cv_posix_c_source=no
11622 fi
11623 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11624          CFLAGS="$cf_save_CFLAGS"
11625          CPPFLAGS="$cf_save_CPPFLAGS"
11626
11627 fi
11628 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11629
11630 fi
11631 echo "$as_me:11631: result: $cf_cv_posix_c_source" >&5
11632 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11633
11634 if test "$cf_cv_posix_c_source" != no ; then
11635         CFLAGS="$cf_trim_CFLAGS"
11636         CPPFLAGS="$cf_trim_CPPFLAGS"
11637
11638 cf_fix_cppflags=no
11639 cf_new_cflags=
11640 cf_new_cppflags=
11641 cf_new_extra_cppflags=
11642
11643 for cf_add_cflags in $cf_cv_posix_c_source
11644 do
11645 case "$cf_fix_cppflags" in
11646 (no)
11647         case "$cf_add_cflags" in
11648         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11649                 case "$cf_add_cflags" in
11650                 (-D*)
11651                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11652
11653                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11654                                 && test -z "${cf_tst_cflags}" \
11655                                 && cf_fix_cppflags=yes
11656
11657                         if test "$cf_fix_cppflags" = yes ; then
11658
11659         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11660         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11661
11662                                 continue
11663                         elif test "${cf_tst_cflags}" = "\"'" ; then
11664
11665         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11666         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11667
11668                                 continue
11669                         fi
11670                         ;;
11671                 esac
11672                 case "$CPPFLAGS" in
11673                 (*$cf_add_cflags)
11674                         ;;
11675                 (*)
11676                         case "$cf_add_cflags" in
11677                         (-D*)
11678                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11679
11680 CPPFLAGS=`echo "$CPPFLAGS" | \
11681         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11682                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11683
11684                                 ;;
11685                         esac
11686
11687         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11688         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11689
11690                         ;;
11691                 esac
11692                 ;;
11693         (*)
11694
11695         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11696         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11697
11698                 ;;
11699         esac
11700         ;;
11701 (yes)
11702
11703         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11704         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11705
11706         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11707
11708         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11709                 && test -z "${cf_tst_cflags}" \
11710                 && cf_fix_cppflags=no
11711         ;;
11712 esac
11713 done
11714
11715 if test -n "$cf_new_cflags" ; then
11716
11717         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11718         CFLAGS="${CFLAGS}$cf_new_cflags"
11719
11720 fi
11721
11722 if test -n "$cf_new_cppflags" ; then
11723
11724         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11725         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11726
11727 fi
11728
11729 if test -n "$cf_new_extra_cppflags" ; then
11730
11731         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11732         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11733
11734 fi
11735
11736 fi
11737
11738 fi # cf_cv_posix_visible
11739
11740         # Some of these niche implementations use copy/paste, double-check...
11741         if test "$cf_cv_xopen_source" = no ; then
11742                 test -n "$verbose" && echo "    checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE" 1>&6
11743
11744 echo "${as_me:-configure}:11744: testing checking if _POSIX_C_SOURCE interferes with _XOPEN_SOURCE ..." 1>&5
11745
11746                 cat >"conftest.$ac_ext" <<_ACEOF
11747 #line 11747 "configure"
11748 #include "confdefs.h"
11749
11750 $ac_includes_default
11751
11752 int
11753 main (void)
11754 {
11755
11756 #ifndef _XOPEN_SOURCE
11757 #error _XOPEN_SOURCE is not defined
11758 #endif
11759
11760   ;
11761   return 0;
11762 }
11763 _ACEOF
11764 rm -f "conftest.$ac_objext"
11765 if { (eval echo "$as_me:11765: \"$ac_compile\"") >&5
11766   (eval $ac_compile) 2>&5
11767   ac_status=$?
11768   echo "$as_me:11768: \$? = $ac_status" >&5
11769   (exit "$ac_status"); } &&
11770          { ac_try='test -s "conftest.$ac_objext"'
11771   { (eval echo "$as_me:11771: \"$ac_try\"") >&5
11772   (eval $ac_try) 2>&5
11773   ac_status=$?
11774   echo "$as_me:11774: \$? = $ac_status" >&5
11775   (exit "$ac_status"); }; }; then
11776   :
11777 else
11778   echo "$as_me: failed program was:" >&5
11779 cat "conftest.$ac_ext" >&5
11780
11781                         { echo "$as_me:11781: WARNING: _POSIX_C_SOURCE definition is not usable" >&5
11782 echo "$as_me: WARNING: _POSIX_C_SOURCE definition is not usable" >&2;}
11783                         CPPFLAGS="$cf_save_xopen_cppflags"
11784 fi
11785 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11786         fi
11787         ;;
11788 esac
11789
11790 if test -n "$cf_xopen_source" ; then
11791
11792 for cf_add_cflags in $cf_xopen_source
11793 do
11794         case "x$cf_add_cflags" in
11795         (x-[DU]*)
11796
11797 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11798 while true
11799 do
11800         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'`
11801         test "$CFLAGS" != "$cf_old_cflag" || break
11802         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11803
11804 echo "${as_me:-configure}:11804: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11805
11806         CFLAGS="$cf_old_cflag"
11807 done
11808
11809 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11810 while true
11811 do
11812         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'`
11813         test "$CPPFLAGS" != "$cf_old_cflag" || break
11814         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11815
11816 echo "${as_me:-configure}:11816: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11817
11818         CPPFLAGS="$cf_old_cflag"
11819 done
11820
11821                 ;;
11822         esac
11823
11824 cf_fix_cppflags=no
11825 cf_new_cflags=
11826 cf_new_cppflags=
11827 cf_new_extra_cppflags=
11828
11829 for cf_add_cflags in $cf_add_cflags
11830 do
11831 case "$cf_fix_cppflags" in
11832 (no)
11833         case "$cf_add_cflags" in
11834         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11835                 case "$cf_add_cflags" in
11836                 (-D*)
11837                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11838
11839                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11840                                 && test -z "${cf_tst_cflags}" \
11841                                 && cf_fix_cppflags=yes
11842
11843                         if test "$cf_fix_cppflags" = yes ; then
11844
11845         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11846         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11847
11848                                 continue
11849                         elif test "${cf_tst_cflags}" = "\"'" ; then
11850
11851         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11852         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11853
11854                                 continue
11855                         fi
11856                         ;;
11857                 esac
11858                 case "$CPPFLAGS" in
11859                 (*$cf_add_cflags)
11860                         ;;
11861                 (*)
11862                         case "$cf_add_cflags" in
11863                         (-D*)
11864                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11865
11866 CPPFLAGS=`echo "$CPPFLAGS" | \
11867         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11868                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11869
11870                                 ;;
11871                         esac
11872
11873         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11874         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11875
11876                         ;;
11877                 esac
11878                 ;;
11879         (*)
11880
11881         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11882         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11883
11884                 ;;
11885         esac
11886         ;;
11887 (yes)
11888
11889         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11890         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11891
11892         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11893
11894         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11895                 && test -z "${cf_tst_cflags}" \
11896                 && cf_fix_cppflags=no
11897         ;;
11898 esac
11899 done
11900
11901 if test -n "$cf_new_cflags" ; then
11902         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11903
11904 echo "${as_me:-configure}:11904: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11905
11906         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11907         CFLAGS="${CFLAGS}$cf_new_cflags"
11908
11909 fi
11910
11911 if test -n "$cf_new_cppflags" ; then
11912         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11913
11914 echo "${as_me:-configure}:11914: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11915
11916         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11917         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11918
11919 fi
11920
11921 if test -n "$cf_new_extra_cppflags" ; then
11922         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11923
11924 echo "${as_me:-configure}:11924: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11925
11926         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11927         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11928
11929 fi
11930
11931 done
11932
11933 fi
11934
11935 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11936         echo "$as_me:11936: checking if _XOPEN_SOURCE really is set" >&5
11937 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11938         cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <stdlib.h>
11942 int
11943 main (void)
11944 {
11945
11946 #ifndef _XOPEN_SOURCE
11947 #error _XOPEN_SOURCE is not defined
11948 #endif
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 rm -f "conftest.$ac_objext"
11954 if { (eval echo "$as_me:11954: \"$ac_compile\"") >&5
11955   (eval $ac_compile) 2>&5
11956   ac_status=$?
11957   echo "$as_me:11957: \$? = $ac_status" >&5
11958   (exit "$ac_status"); } &&
11959          { ac_try='test -s "conftest.$ac_objext"'
11960   { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961   (eval $ac_try) 2>&5
11962   ac_status=$?
11963   echo "$as_me:11963: \$? = $ac_status" >&5
11964   (exit "$ac_status"); }; }; then
11965   cf_XOPEN_SOURCE_set=yes
11966 else
11967   echo "$as_me: failed program was:" >&5
11968 cat "conftest.$ac_ext" >&5
11969 cf_XOPEN_SOURCE_set=no
11970 fi
11971 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11972         echo "$as_me:11972: result: $cf_XOPEN_SOURCE_set" >&5
11973 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11974         if test "$cf_XOPEN_SOURCE_set" = yes
11975         then
11976                 cat >"conftest.$ac_ext" <<_ACEOF
11977 #line 11977 "configure"
11978 #include "confdefs.h"
11979 #include <stdlib.h>
11980 int
11981 main (void)
11982 {
11983
11984 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11985 #error (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11986 #endif
11987   ;
11988   return 0;
11989 }
11990 _ACEOF
11991 rm -f "conftest.$ac_objext"
11992 if { (eval echo "$as_me:11992: \"$ac_compile\"") >&5
11993   (eval $ac_compile) 2>&5
11994   ac_status=$?
11995   echo "$as_me:11995: \$? = $ac_status" >&5
11996   (exit "$ac_status"); } &&
11997          { ac_try='test -s "conftest.$ac_objext"'
11998   { (eval echo "$as_me:11998: \"$ac_try\"") >&5
11999   (eval $ac_try) 2>&5
12000   ac_status=$?
12001   echo "$as_me:12001: \$? = $ac_status" >&5
12002   (exit "$ac_status"); }; }; then
12003   cf_XOPEN_SOURCE_set_ok=yes
12004 else
12005   echo "$as_me: failed program was:" >&5
12006 cat "conftest.$ac_ext" >&5
12007 cf_XOPEN_SOURCE_set_ok=no
12008 fi
12009 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12010                 if test "$cf_XOPEN_SOURCE_set_ok" = no
12011                 then
12012                         { echo "$as_me:12012: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12013 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12014                 fi
12015         else
12016
12017 echo "$as_me:12017: checking if we should define _XOPEN_SOURCE" >&5
12018 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12019 if test "${cf_cv_xopen_source+set}" = set; then
12020   echo $ECHO_N "(cached) $ECHO_C" >&6
12021 else
12022
12023         cat >"conftest.$ac_ext" <<_ACEOF
12024 #line 12024 "configure"
12025 #include "confdefs.h"
12026
12027 $ac_includes_default
12028
12029 int
12030 main (void)
12031 {
12032
12033 #ifndef _XOPEN_SOURCE
12034 #error _XOPEN_SOURCE is not defined
12035 #endif
12036
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 rm -f "conftest.$ac_objext"
12042 if { (eval echo "$as_me:12042: \"$ac_compile\"") >&5
12043   (eval $ac_compile) 2>&5
12044   ac_status=$?
12045   echo "$as_me:12045: \$? = $ac_status" >&5
12046   (exit "$ac_status"); } &&
12047          { ac_try='test -s "conftest.$ac_objext"'
12048   { (eval echo "$as_me:12048: \"$ac_try\"") >&5
12049   (eval $ac_try) 2>&5
12050   ac_status=$?
12051   echo "$as_me:12051: \$? = $ac_status" >&5
12052   (exit "$ac_status"); }; }; then
12053   cf_cv_xopen_source=no
12054 else
12055   echo "$as_me: failed program was:" >&5
12056 cat "conftest.$ac_ext" >&5
12057 cf_save="$CPPFLAGS"
12058
12059         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12060         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12061
12062          cat >"conftest.$ac_ext" <<_ACEOF
12063 #line 12063 "configure"
12064 #include "confdefs.h"
12065
12066 $ac_includes_default
12067
12068 int
12069 main (void)
12070 {
12071
12072 #ifndef _XOPEN_SOURCE
12073 #error _XOPEN_SOURCE is not defined
12074 #endif
12075
12076   ;
12077   return 0;
12078 }
12079 _ACEOF
12080 rm -f "conftest.$ac_objext"
12081 if { (eval echo "$as_me:12081: \"$ac_compile\"") >&5
12082   (eval $ac_compile) 2>&5
12083   ac_status=$?
12084   echo "$as_me:12084: \$? = $ac_status" >&5
12085   (exit "$ac_status"); } &&
12086          { ac_try='test -s "conftest.$ac_objext"'
12087   { (eval echo "$as_me:12087: \"$ac_try\"") >&5
12088   (eval $ac_try) 2>&5
12089   ac_status=$?
12090   echo "$as_me:12090: \$? = $ac_status" >&5
12091   (exit "$ac_status"); }; }; then
12092   cf_cv_xopen_source=no
12093 else
12094   echo "$as_me: failed program was:" >&5
12095 cat "conftest.$ac_ext" >&5
12096 cf_cv_xopen_source=$cf_XOPEN_SOURCE
12097 fi
12098 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12099                 CPPFLAGS="$cf_save"
12100
12101 fi
12102 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12103
12104 fi
12105 echo "$as_me:12105: result: $cf_cv_xopen_source" >&5
12106 echo "${ECHO_T}$cf_cv_xopen_source" >&6
12107
12108 if test "$cf_cv_xopen_source" != no ; then
12109
12110 CFLAGS=`echo "$CFLAGS" | \
12111         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12112                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12113
12114 CPPFLAGS=`echo "$CPPFLAGS" | \
12115         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
12116                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
12117
12118         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12119
12120 for cf_add_cflags in $cf_temp_xopen_source
12121 do
12122         case "x$cf_add_cflags" in
12123         (x-[DU]*)
12124
12125 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12126 while true
12127 do
12128         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'`
12129         test "$CFLAGS" != "$cf_old_cflag" || break
12130
12131         CFLAGS="$cf_old_cflag"
12132 done
12133
12134 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
12135 while true
12136 do
12137         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'`
12138         test "$CPPFLAGS" != "$cf_old_cflag" || break
12139
12140         CPPFLAGS="$cf_old_cflag"
12141 done
12142
12143                 ;;
12144         esac
12145
12146 cf_fix_cppflags=no
12147 cf_new_cflags=
12148 cf_new_cppflags=
12149 cf_new_extra_cppflags=
12150
12151 for cf_add_cflags in $cf_add_cflags
12152 do
12153 case "$cf_fix_cppflags" in
12154 (no)
12155         case "$cf_add_cflags" in
12156         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12157                 case "$cf_add_cflags" in
12158                 (-D*)
12159                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12160
12161                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12162                                 && test -z "${cf_tst_cflags}" \
12163                                 && cf_fix_cppflags=yes
12164
12165                         if test "$cf_fix_cppflags" = yes ; then
12166
12167         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12168         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12169
12170                                 continue
12171                         elif test "${cf_tst_cflags}" = "\"'" ; then
12172
12173         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12174         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12175
12176                                 continue
12177                         fi
12178                         ;;
12179                 esac
12180                 case "$CPPFLAGS" in
12181                 (*$cf_add_cflags)
12182                         ;;
12183                 (*)
12184                         case "$cf_add_cflags" in
12185                         (-D*)
12186                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12187
12188 CPPFLAGS=`echo "$CPPFLAGS" | \
12189         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
12190                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
12191
12192                                 ;;
12193                         esac
12194
12195         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12196         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12197
12198                         ;;
12199                 esac
12200                 ;;
12201         (*)
12202
12203         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12204         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12205
12206                 ;;
12207         esac
12208         ;;
12209 (yes)
12210
12211         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12212         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12213
12214         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12215
12216         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12217                 && test -z "${cf_tst_cflags}" \
12218                 && cf_fix_cppflags=no
12219         ;;
12220 esac
12221 done
12222
12223 if test -n "$cf_new_cflags" ; then
12224
12225         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12226         CFLAGS="${CFLAGS}$cf_new_cflags"
12227
12228 fi
12229
12230 if test -n "$cf_new_cppflags" ; then
12231
12232         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12233         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12234
12235 fi
12236
12237 if test -n "$cf_new_extra_cppflags" ; then
12238
12239         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12240         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12241
12242 fi
12243
12244 done
12245
12246 fi
12247
12248         fi
12249 fi
12250 fi # cf_cv_posix_visible
12251
12252 CPPFLAGS_after_XOPEN="$CPPFLAGS"
12253
12254 # Work around breakage on OS X
12255
12256 echo "$as_me:12256: checking if SIGWINCH is defined" >&5
12257 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
12258 if test "${cf_cv_define_sigwinch+set}" = set; then
12259   echo $ECHO_N "(cached) $ECHO_C" >&6
12260 else
12261
12262         cat >"conftest.$ac_ext" <<_ACEOF
12263 #line 12263 "configure"
12264 #include "confdefs.h"
12265
12266 #include <sys/types.h>
12267 #include <sys/signal.h>
12268
12269 int
12270 main (void)
12271 {
12272 int x = SIGWINCH; (void)x
12273   ;
12274   return 0;
12275 }
12276 _ACEOF
12277 rm -f "conftest.$ac_objext"
12278 if { (eval echo "$as_me:12278: \"$ac_compile\"") >&5
12279   (eval $ac_compile) 2>&5
12280   ac_status=$?
12281   echo "$as_me:12281: \$? = $ac_status" >&5
12282   (exit "$ac_status"); } &&
12283          { ac_try='test -s "conftest.$ac_objext"'
12284   { (eval echo "$as_me:12284: \"$ac_try\"") >&5
12285   (eval $ac_try) 2>&5
12286   ac_status=$?
12287   echo "$as_me:12287: \$? = $ac_status" >&5
12288   (exit "$ac_status"); }; }; then
12289   cf_cv_define_sigwinch=yes
12290 else
12291   echo "$as_me: failed program was:" >&5
12292 cat "conftest.$ac_ext" >&5
12293 cat >"conftest.$ac_ext" <<_ACEOF
12294 #line 12294 "configure"
12295 #include "confdefs.h"
12296
12297 #undef _XOPEN_SOURCE
12298 #undef _POSIX_SOURCE
12299 #undef _POSIX_C_SOURCE
12300 #include <sys/types.h>
12301 #include <sys/signal.h>
12302
12303 int
12304 main (void)
12305 {
12306 int x = SIGWINCH; (void)x
12307   ;
12308   return 0;
12309 }
12310 _ACEOF
12311 rm -f "conftest.$ac_objext"
12312 if { (eval echo "$as_me:12312: \"$ac_compile\"") >&5
12313   (eval $ac_compile) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit "$ac_status"); } &&
12317          { ac_try='test -s "conftest.$ac_objext"'
12318   { (eval echo "$as_me:12318: \"$ac_try\"") >&5
12319   (eval $ac_try) 2>&5
12320   ac_status=$?
12321   echo "$as_me:12321: \$? = $ac_status" >&5
12322   (exit "$ac_status"); }; }; then
12323   cf_cv_define_sigwinch=maybe
12324 else
12325   echo "$as_me: failed program was:" >&5
12326 cat "conftest.$ac_ext" >&5
12327 cf_cv_define_sigwinch=no
12328 fi
12329 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12330
12331 fi
12332 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12333
12334 fi
12335 echo "$as_me:12335: result: $cf_cv_define_sigwinch" >&5
12336 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
12337
12338 if test "$cf_cv_define_sigwinch" = maybe ; then
12339 echo "$as_me:12339: checking for actual SIGWINCH definition" >&5
12340 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
12341 if test "${cf_cv_fixup_sigwinch+set}" = set; then
12342   echo $ECHO_N "(cached) $ECHO_C" >&6
12343 else
12344
12345 cf_cv_fixup_sigwinch=unknown
12346 cf_sigwinch=32
12347 while test "$cf_sigwinch" != 1
12348 do
12349         cat >"conftest.$ac_ext" <<_ACEOF
12350 #line 12350 "configure"
12351 #include "confdefs.h"
12352
12353 #undef _XOPEN_SOURCE
12354 #undef _POSIX_SOURCE
12355 #undef _POSIX_C_SOURCE
12356 #include <sys/types.h>
12357 #include <sys/signal.h>
12358
12359 int
12360 main (void)
12361 {
12362
12363 #if SIGWINCH != $cf_sigwinch
12364 #error SIGWINCH is not $cf_sigwinch
12365 #endif
12366 int x = SIGWINCH; (void)x
12367   ;
12368   return 0;
12369 }
12370 _ACEOF
12371 rm -f "conftest.$ac_objext"
12372 if { (eval echo "$as_me:12372: \"$ac_compile\"") >&5
12373   (eval $ac_compile) 2>&5
12374   ac_status=$?
12375   echo "$as_me:12375: \$? = $ac_status" >&5
12376   (exit "$ac_status"); } &&
12377          { ac_try='test -s "conftest.$ac_objext"'
12378   { (eval echo "$as_me:12378: \"$ac_try\"") >&5
12379   (eval $ac_try) 2>&5
12380   ac_status=$?
12381   echo "$as_me:12381: \$? = $ac_status" >&5
12382   (exit "$ac_status"); }; }; then
12383   cf_cv_fixup_sigwinch=$cf_sigwinch
12384          break
12385 else
12386   echo "$as_me: failed program was:" >&5
12387 cat "conftest.$ac_ext" >&5
12388 fi
12389 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12390
12391 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
12392 done
12393
12394 fi
12395 echo "$as_me:12395: result: $cf_cv_fixup_sigwinch" >&5
12396 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
12397
12398         if test "$cf_cv_fixup_sigwinch" != unknown ; then
12399                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
12400         fi
12401 fi
12402
12403 # Checks for CODESET support.
12404
12405 echo "$as_me:12405: checking for nl_langinfo and CODESET" >&5
12406 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
12407 if test "${am_cv_langinfo_codeset+set}" = set; then
12408   echo $ECHO_N "(cached) $ECHO_C" >&6
12409 else
12410   cat >"conftest.$ac_ext" <<_ACEOF
12411 #line 12411 "configure"
12412 #include "confdefs.h"
12413
12414 $ac_includes_default
12415 #include <langinfo.h>
12416 int
12417 main (void)
12418 {
12419 char* cs = nl_langinfo(CODESET); (void)cs
12420   ;
12421   return 0;
12422 }
12423 _ACEOF
12424 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12425 if { (eval echo "$as_me:12425: \"$ac_link\"") >&5
12426   (eval $ac_link) 2>&5
12427   ac_status=$?
12428   echo "$as_me:12428: \$? = $ac_status" >&5
12429   (exit "$ac_status"); } &&
12430          { ac_try='test -s "conftest$ac_exeext"'
12431   { (eval echo "$as_me:12431: \"$ac_try\"") >&5
12432   (eval $ac_try) 2>&5
12433   ac_status=$?
12434   echo "$as_me:12434: \$? = $ac_status" >&5
12435   (exit "$ac_status"); }; }; then
12436   am_cv_langinfo_codeset=yes
12437 else
12438   echo "$as_me: failed program was:" >&5
12439 cat "conftest.$ac_ext" >&5
12440 am_cv_langinfo_codeset=no
12441 fi
12442 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12443
12444 fi
12445 echo "$as_me:12445: result: $am_cv_langinfo_codeset" >&5
12446 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
12447         if test "$am_cv_langinfo_codeset" = yes; then
12448
12449 cat >>confdefs.h <<\EOF
12450 #define HAVE_LANGINFO_CODESET 1
12451 EOF
12452
12453         fi
12454
12455 # use these variables to work around a defect in gcc's fixincludes.
12456 NCURSES_OK_WCHAR_T=
12457 NCURSES_OK_WINT_T=
12458
12459 echo "$as_me:12459: checking if you want wide-character code" >&5
12460 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
12461
12462 # Check whether --enable-widec or --disable-widec was given.
12463 if test "${enable_widec+set}" = set; then
12464   enableval="$enable_widec"
12465   with_widec=$enableval
12466 else
12467   with_widec=$cf_dft_widec
12468 fi;
12469 echo "$as_me:12469: result: $with_widec" >&5
12470 echo "${ECHO_T}$with_widec" >&6
12471
12472 NCURSES_WCWIDTH_GRAPHICS=1
12473
12474 if test "x$with_widec" = xyes ; then
12475         if test "x$disable_lib_suffixes" = xno ; then
12476                 LIB_SUFFIX="w${LIB_SUFFIX}"
12477         fi
12478
12479 cat >>confdefs.h <<\EOF
12480 #define USE_WIDEC_SUPPORT 1
12481 EOF
12482
12483 cat >>confdefs.h <<\EOF
12484 #define NCURSES_WIDECHAR 1
12485 EOF
12486
12487         case "$CPPFLAGS" in
12488         (*_XOPEN_SOURCE=*)
12489                 ;;
12490         (*)
12491                 { echo "$as_me:12491: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&5
12492 echo "$as_me: WARNING: _XOPEN_SOURCE feature test macro appears to be predefined" >&2;}
12493                 # CPPFLAGS="$CPPFLAGS -DNCURSES_WIDECHAR"
12494                 CPPFLAGS_after_XOPEN="$CPPFLAGS_after_XOPEN -DNCURSES_WIDECHAR"
12495                 ;;
12496         esac
12497
12498 for ac_header in \
12499 wchar.h \
12500 wctype.h \
12501
12502 do
12503 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12504 echo "$as_me:12504: checking for $ac_header" >&5
12505 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12506 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12507   echo $ECHO_N "(cached) $ECHO_C" >&6
12508 else
12509   cat >"conftest.$ac_ext" <<_ACEOF
12510 #line 12510 "configure"
12511 #include "confdefs.h"
12512 #include <$ac_header>
12513 _ACEOF
12514 if { (eval echo "$as_me:12514: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12515   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12516   ac_status=$?
12517   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12518   rm -f conftest.er1
12519   cat conftest.err >&5
12520   echo "$as_me:12520: \$? = $ac_status" >&5
12521   (exit "$ac_status"); } >/dev/null; then
12522   if test -s conftest.err; then
12523     ac_cpp_err=$ac_c_preproc_warn_flag
12524   else
12525     ac_cpp_err=
12526   fi
12527 else
12528   ac_cpp_err=yes
12529 fi
12530 if test -z "$ac_cpp_err"; then
12531   eval "$as_ac_Header=yes"
12532 else
12533   echo "$as_me: failed program was:" >&5
12534   cat "conftest.$ac_ext" >&5
12535   eval "$as_ac_Header=no"
12536 fi
12537 rm -f conftest.err "conftest.$ac_ext"
12538 fi
12539 echo "$as_me:12539: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12540 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12541 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12542   cat >>confdefs.h <<EOF
12543 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12544 EOF
12545
12546 fi
12547 done
12548
12549 echo "$as_me:12549: checking if wchar.h can be used as is" >&5
12550 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
12551 if test "${cf_cv_wchar_h_okay+set}" = set; then
12552   echo $ECHO_N "(cached) $ECHO_C" >&6
12553 else
12554
12555 cat >"conftest.$ac_ext" <<_ACEOF
12556 #line 12556 "configure"
12557 #include "confdefs.h"
12558
12559 $ac_includes_default
12560 #ifdef HAVE_WCHAR_H
12561 #include <wchar.h>
12562 #endif
12563 #ifdef HAVE_WCTYPE_H
12564 #include <wctype.h>
12565 #endif
12566
12567 int
12568 main (void)
12569 {
12570
12571         wint_t foo = 0;
12572         int bar = iswpunct(foo)
12573   ;
12574   return 0;
12575 }
12576 _ACEOF
12577 rm -f "conftest.$ac_objext"
12578 if { (eval echo "$as_me:12578: \"$ac_compile\"") >&5
12579   (eval $ac_compile) 2>&5
12580   ac_status=$?
12581   echo "$as_me:12581: \$? = $ac_status" >&5
12582   (exit "$ac_status"); } &&
12583          { ac_try='test -s "conftest.$ac_objext"'
12584   { (eval echo "$as_me:12584: \"$ac_try\"") >&5
12585   (eval $ac_try) 2>&5
12586   ac_status=$?
12587   echo "$as_me:12587: \$? = $ac_status" >&5
12588   (exit "$ac_status"); }; }; then
12589   cf_cv_wchar_h_okay=yes
12590 else
12591   echo "$as_me: failed program was:" >&5
12592 cat "conftest.$ac_ext" >&5
12593 cf_cv_wchar_h_okay=no
12594 fi
12595 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12596 fi
12597 echo "$as_me:12597: result: $cf_cv_wchar_h_okay" >&5
12598 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12599
12600 if test "$cf_cv_wchar_h_okay" = no
12601 then
12602
12603 echo "$as_me:12603: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12604 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12605 cat >"conftest.$ac_ext" <<_ACEOF
12606 #line 12606 "configure"
12607 #include "confdefs.h"
12608 #include <sys/types.h>
12609
12610 int
12611 main (void)
12612 {
12613
12614 #ifndef _XOPEN_SOURCE_EXTENDED
12615 #error _XOPEN_SOURCE_EXTENDED is not defined
12616 #endif
12617   ;
12618   return 0;
12619 }
12620 _ACEOF
12621 rm -f "conftest.$ac_objext"
12622 if { (eval echo "$as_me:12622: \"$ac_compile\"") >&5
12623   (eval $ac_compile) 2>&5
12624   ac_status=$?
12625   echo "$as_me:12625: \$? = $ac_status" >&5
12626   (exit "$ac_status"); } &&
12627          { ac_try='test -s "conftest.$ac_objext"'
12628   { (eval echo "$as_me:12628: \"$ac_try\"") >&5
12629   (eval $ac_try) 2>&5
12630   ac_status=$?
12631   echo "$as_me:12631: \$? = $ac_status" >&5
12632   (exit "$ac_status"); }; }; then
12633   cf_result=no
12634 else
12635   echo "$as_me: failed program was:" >&5
12636 cat "conftest.$ac_ext" >&5
12637 cf_result=yes
12638 fi
12639 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12640 echo "$as_me:12640: result: $cf_result" >&5
12641 echo "${ECHO_T}$cf_result" >&6
12642
12643 if test "$cf_result" = yes ; then
12644         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12645 elif test "x" != "x" ; then
12646         echo "$as_me:12646: checking checking for compatible value versus " >&5
12647 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12648         cat >"conftest.$ac_ext" <<_ACEOF
12649 #line 12649 "configure"
12650 #include "confdefs.h"
12651 #include <sys/types.h>
12652
12653 int
12654 main (void)
12655 {
12656
12657 #if _XOPEN_SOURCE_EXTENDED- < 0
12658 #error _XOPEN_SOURCE_EXTENDED- is negative
12659 #endif
12660   ;
12661   return 0;
12662 }
12663 _ACEOF
12664 rm -f "conftest.$ac_objext"
12665 if { (eval echo "$as_me:12665: \"$ac_compile\"") >&5
12666   (eval $ac_compile) 2>&5
12667   ac_status=$?
12668   echo "$as_me:12668: \$? = $ac_status" >&5
12669   (exit "$ac_status"); } &&
12670          { ac_try='test -s "conftest.$ac_objext"'
12671   { (eval echo "$as_me:12671: \"$ac_try\"") >&5
12672   (eval $ac_try) 2>&5
12673   ac_status=$?
12674   echo "$as_me:12674: \$? = $ac_status" >&5
12675   (exit "$ac_status"); }; }; then
12676   cf_result=yes
12677 else
12678   echo "$as_me: failed program was:" >&5
12679 cat "conftest.$ac_ext" >&5
12680 cf_result=no
12681 fi
12682 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12683         echo "$as_me:12683: result: $cf_result" >&5
12684 echo "${ECHO_T}$cf_result" >&6
12685         if test "$cf_result" = no ; then
12686                 # perhaps we can override it - try...
12687                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12688         fi
12689 fi
12690
12691 fi
12692
12693 echo "$as_me:12693: checking if wcwidth agrees graphics are single-width" >&5
12694 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12695 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12696   echo $ECHO_N "(cached) $ECHO_C" >&6
12697 else
12698
12699 cat >conftest.in <<CF_EOF
12700 -       VT100 symbols
12701 0x250c  upper left corner
12702 0x2514  lower left corner
12703 0x2510  upper right corner
12704 0x2518  lower right corner
12705 0x251c  tee pointing left
12706 0x2524  tee pointing right
12707 0x2534  tee pointing up
12708 0x252c  tee pointing down
12709 0x2500  horizontal line
12710 0x2502  vertical line
12711 0x253c  large plus or crossover
12712 0x23ba  scan line 1
12713 0x23bd  scan line 9
12714 0x25c6  diamond
12715 0x2592  checker board (stipple)
12716 0x00b0  degree symbol
12717 0x00b1  plus/minus
12718 0x00b7  bullet
12719 -       Teletype 5410v1 symbols
12720 0x2190  arrow pointing left
12721 0x2192  arrow pointing right
12722 0x2193  arrow pointing down
12723 0x2191  arrow pointing up
12724 0x2592  board of squares
12725 0x2603  lantern symbol
12726 0x25ae  solid square block
12727 -       these defaults were invented for ncurses
12728 0x23bb  scan line 3
12729 0x23bc  scan line 7
12730 0x2264  less-than-or-equal-to
12731 0x2265  greater-than-or-equal-to
12732 0x03c0  greek pi
12733 0x2260  not-equal
12734 0x00a3  pound-sterling symbol
12735 -       thick-line-drawing
12736 0x250f  upper left corner
12737 0x2517  lower left corner
12738 0x2513  upper right corner
12739 0x251b  lower right corner
12740 0x2523  tee pointing left
12741 0x252b  tee pointing right
12742 0x253b  tee pointing up
12743 0x2533  tee pointing down
12744 0x2501  horizontal line
12745 0x2503  vertical line
12746 0x254b  large plus or crossover
12747 -       double-line-drawing
12748 0x2554  upper left corner
12749 0x255a  lower left corner
12750 0x2557  upper right corner
12751 0x255d  lower right corner
12752 0x2563  tee pointing left
12753 0x2560  tee pointing right
12754 0x2569  tee pointing up
12755 0x2566  tee pointing down
12756 0x2550  horizontal line
12757 0x2551  vertical line
12758 0x256c  large plus or crossover
12759 CF_EOF
12760 if test "$cross_compiling" = yes; then
12761   cf_cv_wcwidth_graphics=unknown
12762 else
12763   cat >"conftest.$ac_ext" <<_ACEOF
12764 #line 12764 "configure"
12765 #include "confdefs.h"
12766
12767 $ac_includes_default
12768
12769 #include <locale.h>
12770 #include <wchar.h>
12771
12772 #define MY_LEN 80
12773
12774 int
12775 main(void)
12776 {
12777         FILE *fp;
12778         int value;
12779         char buffer[MY_LEN + 1];
12780         char notes[MY_LEN + 1];
12781         int totals = 0;
12782         int passed = 0;
12783
12784         if (setlocale(LC_ALL, "en_US.UTF8") ||
12785                 setlocale(LC_ALL, "en_US.UTF-8") ||
12786                 setlocale(LC_ALL, "en_US.utf8") ||
12787                 setlocale(LC_ALL, "en_US.utf-8")) {
12788                 if ((fp = fopen("conftest.in", "r")) != 0) {
12789                         while (fgets(buffer, MY_LEN, fp) != 0) {
12790                                 if (*buffer == '-') {
12791                                         fprintf(stderr, "\\t%s", buffer);
12792                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12793                                         ++totals;
12794                                         if (wcwidth(value) == 1)
12795                                                 ++passed;
12796                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12797                                 } else {
12798                                         fprintf(stderr, "?\\t%s", buffer);
12799                                 }
12800                         }
12801                 }
12802         }
12803         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12804         return (totals == passed) ? 0 : 1;
12805 }
12806
12807 _ACEOF
12808 rm -f "conftest$ac_exeext"
12809 if { (eval echo "$as_me:12809: \"$ac_link\"") >&5
12810   (eval $ac_link) 2>&5
12811   ac_status=$?
12812   echo "$as_me:12812: \$? = $ac_status" >&5
12813   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12814   { (eval echo "$as_me:12814: \"$ac_try\"") >&5
12815   (eval $ac_try) 2>&5
12816   ac_status=$?
12817   echo "$as_me:12817: \$? = $ac_status" >&5
12818   (exit "$ac_status"); }; }; then
12819   cf_cv_wcwidth_graphics=yes
12820 else
12821   echo "$as_me: program exited with status $ac_status" >&5
12822 echo "$as_me: failed program was:" >&5
12823 cat "conftest.$ac_ext" >&5
12824 cf_cv_wcwidth_graphics=no
12825 fi
12826 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12827 fi
12828
12829 fi
12830 echo "$as_me:12830: result: $cf_cv_wcwidth_graphics" >&5
12831 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12832
12833         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12834
12835         # with_overwrite=no
12836         NCURSES_CH_T=cchar_t
12837
12838 for ac_func in putwc btowc wctob wmemchr mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12839 do
12840 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12841 echo "$as_me:12841: checking for $ac_func" >&5
12842 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12843 if eval "test \"\${$as_ac_var+set}\" = set"; then
12844   echo $ECHO_N "(cached) $ECHO_C" >&6
12845 else
12846   cat >"conftest.$ac_ext" <<_ACEOF
12847 #line 12847 "configure"
12848 #include "confdefs.h"
12849 #define $ac_func autoconf_temporary
12850 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12851 #undef $ac_func
12852
12853 #ifdef __cplusplus
12854 extern "C"
12855 #endif
12856
12857 /* We use char because int might match the return type of a gcc2
12858    builtin and then its argument prototype would still apply.  */
12859 char $ac_func (void);
12860
12861 int
12862 main (void)
12863 {
12864
12865 /* The GNU C library defines stubs for functions which it implements
12866     to always fail with ENOSYS.  Some functions are actually named
12867     something starting with __ and the normal name is an alias.  */
12868 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12869 #error found stub for $ac_func
12870 #endif
12871
12872         return $ac_func ();
12873   ;
12874   return 0;
12875 }
12876 _ACEOF
12877 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12878 if { (eval echo "$as_me:12878: \"$ac_link\"") >&5
12879   (eval $ac_link) 2>&5
12880   ac_status=$?
12881   echo "$as_me:12881: \$? = $ac_status" >&5
12882   (exit "$ac_status"); } &&
12883          { ac_try='test -s "conftest$ac_exeext"'
12884   { (eval echo "$as_me:12884: \"$ac_try\"") >&5
12885   (eval $ac_try) 2>&5
12886   ac_status=$?
12887   echo "$as_me:12887: \$? = $ac_status" >&5
12888   (exit "$ac_status"); }; }; then
12889   eval "$as_ac_var=yes"
12890 else
12891   echo "$as_me: failed program was:" >&5
12892 cat "conftest.$ac_ext" >&5
12893 eval "$as_ac_var=no"
12894 fi
12895 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12896 fi
12897 echo "$as_me:12897: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12898 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12899 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12900   cat >>confdefs.h <<EOF
12901 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12902 EOF
12903
12904 fi
12905 done
12906
12907         if test "x$ac_cv_func_putwc" != xyes ; then
12908
12909 for ac_header in wchar.h
12910 do
12911 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12912 echo "$as_me:12912: checking for $ac_header" >&5
12913 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12914 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12915   echo $ECHO_N "(cached) $ECHO_C" >&6
12916 else
12917   cat >"conftest.$ac_ext" <<_ACEOF
12918 #line 12918 "configure"
12919 #include "confdefs.h"
12920 #include <$ac_header>
12921 _ACEOF
12922 if { (eval echo "$as_me:12922: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12923   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12924   ac_status=$?
12925   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12926   rm -f conftest.er1
12927   cat conftest.err >&5
12928   echo "$as_me:12928: \$? = $ac_status" >&5
12929   (exit "$ac_status"); } >/dev/null; then
12930   if test -s conftest.err; then
12931     ac_cpp_err=$ac_c_preproc_warn_flag
12932   else
12933     ac_cpp_err=
12934   fi
12935 else
12936   ac_cpp_err=yes
12937 fi
12938 if test -z "$ac_cpp_err"; then
12939   eval "$as_ac_Header=yes"
12940 else
12941   echo "$as_me: failed program was:" >&5
12942   cat "conftest.$ac_ext" >&5
12943   eval "$as_ac_Header=no"
12944 fi
12945 rm -f conftest.err "conftest.$ac_ext"
12946 fi
12947 echo "$as_me:12947: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12948 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12949 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12950   cat >>confdefs.h <<EOF
12951 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12952 EOF
12953
12954 fi
12955 done
12956
12957 echo "$as_me:12957: checking for multibyte character support" >&5
12958 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12959 if test "${cf_cv_utf8_lib+set}" = set; then
12960   echo $ECHO_N "(cached) $ECHO_C" >&6
12961 else
12962
12963         cf_save_LIBS="$LIBS"
12964         cat >"conftest.$ac_ext" <<_ACEOF
12965 #line 12965 "configure"
12966 #include "confdefs.h"
12967
12968 $ac_includes_default
12969 #ifdef HAVE_WCHAR_H
12970 #include <wchar.h>
12971 #endif
12972
12973 int
12974 main (void)
12975 {
12976 putwc(0,0);
12977   ;
12978   return 0;
12979 }
12980 _ACEOF
12981 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12982 if { (eval echo "$as_me:12982: \"$ac_link\"") >&5
12983   (eval $ac_link) 2>&5
12984   ac_status=$?
12985   echo "$as_me:12985: \$? = $ac_status" >&5
12986   (exit "$ac_status"); } &&
12987          { ac_try='test -s "conftest$ac_exeext"'
12988   { (eval echo "$as_me:12988: \"$ac_try\"") >&5
12989   (eval $ac_try) 2>&5
12990   ac_status=$?
12991   echo "$as_me:12991: \$? = $ac_status" >&5
12992   (exit "$ac_status"); }; }; then
12993   cf_cv_utf8_lib=yes
12994 else
12995   echo "$as_me: failed program was:" >&5
12996 cat "conftest.$ac_ext" >&5
12997
12998 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12999 # will be set on completion of the AC_TRY_LINK below.
13000 cf_cv_header_path_utf8=
13001 cf_cv_library_path_utf8=
13002
13003 echo "${as_me:-configure}:13003: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
13004
13005 cf_save_LIBS="$LIBS"
13006
13007 cat >"conftest.$ac_ext" <<_ACEOF
13008 #line 13008 "configure"
13009 #include "confdefs.h"
13010
13011 #include <libutf8.h>
13012 int
13013 main (void)
13014 {
13015 putwc(0,0);
13016   ;
13017   return 0;
13018 }
13019 _ACEOF
13020 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13021 if { (eval echo "$as_me:13021: \"$ac_link\"") >&5
13022   (eval $ac_link) 2>&5
13023   ac_status=$?
13024   echo "$as_me:13024: \$? = $ac_status" >&5
13025   (exit "$ac_status"); } &&
13026          { ac_try='test -s "conftest$ac_exeext"'
13027   { (eval echo "$as_me:13027: \"$ac_try\"") >&5
13028   (eval $ac_try) 2>&5
13029   ac_status=$?
13030   echo "$as_me:13030: \$? = $ac_status" >&5
13031   (exit "$ac_status"); }; }; then
13032
13033         cf_cv_find_linkage_utf8=yes
13034         cf_cv_header_path_utf8=/usr/include
13035         cf_cv_library_path_utf8=/usr/lib
13036
13037 else
13038   echo "$as_me: failed program was:" >&5
13039 cat "conftest.$ac_ext" >&5
13040
13041 LIBS="-lutf8  $cf_save_LIBS"
13042
13043 cat >"conftest.$ac_ext" <<_ACEOF
13044 #line 13044 "configure"
13045 #include "confdefs.h"
13046
13047 #include <libutf8.h>
13048 int
13049 main (void)
13050 {
13051 putwc(0,0);
13052   ;
13053   return 0;
13054 }
13055 _ACEOF
13056 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13057 if { (eval echo "$as_me:13057: \"$ac_link\"") >&5
13058   (eval $ac_link) 2>&5
13059   ac_status=$?
13060   echo "$as_me:13060: \$? = $ac_status" >&5
13061   (exit "$ac_status"); } &&
13062          { ac_try='test -s "conftest$ac_exeext"'
13063   { (eval echo "$as_me:13063: \"$ac_try\"") >&5
13064   (eval $ac_try) 2>&5
13065   ac_status=$?
13066   echo "$as_me:13066: \$? = $ac_status" >&5
13067   (exit "$ac_status"); }; }; then
13068
13069         cf_cv_find_linkage_utf8=yes
13070         cf_cv_header_path_utf8=/usr/include
13071         cf_cv_library_path_utf8=/usr/lib
13072         cf_cv_library_file_utf8="-lutf8"
13073
13074 else
13075   echo "$as_me: failed program was:" >&5
13076 cat "conftest.$ac_ext" >&5
13077
13078         cf_cv_find_linkage_utf8=no
13079         LIBS="$cf_save_LIBS"
13080
13081         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
13082
13083 echo "${as_me:-configure}:13083: testing find linkage for utf8 library ..." 1>&5
13084
13085 echo "${as_me:-configure}:13085: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
13086
13087         cf_save_CPPFLAGS="$CPPFLAGS"
13088         cf_test_CPPFLAGS="$CPPFLAGS"
13089
13090 cf_search=
13091
13092 # collect the current set of include-directories from compiler flags
13093 cf_header_path_list=""
13094 if test -n "${CFLAGS}${CPPFLAGS}" ; then
13095         for cf_header_path in $CPPFLAGS $CFLAGS
13096         do
13097                 case "$cf_header_path" in
13098                 (-I*)
13099                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13100
13101 test "x$cf_header_path" != "xNONE" && \
13102 test -d "$cf_header_path" && \
13103  {
13104         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
13105         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13106         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
13107         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
13108         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
13109         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
13110 }
13111
13112                         cf_header_path_list="$cf_header_path_list $cf_search"
13113                         ;;
13114                 esac
13115         done
13116 fi
13117
13118 # add the variations for the package we are looking for
13119
13120 cf_search=
13121
13122 test "x$prefix" != "xNONE" && \
13123 test -d "$prefix" && \
13124  {
13125         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
13126         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13127         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
13128         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
13129         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
13130         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
13131 }
13132
13133 for cf_subdir_prefix in \
13134         /usr \
13135         /usr/local \
13136         /usr/pkg \
13137         /opt \
13138         /opt/local \
13139         $HOME
13140 do
13141
13142 test "x$cf_subdir_prefix" != "x$prefix" && \
13143 test -d "$cf_subdir_prefix" && \
13144 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13145         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
13146         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13147         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
13148         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
13149         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
13150         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
13151 }
13152
13153 done
13154
13155 test "$includedir" != NONE && \
13156 test "$includedir" != "/usr/include" && \
13157 test -d "$includedir" && {
13158         test -d "$includedir" &&    cf_search="$cf_search $includedir"
13159         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
13160 }
13161
13162 test "$oldincludedir" != NONE && \
13163 test "$oldincludedir" != "/usr/include" && \
13164 test -d "$oldincludedir" && {
13165         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13166         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
13167 }
13168
13169 cf_search="$cf_search $cf_header_path_list"
13170
13171         for cf_cv_header_path_utf8 in $cf_search
13172         do
13173                 if test -d "$cf_cv_header_path_utf8" ; then
13174                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
13175
13176 echo "${as_me:-configure}:13176: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
13177
13178                         CPPFLAGS="$cf_save_CPPFLAGS"
13179
13180         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13181         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
13182
13183                         cat >"conftest.$ac_ext" <<_ACEOF
13184 #line 13184 "configure"
13185 #include "confdefs.h"
13186
13187 #include <libutf8.h>
13188 int
13189 main (void)
13190 {
13191 putwc(0,0);
13192   ;
13193   return 0;
13194 }
13195 _ACEOF
13196 rm -f "conftest.$ac_objext"
13197 if { (eval echo "$as_me:13197: \"$ac_compile\"") >&5
13198   (eval $ac_compile) 2>&5
13199   ac_status=$?
13200   echo "$as_me:13200: \$? = $ac_status" >&5
13201   (exit "$ac_status"); } &&
13202          { ac_try='test -s "conftest.$ac_objext"'
13203   { (eval echo "$as_me:13203: \"$ac_try\"") >&5
13204   (eval $ac_try) 2>&5
13205   ac_status=$?
13206   echo "$as_me:13206: \$? = $ac_status" >&5
13207   (exit "$ac_status"); }; }; then
13208
13209                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
13210
13211 echo "${as_me:-configure}:13211: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
13212
13213                                 cf_cv_find_linkage_utf8=maybe
13214                                 cf_test_CPPFLAGS="$CPPFLAGS"
13215                                 break
13216 else
13217   echo "$as_me: failed program was:" >&5
13218 cat "conftest.$ac_ext" >&5
13219
13220                                 CPPFLAGS="$cf_save_CPPFLAGS"
13221
13222 fi
13223 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13224                 fi
13225         done
13226
13227         if test "$cf_cv_find_linkage_utf8" = maybe ; then
13228
13229 echo "${as_me:-configure}:13229: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
13230
13231                 cf_save_LIBS="$LIBS"
13232                 cf_save_LDFLAGS="$LDFLAGS"
13233
13234                 if test "$cf_cv_find_linkage_utf8" != yes ; then
13235
13236 cf_search=
13237 cf_library_path_list=""
13238 if test -n "${LDFLAGS}${LIBS}" ; then
13239         for cf_library_path in $LDFLAGS $LIBS
13240         do
13241                 case "$cf_library_path" in
13242                 (-L*)
13243                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13244
13245 test "x$cf_library_path" != "xNONE" && \
13246 test -d "$cf_library_path" && \
13247  {
13248         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
13249         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
13250         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
13251         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
13252         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
13253         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
13254 }
13255
13256                         cf_library_path_list="$cf_library_path_list $cf_search"
13257                         ;;
13258                 esac
13259         done
13260 fi
13261
13262 cf_search=
13263
13264 test "x$prefix" != "xNONE" && \
13265 test -d "$prefix" && \
13266  {
13267         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
13268         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
13269         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
13270         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
13271         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
13272         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
13273 }
13274
13275 for cf_subdir_prefix in \
13276         /usr \
13277         /usr/local \
13278         /usr/pkg \
13279         /opt \
13280         /opt/local \
13281         $HOME
13282 do
13283
13284 test "x$cf_subdir_prefix" != "x$prefix" && \
13285 test -d "$cf_subdir_prefix" && \
13286 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13287         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
13288         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13289         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
13290         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
13291         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
13292         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
13293 }
13294
13295 done
13296
13297 cf_search="$cf_library_path_list $cf_search"
13298
13299                         for cf_cv_library_path_utf8 in $cf_search
13300                         do
13301                                 if test -d "$cf_cv_library_path_utf8" ; then
13302                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
13303
13304 echo "${as_me:-configure}:13304: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
13305
13306                                         CPPFLAGS="$cf_test_CPPFLAGS"
13307                                         LIBS="-lutf8  $cf_save_LIBS"
13308                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
13309                                         cat >"conftest.$ac_ext" <<_ACEOF
13310 #line 13310 "configure"
13311 #include "confdefs.h"
13312
13313 #include <libutf8.h>
13314 int
13315 main (void)
13316 {
13317 putwc(0,0);
13318   ;
13319   return 0;
13320 }
13321 _ACEOF
13322 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13323 if { (eval echo "$as_me:13323: \"$ac_link\"") >&5
13324   (eval $ac_link) 2>&5
13325   ac_status=$?
13326   echo "$as_me:13326: \$? = $ac_status" >&5
13327   (exit "$ac_status"); } &&
13328          { ac_try='test -s "conftest$ac_exeext"'
13329   { (eval echo "$as_me:13329: \"$ac_try\"") >&5
13330   (eval $ac_try) 2>&5
13331   ac_status=$?
13332   echo "$as_me:13332: \$? = $ac_status" >&5
13333   (exit "$ac_status"); }; }; then
13334
13335                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
13336
13337 echo "${as_me:-configure}:13337: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
13338
13339                                         cf_cv_find_linkage_utf8=yes
13340                                         cf_cv_library_file_utf8="-lutf8"
13341                                         break
13342 else
13343   echo "$as_me: failed program was:" >&5
13344 cat "conftest.$ac_ext" >&5
13345
13346                                         CPPFLAGS="$cf_save_CPPFLAGS"
13347                                         LIBS="$cf_save_LIBS"
13348                                         LDFLAGS="$cf_save_LDFLAGS"
13349
13350 fi
13351 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13352                                 fi
13353                         done
13354                         CPPFLAGS="$cf_save_CPPFLAGS"
13355                         LDFLAGS="$cf_save_LDFLAGS"
13356                 fi
13357
13358         else
13359                 cf_cv_find_linkage_utf8=no
13360         fi
13361
13362 fi
13363 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13364
13365 fi
13366 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13367
13368 LIBS="$cf_save_LIBS"
13369
13370 if test "$cf_cv_find_linkage_utf8" = yes ; then
13371 cf_cv_utf8_lib=add-on
13372 else
13373 cf_cv_utf8_lib=no
13374 fi
13375
13376 fi
13377 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13378 fi
13379 echo "$as_me:13379: result: $cf_cv_utf8_lib" >&5
13380 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
13381
13382 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
13383 # ncurses/ncursesw:
13384 if test "$cf_cv_utf8_lib" = "add-on" ; then
13385
13386 cat >>confdefs.h <<\EOF
13387 #define HAVE_LIBUTF8_H 1
13388 EOF
13389
13390 if test -n "$cf_cv_header_path_utf8" ; then
13391   for cf_add_incdir in $cf_cv_header_path_utf8
13392   do
13393         while test "$cf_add_incdir" != /usr/include
13394         do
13395           if test -d "$cf_add_incdir"
13396           then
13397                 cf_have_incdir=no
13398                 if test -n "$CFLAGS$CPPFLAGS" ; then
13399                   # a loop is needed to ensure we can add subdirs of existing dirs
13400                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13401                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13402                           cf_have_incdir=yes; break
13403                         fi
13404                   done
13405                 fi
13406
13407                 if test "$cf_have_incdir" = no ; then
13408                   if test "$cf_add_incdir" = /usr/local/include ; then
13409                         if test "$GCC" = yes
13410                         then
13411                           cf_save_CPPFLAGS=$CPPFLAGS
13412
13413         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13414         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13415
13416                           cat >"conftest.$ac_ext" <<_ACEOF
13417 #line 13417 "configure"
13418 #include "confdefs.h"
13419 #include <stdio.h>
13420 int
13421 main (void)
13422 {
13423 printf("Hello")
13424   ;
13425   return 0;
13426 }
13427 _ACEOF
13428 rm -f "conftest.$ac_objext"
13429 if { (eval echo "$as_me:13429: \"$ac_compile\"") >&5
13430   (eval $ac_compile) 2>&5
13431   ac_status=$?
13432   echo "$as_me:13432: \$? = $ac_status" >&5
13433   (exit "$ac_status"); } &&
13434          { ac_try='test -s "conftest.$ac_objext"'
13435   { (eval echo "$as_me:13435: \"$ac_try\"") >&5
13436   (eval $ac_try) 2>&5
13437   ac_status=$?
13438   echo "$as_me:13438: \$? = $ac_status" >&5
13439   (exit "$ac_status"); }; }; then
13440   :
13441 else
13442   echo "$as_me: failed program was:" >&5
13443 cat "conftest.$ac_ext" >&5
13444 cf_have_incdir=yes
13445 fi
13446 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13447                           CPPFLAGS=$cf_save_CPPFLAGS
13448                         fi
13449                   fi
13450                 fi
13451
13452                 if test "$cf_have_incdir" = no ; then
13453                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
13454
13455 echo "${as_me:-configure}:13455: testing adding $cf_add_incdir to include-path ..." 1>&5
13456
13457                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13458
13459                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13460                   test "$cf_top_incdir" = "$cf_add_incdir" && break
13461                   cf_add_incdir="$cf_top_incdir"
13462                 else
13463                   break
13464                 fi
13465           else
13466                 break
13467           fi
13468         done
13469   done
13470 fi
13471
13472 if test -n "$cf_cv_library_path_utf8" ; then
13473         for cf_add_libdir in $cf_cv_library_path_utf8
13474         do
13475                 if test "$cf_add_libdir" = /usr/lib ; then
13476                         :
13477                 elif test -d "$cf_add_libdir"
13478                 then
13479                         cf_have_libdir=no
13480                         if test -n "$LDFLAGS$LIBS" ; then
13481                                 # a loop is needed to ensure we can add subdirs of existing dirs
13482                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
13483                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13484                                                 cf_have_libdir=yes; break
13485                                         fi
13486                                 done
13487                         fi
13488                         if test "$cf_have_libdir" = no ; then
13489                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
13490
13491 echo "${as_me:-configure}:13491: testing adding $cf_add_libdir to library-path ..." 1>&5
13492
13493                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13494                         fi
13495                 fi
13496         done
13497 fi
13498
13499 cf_add_libs="$LIBS"
13500 # reverse order
13501 cf_add_0lib=
13502 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13503 # filter duplicates
13504 for cf_add_1lib in $cf_add_0lib; do
13505         for cf_add_2lib in $cf_add_libs; do
13506                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13507                         cf_add_1lib=
13508                         break
13509                 fi
13510         done
13511         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13512 done
13513 LIBS="$cf_add_libs"
13514
13515 fi
13516
13517                 if test "$cf_cv_utf8_lib" != no ; then
13518                         NCURSES_LIBUTF8=1
13519                 fi
13520         fi
13521
13522 # This is needed on Tru64 5.0 to declare mbstate_t
13523 echo "$as_me:13523: checking if we must include wchar.h to declare mbstate_t" >&5
13524 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
13525 if test "${cf_cv_mbstate_t+set}" = set; then
13526   echo $ECHO_N "(cached) $ECHO_C" >&6
13527 else
13528
13529 cat >"conftest.$ac_ext" <<_ACEOF
13530 #line 13530 "configure"
13531 #include "confdefs.h"
13532
13533 #include <stdlib.h>
13534 #include <stdarg.h>
13535 #include <stdio.h>
13536 #ifdef HAVE_LIBUTF8_H
13537 #include <libutf8.h>
13538 #endif
13539 int
13540 main (void)
13541 {
13542 mbstate_t state
13543   ;
13544   return 0;
13545 }
13546 _ACEOF
13547 rm -f "conftest.$ac_objext"
13548 if { (eval echo "$as_me:13548: \"$ac_compile\"") >&5
13549   (eval $ac_compile) 2>&5
13550   ac_status=$?
13551   echo "$as_me:13551: \$? = $ac_status" >&5
13552   (exit "$ac_status"); } &&
13553          { ac_try='test -s "conftest.$ac_objext"'
13554   { (eval echo "$as_me:13554: \"$ac_try\"") >&5
13555   (eval $ac_try) 2>&5
13556   ac_status=$?
13557   echo "$as_me:13557: \$? = $ac_status" >&5
13558   (exit "$ac_status"); }; }; then
13559   cf_cv_mbstate_t=no
13560 else
13561   echo "$as_me: failed program was:" >&5
13562 cat "conftest.$ac_ext" >&5
13563 cat >"conftest.$ac_ext" <<_ACEOF
13564 #line 13564 "configure"
13565 #include "confdefs.h"
13566
13567 #include <stdlib.h>
13568 #include <stdarg.h>
13569 #include <stdio.h>
13570 #include <wchar.h>
13571 #ifdef HAVE_LIBUTF8_H
13572 #include <libutf8.h>
13573 #endif
13574 int
13575 main (void)
13576 {
13577 mbstate_t value
13578   ;
13579   return 0;
13580 }
13581 _ACEOF
13582 rm -f "conftest.$ac_objext"
13583 if { (eval echo "$as_me:13583: \"$ac_compile\"") >&5
13584   (eval $ac_compile) 2>&5
13585   ac_status=$?
13586   echo "$as_me:13586: \$? = $ac_status" >&5
13587   (exit "$ac_status"); } &&
13588          { ac_try='test -s "conftest.$ac_objext"'
13589   { (eval echo "$as_me:13589: \"$ac_try\"") >&5
13590   (eval $ac_try) 2>&5
13591   ac_status=$?
13592   echo "$as_me:13592: \$? = $ac_status" >&5
13593   (exit "$ac_status"); }; }; then
13594   cf_cv_mbstate_t=yes
13595 else
13596   echo "$as_me: failed program was:" >&5
13597 cat "conftest.$ac_ext" >&5
13598 cf_cv_mbstate_t=unknown
13599 fi
13600 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13601 fi
13602 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13603 fi
13604 echo "$as_me:13604: result: $cf_cv_mbstate_t" >&5
13605 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13606
13607 if test "$cf_cv_mbstate_t" = yes ; then
13608
13609 cat >>confdefs.h <<\EOF
13610 #define NEED_WCHAR_H 1
13611 EOF
13612
13613         NEED_WCHAR_H=1
13614 fi
13615
13616 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13617 if test "$cf_cv_mbstate_t" = unknown ; then
13618         NCURSES_MBSTATE_T=1
13619 fi
13620
13621 # This is needed on Tru64 5.0 to declare wchar_t
13622 echo "$as_me:13622: checking if we must include wchar.h to declare wchar_t" >&5
13623 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13624 if test "${cf_cv_wchar_t+set}" = set; then
13625   echo $ECHO_N "(cached) $ECHO_C" >&6
13626 else
13627
13628 cat >"conftest.$ac_ext" <<_ACEOF
13629 #line 13629 "configure"
13630 #include "confdefs.h"
13631
13632 #include <stdlib.h>
13633 #include <stdarg.h>
13634 #include <stdio.h>
13635 #ifdef HAVE_LIBUTF8_H
13636 #include <libutf8.h>
13637 #endif
13638 int
13639 main (void)
13640 {
13641 wchar_t state
13642   ;
13643   return 0;
13644 }
13645 _ACEOF
13646 rm -f "conftest.$ac_objext"
13647 if { (eval echo "$as_me:13647: \"$ac_compile\"") >&5
13648   (eval $ac_compile) 2>&5
13649   ac_status=$?
13650   echo "$as_me:13650: \$? = $ac_status" >&5
13651   (exit "$ac_status"); } &&
13652          { ac_try='test -s "conftest.$ac_objext"'
13653   { (eval echo "$as_me:13653: \"$ac_try\"") >&5
13654   (eval $ac_try) 2>&5
13655   ac_status=$?
13656   echo "$as_me:13656: \$? = $ac_status" >&5
13657   (exit "$ac_status"); }; }; then
13658   cf_cv_wchar_t=no
13659 else
13660   echo "$as_me: failed program was:" >&5
13661 cat "conftest.$ac_ext" >&5
13662 cat >"conftest.$ac_ext" <<_ACEOF
13663 #line 13663 "configure"
13664 #include "confdefs.h"
13665
13666 #include <stdlib.h>
13667 #include <stdarg.h>
13668 #include <stdio.h>
13669 #include <wchar.h>
13670 #ifdef HAVE_LIBUTF8_H
13671 #include <libutf8.h>
13672 #endif
13673 int
13674 main (void)
13675 {
13676 wchar_t value
13677   ;
13678   return 0;
13679 }
13680 _ACEOF
13681 rm -f "conftest.$ac_objext"
13682 if { (eval echo "$as_me:13682: \"$ac_compile\"") >&5
13683   (eval $ac_compile) 2>&5
13684   ac_status=$?
13685   echo "$as_me:13685: \$? = $ac_status" >&5
13686   (exit "$ac_status"); } &&
13687          { ac_try='test -s "conftest.$ac_objext"'
13688   { (eval echo "$as_me:13688: \"$ac_try\"") >&5
13689   (eval $ac_try) 2>&5
13690   ac_status=$?
13691   echo "$as_me:13691: \$? = $ac_status" >&5
13692   (exit "$ac_status"); }; }; then
13693   cf_cv_wchar_t=yes
13694 else
13695   echo "$as_me: failed program was:" >&5
13696 cat "conftest.$ac_ext" >&5
13697 cf_cv_wchar_t=unknown
13698 fi
13699 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13700 fi
13701 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13702 fi
13703 echo "$as_me:13703: result: $cf_cv_wchar_t" >&5
13704 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13705
13706 if test "$cf_cv_wchar_t" = yes ; then
13707
13708 cat >>confdefs.h <<\EOF
13709 #define NEED_WCHAR_H 1
13710 EOF
13711
13712         NEED_WCHAR_H=1
13713 fi
13714
13715 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13716 if test "$cf_cv_wchar_t" = unknown ; then
13717         NCURSES_WCHAR_T=1
13718 fi
13719
13720 # if we find wchar_t in either place, use substitution to provide a fallback.
13721 if test "$cf_cv_wchar_t" != unknown ; then
13722         NCURSES_OK_WCHAR_T=1
13723 fi
13724
13725 # This is needed on Tru64 5.0 to declare wint_t
13726 echo "$as_me:13726: checking if we must include wchar.h to declare wint_t" >&5
13727 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13728 if test "${cf_cv_wint_t+set}" = set; then
13729   echo $ECHO_N "(cached) $ECHO_C" >&6
13730 else
13731
13732 cat >"conftest.$ac_ext" <<_ACEOF
13733 #line 13733 "configure"
13734 #include "confdefs.h"
13735
13736 #include <stdlib.h>
13737 #include <stdarg.h>
13738 #include <stdio.h>
13739 #ifdef HAVE_LIBUTF8_H
13740 #include <libutf8.h>
13741 #endif
13742 int
13743 main (void)
13744 {
13745 wint_t state
13746   ;
13747   return 0;
13748 }
13749 _ACEOF
13750 rm -f "conftest.$ac_objext"
13751 if { (eval echo "$as_me:13751: \"$ac_compile\"") >&5
13752   (eval $ac_compile) 2>&5
13753   ac_status=$?
13754   echo "$as_me:13754: \$? = $ac_status" >&5
13755   (exit "$ac_status"); } &&
13756          { ac_try='test -s "conftest.$ac_objext"'
13757   { (eval echo "$as_me:13757: \"$ac_try\"") >&5
13758   (eval $ac_try) 2>&5
13759   ac_status=$?
13760   echo "$as_me:13760: \$? = $ac_status" >&5
13761   (exit "$ac_status"); }; }; then
13762   cf_cv_wint_t=no
13763 else
13764   echo "$as_me: failed program was:" >&5
13765 cat "conftest.$ac_ext" >&5
13766 cat >"conftest.$ac_ext" <<_ACEOF
13767 #line 13767 "configure"
13768 #include "confdefs.h"
13769
13770 #include <stdlib.h>
13771 #include <stdarg.h>
13772 #include <stdio.h>
13773 #include <wchar.h>
13774 #ifdef HAVE_LIBUTF8_H
13775 #include <libutf8.h>
13776 #endif
13777 int
13778 main (void)
13779 {
13780 wint_t value
13781   ;
13782   return 0;
13783 }
13784 _ACEOF
13785 rm -f "conftest.$ac_objext"
13786 if { (eval echo "$as_me:13786: \"$ac_compile\"") >&5
13787   (eval $ac_compile) 2>&5
13788   ac_status=$?
13789   echo "$as_me:13789: \$? = $ac_status" >&5
13790   (exit "$ac_status"); } &&
13791          { ac_try='test -s "conftest.$ac_objext"'
13792   { (eval echo "$as_me:13792: \"$ac_try\"") >&5
13793   (eval $ac_try) 2>&5
13794   ac_status=$?
13795   echo "$as_me:13795: \$? = $ac_status" >&5
13796   (exit "$ac_status"); }; }; then
13797   cf_cv_wint_t=yes
13798 else
13799   echo "$as_me: failed program was:" >&5
13800 cat "conftest.$ac_ext" >&5
13801 cf_cv_wint_t=unknown
13802 fi
13803 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13804 fi
13805 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13806 fi
13807 echo "$as_me:13807: result: $cf_cv_wint_t" >&5
13808 echo "${ECHO_T}$cf_cv_wint_t" >&6
13809
13810 if test "$cf_cv_wint_t" = yes ; then
13811
13812 cat >>confdefs.h <<\EOF
13813 #define NEED_WCHAR_H 1
13814 EOF
13815
13816         NEED_WCHAR_H=1
13817 fi
13818
13819 # if we do not find wint_t in either place, use substitution to provide a fallback.
13820 if test "$cf_cv_wint_t" = unknown ; then
13821         NCURSES_WINT_T=1
13822 fi
13823
13824 # if we find wint_t in either place, use substitution to provide a fallback.
13825 if test "$cf_cv_wint_t" != unknown ; then
13826         NCURSES_OK_WINT_T=1
13827 fi
13828
13829         if test "$NCURSES_MBSTATE_T" != 0; then
13830
13831 cat >>confdefs.h <<\EOF
13832 #define NEED_MBSTATE_T_DEF 1
13833 EOF
13834
13835         fi
13836 fi
13837
13838 ###   use option --disable-lp64 to allow long chtype
13839 echo "$as_me:13839: checking whether to enable _LP64 definition in curses.h" >&5
13840 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13841
13842 # Check whether --enable-lp64 or --disable-lp64 was given.
13843 if test "${enable_lp64+set}" = set; then
13844   enableval="$enable_lp64"
13845   with_lp64=$enableval
13846 else
13847   with_lp64=$cf_dft_with_lp64
13848 fi;
13849 echo "$as_me:13849: result: $with_lp64" >&5
13850 echo "${ECHO_T}$with_lp64" >&6
13851
13852 if test "x$with_lp64" = xyes ; then
13853         cf_cv_enable_lp64=1
13854 else
13855         cf_cv_enable_lp64=0
13856 fi
13857
13858 # Check whether --enable-largefile or --disable-largefile was given.
13859 if test "${enable_largefile+set}" = set; then
13860   enableval="$enable_largefile"
13861
13862 fi;
13863 if test "$enable_largefile" != no; then
13864
13865   echo "$as_me:13865: checking for special C compiler options needed for large files" >&5
13866 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13867 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13868   echo $ECHO_N "(cached) $ECHO_C" >&6
13869 else
13870   ac_cv_sys_largefile_CC=no
13871      if test "$GCC" != yes; then
13872        ac_save_CC=$CC
13873        while :; do
13874          # IRIX 6.2 and later do not support large files by default,
13875          # so use the C compiler's -n32 option if that helps.
13876          cat >"conftest.$ac_ext" <<_ACEOF
13877 #line 13877 "configure"
13878 #include "confdefs.h"
13879 #include <sys/types.h>
13880  /* Check that off_t can represent 2**63 - 1 correctly.
13881     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13882     since some C++ compilers masquerading as C compilers
13883     incorrectly reject 9223372036854775807.  */
13884 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13885   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13886                        && LARGE_OFF_T % 2147483647 == 1)
13887                       ? 1 : -1];
13888 int
13889 main (void)
13890 {
13891
13892   ;
13893   return 0;
13894 }
13895 _ACEOF
13896          rm -f "conftest.$ac_objext"
13897 if { (eval echo "$as_me:13897: \"$ac_compile\"") >&5
13898   (eval $ac_compile) 2>&5
13899   ac_status=$?
13900   echo "$as_me:13900: \$? = $ac_status" >&5
13901   (exit "$ac_status"); } &&
13902          { ac_try='test -s "conftest.$ac_objext"'
13903   { (eval echo "$as_me:13903: \"$ac_try\"") >&5
13904   (eval $ac_try) 2>&5
13905   ac_status=$?
13906   echo "$as_me:13906: \$? = $ac_status" >&5
13907   (exit "$ac_status"); }; }; then
13908   break
13909 else
13910   echo "$as_me: failed program was:" >&5
13911 cat "conftest.$ac_ext" >&5
13912 fi
13913 rm -f "conftest.$ac_objext"
13914          CC="$CC -n32"
13915          rm -f "conftest.$ac_objext"
13916 if { (eval echo "$as_me:13916: \"$ac_compile\"") >&5
13917   (eval $ac_compile) 2>&5
13918   ac_status=$?
13919   echo "$as_me:13919: \$? = $ac_status" >&5
13920   (exit "$ac_status"); } &&
13921          { ac_try='test -s "conftest.$ac_objext"'
13922   { (eval echo "$as_me:13922: \"$ac_try\"") >&5
13923   (eval $ac_try) 2>&5
13924   ac_status=$?
13925   echo "$as_me:13925: \$? = $ac_status" >&5
13926   (exit "$ac_status"); }; }; then
13927   ac_cv_sys_largefile_CC=' -n32'; break
13928 else
13929   echo "$as_me: failed program was:" >&5
13930 cat "conftest.$ac_ext" >&5
13931 fi
13932 rm -f "conftest.$ac_objext"
13933          break
13934        done
13935        CC=$ac_save_CC
13936        rm -f "conftest.$ac_ext"
13937     fi
13938 fi
13939 echo "$as_me:13939: result: $ac_cv_sys_largefile_CC" >&5
13940 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13941   if test "$ac_cv_sys_largefile_CC" != no; then
13942     CC=$CC$ac_cv_sys_largefile_CC
13943   fi
13944
13945   echo "$as_me:13945: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13946 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13947 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13948   echo $ECHO_N "(cached) $ECHO_C" >&6
13949 else
13950   while :; do
13951   ac_cv_sys_file_offset_bits=no
13952   cat >"conftest.$ac_ext" <<_ACEOF
13953 #line 13953 "configure"
13954 #include "confdefs.h"
13955 #include <sys/types.h>
13956  /* Check that off_t can represent 2**63 - 1 correctly.
13957     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13958     since some C++ compilers masquerading as C compilers
13959     incorrectly reject 9223372036854775807.  */
13960 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13961   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13962                        && LARGE_OFF_T % 2147483647 == 1)
13963                       ? 1 : -1];
13964 int
13965 main (void)
13966 {
13967
13968   ;
13969   return 0;
13970 }
13971 _ACEOF
13972 rm -f "conftest.$ac_objext"
13973 if { (eval echo "$as_me:13973: \"$ac_compile\"") >&5
13974   (eval $ac_compile) 2>&5
13975   ac_status=$?
13976   echo "$as_me:13976: \$? = $ac_status" >&5
13977   (exit "$ac_status"); } &&
13978          { ac_try='test -s "conftest.$ac_objext"'
13979   { (eval echo "$as_me:13979: \"$ac_try\"") >&5
13980   (eval $ac_try) 2>&5
13981   ac_status=$?
13982   echo "$as_me:13982: \$? = $ac_status" >&5
13983   (exit "$ac_status"); }; }; then
13984   break
13985 else
13986   echo "$as_me: failed program was:" >&5
13987 cat "conftest.$ac_ext" >&5
13988 fi
13989 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13990   cat >"conftest.$ac_ext" <<_ACEOF
13991 #line 13991 "configure"
13992 #include "confdefs.h"
13993 #define _FILE_OFFSET_BITS 64
13994 #include <sys/types.h>
13995  /* Check that off_t can represent 2**63 - 1 correctly.
13996     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13997     since some C++ compilers masquerading as C compilers
13998     incorrectly reject 9223372036854775807.  */
13999 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14000   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14001                        && LARGE_OFF_T % 2147483647 == 1)
14002                       ? 1 : -1];
14003 int
14004 main (void)
14005 {
14006
14007   ;
14008   return 0;
14009 }
14010 _ACEOF
14011 rm -f "conftest.$ac_objext"
14012 if { (eval echo "$as_me:14012: \"$ac_compile\"") >&5
14013   (eval $ac_compile) 2>&5
14014   ac_status=$?
14015   echo "$as_me:14015: \$? = $ac_status" >&5
14016   (exit "$ac_status"); } &&
14017          { ac_try='test -s "conftest.$ac_objext"'
14018   { (eval echo "$as_me:14018: \"$ac_try\"") >&5
14019   (eval $ac_try) 2>&5
14020   ac_status=$?
14021   echo "$as_me:14021: \$? = $ac_status" >&5
14022   (exit "$ac_status"); }; }; then
14023   ac_cv_sys_file_offset_bits=64; break
14024 else
14025   echo "$as_me: failed program was:" >&5
14026 cat "conftest.$ac_ext" >&5
14027 fi
14028 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14029   break
14030 done
14031 fi
14032 echo "$as_me:14032: result: $ac_cv_sys_file_offset_bits" >&5
14033 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
14034 if test "$ac_cv_sys_file_offset_bits" != no; then
14035
14036 cat >>confdefs.h <<EOF
14037 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
14038 EOF
14039
14040 fi
14041 rm -rf conftest*
14042   echo "$as_me:14042: checking for _LARGE_FILES value needed for large files" >&5
14043 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
14044 if test "${ac_cv_sys_large_files+set}" = set; then
14045   echo $ECHO_N "(cached) $ECHO_C" >&6
14046 else
14047   while :; do
14048   ac_cv_sys_large_files=no
14049   cat >"conftest.$ac_ext" <<_ACEOF
14050 #line 14050 "configure"
14051 #include "confdefs.h"
14052 #include <sys/types.h>
14053  /* Check that off_t can represent 2**63 - 1 correctly.
14054     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14055     since some C++ compilers masquerading as C compilers
14056     incorrectly reject 9223372036854775807.  */
14057 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14058   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14059                        && LARGE_OFF_T % 2147483647 == 1)
14060                       ? 1 : -1];
14061 int
14062 main (void)
14063 {
14064
14065   ;
14066   return 0;
14067 }
14068 _ACEOF
14069 rm -f "conftest.$ac_objext"
14070 if { (eval echo "$as_me:14070: \"$ac_compile\"") >&5
14071   (eval $ac_compile) 2>&5
14072   ac_status=$?
14073   echo "$as_me:14073: \$? = $ac_status" >&5
14074   (exit "$ac_status"); } &&
14075          { ac_try='test -s "conftest.$ac_objext"'
14076   { (eval echo "$as_me:14076: \"$ac_try\"") >&5
14077   (eval $ac_try) 2>&5
14078   ac_status=$?
14079   echo "$as_me:14079: \$? = $ac_status" >&5
14080   (exit "$ac_status"); }; }; then
14081   break
14082 else
14083   echo "$as_me: failed program was:" >&5
14084 cat "conftest.$ac_ext" >&5
14085 fi
14086 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14087   cat >"conftest.$ac_ext" <<_ACEOF
14088 #line 14088 "configure"
14089 #include "confdefs.h"
14090 #define _LARGE_FILES 1
14091 #include <sys/types.h>
14092  /* Check that off_t can represent 2**63 - 1 correctly.
14093     We can't simply define LARGE_OFF_T to be 9223372036854775807,
14094     since some C++ compilers masquerading as C compilers
14095     incorrectly reject 9223372036854775807.  */
14096 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
14097   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
14098                        && LARGE_OFF_T % 2147483647 == 1)
14099                       ? 1 : -1];
14100 int
14101 main (void)
14102 {
14103
14104   ;
14105   return 0;
14106 }
14107 _ACEOF
14108 rm -f "conftest.$ac_objext"
14109 if { (eval echo "$as_me:14109: \"$ac_compile\"") >&5
14110   (eval $ac_compile) 2>&5
14111   ac_status=$?
14112   echo "$as_me:14112: \$? = $ac_status" >&5
14113   (exit "$ac_status"); } &&
14114          { ac_try='test -s "conftest.$ac_objext"'
14115   { (eval echo "$as_me:14115: \"$ac_try\"") >&5
14116   (eval $ac_try) 2>&5
14117   ac_status=$?
14118   echo "$as_me:14118: \$? = $ac_status" >&5
14119   (exit "$ac_status"); }; }; then
14120   ac_cv_sys_large_files=1; break
14121 else
14122   echo "$as_me: failed program was:" >&5
14123 cat "conftest.$ac_ext" >&5
14124 fi
14125 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14126   break
14127 done
14128 fi
14129 echo "$as_me:14129: result: $ac_cv_sys_large_files" >&5
14130 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
14131 if test "$ac_cv_sys_large_files" != no; then
14132
14133 cat >>confdefs.h <<EOF
14134 #define _LARGE_FILES $ac_cv_sys_large_files
14135 EOF
14136
14137 fi
14138 rm -rf conftest*
14139 fi
14140
14141         if test "$enable_largefile" != no ; then
14142         echo "$as_me:14142: checking for _LARGEFILE_SOURCE value needed for large files" >&5
14143 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
14144 if test "${ac_cv_sys_largefile_source+set}" = set; then
14145   echo $ECHO_N "(cached) $ECHO_C" >&6
14146 else
14147   while :; do
14148   ac_cv_sys_largefile_source=no
14149   cat >"conftest.$ac_ext" <<_ACEOF
14150 #line 14150 "configure"
14151 #include "confdefs.h"
14152 #include <stdio.h>
14153 int
14154 main (void)
14155 {
14156 return !fseeko;
14157   ;
14158   return 0;
14159 }
14160 _ACEOF
14161 rm -f "conftest.$ac_objext"
14162 if { (eval echo "$as_me:14162: \"$ac_compile\"") >&5
14163   (eval $ac_compile) 2>&5
14164   ac_status=$?
14165   echo "$as_me:14165: \$? = $ac_status" >&5
14166   (exit "$ac_status"); } &&
14167          { ac_try='test -s "conftest.$ac_objext"'
14168   { (eval echo "$as_me:14168: \"$ac_try\"") >&5
14169   (eval $ac_try) 2>&5
14170   ac_status=$?
14171   echo "$as_me:14171: \$? = $ac_status" >&5
14172   (exit "$ac_status"); }; }; then
14173   break
14174 else
14175   echo "$as_me: failed program was:" >&5
14176 cat "conftest.$ac_ext" >&5
14177 fi
14178 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14179   cat >"conftest.$ac_ext" <<_ACEOF
14180 #line 14180 "configure"
14181 #include "confdefs.h"
14182 #define _LARGEFILE_SOURCE 1
14183 #include <stdio.h>
14184 int
14185 main (void)
14186 {
14187 return !fseeko;
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 rm -f "conftest.$ac_objext"
14193 if { (eval echo "$as_me:14193: \"$ac_compile\"") >&5
14194   (eval $ac_compile) 2>&5
14195   ac_status=$?
14196   echo "$as_me:14196: \$? = $ac_status" >&5
14197   (exit "$ac_status"); } &&
14198          { ac_try='test -s "conftest.$ac_objext"'
14199   { (eval echo "$as_me:14199: \"$ac_try\"") >&5
14200   (eval $ac_try) 2>&5
14201   ac_status=$?
14202   echo "$as_me:14202: \$? = $ac_status" >&5
14203   (exit "$ac_status"); }; }; then
14204   ac_cv_sys_largefile_source=1; break
14205 else
14206   echo "$as_me: failed program was:" >&5
14207 cat "conftest.$ac_ext" >&5
14208 fi
14209 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14210   break
14211 done
14212 fi
14213 echo "$as_me:14213: result: $ac_cv_sys_largefile_source" >&5
14214 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
14215 if test "$ac_cv_sys_largefile_source" != no; then
14216
14217 cat >>confdefs.h <<EOF
14218 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
14219 EOF
14220
14221 fi
14222 rm -rf conftest*
14223
14224 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
14225 # in glibc 2.1.3, but that breaks too many other things.
14226 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
14227 echo "$as_me:14227: checking for fseeko" >&5
14228 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
14229 if test "${ac_cv_func_fseeko+set}" = set; then
14230   echo $ECHO_N "(cached) $ECHO_C" >&6
14231 else
14232   cat >"conftest.$ac_ext" <<_ACEOF
14233 #line 14233 "configure"
14234 #include "confdefs.h"
14235 #include <stdio.h>
14236 int
14237 main (void)
14238 {
14239 return fseeko && fseeko (stdin, 0, 0);
14240   ;
14241   return 0;
14242 }
14243 _ACEOF
14244 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14245 if { (eval echo "$as_me:14245: \"$ac_link\"") >&5
14246   (eval $ac_link) 2>&5
14247   ac_status=$?
14248   echo "$as_me:14248: \$? = $ac_status" >&5
14249   (exit "$ac_status"); } &&
14250          { ac_try='test -s "conftest$ac_exeext"'
14251   { (eval echo "$as_me:14251: \"$ac_try\"") >&5
14252   (eval $ac_try) 2>&5
14253   ac_status=$?
14254   echo "$as_me:14254: \$? = $ac_status" >&5
14255   (exit "$ac_status"); }; }; then
14256   ac_cv_func_fseeko=yes
14257 else
14258   echo "$as_me: failed program was:" >&5
14259 cat "conftest.$ac_ext" >&5
14260 ac_cv_func_fseeko=no
14261 fi
14262 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14263 fi
14264 echo "$as_me:14264: result: $ac_cv_func_fseeko" >&5
14265 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
14266 if test $ac_cv_func_fseeko = yes; then
14267
14268 cat >>confdefs.h <<\EOF
14269 #define HAVE_FSEEKO 1
14270 EOF
14271
14272 fi
14273
14274         # Normally we would collect these definitions in the config.h,
14275         # but (like _XOPEN_SOURCE), some environments rely on having these
14276         # defined before any of the system headers are included.  Another
14277         # case comes up with C++, e.g., on AIX the compiler compiles the
14278         # header files by themselves before looking at the body files it is
14279         # told to compile.  For ncurses, those header files do not include
14280         # the config.h
14281         if test "$ac_cv_sys_large_files" != no
14282         then
14283
14284         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14285         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
14286
14287         fi
14288         if test "$ac_cv_sys_largefile_source" != no
14289         then
14290
14291         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14292         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
14293
14294         fi
14295         if test "$ac_cv_sys_file_offset_bits" != no
14296         then
14297
14298         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14299         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
14300
14301         fi
14302
14303         echo "$as_me:14303: checking whether to use struct dirent64" >&5
14304 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
14305 if test "${cf_cv_struct_dirent64+set}" = set; then
14306   echo $ECHO_N "(cached) $ECHO_C" >&6
14307 else
14308
14309                 cat >"conftest.$ac_ext" <<_ACEOF
14310 #line 14310 "configure"
14311 #include "confdefs.h"
14312
14313 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
14314 #include <sys/types.h>
14315 #include <dirent.h>
14316
14317 int
14318 main (void)
14319 {
14320
14321                 /* if transitional largefile support is setup, this is true */
14322                 extern struct dirent64 * readdir(DIR *);
14323                 struct dirent64 *x = readdir((DIR *)0);
14324                 struct dirent *y = readdir((DIR *)0);
14325                 int z = x - y;
14326                 (void)z;
14327
14328   ;
14329   return 0;
14330 }
14331 _ACEOF
14332 rm -f "conftest.$ac_objext"
14333 if { (eval echo "$as_me:14333: \"$ac_compile\"") >&5
14334   (eval $ac_compile) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit "$ac_status"); } &&
14338          { ac_try='test -s "conftest.$ac_objext"'
14339   { (eval echo "$as_me:14339: \"$ac_try\"") >&5
14340   (eval $ac_try) 2>&5
14341   ac_status=$?
14342   echo "$as_me:14342: \$? = $ac_status" >&5
14343   (exit "$ac_status"); }; }; then
14344   cf_cv_struct_dirent64=yes
14345 else
14346   echo "$as_me: failed program was:" >&5
14347 cat "conftest.$ac_ext" >&5
14348 cf_cv_struct_dirent64=no
14349 fi
14350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14351
14352 fi
14353 echo "$as_me:14353: result: $cf_cv_struct_dirent64" >&5
14354 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
14355         test "$cf_cv_struct_dirent64" = yes &&
14356 cat >>confdefs.h <<\EOF
14357 #define HAVE_STRUCT_DIRENT64 1
14358 EOF
14359
14360         fi
14361
14362 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
14363 echo "$as_me:14363: checking if you want tparm not to use X/Open fixed-parameter list" >&5
14364 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
14365
14366 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
14367 if test "${enable_tparm_varargs+set}" = set; then
14368   enableval="$enable_tparm_varargs"
14369   with_tparm_varargs=$enableval
14370 else
14371   with_tparm_varargs=yes
14372 fi;
14373 echo "$as_me:14373: result: $with_tparm_varargs" >&5
14374 echo "${ECHO_T}$with_tparm_varargs" >&6
14375 NCURSES_TPARM_VARARGS=0
14376 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
14377
14378 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
14379 if test "$with_ticlib" != no ; then
14380 echo "$as_me:14380: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
14381 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
14382
14383 # Check whether --enable-tic-depends or --disable-tic-depends was given.
14384 if test "${enable_tic_depends+set}" = set; then
14385   enableval="$enable_tic_depends"
14386   with_tic_depends=$enableval
14387 else
14388   with_tic_depends=yes
14389 fi;
14390 echo "$as_me:14390: result: $with_tic_depends" >&5
14391 echo "${ECHO_T}$with_tic_depends" >&6
14392 else
14393         with_tic_depends=no
14394 fi
14395
14396 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
14397 echo "$as_me:14397: checking if you want to enable wattr* macros" >&5
14398 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
14399
14400 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
14401 if test "${enable_wattr_macros+set}" = set; then
14402   enableval="$enable_wattr_macros"
14403   with_wattr_macros=$enableval
14404 else
14405   with_wattr_macros=no
14406 fi;
14407 if [ "x$with_wattr_macros" != xyes ]; then
14408         NCURSES_WATTR_MACROS=0
14409         echo "$as_me:14409: result: no" >&5
14410 echo "${ECHO_T}no" >&6
14411 else
14412         NCURSES_WATTR_MACROS=1
14413         echo "$as_me:14413: result: yes" >&5
14414 echo "${ECHO_T}yes" >&6
14415 fi
14416
14417 echo "$as_me:14417: checking for X11 rgb file" >&5
14418 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
14419
14420 # Check whether --with-x11-rgb or --without-x11-rgb was given.
14421 if test "${with_x11_rgb+set}" = set; then
14422   withval="$with_x11_rgb"
14423   RGB_PATH=$withval
14424 else
14425   RGB_PATH=auto
14426 fi;
14427
14428 if test "x$RGB_PATH" = xauto
14429 then
14430         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
14431         for cf_path in \
14432                 /opt/local/share/X11/rgb.txt \
14433                 /opt/X11/share/X11/rgb.txt \
14434                 /usr/share/X11/rgb.txt \
14435                 /usr/X11/share/X11/rgb.txt \
14436                 /usr/X11/lib/X11/rgb.txt \
14437                 /usr/lib/X11/rgb.txt \
14438                 /etc/X11/rgb.txt \
14439                 /usr/pkg/lib/X11/rgb.txt \
14440                 /usr/X11R7/lib/X11/rgb.txt \
14441                 /usr/X11R6/lib/X11/rgb.txt \
14442                 /usr/X11R5/lib/X11/rgb.txt \
14443                 /usr/X11R4/lib/X11/rgb.txt \
14444                 /usr/local/lib/X11/rgb.txt \
14445                 /usr/local/share/X11/rgb.txt \
14446                 /usr/lib64/X11/rgb.txt
14447         do
14448                 if test -f "$cf_path" ; then
14449                         RGB_PATH="$cf_path"
14450                         break
14451                 fi
14452         done
14453 else
14454         cf_path=$RGB_PATH
14455
14456 if test "x$prefix" != xNONE; then
14457         cf_path_syntax="$prefix"
14458 else
14459         cf_path_syntax="$ac_default_prefix"
14460 fi
14461
14462 case ".$cf_path" in
14463 (.\$\(*\)*|.\'*\'*)
14464         ;;
14465 (..|./*|.\\*)
14466         ;;
14467 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
14468         ;;
14469 (.\$\{*prefix\}*|.\$\{*dir\}*)
14470         eval cf_path="$cf_path"
14471         case ".$cf_path" in
14472         (.NONE/*)
14473                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14474                 ;;
14475         esac
14476         ;;
14477 (.no|.NONE/*)
14478         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
14479         ;;
14480 (*)
14481         { { echo "$as_me:14481: error: expected a pathname, not \"$cf_path\"" >&5
14482 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
14483    { (exit 1); exit 1; }; }
14484         ;;
14485 esac
14486
14487 fi
14488
14489 echo "$as_me:14489: result: $RGB_PATH" >&5
14490 echo "${ECHO_T}$RGB_PATH" >&6
14491
14492 cat >>confdefs.h <<EOF
14493 #define RGB_PATH "$cf_path"
14494 EOF
14495
14496 no_x11_rgb=
14497 if test "$RGB_PATH" = no
14498 then
14499         no_x11_rgb="#"
14500 fi
14501
14502 ###   use option --with-bool to override bool's type
14503
14504 echo "$as_me:14504: checking for type of bool" >&5
14505 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
14506
14507 # Check whether --with-bool or --without-bool was given.
14508 if test "${with_bool+set}" = set; then
14509   withval="$with_bool"
14510   NCURSES_BOOL="$withval"
14511 else
14512   NCURSES_BOOL=auto
14513 fi;
14514 echo "$as_me:14514: result: $NCURSES_BOOL" >&5
14515 echo "${ECHO_T}$NCURSES_BOOL" >&6
14516 case x$NCURSES_BOOL in
14517 (x|xyes|xno)
14518         { { echo "$as_me:14518: error: expected a type name for bool" >&5
14519 echo "$as_me: error: expected a type name for bool" >&2;}
14520    { (exit 1); exit 1; }; }
14521         ;;
14522 esac
14523
14524 echo "$as_me:14524: checking for alternate terminal capabilities file" >&5
14525 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
14526
14527 # Check whether --with-caps or --without-caps was given.
14528 if test "${with_caps+set}" = set; then
14529   withval="$with_caps"
14530   TERMINFO_CAPS=Caps.$withval
14531 else
14532   TERMINFO_CAPS=Caps
14533 fi;
14534 if test ! -f "${srcdir}/include/${TERMINFO_CAPS}"
14535 then
14536         { echo "$as_me:14536: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&5
14537 echo "$as_me: WARNING: file not found: \"${srcdir}/include/${TERMINFO_CAPS}\"" >&2;}
14538         TERMINFO_CAPS=Caps
14539 fi
14540 echo "$as_me:14540: result: $TERMINFO_CAPS" >&5
14541 echo "${ECHO_T}$TERMINFO_CAPS" >&6
14542
14543 ###   use option --with-chtype to override chtype's type
14544
14545 echo "$as_me:14545: checking for type of chtype" >&5
14546 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
14547
14548 # Check whether --with-chtype or --without-chtype was given.
14549 if test "${with_chtype+set}" = set; then
14550   withval="$with_chtype"
14551   NCURSES_CHTYPE="$withval"
14552 else
14553   NCURSES_CHTYPE=$cf_dft_chtype
14554 fi;
14555 echo "$as_me:14555: result: $NCURSES_CHTYPE" >&5
14556 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
14557 case x$NCURSES_CHTYPE in
14558 (x|xyes|xno)
14559         { { echo "$as_me:14559: error: expected a type name for chtype" >&5
14560 echo "$as_me: error: expected a type name for chtype" >&2;}
14561    { (exit 1); exit 1; }; }
14562         ;;
14563 esac
14564
14565 ###   use option --with-ospeed to override ospeed's type
14566
14567 echo "$as_me:14567: checking for type of ospeed" >&5
14568 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
14569
14570 # Check whether --with-ospeed or --without-ospeed was given.
14571 if test "${with_ospeed+set}" = set; then
14572   withval="$with_ospeed"
14573   NCURSES_OSPEED="$withval"
14574 else
14575   NCURSES_OSPEED=short
14576 fi;
14577 echo "$as_me:14577: result: $NCURSES_OSPEED" >&5
14578 echo "${ECHO_T}$NCURSES_OSPEED" >&6
14579 case x$NCURSES_OSPEED in
14580 (x|xyes|xno)
14581         { { echo "$as_me:14581: error: expected a type name for ospeed" >&5
14582 echo "$as_me: error: expected a type name for ospeed" >&2;}
14583    { (exit 1); exit 1; }; }
14584         ;;
14585 esac
14586
14587 ###   use option --with-mmask-t to override mmask_t's type
14588
14589 echo "$as_me:14589: checking for type of mmask-t" >&5
14590 echo $ECHO_N "checking for type of mmask-t... $ECHO_C" >&6
14591
14592 # Check whether --with-mmask-t or --without-mmask-t was given.
14593 if test "${with_mmask_t+set}" = set; then
14594   withval="$with_mmask_t"
14595   NCURSES_MMASK_T="$withval"
14596 else
14597   NCURSES_MMASK_T=$cf_dft_mmask_t
14598 fi;
14599 echo "$as_me:14599: result: $NCURSES_MMASK_T" >&5
14600 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14601 case x$NCURSES_MMASK_T in
14602 (x|xyes|xno)
14603         { { echo "$as_me:14603: error: expected a type name for mmask-t" >&5
14604 echo "$as_me: error: expected a type name for mmask-t" >&2;}
14605    { (exit 1); exit 1; }; }
14606         ;;
14607 esac
14608
14609 ###   use option --with-ccharw-max to override CCHARW_MAX size
14610 echo "$as_me:14610: checking for size CCHARW_MAX" >&5
14611 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14612
14613 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14614 if test "${with_ccharw_max+set}" = set; then
14615   withval="$with_ccharw_max"
14616   NCURSES_CCHARW_MAX="$withval"
14617 else
14618   NCURSES_CCHARW_MAX=$cf_dft_ccharw_max
14619 fi;
14620 echo "$as_me:14620: result: $NCURSES_CCHARW_MAX" >&5
14621 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14622
14623 echo "$as_me:14623: checking for signed char" >&5
14624 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14625 if test "${ac_cv_type_signed_char+set}" = set; then
14626   echo $ECHO_N "(cached) $ECHO_C" >&6
14627 else
14628   cat >"conftest.$ac_ext" <<_ACEOF
14629 #line 14629 "configure"
14630 #include "confdefs.h"
14631 $ac_includes_default
14632 int
14633 main (void)
14634 {
14635 if ((signed char *) 0)
14636   return 0;
14637 if (sizeof (signed char))
14638   return 0;
14639   ;
14640   return 0;
14641 }
14642 _ACEOF
14643 rm -f "conftest.$ac_objext"
14644 if { (eval echo "$as_me:14644: \"$ac_compile\"") >&5
14645   (eval $ac_compile) 2>&5
14646   ac_status=$?
14647   echo "$as_me:14647: \$? = $ac_status" >&5
14648   (exit "$ac_status"); } &&
14649          { ac_try='test -s "conftest.$ac_objext"'
14650   { (eval echo "$as_me:14650: \"$ac_try\"") >&5
14651   (eval $ac_try) 2>&5
14652   ac_status=$?
14653   echo "$as_me:14653: \$? = $ac_status" >&5
14654   (exit "$ac_status"); }; }; then
14655   ac_cv_type_signed_char=yes
14656 else
14657   echo "$as_me: failed program was:" >&5
14658 cat "conftest.$ac_ext" >&5
14659 ac_cv_type_signed_char=no
14660 fi
14661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14662 fi
14663 echo "$as_me:14663: result: $ac_cv_type_signed_char" >&5
14664 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14665
14666 echo "$as_me:14666: checking size of signed char" >&5
14667 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14668 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14669   echo $ECHO_N "(cached) $ECHO_C" >&6
14670 else
14671   if test "$ac_cv_type_signed_char" = yes; then
14672   if test "$cross_compiling" = yes; then
14673   # Depending upon the size, compute the lo and hi bounds.
14674 cat >"conftest.$ac_ext" <<_ACEOF
14675 #line 14675 "configure"
14676 #include "confdefs.h"
14677 $ac_includes_default
14678 int
14679 main (void)
14680 {
14681 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14682   ;
14683   return 0;
14684 }
14685 _ACEOF
14686 rm -f "conftest.$ac_objext"
14687 if { (eval echo "$as_me:14687: \"$ac_compile\"") >&5
14688   (eval $ac_compile) 2>&5
14689   ac_status=$?
14690   echo "$as_me:14690: \$? = $ac_status" >&5
14691   (exit "$ac_status"); } &&
14692          { ac_try='test -s "conftest.$ac_objext"'
14693   { (eval echo "$as_me:14693: \"$ac_try\"") >&5
14694   (eval $ac_try) 2>&5
14695   ac_status=$?
14696   echo "$as_me:14696: \$? = $ac_status" >&5
14697   (exit "$ac_status"); }; }; then
14698   ac_lo=0 ac_mid=0
14699   while :; do
14700     cat >"conftest.$ac_ext" <<_ACEOF
14701 #line 14701 "configure"
14702 #include "confdefs.h"
14703 $ac_includes_default
14704 int
14705 main (void)
14706 {
14707 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14708   ;
14709   return 0;
14710 }
14711 _ACEOF
14712 rm -f "conftest.$ac_objext"
14713 if { (eval echo "$as_me:14713: \"$ac_compile\"") >&5
14714   (eval $ac_compile) 2>&5
14715   ac_status=$?
14716   echo "$as_me:14716: \$? = $ac_status" >&5
14717   (exit "$ac_status"); } &&
14718          { ac_try='test -s "conftest.$ac_objext"'
14719   { (eval echo "$as_me:14719: \"$ac_try\"") >&5
14720   (eval $ac_try) 2>&5
14721   ac_status=$?
14722   echo "$as_me:14722: \$? = $ac_status" >&5
14723   (exit "$ac_status"); }; }; then
14724   ac_hi=$ac_mid; break
14725 else
14726   echo "$as_me: failed program was:" >&5
14727 cat "conftest.$ac_ext" >&5
14728 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14729 fi
14730 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14731   done
14732 else
14733   echo "$as_me: failed program was:" >&5
14734 cat "conftest.$ac_ext" >&5
14735 ac_hi=-1 ac_mid=-1
14736   while :; do
14737     cat >"conftest.$ac_ext" <<_ACEOF
14738 #line 14738 "configure"
14739 #include "confdefs.h"
14740 $ac_includes_default
14741 int
14742 main (void)
14743 {
14744 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14745   ;
14746   return 0;
14747 }
14748 _ACEOF
14749 rm -f "conftest.$ac_objext"
14750 if { (eval echo "$as_me:14750: \"$ac_compile\"") >&5
14751   (eval $ac_compile) 2>&5
14752   ac_status=$?
14753   echo "$as_me:14753: \$? = $ac_status" >&5
14754   (exit "$ac_status"); } &&
14755          { ac_try='test -s "conftest.$ac_objext"'
14756   { (eval echo "$as_me:14756: \"$ac_try\"") >&5
14757   (eval $ac_try) 2>&5
14758   ac_status=$?
14759   echo "$as_me:14759: \$? = $ac_status" >&5
14760   (exit "$ac_status"); }; }; then
14761   ac_lo=$ac_mid; break
14762 else
14763   echo "$as_me: failed program was:" >&5
14764 cat "conftest.$ac_ext" >&5
14765 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14766 fi
14767 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14768   done
14769 fi
14770 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14771 # Binary search between lo and hi bounds.
14772 while test "x$ac_lo" != "x$ac_hi"; do
14773   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14774   cat >"conftest.$ac_ext" <<_ACEOF
14775 #line 14775 "configure"
14776 #include "confdefs.h"
14777 $ac_includes_default
14778 int
14779 main (void)
14780 {
14781 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14782   ;
14783   return 0;
14784 }
14785 _ACEOF
14786 rm -f "conftest.$ac_objext"
14787 if { (eval echo "$as_me:14787: \"$ac_compile\"") >&5
14788   (eval $ac_compile) 2>&5
14789   ac_status=$?
14790   echo "$as_me:14790: \$? = $ac_status" >&5
14791   (exit "$ac_status"); } &&
14792          { ac_try='test -s "conftest.$ac_objext"'
14793   { (eval echo "$as_me:14793: \"$ac_try\"") >&5
14794   (eval $ac_try) 2>&5
14795   ac_status=$?
14796   echo "$as_me:14796: \$? = $ac_status" >&5
14797   (exit "$ac_status"); }; }; then
14798   ac_hi=$ac_mid
14799 else
14800   echo "$as_me: failed program was:" >&5
14801 cat "conftest.$ac_ext" >&5
14802 ac_lo=`expr "$ac_mid" + 1`
14803 fi
14804 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14805 done
14806 ac_cv_sizeof_signed_char=$ac_lo
14807 else
14808   if test "$cross_compiling" = yes; then
14809   { { echo "$as_me:14809: error: cannot run test program while cross compiling" >&5
14810 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14811    { (exit 1); exit 1; }; }
14812 else
14813   cat >"conftest.$ac_ext" <<_ACEOF
14814 #line 14814 "configure"
14815 #include "confdefs.h"
14816 $ac_includes_default
14817 int
14818 main (void)
14819 {
14820 FILE *f = fopen ("conftest.val", "w");
14821 if (!f)
14822   $ac_main_return (1);
14823 fprintf (f, "%ld", (long)(sizeof (signed char)));
14824 fclose (f);
14825   ;
14826   return 0;
14827 }
14828 _ACEOF
14829 rm -f "conftest$ac_exeext"
14830 if { (eval echo "$as_me:14830: \"$ac_link\"") >&5
14831   (eval $ac_link) 2>&5
14832   ac_status=$?
14833   echo "$as_me:14833: \$? = $ac_status" >&5
14834   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14835   { (eval echo "$as_me:14835: \"$ac_try\"") >&5
14836   (eval $ac_try) 2>&5
14837   ac_status=$?
14838   echo "$as_me:14838: \$? = $ac_status" >&5
14839   (exit "$ac_status"); }; }; then
14840   ac_cv_sizeof_signed_char=`cat conftest.val`
14841 else
14842   echo "$as_me: program exited with status $ac_status" >&5
14843 echo "$as_me: failed program was:" >&5
14844 cat "conftest.$ac_ext" >&5
14845 fi
14846 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14847 fi
14848 fi
14849 rm -f conftest.val
14850 else
14851   ac_cv_sizeof_signed_char=0
14852 fi
14853 fi
14854 echo "$as_me:14854: result: $ac_cv_sizeof_signed_char" >&5
14855 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14856 cat >>confdefs.h <<EOF
14857 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14858 EOF
14859
14860 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14861         NCURSES_SBOOL="signed char"
14862 else
14863         NCURSES_SBOOL="char"
14864 fi
14865 echo "$as_me:14865: checking whether to use signed chars for Boolean array in term.h" >&5
14866 echo $ECHO_N "checking whether to use signed chars for Boolean array in term.h... $ECHO_C" >&6
14867
14868 # Check whether --enable-signed-char or --disable-signed-char was given.
14869 if test "${enable_signed_char+set}" = set; then
14870   enableval="$enable_signed_char"
14871   with_signed_char=$enableval
14872 else
14873   with_signed_char=$cf_dft_signed_char
14874 fi;
14875 echo "$as_me:14875: result: $with_signed_char" >&5
14876 echo "${ECHO_T}$with_signed_char" >&6
14877 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14878
14879 ###   use option --with-tparm-arg to override tparm's argument type
14880
14881 echo "$as_me:14881: checking for type of tparm-arg" >&5
14882 echo $ECHO_N "checking for type of tparm-arg... $ECHO_C" >&6
14883
14884 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14885 if test "${with_tparm_arg+set}" = set; then
14886   withval="$with_tparm_arg"
14887   NCURSES_TPARM_ARG="$withval"
14888 else
14889   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14890 fi;
14891 echo "$as_me:14891: result: $NCURSES_TPARM_ARG" >&5
14892 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14893 case x$NCURSES_TPARM_ARG in
14894 (x|xyes|xno)
14895         { { echo "$as_me:14895: error: expected a type name for tparm-arg" >&5
14896 echo "$as_me: error: expected a type name for tparm-arg" >&2;}
14897    { (exit 1); exit 1; }; }
14898         ;;
14899 esac
14900
14901 ### Enable compiling-in rcs id's
14902 echo "$as_me:14902: checking if RCS identifiers should be compiled-in" >&5
14903 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14904
14905 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14906 if test "${with_rcs_ids+set}" = set; then
14907   withval="$with_rcs_ids"
14908   with_rcs_ids=$withval
14909 else
14910   with_rcs_ids=no
14911 fi;
14912 echo "$as_me:14912: result: $with_rcs_ids" >&5
14913 echo "${ECHO_T}$with_rcs_ids" >&6
14914 test "x$with_rcs_ids" = xyes &&
14915 cat >>confdefs.h <<\EOF
14916 #define USE_RCS_IDS 1
14917 EOF
14918
14919 ###############################################################################
14920
14921 echo "$as_me:14921: checking format of man-pages" >&5
14922 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14923
14924 # Check whether --with-manpage-format or --without-manpage-format was given.
14925 if test "${with_manpage_format+set}" = set; then
14926   withval="$with_manpage_format"
14927   MANPAGE_FORMAT=$withval
14928 else
14929   MANPAGE_FORMAT=unknown
14930 fi;
14931
14932 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14933 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14934
14935 cf_unknown=
14936
14937 case "$MANPAGE_FORMAT" in
14938 (unknown)
14939         if test -z "$MANPATH" ; then
14940                 MANPATH="/usr/man:/usr/share/man"
14941         fi
14942
14943         # look for the 'date' man-page (it is most likely to be installed!)
14944         MANPAGE_FORMAT=
14945         cf_preform="no"
14946         cf_catonly="yes"
14947         cf_example="date"
14948
14949         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14950         for cf_dir in $MANPATH; do
14951                 test -z "$cf_dir" && cf_dir=/usr/man
14952                 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
14953                 do
14954                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14955                         if test "x$cf_test" = "x$cf_name" ; then
14956
14957                                 case "$cf_name" in
14958                                 (*.bz2) MANPAGE_FORMAT="$MANPAGE_FORMAT bzip2";;
14959                                 (*.xz)  MANPAGE_FORMAT="$MANPAGE_FORMAT xz";;
14960                                 (*.gz)  MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14961                                 (*.Z)   MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14962                                 (*.0)   MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14963                                 (*)     MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14964                                 esac
14965
14966                                 case "$cf_name" in
14967                                 ($cf_dir/man*)
14968                                         cf_catonly=no
14969                                         ;;
14970                                 ($cf_dir/cat*)
14971                                         cf_preform=yes
14972                                         ;;
14973                                 esac
14974                                 break
14975                         fi
14976
14977                         # if we found a match in either man* or cat*, stop looking
14978                         if test -n "$MANPAGE_FORMAT" ; then
14979                                 cf_found=no
14980                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14981                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14982                                 case "$cf_name" in
14983                                 ($cf_dir/cat*)
14984                                         cf_found=yes
14985                                         ;;
14986                                 esac
14987                                 test "$cf_found" = yes && break
14988                         fi
14989                 done
14990                 # only check the first directory in $MANPATH where we find manpages
14991                 if test -n "$MANPAGE_FORMAT" ; then
14992                         break
14993                 fi
14994         done
14995         # if we did not find the example, just assume it is normal
14996         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14997         IFS="$ac_save_ifs"
14998         ;;
14999 (*)
15000         for cf_option in $MANPAGE_FORMAT; do
15001         case "$cf_option" in
15002         (xz|bzip2|gzip|compress|BSDI|normal|formatted|catonly)
15003                 ;;
15004         (*)
15005                 cf_unknown="$cf_unknown $cf_option"
15006                 ;;
15007         esac
15008         done
15009         ;;
15010 esac
15011
15012 echo "$as_me:15012: result: $MANPAGE_FORMAT" >&5
15013 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
15014 if test -n "$cf_unknown" ; then
15015         { echo "$as_me:15015: WARNING: Unexpected manpage-format $cf_unknown" >&5
15016 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
15017 fi
15018
15019 cf_manpage_format=no
15020 cf_manpage_inboth=no
15021 cf_manpage_so_strip=
15022 cf_manpage_compress=
15023
15024 for cf_item in $MANPAGE_FORMAT
15025 do
15026 case "$cf_item" in
15027 (catonly)
15028         cf_manpage_format=yes
15029         cf_manpage_inboth=no
15030         ;;
15031 (formatted)
15032         cf_manpage_format=yes
15033         cf_manpage_inboth=yes
15034         ;;
15035 (compress)
15036         cf_manpage_so_strip="Z"
15037         cf_manpage_compress=compress
15038         ;;
15039 (gzip)
15040         cf_manpage_so_strip="gz"
15041         cf_manpage_compress=gzip
15042         ;;
15043 (bzip2)
15044         cf_manpage_so_strip="bz2"
15045         cf_manpage_compress=bzip2
15046         ;;
15047 (xz)
15048         cf_manpage_so_strip="xz"
15049         cf_manpage_compress=xz
15050         ;;
15051 esac
15052 done
15053
15054 echo "$as_me:15054: checking for manpage renaming" >&5
15055 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
15056
15057 # Check whether --with-manpage-renames or --without-manpage-renames was given.
15058 if test "${with_manpage_renames+set}" = set; then
15059   withval="$with_manpage_renames"
15060   MANPAGE_RENAMES=$withval
15061 else
15062   MANPAGE_RENAMES=yes
15063 fi;
15064
15065 case ".$MANPAGE_RENAMES" in
15066 (.no)
15067         ;;
15068 (.|.yes)
15069         # Debian 'man' program?
15070         if test -f /etc/debian_version ; then
15071                 MANPAGE_RENAMES=man/man_db.renames
15072         else
15073                 MANPAGE_RENAMES=no
15074         fi
15075         ;;
15076 esac
15077
15078 if test "$MANPAGE_RENAMES" = man/man_db.renames ; then
15079         MANPAGE_RENAMES=`pwd`/$MANPAGE_RENAMES
15080 elif test "$MANPAGE_RENAMES" = no ; then
15081         :
15082 elif test ! -f "$MANPAGE_RENAMES" ; then
15083         { { echo "$as_me:15083: error: not a filename: $MANPAGE_RENAMES" >&5
15084 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
15085    { (exit 1); exit 1; }; }
15086 fi
15087
15088 echo "$as_me:15088: result: $MANPAGE_RENAMES" >&5
15089 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
15090
15091 echo "$as_me:15091: checking if manpage aliases will be installed" >&5
15092 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
15093
15094 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
15095 if test "${with_manpage_aliases+set}" = set; then
15096   withval="$with_manpage_aliases"
15097   MANPAGE_ALIASES=$withval
15098 else
15099   MANPAGE_ALIASES=yes
15100 fi;
15101
15102 echo "$as_me:15102: result: $MANPAGE_ALIASES" >&5
15103 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
15104
15105 case "x$LN_S" in
15106 (xln*)
15107         cf_use_symlinks=yes
15108         ;;
15109 (*)
15110         cf_use_symlinks=no
15111         ;;
15112 esac
15113
15114 MANPAGE_SYMLINKS=no
15115 if test "$MANPAGE_ALIASES" = yes ; then
15116 echo "$as_me:15116: checking if manpage symlinks should be used" >&5
15117 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
15118
15119 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
15120 if test "${with_manpage_symlinks+set}" = set; then
15121   withval="$with_manpage_symlinks"
15122   MANPAGE_SYMLINKS=$withval
15123 else
15124   MANPAGE_SYMLINKS=$cf_use_symlinks
15125 fi;
15126
15127 if test "$cf_use_symlinks" = no; then
15128 if test "$MANPAGE_SYMLINKS" = yes ; then
15129         { echo "$as_me:15129: WARNING: cannot make symlinks" >&5
15130 echo "$as_me: WARNING: cannot make symlinks" >&2;}
15131         MANPAGE_SYMLINKS=no
15132 fi
15133 fi
15134
15135 echo "$as_me:15135: result: $MANPAGE_SYMLINKS" >&5
15136 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
15137 fi
15138
15139 echo "$as_me:15139: checking for manpage tbl" >&5
15140 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
15141
15142 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
15143 if test "${with_manpage_tbl+set}" = set; then
15144   withval="$with_manpage_tbl"
15145   MANPAGE_TBL=$withval
15146 else
15147   MANPAGE_TBL=no
15148 fi;
15149
15150 echo "$as_me:15150: result: $MANPAGE_TBL" >&5
15151 echo "${ECHO_T}$MANPAGE_TBL" >&6
15152
15153 if test "$prefix" = "NONE" ; then
15154         cf_prefix="$ac_default_prefix"
15155 else
15156         cf_prefix="$prefix"
15157 fi
15158
15159 test ! -d man && mkdir man
15160
15161 cf_edit_man=./edit_man.sh
15162 cf_man_alias=`pwd`/man_alias.sed
15163
15164 cat >$cf_edit_man <<CF_EOF
15165 #! $SHELL
15166 # this script is generated by the configure-script CF_MAN_PAGES macro.
15167
15168 prefix="$cf_prefix"
15169 datarootdir="$datarootdir"
15170 datadir="$datadir"
15171
15172 NCURSES_MAJOR="$NCURSES_MAJOR"
15173 NCURSES_MINOR="$NCURSES_MINOR"
15174 NCURSES_PATCH="$NCURSES_PATCH"
15175
15176 NCURSES_OSPEED="$NCURSES_OSPEED"
15177 TERMINFO="$TERMINFO"
15178 TERMINFO_DIRS="$TERMINFO_DIRS"
15179
15180 INSTALL="$INSTALL"
15181 INSTALL_DATA="$INSTALL_DATA"
15182
15183 transform="$program_transform_name"
15184
15185 TMP=\${TMPDIR:=/tmp}/man\$\$
15186 trap "rm -f \$TMP; exit 1" 1 2 3 15
15187 trap "rm -f \$TMP" 0
15188
15189 form=\$1
15190 shift || exit 1
15191
15192 verb=\$1
15193 shift || exit 1
15194
15195 mandir=\$1
15196 shift || exit 1
15197
15198 srcdir=\$1
15199 top_srcdir=\$srcdir/..
15200 shift || exit 1
15201
15202 if test "\$form" = normal ; then
15203         if test "$cf_manpage_format" = yes ; then
15204         if test "$cf_manpage_inboth" = no ; then
15205                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15206                 exit $?
15207         fi
15208         fi
15209         cf_subdir=\$mandir/man
15210         cf_tables=$MANPAGE_TBL
15211 else
15212         cf_subdir=\$mandir/cat
15213         cf_tables=yes
15214 fi
15215
15216 # process the list of source-files
15217 for i in "\$@" ; do
15218 case \$i in
15219 (*.orig|*.rej) ;;
15220 (*.[0-9]*)
15221         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
15222         if test "\$verb" = installing ; then
15223         if test ! -d "\$cf_subdir\${section}" ; then
15224                 mkdir -p "\$cf_subdir\$section"
15225         fi
15226         fi
15227
15228         # replace variables in man page
15229         if test ! -f "$cf_man_alias" ; then
15230 cat >>$cf_man_alias <<-CF_EOF2
15231                 s,@DATADIR@,\$datadir,g
15232                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
15233                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
15234                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
15235                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
15236                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
15237                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
15238 CF_EOF
15239
15240         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
15241         do
15242                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15243                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
15244 cat >>$cf_edit_man <<-CF_EOF
15245                 s,@$cf_NAME@,$cf_name,g
15246 CF_EOF
15247         done
15248
15249 cat >>$cf_edit_man <<CF_EOF
15250 CF_EOF2
15251                 echo "...made $cf_man_alias"
15252         fi
15253
15254         aliases=
15255         cf_source=\`basename "\$i"\`
15256         cf_full_alias=\$cf_source
15257         test ! -f "\$cf_full_alias" && cf_full_alias="\$srcdir/\$cf_full_alias"
15258         if test ! -f "\$cf_full_alias" ; then
15259                 echo ".. skipped \$cf_source"
15260                 continue
15261         fi
15262 CF_EOF
15263
15264 if test "$MANPAGE_ALIASES" != no ; then
15265 cat >>$cf_edit_man <<CF_EOF
15266         nCurses=ignore.3x
15267         cf_part_alias=\`echo \$cf_full_alias| sed -e 's,^.*/,,'\`
15268         test "$with_curses_h" = yes && nCurses=ncurses.3x
15269         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\`
15270 CF_EOF
15271 fi
15272
15273 if test "$MANPAGE_RENAMES" = no ; then
15274 cat >>$cf_edit_man <<CF_EOF
15275         # perform program transformations for section 1 man pages
15276         if test \$section = 1 ; then
15277                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
15278         else
15279                 cf_target=\$cf_subdir\${section}/\$cf_source
15280         fi
15281 CF_EOF
15282 else
15283 cat >>$cf_edit_man <<CF_EOF
15284         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
15285         if test -z "\$cf_target" ; then
15286                 echo "? missing rename for \$cf_source"
15287                 cf_target="\$cf_source"
15288         fi
15289         cf_target="\$cf_subdir\${section}/\${cf_target}"
15290
15291 CF_EOF
15292 fi
15293
15294 cat >>$cf_edit_man <<CF_EOF
15295         sed     -f "$cf_man_alias" \\
15296 CF_EOF
15297
15298 if test "$MANPAGE_RENAMES" != no ; then
15299 cat >>$cf_edit_man <<CF_EOF
15300                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
15301 CF_EOF
15302 else
15303 cat >>$cf_edit_man <<CF_EOF
15304                 < "\$i" >\$TMP
15305 CF_EOF
15306 fi
15307
15308 cat >>$cf_edit_man <<CF_EOF
15309 if test \$cf_tables = yes ; then
15310         tbl \$TMP >\$TMP.out
15311         mv \$TMP.out \$TMP
15312 fi
15313 CF_EOF
15314
15315 if test "$with_overwrite" != yes ; then
15316 cat >>$cf_edit_man <<CF_EOF
15317         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
15318         mv \$TMP.out \$TMP
15319 CF_EOF
15320 fi
15321
15322 if test "$with_curses_h" != yes ; then
15323 cat >>$cf_edit_man <<CF_EOF
15324         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
15325         mv \$TMP.out \$TMP
15326 CF_EOF
15327 fi
15328
15329 cat >>$cf_edit_man <<CF_EOF
15330         if test "\$form" = format ; then
15331                 nroff -man \$TMP >\$TMP.out
15332                 mv \$TMP.out \$TMP
15333         fi
15334 CF_EOF
15335
15336 if test -n "$cf_manpage_compress" ; then
15337 cat >>$cf_edit_man <<CF_EOF
15338         if test "\$verb" = installing ; then
15339         if ( "$cf_manpage_compress" -f \$TMP )
15340         then
15341                 mv \$TMP.$cf_manpage_so_strip \$TMP
15342         fi
15343         fi
15344         cf_target="\$cf_target.$cf_manpage_so_strip"
15345 CF_EOF
15346 fi
15347
15348 case "$MANPAGE_FORMAT" in
15349 (*BSDI*)
15350 cat >>$cf_edit_man <<CF_EOF
15351         if test "\$form" = format ; then
15352                 # BSDI installs only .0 suffixes in the cat directories
15353                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
15354         fi
15355 CF_EOF
15356   ;;
15357 esac
15358
15359 cat >>$cf_edit_man <<CF_EOF
15360         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
15361         extra_suffix=
15362         if test -n "$EXTRA_SUFFIX" ; then
15363                 case \$cf_target in
15364                 (*${EXTRA_SUFFIX}\$suffix)
15365                         extra_suffix="$EXTRA_SUFFIX"
15366                         ;;
15367                 esac
15368         fi
15369         if test "\$verb" = installing ; then
15370                 echo "\$verb \$cf_target"
15371                 \$INSTALL_DATA \$TMP "\$cf_target"
15372                 test -d "\$cf_subdir\${section}" &&
15373                 test -n "\$aliases" && (
15374                         cd "\$cf_subdir\${section}" && (
15375                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
15376                                 test -n "$cf_manpage_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_manpage_so_strip\$%%'\`
15377                                 cf_target=\`basename "\$cf_target"\`
15378                                 for cf_alias in \$aliases
15379                                 do
15380                                         if test "\$section" = 1 ; then
15381                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15382                                         fi
15383                                         cf_alias="\${cf_alias}\${extra_suffix}"
15384
15385                                         if test "$MANPAGE_SYMLINKS" = yes ; then
15386                                                 if test -f "\$cf_alias\${suffix}" ; then
15387                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
15388                                                         then
15389                                                                 continue
15390                                                         fi
15391                                                 fi
15392                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15393 CF_EOF
15394 case "x$LN_S" in
15395 (*-f)
15396 cat >>$cf_edit_man <<CF_EOF
15397                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15398 CF_EOF
15399         ;;
15400 (*)
15401 cat >>$cf_edit_man <<CF_EOF
15402                                                 rm -f "\$cf_alias\${suffix}"
15403                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
15404 CF_EOF
15405         ;;
15406 esac
15407 cat >>$cf_edit_man <<CF_EOF
15408                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
15409                                                 echo ".so \$cf_source" >\$TMP
15410 CF_EOF
15411 if test -n "$cf_manpage_compress" ; then
15412 cat >>$cf_edit_man <<CF_EOF
15413                                                 if test -n "$cf_manpage_so_strip" ; then
15414                                                         "$cf_manpage_compress" -f \$TMP
15415                                                         mv \$TMP.$cf_manpage_so_strip \$TMP
15416                                                 fi
15417 CF_EOF
15418 fi
15419 cat >>$cf_edit_man <<CF_EOF
15420                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
15421                                                 rm -f "\$cf_alias\${suffix}"
15422                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
15423                                         fi
15424                                 done
15425                         )
15426                 )
15427         elif test "\$verb" = removing ; then
15428                 test -f "\$cf_target" && (
15429                         echo "\$verb \$cf_target"
15430                         rm -f "\$cf_target"
15431                 )
15432                 test -d "\$cf_subdir\${section}" &&
15433                 test -n "\$aliases" && (
15434                         cd "\$cf_subdir\${section}" && (
15435                                 for cf_alias in \$aliases
15436                                 do
15437                                         if test "\$section" = 1 ; then
15438                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
15439                                         fi
15440                                         cf_alias="\${cf_alias}\${extra_suffix}"
15441
15442                                         echo ".. \$verb alias \$cf_alias\${suffix}"
15443                                         rm -f "\$cf_alias\${suffix}"
15444                                 done
15445                         )
15446                 )
15447         else
15448 #               echo ".hy 0"
15449                 cat \$TMP
15450         fi
15451         ;;
15452 esac
15453 done
15454
15455 if test "$cf_manpage_inboth" = yes ; then
15456 if test "\$form" != format ; then
15457         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15458 fi
15459 fi
15460
15461 exit 0
15462 CF_EOF
15463 chmod 755 "$cf_edit_man"
15464
15465 ###############################################################################
15466
15467 ### Note that some functions (such as const) are normally disabled anyway.
15468 echo "$as_me:15468: checking if you want to build with function extensions" >&5
15469 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15470
15471 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15472 if test "${enable_ext_funcs+set}" = set; then
15473   enableval="$enable_ext_funcs"
15474   with_ext_funcs=$enableval
15475 else
15476   with_ext_funcs=yes
15477 fi;
15478 echo "$as_me:15478: result: $with_ext_funcs" >&5
15479 echo "${ECHO_T}$with_ext_funcs" >&6
15480 if test "x$with_ext_funcs" = xyes ; then
15481         NCURSES_EXT_FUNCS=1
15482
15483 cat >>confdefs.h <<\EOF
15484 #define NCURSES_EXT_FUNCS 1
15485 EOF
15486
15487 cat >>confdefs.h <<\EOF
15488 #define HAVE_ASSUME_DEFAULT_COLORS 1
15489 EOF
15490
15491 cat >>confdefs.h <<\EOF
15492 #define HAVE_CURSES_VERSION 1
15493 EOF
15494
15495 cat >>confdefs.h <<\EOF
15496 #define HAVE_HAS_KEY 1
15497 EOF
15498
15499 cat >>confdefs.h <<\EOF
15500 #define HAVE_RESIZETERM 1
15501 EOF
15502
15503 cat >>confdefs.h <<\EOF
15504 #define HAVE_RESIZE_TERM 1
15505 EOF
15506
15507 cat >>confdefs.h <<\EOF
15508 #define HAVE_TERM_ENTRY_H 1
15509 EOF
15510
15511 cat >>confdefs.h <<\EOF
15512 #define HAVE_USE_DEFAULT_COLORS 1
15513 EOF
15514
15515 cat >>confdefs.h <<\EOF
15516 #define HAVE_USE_SCREEN 1
15517 EOF
15518
15519 cat >>confdefs.h <<\EOF
15520 #define HAVE_USE_WINDOW 1
15521 EOF
15522
15523 cat >>confdefs.h <<\EOF
15524 #define HAVE_WRESIZE 1
15525 EOF
15526
15527         GENERATED_EXT_FUNCS=generated
15528         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15529 else
15530         NCURSES_EXT_FUNCS=0
15531         GENERATED_EXT_FUNCS=
15532 fi
15533
15534 echo "$as_me:15534: checking if you want to build with SCREEN extensions" >&5
15535 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15536
15537 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15538 if test "${enable_sp_funcs+set}" = set; then
15539   enableval="$enable_sp_funcs"
15540   with_sp_funcs=$enableval
15541 else
15542   with_sp_funcs=$cf_dft_ext_spfuncs
15543 fi;
15544 echo "$as_me:15544: result: $with_sp_funcs" >&5
15545 echo "${ECHO_T}$with_sp_funcs" >&6
15546 if test "x$with_sp_funcs" = xyes ; then
15547         NCURSES_SP_FUNCS=1
15548
15549 cat >>confdefs.h <<\EOF
15550 #define NCURSES_SP_FUNCS 1
15551 EOF
15552
15553 cat >>confdefs.h <<\EOF
15554 #define HAVE_TPUTS_SP 1
15555 EOF
15556
15557         GENERATED_SP_FUNCS=generated
15558 else
15559         NCURSES_SP_FUNCS=0
15560         GENERATED_SP_FUNCS=
15561 fi
15562
15563 echo "$as_me:15563: checking if you want to build with terminal-driver" >&5
15564 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15565
15566 # Check whether --enable-term-driver or --disable-term-driver was given.
15567 if test "${enable_term_driver+set}" = set; then
15568   enableval="$enable_term_driver"
15569   with_term_driver=$enableval
15570 else
15571   with_term_driver=no
15572 fi;
15573 echo "$as_me:15573: result: $with_term_driver" >&5
15574 echo "${ECHO_T}$with_term_driver" >&6
15575 if test "x$with_term_driver" = xyes ; then
15576
15577 cat >>confdefs.h <<\EOF
15578 #define USE_TERM_DRIVER 1
15579 EOF
15580
15581         if test "x$with_termlib" != xno ; then
15582                 { { echo "$as_me:15582: error: The term-driver option conflicts with the termlib option" >&5
15583 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15584    { (exit 1); exit 1; }; }
15585         fi
15586         if test "x$with_sp_funcs" != xyes ; then
15587                 { { echo "$as_me:15587: error: The term-driver option relies upon sp-funcs" >&5
15588 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15589    { (exit 1); exit 1; }; }
15590         fi
15591 fi
15592
15593 ###   use option --enable-const to turn on use of const beyond that in XSI.
15594 echo "$as_me:15594: checking for extended use of const keyword" >&5
15595 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15596
15597 # Check whether --enable-const or --disable-const was given.
15598 if test "${enable_const+set}" = set; then
15599   enableval="$enable_const"
15600   with_ext_const=$enableval
15601 else
15602   with_ext_const=$cf_dft_ext_const
15603 fi;
15604 echo "$as_me:15604: result: $with_ext_const" >&5
15605 echo "${ECHO_T}$with_ext_const" >&6
15606 NCURSES_CONST='/*nothing*/'
15607 if test "x$with_ext_const" = xyes ; then
15608         NCURSES_CONST=const
15609 fi
15610
15611 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15612 echo "$as_me:15612: checking if you want to use extended colors" >&5
15613 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15614
15615 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15616 if test "${enable_ext_colors+set}" = set; then
15617   enableval="$enable_ext_colors"
15618   with_ext_colors=$enableval
15619 else
15620   with_ext_colors=$cf_dft_ext_colors
15621 fi;
15622 echo "$as_me:15622: result: $with_ext_colors" >&5
15623 echo "${ECHO_T}$with_ext_colors" >&6
15624 NCURSES_EXT_COLORS=0
15625 if test "x$with_ext_colors" = xyes ; then
15626         if test "x$with_widec" != xyes ; then
15627                 { echo "$as_me:15627: WARNING: This option applies only to wide-character library" >&5
15628 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15629         else
15630                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15631
15632 if test "${with_abi_version+set}" != set; then
15633         case "$cf_cv_rel_version" in
15634         (5.*)
15635                 cf_cv_rel_version=6.0
15636                 cf_cv_abi_version=6
15637                 cf_cv_abi_default=6
15638                 { echo "$as_me:15638: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15639 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15640                 ;;
15641         esac
15642 fi
15643
15644                 NCURSES_EXT_COLORS=1
15645
15646 cat >>confdefs.h <<\EOF
15647 #define NCURSES_EXT_COLORS 1
15648 EOF
15649
15650 cat >>confdefs.h <<\EOF
15651 #define HAVE_ALLOC_PAIR 1
15652 EOF
15653
15654 cat >>confdefs.h <<\EOF
15655 #define HAVE_INIT_EXTENDED_COLOR 1
15656 EOF
15657
15658 cat >>confdefs.h <<\EOF
15659 #define HAVE_RESET_COLOR_PAIRS 1
15660 EOF
15661
15662         fi
15663 fi
15664
15665 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15666 echo "$as_me:15666: checking if you want to use extended mouse encoding" >&5
15667 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15668
15669 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15670 if test "${enable_ext_mouse+set}" = set; then
15671   enableval="$enable_ext_mouse"
15672   with_ext_mouse=$enableval
15673 else
15674   with_ext_mouse=$cf_dft_ext_mouse
15675 fi;
15676 echo "$as_me:15676: result: $with_ext_mouse" >&5
15677 echo "${ECHO_T}$with_ext_mouse" >&6
15678 if test "x$with_ext_mouse" = xyes ; then
15679
15680 if test "${with_abi_version+set}" != set; then
15681         case "$cf_cv_rel_version" in
15682         (5.*)
15683                 cf_cv_rel_version=6.0
15684                 cf_cv_abi_version=6
15685                 cf_cv_abi_default=6
15686                 { echo "$as_me:15686: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
15687 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
15688                 ;;
15689         esac
15690 fi
15691
15692 fi
15693
15694 if test $cf_cv_abi_default -le 5 ; then
15695         NCURSES_MOUSE_VERSION=1
15696 elif test $cf_cv_abi_default -le 6 ; then
15697         NCURSES_MOUSE_VERSION=2
15698 else
15699         NCURSES_MOUSE_VERSION=3
15700 fi
15701
15702 ###   use option --enable-ext-putwin to turn on extended screendumps
15703 echo "$as_me:15703: checking if you want to use extended putwin/screendump" >&5
15704 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15705
15706 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15707 if test "${enable_ext_putwin+set}" = set; then
15708   enableval="$enable_ext_putwin"
15709   with_ext_putwin=$enableval
15710 else
15711   with_ext_putwin=$cf_dft_ext_putwin
15712 fi;
15713 echo "$as_me:15713: result: $with_ext_putwin" >&5
15714 echo "${ECHO_T}$with_ext_putwin" >&6
15715 if test "x$with_ext_putwin" = xyes ; then
15716
15717 cat >>confdefs.h <<\EOF
15718 #define NCURSES_EXT_PUTWIN 1
15719 EOF
15720
15721 fi
15722
15723 echo "$as_me:15723: checking if you want \$NCURSES_NO_PADDING code" >&5
15724 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15725
15726 # Check whether --enable-no-padding or --disable-no-padding was given.
15727 if test "${enable_no_padding+set}" = set; then
15728   enableval="$enable_no_padding"
15729   with_no_padding=$enableval
15730 else
15731   with_no_padding=$with_ext_funcs
15732 fi;
15733 echo "$as_me:15733: result: $with_no_padding" >&5
15734 echo "${ECHO_T}$with_no_padding" >&6
15735 test "x$with_no_padding" = xyes &&
15736 cat >>confdefs.h <<\EOF
15737 #define NCURSES_NO_PADDING 1
15738 EOF
15739
15740 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15741 echo "$as_me:15741: checking if you want SIGWINCH handler" >&5
15742 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15743
15744 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15745 if test "${enable_sigwinch+set}" = set; then
15746   enableval="$enable_sigwinch"
15747   with_sigwinch=$enableval
15748 else
15749   with_sigwinch=$with_ext_funcs
15750 fi;
15751 echo "$as_me:15751: result: $with_sigwinch" >&5
15752 echo "${ECHO_T}$with_sigwinch" >&6
15753 test "x$with_sigwinch" = xyes &&
15754 cat >>confdefs.h <<\EOF
15755 #define USE_SIGWINCH 1
15756 EOF
15757
15758 ###   use option --enable-tcap-names to allow user to define new capabilities
15759 echo "$as_me:15759: checking if you want user-definable terminal capabilities like termcap" >&5
15760 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15761
15762 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15763 if test "${enable_tcap_names+set}" = set; then
15764   enableval="$enable_tcap_names"
15765   with_tcap_names=$enableval
15766 else
15767   with_tcap_names=$with_ext_funcs
15768 fi;
15769 echo "$as_me:15769: result: $with_tcap_names" >&5
15770 echo "${ECHO_T}$with_tcap_names" >&6
15771 NCURSES_XNAMES=0
15772 if test "x$with_tcap_names" = xyes; then
15773         NCURSES_XNAMES=1
15774
15775 cat >>confdefs.h <<\EOF
15776 #define NCURSES_XNAMES 1
15777 EOF
15778
15779 fi
15780
15781 ##############################################################################
15782
15783 echo "$as_me:15783: checking if you want to link with the pthread library" >&5
15784 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15785
15786 # Check whether --with-pthread or --without-pthread was given.
15787 if test "${with_pthread+set}" = set; then
15788   withval="$with_pthread"
15789   with_pthread=$withval
15790 else
15791   with_pthread=no
15792 fi;
15793 echo "$as_me:15793: result: $with_pthread" >&5
15794 echo "${ECHO_T}$with_pthread" >&6
15795
15796 if test "$with_pthread" != no ; then
15797         echo "$as_me:15797: checking for pthread.h" >&5
15798 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15799 if test "${ac_cv_header_pthread_h+set}" = set; then
15800   echo $ECHO_N "(cached) $ECHO_C" >&6
15801 else
15802   cat >"conftest.$ac_ext" <<_ACEOF
15803 #line 15803 "configure"
15804 #include "confdefs.h"
15805 #include <pthread.h>
15806 _ACEOF
15807 if { (eval echo "$as_me:15807: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15808   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15809   ac_status=$?
15810   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15811   rm -f conftest.er1
15812   cat conftest.err >&5
15813   echo "$as_me:15813: \$? = $ac_status" >&5
15814   (exit "$ac_status"); } >/dev/null; then
15815   if test -s conftest.err; then
15816     ac_cpp_err=$ac_c_preproc_warn_flag
15817   else
15818     ac_cpp_err=
15819   fi
15820 else
15821   ac_cpp_err=yes
15822 fi
15823 if test -z "$ac_cpp_err"; then
15824   ac_cv_header_pthread_h=yes
15825 else
15826   echo "$as_me: failed program was:" >&5
15827   cat "conftest.$ac_ext" >&5
15828   ac_cv_header_pthread_h=no
15829 fi
15830 rm -f conftest.err "conftest.$ac_ext"
15831 fi
15832 echo "$as_me:15832: result: $ac_cv_header_pthread_h" >&5
15833 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15834 if test "$ac_cv_header_pthread_h" = yes; then
15835
15836 cat >>confdefs.h <<\EOF
15837 #define HAVE_PTHREADS_H 1
15838 EOF
15839
15840         for cf_lib_pthread in pthread c_r
15841         do
15842             echo "$as_me:15842: checking if we can link with the $cf_lib_pthread library" >&5
15843 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15844             cf_save_LIBS="$LIBS"
15845
15846 cf_add_libs="$LIBS"
15847 # reverse order
15848 cf_add_0lib=
15849 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15850 # filter duplicates
15851 for cf_add_1lib in $cf_add_0lib; do
15852         for cf_add_2lib in $cf_add_libs; do
15853                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15854                         cf_add_1lib=
15855                         break
15856                 fi
15857         done
15858         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15859 done
15860 LIBS="$cf_add_libs"
15861
15862             cat >"conftest.$ac_ext" <<_ACEOF
15863 #line 15863 "configure"
15864 #include "confdefs.h"
15865
15866 #include <pthread.h>
15867
15868 int
15869 main (void)
15870 {
15871
15872                 int rc = pthread_create(0,0,0,0);
15873                 int r2 = pthread_mutexattr_settype(0, 0);
15874
15875   ;
15876   return 0;
15877 }
15878 _ACEOF
15879 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15880 if { (eval echo "$as_me:15880: \"$ac_link\"") >&5
15881   (eval $ac_link) 2>&5
15882   ac_status=$?
15883   echo "$as_me:15883: \$? = $ac_status" >&5
15884   (exit "$ac_status"); } &&
15885          { ac_try='test -s "conftest$ac_exeext"'
15886   { (eval echo "$as_me:15886: \"$ac_try\"") >&5
15887   (eval $ac_try) 2>&5
15888   ac_status=$?
15889   echo "$as_me:15889: \$? = $ac_status" >&5
15890   (exit "$ac_status"); }; }; then
15891   with_pthread=yes
15892 else
15893   echo "$as_me: failed program was:" >&5
15894 cat "conftest.$ac_ext" >&5
15895 with_pthread=no
15896 fi
15897 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15898             LIBS="$cf_save_LIBS"
15899             echo "$as_me:15899: result: $with_pthread" >&5
15900 echo "${ECHO_T}$with_pthread" >&6
15901             test "$with_pthread" = yes && break
15902         done
15903
15904         if test "$with_pthread" = yes ; then
15905
15906 cf_add_libs="$LIBS"
15907 # reverse order
15908 cf_add_0lib=
15909 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15910 # filter duplicates
15911 for cf_add_1lib in $cf_add_0lib; do
15912         for cf_add_2lib in $cf_add_libs; do
15913                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15914                         cf_add_1lib=
15915                         break
15916                 fi
15917         done
15918         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15919 done
15920 LIBS="$cf_add_libs"
15921
15922 cat >>confdefs.h <<\EOF
15923 #define HAVE_LIBPTHREADS 1
15924 EOF
15925
15926         else
15927             { { echo "$as_me:15927: error: Cannot link with pthread library" >&5
15928 echo "$as_me: error: Cannot link with pthread library" >&2;}
15929    { (exit 1); exit 1; }; }
15930         fi
15931
15932 fi
15933
15934 fi
15935
15936 if test "x$with_pthread" != xno; then
15937         echo "$as_me:15937: checking for pthread_kill" >&5
15938 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15939 if test "${ac_cv_func_pthread_kill+set}" = set; then
15940   echo $ECHO_N "(cached) $ECHO_C" >&6
15941 else
15942   cat >"conftest.$ac_ext" <<_ACEOF
15943 #line 15943 "configure"
15944 #include "confdefs.h"
15945 #define pthread_kill autoconf_temporary
15946 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15947 #undef pthread_kill
15948
15949 #ifdef __cplusplus
15950 extern "C"
15951 #endif
15952
15953 /* We use char because int might match the return type of a gcc2
15954    builtin and then its argument prototype would still apply.  */
15955 char pthread_kill (void);
15956
15957 int
15958 main (void)
15959 {
15960
15961 /* The GNU C library defines stubs for functions which it implements
15962     to always fail with ENOSYS.  Some functions are actually named
15963     something starting with __ and the normal name is an alias.  */
15964 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15965 #error found stub for pthread_kill
15966 #endif
15967
15968         return pthread_kill ();
15969   ;
15970   return 0;
15971 }
15972 _ACEOF
15973 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15974 if { (eval echo "$as_me:15974: \"$ac_link\"") >&5
15975   (eval $ac_link) 2>&5
15976   ac_status=$?
15977   echo "$as_me:15977: \$? = $ac_status" >&5
15978   (exit "$ac_status"); } &&
15979          { ac_try='test -s "conftest$ac_exeext"'
15980   { (eval echo "$as_me:15980: \"$ac_try\"") >&5
15981   (eval $ac_try) 2>&5
15982   ac_status=$?
15983   echo "$as_me:15983: \$? = $ac_status" >&5
15984   (exit "$ac_status"); }; }; then
15985   ac_cv_func_pthread_kill=yes
15986 else
15987   echo "$as_me: failed program was:" >&5
15988 cat "conftest.$ac_ext" >&5
15989 ac_cv_func_pthread_kill=no
15990 fi
15991 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15992 fi
15993 echo "$as_me:15993: result: $ac_cv_func_pthread_kill" >&5
15994 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15995 if test "$ac_cv_func_pthread_kill" = yes; then
15996
15997                 echo "$as_me:15997: checking if you want to allow EINTR in wgetch with pthreads" >&5
15998 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15999
16000 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
16001 if test "${enable_pthreads_eintr+set}" = set; then
16002   enableval="$enable_pthreads_eintr"
16003   use_pthreads_eintr=$enableval
16004 else
16005   use_pthreads_eintr=no
16006 fi;
16007                 echo "$as_me:16007: result: $use_pthreads_eintr" >&5
16008 echo "${ECHO_T}$use_pthreads_eintr" >&6
16009                 if test "x$use_pthreads_eintr" = xyes ; then
16010
16011 cat >>confdefs.h <<\EOF
16012 #define USE_PTHREADS_EINTR 1
16013 EOF
16014
16015                 fi
16016 fi
16017
16018         echo "$as_me:16018: checking if you want to use weak-symbols for pthreads" >&5
16019 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
16020
16021 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
16022 if test "${enable_weak_symbols+set}" = set; then
16023   enableval="$enable_weak_symbols"
16024   use_weak_symbols=$enableval
16025 else
16026   use_weak_symbols=no
16027 fi;
16028         echo "$as_me:16028: result: $use_weak_symbols" >&5
16029 echo "${ECHO_T}$use_weak_symbols" >&6
16030         if test "x$use_weak_symbols" = xyes ; then
16031
16032 echo "$as_me:16032: checking if $CC supports weak symbols" >&5
16033 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
16034 if test "${cf_cv_weak_symbols+set}" = set; then
16035   echo $ECHO_N "(cached) $ECHO_C" >&6
16036 else
16037
16038 cat >"conftest.$ac_ext" <<_ACEOF
16039 #line 16039 "configure"
16040 #include "confdefs.h"
16041
16042 #include <stdio.h>
16043 int
16044 main (void)
16045 {
16046
16047 #if defined(__GNUC__)
16048 #  if defined __USE_ISOC99
16049 #    define _cat_pragma(exp)    _Pragma(#exp)
16050 #    define _weak_pragma(exp)   _cat_pragma(weak name)
16051 #  else
16052 #    define _weak_pragma(exp)
16053 #  endif
16054 #  define _declare(name)        __extension__ extern __typeof__(name) name
16055 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
16056 #endif
16057
16058 weak_symbol(fopen);
16059
16060   ;
16061   return 0;
16062 }
16063 _ACEOF
16064 rm -f "conftest.$ac_objext"
16065 if { (eval echo "$as_me:16065: \"$ac_compile\"") >&5
16066   (eval $ac_compile) 2>&5
16067   ac_status=$?
16068   echo "$as_me:16068: \$? = $ac_status" >&5
16069   (exit "$ac_status"); } &&
16070          { ac_try='test -s "conftest.$ac_objext"'
16071   { (eval echo "$as_me:16071: \"$ac_try\"") >&5
16072   (eval $ac_try) 2>&5
16073   ac_status=$?
16074   echo "$as_me:16074: \$? = $ac_status" >&5
16075   (exit "$ac_status"); }; }; then
16076   cf_cv_weak_symbols=yes
16077 else
16078   echo "$as_me: failed program was:" >&5
16079 cat "conftest.$ac_ext" >&5
16080 cf_cv_weak_symbols=no
16081 fi
16082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16083
16084 fi
16085 echo "$as_me:16085: result: $cf_cv_weak_symbols" >&5
16086 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
16087
16088         else
16089                 cf_cv_weak_symbols=no
16090         fi
16091
16092         if test "x$cf_cv_weak_symbols" = xyes ; then
16093
16094 cat >>confdefs.h <<\EOF
16095 #define USE_WEAK_SYMBOLS 1
16096 EOF
16097
16098         fi
16099 fi
16100
16101 PTHREAD=
16102 if test "x$with_pthread" = "xyes" ; then
16103
16104 cat >>confdefs.h <<\EOF
16105 #define USE_PTHREADS 1
16106 EOF
16107
16108         enable_reentrant=yes
16109         if test "x$cf_cv_weak_symbols" = xyes ; then
16110                 PTHREAD=-lpthread
16111
16112 cf_add_libs="$PRIVATE_LIBS"
16113 # reverse order
16114 cf_add_0lib=
16115 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16116 # filter duplicates
16117 for cf_add_1lib in $cf_add_0lib; do
16118         for cf_add_2lib in $cf_add_libs; do
16119                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16120                         cf_add_1lib=
16121                         break
16122                 fi
16123         done
16124         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16125 done
16126 PRIVATE_LIBS="$cf_add_libs"
16127
16128         fi
16129 fi
16130
16131 # Reentrant code has to be opaque; there's little advantage to making ncurses
16132 # opaque outside of that, so there is no --enable-opaque option.  We can use
16133 # this option without --with-pthreads, but this will be always set for
16134 # pthreads.
16135 echo "$as_me:16135: checking if you want reentrant code" >&5
16136 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
16137
16138 # Check whether --enable-reentrant or --disable-reentrant was given.
16139 if test "${enable_reentrant+set}" = set; then
16140   enableval="$enable_reentrant"
16141   with_reentrant=$enableval
16142 else
16143   with_reentrant=no
16144 fi;
16145 echo "$as_me:16145: result: $with_reentrant" >&5
16146 echo "${ECHO_T}$with_reentrant" >&6
16147 if test "x$with_reentrant" = xyes ; then
16148         cf_cv_enable_reentrant=1
16149         cf_cv_enable_opaque="NCURSES_INTERNALS"
16150         NCURSES_SIZE_T=int
16151         if test "x$cf_cv_weak_symbols" = xyes ; then
16152
16153 # remove pthread library from $LIBS
16154 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
16155
16156 cf_add_libs="$TEST_LIBS"
16157 # reverse order
16158 cf_add_0lib=
16159 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16160 # filter duplicates
16161 for cf_add_1lib in $cf_add_0lib; do
16162         for cf_add_2lib in $cf_add_libs; do
16163                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16164                         cf_add_1lib=
16165                         break
16166                 fi
16167         done
16168         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16169 done
16170 TEST_LIBS="$cf_add_libs"
16171
16172 cf_add_libs="$TEST_LIBS2"
16173 # reverse order
16174 cf_add_0lib=
16175 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16176 # filter duplicates
16177 for cf_add_1lib in $cf_add_0lib; do
16178         for cf_add_2lib in $cf_add_libs; do
16179                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16180                         cf_add_1lib=
16181                         break
16182                 fi
16183         done
16184         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16185 done
16186 TEST_LIBS2="$cf_add_libs"
16187
16188 cf_add_libs="$PRIVATE_LIBS"
16189 # reverse order
16190 cf_add_0lib=
16191 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16192 # filter duplicates
16193 for cf_add_1lib in $cf_add_0lib; do
16194         for cf_add_2lib in $cf_add_libs; do
16195                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16196                         cf_add_1lib=
16197                         break
16198                 fi
16199         done
16200         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16201 done
16202 PRIVATE_LIBS="$cf_add_libs"
16203
16204         else
16205                 # when not using weak symbols but with_reentrant,
16206                 # add 't' to the library suffix on all platforms
16207                 # except cygwin, where we only do that if ALSO
16208                 # compiling with full thread support.
16209                 case "$host" in
16210                 (*cygwin* | *msys*)
16211                         if test "$with_pthread" = "yes" ; then
16212                                 if test "x$disable_lib_suffixes" = "xno" ; then
16213                                         LIB_SUFFIX="t${LIB_SUFFIX}"
16214                                 fi
16215                         fi ;;
16216                 (*)
16217                         if test "x$disable_lib_suffixes" = "xno" ; then
16218                                 LIB_SUFFIX="t${LIB_SUFFIX}"
16219                         fi
16220                         ;;
16221                 esac
16222         fi
16223
16224 cat >>confdefs.h <<\EOF
16225 #define USE_REENTRANT 1
16226 EOF
16227
16228 if test "${with_abi_version+set}" != set; then
16229         case "$cf_cv_rel_version" in
16230         (5.*)
16231                 cf_cv_rel_version=6.0
16232                 cf_cv_abi_version=6
16233                 cf_cv_abi_default=6
16234                 { echo "$as_me:16234: WARNING: overriding ABI version to $cf_cv_abi_default" >&5
16235 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_default" >&2;}
16236                 ;;
16237         esac
16238 fi
16239
16240 else
16241         cf_cv_enable_reentrant=0
16242         cf_cv_enable_opaque="NCURSES_OPAQUE"
16243         NCURSES_SIZE_T=$cf_dft_ordinate_type
16244 fi
16245
16246 echo "$as_me:16246: checking whether curses library structures should be opaque" >&5
16247 echo $ECHO_N "checking whether curses library structures should be opaque... $ECHO_C" >&6
16248
16249 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
16250 if test "${enable_opaque_curses+set}" = set; then
16251   enableval="$enable_opaque_curses"
16252   test "$enableval" != yes && enableval=no
16253         if test "$enableval" != "no" ; then
16254     enable_opaque_curses=yes
16255         else
16256
16257          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16258          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16259
16260         fi
16261 else
16262   enableval=no
16263
16264          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
16265          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=$cf_dft_opaque_curses
16266
16267 fi;
16268 echo "$as_me:16268: result: $enable_opaque_curses" >&5
16269 echo "${ECHO_T}$enable_opaque_curses" >&6
16270
16271 test "$cf_cv_enable_reentrant" = 1 && \
16272 test "$enable_opaque_curses" = no && \
16273 { { echo "$as_me:16273: error: reentrant configuration requires opaque library" >&5
16274 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
16275    { (exit 1); exit 1; }; }
16276
16277 echo "$as_me:16277: checking whether form library structures should be opaque" >&5
16278 echo $ECHO_N "checking whether form library structures should be opaque... $ECHO_C" >&6
16279
16280 # Check whether --enable-opaque-form or --disable-opaque-form was given.
16281 if test "${enable_opaque_form+set}" = set; then
16282   enableval="$enable_opaque_form"
16283   enable_opaque_form=yes
16284 else
16285   enable_opaque_form=$cf_dft_opaque_curses
16286 fi;
16287 echo "$as_me:16287: result: $enable_opaque_form" >&5
16288 echo "${ECHO_T}$enable_opaque_form" >&6
16289
16290 echo "$as_me:16290: checking whether menu library structures should be opaque" >&5
16291 echo $ECHO_N "checking whether menu library structures should be opaque... $ECHO_C" >&6
16292
16293 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
16294 if test "${enable_opaque_menu+set}" = set; then
16295   enableval="$enable_opaque_menu"
16296   enable_opaque_menu=yes
16297 else
16298   enable_opaque_menu=$cf_dft_opaque_curses
16299 fi;
16300 echo "$as_me:16300: result: $enable_opaque_menu" >&5
16301 echo "${ECHO_T}$enable_opaque_menu" >&6
16302
16303 echo "$as_me:16303: checking whether panel library structures should be opaque" >&5
16304 echo $ECHO_N "checking whether panel library structures should be opaque... $ECHO_C" >&6
16305
16306 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
16307 if test "${enable_opaque_panel+set}" = set; then
16308   enableval="$enable_opaque_panel"
16309   enable_opaque_panel=yes
16310 else
16311   enable_opaque_panel=$cf_dft_opaque_curses
16312 fi;
16313 echo "$as_me:16313: result: $enable_opaque_panel" >&5
16314 echo "${ECHO_T}$enable_opaque_panel" >&6
16315
16316 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
16317 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
16318 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
16319 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
16320
16321 ### Allow using a different wrap-prefix
16322 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
16323         echo "$as_me:16323: checking for prefix used to wrap public variables" >&5
16324 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
16325
16326 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
16327 if test "${with_wrap_prefix+set}" = set; then
16328   withval="$with_wrap_prefix"
16329   NCURSES_WRAP_PREFIX=$withval
16330 else
16331   NCURSES_WRAP_PREFIX=_nc_
16332 fi;
16333         echo "$as_me:16333: result: $NCURSES_WRAP_PREFIX" >&5
16334 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
16335 else
16336         NCURSES_WRAP_PREFIX=_nc_
16337 fi
16338
16339 cat >>confdefs.h <<EOF
16340 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
16341 EOF
16342
16343 ###############################################################################
16344 # These options are relatively safe to experiment with.
16345
16346 echo "$as_me:16346: checking if you want all development code" >&5
16347 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
16348
16349 # Check whether --with-develop or --without-develop was given.
16350 if test "${with_develop+set}" = set; then
16351   withval="$with_develop"
16352   with_develop=$withval
16353 else
16354   with_develop=no
16355 fi;
16356 echo "$as_me:16356: result: $with_develop" >&5
16357 echo "${ECHO_T}$with_develop" >&6
16358
16359 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
16360 echo "$as_me:16360: checking if you want hard-tabs code" >&5
16361 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
16362
16363 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
16364 if test "${enable_hard_tabs+set}" = set; then
16365   enableval="$enable_hard_tabs"
16366
16367 else
16368   enable_hard_tabs=$with_develop
16369 fi;
16370 echo "$as_me:16370: result: $enable_hard_tabs" >&5
16371 echo "${ECHO_T}$enable_hard_tabs" >&6
16372 test "x$enable_hard_tabs" = xyes &&
16373 cat >>confdefs.h <<\EOF
16374 #define USE_HARD_TABS 1
16375 EOF
16376
16377 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
16378 echo "$as_me:16378: checking if you want limited support for xmc" >&5
16379 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
16380
16381 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
16382 if test "${enable_xmc_glitch+set}" = set; then
16383   enableval="$enable_xmc_glitch"
16384
16385 else
16386   enable_xmc_glitch=$with_develop
16387 fi;
16388 echo "$as_me:16388: result: $enable_xmc_glitch" >&5
16389 echo "${ECHO_T}$enable_xmc_glitch" >&6
16390 test "x$enable_xmc_glitch" = xyes &&
16391 cat >>confdefs.h <<\EOF
16392 #define USE_XMC_SUPPORT 1
16393 EOF
16394
16395 ###############################################################################
16396 # These are just experimental, probably should not be in a package:
16397
16398 echo "$as_me:16398: checking if you do not want to assume colors are white-on-black" >&5
16399 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
16400
16401 # Check whether --enable-assumed-color or --disable-assumed-color was given.
16402 if test "${enable_assumed_color+set}" = set; then
16403   enableval="$enable_assumed_color"
16404   with_assumed_color=$enableval
16405 else
16406   with_assumed_color=yes
16407 fi;
16408 echo "$as_me:16408: result: $with_assumed_color" >&5
16409 echo "${ECHO_T}$with_assumed_color" >&6
16410 test "x$with_assumed_color" = xyes &&
16411 cat >>confdefs.h <<\EOF
16412 #define USE_ASSUMED_COLOR 1
16413 EOF
16414
16415 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
16416 echo "$as_me:16416: checking if you want hashmap scrolling-optimization code" >&5
16417 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
16418
16419 # Check whether --enable-hashmap or --disable-hashmap was given.
16420 if test "${enable_hashmap+set}" = set; then
16421   enableval="$enable_hashmap"
16422   with_hashmap=$enableval
16423 else
16424   with_hashmap=yes
16425 fi;
16426 echo "$as_me:16426: result: $with_hashmap" >&5
16427 echo "${ECHO_T}$with_hashmap" >&6
16428 test "x$with_hashmap" = xyes &&
16429 cat >>confdefs.h <<\EOF
16430 #define USE_HASHMAP 1
16431 EOF
16432
16433 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16434 echo "$as_me:16434: checking if you want code to check screensize" >&5
16435 echo $ECHO_N "checking if you want code to check screensize... $ECHO_C" >&6
16436
16437 # Check whether --enable-check-size or --disable-check-size was given.
16438 if test "${enable_check_size+set}" = set; then
16439   enableval="$enable_check_size"
16440   with_check_size=$enableval
16441 else
16442   with_check_size=no
16443 fi;
16444 echo "$as_me:16444: result: $with_check_size" >&5
16445 echo "${ECHO_T}$with_check_size" >&6
16446 test "x$with_check_size" = xyes &&
16447 cat >>confdefs.h <<\EOF
16448 #define USE_CHECK_SIZE 1
16449 EOF
16450
16451 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
16452 echo "$as_me:16452: checking if you want colorfgbg code" >&5
16453 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
16454
16455 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
16456 if test "${enable_colorfgbg+set}" = set; then
16457   enableval="$enable_colorfgbg"
16458   with_colorfgbg=$enableval
16459 else
16460   with_colorfgbg=no
16461 fi;
16462 echo "$as_me:16462: result: $with_colorfgbg" >&5
16463 echo "${ECHO_T}$with_colorfgbg" >&6
16464 test "x$with_colorfgbg" = xyes &&
16465 cat >>confdefs.h <<\EOF
16466 #define USE_COLORFGBG 1
16467 EOF
16468
16469 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
16470 echo "$as_me:16470: checking if you want to use gcc -fvisibility option" >&5
16471 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
16472
16473 # Check whether --enable-fvisibility or --disable-fvisibility was given.
16474 if test "${enable_fvisibility+set}" = set; then
16475   enableval="$enable_fvisibility"
16476   cf_with_fvisibility=$enableval
16477 else
16478   cf_with_fvisibility=no
16479 fi;
16480 echo "$as_me:16480: result: $cf_with_fvisibility" >&5
16481 echo "${ECHO_T}$cf_with_fvisibility" >&6
16482
16483 NCURSES_IMPEXP=
16484 NCURSES_CXX_IMPEXP=
16485 if test "x$cf_with_fvisibility" = xyes; then
16486
16487 echo "$as_me:16487: checking if $CC -fvisibility=hidden option works" >&5
16488 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16489 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16490   echo $ECHO_N "(cached) $ECHO_C" >&6
16491 else
16492
16493     cf_save_cflags="$CFLAGS"
16494     CFLAGS="$CFLAGS -fvisibility=hidden"
16495     cat >"conftest.$ac_ext" <<_ACEOF
16496 #line 16496 "configure"
16497 #include "confdefs.h"
16498
16499 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16500
16501 int
16502 main (void)
16503 {
16504
16505         if (somefunc()) return 1;
16506
16507   ;
16508   return 0;
16509 }
16510 _ACEOF
16511 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16512 if { (eval echo "$as_me:16512: \"$ac_link\"") >&5
16513   (eval $ac_link) 2>&5
16514   ac_status=$?
16515   echo "$as_me:16515: \$? = $ac_status" >&5
16516   (exit "$ac_status"); } &&
16517          { ac_try='test -s "conftest$ac_exeext"'
16518   { (eval echo "$as_me:16518: \"$ac_try\"") >&5
16519   (eval $ac_try) 2>&5
16520   ac_status=$?
16521   echo "$as_me:16521: \$? = $ac_status" >&5
16522   (exit "$ac_status"); }; }; then
16523   cf_cv_fvisibility_hidden=yes
16524 else
16525   echo "$as_me: failed program was:" >&5
16526 cat "conftest.$ac_ext" >&5
16527 cf_cv_fvisibility_hidden=no
16528 fi
16529 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16530     CFLAGS=$cf_save_cflags
16531
16532 fi
16533 echo "$as_me:16533: result: $cf_cv_fvisibility_hidden" >&5
16534 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16535
16536         if test "x$cf_cv_fvisibility_hidden" = xyes
16537         then
16538
16539 cf_fix_cppflags=no
16540 cf_new_cflags=
16541 cf_new_cppflags=
16542 cf_new_extra_cppflags=
16543
16544 for cf_add_cflags in -fvisibility=hidden
16545 do
16546 case "$cf_fix_cppflags" in
16547 (no)
16548         case "$cf_add_cflags" in
16549         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16550                 case "$cf_add_cflags" in
16551                 (-D*)
16552                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16553
16554                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16555                                 && test -z "${cf_tst_cflags}" \
16556                                 && cf_fix_cppflags=yes
16557
16558                         if test "$cf_fix_cppflags" = yes ; then
16559
16560         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16561         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16562
16563                                 continue
16564                         elif test "${cf_tst_cflags}" = "\"'" ; then
16565
16566         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16567         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16568
16569                                 continue
16570                         fi
16571                         ;;
16572                 esac
16573                 case "$CPPFLAGS" in
16574                 (*$cf_add_cflags)
16575                         ;;
16576                 (*)
16577                         case "$cf_add_cflags" in
16578                         (-D*)
16579                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16580
16581 CPPFLAGS=`echo "$CPPFLAGS" | \
16582         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16583                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16584
16585                                 ;;
16586                         esac
16587
16588         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16589         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16590
16591                         ;;
16592                 esac
16593                 ;;
16594         (*)
16595
16596         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16597         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16598
16599                 ;;
16600         esac
16601         ;;
16602 (yes)
16603
16604         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16605         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16606
16607         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16608
16609         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16610                 && test -z "${cf_tst_cflags}" \
16611                 && cf_fix_cppflags=no
16612         ;;
16613 esac
16614 done
16615
16616 if test -n "$cf_new_cflags" ; then
16617
16618         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16619         CFLAGS="${CFLAGS}$cf_new_cflags"
16620
16621 fi
16622
16623 if test -n "$cf_new_cppflags" ; then
16624
16625         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16626         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16627
16628 fi
16629
16630 if test -n "$cf_new_extra_cppflags" ; then
16631
16632         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16633         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16634
16635 fi
16636
16637                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16638         fi
16639         if test -n "$CXX"
16640         then
16641                 ac_ext=cc
16642 ac_cpp='$CXXCPP $CPPFLAGS'
16643 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16644 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16645 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16646 ac_main_return="return"
16647
16648 echo "$as_me:16648: checking if $CXX -fvisibility=hidden option works" >&5
16649 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16650 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16651   echo $ECHO_N "(cached) $ECHO_C" >&6
16652 else
16653
16654     cf_save_cflags="$CXXFLAGS"
16655     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16656     cat >"conftest.$ac_ext" <<_ACEOF
16657 #line 16657 "configure"
16658 #include "confdefs.h"
16659
16660 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16661
16662 int
16663 main (void)
16664 {
16665
16666         if (somefunc()) return 1;
16667
16668   ;
16669   return 0;
16670 }
16671 _ACEOF
16672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16673 if { (eval echo "$as_me:16673: \"$ac_link\"") >&5
16674   (eval $ac_link) 2>&5
16675   ac_status=$?
16676   echo "$as_me:16676: \$? = $ac_status" >&5
16677   (exit "$ac_status"); } &&
16678          { ac_try='test -s "conftest$ac_exeext"'
16679   { (eval echo "$as_me:16679: \"$ac_try\"") >&5
16680   (eval $ac_try) 2>&5
16681   ac_status=$?
16682   echo "$as_me:16682: \$? = $ac_status" >&5
16683   (exit "$ac_status"); }; }; then
16684   cf_cv_fvisibility_hidden2=yes
16685 else
16686   echo "$as_me: failed program was:" >&5
16687 cat "conftest.$ac_ext" >&5
16688 cf_cv_fvisibility_hidden2=no
16689 fi
16690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16691     CXXFLAGS=$cf_save_cflags
16692
16693 fi
16694 echo "$as_me:16694: result: $cf_cv_fvisibility_hidden2" >&5
16695 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16696
16697                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16698                 then
16699
16700 cf_save_CXXFLAGS="$CFLAGS"
16701 CFLAGS="$CXXFLAGS"
16702
16703 cf_fix_cppflags=no
16704 cf_new_cflags=
16705 cf_new_cppflags=
16706 cf_new_extra_cppflags=
16707
16708 for cf_add_cflags in -fvisibility=hidden
16709 do
16710 case "$cf_fix_cppflags" in
16711 (no)
16712         case "$cf_add_cflags" in
16713         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16714                 case "$cf_add_cflags" in
16715                 (-D*)
16716                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16717
16718                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16719                                 && test -z "${cf_tst_cflags}" \
16720                                 && cf_fix_cppflags=yes
16721
16722                         if test "$cf_fix_cppflags" = yes ; then
16723
16724         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16725         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16726
16727                                 continue
16728                         elif test "${cf_tst_cflags}" = "\"'" ; then
16729
16730         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16731         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16732
16733                                 continue
16734                         fi
16735                         ;;
16736                 esac
16737                 case "$CPPFLAGS" in
16738                 (*$cf_add_cflags)
16739                         ;;
16740                 (*)
16741                         case "$cf_add_cflags" in
16742                         (-D*)
16743                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16744
16745 CPPFLAGS=`echo "$CPPFLAGS" | \
16746         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16747                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16748
16749                                 ;;
16750                         esac
16751
16752         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16753         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16754
16755                         ;;
16756                 esac
16757                 ;;
16758         (*)
16759
16760         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16761         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16762
16763                 ;;
16764         esac
16765         ;;
16766 (yes)
16767
16768         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16769         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16770
16771         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16772
16773         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16774                 && test -z "${cf_tst_cflags}" \
16775                 && cf_fix_cppflags=no
16776         ;;
16777 esac
16778 done
16779
16780 if test -n "$cf_new_cflags" ; then
16781
16782         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16783         CFLAGS="${CFLAGS}$cf_new_cflags"
16784
16785 fi
16786
16787 if test -n "$cf_new_cppflags" ; then
16788
16789         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16790         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16791
16792 fi
16793
16794 if test -n "$cf_new_extra_cppflags" ; then
16795
16796         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16797         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16798
16799 fi
16800
16801 CXXFLAGS="$CFLAGS"
16802 CFLAGS="$cf_save_CXXFLAGS"
16803
16804                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16805                 fi
16806                 ac_ext=c
16807 ac_cpp='$CPP $CPPFLAGS'
16808 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16809 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16810 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16811 ac_main_return="return"
16812
16813         fi
16814 fi
16815
16816 ###   use option --enable-interop to turn on use of bindings used for interop
16817 echo "$as_me:16817: checking if you want interop bindings" >&5
16818 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16819
16820 # Check whether --enable-interop or --disable-interop was given.
16821 if test "${enable_interop+set}" = set; then
16822   enableval="$enable_interop"
16823   with_exp_interop=$enableval
16824 else
16825   with_exp_interop=$cf_dft_interop
16826 fi;
16827 echo "$as_me:16827: result: $with_exp_interop" >&5
16828 echo "${ECHO_T}$with_exp_interop" >&6
16829
16830 NCURSES_INTEROP_FUNCS=0
16831 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16832
16833 echo "$as_me:16833: checking if you want experimental safe-sprintf code" >&5
16834 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16835
16836 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16837 if test "${enable_safe_sprintf+set}" = set; then
16838   enableval="$enable_safe_sprintf"
16839   with_safe_sprintf=$enableval
16840 else
16841   with_safe_sprintf=no
16842 fi;
16843 echo "$as_me:16843: result: $with_safe_sprintf" >&5
16844 echo "${ECHO_T}$with_safe_sprintf" >&6
16845
16846 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16847 # when hashmap is used scroll hints are useless
16848 if test "$with_hashmap" = no ; then
16849 echo "$as_me:16849: checking if you want to experiment without scrolling-hints code" >&5
16850 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16851
16852 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16853 if test "${enable_scroll_hints+set}" = set; then
16854   enableval="$enable_scroll_hints"
16855   with_scroll_hints=$enableval
16856 else
16857   with_scroll_hints=yes
16858 fi;
16859 echo "$as_me:16859: result: $with_scroll_hints" >&5
16860 echo "${ECHO_T}$with_scroll_hints" >&6
16861 test "x$with_scroll_hints" = xyes &&
16862 cat >>confdefs.h <<\EOF
16863 #define USE_SCROLL_HINTS 1
16864 EOF
16865
16866 fi
16867
16868 echo "$as_me:16868: checking if you want wgetch-events code" >&5
16869 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16870
16871 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16872 if test "${enable_wgetch_events+set}" = set; then
16873   enableval="$enable_wgetch_events"
16874   with_wgetch_events=$enableval
16875 else
16876   with_wgetch_events=no
16877 fi;
16878 echo "$as_me:16878: result: $with_wgetch_events" >&5
16879 echo "${ECHO_T}$with_wgetch_events" >&6
16880 if test "x$with_wgetch_events" = xyes ; then
16881
16882 cat >>confdefs.h <<\EOF
16883 #define NCURSES_WGETCH_EVENTS 1
16884 EOF
16885
16886         NCURSES_WGETCH_EVENTS=1
16887 else
16888         NCURSES_WGETCH_EVENTS=0
16889 fi
16890
16891 case "$cf_cv_system_name" in
16892 (*mingw32*|*mingw64*|*-msvc*)
16893         echo "$as_me:16893: checking if you want experimental-Windows driver" >&5
16894 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16895
16896 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16897 if test "${enable_exp_win32+set}" = set; then
16898   enableval="$enable_exp_win32"
16899   with_exp_win32=$enableval
16900 else
16901   with_exp_win32=no
16902 fi;
16903         echo "$as_me:16903: result: $with_exp_win32" >&5
16904 echo "${ECHO_T}$with_exp_win32" >&6
16905         if test "x$with_exp_win32" = xyes
16906         then
16907
16908 cat >>confdefs.h <<\EOF
16909 #define EXP_WIN32_DRIVER 1
16910 EOF
16911
16912                 EXP_WIN32_DRIVER=1
16913                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16914         else
16915                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16916                 EXP_WIN32_DRIVER=0
16917         fi
16918         ;;
16919 (*)
16920         EXP_WIN32_DRIVER=0
16921         INTERNALS_HDR=
16922         ;;
16923 esac
16924
16925 ###############################################################################
16926
16927 ###     use option --disable-echo to suppress full display compiling commands
16928
16929 echo "$as_me:16929: checking if you want to see long compiling messages" >&5
16930 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16931
16932 # Check whether --enable-echo or --disable-echo was given.
16933 if test "${enable_echo+set}" = set; then
16934   enableval="$enable_echo"
16935   test "$enableval" != no && enableval=yes
16936         if test "$enableval" != "yes" ; then
16937
16938         ECHO_LT='--silent'
16939         ECHO_LD='@echo linking $@;'
16940         RULE_CC='@echo compiling $<'
16941         SHOW_CC='@echo compiling $@'
16942         ECHO_CC='@'
16943
16944         else
16945
16946         ECHO_LT=''
16947         ECHO_LD=''
16948         RULE_CC=''
16949         SHOW_CC=''
16950         ECHO_CC=''
16951
16952         fi
16953 else
16954   enableval=yes
16955
16956         ECHO_LT=''
16957         ECHO_LD=''
16958         RULE_CC=''
16959         SHOW_CC=''
16960         ECHO_CC=''
16961
16962 fi;
16963 echo "$as_me:16963: result: $enableval" >&5
16964 echo "${ECHO_T}$enableval" >&6
16965
16966 if test "x$enable_echo" = xyes; then
16967         ECHO_LINK=
16968 else
16969         ECHO_LINK='@ echo linking $@ ... ;'
16970         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16971         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16972 fi
16973
16974 # --disable-stripping is used for debugging
16975
16976 echo "$as_me:16976: checking if you want to install stripped executables" >&5
16977 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16978
16979 # Check whether --enable-stripping or --disable-stripping was given.
16980 if test "${enable_stripping+set}" = set; then
16981   enableval="$enable_stripping"
16982   test "$enableval" != no && enableval=yes
16983         if test "$enableval" != "yes" ; then
16984     enable_stripping=no
16985         else
16986                 enable_stripping=yes
16987         fi
16988 else
16989   enableval=yes
16990         enable_stripping=yes
16991
16992 fi;
16993 echo "$as_me:16993: result: $enable_stripping" >&5
16994 echo "${ECHO_T}$enable_stripping" >&6
16995
16996 if test "$enable_stripping" = yes
16997 then
16998         INSTALL_OPT_S="-s"
16999 else
17000         INSTALL_OPT_S=
17001 fi
17002
17003 : "${INSTALL:=install}"
17004 echo "$as_me:17004: checking if install accepts -p option" >&5
17005 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
17006 if test "${cf_cv_install_p+set}" = set; then
17007   echo $ECHO_N "(cached) $ECHO_C" >&6
17008 else
17009
17010         rm -rf ./conftest*
17011         date >conftest.in
17012         mkdir conftest.out
17013         sleep 3
17014         if $INSTALL -p conftest.in conftest.out 2>/dev/null
17015         then
17016                 if test -f conftest.out/conftest.in
17017                 then
17018                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
17019                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
17020                         if test -s conftest.err
17021                         then
17022                                 cf_cv_install_p=no
17023                         else
17024                                 cf_cv_install_p=yes
17025                         fi
17026                 else
17027                         cf_cv_install_p=no
17028                 fi
17029         else
17030                 cf_cv_install_p=no
17031         fi
17032         rm -rf ./conftest*
17033
17034 fi
17035 echo "$as_me:17035: result: $cf_cv_install_p" >&5
17036 echo "${ECHO_T}$cf_cv_install_p" >&6
17037
17038 echo "$as_me:17038: checking if install needs to be told about ownership" >&5
17039 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
17040 case `$ac_config_guess` in
17041 (*minix)
17042         with_install_o=yes
17043         ;;
17044 (*)
17045         with_install_o=no
17046         ;;
17047 esac
17048
17049 echo "$as_me:17049: result: $with_install_o" >&5
17050 echo "${ECHO_T}$with_install_o" >&6
17051 if test "x$with_install_o" = xyes
17052 then
17053         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'`"
17054 else
17055         INSTALL_OPT_O=
17056 fi
17057
17058 if test -n "$INSTALL_OPT_S"
17059 then
17060         echo "$as_me:17060: checking if you want to specify strip-program" >&5
17061 echo $ECHO_N "checking if you want to specify strip-program... $ECHO_C" >&6
17062
17063 # Check whether --with-strip-program or --without-strip-program was given.
17064 if test "${with_strip_program+set}" = set; then
17065   withval="$with_strip_program"
17066   with_strip_program=$withval
17067 else
17068   with_strip_program=no
17069 fi;
17070         echo "$as_me:17070: result: $with_strip_program" >&5
17071 echo "${ECHO_T}$with_strip_program" >&6
17072         if test "$with_strip_program" != no
17073         then
17074                 echo "$as_me:17074: checking if strip-program is supported with this installer" >&5
17075 echo $ECHO_N "checking if strip-program is supported with this installer... $ECHO_C" >&6
17076                 cf_install_program=`echo "$INSTALL" | sed -e 's%[ ]*[ ]-.%%'`
17077                 check_install_strip=no
17078                 if test -f "$cf_install_program"
17079                 then
17080                         check_install_version=`"$cf_install_program" --version 2>/dev/null | head -n 1 | grep coreutils`
17081                         if test -n "$check_install_version"
17082                         then
17083                                 check_install_strip="option"
17084                         else
17085                                 for check_strip_variable in STRIPBIN STRIP
17086                                 do
17087                                         if strings "$cf_install_program" | grep "^$check_strip_variable$" >/dev/null
17088                                         then
17089                                                 check_install_strip="environ"
17090                                                 break
17091                                         fi
17092                                 done
17093                         fi
17094                 fi
17095                 echo "$as_me:17095: result: $check_install_strip" >&5
17096 echo "${ECHO_T}$check_install_strip" >&6
17097                 case "$check_install_strip" in
17098                 (no)
17099                         { echo "$as_me:17099: WARNING: $cf_install_program does not support strip program option" >&5
17100 echo "$as_me: WARNING: $cf_install_program does not support strip program option" >&2;}
17101                         with_strip_program=no
17102                         ;;
17103                 (environ)
17104                         cat >install.tmp <<-CF_EOF
17105                         #! $SHELL
17106                         STRIPBIN="$with_strip_program" \\
17107                         STRIP="$with_strip_program" \\
17108                         $INSTALL "$@"
17109                         CF_EOF
17110                         INSTALL="`pwd`/install.tmp"
17111                         chmod +x "$INSTALL"
17112                         test -n "$verbose" && echo "    created $INSTALL" 1>&6
17113
17114 echo "${as_me:-configure}:17114: testing created $INSTALL ..." 1>&5
17115
17116                         ;;
17117                 (option)
17118                         INSTALL_OPT_S="$INSTALL_OPT_S --strip-program=\"$with_strip_program\""
17119                         ;;
17120                 esac
17121         fi
17122 fi
17123
17124 # If we're avoiding relinking of shared libraries during install, that is to
17125 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
17126 # the install program has "-p" (for preserving timestamps).
17127 cf_cv_do_reranlib=yes
17128 if test "x$cf_cv_install_p" = xyes
17129 then
17130         if test "x$cf_cv_do_relink" != xyes
17131         then
17132                 cf_cv_do_reranlib=no
17133                 INSTALL_OPT_P="-p"
17134                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
17135         fi
17136 fi
17137
17138 ###     use option --enable-warnings to turn on all gcc warnings
17139
17140 echo "$as_me:17140: checking if you want to use C11 _Noreturn feature" >&5
17141 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
17142
17143 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
17144 if test "${enable_stdnoreturn+set}" = set; then
17145   enableval="$enable_stdnoreturn"
17146   test "$enableval" != yes && enableval=no
17147         if test "$enableval" != "no" ; then
17148     enable_stdnoreturn=yes
17149         else
17150                 enable_stdnoreturn=no
17151         fi
17152 else
17153   enableval=no
17154         enable_stdnoreturn=no
17155
17156 fi;
17157 echo "$as_me:17157: result: $enable_stdnoreturn" >&5
17158 echo "${ECHO_T}$enable_stdnoreturn" >&6
17159
17160 if test $enable_stdnoreturn = yes; then
17161 echo "$as_me:17161: checking for C11 _Noreturn feature" >&5
17162 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
17163 if test "${cf_cv_c11_noreturn+set}" = set; then
17164   echo $ECHO_N "(cached) $ECHO_C" >&6
17165 else
17166   cat >"conftest.$ac_ext" <<_ACEOF
17167 #line 17167 "configure"
17168 #include "confdefs.h"
17169
17170 $ac_includes_default
17171 #include <stdnoreturn.h>
17172 static _Noreturn void giveup(void) { exit(0); }
17173
17174 int
17175 main (void)
17176 {
17177 if (feof(stdin)) giveup()
17178   ;
17179   return 0;
17180 }
17181 _ACEOF
17182 rm -f "conftest.$ac_objext"
17183 if { (eval echo "$as_me:17183: \"$ac_compile\"") >&5
17184   (eval $ac_compile) 2>&5
17185   ac_status=$?
17186   echo "$as_me:17186: \$? = $ac_status" >&5
17187   (exit "$ac_status"); } &&
17188          { ac_try='test -s "conftest.$ac_objext"'
17189   { (eval echo "$as_me:17189: \"$ac_try\"") >&5
17190   (eval $ac_try) 2>&5
17191   ac_status=$?
17192   echo "$as_me:17192: \$? = $ac_status" >&5
17193   (exit "$ac_status"); }; }; then
17194   cf_cv_c11_noreturn=yes
17195 else
17196   echo "$as_me: failed program was:" >&5
17197 cat "conftest.$ac_ext" >&5
17198 cf_cv_c11_noreturn=no
17199 fi
17200 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17201
17202 fi
17203 echo "$as_me:17203: result: $cf_cv_c11_noreturn" >&5
17204 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
17205 else
17206         cf_cv_c11_noreturn=no,
17207 fi
17208
17209 if test "$cf_cv_c11_noreturn" = yes; then
17210
17211 cat >>confdefs.h <<\EOF
17212 #define HAVE_STDNORETURN_H 1
17213 EOF
17214
17215 cat >>confdefs.h <<EOF
17216 #define STDC_NORETURN _Noreturn
17217 EOF
17218
17219         HAVE_STDNORETURN_H=1
17220 else
17221         HAVE_STDNORETURN_H=0
17222 fi
17223
17224 if test "$GCC" = yes || test "$GXX" = yes
17225 then
17226
17227 if test "$GCC" = yes || test "$GXX" = yes
17228 then
17229         case $CFLAGS in
17230         (*-Werror=*)
17231                 cf_temp_flags=
17232                 for cf_temp_scan in $CFLAGS
17233                 do
17234                         case "x$cf_temp_scan" in
17235                         (x-Werror=format*)
17236
17237         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17238         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17239
17240                                 ;;
17241                         (x-Werror=*)
17242
17243         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17244         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17245
17246                                 ;;
17247                         (*)
17248
17249         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17250         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17251
17252                                 ;;
17253                         esac
17254                 done
17255                 if test "x$CFLAGS" != "x$cf_temp_flags"
17256                 then
17257                         test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
17258
17259 echo "${as_me:-configure}:17259: testing repairing CFLAGS: $CFLAGS ..." 1>&5
17260
17261                         CFLAGS="$cf_temp_flags"
17262                         test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
17263
17264 echo "${as_me:-configure}:17264: testing ... fixed $CFLAGS ..." 1>&5
17265
17266                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17267
17268 echo "${as_me:-configure}:17268: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17269
17270                 fi
17271                 ;;
17272         esac
17273 fi
17274
17275 if test "$GCC" = yes || test "$GXX" = yes
17276 then
17277         case $CPPFLAGS in
17278         (*-Werror=*)
17279                 cf_temp_flags=
17280                 for cf_temp_scan in $CPPFLAGS
17281                 do
17282                         case "x$cf_temp_scan" in
17283                         (x-Werror=format*)
17284
17285         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17286         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17287
17288                                 ;;
17289                         (x-Werror=*)
17290
17291         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17292         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17293
17294                                 ;;
17295                         (*)
17296
17297         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17298         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17299
17300                                 ;;
17301                         esac
17302                 done
17303                 if test "x$CPPFLAGS" != "x$cf_temp_flags"
17304                 then
17305                         test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
17306
17307 echo "${as_me:-configure}:17307: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
17308
17309                         CPPFLAGS="$cf_temp_flags"
17310                         test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
17311
17312 echo "${as_me:-configure}:17312: testing ... fixed $CPPFLAGS ..." 1>&5
17313
17314                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17315
17316 echo "${as_me:-configure}:17316: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17317
17318                 fi
17319                 ;;
17320         esac
17321 fi
17322
17323 if test "$GCC" = yes || test "$GXX" = yes
17324 then
17325         case $LDFLAGS in
17326         (*-Werror=*)
17327                 cf_temp_flags=
17328                 for cf_temp_scan in $LDFLAGS
17329                 do
17330                         case "x$cf_temp_scan" in
17331                         (x-Werror=format*)
17332
17333         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17334         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17335
17336                                 ;;
17337                         (x-Werror=*)
17338
17339         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
17340         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
17341
17342                                 ;;
17343                         (*)
17344
17345         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
17346         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
17347
17348                                 ;;
17349                         esac
17350                 done
17351                 if test "x$LDFLAGS" != "x$cf_temp_flags"
17352                 then
17353                         test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
17354
17355 echo "${as_me:-configure}:17355: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
17356
17357                         LDFLAGS="$cf_temp_flags"
17358                         test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
17359
17360 echo "${as_me:-configure}:17360: testing ... fixed $LDFLAGS ..." 1>&5
17361
17362                         test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
17363
17364 echo "${as_me:-configure}:17364: testing ... extra $EXTRA_CFLAGS ..." 1>&5
17365
17366                 fi
17367                 ;;
17368         esac
17369 fi
17370
17371 echo "$as_me:17371: checking if you want to turn on gcc warnings" >&5
17372 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
17373
17374 # Check whether --enable-warnings or --disable-warnings was given.
17375 if test "${enable_warnings+set}" = set; then
17376   enableval="$enable_warnings"
17377   test "$enableval" != yes && enableval=no
17378         if test "$enableval" != "no" ; then
17379     enable_warnings=yes
17380         else
17381                 enable_warnings=no
17382         fi
17383 else
17384   enableval=no
17385         enable_warnings=no
17386
17387 fi;
17388 echo "$as_me:17388: result: $enable_warnings" >&5
17389 echo "${ECHO_T}$enable_warnings" >&6
17390 if test "$enable_warnings" = "yes"
17391 then
17392
17393 if test "x$have_x" = xyes; then
17394
17395 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
17396 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
17397 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
17398 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
17399 for cf_X_CFLAGS in $X_CFLAGS
17400 do
17401         case "x$cf_X_CFLAGS" in
17402         x-[IUD]*)
17403                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
17404                 ;;
17405         *)
17406                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
17407                 ;;
17408         esac
17409 done
17410
17411 cat >"conftest.$ac_ext" <<_ACEOF
17412 #line 17412 "configure"
17413 #include "confdefs.h"
17414
17415 #include <stdlib.h>
17416 #include <X11/Intrinsic.h>
17417
17418 int
17419 main (void)
17420 {
17421 String foo = malloc(1); free((void*)foo)
17422   ;
17423   return 0;
17424 }
17425 _ACEOF
17426 rm -f "conftest.$ac_objext"
17427 if { (eval echo "$as_me:17427: \"$ac_compile\"") >&5
17428   (eval $ac_compile) 2>&5
17429   ac_status=$?
17430   echo "$as_me:17430: \$? = $ac_status" >&5
17431   (exit "$ac_status"); } &&
17432          { ac_try='test -s "conftest.$ac_objext"'
17433   { (eval echo "$as_me:17433: \"$ac_try\"") >&5
17434   (eval $ac_try) 2>&5
17435   ac_status=$?
17436   echo "$as_me:17436: \$? = $ac_status" >&5
17437   (exit "$ac_status"); }; }; then
17438
17439 echo "$as_me:17439: checking for X11/Xt const-feature" >&5
17440 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
17441 if test "${cf_cv_const_x_string+set}" = set; then
17442   echo $ECHO_N "(cached) $ECHO_C" >&6
17443 else
17444
17445         cat >"conftest.$ac_ext" <<_ACEOF
17446 #line 17446 "configure"
17447 #include "confdefs.h"
17448
17449 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
17450 #undef  XTSTRINGDEFINES /* X11R5 and later */
17451 #include <stdlib.h>
17452 #include <X11/Intrinsic.h>
17453
17454 int
17455 main (void)
17456 {
17457 String foo = malloc(1); *foo = 0
17458   ;
17459   return 0;
17460 }
17461 _ACEOF
17462 rm -f "conftest.$ac_objext"
17463 if { (eval echo "$as_me:17463: \"$ac_compile\"") >&5
17464   (eval $ac_compile) 2>&5
17465   ac_status=$?
17466   echo "$as_me:17466: \$? = $ac_status" >&5
17467   (exit "$ac_status"); } &&
17468          { ac_try='test -s "conftest.$ac_objext"'
17469   { (eval echo "$as_me:17469: \"$ac_try\"") >&5
17470   (eval $ac_try) 2>&5
17471   ac_status=$?
17472   echo "$as_me:17472: \$? = $ac_status" >&5
17473   (exit "$ac_status"); }; }; then
17474
17475                         cf_cv_const_x_string=no
17476
17477 else
17478   echo "$as_me: failed program was:" >&5
17479 cat "conftest.$ac_ext" >&5
17480
17481                         cf_cv_const_x_string=yes
17482
17483 fi
17484 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17485
17486 fi
17487 echo "$as_me:17487: result: $cf_cv_const_x_string" >&5
17488 echo "${ECHO_T}$cf_cv_const_x_string" >&6
17489
17490 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
17491 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
17492 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
17493
17494 case "$cf_cv_const_x_string" in
17495 (no)
17496
17497         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17498         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
17499
17500         ;;
17501 (*)
17502
17503         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17504         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
17505
17506         ;;
17507 esac
17508
17509 else
17510   echo "$as_me: failed program was:" >&5
17511 cat "conftest.$ac_ext" >&5
17512 fi
17513 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17514  fi
17515 cat > "conftest.$ac_ext" <<EOF
17516 #line 17516 "${as_me:-configure}"
17517 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17518 EOF
17519 if test "$INTEL_COMPILER" = yes
17520 then
17521 # The "-wdXXX" options suppress warnings:
17522 # remark #1419: external declaration in primary source file
17523 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17524 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17525 # remark #193: zero used for undefined preprocessing identifier
17526 # remark #593: variable "curs_sb_left_arrow" was set but never used
17527 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17528 # remark #869: parameter "tw" was never referenced
17529 # remark #981: operands are evaluated in unspecified order
17530 # warning #279: controlling expression is constant
17531
17532         { echo "$as_me:17532: checking for $CC warning options..." >&5
17533 echo "$as_me: checking for $CC warning options..." >&6;}
17534         cf_save_CFLAGS="$CFLAGS"
17535         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
17536         for cf_opt in \
17537                 wd1419 \
17538                 wd1683 \
17539                 wd1684 \
17540                 wd193 \
17541                 wd593 \
17542                 wd279 \
17543                 wd810 \
17544                 wd869 \
17545                 wd981
17546         do
17547                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17548                 if { (eval echo "$as_me:17548: \"$ac_compile\"") >&5
17549   (eval $ac_compile) 2>&5
17550   ac_status=$?
17551   echo "$as_me:17551: \$? = $ac_status" >&5
17552   (exit "$ac_status"); }; then
17553                         test -n "$verbose" && echo "$as_me:17553: result: ... -$cf_opt" >&5
17554 echo "${ECHO_T}... -$cf_opt" >&6
17555                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17556                 fi
17557         done
17558         CFLAGS="$cf_save_CFLAGS"
17559 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
17560 then
17561         { echo "$as_me:17561: checking for $CC warning options..." >&5
17562 echo "$as_me: checking for $CC warning options..." >&6;}
17563         cf_save_CFLAGS="$CFLAGS"
17564         cf_warn_CONST=""
17565         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
17566         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17567         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17568         for cf_opt in W Wall \
17569                 Wbad-function-cast \
17570                 Wcast-align \
17571                 Wcast-qual \
17572                 Wdeclaration-after-statement \
17573                 Wextra \
17574                 Winline \
17575                 Wmissing-declarations \
17576                 Wmissing-prototypes \
17577                 Wnested-externs \
17578                 Wpointer-arith \
17579                 Wshadow \
17580                 Wstrict-prototypes \
17581                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17582         do
17583                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17584                 if { (eval echo "$as_me:17584: \"$ac_compile\"") >&5
17585   (eval $ac_compile) 2>&5
17586   ac_status=$?
17587   echo "$as_me:17587: \$? = $ac_status" >&5
17588   (exit "$ac_status"); }; then
17589                         test -n "$verbose" && echo "$as_me:17589: result: ... -$cf_opt" >&5
17590 echo "${ECHO_T}... -$cf_opt" >&6
17591                         case "$cf_opt" in
17592                         (Winline)
17593                                 case "$GCC_VERSION" in
17594                                 ([34].*)
17595                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17596
17597 echo "${as_me:-configure}:17597: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17598
17599                                         continue;;
17600                                 esac
17601                                 ;;
17602                         (Wpointer-arith)
17603                                 case "$GCC_VERSION" in
17604                                 ([12].*)
17605                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17606
17607 echo "${as_me:-configure}:17607: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17608
17609                                         continue;;
17610                                 esac
17611                                 ;;
17612                         esac
17613                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17614                 fi
17615         done
17616         CFLAGS="$cf_save_CFLAGS"
17617 fi
17618 rm -rf ./conftest*
17619
17620 fi
17621
17622 if test "$GCC" = yes || test "$GXX" = yes
17623 then
17624 cat > conftest.i <<EOF
17625 #ifndef GCC_PRINTF
17626 #define GCC_PRINTF 0
17627 #endif
17628 #ifndef GCC_SCANF
17629 #define GCC_SCANF 0
17630 #endif
17631 #ifndef GCC_NORETURN
17632 #define GCC_NORETURN /* nothing */
17633 #endif
17634 #ifndef GCC_UNUSED
17635 #define GCC_UNUSED /* nothing */
17636 #endif
17637 EOF
17638 if test "$GCC" = yes
17639 then
17640         { echo "$as_me:17640: checking for $CC __attribute__ directives..." >&5
17641 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17642 cat > "conftest.$ac_ext" <<EOF
17643 #line 17643 "${as_me:-configure}"
17644 #include <stdio.h>
17645 #include "confdefs.h"
17646 #include "conftest.h"
17647 #include "conftest.i"
17648 #if     GCC_PRINTF
17649 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17650 #else
17651 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17652 #endif
17653 #if     GCC_SCANF
17654 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17655 #else
17656 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17657 #endif
17658 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17659 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17660 extern GCC_NORETURN void foo(void);
17661 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17662 EOF
17663         cf_printf_attribute=no
17664         cf_scanf_attribute=no
17665         for cf_attribute in scanf printf unused noreturn
17666         do
17667
17668 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17669
17670                 cf_directive="__attribute__(($cf_attribute))"
17671                 echo "checking for $CC $cf_directive" 1>&5
17672
17673                 case "$cf_attribute" in
17674                 (printf)
17675                         cf_printf_attribute=yes
17676                         cat >conftest.h <<EOF
17677 #define GCC_$cf_ATTRIBUTE 1
17678 EOF
17679                         ;;
17680                 (scanf)
17681                         cf_scanf_attribute=yes
17682                         cat >conftest.h <<EOF
17683 #define GCC_$cf_ATTRIBUTE 1
17684 EOF
17685                         ;;
17686                 (*)
17687                         cat >conftest.h <<EOF
17688 #define GCC_$cf_ATTRIBUTE $cf_directive
17689 EOF
17690                         ;;
17691                 esac
17692
17693                 if { (eval echo "$as_me:17693: \"$ac_compile\"") >&5
17694   (eval $ac_compile) 2>&5
17695   ac_status=$?
17696   echo "$as_me:17696: \$? = $ac_status" >&5
17697   (exit "$ac_status"); }; then
17698                         test -n "$verbose" && echo "$as_me:17698: result: ... $cf_attribute" >&5
17699 echo "${ECHO_T}... $cf_attribute" >&6
17700                         cat conftest.h >>confdefs.h
17701                         case "$cf_attribute" in
17702                         (noreturn)
17703
17704 cat >>confdefs.h <<EOF
17705 #define GCC_NORETURN $cf_directive
17706 EOF
17707
17708                                 ;;
17709                         (printf)
17710                                 cf_value='/* nothing */'
17711                                 if test "$cf_printf_attribute" != no ; then
17712                                         cf_value='__attribute__((format(printf,fmt,var)))'
17713
17714 cat >>confdefs.h <<\EOF
17715 #define GCC_PRINTF 1
17716 EOF
17717
17718                                 fi
17719
17720 cat >>confdefs.h <<EOF
17721 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17722 EOF
17723
17724                                 ;;
17725                         (scanf)
17726                                 cf_value='/* nothing */'
17727                                 if test "$cf_scanf_attribute" != no ; then
17728                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17729
17730 cat >>confdefs.h <<\EOF
17731 #define GCC_SCANF 1
17732 EOF
17733
17734                                 fi
17735
17736 cat >>confdefs.h <<EOF
17737 #define GCC_SCANFLIKE(fmt,var) $cf_value
17738 EOF
17739
17740                                 ;;
17741                         (unused)
17742
17743 cat >>confdefs.h <<EOF
17744 #define GCC_UNUSED $cf_directive
17745 EOF
17746
17747                                 ;;
17748                         esac
17749                 fi
17750         done
17751 else
17752         ${FGREP-fgrep} define conftest.i >>confdefs.h
17753 fi
17754 rm -rf ./conftest*
17755 fi
17756
17757 fi
17758
17759 if test "x$enable_warnings" = "xyes"; then
17760
17761         ADAFLAGS="$ADAFLAGS -gnatwa -gnatyg"
17762
17763         if test "x$cf_with_cxx" = xyes ; then
17764
17765 INTEL_CPLUSPLUS=no
17766
17767 if test "$GCC" = yes ; then
17768         case "$host_os" in
17769         (linux*|gnu*)
17770                 echo "$as_me:17770: checking if this is really Intel C++ compiler" >&5
17771 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17772                 cf_save_CFLAGS="$CXXFLAGS"
17773                 CXXFLAGS="$CXXFLAGS -no-gcc"
17774                 cat >"conftest.$ac_ext" <<_ACEOF
17775 #line 17775 "configure"
17776 #include "confdefs.h"
17777
17778 int
17779 main (void)
17780 {
17781
17782 #ifdef __INTEL_COMPILER
17783 #else
17784 #error __INTEL_COMPILER is not defined
17785 #endif
17786
17787   ;
17788   return 0;
17789 }
17790 _ACEOF
17791 rm -f "conftest.$ac_objext"
17792 if { (eval echo "$as_me:17792: \"$ac_compile\"") >&5
17793   (eval $ac_compile) 2>&5
17794   ac_status=$?
17795   echo "$as_me:17795: \$? = $ac_status" >&5
17796   (exit "$ac_status"); } &&
17797          { ac_try='test -s "conftest.$ac_objext"'
17798   { (eval echo "$as_me:17798: \"$ac_try\"") >&5
17799   (eval $ac_try) 2>&5
17800   ac_status=$?
17801   echo "$as_me:17801: \$? = $ac_status" >&5
17802   (exit "$ac_status"); }; }; then
17803   INTEL_CPLUSPLUS=yes
17804 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17805
17806 else
17807   echo "$as_me: failed program was:" >&5
17808 cat "conftest.$ac_ext" >&5
17809 fi
17810 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17811                 CXXFLAGS="$cf_save_CFLAGS"
17812                 echo "$as_me:17812: result: $INTEL_CPLUSPLUS" >&5
17813 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17814                 ;;
17815         esac
17816 fi
17817
17818 CLANG_CPLUSPLUS=no
17819
17820 if test "$GCC" = yes ; then
17821         echo "$as_me:17821: checking if this is really Clang C++ compiler" >&5
17822 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17823         cf_save_CFLAGS="$CXXFLAGS"
17824         cat >"conftest.$ac_ext" <<_ACEOF
17825 #line 17825 "configure"
17826 #include "confdefs.h"
17827
17828 int
17829 main (void)
17830 {
17831
17832 #ifdef __clang__
17833 #else
17834 #error __clang__ is not defined
17835 #endif
17836
17837   ;
17838   return 0;
17839 }
17840 _ACEOF
17841 rm -f "conftest.$ac_objext"
17842 if { (eval echo "$as_me:17842: \"$ac_compile\"") >&5
17843   (eval $ac_compile) 2>&5
17844   ac_status=$?
17845   echo "$as_me:17845: \$? = $ac_status" >&5
17846   (exit "$ac_status"); } &&
17847          { ac_try='test -s "conftest.$ac_objext"'
17848   { (eval echo "$as_me:17848: \"$ac_try\"") >&5
17849   (eval $ac_try) 2>&5
17850   ac_status=$?
17851   echo "$as_me:17851: \$? = $ac_status" >&5
17852   (exit "$ac_status"); }; }; then
17853   CLANG_CPLUSPLUS=yes
17854
17855 else
17856   echo "$as_me: failed program was:" >&5
17857 cat "conftest.$ac_ext" >&5
17858 fi
17859 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17860         CXXFLAGS="$cf_save_CFLAGS"
17861         echo "$as_me:17861: result: $CLANG_CPLUSPLUS" >&5
17862 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17863 fi
17864
17865 CLANG_VERSION=none
17866
17867 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17868         case "$CC" in
17869         (c[1-9][0-9]|*/c[1-9][0-9])
17870                 { echo "$as_me:17870: WARNING: replacing broken compiler alias $CC" >&5
17871 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17872                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17873                 CC=clang
17874                 ;;
17875         esac
17876
17877         echo "$as_me:17877: checking version of $CC" >&5
17878 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17879         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.].*//'`"
17880         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17881         echo "$as_me:17881: result: $CLANG_VERSION" >&5
17882 echo "${ECHO_T}$CLANG_VERSION" >&6
17883
17884         for cf_clang_opt in \
17885                 -Qunused-arguments \
17886                 -Wno-error=implicit-function-declaration
17887         do
17888                 echo "$as_me:17888: checking if option $cf_clang_opt works" >&5
17889 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17890                 cf_save_CFLAGS="$CFLAGS"
17891                 CFLAGS="$CFLAGS $cf_clang_opt"
17892                 cat >"conftest.$ac_ext" <<_ACEOF
17893 #line 17893 "configure"
17894 #include "confdefs.h"
17895
17896                         #include <stdio.h>
17897 int
17898 main (void)
17899 {
17900
17901                         printf("hello!\\n");
17902   ;
17903   return 0;
17904 }
17905 _ACEOF
17906 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17907 if { (eval echo "$as_me:17907: \"$ac_link\"") >&5
17908   (eval $ac_link) 2>&5
17909   ac_status=$?
17910   echo "$as_me:17910: \$? = $ac_status" >&5
17911   (exit "$ac_status"); } &&
17912          { ac_try='test -s "conftest$ac_exeext"'
17913   { (eval echo "$as_me:17913: \"$ac_try\"") >&5
17914   (eval $ac_try) 2>&5
17915   ac_status=$?
17916   echo "$as_me:17916: \$? = $ac_status" >&5
17917   (exit "$ac_status"); }; }; then
17918
17919                         cf_clang_optok=yes
17920 else
17921   echo "$as_me: failed program was:" >&5
17922 cat "conftest.$ac_ext" >&5
17923
17924                         cf_clang_optok=no
17925 fi
17926 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17927                 echo "$as_me:17927: result: $cf_clang_optok" >&5
17928 echo "${ECHO_T}$cf_clang_optok" >&6
17929                 CFLAGS="$cf_save_CFLAGS"
17930                 if test "$cf_clang_optok" = yes; then
17931                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17932
17933 echo "${as_me:-configure}:17933: testing adding option $cf_clang_opt ..." 1>&5
17934
17935         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17936         CFLAGS="${CFLAGS}$cf_clang_opt"
17937
17938                 fi
17939         done
17940 fi
17941
17942 ac_ext=cc
17943 ac_cpp='$CXXCPP $CPPFLAGS'
17944 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17945 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17946 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17947 ac_main_return="return"
17948
17949 cat > conftest.$ac_ext <<EOF
17950 #line 17950 "configure"
17951 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17952 EOF
17953
17954 if test "$INTEL_CPLUSPLUS" = yes
17955 then
17956 # The "-wdXXX" options suppress warnings:
17957 # remark #1419: external declaration in primary source file
17958 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17959 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17960 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17961 # remark #193: zero used for undefined preprocessing identifier
17962 # remark #593: variable "curs_sb_left_arrow" was set but never used
17963 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17964 # remark #869: parameter "tw" was never referenced
17965 # remark #981: operands are evaluated in unspecified order
17966 # warning #269: invalid format string conversion
17967
17968         { echo "$as_me:17968: checking for $CC warning options..." >&5
17969 echo "$as_me: checking for $CC warning options..." >&6;}
17970         cf_save_CXXFLAGS="$CXXFLAGS"
17971         EXTRA_CXXFLAGS="-Wall"
17972         for cf_opt in \
17973                 wd1419 \
17974                 wd1682 \
17975                 wd1683 \
17976                 wd1684 \
17977                 wd193 \
17978                 wd279 \
17979                 wd593 \
17980                 wd810 \
17981                 wd869 \
17982                 wd981
17983         do
17984                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17985                 if { (eval echo "$as_me:17985: \"$ac_compile\"") >&5
17986   (eval $ac_compile) 2>&5
17987   ac_status=$?
17988   echo "$as_me:17988: \$? = $ac_status" >&5
17989   (exit "$ac_status"); }; then
17990                         test -n "$verbose" && echo "$as_me:17990: result: ... -$cf_opt" >&5
17991 echo "${ECHO_T}... -$cf_opt" >&6
17992                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17993                 fi
17994         done
17995         CXXFLAGS="$cf_save_CXXFLAGS"
17996
17997 elif test "$GXX" = yes
17998 then
17999         { echo "$as_me:17999: checking for $CXX warning options..." >&5
18000 echo "$as_me: checking for $CXX warning options..." >&6;}
18001         cf_save_CXXFLAGS="$CXXFLAGS"
18002         EXTRA_CXXFLAGS="-W -Wall"
18003         cf_gxx_extra_warnings=""
18004         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
18005         case "$GXX_VERSION" in
18006         ([1-2].*)
18007                 ;;
18008         (*)
18009                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
18010                 ;;
18011         esac
18012         for cf_opt in \
18013                 Wabi \
18014                 fabi-version=0 \
18015                 Wextra \
18016                 Wignored-qualifiers \
18017                 Wlogical-op \
18018                 Woverloaded-virtual \
18019                 Wsign-promo \
18020                 Wsynth \
18021                 Wold-style-cast \
18022                 Wcast-align \
18023                 Wcast-qual \
18024                 Wpointer-arith \
18025                 Wshadow \
18026                 Wundef $cf_gxx_extra_warnings Wno-unused
18027         do
18028                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
18029                 if { (eval echo "$as_me:18029: \"$ac_compile\"") >&5
18030   (eval $ac_compile) 2>&5
18031   ac_status=$?
18032   echo "$as_me:18032: \$? = $ac_status" >&5
18033   (exit "$ac_status"); }; then
18034                         test -n "$verbose" && echo "$as_me:18034: result: ... -$cf_opt" >&5
18035 echo "${ECHO_T}... -$cf_opt" >&6
18036                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
18037                 else
18038                         test -n "$verbose" && echo "$as_me:18038: result: ... no -$cf_opt" >&5
18039 echo "${ECHO_T}... no -$cf_opt" >&6
18040                 fi
18041         done
18042         CXXFLAGS="$cf_save_CXXFLAGS"
18043 fi
18044
18045 rm -rf ./conftest*
18046 ac_ext=c
18047 ac_cpp='$CPP $CPPFLAGS'
18048 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
18049 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
18050 ac_compiler_gnu=$ac_cv_c_compiler_gnu
18051 ac_main_return="return"
18052
18053         fi
18054 fi
18055
18056 echo "$as_me:18056: checking if you want to work around bogus compiler/loader warnings" >&5
18057 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
18058
18059 # Check whether --enable-string-hacks or --disable-string-hacks was given.
18060 if test "${enable_string_hacks+set}" = set; then
18061   enableval="$enable_string_hacks"
18062   enable_string_hacks=$enableval
18063 else
18064   enable_string_hacks=no
18065 fi;
18066 echo "$as_me:18066: result: $enable_string_hacks" >&5
18067 echo "${ECHO_T}$enable_string_hacks" >&6
18068
18069 if test "x$enable_string_hacks" = "xyes"; then
18070
18071 cat >>confdefs.h <<\EOF
18072 #define USE_STRING_HACKS 1
18073 EOF
18074
18075         { echo "$as_me:18075: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
18076 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
18077         echo "$as_me:18077: checking for strlcat" >&5
18078 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
18079 if test "${ac_cv_func_strlcat+set}" = set; then
18080   echo $ECHO_N "(cached) $ECHO_C" >&6
18081 else
18082   cat >"conftest.$ac_ext" <<_ACEOF
18083 #line 18083 "configure"
18084 #include "confdefs.h"
18085 #define strlcat autoconf_temporary
18086 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18087 #undef strlcat
18088
18089 #ifdef __cplusplus
18090 extern "C"
18091 #endif
18092
18093 /* We use char because int might match the return type of a gcc2
18094    builtin and then its argument prototype would still apply.  */
18095 char strlcat (void);
18096
18097 int
18098 main (void)
18099 {
18100
18101 /* The GNU C library defines stubs for functions which it implements
18102     to always fail with ENOSYS.  Some functions are actually named
18103     something starting with __ and the normal name is an alias.  */
18104 #if defined (__stub_strlcat) || defined (__stub___strlcat)
18105 #error found stub for strlcat
18106 #endif
18107
18108         return strlcat ();
18109   ;
18110   return 0;
18111 }
18112 _ACEOF
18113 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18114 if { (eval echo "$as_me:18114: \"$ac_link\"") >&5
18115   (eval $ac_link) 2>&5
18116   ac_status=$?
18117   echo "$as_me:18117: \$? = $ac_status" >&5
18118   (exit "$ac_status"); } &&
18119          { ac_try='test -s "conftest$ac_exeext"'
18120   { (eval echo "$as_me:18120: \"$ac_try\"") >&5
18121   (eval $ac_try) 2>&5
18122   ac_status=$?
18123   echo "$as_me:18123: \$? = $ac_status" >&5
18124   (exit "$ac_status"); }; }; then
18125   ac_cv_func_strlcat=yes
18126 else
18127   echo "$as_me: failed program was:" >&5
18128 cat "conftest.$ac_ext" >&5
18129 ac_cv_func_strlcat=no
18130 fi
18131 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18132 fi
18133 echo "$as_me:18133: result: $ac_cv_func_strlcat" >&5
18134 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
18135 if test "$ac_cv_func_strlcat" = yes; then
18136
18137 cat >>confdefs.h <<\EOF
18138 #define HAVE_STRLCAT 1
18139 EOF
18140
18141 else
18142
18143                 echo "$as_me:18143: checking for strlcat in -lbsd" >&5
18144 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
18145 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
18146   echo $ECHO_N "(cached) $ECHO_C" >&6
18147 else
18148   ac_check_lib_save_LIBS=$LIBS
18149 LIBS="-lbsd  $LIBS"
18150 cat >"conftest.$ac_ext" <<_ACEOF
18151 #line 18151 "configure"
18152 #include "confdefs.h"
18153
18154 /* Override any gcc2 internal prototype to avoid an error.  */
18155 #ifdef __cplusplus
18156 extern "C"
18157 #endif
18158 /* We use char because int might match the return type of a gcc2
18159    builtin and then its argument prototype would still apply.  */
18160 char strlcat ();
18161 int
18162 main (void)
18163 {
18164 strlcat ();
18165   ;
18166   return 0;
18167 }
18168 _ACEOF
18169 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18170 if { (eval echo "$as_me:18170: \"$ac_link\"") >&5
18171   (eval $ac_link) 2>&5
18172   ac_status=$?
18173   echo "$as_me:18173: \$? = $ac_status" >&5
18174   (exit "$ac_status"); } &&
18175          { ac_try='test -s "conftest$ac_exeext"'
18176   { (eval echo "$as_me:18176: \"$ac_try\"") >&5
18177   (eval $ac_try) 2>&5
18178   ac_status=$?
18179   echo "$as_me:18179: \$? = $ac_status" >&5
18180   (exit "$ac_status"); }; }; then
18181   ac_cv_lib_bsd_strlcat=yes
18182 else
18183   echo "$as_me: failed program was:" >&5
18184 cat "conftest.$ac_ext" >&5
18185 ac_cv_lib_bsd_strlcat=no
18186 fi
18187 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18188 LIBS=$ac_check_lib_save_LIBS
18189 fi
18190 echo "$as_me:18190: result: $ac_cv_lib_bsd_strlcat" >&5
18191 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
18192 if test "$ac_cv_lib_bsd_strlcat" = yes; then
18193
18194 cf_add_libs="$LIBS"
18195 # reverse order
18196 cf_add_0lib=
18197 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18198 # filter duplicates
18199 for cf_add_1lib in $cf_add_0lib; do
18200         for cf_add_2lib in $cf_add_libs; do
18201                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18202                         cf_add_1lib=
18203                         break
18204                 fi
18205         done
18206         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18207 done
18208 LIBS="$cf_add_libs"
18209
18210 for ac_header in bsd/string.h
18211 do
18212 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
18213 echo "$as_me:18213: checking for $ac_header" >&5
18214 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
18215 if eval "test \"\${$as_ac_Header+set}\" = set"; then
18216   echo $ECHO_N "(cached) $ECHO_C" >&6
18217 else
18218   cat >"conftest.$ac_ext" <<_ACEOF
18219 #line 18219 "configure"
18220 #include "confdefs.h"
18221 #include <$ac_header>
18222 _ACEOF
18223 if { (eval echo "$as_me:18223: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18224   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18225   ac_status=$?
18226   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18227   rm -f conftest.er1
18228   cat conftest.err >&5
18229   echo "$as_me:18229: \$? = $ac_status" >&5
18230   (exit "$ac_status"); } >/dev/null; then
18231   if test -s conftest.err; then
18232     ac_cpp_err=$ac_c_preproc_warn_flag
18233   else
18234     ac_cpp_err=
18235   fi
18236 else
18237   ac_cpp_err=yes
18238 fi
18239 if test -z "$ac_cpp_err"; then
18240   eval "$as_ac_Header=yes"
18241 else
18242   echo "$as_me: failed program was:" >&5
18243   cat "conftest.$ac_ext" >&5
18244   eval "$as_ac_Header=no"
18245 fi
18246 rm -f conftest.err "conftest.$ac_ext"
18247 fi
18248 echo "$as_me:18248: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
18249 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
18250 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
18251   cat >>confdefs.h <<EOF
18252 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
18253 EOF
18254
18255 fi
18256 done
18257
18258 cat >>confdefs.h <<\EOF
18259 #define HAVE_STRLCAT 1
18260 EOF
18261
18262 fi
18263
18264 fi
18265
18266 for ac_func in strlcpy snprintf
18267 do
18268 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18269 echo "$as_me:18269: checking for $ac_func" >&5
18270 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18271 if eval "test \"\${$as_ac_var+set}\" = set"; then
18272   echo $ECHO_N "(cached) $ECHO_C" >&6
18273 else
18274   cat >"conftest.$ac_ext" <<_ACEOF
18275 #line 18275 "configure"
18276 #include "confdefs.h"
18277 #define $ac_func autoconf_temporary
18278 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18279 #undef $ac_func
18280
18281 #ifdef __cplusplus
18282 extern "C"
18283 #endif
18284
18285 /* We use char because int might match the return type of a gcc2
18286    builtin and then its argument prototype would still apply.  */
18287 char $ac_func (void);
18288
18289 int
18290 main (void)
18291 {
18292
18293 /* The GNU C library defines stubs for functions which it implements
18294     to always fail with ENOSYS.  Some functions are actually named
18295     something starting with __ and the normal name is an alias.  */
18296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18297 #error found stub for $ac_func
18298 #endif
18299
18300         return $ac_func ();
18301   ;
18302   return 0;
18303 }
18304 _ACEOF
18305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18306 if { (eval echo "$as_me:18306: \"$ac_link\"") >&5
18307   (eval $ac_link) 2>&5
18308   ac_status=$?
18309   echo "$as_me:18309: \$? = $ac_status" >&5
18310   (exit "$ac_status"); } &&
18311          { ac_try='test -s "conftest$ac_exeext"'
18312   { (eval echo "$as_me:18312: \"$ac_try\"") >&5
18313   (eval $ac_try) 2>&5
18314   ac_status=$?
18315   echo "$as_me:18315: \$? = $ac_status" >&5
18316   (exit "$ac_status"); }; }; then
18317   eval "$as_ac_var=yes"
18318 else
18319   echo "$as_me: failed program was:" >&5
18320 cat "conftest.$ac_ext" >&5
18321 eval "$as_ac_var=no"
18322 fi
18323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18324 fi
18325 echo "$as_me:18325: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18326 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18327 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18328   cat >>confdefs.h <<EOF
18329 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18330 EOF
18331
18332 fi
18333 done
18334
18335 fi
18336
18337 ###     use option --enable-assertions to turn on generation of assertion code
18338 echo "$as_me:18338: checking if you want to enable runtime assertions" >&5
18339 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
18340
18341 # Check whether --enable-assertions or --disable-assertions was given.
18342 if test "${enable_assertions+set}" = set; then
18343   enableval="$enable_assertions"
18344   with_assertions=$enableval
18345 else
18346   with_assertions=no
18347 fi;
18348 echo "$as_me:18348: result: $with_assertions" >&5
18349 echo "${ECHO_T}$with_assertions" >&6
18350 if test -n "$GCC"
18351 then
18352         if test "$with_assertions" = no
18353         then
18354                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
18355         else
18356
18357         ADAFLAGS="$ADAFLAGS -gnata"
18358
18359         fi
18360 fi
18361
18362 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
18363
18364 echo "$as_me:18364: checking if you want to use dmalloc for testing" >&5
18365 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18366
18367 # Check whether --with-dmalloc or --without-dmalloc was given.
18368 if test "${with_dmalloc+set}" = set; then
18369   withval="$with_dmalloc"
18370   case "x$withval" in
18371         (x|xno) ;;
18372         (*)
18373                 : "${with_cflags:=-g}"
18374                 : "${enable_leaks:=no}"
18375                 with_dmalloc=yes
18376
18377 cat >>confdefs.h <<EOF
18378 #define USE_DMALLOC 1
18379 EOF
18380
18381                 ;;
18382         esac
18383 else
18384   with_dmalloc=
18385 fi;
18386 echo "$as_me:18386: result: ${with_dmalloc:-no}" >&5
18387 echo "${ECHO_T}${with_dmalloc:-no}" >&6
18388
18389 case ".$with_cflags" in
18390 (.*-g*)
18391         case .$CFLAGS in
18392         (.*-g*)
18393                 ;;
18394         (*)
18395
18396 cf_fix_cppflags=no
18397 cf_new_cflags=
18398 cf_new_cppflags=
18399 cf_new_extra_cppflags=
18400
18401 for cf_add_cflags in -g
18402 do
18403 case "$cf_fix_cppflags" in
18404 (no)
18405         case "$cf_add_cflags" in
18406         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18407                 case "$cf_add_cflags" in
18408                 (-D*)
18409                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18410
18411                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18412                                 && test -z "${cf_tst_cflags}" \
18413                                 && cf_fix_cppflags=yes
18414
18415                         if test "$cf_fix_cppflags" = yes ; then
18416
18417         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18418         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18419
18420                                 continue
18421                         elif test "${cf_tst_cflags}" = "\"'" ; then
18422
18423         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18424         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18425
18426                                 continue
18427                         fi
18428                         ;;
18429                 esac
18430                 case "$CPPFLAGS" in
18431                 (*$cf_add_cflags)
18432                         ;;
18433                 (*)
18434                         case "$cf_add_cflags" in
18435                         (-D*)
18436                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18437
18438 CPPFLAGS=`echo "$CPPFLAGS" | \
18439         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18440                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18441
18442                                 ;;
18443                         esac
18444
18445         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18446         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18447
18448                         ;;
18449                 esac
18450                 ;;
18451         (*)
18452
18453         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18454         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18455
18456                 ;;
18457         esac
18458         ;;
18459 (yes)
18460
18461         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18462         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18463
18464         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18465
18466         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18467                 && test -z "${cf_tst_cflags}" \
18468                 && cf_fix_cppflags=no
18469         ;;
18470 esac
18471 done
18472
18473 if test -n "$cf_new_cflags" ; then
18474
18475         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18476         CFLAGS="${CFLAGS}$cf_new_cflags"
18477
18478 fi
18479
18480 if test -n "$cf_new_cppflags" ; then
18481
18482         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18483         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18484
18485 fi
18486
18487 if test -n "$cf_new_extra_cppflags" ; then
18488
18489         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18490         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18491
18492 fi
18493
18494                 ;;
18495         esac
18496         ;;
18497 esac
18498
18499 if test "$with_dmalloc" = yes ; then
18500         echo "$as_me:18500: checking for dmalloc.h" >&5
18501 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18502 if test "${ac_cv_header_dmalloc_h+set}" = set; then
18503   echo $ECHO_N "(cached) $ECHO_C" >&6
18504 else
18505   cat >"conftest.$ac_ext" <<_ACEOF
18506 #line 18506 "configure"
18507 #include "confdefs.h"
18508 #include <dmalloc.h>
18509 _ACEOF
18510 if { (eval echo "$as_me:18510: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18511   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18512   ac_status=$?
18513   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18514   rm -f conftest.er1
18515   cat conftest.err >&5
18516   echo "$as_me:18516: \$? = $ac_status" >&5
18517   (exit "$ac_status"); } >/dev/null; then
18518   if test -s conftest.err; then
18519     ac_cpp_err=$ac_c_preproc_warn_flag
18520   else
18521     ac_cpp_err=
18522   fi
18523 else
18524   ac_cpp_err=yes
18525 fi
18526 if test -z "$ac_cpp_err"; then
18527   ac_cv_header_dmalloc_h=yes
18528 else
18529   echo "$as_me: failed program was:" >&5
18530   cat "conftest.$ac_ext" >&5
18531   ac_cv_header_dmalloc_h=no
18532 fi
18533 rm -f conftest.err "conftest.$ac_ext"
18534 fi
18535 echo "$as_me:18535: result: $ac_cv_header_dmalloc_h" >&5
18536 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18537 if test "$ac_cv_header_dmalloc_h" = yes; then
18538
18539 echo "$as_me:18539: checking for dmalloc_debug in -ldmalloc" >&5
18540 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18541 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18542   echo $ECHO_N "(cached) $ECHO_C" >&6
18543 else
18544   ac_check_lib_save_LIBS=$LIBS
18545 LIBS="-ldmalloc  $LIBS"
18546 cat >"conftest.$ac_ext" <<_ACEOF
18547 #line 18547 "configure"
18548 #include "confdefs.h"
18549
18550 /* Override any gcc2 internal prototype to avoid an error.  */
18551 #ifdef __cplusplus
18552 extern "C"
18553 #endif
18554 /* We use char because int might match the return type of a gcc2
18555    builtin and then its argument prototype would still apply.  */
18556 char dmalloc_debug ();
18557 int
18558 main (void)
18559 {
18560 dmalloc_debug ();
18561   ;
18562   return 0;
18563 }
18564 _ACEOF
18565 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18566 if { (eval echo "$as_me:18566: \"$ac_link\"") >&5
18567   (eval $ac_link) 2>&5
18568   ac_status=$?
18569   echo "$as_me:18569: \$? = $ac_status" >&5
18570   (exit "$ac_status"); } &&
18571          { ac_try='test -s "conftest$ac_exeext"'
18572   { (eval echo "$as_me:18572: \"$ac_try\"") >&5
18573   (eval $ac_try) 2>&5
18574   ac_status=$?
18575   echo "$as_me:18575: \$? = $ac_status" >&5
18576   (exit "$ac_status"); }; }; then
18577   ac_cv_lib_dmalloc_dmalloc_debug=yes
18578 else
18579   echo "$as_me: failed program was:" >&5
18580 cat "conftest.$ac_ext" >&5
18581 ac_cv_lib_dmalloc_dmalloc_debug=no
18582 fi
18583 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18584 LIBS=$ac_check_lib_save_LIBS
18585 fi
18586 echo "$as_me:18586: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18587 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18588 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18589   cat >>confdefs.h <<EOF
18590 #define HAVE_LIBDMALLOC 1
18591 EOF
18592
18593   LIBS="-ldmalloc $LIBS"
18594
18595 fi
18596
18597 fi
18598
18599 fi
18600
18601 echo "$as_me:18601: checking if you want to use dbmalloc for testing" >&5
18602 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18603
18604 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18605 if test "${with_dbmalloc+set}" = set; then
18606   withval="$with_dbmalloc"
18607   case "x$withval" in
18608         (x|xno) ;;
18609         (*)
18610                 : "${with_cflags:=-g}"
18611                 : "${enable_leaks:=no}"
18612                 with_dbmalloc=yes
18613
18614 cat >>confdefs.h <<EOF
18615 #define USE_DBMALLOC 1
18616 EOF
18617
18618                 ;;
18619         esac
18620 else
18621   with_dbmalloc=
18622 fi;
18623 echo "$as_me:18623: result: ${with_dbmalloc:-no}" >&5
18624 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18625
18626 case ".$with_cflags" in
18627 (.*-g*)
18628         case .$CFLAGS in
18629         (.*-g*)
18630                 ;;
18631         (*)
18632
18633 cf_fix_cppflags=no
18634 cf_new_cflags=
18635 cf_new_cppflags=
18636 cf_new_extra_cppflags=
18637
18638 for cf_add_cflags in -g
18639 do
18640 case "$cf_fix_cppflags" in
18641 (no)
18642         case "$cf_add_cflags" in
18643         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18644                 case "$cf_add_cflags" in
18645                 (-D*)
18646                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18647
18648                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18649                                 && test -z "${cf_tst_cflags}" \
18650                                 && cf_fix_cppflags=yes
18651
18652                         if test "$cf_fix_cppflags" = yes ; then
18653
18654         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18655         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18656
18657                                 continue
18658                         elif test "${cf_tst_cflags}" = "\"'" ; then
18659
18660         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18661         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18662
18663                                 continue
18664                         fi
18665                         ;;
18666                 esac
18667                 case "$CPPFLAGS" in
18668                 (*$cf_add_cflags)
18669                         ;;
18670                 (*)
18671                         case "$cf_add_cflags" in
18672                         (-D*)
18673                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18674
18675 CPPFLAGS=`echo "$CPPFLAGS" | \
18676         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18677                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18678
18679                                 ;;
18680                         esac
18681
18682         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18683         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18684
18685                         ;;
18686                 esac
18687                 ;;
18688         (*)
18689
18690         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18691         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18692
18693                 ;;
18694         esac
18695         ;;
18696 (yes)
18697
18698         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18699         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18700
18701         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18702
18703         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18704                 && test -z "${cf_tst_cflags}" \
18705                 && cf_fix_cppflags=no
18706         ;;
18707 esac
18708 done
18709
18710 if test -n "$cf_new_cflags" ; then
18711
18712         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18713         CFLAGS="${CFLAGS}$cf_new_cflags"
18714
18715 fi
18716
18717 if test -n "$cf_new_cppflags" ; then
18718
18719         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18720         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18721
18722 fi
18723
18724 if test -n "$cf_new_extra_cppflags" ; then
18725
18726         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18727         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18728
18729 fi
18730
18731                 ;;
18732         esac
18733         ;;
18734 esac
18735
18736 if test "$with_dbmalloc" = yes ; then
18737         echo "$as_me:18737: checking for dbmalloc.h" >&5
18738 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18739 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18740   echo $ECHO_N "(cached) $ECHO_C" >&6
18741 else
18742   cat >"conftest.$ac_ext" <<_ACEOF
18743 #line 18743 "configure"
18744 #include "confdefs.h"
18745 #include <dbmalloc.h>
18746 _ACEOF
18747 if { (eval echo "$as_me:18747: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18748   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18749   ac_status=$?
18750   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18751   rm -f conftest.er1
18752   cat conftest.err >&5
18753   echo "$as_me:18753: \$? = $ac_status" >&5
18754   (exit "$ac_status"); } >/dev/null; then
18755   if test -s conftest.err; then
18756     ac_cpp_err=$ac_c_preproc_warn_flag
18757   else
18758     ac_cpp_err=
18759   fi
18760 else
18761   ac_cpp_err=yes
18762 fi
18763 if test -z "$ac_cpp_err"; then
18764   ac_cv_header_dbmalloc_h=yes
18765 else
18766   echo "$as_me: failed program was:" >&5
18767   cat "conftest.$ac_ext" >&5
18768   ac_cv_header_dbmalloc_h=no
18769 fi
18770 rm -f conftest.err "conftest.$ac_ext"
18771 fi
18772 echo "$as_me:18772: result: $ac_cv_header_dbmalloc_h" >&5
18773 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18774 if test "$ac_cv_header_dbmalloc_h" = yes; then
18775
18776 echo "$as_me:18776: checking for debug_malloc in -ldbmalloc" >&5
18777 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18778 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18779   echo $ECHO_N "(cached) $ECHO_C" >&6
18780 else
18781   ac_check_lib_save_LIBS=$LIBS
18782 LIBS="-ldbmalloc  $LIBS"
18783 cat >"conftest.$ac_ext" <<_ACEOF
18784 #line 18784 "configure"
18785 #include "confdefs.h"
18786
18787 /* Override any gcc2 internal prototype to avoid an error.  */
18788 #ifdef __cplusplus
18789 extern "C"
18790 #endif
18791 /* We use char because int might match the return type of a gcc2
18792    builtin and then its argument prototype would still apply.  */
18793 char debug_malloc ();
18794 int
18795 main (void)
18796 {
18797 debug_malloc ();
18798   ;
18799   return 0;
18800 }
18801 _ACEOF
18802 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18803 if { (eval echo "$as_me:18803: \"$ac_link\"") >&5
18804   (eval $ac_link) 2>&5
18805   ac_status=$?
18806   echo "$as_me:18806: \$? = $ac_status" >&5
18807   (exit "$ac_status"); } &&
18808          { ac_try='test -s "conftest$ac_exeext"'
18809   { (eval echo "$as_me:18809: \"$ac_try\"") >&5
18810   (eval $ac_try) 2>&5
18811   ac_status=$?
18812   echo "$as_me:18812: \$? = $ac_status" >&5
18813   (exit "$ac_status"); }; }; then
18814   ac_cv_lib_dbmalloc_debug_malloc=yes
18815 else
18816   echo "$as_me: failed program was:" >&5
18817 cat "conftest.$ac_ext" >&5
18818 ac_cv_lib_dbmalloc_debug_malloc=no
18819 fi
18820 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18821 LIBS=$ac_check_lib_save_LIBS
18822 fi
18823 echo "$as_me:18823: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18824 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18825 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18826   cat >>confdefs.h <<EOF
18827 #define HAVE_LIBDBMALLOC 1
18828 EOF
18829
18830   LIBS="-ldbmalloc $LIBS"
18831
18832 fi
18833
18834 fi
18835
18836 fi
18837
18838 echo "$as_me:18838: checking if you want to use valgrind for testing" >&5
18839 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18840
18841 # Check whether --with-valgrind or --without-valgrind was given.
18842 if test "${with_valgrind+set}" = set; then
18843   withval="$with_valgrind"
18844   case "x$withval" in
18845         (x|xno) ;;
18846         (*)
18847                 : "${with_cflags:=-g}"
18848                 : "${enable_leaks:=no}"
18849                 with_valgrind=yes
18850
18851 cat >>confdefs.h <<EOF
18852 #define USE_VALGRIND 1
18853 EOF
18854
18855                 ;;
18856         esac
18857 else
18858   with_valgrind=
18859 fi;
18860 echo "$as_me:18860: result: ${with_valgrind:-no}" >&5
18861 echo "${ECHO_T}${with_valgrind:-no}" >&6
18862
18863 case ".$with_cflags" in
18864 (.*-g*)
18865         case .$CFLAGS in
18866         (.*-g*)
18867                 ;;
18868         (*)
18869
18870 cf_fix_cppflags=no
18871 cf_new_cflags=
18872 cf_new_cppflags=
18873 cf_new_extra_cppflags=
18874
18875 for cf_add_cflags in -g
18876 do
18877 case "$cf_fix_cppflags" in
18878 (no)
18879         case "$cf_add_cflags" in
18880         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18881                 case "$cf_add_cflags" in
18882                 (-D*)
18883                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18884
18885                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18886                                 && test -z "${cf_tst_cflags}" \
18887                                 && cf_fix_cppflags=yes
18888
18889                         if test "$cf_fix_cppflags" = yes ; then
18890
18891         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18892         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18893
18894                                 continue
18895                         elif test "${cf_tst_cflags}" = "\"'" ; then
18896
18897         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18898         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18899
18900                                 continue
18901                         fi
18902                         ;;
18903                 esac
18904                 case "$CPPFLAGS" in
18905                 (*$cf_add_cflags)
18906                         ;;
18907                 (*)
18908                         case "$cf_add_cflags" in
18909                         (-D*)
18910                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18911
18912 CPPFLAGS=`echo "$CPPFLAGS" | \
18913         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18914                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18915
18916                                 ;;
18917                         esac
18918
18919         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18920         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18921
18922                         ;;
18923                 esac
18924                 ;;
18925         (*)
18926
18927         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18928         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18929
18930                 ;;
18931         esac
18932         ;;
18933 (yes)
18934
18935         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18936         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18937
18938         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18939
18940         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18941                 && test -z "${cf_tst_cflags}" \
18942                 && cf_fix_cppflags=no
18943         ;;
18944 esac
18945 done
18946
18947 if test -n "$cf_new_cflags" ; then
18948
18949         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18950         CFLAGS="${CFLAGS}$cf_new_cflags"
18951
18952 fi
18953
18954 if test -n "$cf_new_cppflags" ; then
18955
18956         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18957         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18958
18959 fi
18960
18961 if test -n "$cf_new_extra_cppflags" ; then
18962
18963         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18964         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18965
18966 fi
18967
18968                 ;;
18969         esac
18970         ;;
18971 esac
18972
18973 echo "$as_me:18973: checking if you want to perform memory-leak testing" >&5
18974 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18975
18976 # Check whether --enable-leaks or --disable-leaks was given.
18977 if test "${enable_leaks+set}" = set; then
18978   enableval="$enable_leaks"
18979   enable_leaks=$enableval
18980 else
18981   enable_leaks=yes
18982 fi;
18983 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18984 echo "$as_me:18984: result: $with_no_leaks" >&5
18985 echo "${ECHO_T}$with_no_leaks" >&6
18986
18987 if test "$enable_leaks" = no ; then
18988
18989 cat >>confdefs.h <<\EOF
18990 #define NO_LEAKS 1
18991 EOF
18992
18993 cat >>confdefs.h <<\EOF
18994 #define YY_NO_LEAKS 1
18995 EOF
18996
18997 fi
18998
18999 cat >>confdefs.h <<\EOF
19000 #define HAVE_NC_ALLOC_H 1
19001 EOF
19002
19003 ###     use option --enable-expanded to generate certain macros as functions
19004
19005 # Check whether --enable-expanded or --disable-expanded was given.
19006 if test "${enable_expanded+set}" = set; then
19007   enableval="$enable_expanded"
19008   test "x$enableval" = xyes &&
19009 cat >>confdefs.h <<\EOF
19010 #define NCURSES_EXPANDED 1
19011 EOF
19012
19013 fi;
19014
19015 ###     use option --disable-macros to suppress macros in favor of functions
19016
19017 # Check whether --enable-macros or --disable-macros was given.
19018 if test "${enable_macros+set}" = set; then
19019   enableval="$enable_macros"
19020   test "$enableval" = no &&
19021 cat >>confdefs.h <<\EOF
19022 #define NCURSES_NOMACROS 1
19023 EOF
19024
19025 fi;
19026
19027 # Normally we only add trace() to the debug-library.  Allow this to be
19028 # extended to all models of the ncurses library:
19029 cf_all_traces=no
19030 case "$CFLAGS $CPPFLAGS" in
19031 (*-DTRACE*)
19032         cf_all_traces=yes
19033         ;;
19034 esac
19035
19036 echo "$as_me:19036: checking whether to add trace feature to all models" >&5
19037 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
19038
19039 # Check whether --with-trace or --without-trace was given.
19040 if test "${with_trace+set}" = set; then
19041   withval="$with_trace"
19042   cf_with_trace=$withval
19043 else
19044   cf_with_trace=$cf_all_traces
19045 fi;
19046 echo "$as_me:19046: result: $cf_with_trace" >&5
19047 echo "${ECHO_T}$cf_with_trace" >&6
19048
19049 if test "x$cf_with_trace" = xyes ; then
19050         LIB_TRACING=all
19051         ADA_TRACE=TRUE
19052
19053 cf_fix_cppflags=no
19054 cf_new_cflags=
19055 cf_new_cppflags=
19056 cf_new_extra_cppflags=
19057
19058 for cf_add_cflags in -DTRACE
19059 do
19060 case "$cf_fix_cppflags" in
19061 (no)
19062         case "$cf_add_cflags" in
19063         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19064                 case "$cf_add_cflags" in
19065                 (-D*)
19066                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19067
19068                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19069                                 && test -z "${cf_tst_cflags}" \
19070                                 && cf_fix_cppflags=yes
19071
19072                         if test "$cf_fix_cppflags" = yes ; then
19073
19074         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19075         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19076
19077                                 continue
19078                         elif test "${cf_tst_cflags}" = "\"'" ; then
19079
19080         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19081         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19082
19083                                 continue
19084                         fi
19085                         ;;
19086                 esac
19087                 case "$CPPFLAGS" in
19088                 (*$cf_add_cflags)
19089                         ;;
19090                 (*)
19091                         case "$cf_add_cflags" in
19092                         (-D*)
19093                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19094
19095 CPPFLAGS=`echo "$CPPFLAGS" | \
19096         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
19097                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
19098
19099                                 ;;
19100                         esac
19101
19102         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19103         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19104
19105                         ;;
19106                 esac
19107                 ;;
19108         (*)
19109
19110         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19111         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19112
19113                 ;;
19114         esac
19115         ;;
19116 (yes)
19117
19118         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19119         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19120
19121         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19122
19123         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19124                 && test -z "${cf_tst_cflags}" \
19125                 && cf_fix_cppflags=no
19126         ;;
19127 esac
19128 done
19129
19130 if test -n "$cf_new_cflags" ; then
19131
19132         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19133         CFLAGS="${CFLAGS}$cf_new_cflags"
19134
19135 fi
19136
19137 if test -n "$cf_new_cppflags" ; then
19138
19139         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19140         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19141
19142 fi
19143
19144 if test -n "$cf_new_extra_cppflags" ; then
19145
19146         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19147         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19148
19149 fi
19150
19151 cat >>confdefs.h <<\EOF
19152 #define HAVE__TRACEF 1
19153 EOF
19154
19155 else
19156         LIB_TRACING=DEBUG
19157         ADA_TRACE=FALSE
19158 fi
19159
19160 echo "$as_me:19160: checking if we want to use GNAT projects" >&5
19161 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
19162
19163 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
19164 if test "${enable_gnat_projects+set}" = set; then
19165   enableval="$enable_gnat_projects"
19166   test "$enableval" != no && enableval=yes
19167         if test "$enableval" != "yes" ; then
19168     enable_gnat_projects=no
19169         else
19170                 enable_gnat_projects=yes
19171         fi
19172 else
19173   enableval=yes
19174         enable_gnat_projects=yes
19175
19176 fi;
19177 echo "$as_me:19177: result: $enable_gnat_projects" >&5
19178 echo "${ECHO_T}$enable_gnat_projects" >&6
19179
19180 ###     Checks for libraries.
19181 case "$cf_cv_system_name" in
19182 (*mingw32*|*mingw64*)
19183         # Note: WINVER may be a problem with Windows 10
19184         if test "x$with_exp_win32" = xyes ; then
19185                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
19186         else
19187                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
19188         fi
19189
19190 echo "$as_me:19190: checking if ssp library is needed" >&5
19191 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
19192 if test "${cf_cv_need_libssp+set}" = set; then
19193   echo $ECHO_N "(cached) $ECHO_C" >&6
19194 else
19195
19196 cat >"conftest.$ac_ext" <<_ACEOF
19197 #line 19197 "configure"
19198 #include "confdefs.h"
19199
19200 #include <sys/types.h>
19201 #include <dirent.h>
19202
19203 int
19204 main (void)
19205 {
19206
19207        DIR *dp = opendir(".");
19208
19209   ;
19210   return 0;
19211 }
19212 _ACEOF
19213 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19214 if { (eval echo "$as_me:19214: \"$ac_link\"") >&5
19215   (eval $ac_link) 2>&5
19216   ac_status=$?
19217   echo "$as_me:19217: \$? = $ac_status" >&5
19218   (exit "$ac_status"); } &&
19219          { ac_try='test -s "conftest$ac_exeext"'
19220   { (eval echo "$as_me:19220: \"$ac_try\"") >&5
19221   (eval $ac_try) 2>&5
19222   ac_status=$?
19223   echo "$as_me:19223: \$? = $ac_status" >&5
19224   (exit "$ac_status"); }; }; then
19225   cf_cv_need_libssp=no
19226 else
19227   echo "$as_me: failed program was:" >&5
19228 cat "conftest.$ac_ext" >&5
19229
19230         cf_save_LIBS="$LIBS"
19231         LIBS="$LIBS -lssp"
19232         cat >"conftest.$ac_ext" <<_ACEOF
19233 #line 19233 "configure"
19234 #include "confdefs.h"
19235
19236 #include <sys/types.h>
19237 #include <dirent.h>
19238
19239 int
19240 main (void)
19241 {
19242
19243                    DIR *dp = opendir(".");
19244
19245   ;
19246   return 0;
19247 }
19248 _ACEOF
19249 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19250 if { (eval echo "$as_me:19250: \"$ac_link\"") >&5
19251   (eval $ac_link) 2>&5
19252   ac_status=$?
19253   echo "$as_me:19253: \$? = $ac_status" >&5
19254   (exit "$ac_status"); } &&
19255          { ac_try='test -s "conftest$ac_exeext"'
19256   { (eval echo "$as_me:19256: \"$ac_try\"") >&5
19257   (eval $ac_try) 2>&5
19258   ac_status=$?
19259   echo "$as_me:19259: \$? = $ac_status" >&5
19260   (exit "$ac_status"); }; }; then
19261   cf_cv_need_libssp=yes
19262 else
19263   echo "$as_me: failed program was:" >&5
19264 cat "conftest.$ac_ext" >&5
19265 cf_cv_need_libssp=maybe
19266 fi
19267 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19268         LIBS="$cf_save_LIBS"
19269
19270 fi
19271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19272 fi
19273 echo "$as_me:19273: result: $cf_cv_need_libssp" >&5
19274 echo "${ECHO_T}$cf_cv_need_libssp" >&6
19275
19276 if test "x$cf_cv_need_libssp" = xyes
19277 then
19278
19279 cf_add_libs="$LIBS"
19280 # reverse order
19281 cf_add_0lib=
19282 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19283 # filter duplicates
19284 for cf_add_1lib in $cf_add_0lib; do
19285         for cf_add_2lib in $cf_add_libs; do
19286                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19287                         cf_add_1lib=
19288                         break
19289                 fi
19290         done
19291         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19292 done
19293 LIBS="$cf_add_libs"
19294
19295 fi
19296
19297         ;;
19298 (*)
19299         ;;
19300 esac
19301
19302 echo "$as_me:19302: checking if -lm needed for math functions" >&5
19303 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
19304 if test "${cf_cv_need_libm+set}" = set; then
19305   echo $ECHO_N "(cached) $ECHO_C" >&6
19306 else
19307
19308         cat >"conftest.$ac_ext" <<_ACEOF
19309 #line 19309 "configure"
19310 #include "confdefs.h"
19311
19312                 #include <stdio.h>
19313                 #include <stdlib.h>
19314                 #include <math.h>
19315
19316 int
19317 main (void)
19318 {
19319 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19320   ;
19321   return 0;
19322 }
19323 _ACEOF
19324 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19325 if { (eval echo "$as_me:19325: \"$ac_link\"") >&5
19326   (eval $ac_link) 2>&5
19327   ac_status=$?
19328   echo "$as_me:19328: \$? = $ac_status" >&5
19329   (exit "$ac_status"); } &&
19330          { ac_try='test -s "conftest$ac_exeext"'
19331   { (eval echo "$as_me:19331: \"$ac_try\"") >&5
19332   (eval $ac_try) 2>&5
19333   ac_status=$?
19334   echo "$as_me:19334: \$? = $ac_status" >&5
19335   (exit "$ac_status"); }; }; then
19336   cf_cv_need_libm=no
19337 else
19338   echo "$as_me: failed program was:" >&5
19339 cat "conftest.$ac_ext" >&5
19340 cf_cv_need_libm=yes
19341 fi
19342 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19343 fi
19344 echo "$as_me:19344: result: $cf_cv_need_libm" >&5
19345 echo "${ECHO_T}$cf_cv_need_libm" >&6
19346
19347 if test "$cf_cv_need_libm" = yes
19348 then
19349
19350         cf_save_LIBS="$LIBS"
19351         LIBS="$LIBS -lm"
19352         echo "$as_me:19352: checking if -lm is available for math functions" >&5
19353 echo $ECHO_N "checking if -lm is available for math functions... $ECHO_C" >&6
19354 if test "${cf_cv_have_libm+set}" = set; then
19355   echo $ECHO_N "(cached) $ECHO_C" >&6
19356 else
19357
19358         cat >"conftest.$ac_ext" <<_ACEOF
19359 #line 19359 "configure"
19360 #include "confdefs.h"
19361
19362                 #include <stdio.h>
19363                 #include <stdlib.h>
19364                 #include <math.h>
19365
19366 int
19367 main (void)
19368 {
19369 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
19370   ;
19371   return 0;
19372 }
19373 _ACEOF
19374 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19375 if { (eval echo "$as_me:19375: \"$ac_link\"") >&5
19376   (eval $ac_link) 2>&5
19377   ac_status=$?
19378   echo "$as_me:19378: \$? = $ac_status" >&5
19379   (exit "$ac_status"); } &&
19380          { ac_try='test -s "conftest$ac_exeext"'
19381   { (eval echo "$as_me:19381: \"$ac_try\"") >&5
19382   (eval $ac_try) 2>&5
19383   ac_status=$?
19384   echo "$as_me:19384: \$? = $ac_status" >&5
19385   (exit "$ac_status"); }; }; then
19386   cf_cv_have_libm=yes
19387 else
19388   echo "$as_me: failed program was:" >&5
19389 cat "conftest.$ac_ext" >&5
19390 cf_cv_have_libm=no
19391 fi
19392 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19393 fi
19394 echo "$as_me:19394: result: $cf_cv_have_libm" >&5
19395 echo "${ECHO_T}$cf_cv_have_libm" >&6
19396         LIBS="$cf_save_LIBS"
19397
19398         if test "$cf_cv_have_libm" = yes
19399         then
19400                 MATH_LIB=-lm
19401         fi
19402 else
19403         cf_cv_have_libm=yes
19404 fi
19405
19406 if test "$cf_cv_have_libm" = yes
19407 then
19408
19409 cat >>confdefs.h <<\EOF
19410 #define HAVE_MATH_FUNCS 1
19411 EOF
19412
19413 fi
19414
19415 ###     Checks for header files.
19416 echo "$as_me:19416: checking whether time.h and sys/time.h may both be included" >&5
19417 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19418 if test "${ac_cv_header_time+set}" = set; then
19419   echo $ECHO_N "(cached) $ECHO_C" >&6
19420 else
19421   cat >"conftest.$ac_ext" <<_ACEOF
19422 #line 19422 "configure"
19423 #include "confdefs.h"
19424 #include <sys/types.h>
19425 #include <sys/time.h>
19426 #include <time.h>
19427
19428 int
19429 main (void)
19430 {
19431 if ((struct tm *) 0)
19432 return 0;
19433   ;
19434   return 0;
19435 }
19436 _ACEOF
19437 rm -f "conftest.$ac_objext"
19438 if { (eval echo "$as_me:19438: \"$ac_compile\"") >&5
19439   (eval $ac_compile) 2>&5
19440   ac_status=$?
19441   echo "$as_me:19441: \$? = $ac_status" >&5
19442   (exit "$ac_status"); } &&
19443          { ac_try='test -s "conftest.$ac_objext"'
19444   { (eval echo "$as_me:19444: \"$ac_try\"") >&5
19445   (eval $ac_try) 2>&5
19446   ac_status=$?
19447   echo "$as_me:19447: \$? = $ac_status" >&5
19448   (exit "$ac_status"); }; }; then
19449   ac_cv_header_time=yes
19450 else
19451   echo "$as_me: failed program was:" >&5
19452 cat "conftest.$ac_ext" >&5
19453 ac_cv_header_time=no
19454 fi
19455 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19456 fi
19457 echo "$as_me:19457: result: $ac_cv_header_time" >&5
19458 echo "${ECHO_T}$ac_cv_header_time" >&6
19459 if test $ac_cv_header_time = yes; then
19460
19461 cat >>confdefs.h <<\EOF
19462 #define TIME_WITH_SYS_TIME 1
19463 EOF
19464
19465 fi
19466
19467 cf_regex_func=no
19468 cf_regex_libs=
19469 case "$host_os" in
19470 (mingw*)
19471         # -lsystre -ltre -lintl -liconv
19472         echo "$as_me:19472: checking for regcomp in -lsystre" >&5
19473 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19474 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19475   echo $ECHO_N "(cached) $ECHO_C" >&6
19476 else
19477   ac_check_lib_save_LIBS=$LIBS
19478 LIBS="-lsystre  $LIBS"
19479 cat >"conftest.$ac_ext" <<_ACEOF
19480 #line 19480 "configure"
19481 #include "confdefs.h"
19482
19483 /* Override any gcc2 internal prototype to avoid an error.  */
19484 #ifdef __cplusplus
19485 extern "C"
19486 #endif
19487 /* We use char because int might match the return type of a gcc2
19488    builtin and then its argument prototype would still apply.  */
19489 char regcomp ();
19490 int
19491 main (void)
19492 {
19493 regcomp ();
19494   ;
19495   return 0;
19496 }
19497 _ACEOF
19498 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19499 if { (eval echo "$as_me:19499: \"$ac_link\"") >&5
19500   (eval $ac_link) 2>&5
19501   ac_status=$?
19502   echo "$as_me:19502: \$? = $ac_status" >&5
19503   (exit "$ac_status"); } &&
19504          { ac_try='test -s "conftest$ac_exeext"'
19505   { (eval echo "$as_me:19505: \"$ac_try\"") >&5
19506   (eval $ac_try) 2>&5
19507   ac_status=$?
19508   echo "$as_me:19508: \$? = $ac_status" >&5
19509   (exit "$ac_status"); }; }; then
19510   ac_cv_lib_systre_regcomp=yes
19511 else
19512   echo "$as_me: failed program was:" >&5
19513 cat "conftest.$ac_ext" >&5
19514 ac_cv_lib_systre_regcomp=no
19515 fi
19516 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19517 LIBS=$ac_check_lib_save_LIBS
19518 fi
19519 echo "$as_me:19519: result: $ac_cv_lib_systre_regcomp" >&5
19520 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19521 if test "$ac_cv_lib_systre_regcomp" = yes; then
19522
19523                 echo "$as_me:19523: checking for libiconv_open in -liconv" >&5
19524 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19525 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19526   echo $ECHO_N "(cached) $ECHO_C" >&6
19527 else
19528   ac_check_lib_save_LIBS=$LIBS
19529 LIBS="-liconv  $LIBS"
19530 cat >"conftest.$ac_ext" <<_ACEOF
19531 #line 19531 "configure"
19532 #include "confdefs.h"
19533
19534 /* Override any gcc2 internal prototype to avoid an error.  */
19535 #ifdef __cplusplus
19536 extern "C"
19537 #endif
19538 /* We use char because int might match the return type of a gcc2
19539    builtin and then its argument prototype would still apply.  */
19540 char libiconv_open ();
19541 int
19542 main (void)
19543 {
19544 libiconv_open ();
19545   ;
19546   return 0;
19547 }
19548 _ACEOF
19549 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19550 if { (eval echo "$as_me:19550: \"$ac_link\"") >&5
19551   (eval $ac_link) 2>&5
19552   ac_status=$?
19553   echo "$as_me:19553: \$? = $ac_status" >&5
19554   (exit "$ac_status"); } &&
19555          { ac_try='test -s "conftest$ac_exeext"'
19556   { (eval echo "$as_me:19556: \"$ac_try\"") >&5
19557   (eval $ac_try) 2>&5
19558   ac_status=$?
19559   echo "$as_me:19559: \$? = $ac_status" >&5
19560   (exit "$ac_status"); }; }; then
19561   ac_cv_lib_iconv_libiconv_open=yes
19562 else
19563   echo "$as_me: failed program was:" >&5
19564 cat "conftest.$ac_ext" >&5
19565 ac_cv_lib_iconv_libiconv_open=no
19566 fi
19567 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19568 LIBS=$ac_check_lib_save_LIBS
19569 fi
19570 echo "$as_me:19570: result: $ac_cv_lib_iconv_libiconv_open" >&5
19571 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19572 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19573
19574 cf_add_libs="$LIBS"
19575 # reverse order
19576 cf_add_0lib=
19577 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19578 # filter duplicates
19579 for cf_add_1lib in $cf_add_0lib; do
19580         for cf_add_2lib in $cf_add_libs; do
19581                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19582                         cf_add_1lib=
19583                         break
19584                 fi
19585         done
19586         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19587 done
19588 LIBS="$cf_add_libs"
19589
19590 fi
19591
19592                 echo "$as_me:19592: checking for libintl_gettext in -lintl" >&5
19593 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19594 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19595   echo $ECHO_N "(cached) $ECHO_C" >&6
19596 else
19597   ac_check_lib_save_LIBS=$LIBS
19598 LIBS="-lintl  $LIBS"
19599 cat >"conftest.$ac_ext" <<_ACEOF
19600 #line 19600 "configure"
19601 #include "confdefs.h"
19602
19603 /* Override any gcc2 internal prototype to avoid an error.  */
19604 #ifdef __cplusplus
19605 extern "C"
19606 #endif
19607 /* We use char because int might match the return type of a gcc2
19608    builtin and then its argument prototype would still apply.  */
19609 char libintl_gettext ();
19610 int
19611 main (void)
19612 {
19613 libintl_gettext ();
19614   ;
19615   return 0;
19616 }
19617 _ACEOF
19618 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19619 if { (eval echo "$as_me:19619: \"$ac_link\"") >&5
19620   (eval $ac_link) 2>&5
19621   ac_status=$?
19622   echo "$as_me:19622: \$? = $ac_status" >&5
19623   (exit "$ac_status"); } &&
19624          { ac_try='test -s "conftest$ac_exeext"'
19625   { (eval echo "$as_me:19625: \"$ac_try\"") >&5
19626   (eval $ac_try) 2>&5
19627   ac_status=$?
19628   echo "$as_me:19628: \$? = $ac_status" >&5
19629   (exit "$ac_status"); }; }; then
19630   ac_cv_lib_intl_libintl_gettext=yes
19631 else
19632   echo "$as_me: failed program was:" >&5
19633 cat "conftest.$ac_ext" >&5
19634 ac_cv_lib_intl_libintl_gettext=no
19635 fi
19636 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19637 LIBS=$ac_check_lib_save_LIBS
19638 fi
19639 echo "$as_me:19639: result: $ac_cv_lib_intl_libintl_gettext" >&5
19640 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19641 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19642
19643 cf_add_libs="$LIBS"
19644 # reverse order
19645 cf_add_0lib=
19646 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19647 # filter duplicates
19648 for cf_add_1lib in $cf_add_0lib; do
19649         for cf_add_2lib in $cf_add_libs; do
19650                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19651                         cf_add_1lib=
19652                         break
19653                 fi
19654         done
19655         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19656 done
19657 LIBS="$cf_add_libs"
19658
19659 fi
19660
19661                 echo "$as_me:19661: checking for tre_regcomp in -ltre" >&5
19662 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19663 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19664   echo $ECHO_N "(cached) $ECHO_C" >&6
19665 else
19666   ac_check_lib_save_LIBS=$LIBS
19667 LIBS="-ltre  $LIBS"
19668 cat >"conftest.$ac_ext" <<_ACEOF
19669 #line 19669 "configure"
19670 #include "confdefs.h"
19671
19672 /* Override any gcc2 internal prototype to avoid an error.  */
19673 #ifdef __cplusplus
19674 extern "C"
19675 #endif
19676 /* We use char because int might match the return type of a gcc2
19677    builtin and then its argument prototype would still apply.  */
19678 char tre_regcomp ();
19679 int
19680 main (void)
19681 {
19682 tre_regcomp ();
19683   ;
19684   return 0;
19685 }
19686 _ACEOF
19687 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19688 if { (eval echo "$as_me:19688: \"$ac_link\"") >&5
19689   (eval $ac_link) 2>&5
19690   ac_status=$?
19691   echo "$as_me:19691: \$? = $ac_status" >&5
19692   (exit "$ac_status"); } &&
19693          { ac_try='test -s "conftest$ac_exeext"'
19694   { (eval echo "$as_me:19694: \"$ac_try\"") >&5
19695   (eval $ac_try) 2>&5
19696   ac_status=$?
19697   echo "$as_me:19697: \$? = $ac_status" >&5
19698   (exit "$ac_status"); }; }; then
19699   ac_cv_lib_tre_tre_regcomp=yes
19700 else
19701   echo "$as_me: failed program was:" >&5
19702 cat "conftest.$ac_ext" >&5
19703 ac_cv_lib_tre_tre_regcomp=no
19704 fi
19705 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19706 LIBS=$ac_check_lib_save_LIBS
19707 fi
19708 echo "$as_me:19708: result: $ac_cv_lib_tre_tre_regcomp" >&5
19709 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19710 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19711
19712 cf_add_libs="$LIBS"
19713 # reverse order
19714 cf_add_0lib=
19715 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19716 # filter duplicates
19717 for cf_add_1lib in $cf_add_0lib; do
19718         for cf_add_2lib in $cf_add_libs; do
19719                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19720                         cf_add_1lib=
19721                         break
19722                 fi
19723         done
19724         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19725 done
19726 LIBS="$cf_add_libs"
19727
19728 fi
19729
19730 cf_add_libs="$LIBS"
19731 # reverse order
19732 cf_add_0lib=
19733 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19734 # filter duplicates
19735 for cf_add_1lib in $cf_add_0lib; do
19736         for cf_add_2lib in $cf_add_libs; do
19737                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19738                         cf_add_1lib=
19739                         break
19740                 fi
19741         done
19742         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19743 done
19744 LIBS="$cf_add_libs"
19745
19746                 cf_regex_func=regcomp
19747
19748 else
19749
19750                 echo "$as_me:19750: checking for regcomp in -lgnurx" >&5
19751 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19752 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19753   echo $ECHO_N "(cached) $ECHO_C" >&6
19754 else
19755   ac_check_lib_save_LIBS=$LIBS
19756 LIBS="-lgnurx  $LIBS"
19757 cat >"conftest.$ac_ext" <<_ACEOF
19758 #line 19758 "configure"
19759 #include "confdefs.h"
19760
19761 /* Override any gcc2 internal prototype to avoid an error.  */
19762 #ifdef __cplusplus
19763 extern "C"
19764 #endif
19765 /* We use char because int might match the return type of a gcc2
19766    builtin and then its argument prototype would still apply.  */
19767 char regcomp ();
19768 int
19769 main (void)
19770 {
19771 regcomp ();
19772   ;
19773   return 0;
19774 }
19775 _ACEOF
19776 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19777 if { (eval echo "$as_me:19777: \"$ac_link\"") >&5
19778   (eval $ac_link) 2>&5
19779   ac_status=$?
19780   echo "$as_me:19780: \$? = $ac_status" >&5
19781   (exit "$ac_status"); } &&
19782          { ac_try='test -s "conftest$ac_exeext"'
19783   { (eval echo "$as_me:19783: \"$ac_try\"") >&5
19784   (eval $ac_try) 2>&5
19785   ac_status=$?
19786   echo "$as_me:19786: \$? = $ac_status" >&5
19787   (exit "$ac_status"); }; }; then
19788   ac_cv_lib_gnurx_regcomp=yes
19789 else
19790   echo "$as_me: failed program was:" >&5
19791 cat "conftest.$ac_ext" >&5
19792 ac_cv_lib_gnurx_regcomp=no
19793 fi
19794 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19795 LIBS=$ac_check_lib_save_LIBS
19796 fi
19797 echo "$as_me:19797: result: $ac_cv_lib_gnurx_regcomp" >&5
19798 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19799 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19800
19801 cf_add_libs="$LIBS"
19802 # reverse order
19803 cf_add_0lib=
19804 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19805 # filter duplicates
19806 for cf_add_1lib in $cf_add_0lib; do
19807         for cf_add_2lib in $cf_add_libs; do
19808                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19809                         cf_add_1lib=
19810                         break
19811                 fi
19812         done
19813         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19814 done
19815 LIBS="$cf_add_libs"
19816
19817                         cf_regex_func=regcomp
19818 fi
19819
19820 fi
19821
19822         ;;
19823 (*)
19824         cf_regex_libs="regex re"
19825         echo "$as_me:19825: checking for regcomp" >&5
19826 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19827 if test "${ac_cv_func_regcomp+set}" = set; then
19828   echo $ECHO_N "(cached) $ECHO_C" >&6
19829 else
19830   cat >"conftest.$ac_ext" <<_ACEOF
19831 #line 19831 "configure"
19832 #include "confdefs.h"
19833 #define regcomp autoconf_temporary
19834 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19835 #undef regcomp
19836
19837 #ifdef __cplusplus
19838 extern "C"
19839 #endif
19840
19841 /* We use char because int might match the return type of a gcc2
19842    builtin and then its argument prototype would still apply.  */
19843 char regcomp (void);
19844
19845 int
19846 main (void)
19847 {
19848
19849 /* The GNU C library defines stubs for functions which it implements
19850     to always fail with ENOSYS.  Some functions are actually named
19851     something starting with __ and the normal name is an alias.  */
19852 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19853 #error found stub for regcomp
19854 #endif
19855
19856         return regcomp ();
19857   ;
19858   return 0;
19859 }
19860 _ACEOF
19861 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19862 if { (eval echo "$as_me:19862: \"$ac_link\"") >&5
19863   (eval $ac_link) 2>&5
19864   ac_status=$?
19865   echo "$as_me:19865: \$? = $ac_status" >&5
19866   (exit "$ac_status"); } &&
19867          { ac_try='test -s "conftest$ac_exeext"'
19868   { (eval echo "$as_me:19868: \"$ac_try\"") >&5
19869   (eval $ac_try) 2>&5
19870   ac_status=$?
19871   echo "$as_me:19871: \$? = $ac_status" >&5
19872   (exit "$ac_status"); }; }; then
19873   ac_cv_func_regcomp=yes
19874 else
19875   echo "$as_me: failed program was:" >&5
19876 cat "conftest.$ac_ext" >&5
19877 ac_cv_func_regcomp=no
19878 fi
19879 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19880 fi
19881 echo "$as_me:19881: result: $ac_cv_func_regcomp" >&5
19882 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19883 if test "$ac_cv_func_regcomp" = yes; then
19884   cf_regex_func=regcomp
19885 else
19886
19887                 for cf_regex_lib in $cf_regex_libs
19888                 do
19889                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19890 echo "$as_me:19890: checking for regcomp in -l$cf_regex_lib" >&5
19891 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19892 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19893   echo $ECHO_N "(cached) $ECHO_C" >&6
19894 else
19895   ac_check_lib_save_LIBS=$LIBS
19896 LIBS="-l$cf_regex_lib  $LIBS"
19897 cat >"conftest.$ac_ext" <<_ACEOF
19898 #line 19898 "configure"
19899 #include "confdefs.h"
19900
19901 /* Override any gcc2 internal prototype to avoid an error.  */
19902 #ifdef __cplusplus
19903 extern "C"
19904 #endif
19905 /* We use char because int might match the return type of a gcc2
19906    builtin and then its argument prototype would still apply.  */
19907 char regcomp ();
19908 int
19909 main (void)
19910 {
19911 regcomp ();
19912   ;
19913   return 0;
19914 }
19915 _ACEOF
19916 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19917 if { (eval echo "$as_me:19917: \"$ac_link\"") >&5
19918   (eval $ac_link) 2>&5
19919   ac_status=$?
19920   echo "$as_me:19920: \$? = $ac_status" >&5
19921   (exit "$ac_status"); } &&
19922          { ac_try='test -s "conftest$ac_exeext"'
19923   { (eval echo "$as_me:19923: \"$ac_try\"") >&5
19924   (eval $ac_try) 2>&5
19925   ac_status=$?
19926   echo "$as_me:19926: \$? = $ac_status" >&5
19927   (exit "$ac_status"); }; }; then
19928   eval "$as_ac_Lib=yes"
19929 else
19930   echo "$as_me: failed program was:" >&5
19931 cat "conftest.$ac_ext" >&5
19932 eval "$as_ac_Lib=no"
19933 fi
19934 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19935 LIBS=$ac_check_lib_save_LIBS
19936 fi
19937 echo "$as_me:19937: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19938 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19939 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19940
19941 cf_add_libs="$LIBS"
19942 # reverse order
19943 cf_add_0lib=
19944 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19945 # filter duplicates
19946 for cf_add_1lib in $cf_add_0lib; do
19947         for cf_add_2lib in $cf_add_libs; do
19948                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19949                         cf_add_1lib=
19950                         break
19951                 fi
19952         done
19953         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19954 done
19955 LIBS="$cf_add_libs"
19956
19957                                         cf_regex_func=regcomp
19958                                         break
19959 fi
19960
19961                 done
19962
19963 fi
19964
19965         ;;
19966 esac
19967
19968 if test "$cf_regex_func" = no ; then
19969         echo "$as_me:19969: checking for compile" >&5
19970 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19971 if test "${ac_cv_func_compile+set}" = set; then
19972   echo $ECHO_N "(cached) $ECHO_C" >&6
19973 else
19974   cat >"conftest.$ac_ext" <<_ACEOF
19975 #line 19975 "configure"
19976 #include "confdefs.h"
19977 #define compile autoconf_temporary
19978 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19979 #undef compile
19980
19981 #ifdef __cplusplus
19982 extern "C"
19983 #endif
19984
19985 /* We use char because int might match the return type of a gcc2
19986    builtin and then its argument prototype would still apply.  */
19987 char compile (void);
19988
19989 int
19990 main (void)
19991 {
19992
19993 /* The GNU C library defines stubs for functions which it implements
19994     to always fail with ENOSYS.  Some functions are actually named
19995     something starting with __ and the normal name is an alias.  */
19996 #if defined (__stub_compile) || defined (__stub___compile)
19997 #error found stub for compile
19998 #endif
19999
20000         return compile ();
20001   ;
20002   return 0;
20003 }
20004 _ACEOF
20005 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20006 if { (eval echo "$as_me:20006: \"$ac_link\"") >&5
20007   (eval $ac_link) 2>&5
20008   ac_status=$?
20009   echo "$as_me:20009: \$? = $ac_status" >&5
20010   (exit "$ac_status"); } &&
20011          { ac_try='test -s "conftest$ac_exeext"'
20012   { (eval echo "$as_me:20012: \"$ac_try\"") >&5
20013   (eval $ac_try) 2>&5
20014   ac_status=$?
20015   echo "$as_me:20015: \$? = $ac_status" >&5
20016   (exit "$ac_status"); }; }; then
20017   ac_cv_func_compile=yes
20018 else
20019   echo "$as_me: failed program was:" >&5
20020 cat "conftest.$ac_ext" >&5
20021 ac_cv_func_compile=no
20022 fi
20023 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20024 fi
20025 echo "$as_me:20025: result: $ac_cv_func_compile" >&5
20026 echo "${ECHO_T}$ac_cv_func_compile" >&6
20027 if test "$ac_cv_func_compile" = yes; then
20028   cf_regex_func=compile
20029 else
20030
20031                 echo "$as_me:20031: checking for compile in -lgen" >&5
20032 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
20033 if test "${ac_cv_lib_gen_compile+set}" = set; then
20034   echo $ECHO_N "(cached) $ECHO_C" >&6
20035 else
20036   ac_check_lib_save_LIBS=$LIBS
20037 LIBS="-lgen  $LIBS"
20038 cat >"conftest.$ac_ext" <<_ACEOF
20039 #line 20039 "configure"
20040 #include "confdefs.h"
20041
20042 /* Override any gcc2 internal prototype to avoid an error.  */
20043 #ifdef __cplusplus
20044 extern "C"
20045 #endif
20046 /* We use char because int might match the return type of a gcc2
20047    builtin and then its argument prototype would still apply.  */
20048 char compile ();
20049 int
20050 main (void)
20051 {
20052 compile ();
20053   ;
20054   return 0;
20055 }
20056 _ACEOF
20057 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20058 if { (eval echo "$as_me:20058: \"$ac_link\"") >&5
20059   (eval $ac_link) 2>&5
20060   ac_status=$?
20061   echo "$as_me:20061: \$? = $ac_status" >&5
20062   (exit "$ac_status"); } &&
20063          { ac_try='test -s "conftest$ac_exeext"'
20064   { (eval echo "$as_me:20064: \"$ac_try\"") >&5
20065   (eval $ac_try) 2>&5
20066   ac_status=$?
20067   echo "$as_me:20067: \$? = $ac_status" >&5
20068   (exit "$ac_status"); }; }; then
20069   ac_cv_lib_gen_compile=yes
20070 else
20071   echo "$as_me: failed program was:" >&5
20072 cat "conftest.$ac_ext" >&5
20073 ac_cv_lib_gen_compile=no
20074 fi
20075 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20076 LIBS=$ac_check_lib_save_LIBS
20077 fi
20078 echo "$as_me:20078: result: $ac_cv_lib_gen_compile" >&5
20079 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
20080 if test "$ac_cv_lib_gen_compile" = yes; then
20081
20082 cf_add_libs="$LIBS"
20083 # reverse order
20084 cf_add_0lib=
20085 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20086 # filter duplicates
20087 for cf_add_1lib in $cf_add_0lib; do
20088         for cf_add_2lib in $cf_add_libs; do
20089                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20090                         cf_add_1lib=
20091                         break
20092                 fi
20093         done
20094         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20095 done
20096 LIBS="$cf_add_libs"
20097
20098                                 cf_regex_func=compile
20099 fi
20100
20101 fi
20102
20103 fi
20104
20105 if test "$cf_regex_func" = no ; then
20106         { echo "$as_me:20106: WARNING: cannot find regular expression library" >&5
20107 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
20108 fi
20109
20110 echo "$as_me:20110: checking for regular-expression headers" >&5
20111 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
20112 if test "${cf_cv_regex_hdrs+set}" = set; then
20113   echo $ECHO_N "(cached) $ECHO_C" >&6
20114 else
20115
20116 cf_cv_regex_hdrs=no
20117 case "$cf_regex_func" in
20118 (compile)
20119         for cf_regex_hdr in regexp.h regexpr.h
20120         do
20121                 cat >"conftest.$ac_ext" <<_ACEOF
20122 #line 20122 "configure"
20123 #include "confdefs.h"
20124 #include <$cf_regex_hdr>
20125 int
20126 main (void)
20127 {
20128
20129                         char *p = compile("", "", "", 0);
20130                         int x = step("", "");
20131                         (void)p;
20132                         (void)x;
20133
20134   ;
20135   return 0;
20136 }
20137 _ACEOF
20138 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20139 if { (eval echo "$as_me:20139: \"$ac_link\"") >&5
20140   (eval $ac_link) 2>&5
20141   ac_status=$?
20142   echo "$as_me:20142: \$? = $ac_status" >&5
20143   (exit "$ac_status"); } &&
20144          { ac_try='test -s "conftest$ac_exeext"'
20145   { (eval echo "$as_me:20145: \"$ac_try\"") >&5
20146   (eval $ac_try) 2>&5
20147   ac_status=$?
20148   echo "$as_me:20148: \$? = $ac_status" >&5
20149   (exit "$ac_status"); }; }; then
20150
20151                         cf_cv_regex_hdrs=$cf_regex_hdr
20152                         break
20153
20154 else
20155   echo "$as_me: failed program was:" >&5
20156 cat "conftest.$ac_ext" >&5
20157 fi
20158 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20159         done
20160         ;;
20161 (*)
20162         for cf_regex_hdr in regex.h
20163         do
20164                 cat >"conftest.$ac_ext" <<_ACEOF
20165 #line 20165 "configure"
20166 #include "confdefs.h"
20167 #include <sys/types.h>
20168 #include <$cf_regex_hdr>
20169 int
20170 main (void)
20171 {
20172
20173                         regex_t *p = 0;
20174                         int x = regcomp(p, "", 0);
20175                         int y = regexec(p, "", 0, 0, 0);
20176                         (void)x;
20177                         (void)y;
20178                         regfree(p);
20179
20180   ;
20181   return 0;
20182 }
20183 _ACEOF
20184 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20185 if { (eval echo "$as_me:20185: \"$ac_link\"") >&5
20186   (eval $ac_link) 2>&5
20187   ac_status=$?
20188   echo "$as_me:20188: \$? = $ac_status" >&5
20189   (exit "$ac_status"); } &&
20190          { ac_try='test -s "conftest$ac_exeext"'
20191   { (eval echo "$as_me:20191: \"$ac_try\"") >&5
20192   (eval $ac_try) 2>&5
20193   ac_status=$?
20194   echo "$as_me:20194: \$? = $ac_status" >&5
20195   (exit "$ac_status"); }; }; then
20196
20197                         cf_cv_regex_hdrs=$cf_regex_hdr
20198                         break
20199
20200 else
20201   echo "$as_me: failed program was:" >&5
20202 cat "conftest.$ac_ext" >&5
20203 fi
20204 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20205         done
20206         ;;
20207 esac
20208
20209 fi
20210 echo "$as_me:20210: result: $cf_cv_regex_hdrs" >&5
20211 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20212
20213 case "$cf_cv_regex_hdrs" in
20214         (no)            { echo "$as_me:20214: WARNING: no regular expression header found" >&5
20215 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20216         (regex.h)
20217 cat >>confdefs.h <<\EOF
20218 #define HAVE_REGEX_H_FUNCS 1
20219 EOF
20220  ;;
20221         (regexp.h)
20222 cat >>confdefs.h <<\EOF
20223 #define HAVE_REGEXP_H_FUNCS 1
20224 EOF
20225  ;;
20226         (regexpr.h)
20227 cat >>confdefs.h <<\EOF
20228 #define HAVE_REGEXPR_H_FUNCS 1
20229 EOF
20230  ;;
20231 esac
20232
20233 for ac_header in \
20234 fcntl.h \
20235 getopt.h \
20236 limits.h \
20237 locale.h \
20238 math.h \
20239 poll.h \
20240 sys/auxv.h \
20241 sys/ioctl.h \
20242 sys/param.h \
20243 sys/poll.h \
20244 sys/select.h \
20245 sys/time.h \
20246 sys/times.h \
20247 unistd.h \
20248 wctype.h \
20249
20250 do
20251 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20252 echo "$as_me:20252: checking for $ac_header" >&5
20253 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20254 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20255   echo $ECHO_N "(cached) $ECHO_C" >&6
20256 else
20257   cat >"conftest.$ac_ext" <<_ACEOF
20258 #line 20258 "configure"
20259 #include "confdefs.h"
20260 #include <$ac_header>
20261 _ACEOF
20262 if { (eval echo "$as_me:20262: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20263   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20264   ac_status=$?
20265   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20266   rm -f conftest.er1
20267   cat conftest.err >&5
20268   echo "$as_me:20268: \$? = $ac_status" >&5
20269   (exit "$ac_status"); } >/dev/null; then
20270   if test -s conftest.err; then
20271     ac_cpp_err=$ac_c_preproc_warn_flag
20272   else
20273     ac_cpp_err=
20274   fi
20275 else
20276   ac_cpp_err=yes
20277 fi
20278 if test -z "$ac_cpp_err"; then
20279   eval "$as_ac_Header=yes"
20280 else
20281   echo "$as_me: failed program was:" >&5
20282   cat "conftest.$ac_ext" >&5
20283   eval "$as_ac_Header=no"
20284 fi
20285 rm -f conftest.err "conftest.$ac_ext"
20286 fi
20287 echo "$as_me:20287: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20288 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20289 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20290   cat >>confdefs.h <<EOF
20291 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20292 EOF
20293
20294 fi
20295 done
20296
20297 for ac_header in unistd.h getopt.h
20298 do
20299 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20300 echo "$as_me:20300: checking for $ac_header" >&5
20301 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20302 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20303   echo $ECHO_N "(cached) $ECHO_C" >&6
20304 else
20305   cat >"conftest.$ac_ext" <<_ACEOF
20306 #line 20306 "configure"
20307 #include "confdefs.h"
20308 #include <$ac_header>
20309 _ACEOF
20310 if { (eval echo "$as_me:20310: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20311   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20312   ac_status=$?
20313   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20314   rm -f conftest.er1
20315   cat conftest.err >&5
20316   echo "$as_me:20316: \$? = $ac_status" >&5
20317   (exit "$ac_status"); } >/dev/null; then
20318   if test -s conftest.err; then
20319     ac_cpp_err=$ac_c_preproc_warn_flag
20320   else
20321     ac_cpp_err=
20322   fi
20323 else
20324   ac_cpp_err=yes
20325 fi
20326 if test -z "$ac_cpp_err"; then
20327   eval "$as_ac_Header=yes"
20328 else
20329   echo "$as_me: failed program was:" >&5
20330   cat "conftest.$ac_ext" >&5
20331   eval "$as_ac_Header=no"
20332 fi
20333 rm -f conftest.err "conftest.$ac_ext"
20334 fi
20335 echo "$as_me:20335: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20336 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20337 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20338   cat >>confdefs.h <<EOF
20339 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20340 EOF
20341
20342 fi
20343 done
20344
20345 echo "$as_me:20345: checking for header declaring getopt variables" >&5
20346 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20347 if test "${cf_cv_getopt_header+set}" = set; then
20348   echo $ECHO_N "(cached) $ECHO_C" >&6
20349 else
20350
20351 cf_cv_getopt_header=none
20352 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20353 do
20354 cat >"conftest.$ac_ext" <<_ACEOF
20355 #line 20355 "configure"
20356 #include "confdefs.h"
20357
20358 #include <$cf_header>
20359 int
20360 main (void)
20361 {
20362 int x = optind; char *y = optarg; (void)x; (void)y
20363   ;
20364   return 0;
20365 }
20366 _ACEOF
20367 rm -f "conftest.$ac_objext"
20368 if { (eval echo "$as_me:20368: \"$ac_compile\"") >&5
20369   (eval $ac_compile) 2>&5
20370   ac_status=$?
20371   echo "$as_me:20371: \$? = $ac_status" >&5
20372   (exit "$ac_status"); } &&
20373          { ac_try='test -s "conftest.$ac_objext"'
20374   { (eval echo "$as_me:20374: \"$ac_try\"") >&5
20375   (eval $ac_try) 2>&5
20376   ac_status=$?
20377   echo "$as_me:20377: \$? = $ac_status" >&5
20378   (exit "$ac_status"); }; }; then
20379   cf_cv_getopt_header=$cf_header
20380  break
20381 else
20382   echo "$as_me: failed program was:" >&5
20383 cat "conftest.$ac_ext" >&5
20384 fi
20385 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20386 done
20387
20388 fi
20389 echo "$as_me:20389: result: $cf_cv_getopt_header" >&5
20390 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20391 if test "$cf_cv_getopt_header" != none ; then
20392
20393 cat >>confdefs.h <<\EOF
20394 #define HAVE_GETOPT_HEADER 1
20395 EOF
20396
20397 fi
20398 if test "$cf_cv_getopt_header" = getopt.h ; then
20399
20400 cat >>confdefs.h <<\EOF
20401 #define NEED_GETOPT_H 1
20402 EOF
20403
20404 fi
20405
20406 echo "$as_me:20406: checking if external environ is declared" >&5
20407 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20408 if test "${cf_cv_dcl_environ+set}" = set; then
20409   echo $ECHO_N "(cached) $ECHO_C" >&6
20410 else
20411
20412     cat >"conftest.$ac_ext" <<_ACEOF
20413 #line 20413 "configure"
20414 #include "confdefs.h"
20415
20416 $ac_includes_default
20417 int
20418 main (void)
20419 {
20420 void* x = (void*) environ; (void)x
20421   ;
20422   return 0;
20423 }
20424 _ACEOF
20425 rm -f "conftest.$ac_objext"
20426 if { (eval echo "$as_me:20426: \"$ac_compile\"") >&5
20427   (eval $ac_compile) 2>&5
20428   ac_status=$?
20429   echo "$as_me:20429: \$? = $ac_status" >&5
20430   (exit "$ac_status"); } &&
20431          { ac_try='test -s "conftest.$ac_objext"'
20432   { (eval echo "$as_me:20432: \"$ac_try\"") >&5
20433   (eval $ac_try) 2>&5
20434   ac_status=$?
20435   echo "$as_me:20435: \$? = $ac_status" >&5
20436   (exit "$ac_status"); }; }; then
20437   cf_cv_dcl_environ=yes
20438 else
20439   echo "$as_me: failed program was:" >&5
20440 cat "conftest.$ac_ext" >&5
20441 cf_cv_dcl_environ=no
20442 fi
20443 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20444
20445 fi
20446 echo "$as_me:20446: result: $cf_cv_dcl_environ" >&5
20447 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20448
20449 if test "$cf_cv_dcl_environ" = no ; then
20450
20451 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20452
20453     cat >>confdefs.h <<EOF
20454 #define $cf_result 1
20455 EOF
20456
20457 fi
20458
20459 # It's possible (for near-UNIX clones) that the data doesn't exist
20460
20461 echo "$as_me:20461: checking if external environ exists" >&5
20462 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20463 if test "${cf_cv_have_environ+set}" = set; then
20464   echo $ECHO_N "(cached) $ECHO_C" >&6
20465 else
20466
20467         cat >"conftest.$ac_ext" <<_ACEOF
20468 #line 20468 "configure"
20469 #include "confdefs.h"
20470
20471 #undef environ
20472 extern int environ;
20473
20474 int
20475 main (void)
20476 {
20477 environ = 2
20478   ;
20479   return 0;
20480 }
20481 _ACEOF
20482 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20483 if { (eval echo "$as_me:20483: \"$ac_link\"") >&5
20484   (eval $ac_link) 2>&5
20485   ac_status=$?
20486   echo "$as_me:20486: \$? = $ac_status" >&5
20487   (exit "$ac_status"); } &&
20488          { ac_try='test -s "conftest$ac_exeext"'
20489   { (eval echo "$as_me:20489: \"$ac_try\"") >&5
20490   (eval $ac_try) 2>&5
20491   ac_status=$?
20492   echo "$as_me:20492: \$? = $ac_status" >&5
20493   (exit "$ac_status"); }; }; then
20494   cf_cv_have_environ=yes
20495 else
20496   echo "$as_me: failed program was:" >&5
20497 cat "conftest.$ac_ext" >&5
20498 cf_cv_have_environ=no
20499 fi
20500 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20501
20502 fi
20503 echo "$as_me:20503: result: $cf_cv_have_environ" >&5
20504 echo "${ECHO_T}$cf_cv_have_environ" >&6
20505
20506 if test "$cf_cv_have_environ" = yes ; then
20507
20508 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20509
20510         cat >>confdefs.h <<EOF
20511 #define $cf_result 1
20512 EOF
20513
20514 fi
20515
20516 echo "$as_me:20516: checking for getenv" >&5
20517 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20518 if test "${ac_cv_func_getenv+set}" = set; then
20519   echo $ECHO_N "(cached) $ECHO_C" >&6
20520 else
20521   cat >"conftest.$ac_ext" <<_ACEOF
20522 #line 20522 "configure"
20523 #include "confdefs.h"
20524 #define getenv autoconf_temporary
20525 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20526 #undef getenv
20527
20528 #ifdef __cplusplus
20529 extern "C"
20530 #endif
20531
20532 /* We use char because int might match the return type of a gcc2
20533    builtin and then its argument prototype would still apply.  */
20534 char getenv (void);
20535
20536 int
20537 main (void)
20538 {
20539
20540 /* The GNU C library defines stubs for functions which it implements
20541     to always fail with ENOSYS.  Some functions are actually named
20542     something starting with __ and the normal name is an alias.  */
20543 #if defined (__stub_getenv) || defined (__stub___getenv)
20544 #error found stub for getenv
20545 #endif
20546
20547         return getenv ();
20548   ;
20549   return 0;
20550 }
20551 _ACEOF
20552 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20553 if { (eval echo "$as_me:20553: \"$ac_link\"") >&5
20554   (eval $ac_link) 2>&5
20555   ac_status=$?
20556   echo "$as_me:20556: \$? = $ac_status" >&5
20557   (exit "$ac_status"); } &&
20558          { ac_try='test -s "conftest$ac_exeext"'
20559   { (eval echo "$as_me:20559: \"$ac_try\"") >&5
20560   (eval $ac_try) 2>&5
20561   ac_status=$?
20562   echo "$as_me:20562: \$? = $ac_status" >&5
20563   (exit "$ac_status"); }; }; then
20564   ac_cv_func_getenv=yes
20565 else
20566   echo "$as_me: failed program was:" >&5
20567 cat "conftest.$ac_ext" >&5
20568 ac_cv_func_getenv=no
20569 fi
20570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20571 fi
20572 echo "$as_me:20572: result: $ac_cv_func_getenv" >&5
20573 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20574
20575 for ac_func in putenv setenv strdup
20576 do
20577 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20578 echo "$as_me:20578: checking for $ac_func" >&5
20579 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20580 if eval "test \"\${$as_ac_var+set}\" = set"; then
20581   echo $ECHO_N "(cached) $ECHO_C" >&6
20582 else
20583   cat >"conftest.$ac_ext" <<_ACEOF
20584 #line 20584 "configure"
20585 #include "confdefs.h"
20586 #define $ac_func autoconf_temporary
20587 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20588 #undef $ac_func
20589
20590 #ifdef __cplusplus
20591 extern "C"
20592 #endif
20593
20594 /* We use char because int might match the return type of a gcc2
20595    builtin and then its argument prototype would still apply.  */
20596 char $ac_func (void);
20597
20598 int
20599 main (void)
20600 {
20601
20602 /* The GNU C library defines stubs for functions which it implements
20603     to always fail with ENOSYS.  Some functions are actually named
20604     something starting with __ and the normal name is an alias.  */
20605 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20606 #error found stub for $ac_func
20607 #endif
20608
20609         return $ac_func ();
20610   ;
20611   return 0;
20612 }
20613 _ACEOF
20614 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20615 if { (eval echo "$as_me:20615: \"$ac_link\"") >&5
20616   (eval $ac_link) 2>&5
20617   ac_status=$?
20618   echo "$as_me:20618: \$? = $ac_status" >&5
20619   (exit "$ac_status"); } &&
20620          { ac_try='test -s "conftest$ac_exeext"'
20621   { (eval echo "$as_me:20621: \"$ac_try\"") >&5
20622   (eval $ac_try) 2>&5
20623   ac_status=$?
20624   echo "$as_me:20624: \$? = $ac_status" >&5
20625   (exit "$ac_status"); }; }; then
20626   eval "$as_ac_var=yes"
20627 else
20628   echo "$as_me: failed program was:" >&5
20629 cat "conftest.$ac_ext" >&5
20630 eval "$as_ac_var=no"
20631 fi
20632 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20633 fi
20634 echo "$as_me:20634: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20635 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20636 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20637   cat >>confdefs.h <<EOF
20638 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20639 EOF
20640
20641 fi
20642 done
20643
20644 echo "$as_me:20644: checking if getenv returns consistent values" >&5
20645 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20646 if test "${cf_cv_consistent_getenv+set}" = set; then
20647   echo $ECHO_N "(cached) $ECHO_C" >&6
20648 else
20649
20650 if test "$cross_compiling" = yes; then
20651   cf_cv_consistent_getenv=unknown
20652 else
20653   cat >"conftest.$ac_ext" <<_ACEOF
20654 #line 20654 "configure"
20655 #include "confdefs.h"
20656
20657 $ac_includes_default
20658
20659 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20660 extern char **environ;  /* POSIX, but some systems are not... */
20661 #endif
20662
20663 #if defined(HAVE_STRDUP)
20664 #define str_alloc(s) strdup(s)
20665 #else
20666 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20667 #endif
20668
20669 static void set_value(const char *name, const char *value)
20670 {
20671 #if defined(HAVE_SETENV)
20672         setenv(name, value, 1);
20673 #elif defined(HAVE_PUTENV)
20674         char buffer[1024];
20675         sprintf(buffer, "%s=%s", name, value);
20676         putenv(str_alloc(buffer));
20677 #else
20678 #error neither putenv/setenv found
20679 #endif
20680 }
20681 int main(void)
20682 {
20683         int pass;
20684         size_t numenv, limit, j;
20685         char **mynames;
20686         char **myvalues;
20687         char **mypointer;
20688         char *equals;
20689         for (numenv = 0; environ[numenv]; ++numenv) ;
20690         limit = numenv + 10;
20691         mynames = (char **) calloc(limit + 1, sizeof(char *));
20692         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20693         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20694 #if defined(HAVE_ENVIRON)
20695         for (j = 0; environ[j]; ++j) {
20696                 mynames[j] = str_alloc(environ[j]);
20697                 equals = strchr(mynames[j], '=');
20698                 if (equals != 0) {
20699                         *equals++ = '\\0';
20700                         myvalues[j] = str_alloc(equals);
20701                 } else {
20702                         myvalues[j] = str_alloc("");
20703                 }
20704         }
20705 #endif
20706         for (j = numenv; j < limit; ++j) {
20707                 char name[80];
20708                 char value[80];
20709                 size_t found;
20710                 size_t k = 0;
20711                 do {
20712                         size_t jk;
20713                         found = 0;
20714                         sprintf(name, "TERM%lu", (unsigned long) k);
20715                         for (jk = 0; jk < j; ++jk) {
20716                                 if (!strcmp(name, mynames[jk])) {
20717                                         found = 1;
20718                                         ++k;
20719                                         break;
20720                                 }
20721                         }
20722                 } while (found);
20723                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20724                 set_value(name, value);
20725                 mynames[j] = str_alloc(name);
20726                 myvalues[j] = str_alloc(value);
20727         }
20728         for (pass = 0; pass < 3; ++pass) {
20729                 for (j = 0; j < limit; ++j) {
20730                         char *value = getenv(mynames[j]);
20731                         if (pass) {
20732                                 if (value == 0) {
20733                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20734                                         ${cf_cv_main_return:-return}(1);
20735                                 } else if (value != mypointer[j]) {
20736                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20737                                         ${cf_cv_main_return:-return}(1);
20738                                 } else if (strcmp(value, myvalues[j])) {
20739                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20740                                         ${cf_cv_main_return:-return}(1);
20741                                 }
20742                         } else {
20743                                 size_t k;
20744                                 mypointer[j] = value;
20745                                 for (k = 0; k < j; ++k) {
20746                                         if (mypointer[j] == mypointer[k]) {
20747                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20748                                                 ${cf_cv_main_return:-return}(1);
20749                                         }
20750                                 }
20751                         }
20752                 }
20753         }
20754         ${cf_cv_main_return:-return}(0);
20755 }
20756
20757 _ACEOF
20758 rm -f "conftest$ac_exeext"
20759 if { (eval echo "$as_me:20759: \"$ac_link\"") >&5
20760   (eval $ac_link) 2>&5
20761   ac_status=$?
20762   echo "$as_me:20762: \$? = $ac_status" >&5
20763   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20764   { (eval echo "$as_me:20764: \"$ac_try\"") >&5
20765   (eval $ac_try) 2>&5
20766   ac_status=$?
20767   echo "$as_me:20767: \$? = $ac_status" >&5
20768   (exit "$ac_status"); }; }; then
20769   cf_cv_consistent_getenv=yes
20770 else
20771   echo "$as_me: program exited with status $ac_status" >&5
20772 echo "$as_me: failed program was:" >&5
20773 cat "conftest.$ac_ext" >&5
20774 cf_cv_consistent_getenv=no
20775 fi
20776 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20777 fi
20778
20779 fi
20780 echo "$as_me:20780: result: $cf_cv_consistent_getenv" >&5
20781 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20782
20783 if test "x$cf_cv_consistent_getenv" = xno
20784 then
20785
20786 cat >>confdefs.h <<\EOF
20787 #define HAVE_CONSISTENT_GETENV 1
20788 EOF
20789
20790 fi
20791
20792 if test "x$cf_cv_consistent_getenv" = xno && \
20793         test "x$cf_with_trace" = xyes
20794 then
20795         { echo "$as_me:20795: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20796 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20797 fi
20798
20799 echo "$as_me:20799: checking if sys/time.h works with sys/select.h" >&5
20800 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20801 if test "${cf_cv_sys_time_select+set}" = set; then
20802   echo $ECHO_N "(cached) $ECHO_C" >&6
20803 else
20804
20805 cat >"conftest.$ac_ext" <<_ACEOF
20806 #line 20806 "configure"
20807 #include "confdefs.h"
20808
20809 #include <sys/types.h>
20810 #ifdef HAVE_SYS_TIME_H
20811 #include <sys/time.h>
20812 #endif
20813 #ifdef HAVE_SYS_SELECT_H
20814 #include <sys/select.h>
20815 #endif
20816
20817 int
20818 main (void)
20819 {
20820
20821   ;
20822   return 0;
20823 }
20824 _ACEOF
20825 rm -f "conftest.$ac_objext"
20826 if { (eval echo "$as_me:20826: \"$ac_compile\"") >&5
20827   (eval $ac_compile) 2>&5
20828   ac_status=$?
20829   echo "$as_me:20829: \$? = $ac_status" >&5
20830   (exit "$ac_status"); } &&
20831          { ac_try='test -s "conftest.$ac_objext"'
20832   { (eval echo "$as_me:20832: \"$ac_try\"") >&5
20833   (eval $ac_try) 2>&5
20834   ac_status=$?
20835   echo "$as_me:20835: \$? = $ac_status" >&5
20836   (exit "$ac_status"); }; }; then
20837   cf_cv_sys_time_select=yes
20838 else
20839   echo "$as_me: failed program was:" >&5
20840 cat "conftest.$ac_ext" >&5
20841 cf_cv_sys_time_select=no
20842 fi
20843 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20844
20845 fi
20846
20847 echo "$as_me:20847: result: $cf_cv_sys_time_select" >&5
20848 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20849 test "$cf_cv_sys_time_select" = yes &&
20850 cat >>confdefs.h <<\EOF
20851 #define HAVE_SYS_TIME_SELECT 1
20852 EOF
20853
20854 ###     checks for compiler characteristics
20855 ac_ext=c
20856 ac_cpp='$CPP $CPPFLAGS'
20857 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20858 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20859 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20860 ac_main_return="return"
20861
20862 echo "$as_me:20862: checking for an ANSI C-conforming const" >&5
20863 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20864 if test "${ac_cv_c_const+set}" = set; then
20865   echo $ECHO_N "(cached) $ECHO_C" >&6
20866 else
20867   cat >"conftest.$ac_ext" <<_ACEOF
20868 #line 20868 "configure"
20869 #include "confdefs.h"
20870
20871 int
20872 main (void)
20873 {
20874 /* FIXME: Include the comments suggested by Paul. */
20875 #ifndef __cplusplus
20876   /* Ultrix mips cc rejects this.  */
20877   typedef int charset[2];
20878   const charset x;
20879   /* SunOS 4.1.1 cc rejects this.  */
20880   char const *const *ccp;
20881   char **p;
20882   /* NEC SVR4.0.2 mips cc rejects this.  */
20883   struct point {int x, y;};
20884   static struct point const zero = {0,0};
20885   /* AIX XL C 1.02.0.0 rejects this.
20886      It does not let you subtract one const X* pointer from another in
20887      an arm of an if-expression whose if-part is not a constant
20888      expression */
20889   const char *g = "string";
20890   ccp = &g + (g ? g-g : 0);
20891   /* HPUX 7.0 cc rejects these. */
20892   ++ccp;
20893   p = (char**) ccp;
20894   ccp = (char const *const *) p;
20895   { /* SCO 3.2v4 cc rejects this.  */
20896     char *t;
20897     char const *s = 0 ? (char *) 0 : (char const *) 0;
20898
20899     *t++ = 0;
20900   }
20901   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20902     int x[] = {25, 17};
20903     const int *foo = &x[0];
20904     ++foo;
20905   }
20906   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20907     typedef const int *iptr;
20908     iptr p = 0;
20909     ++p;
20910   }
20911   { /* AIX XL C 1.02.0.0 rejects this saying
20912        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20913     struct s { int j; const int *ap[3]; };
20914     struct s *b; b->j = 5;
20915   }
20916   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20917     const int foo = 10;
20918   }
20919 #endif
20920
20921   ;
20922   return 0;
20923 }
20924 _ACEOF
20925 rm -f "conftest.$ac_objext"
20926 if { (eval echo "$as_me:20926: \"$ac_compile\"") >&5
20927   (eval $ac_compile) 2>&5
20928   ac_status=$?
20929   echo "$as_me:20929: \$? = $ac_status" >&5
20930   (exit "$ac_status"); } &&
20931          { ac_try='test -s "conftest.$ac_objext"'
20932   { (eval echo "$as_me:20932: \"$ac_try\"") >&5
20933   (eval $ac_try) 2>&5
20934   ac_status=$?
20935   echo "$as_me:20935: \$? = $ac_status" >&5
20936   (exit "$ac_status"); }; }; then
20937   ac_cv_c_const=yes
20938 else
20939   echo "$as_me: failed program was:" >&5
20940 cat "conftest.$ac_ext" >&5
20941 ac_cv_c_const=no
20942 fi
20943 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20944 fi
20945 echo "$as_me:20945: result: $ac_cv_c_const" >&5
20946 echo "${ECHO_T}$ac_cv_c_const" >&6
20947 if test $ac_cv_c_const = no; then
20948
20949 cat >>confdefs.h <<\EOF
20950 #define const
20951 EOF
20952
20953 fi
20954
20955 echo "$as_me:20955: checking for inline" >&5
20956 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20957 if test "${ac_cv_c_inline+set}" = set; then
20958   echo $ECHO_N "(cached) $ECHO_C" >&6
20959 else
20960   ac_cv_c_inline=no
20961 for ac_kw in inline __inline__ __inline; do
20962   cat >"conftest.$ac_ext" <<_ACEOF
20963 #line 20963 "configure"
20964 #include "confdefs.h"
20965 #ifndef __cplusplus
20966 static $ac_kw int static_foo () {return 0; }
20967 $ac_kw int foo () {return 0; }
20968 #endif
20969
20970 _ACEOF
20971 rm -f "conftest.$ac_objext"
20972 if { (eval echo "$as_me:20972: \"$ac_compile\"") >&5
20973   (eval $ac_compile) 2>&5
20974   ac_status=$?
20975   echo "$as_me:20975: \$? = $ac_status" >&5
20976   (exit "$ac_status"); } &&
20977          { ac_try='test -s "conftest.$ac_objext"'
20978   { (eval echo "$as_me:20978: \"$ac_try\"") >&5
20979   (eval $ac_try) 2>&5
20980   ac_status=$?
20981   echo "$as_me:20981: \$? = $ac_status" >&5
20982   (exit "$ac_status"); }; }; then
20983   ac_cv_c_inline=$ac_kw; break
20984 else
20985   echo "$as_me: failed program was:" >&5
20986 cat "conftest.$ac_ext" >&5
20987 fi
20988 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20989 done
20990
20991 fi
20992 echo "$as_me:20992: result: $ac_cv_c_inline" >&5
20993 echo "${ECHO_T}$ac_cv_c_inline" >&6
20994 case $ac_cv_c_inline in
20995   inline | yes) ;;
20996   no)
20997 cat >>confdefs.h <<\EOF
20998 #define inline
20999 EOF
21000  ;;
21001   *)  cat >>confdefs.h <<EOF
21002 #define inline $ac_cv_c_inline
21003 EOF
21004  ;;
21005 esac
21006
21007 NCURSES_INLINE=
21008 if test "$ac_cv_c_inline" != no ; then
21009         NCURSES_INLINE=inline
21010         if test "$INTEL_COMPILER" = yes
21011         then
21012                 :
21013         elif test "$CLANG_COMPILER" = yes
21014         then
21015                 :
21016         elif test "$GCC" = yes
21017         then
21018                 echo "$as_me:21018: checking if $CC supports options to tune inlining" >&5
21019 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
21020 if test "${cf_cv_gcc_inline+set}" = set; then
21021   echo $ECHO_N "(cached) $ECHO_C" >&6
21022 else
21023
21024                 cf_save_CFLAGS=$CFLAGS
21025                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
21026                 cat >"conftest.$ac_ext" <<_ACEOF
21027 #line 21027 "configure"
21028 #include "confdefs.h"
21029 inline int foo(void) { return 1; }
21030 int
21031 main (void)
21032 {
21033 ${cf_cv_main_return:-return} foo()
21034   ;
21035   return 0;
21036 }
21037 _ACEOF
21038 rm -f "conftest.$ac_objext"
21039 if { (eval echo "$as_me:21039: \"$ac_compile\"") >&5
21040   (eval $ac_compile) 2>&5
21041   ac_status=$?
21042   echo "$as_me:21042: \$? = $ac_status" >&5
21043   (exit "$ac_status"); } &&
21044          { ac_try='test -s "conftest.$ac_objext"'
21045   { (eval echo "$as_me:21045: \"$ac_try\"") >&5
21046   (eval $ac_try) 2>&5
21047   ac_status=$?
21048   echo "$as_me:21048: \$? = $ac_status" >&5
21049   (exit "$ac_status"); }; }; then
21050   cf_cv_gcc_inline=yes
21051 else
21052   echo "$as_me: failed program was:" >&5
21053 cat "conftest.$ac_ext" >&5
21054 cf_cv_gcc_inline=no
21055 fi
21056 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21057                 CFLAGS=$cf_save_CFLAGS
21058
21059 fi
21060 echo "$as_me:21060: result: $cf_cv_gcc_inline" >&5
21061 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
21062                 if test "$cf_cv_gcc_inline" = yes ; then
21063
21064 cf_fix_cppflags=no
21065 cf_new_cflags=
21066 cf_new_cppflags=
21067 cf_new_extra_cppflags=
21068
21069 for cf_add_cflags in --param max-inline-insns-single=1200
21070 do
21071 case "$cf_fix_cppflags" in
21072 (no)
21073         case "$cf_add_cflags" in
21074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
21075                 case "$cf_add_cflags" in
21076                 (-D*)
21077                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
21078
21079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21080                                 && test -z "${cf_tst_cflags}" \
21081                                 && cf_fix_cppflags=yes
21082
21083                         if test "$cf_fix_cppflags" = yes ; then
21084
21085         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21086         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21087
21088                                 continue
21089                         elif test "${cf_tst_cflags}" = "\"'" ; then
21090
21091         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21092         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21093
21094                                 continue
21095                         fi
21096                         ;;
21097                 esac
21098                 case "$CPPFLAGS" in
21099                 (*$cf_add_cflags)
21100                         ;;
21101                 (*)
21102                         case "$cf_add_cflags" in
21103                         (-D*)
21104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
21105
21106 CPPFLAGS=`echo "$CPPFLAGS" | \
21107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
21108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
21109
21110                                 ;;
21111                         esac
21112
21113         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
21114         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
21115
21116                         ;;
21117                 esac
21118                 ;;
21119         (*)
21120
21121         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
21122         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
21123
21124                 ;;
21125         esac
21126         ;;
21127 (yes)
21128
21129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
21130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
21131
21132         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
21133
21134         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
21135                 && test -z "${cf_tst_cflags}" \
21136                 && cf_fix_cppflags=no
21137         ;;
21138 esac
21139 done
21140
21141 if test -n "$cf_new_cflags" ; then
21142
21143         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
21144         CFLAGS="${CFLAGS}$cf_new_cflags"
21145
21146 fi
21147
21148 if test -n "$cf_new_cppflags" ; then
21149
21150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21151         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
21152
21153 fi
21154
21155 if test -n "$cf_new_extra_cppflags" ; then
21156
21157         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
21158         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
21159
21160 fi
21161
21162                 fi
21163         fi
21164 fi
21165
21166 echo "$as_me:21166: checking for signal global datatype" >&5
21167 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
21168 if test "${cf_cv_sig_atomic_t+set}" = set; then
21169   echo $ECHO_N "(cached) $ECHO_C" >&6
21170 else
21171
21172         for cf_type in \
21173                 "volatile sig_atomic_t" \
21174                 "sig_atomic_t" \
21175                 "int"
21176         do
21177         cat >"conftest.$ac_ext" <<_ACEOF
21178 #line 21178 "configure"
21179 #include "confdefs.h"
21180
21181 #include <sys/types.h>
21182 #include <signal.h>
21183 #include <stdio.h>
21184
21185 extern $cf_type x;
21186 $cf_type x;
21187 static void handler(int sig)
21188 {
21189         (void)sig;
21190         x = 5;
21191 }
21192 int
21193 main (void)
21194 {
21195 signal(SIGINT, handler);
21196                  x = 1
21197   ;
21198   return 0;
21199 }
21200 _ACEOF
21201 rm -f "conftest.$ac_objext"
21202 if { (eval echo "$as_me:21202: \"$ac_compile\"") >&5
21203   (eval $ac_compile) 2>&5
21204   ac_status=$?
21205   echo "$as_me:21205: \$? = $ac_status" >&5
21206   (exit "$ac_status"); } &&
21207          { ac_try='test -s "conftest.$ac_objext"'
21208   { (eval echo "$as_me:21208: \"$ac_try\"") >&5
21209   (eval $ac_try) 2>&5
21210   ac_status=$?
21211   echo "$as_me:21211: \$? = $ac_status" >&5
21212   (exit "$ac_status"); }; }; then
21213   cf_cv_sig_atomic_t=$cf_type
21214 else
21215   echo "$as_me: failed program was:" >&5
21216 cat "conftest.$ac_ext" >&5
21217 cf_cv_sig_atomic_t=no
21218 fi
21219 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21220                 test "$cf_cv_sig_atomic_t" != no && break
21221         done
21222
21223 fi
21224
21225 echo "$as_me:21225: result: $cf_cv_sig_atomic_t" >&5
21226 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21227 test "$cf_cv_sig_atomic_t" != no &&
21228 cat >>confdefs.h <<EOF
21229 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21230 EOF
21231
21232 if test "$NCURSES_CHTYPE" = auto ; then
21233
21234 echo "$as_me:21234: checking for type of chtype" >&5
21235 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21236 if test "${cf_cv_typeof_chtype+set}" = set; then
21237   echo $ECHO_N "(cached) $ECHO_C" >&6
21238 else
21239
21240                 if test "$cross_compiling" = yes; then
21241   cf_cv_typeof_chtype=long
21242 else
21243   cat >"conftest.$ac_ext" <<_ACEOF
21244 #line 21244 "configure"
21245 #include "confdefs.h"
21246
21247 $ac_includes_default
21248 #define WANT_BITS 31
21249 int main(void)
21250 {
21251         FILE *fp = fopen("cf_test.out", "w");
21252         if (fp != 0) {
21253                 char *result = "long";
21254                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21255                         int n;
21256                         unsigned int x, y;
21257                         for (n = 0; n < WANT_BITS; n++) {
21258                                 x = (1 << n);
21259                                 y = (x >> n);
21260                                 if (y != 1 || x == 0) {
21261                                         x = 0;
21262                                         break;
21263                                 }
21264                         }
21265                         /*
21266                          * If x is nonzero, an int is big enough for the bits
21267                          * that we want.
21268                          */
21269                         result = (x != 0) ? "int" : "long";
21270                 }
21271                 fputs(result, fp);
21272                 fclose(fp);
21273         }
21274         ${cf_cv_main_return:-return}(0);
21275 }
21276
21277 _ACEOF
21278 rm -f "conftest$ac_exeext"
21279 if { (eval echo "$as_me:21279: \"$ac_link\"") >&5
21280   (eval $ac_link) 2>&5
21281   ac_status=$?
21282   echo "$as_me:21282: \$? = $ac_status" >&5
21283   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21284   { (eval echo "$as_me:21284: \"$ac_try\"") >&5
21285   (eval $ac_try) 2>&5
21286   ac_status=$?
21287   echo "$as_me:21287: \$? = $ac_status" >&5
21288   (exit "$ac_status"); }; }; then
21289   cf_cv_typeof_chtype=`cat cf_test.out`
21290 else
21291   echo "$as_me: program exited with status $ac_status" >&5
21292 echo "$as_me: failed program was:" >&5
21293 cat "conftest.$ac_ext" >&5
21294 cf_cv_typeof_chtype=long
21295 fi
21296 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21297 fi
21298                 rm -f cf_test.out
21299
21300 fi
21301
21302 echo "$as_me:21302: result: $cf_cv_typeof_chtype" >&5
21303 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21304
21305 cat >>confdefs.h <<EOF
21306 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21307 EOF
21308
21309 else
21310         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21311 fi
21312 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21313
21314 echo "$as_me:21314: checking if unsigned literals are legal" >&5
21315 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21316 if test "${cf_cv_unsigned_literals+set}" = set; then
21317   echo $ECHO_N "(cached) $ECHO_C" >&6
21318 else
21319
21320         cat >"conftest.$ac_ext" <<_ACEOF
21321 #line 21321 "configure"
21322 #include "confdefs.h"
21323
21324 int
21325 main (void)
21326 {
21327 long x = 1L + 1UL + 1U + 1
21328   ;
21329   return 0;
21330 }
21331 _ACEOF
21332 rm -f "conftest.$ac_objext"
21333 if { (eval echo "$as_me:21333: \"$ac_compile\"") >&5
21334   (eval $ac_compile) 2>&5
21335   ac_status=$?
21336   echo "$as_me:21336: \$? = $ac_status" >&5
21337   (exit "$ac_status"); } &&
21338          { ac_try='test -s "conftest.$ac_objext"'
21339   { (eval echo "$as_me:21339: \"$ac_try\"") >&5
21340   (eval $ac_try) 2>&5
21341   ac_status=$?
21342   echo "$as_me:21342: \$? = $ac_status" >&5
21343   (exit "$ac_status"); }; }; then
21344   cf_cv_unsigned_literals=yes
21345 else
21346   echo "$as_me: failed program was:" >&5
21347 cat "conftest.$ac_ext" >&5
21348 cf_cv_unsigned_literals=no
21349 fi
21350 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21351
21352 fi
21353
21354 echo "$as_me:21354: result: $cf_cv_unsigned_literals" >&5
21355 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21356
21357 cf_cv_1UL="1"
21358 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21359 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21360
21361 if test "$NCURSES_MMASK_T" = auto ; then
21362         cf_cv_typeof_mmask_t=long
21363 else
21364         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21365 fi
21366 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21367
21368 ###     Checks for external-data
21369
21370 echo "$as_me:21370: checking if external errno is declared" >&5
21371 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21372 if test "${cf_cv_dcl_errno+set}" = set; then
21373   echo $ECHO_N "(cached) $ECHO_C" >&6
21374 else
21375
21376         cat >"conftest.$ac_ext" <<_ACEOF
21377 #line 21377 "configure"
21378 #include "confdefs.h"
21379
21380 $ac_includes_default
21381 #include <errno.h>
21382 int
21383 main (void)
21384 {
21385 int x = (int) errno; (void)x
21386   ;
21387   return 0;
21388 }
21389 _ACEOF
21390 rm -f "conftest.$ac_objext"
21391 if { (eval echo "$as_me:21391: \"$ac_compile\"") >&5
21392   (eval $ac_compile) 2>&5
21393   ac_status=$?
21394   echo "$as_me:21394: \$? = $ac_status" >&5
21395   (exit "$ac_status"); } &&
21396          { ac_try='test -s "conftest.$ac_objext"'
21397   { (eval echo "$as_me:21397: \"$ac_try\"") >&5
21398   (eval $ac_try) 2>&5
21399   ac_status=$?
21400   echo "$as_me:21400: \$? = $ac_status" >&5
21401   (exit "$ac_status"); }; }; then
21402   cf_cv_dcl_errno=yes
21403 else
21404   echo "$as_me: failed program was:" >&5
21405 cat "conftest.$ac_ext" >&5
21406 cf_cv_dcl_errno=no
21407 fi
21408 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21409
21410 fi
21411 echo "$as_me:21411: result: $cf_cv_dcl_errno" >&5
21412 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21413
21414 if test "$cf_cv_dcl_errno" = no ; then
21415
21416 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21417
21418         cat >>confdefs.h <<EOF
21419 #define $cf_result 1
21420 EOF
21421
21422 fi
21423
21424 # It's possible (for near-UNIX clones) that the data doesn't exist
21425
21426 echo "$as_me:21426: checking if external errno exists" >&5
21427 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21428 if test "${cf_cv_have_errno+set}" = set; then
21429   echo $ECHO_N "(cached) $ECHO_C" >&6
21430 else
21431
21432         cat >"conftest.$ac_ext" <<_ACEOF
21433 #line 21433 "configure"
21434 #include "confdefs.h"
21435
21436 #undef errno
21437 extern int errno;
21438
21439 int
21440 main (void)
21441 {
21442 errno = 2
21443   ;
21444   return 0;
21445 }
21446 _ACEOF
21447 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21448 if { (eval echo "$as_me:21448: \"$ac_link\"") >&5
21449   (eval $ac_link) 2>&5
21450   ac_status=$?
21451   echo "$as_me:21451: \$? = $ac_status" >&5
21452   (exit "$ac_status"); } &&
21453          { ac_try='test -s "conftest$ac_exeext"'
21454   { (eval echo "$as_me:21454: \"$ac_try\"") >&5
21455   (eval $ac_try) 2>&5
21456   ac_status=$?
21457   echo "$as_me:21457: \$? = $ac_status" >&5
21458   (exit "$ac_status"); }; }; then
21459   cf_cv_have_errno=yes
21460 else
21461   echo "$as_me: failed program was:" >&5
21462 cat "conftest.$ac_ext" >&5
21463 cf_cv_have_errno=no
21464 fi
21465 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21466
21467 fi
21468 echo "$as_me:21468: result: $cf_cv_have_errno" >&5
21469 echo "${ECHO_T}$cf_cv_have_errno" >&6
21470
21471 if test "$cf_cv_have_errno" = yes ; then
21472
21473 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21474
21475         cat >>confdefs.h <<EOF
21476 #define $cf_result 1
21477 EOF
21478
21479 fi
21480
21481 echo "$as_me:21481: checking if data-only library module links" >&5
21482 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21483 if test "${cf_cv_link_dataonly+set}" = set; then
21484   echo $ECHO_N "(cached) $ECHO_C" >&6
21485 else
21486
21487         rm -f conftest.a
21488         cat >conftest.$ac_ext <<EOF
21489 #line 21489 "configure"
21490 int     testdata[3] = { 123, 456, 789 };
21491 EOF
21492         if { (eval echo "$as_me:21492: \"$ac_compile\"") >&5
21493   (eval $ac_compile) 2>&5
21494   ac_status=$?
21495   echo "$as_me:21495: \$? = $ac_status" >&5
21496   (exit "$ac_status"); } ; then
21497                 mv conftest.o data.o && \
21498                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21499         fi
21500         rm -f conftest.$ac_ext data.o
21501         cat >conftest.$ac_ext <<EOF
21502 #line 21502 "configure"
21503 int     testfunc(void)
21504 {
21505 #if defined(NeXT)
21506         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21507 #else
21508         extern int testdata[3];
21509         return testdata[0] == 123
21510            &&  testdata[1] == 456
21511            &&  testdata[2] == 789;
21512 #endif
21513 }
21514 EOF
21515         if { (eval echo "$as_me:21515: \"$ac_compile\"") >&5
21516   (eval $ac_compile) 2>&5
21517   ac_status=$?
21518   echo "$as_me:21518: \$? = $ac_status" >&5
21519   (exit "$ac_status"); }; then
21520                 mv conftest.o func.o && \
21521                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21522         fi
21523         rm -f conftest.$ac_ext func.o
21524         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21525         cf_saveLIBS="$LIBS"
21526         LIBS="conftest.a $LIBS"
21527         if test "$cross_compiling" = yes; then
21528   cf_cv_link_dataonly=unknown
21529 else
21530   cat >"conftest.$ac_ext" <<_ACEOF
21531 #line 21531 "configure"
21532 #include "confdefs.h"
21533
21534         int main(void)
21535         {
21536                 extern int testfunc();
21537                 ${cf_cv_main_return:-return} (!testfunc());
21538         }
21539
21540 _ACEOF
21541 rm -f "conftest$ac_exeext"
21542 if { (eval echo "$as_me:21542: \"$ac_link\"") >&5
21543   (eval $ac_link) 2>&5
21544   ac_status=$?
21545   echo "$as_me:21545: \$? = $ac_status" >&5
21546   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21547   { (eval echo "$as_me:21547: \"$ac_try\"") >&5
21548   (eval $ac_try) 2>&5
21549   ac_status=$?
21550   echo "$as_me:21550: \$? = $ac_status" >&5
21551   (exit "$ac_status"); }; }; then
21552   cf_cv_link_dataonly=yes
21553 else
21554   echo "$as_me: program exited with status $ac_status" >&5
21555 echo "$as_me: failed program was:" >&5
21556 cat "conftest.$ac_ext" >&5
21557 cf_cv_link_dataonly=no
21558 fi
21559 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21560 fi
21561         LIBS="$cf_saveLIBS"
21562
21563 fi
21564
21565 echo "$as_me:21565: result: $cf_cv_link_dataonly" >&5
21566 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21567
21568 if test "$cf_cv_link_dataonly" = no ; then
21569
21570 cat >>confdefs.h <<\EOF
21571 #define BROKEN_LINKER 1
21572 EOF
21573
21574         BROKEN_LINKER=1
21575 fi
21576
21577 ###     Checks for library functions.
21578
21579 echo "$as_me:21579: checking for clock_gettime" >&5
21580 echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
21581 if test "${cf_cv_func_clock_gettime+set}" = set; then
21582   echo $ECHO_N "(cached) $ECHO_C" >&6
21583 else
21584
21585                 cat >"conftest.$ac_ext" <<_ACEOF
21586 #line 21586 "configure"
21587 #include "confdefs.h"
21588 #include <time.h>
21589 int
21590 main (void)
21591 {
21592 struct timespec ts;
21593                 int rc = clock_gettime(CLOCK_REALTIME, &ts); (void) rc; (void)ts
21594   ;
21595   return 0;
21596 }
21597 _ACEOF
21598 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21599 if { (eval echo "$as_me:21599: \"$ac_link\"") >&5
21600   (eval $ac_link) 2>&5
21601   ac_status=$?
21602   echo "$as_me:21602: \$? = $ac_status" >&5
21603   (exit "$ac_status"); } &&
21604          { ac_try='test -s "conftest$ac_exeext"'
21605   { (eval echo "$as_me:21605: \"$ac_try\"") >&5
21606   (eval $ac_try) 2>&5
21607   ac_status=$?
21608   echo "$as_me:21608: \$? = $ac_status" >&5
21609   (exit "$ac_status"); }; }; then
21610   cf_cv_func_clock_gettime=yes
21611 else
21612   echo "$as_me: failed program was:" >&5
21613 cat "conftest.$ac_ext" >&5
21614 cf_cv_func_clock_gettime=no
21615 fi
21616 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21617
21618 fi
21619 echo "$as_me:21619: result: $cf_cv_func_clock_gettime" >&5
21620 echo "${ECHO_T}$cf_cv_func_clock_gettime" >&6
21621
21622 if test "$cf_cv_func_clock_gettime" = yes
21623 then
21624
21625 cat >>confdefs.h <<\EOF
21626 #define HAVE_CLOCK_GETTIME 1
21627 EOF
21628
21629 else
21630 echo "$as_me:21630: checking for gettimeofday" >&5
21631 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
21632 if test "${ac_cv_func_gettimeofday+set}" = set; then
21633   echo $ECHO_N "(cached) $ECHO_C" >&6
21634 else
21635   cat >"conftest.$ac_ext" <<_ACEOF
21636 #line 21636 "configure"
21637 #include "confdefs.h"
21638 #define gettimeofday autoconf_temporary
21639 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21640 #undef gettimeofday
21641
21642 #ifdef __cplusplus
21643 extern "C"
21644 #endif
21645
21646 /* We use char because int might match the return type of a gcc2
21647    builtin and then its argument prototype would still apply.  */
21648 char gettimeofday (void);
21649
21650 int
21651 main (void)
21652 {
21653
21654 /* The GNU C library defines stubs for functions which it implements
21655     to always fail with ENOSYS.  Some functions are actually named
21656     something starting with __ and the normal name is an alias.  */
21657 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
21658 #error found stub for gettimeofday
21659 #endif
21660
21661         return gettimeofday ();
21662   ;
21663   return 0;
21664 }
21665 _ACEOF
21666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21667 if { (eval echo "$as_me:21667: \"$ac_link\"") >&5
21668   (eval $ac_link) 2>&5
21669   ac_status=$?
21670   echo "$as_me:21670: \$? = $ac_status" >&5
21671   (exit "$ac_status"); } &&
21672          { ac_try='test -s "conftest$ac_exeext"'
21673   { (eval echo "$as_me:21673: \"$ac_try\"") >&5
21674   (eval $ac_try) 2>&5
21675   ac_status=$?
21676   echo "$as_me:21676: \$? = $ac_status" >&5
21677   (exit "$ac_status"); }; }; then
21678   ac_cv_func_gettimeofday=yes
21679 else
21680   echo "$as_me: failed program was:" >&5
21681 cat "conftest.$ac_ext" >&5
21682 ac_cv_func_gettimeofday=no
21683 fi
21684 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21685 fi
21686 echo "$as_me:21686: result: $ac_cv_func_gettimeofday" >&5
21687 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
21688 if test "$ac_cv_func_gettimeofday" = yes; then
21689
21690 cat >>confdefs.h <<\EOF
21691 #define HAVE_GETTIMEOFDAY 1
21692 EOF
21693
21694 else
21695
21696 echo "$as_me:21696: checking for gettimeofday in -lbsd" >&5
21697 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
21698 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
21699   echo $ECHO_N "(cached) $ECHO_C" >&6
21700 else
21701   ac_check_lib_save_LIBS=$LIBS
21702 LIBS="-lbsd  $LIBS"
21703 cat >"conftest.$ac_ext" <<_ACEOF
21704 #line 21704 "configure"
21705 #include "confdefs.h"
21706
21707 /* Override any gcc2 internal prototype to avoid an error.  */
21708 #ifdef __cplusplus
21709 extern "C"
21710 #endif
21711 /* We use char because int might match the return type of a gcc2
21712    builtin and then its argument prototype would still apply.  */
21713 char gettimeofday ();
21714 int
21715 main (void)
21716 {
21717 gettimeofday ();
21718   ;
21719   return 0;
21720 }
21721 _ACEOF
21722 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21723 if { (eval echo "$as_me:21723: \"$ac_link\"") >&5
21724   (eval $ac_link) 2>&5
21725   ac_status=$?
21726   echo "$as_me:21726: \$? = $ac_status" >&5
21727   (exit "$ac_status"); } &&
21728          { ac_try='test -s "conftest$ac_exeext"'
21729   { (eval echo "$as_me:21729: \"$ac_try\"") >&5
21730   (eval $ac_try) 2>&5
21731   ac_status=$?
21732   echo "$as_me:21732: \$? = $ac_status" >&5
21733   (exit "$ac_status"); }; }; then
21734   ac_cv_lib_bsd_gettimeofday=yes
21735 else
21736   echo "$as_me: failed program was:" >&5
21737 cat "conftest.$ac_ext" >&5
21738 ac_cv_lib_bsd_gettimeofday=no
21739 fi
21740 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21741 LIBS=$ac_check_lib_save_LIBS
21742 fi
21743 echo "$as_me:21743: result: $ac_cv_lib_bsd_gettimeofday" >&5
21744 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
21745 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
21746
21747 cat >>confdefs.h <<\EOF
21748 #define HAVE_GETTIMEOFDAY 1
21749 EOF
21750
21751 cf_add_libs="$LIBS"
21752 # reverse order
21753 cf_add_0lib=
21754 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21755 # filter duplicates
21756 for cf_add_1lib in $cf_add_0lib; do
21757         for cf_add_2lib in $cf_add_libs; do
21758                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21759                         cf_add_1lib=
21760                         break
21761                 fi
21762         done
21763         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21764 done
21765 LIBS="$cf_add_libs"
21766
21767 fi
21768
21769 fi
21770 fi
21771
21772 for ac_func in \
21773 fpathconf \
21774 getcwd \
21775 getauxval \
21776 getegid \
21777 geteuid \
21778 getopt \
21779 getuid \
21780 issetugid \
21781 localeconv \
21782 poll \
21783 putenv \
21784 remove \
21785 select \
21786 setbuf \
21787 setbuffer \
21788 setenv \
21789 setfsuid \
21790 setvbuf \
21791 sigaction \
21792 sigvec \
21793 snprintf \
21794 strdup \
21795 strstr \
21796 sysconf \
21797 tcgetpgrp \
21798 times \
21799 tsearch \
21800 vsnprintf \
21801
21802 do
21803 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21804 echo "$as_me:21804: checking for $ac_func" >&5
21805 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21806 if eval "test \"\${$as_ac_var+set}\" = set"; then
21807   echo $ECHO_N "(cached) $ECHO_C" >&6
21808 else
21809   cat >"conftest.$ac_ext" <<_ACEOF
21810 #line 21810 "configure"
21811 #include "confdefs.h"
21812 #define $ac_func autoconf_temporary
21813 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21814 #undef $ac_func
21815
21816 #ifdef __cplusplus
21817 extern "C"
21818 #endif
21819
21820 /* We use char because int might match the return type of a gcc2
21821    builtin and then its argument prototype would still apply.  */
21822 char $ac_func (void);
21823
21824 int
21825 main (void)
21826 {
21827
21828 /* The GNU C library defines stubs for functions which it implements
21829     to always fail with ENOSYS.  Some functions are actually named
21830     something starting with __ and the normal name is an alias.  */
21831 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21832 #error found stub for $ac_func
21833 #endif
21834
21835         return $ac_func ();
21836   ;
21837   return 0;
21838 }
21839 _ACEOF
21840 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21841 if { (eval echo "$as_me:21841: \"$ac_link\"") >&5
21842   (eval $ac_link) 2>&5
21843   ac_status=$?
21844   echo "$as_me:21844: \$? = $ac_status" >&5
21845   (exit "$ac_status"); } &&
21846          { ac_try='test -s "conftest$ac_exeext"'
21847   { (eval echo "$as_me:21847: \"$ac_try\"") >&5
21848   (eval $ac_try) 2>&5
21849   ac_status=$?
21850   echo "$as_me:21850: \$? = $ac_status" >&5
21851   (exit "$ac_status"); }; }; then
21852   eval "$as_ac_var=yes"
21853 else
21854   echo "$as_me: failed program was:" >&5
21855 cat "conftest.$ac_ext" >&5
21856 eval "$as_ac_var=no"
21857 fi
21858 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21859 fi
21860 echo "$as_me:21860: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21861 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21862 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21863   cat >>confdefs.h <<EOF
21864 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21865 EOF
21866
21867 fi
21868 done
21869
21870 echo "$as_me:21870: checking if _PATH_TTYS is defined in ttyent.h" >&5
21871 echo $ECHO_N "checking if _PATH_TTYS is defined in ttyent.h... $ECHO_C" >&6
21872 if test "${cf_cv_PATH_TTYS+set}" = set; then
21873   echo $ECHO_N "(cached) $ECHO_C" >&6
21874 else
21875
21876 cat >"conftest.$ac_ext" <<_ACEOF
21877 #line 21877 "configure"
21878 #include "confdefs.h"
21879
21880 #include <stdio.h>
21881 #include <ttyent.h>
21882 int
21883 main (void)
21884 {
21885
21886 FILE *fp = fopen(_PATH_TTYS, "r"); (void)fp
21887   ;
21888   return 0;
21889 }
21890 _ACEOF
21891 rm -f "conftest.$ac_objext"
21892 if { (eval echo "$as_me:21892: \"$ac_compile\"") >&5
21893   (eval $ac_compile) 2>&5
21894   ac_status=$?
21895   echo "$as_me:21895: \$? = $ac_status" >&5
21896   (exit "$ac_status"); } &&
21897          { ac_try='test -s "conftest.$ac_objext"'
21898   { (eval echo "$as_me:21898: \"$ac_try\"") >&5
21899   (eval $ac_try) 2>&5
21900   ac_status=$?
21901   echo "$as_me:21901: \$? = $ac_status" >&5
21902   (exit "$ac_status"); }; }; then
21903   cf_cv_PATH_TTYS=yes
21904 else
21905   echo "$as_me: failed program was:" >&5
21906 cat "conftest.$ac_ext" >&5
21907 cf_cv_PATH_TTYS=no
21908 fi
21909 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21910 fi
21911 echo "$as_me:21911: result: $cf_cv_PATH_TTYS" >&5
21912 echo "${ECHO_T}$cf_cv_PATH_TTYS" >&6
21913
21914 if test $cf_cv_PATH_TTYS = no
21915 then
21916         for cf_ttys in /etc/ttytype /etc/ttys
21917         do
21918                 if test -f $cf_ttys
21919                 then
21920                         cf_cv_PATH_TTYS=maybe
21921
21922 cat >>confdefs.h <<\EOF
21923 #define _PATH_TTYS $cf_ttys
21924 EOF
21925
21926                         break
21927                 fi
21928         done
21929 fi
21930
21931 if test $cf_cv_PATH_TTYS != no
21932 then
21933         echo "$as_me:21933: checking if _PATH_TTYS file exists" >&5
21934 echo $ECHO_N "checking if _PATH_TTYS file exists... $ECHO_C" >&6
21935 if test "${cf_cv_have_PATH_TTYS+set}" = set; then
21936   echo $ECHO_N "(cached) $ECHO_C" >&6
21937 else
21938
21939                 if test "$cross_compiling" = yes; then
21940   cf_cv_have_PATH_TTYS=unknown
21941 else
21942   cat >"conftest.$ac_ext" <<_ACEOF
21943 #line 21943 "configure"
21944 #include "confdefs.h"
21945
21946 $ac_includes_default
21947
21948 #include <ttyent.h>
21949
21950 int main(void) {
21951         FILE *fp = fopen(_PATH_TTYS, "r");
21952         ${cf_cv_main_return:-return} (fp == 0);
21953 }
21954 _ACEOF
21955 rm -f "conftest$ac_exeext"
21956 if { (eval echo "$as_me:21956: \"$ac_link\"") >&5
21957   (eval $ac_link) 2>&5
21958   ac_status=$?
21959   echo "$as_me:21959: \$? = $ac_status" >&5
21960   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21961   { (eval echo "$as_me:21961: \"$ac_try\"") >&5
21962   (eval $ac_try) 2>&5
21963   ac_status=$?
21964   echo "$as_me:21964: \$? = $ac_status" >&5
21965   (exit "$ac_status"); }; }; then
21966   cf_cv_have_PATH_TTYS=yes
21967 else
21968   echo "$as_me: program exited with status $ac_status" >&5
21969 echo "$as_me: failed program was:" >&5
21970 cat "conftest.$ac_ext" >&5
21971 cf_cv_have_PATH_TTYS=no
21972 fi
21973 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21974 fi
21975 fi
21976 echo "$as_me:21976: result: $cf_cv_have_PATH_TTYS" >&5
21977 echo "${ECHO_T}$cf_cv_have_PATH_TTYS" >&6
21978         test "$cf_cv_have_PATH_TTYS" = no && cf_cv_PATH_TTYS=no
21979 fi
21980
21981 if test $cf_cv_PATH_TTYS != no
21982 then
21983
21984 cat >>confdefs.h <<\EOF
21985 #define HAVE_PATH_TTYS 1
21986 EOF
21987
21988         echo "$as_me:21988: checking for getttynam" >&5
21989 echo $ECHO_N "checking for getttynam... $ECHO_C" >&6
21990 if test "${cf_cv_func_getttynam+set}" = set; then
21991   echo $ECHO_N "(cached) $ECHO_C" >&6
21992 else
21993
21994                 cat >"conftest.$ac_ext" <<_ACEOF
21995 #line 21995 "configure"
21996 #include "confdefs.h"
21997 #include <ttyent.h>
21998 int
21999 main (void)
22000 {
22001 struct ttyent *fp = getttynam("/dev/tty"); (void)fp
22002   ;
22003   return 0;
22004 }
22005 _ACEOF
22006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22007 if { (eval echo "$as_me:22007: \"$ac_link\"") >&5
22008   (eval $ac_link) 2>&5
22009   ac_status=$?
22010   echo "$as_me:22010: \$? = $ac_status" >&5
22011   (exit "$ac_status"); } &&
22012          { ac_try='test -s "conftest$ac_exeext"'
22013   { (eval echo "$as_me:22013: \"$ac_try\"") >&5
22014   (eval $ac_try) 2>&5
22015   ac_status=$?
22016   echo "$as_me:22016: \$? = $ac_status" >&5
22017   (exit "$ac_status"); }; }; then
22018   cf_cv_func_getttynam=yes
22019 else
22020   echo "$as_me: failed program was:" >&5
22021 cat "conftest.$ac_ext" >&5
22022 cf_cv_func_getttynam=no
22023 fi
22024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22025 fi
22026 echo "$as_me:22026: result: $cf_cv_func_getttynam" >&5
22027 echo "${ECHO_T}$cf_cv_func_getttynam" >&6
22028         test "$cf_cv_func_getttynam" = yes && cat >>confdefs.h <<\EOF
22029 #define HAVE_GETTTYNAM 1
22030 EOF
22031
22032 fi
22033
22034 if test "x$ac_cv_func_getopt" = xno && \
22035    test "x$cf_with_progs$cf_with_tests" != xnono; then
22036         { { echo "$as_me:22036: error: getopt is required for building programs" >&5
22037 echo "$as_me: error: getopt is required for building programs" >&2;}
22038    { (exit 1); exit 1; }; }
22039 fi
22040
22041 if test "x$with_safe_sprintf" = xyes
22042 then
22043         if test "x$ac_cv_func_vsnprintf" = xyes
22044         then
22045                 { echo "$as_me:22045: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
22046 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
22047         else
22048
22049 cat >>confdefs.h <<\EOF
22050 #define USE_SAFE_SPRINTF 1
22051 EOF
22052
22053         fi
22054 fi
22055
22056 if test "x$with_getcap" = "xyes" ; then
22057
22058 echo "$as_me:22058: checking for terminal-capability database functions" >&5
22059 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
22060 if test "${cf_cv_cgetent+set}" = set; then
22061   echo $ECHO_N "(cached) $ECHO_C" >&6
22062 else
22063
22064 cat >"conftest.$ac_ext" <<_ACEOF
22065 #line 22065 "configure"
22066 #include "confdefs.h"
22067
22068 $ac_includes_default
22069 int
22070 main (void)
22071 {
22072
22073         char temp[128];
22074         char *buf = temp;
22075         char *db_array = temp;
22076         cgetent(&buf, &db_array, "vt100");
22077         cgetcap(buf, "tc", '=');
22078         cgetmatch(buf, "tc");
22079
22080   ;
22081   return 0;
22082 }
22083 _ACEOF
22084 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22085 if { (eval echo "$as_me:22085: \"$ac_link\"") >&5
22086   (eval $ac_link) 2>&5
22087   ac_status=$?
22088   echo "$as_me:22088: \$? = $ac_status" >&5
22089   (exit "$ac_status"); } &&
22090          { ac_try='test -s "conftest$ac_exeext"'
22091   { (eval echo "$as_me:22091: \"$ac_try\"") >&5
22092   (eval $ac_try) 2>&5
22093   ac_status=$?
22094   echo "$as_me:22094: \$? = $ac_status" >&5
22095   (exit "$ac_status"); }; }; then
22096   cf_cv_cgetent=yes
22097 else
22098   echo "$as_me: failed program was:" >&5
22099 cat "conftest.$ac_ext" >&5
22100 cf_cv_cgetent=no
22101 fi
22102 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22103
22104 fi
22105 echo "$as_me:22105: result: $cf_cv_cgetent" >&5
22106 echo "${ECHO_T}$cf_cv_cgetent" >&6
22107
22108 if test "$cf_cv_cgetent" = yes
22109 then
22110
22111 cat >>confdefs.h <<\EOF
22112 #define HAVE_BSD_CGETENT 1
22113 EOF
22114
22115 echo "$as_me:22115: checking if cgetent uses const parameter" >&5
22116 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
22117 if test "${cf_cv_cgetent_const+set}" = set; then
22118   echo $ECHO_N "(cached) $ECHO_C" >&6
22119 else
22120
22121 cat >"conftest.$ac_ext" <<_ACEOF
22122 #line 22122 "configure"
22123 #include "confdefs.h"
22124
22125 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
22126 $ac_includes_default
22127 int
22128 main (void)
22129 {
22130
22131         char temp[128];
22132         char *buf = temp;
22133 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
22134         const char *db_array = temp;
22135         cgetent(&buf, &db_array, "vt100");
22136 #endif
22137         cgetcap(buf, "tc", '=');
22138         cgetmatch(buf, "tc");
22139
22140   ;
22141   return 0;
22142 }
22143 _ACEOF
22144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22145 if { (eval echo "$as_me:22145: \"$ac_link\"") >&5
22146   (eval $ac_link) 2>&5
22147   ac_status=$?
22148   echo "$as_me:22148: \$? = $ac_status" >&5
22149   (exit "$ac_status"); } &&
22150          { ac_try='test -s "conftest$ac_exeext"'
22151   { (eval echo "$as_me:22151: \"$ac_try\"") >&5
22152   (eval $ac_try) 2>&5
22153   ac_status=$?
22154   echo "$as_me:22154: \$? = $ac_status" >&5
22155   (exit "$ac_status"); }; }; then
22156   cf_cv_cgetent_const=yes
22157 else
22158   echo "$as_me: failed program was:" >&5
22159 cat "conftest.$ac_ext" >&5
22160 cf_cv_cgetent_const=no
22161 fi
22162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22163
22164 fi
22165 echo "$as_me:22165: result: $cf_cv_cgetent_const" >&5
22166 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
22167         if test "$cf_cv_cgetent_const" = yes
22168         then
22169
22170 cat >>confdefs.h <<EOF
22171 #define CGETENT_CONST const
22172 EOF
22173
22174         fi
22175 fi
22176
22177 fi
22178
22179 echo "$as_me:22179: checking for isascii" >&5
22180 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
22181 if test "${cf_cv_have_isascii+set}" = set; then
22182   echo $ECHO_N "(cached) $ECHO_C" >&6
22183 else
22184
22185         cat >"conftest.$ac_ext" <<_ACEOF
22186 #line 22186 "configure"
22187 #include "confdefs.h"
22188 #include <ctype.h>
22189 int
22190 main (void)
22191 {
22192 int x = isascii(' ')
22193   ;
22194   return 0;
22195 }
22196 _ACEOF
22197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22198 if { (eval echo "$as_me:22198: \"$ac_link\"") >&5
22199   (eval $ac_link) 2>&5
22200   ac_status=$?
22201   echo "$as_me:22201: \$? = $ac_status" >&5
22202   (exit "$ac_status"); } &&
22203          { ac_try='test -s "conftest$ac_exeext"'
22204   { (eval echo "$as_me:22204: \"$ac_try\"") >&5
22205   (eval $ac_try) 2>&5
22206   ac_status=$?
22207   echo "$as_me:22207: \$? = $ac_status" >&5
22208   (exit "$ac_status"); }; }; then
22209   cf_cv_have_isascii=yes
22210 else
22211   echo "$as_me: failed program was:" >&5
22212 cat "conftest.$ac_ext" >&5
22213 cf_cv_have_isascii=no
22214 fi
22215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22216
22217 fi
22218 echo "$as_me:22218: result: $cf_cv_have_isascii" >&5
22219 echo "${ECHO_T}$cf_cv_have_isascii" >&6
22220 test "$cf_cv_have_isascii" = yes &&
22221 cat >>confdefs.h <<\EOF
22222 #define HAVE_ISASCII 1
22223 EOF
22224
22225 if test "$ac_cv_func_sigaction" = yes; then
22226 echo "$as_me:22226: checking whether sigaction needs _POSIX_SOURCE" >&5
22227 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
22228 cat >"conftest.$ac_ext" <<_ACEOF
22229 #line 22229 "configure"
22230 #include "confdefs.h"
22231
22232 #include <sys/types.h>
22233 #include <signal.h>
22234 int
22235 main (void)
22236 {
22237 struct sigaction act
22238   ;
22239   return 0;
22240 }
22241 _ACEOF
22242 rm -f "conftest.$ac_objext"
22243 if { (eval echo "$as_me:22243: \"$ac_compile\"") >&5
22244   (eval $ac_compile) 2>&5
22245   ac_status=$?
22246   echo "$as_me:22246: \$? = $ac_status" >&5
22247   (exit "$ac_status"); } &&
22248          { ac_try='test -s "conftest.$ac_objext"'
22249   { (eval echo "$as_me:22249: \"$ac_try\"") >&5
22250   (eval $ac_try) 2>&5
22251   ac_status=$?
22252   echo "$as_me:22252: \$? = $ac_status" >&5
22253   (exit "$ac_status"); }; }; then
22254   sigact_bad=no
22255 else
22256   echo "$as_me: failed program was:" >&5
22257 cat "conftest.$ac_ext" >&5
22258
22259 cat >"conftest.$ac_ext" <<_ACEOF
22260 #line 22260 "configure"
22261 #include "confdefs.h"
22262
22263 #define _POSIX_SOURCE
22264 #include <sys/types.h>
22265 #include <signal.h>
22266 int
22267 main (void)
22268 {
22269 struct sigaction act
22270   ;
22271   return 0;
22272 }
22273 _ACEOF
22274 rm -f "conftest.$ac_objext"
22275 if { (eval echo "$as_me:22275: \"$ac_compile\"") >&5
22276   (eval $ac_compile) 2>&5
22277   ac_status=$?
22278   echo "$as_me:22278: \$? = $ac_status" >&5
22279   (exit "$ac_status"); } &&
22280          { ac_try='test -s "conftest.$ac_objext"'
22281   { (eval echo "$as_me:22281: \"$ac_try\"") >&5
22282   (eval $ac_try) 2>&5
22283   ac_status=$?
22284   echo "$as_me:22284: \$? = $ac_status" >&5
22285   (exit "$ac_status"); }; }; then
22286   sigact_bad=yes
22287
22288 cat >>confdefs.h <<\EOF
22289 #define _POSIX_SOURCE 1
22290 EOF
22291
22292 else
22293   echo "$as_me: failed program was:" >&5
22294 cat "conftest.$ac_ext" >&5
22295 sigact_bad=unknown
22296 fi
22297 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22298 fi
22299 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22300 echo "$as_me:22300: result: $sigact_bad" >&5
22301 echo "${ECHO_T}$sigact_bad" >&6
22302 fi
22303
22304 echo "$as_me:22304: checking if nanosleep really works" >&5
22305 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
22306 if test "${cf_cv_func_nanosleep+set}" = set; then
22307   echo $ECHO_N "(cached) $ECHO_C" >&6
22308 else
22309
22310 if test "$cross_compiling" = yes; then
22311   cf_cv_func_nanosleep=unknown
22312 else
22313   cat >"conftest.$ac_ext" <<_ACEOF
22314 #line 22314 "configure"
22315 #include "confdefs.h"
22316
22317 $ac_includes_default
22318
22319 #include <errno.h>
22320 #include <time.h>
22321
22322 #ifdef HAVE_SYS_TIME_H
22323 #include <sys/time.h>
22324 #endif
22325
22326 int main(void) {
22327         struct timespec ts1, ts2;
22328         int code;
22329         ts1.tv_sec  = 0;
22330         ts1.tv_nsec = 750000000;
22331         ts2.tv_sec  = 0;
22332         ts2.tv_nsec = 0;
22333         errno = 0;
22334         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
22335         ${cf_cv_main_return:-return}(code != 0);
22336 }
22337
22338 _ACEOF
22339 rm -f "conftest$ac_exeext"
22340 if { (eval echo "$as_me:22340: \"$ac_link\"") >&5
22341   (eval $ac_link) 2>&5
22342   ac_status=$?
22343   echo "$as_me:22343: \$? = $ac_status" >&5
22344   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22345   { (eval echo "$as_me:22345: \"$ac_try\"") >&5
22346   (eval $ac_try) 2>&5
22347   ac_status=$?
22348   echo "$as_me:22348: \$? = $ac_status" >&5
22349   (exit "$ac_status"); }; }; then
22350   cf_cv_func_nanosleep=yes
22351 else
22352   echo "$as_me: program exited with status $ac_status" >&5
22353 echo "$as_me: failed program was:" >&5
22354 cat "conftest.$ac_ext" >&5
22355 cf_cv_func_nanosleep=no
22356 fi
22357 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22358 fi
22359 fi
22360 echo "$as_me:22360: result: $cf_cv_func_nanosleep" >&5
22361 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
22362
22363 test "$cf_cv_func_nanosleep" = "yes" &&
22364 cat >>confdefs.h <<\EOF
22365 #define HAVE_NANOSLEEP 1
22366 EOF
22367
22368 for ac_header in \
22369 termio.h \
22370 termios.h \
22371 unistd.h \
22372 sys/ioctl.h \
22373 sys/termio.h \
22374
22375 do
22376 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22377 echo "$as_me:22377: checking for $ac_header" >&5
22378 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22379 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22380   echo $ECHO_N "(cached) $ECHO_C" >&6
22381 else
22382   cat >"conftest.$ac_ext" <<_ACEOF
22383 #line 22383 "configure"
22384 #include "confdefs.h"
22385 #include <$ac_header>
22386 _ACEOF
22387 if { (eval echo "$as_me:22387: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22388   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22389   ac_status=$?
22390   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22391   rm -f conftest.er1
22392   cat conftest.err >&5
22393   echo "$as_me:22393: \$? = $ac_status" >&5
22394   (exit "$ac_status"); } >/dev/null; then
22395   if test -s conftest.err; then
22396     ac_cpp_err=$ac_c_preproc_warn_flag
22397   else
22398     ac_cpp_err=
22399   fi
22400 else
22401   ac_cpp_err=yes
22402 fi
22403 if test -z "$ac_cpp_err"; then
22404   eval "$as_ac_Header=yes"
22405 else
22406   echo "$as_me: failed program was:" >&5
22407   cat "conftest.$ac_ext" >&5
22408   eval "$as_ac_Header=no"
22409 fi
22410 rm -f conftest.err "conftest.$ac_ext"
22411 fi
22412 echo "$as_me:22412: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22413 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22414 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22415   cat >>confdefs.h <<EOF
22416 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22417 EOF
22418
22419 fi
22420 done
22421
22422 if test "$ac_cv_header_termios_h" = yes ; then
22423         case "$CFLAGS $CPPFLAGS" in
22424         (*-D_POSIX_SOURCE*)
22425                 termios_bad=dunno ;;
22426         (*)     termios_bad=maybe ;;
22427         esac
22428         if test "$termios_bad" = maybe ; then
22429         echo "$as_me:22429: checking whether termios.h needs _POSIX_SOURCE" >&5
22430 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
22431         cat >"conftest.$ac_ext" <<_ACEOF
22432 #line 22432 "configure"
22433 #include "confdefs.h"
22434 #include <termios.h>
22435 int
22436 main (void)
22437 {
22438 struct termios foo; int x = foo.c_iflag = 1; (void)x
22439   ;
22440   return 0;
22441 }
22442 _ACEOF
22443 rm -f "conftest.$ac_objext"
22444 if { (eval echo "$as_me:22444: \"$ac_compile\"") >&5
22445   (eval $ac_compile) 2>&5
22446   ac_status=$?
22447   echo "$as_me:22447: \$? = $ac_status" >&5
22448   (exit "$ac_status"); } &&
22449          { ac_try='test -s "conftest.$ac_objext"'
22450   { (eval echo "$as_me:22450: \"$ac_try\"") >&5
22451   (eval $ac_try) 2>&5
22452   ac_status=$?
22453   echo "$as_me:22453: \$? = $ac_status" >&5
22454   (exit "$ac_status"); }; }; then
22455   termios_bad=no
22456 else
22457   echo "$as_me: failed program was:" >&5
22458 cat "conftest.$ac_ext" >&5
22459
22460                 cat >"conftest.$ac_ext" <<_ACEOF
22461 #line 22461 "configure"
22462 #include "confdefs.h"
22463
22464 #define _POSIX_SOURCE
22465 #include <termios.h>
22466 int
22467 main (void)
22468 {
22469 struct termios foo; int x = foo.c_iflag = 2; (void)x
22470   ;
22471   return 0;
22472 }
22473 _ACEOF
22474 rm -f "conftest.$ac_objext"
22475 if { (eval echo "$as_me:22475: \"$ac_compile\"") >&5
22476   (eval $ac_compile) 2>&5
22477   ac_status=$?
22478   echo "$as_me:22478: \$? = $ac_status" >&5
22479   (exit "$ac_status"); } &&
22480          { ac_try='test -s "conftest.$ac_objext"'
22481   { (eval echo "$as_me:22481: \"$ac_try\"") >&5
22482   (eval $ac_try) 2>&5
22483   ac_status=$?
22484   echo "$as_me:22484: \$? = $ac_status" >&5
22485   (exit "$ac_status"); }; }; then
22486   termios_bad=unknown
22487 else
22488   echo "$as_me: failed program was:" >&5
22489 cat "conftest.$ac_ext" >&5
22490 termios_bad=yes
22491 cat >>confdefs.h <<\EOF
22492 #define _POSIX_SOURCE 1
22493 EOF
22494
22495 fi
22496 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22497
22498 fi
22499 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22500         echo "$as_me:22500: result: $termios_bad" >&5
22501 echo "${ECHO_T}$termios_bad" >&6
22502         fi
22503 fi
22504
22505 echo "$as_me:22505: checking for tcgetattr" >&5
22506 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
22507 if test "${cf_cv_have_tcgetattr+set}" = set; then
22508   echo $ECHO_N "(cached) $ECHO_C" >&6
22509 else
22510
22511 cat >"conftest.$ac_ext" <<_ACEOF
22512 #line 22512 "configure"
22513 #include "confdefs.h"
22514
22515 #include <sys/types.h>
22516 #ifdef HAVE_UNISTD_H
22517 #include <unistd.h>
22518 #endif
22519 #ifdef HAVE_TERMIOS_H
22520 #include <termios.h>
22521 #define TTY struct termios
22522 #else
22523 #ifdef HAVE_TERMIO_H
22524 #include <termio.h>
22525 #define TTY struct termio
22526 #endif
22527 #endif
22528
22529 int
22530 main (void)
22531 {
22532
22533 TTY foo;
22534 tcgetattr(1, &foo);
22535   ;
22536   return 0;
22537 }
22538 _ACEOF
22539 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22540 if { (eval echo "$as_me:22540: \"$ac_link\"") >&5
22541   (eval $ac_link) 2>&5
22542   ac_status=$?
22543   echo "$as_me:22543: \$? = $ac_status" >&5
22544   (exit "$ac_status"); } &&
22545          { ac_try='test -s "conftest$ac_exeext"'
22546   { (eval echo "$as_me:22546: \"$ac_try\"") >&5
22547   (eval $ac_try) 2>&5
22548   ac_status=$?
22549   echo "$as_me:22549: \$? = $ac_status" >&5
22550   (exit "$ac_status"); }; }; then
22551   cf_cv_have_tcgetattr=yes
22552 else
22553   echo "$as_me: failed program was:" >&5
22554 cat "conftest.$ac_ext" >&5
22555 cf_cv_have_tcgetattr=no
22556 fi
22557 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22558 fi
22559 echo "$as_me:22559: result: $cf_cv_have_tcgetattr" >&5
22560 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22561 test "$cf_cv_have_tcgetattr" = yes &&
22562 cat >>confdefs.h <<\EOF
22563 #define HAVE_TCGETATTR 1
22564 EOF
22565
22566 echo "$as_me:22566: checking for vsscanf function or workaround" >&5
22567 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22568 if test "${cf_cv_func_vsscanf+set}" = set; then
22569   echo $ECHO_N "(cached) $ECHO_C" >&6
22570 else
22571
22572 cat >"conftest.$ac_ext" <<_ACEOF
22573 #line 22573 "configure"
22574 #include "confdefs.h"
22575
22576 #include <stdarg.h>
22577 #include <stdio.h>
22578 int
22579 main (void)
22580 {
22581
22582         va_list ap;
22583         vsscanf("from", "%d", ap)
22584   ;
22585   return 0;
22586 }
22587 _ACEOF
22588 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22589 if { (eval echo "$as_me:22589: \"$ac_link\"") >&5
22590   (eval $ac_link) 2>&5
22591   ac_status=$?
22592   echo "$as_me:22592: \$? = $ac_status" >&5
22593   (exit "$ac_status"); } &&
22594          { ac_try='test -s "conftest$ac_exeext"'
22595   { (eval echo "$as_me:22595: \"$ac_try\"") >&5
22596   (eval $ac_try) 2>&5
22597   ac_status=$?
22598   echo "$as_me:22598: \$? = $ac_status" >&5
22599   (exit "$ac_status"); }; }; then
22600   cf_cv_func_vsscanf=vsscanf
22601 else
22602   echo "$as_me: failed program was:" >&5
22603 cat "conftest.$ac_ext" >&5
22604
22605 cat >"conftest.$ac_ext" <<_ACEOF
22606 #line 22606 "configure"
22607 #include "confdefs.h"
22608
22609 #include <stdarg.h>
22610 #include <stdio.h>
22611 int
22612 main (void)
22613 {
22614
22615         FILE strbuf;
22616         char *str = "from";
22617
22618         strbuf._flag = _IOREAD;
22619         strbuf._ptr = strbuf._base = (unsigned char *) str;
22620         strbuf._cnt = strlen(str);
22621         strbuf._file = _NFILE;
22622         return (vfscanf(&strbuf, "%d", ap))
22623   ;
22624   return 0;
22625 }
22626 _ACEOF
22627 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22628 if { (eval echo "$as_me:22628: \"$ac_link\"") >&5
22629   (eval $ac_link) 2>&5
22630   ac_status=$?
22631   echo "$as_me:22631: \$? = $ac_status" >&5
22632   (exit "$ac_status"); } &&
22633          { ac_try='test -s "conftest$ac_exeext"'
22634   { (eval echo "$as_me:22634: \"$ac_try\"") >&5
22635   (eval $ac_try) 2>&5
22636   ac_status=$?
22637   echo "$as_me:22637: \$? = $ac_status" >&5
22638   (exit "$ac_status"); }; }; then
22639   cf_cv_func_vsscanf=vfscanf
22640 else
22641   echo "$as_me: failed program was:" >&5
22642 cat "conftest.$ac_ext" >&5
22643
22644 cat >"conftest.$ac_ext" <<_ACEOF
22645 #line 22645 "configure"
22646 #include "confdefs.h"
22647
22648 #include <stdarg.h>
22649 #include <stdio.h>
22650 int
22651 main (void)
22652 {
22653
22654         FILE strbuf;
22655         char *str = "from";
22656
22657         strbuf._flag = _IOREAD;
22658         strbuf._ptr = strbuf._base = (unsigned char *) str;
22659         strbuf._cnt = strlen(str);
22660         strbuf._file = _NFILE;
22661         return (_doscan(&strbuf, "%d", ap))
22662   ;
22663   return 0;
22664 }
22665 _ACEOF
22666 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22667 if { (eval echo "$as_me:22667: \"$ac_link\"") >&5
22668   (eval $ac_link) 2>&5
22669   ac_status=$?
22670   echo "$as_me:22670: \$? = $ac_status" >&5
22671   (exit "$ac_status"); } &&
22672          { ac_try='test -s "conftest$ac_exeext"'
22673   { (eval echo "$as_me:22673: \"$ac_try\"") >&5
22674   (eval $ac_try) 2>&5
22675   ac_status=$?
22676   echo "$as_me:22676: \$? = $ac_status" >&5
22677   (exit "$ac_status"); }; }; then
22678   cf_cv_func_vsscanf=_doscan
22679 else
22680   echo "$as_me: failed program was:" >&5
22681 cat "conftest.$ac_ext" >&5
22682
22683 cf_cv_func_vsscanf=no
22684 fi
22685 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22686 fi
22687 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22688 fi
22689 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22690 fi
22691 echo "$as_me:22691: result: $cf_cv_func_vsscanf" >&5
22692 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22693
22694 case "$cf_cv_func_vsscanf" in
22695 (vsscanf)
22696 cat >>confdefs.h <<\EOF
22697 #define HAVE_VSSCANF 1
22698 EOF
22699 ;;
22700 (vfscanf)
22701 cat >>confdefs.h <<\EOF
22702 #define HAVE_VFSCANF 1
22703 EOF
22704 ;;
22705 (_doscan)
22706 cat >>confdefs.h <<\EOF
22707 #define HAVE__DOSCAN 1
22708 EOF
22709 ;;
22710 esac
22711
22712 for ac_header in \
22713 unistd.h \
22714
22715 do
22716 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22717 echo "$as_me:22717: checking for $ac_header" >&5
22718 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22719 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22720   echo $ECHO_N "(cached) $ECHO_C" >&6
22721 else
22722   cat >"conftest.$ac_ext" <<_ACEOF
22723 #line 22723 "configure"
22724 #include "confdefs.h"
22725 #include <$ac_header>
22726 _ACEOF
22727 if { (eval echo "$as_me:22727: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22728   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22729   ac_status=$?
22730   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22731   rm -f conftest.er1
22732   cat conftest.err >&5
22733   echo "$as_me:22733: \$? = $ac_status" >&5
22734   (exit "$ac_status"); } >/dev/null; then
22735   if test -s conftest.err; then
22736     ac_cpp_err=$ac_c_preproc_warn_flag
22737   else
22738     ac_cpp_err=
22739   fi
22740 else
22741   ac_cpp_err=yes
22742 fi
22743 if test -z "$ac_cpp_err"; then
22744   eval "$as_ac_Header=yes"
22745 else
22746   echo "$as_me: failed program was:" >&5
22747   cat "conftest.$ac_ext" >&5
22748   eval "$as_ac_Header=no"
22749 fi
22750 rm -f conftest.err "conftest.$ac_ext"
22751 fi
22752 echo "$as_me:22752: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22753 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22754 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22755   cat >>confdefs.h <<EOF
22756 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22757 EOF
22758
22759 fi
22760 done
22761
22762 echo "$as_me:22762: checking for working mkstemp" >&5
22763 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22764 if test "${cf_cv_func_mkstemp+set}" = set; then
22765   echo $ECHO_N "(cached) $ECHO_C" >&6
22766 else
22767
22768 rm -rf ./conftest*
22769 if test "$cross_compiling" = yes; then
22770   cf_cv_func_mkstemp=maybe
22771 else
22772   cat >"conftest.$ac_ext" <<_ACEOF
22773 #line 22773 "configure"
22774 #include "confdefs.h"
22775
22776 $ac_includes_default
22777
22778 int main(void)
22779 {
22780         char *tmpl = "conftestXXXXXX";
22781         char name[2][80];
22782         int n;
22783         int result = 0;
22784         int fd;
22785         struct stat sb;
22786
22787         umask(077);
22788         for (n = 0; n < 2; ++n) {
22789                 strcpy(name[n], tmpl);
22790                 if ((fd = mkstemp(name[n])) >= 0) {
22791                         if (!strcmp(name[n], tmpl)
22792                          || stat(name[n], &sb) != 0
22793                          || (sb.st_mode & S_IFMT) != S_IFREG
22794                          || (sb.st_mode & 077) != 0) {
22795                                 result = 1;
22796                         }
22797                         close(fd);
22798                 }
22799         }
22800         if (result == 0
22801          && !strcmp(name[0], name[1]))
22802                 result = 1;
22803         ${cf_cv_main_return:-return}(result);
22804 }
22805
22806 _ACEOF
22807 rm -f "conftest$ac_exeext"
22808 if { (eval echo "$as_me:22808: \"$ac_link\"") >&5
22809   (eval $ac_link) 2>&5
22810   ac_status=$?
22811   echo "$as_me:22811: \$? = $ac_status" >&5
22812   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22813   { (eval echo "$as_me:22813: \"$ac_try\"") >&5
22814   (eval $ac_try) 2>&5
22815   ac_status=$?
22816   echo "$as_me:22816: \$? = $ac_status" >&5
22817   (exit "$ac_status"); }; }; then
22818   cf_cv_func_mkstemp=yes
22819
22820 else
22821   echo "$as_me: program exited with status $ac_status" >&5
22822 echo "$as_me: failed program was:" >&5
22823 cat "conftest.$ac_ext" >&5
22824 cf_cv_func_mkstemp=no
22825
22826 fi
22827 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22828 fi
22829
22830 fi
22831 echo "$as_me:22831: result: $cf_cv_func_mkstemp" >&5
22832 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22833 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22834         echo "$as_me:22834: checking for mkstemp" >&5
22835 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22836 if test "${ac_cv_func_mkstemp+set}" = set; then
22837   echo $ECHO_N "(cached) $ECHO_C" >&6
22838 else
22839   cat >"conftest.$ac_ext" <<_ACEOF
22840 #line 22840 "configure"
22841 #include "confdefs.h"
22842 #define mkstemp autoconf_temporary
22843 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22844 #undef mkstemp
22845
22846 #ifdef __cplusplus
22847 extern "C"
22848 #endif
22849
22850 /* We use char because int might match the return type of a gcc2
22851    builtin and then its argument prototype would still apply.  */
22852 char mkstemp (void);
22853
22854 int
22855 main (void)
22856 {
22857
22858 /* The GNU C library defines stubs for functions which it implements
22859     to always fail with ENOSYS.  Some functions are actually named
22860     something starting with __ and the normal name is an alias.  */
22861 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22862 #error found stub for mkstemp
22863 #endif
22864
22865         return mkstemp ();
22866   ;
22867   return 0;
22868 }
22869 _ACEOF
22870 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22871 if { (eval echo "$as_me:22871: \"$ac_link\"") >&5
22872   (eval $ac_link) 2>&5
22873   ac_status=$?
22874   echo "$as_me:22874: \$? = $ac_status" >&5
22875   (exit "$ac_status"); } &&
22876          { ac_try='test -s "conftest$ac_exeext"'
22877   { (eval echo "$as_me:22877: \"$ac_try\"") >&5
22878   (eval $ac_try) 2>&5
22879   ac_status=$?
22880   echo "$as_me:22880: \$? = $ac_status" >&5
22881   (exit "$ac_status"); }; }; then
22882   ac_cv_func_mkstemp=yes
22883 else
22884   echo "$as_me: failed program was:" >&5
22885 cat "conftest.$ac_ext" >&5
22886 ac_cv_func_mkstemp=no
22887 fi
22888 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22889 fi
22890 echo "$as_me:22890: result: $ac_cv_func_mkstemp" >&5
22891 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22892
22893 fi
22894 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22895
22896 cat >>confdefs.h <<\EOF
22897 #define HAVE_MKSTEMP 1
22898 EOF
22899
22900 fi
22901
22902 # setup for prototype of fallback for vsscanf()
22903
22904 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22905         HAVE_VSSCANF=1
22906 else
22907         HAVE_VSSCANF=0
22908 fi
22909
22910 if test "x$cross_compiling" = xyes ; then
22911         { echo "$as_me:22911: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22912 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22913 else
22914         echo "$as_me:22914: checking whether setvbuf arguments are reversed" >&5
22915 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22916 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22917   echo $ECHO_N "(cached) $ECHO_C" >&6
22918 else
22919   if test "$cross_compiling" = yes; then
22920   { { echo "$as_me:22920: error: cannot run test program while cross compiling" >&5
22921 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22922    { (exit 1); exit 1; }; }
22923 else
22924   cat >"conftest.$ac_ext" <<_ACEOF
22925 #line 22925 "configure"
22926 #include "confdefs.h"
22927 #include <stdio.h>
22928 /* If setvbuf has the reversed format, exit 0. */
22929 int
22930 main (void)
22931 {
22932   /* This call has the arguments reversed.
22933      A reversed system may check and see that the address of main
22934      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22935   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22936     $ac_main_return(1);
22937   putc('\r', stdout);
22938   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22939 }
22940 _ACEOF
22941 rm -f "conftest$ac_exeext"
22942 if { (eval echo "$as_me:22942: \"$ac_link\"") >&5
22943   (eval $ac_link) 2>&5
22944   ac_status=$?
22945   echo "$as_me:22945: \$? = $ac_status" >&5
22946   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22947   { (eval echo "$as_me:22947: \"$ac_try\"") >&5
22948   (eval $ac_try) 2>&5
22949   ac_status=$?
22950   echo "$as_me:22950: \$? = $ac_status" >&5
22951   (exit "$ac_status"); }; }; then
22952   ac_cv_func_setvbuf_reversed=yes
22953 else
22954   echo "$as_me: program exited with status $ac_status" >&5
22955 echo "$as_me: failed program was:" >&5
22956 cat "conftest.$ac_ext" >&5
22957 ac_cv_func_setvbuf_reversed=no
22958 fi
22959 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22960 fi
22961 rm -f core ./core.* ./*.core
22962 fi
22963 echo "$as_me:22963: result: $ac_cv_func_setvbuf_reversed" >&5
22964 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22965 if test $ac_cv_func_setvbuf_reversed = yes; then
22966
22967 cat >>confdefs.h <<\EOF
22968 #define SETVBUF_REVERSED 1
22969 EOF
22970
22971 fi
22972
22973 fi
22974 echo "$as_me:22974: checking for intptr_t" >&5
22975 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22976 if test "${ac_cv_type_intptr_t+set}" = set; then
22977   echo $ECHO_N "(cached) $ECHO_C" >&6
22978 else
22979   cat >"conftest.$ac_ext" <<_ACEOF
22980 #line 22980 "configure"
22981 #include "confdefs.h"
22982 $ac_includes_default
22983 int
22984 main (void)
22985 {
22986 if ((intptr_t *) 0)
22987   return 0;
22988 if (sizeof (intptr_t))
22989   return 0;
22990   ;
22991   return 0;
22992 }
22993 _ACEOF
22994 rm -f "conftest.$ac_objext"
22995 if { (eval echo "$as_me:22995: \"$ac_compile\"") >&5
22996   (eval $ac_compile) 2>&5
22997   ac_status=$?
22998   echo "$as_me:22998: \$? = $ac_status" >&5
22999   (exit "$ac_status"); } &&
23000          { ac_try='test -s "conftest.$ac_objext"'
23001   { (eval echo "$as_me:23001: \"$ac_try\"") >&5
23002   (eval $ac_try) 2>&5
23003   ac_status=$?
23004   echo "$as_me:23004: \$? = $ac_status" >&5
23005   (exit "$ac_status"); }; }; then
23006   ac_cv_type_intptr_t=yes
23007 else
23008   echo "$as_me: failed program was:" >&5
23009 cat "conftest.$ac_ext" >&5
23010 ac_cv_type_intptr_t=no
23011 fi
23012 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23013 fi
23014 echo "$as_me:23014: result: $ac_cv_type_intptr_t" >&5
23015 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
23016 if test "$ac_cv_type_intptr_t" = yes; then
23017   :
23018 else
23019
23020 cat >>confdefs.h <<EOF
23021 #define intptr_t long
23022 EOF
23023
23024 fi
23025
23026 echo "$as_me:23026: checking for ssize_t" >&5
23027 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
23028 if test "${ac_cv_type_ssize_t+set}" = set; then
23029   echo $ECHO_N "(cached) $ECHO_C" >&6
23030 else
23031   cat >"conftest.$ac_ext" <<_ACEOF
23032 #line 23032 "configure"
23033 #include "confdefs.h"
23034 $ac_includes_default
23035 int
23036 main (void)
23037 {
23038 if ((ssize_t *) 0)
23039   return 0;
23040 if (sizeof (ssize_t))
23041   return 0;
23042   ;
23043   return 0;
23044 }
23045 _ACEOF
23046 rm -f "conftest.$ac_objext"
23047 if { (eval echo "$as_me:23047: \"$ac_compile\"") >&5
23048   (eval $ac_compile) 2>&5
23049   ac_status=$?
23050   echo "$as_me:23050: \$? = $ac_status" >&5
23051   (exit "$ac_status"); } &&
23052          { ac_try='test -s "conftest.$ac_objext"'
23053   { (eval echo "$as_me:23053: \"$ac_try\"") >&5
23054   (eval $ac_try) 2>&5
23055   ac_status=$?
23056   echo "$as_me:23056: \$? = $ac_status" >&5
23057   (exit "$ac_status"); }; }; then
23058   ac_cv_type_ssize_t=yes
23059 else
23060   echo "$as_me: failed program was:" >&5
23061 cat "conftest.$ac_ext" >&5
23062 ac_cv_type_ssize_t=no
23063 fi
23064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23065 fi
23066 echo "$as_me:23066: result: $ac_cv_type_ssize_t" >&5
23067 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
23068 if test "$ac_cv_type_ssize_t" = yes; then
23069   :
23070 else
23071
23072 cat >>confdefs.h <<EOF
23073 #define ssize_t int
23074 EOF
23075
23076 fi
23077
23078 echo "$as_me:23078: checking for type sigaction_t" >&5
23079 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
23080 if test "${cf_cv_type_sigaction+set}" = set; then
23081   echo $ECHO_N "(cached) $ECHO_C" >&6
23082 else
23083
23084         cat >"conftest.$ac_ext" <<_ACEOF
23085 #line 23085 "configure"
23086 #include "confdefs.h"
23087
23088 #include <signal.h>
23089 int
23090 main (void)
23091 {
23092 sigaction_t x
23093   ;
23094   return 0;
23095 }
23096 _ACEOF
23097 rm -f "conftest.$ac_objext"
23098 if { (eval echo "$as_me:23098: \"$ac_compile\"") >&5
23099   (eval $ac_compile) 2>&5
23100   ac_status=$?
23101   echo "$as_me:23101: \$? = $ac_status" >&5
23102   (exit "$ac_status"); } &&
23103          { ac_try='test -s "conftest.$ac_objext"'
23104   { (eval echo "$as_me:23104: \"$ac_try\"") >&5
23105   (eval $ac_try) 2>&5
23106   ac_status=$?
23107   echo "$as_me:23107: \$? = $ac_status" >&5
23108   (exit "$ac_status"); }; }; then
23109   cf_cv_type_sigaction=yes
23110 else
23111   echo "$as_me: failed program was:" >&5
23112 cat "conftest.$ac_ext" >&5
23113 cf_cv_type_sigaction=no
23114 fi
23115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23116 fi
23117
23118 echo "$as_me:23118: result: $cf_cv_type_sigaction" >&5
23119 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
23120 test "$cf_cv_type_sigaction" = yes &&
23121 cat >>confdefs.h <<\EOF
23122 #define HAVE_TYPE_SIGACTION 1
23123 EOF
23124
23125 echo "$as_me:23125: checking declaration of size-change" >&5
23126 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
23127 if test "${cf_cv_sizechange+set}" = set; then
23128   echo $ECHO_N "(cached) $ECHO_C" >&6
23129 else
23130
23131         cf_cv_sizechange=unknown
23132         cf_save_CPPFLAGS="$CPPFLAGS"
23133
23134 for cf_opts in "" "NEED_PTEM_H"
23135 do
23136
23137         CPPFLAGS="$cf_save_CPPFLAGS"
23138         if test -n "$cf_opts"
23139         then
23140
23141         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23142         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
23143
23144         fi
23145         cat >"conftest.$ac_ext" <<_ACEOF
23146 #line 23146 "configure"
23147 #include "confdefs.h"
23148 #include <sys/types.h>
23149 #ifdef HAVE_TERMIOS_H
23150 #include <termios.h>
23151 #else
23152 #ifdef HAVE_TERMIO_H
23153 #include <termio.h>
23154 #endif
23155 #endif
23156
23157 #ifdef NEED_PTEM_H
23158 /* This is a workaround for SCO:  they neglected to define struct winsize in
23159  * termios.h -- it is only in termio.h and ptem.h
23160  */
23161 #include <sys/stream.h>
23162 #include <sys/ptem.h>
23163 #endif
23164
23165 #ifdef HAVE_SYS_IOCTL_H
23166 #include <sys/ioctl.h>
23167 #endif
23168
23169 int
23170 main (void)
23171 {
23172
23173 #ifdef TIOCGSIZE
23174         struct ttysize win;     /* SunOS 3.0... */
23175         int y = win.ts_lines = 2;
23176         int x = win.ts_cols = 1;
23177         (void)y;
23178         (void)x;
23179 #else
23180 #ifdef TIOCGWINSZ
23181         struct winsize win;     /* everything else */
23182         int y = win.ws_row = 2;
23183         int x = win.ws_col = 1;
23184         (void)y;
23185         (void)x;
23186 #else
23187         no TIOCGSIZE or TIOCGWINSZ
23188 #endif /* TIOCGWINSZ */
23189 #endif /* TIOCGSIZE */
23190
23191   ;
23192   return 0;
23193 }
23194 _ACEOF
23195 rm -f "conftest.$ac_objext"
23196 if { (eval echo "$as_me:23196: \"$ac_compile\"") >&5
23197   (eval $ac_compile) 2>&5
23198   ac_status=$?
23199   echo "$as_me:23199: \$? = $ac_status" >&5
23200   (exit "$ac_status"); } &&
23201          { ac_try='test -s "conftest.$ac_objext"'
23202   { (eval echo "$as_me:23202: \"$ac_try\"") >&5
23203   (eval $ac_try) 2>&5
23204   ac_status=$?
23205   echo "$as_me:23205: \$? = $ac_status" >&5
23206   (exit "$ac_status"); }; }; then
23207   cf_cv_sizechange=yes
23208 else
23209   echo "$as_me: failed program was:" >&5
23210 cat "conftest.$ac_ext" >&5
23211 cf_cv_sizechange=no
23212 fi
23213 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23214
23215         CPPFLAGS="$cf_save_CPPFLAGS"
23216         if test "$cf_cv_sizechange" = yes ; then
23217                 echo "size-change succeeded ($cf_opts)" >&5
23218                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
23219                 break
23220         fi
23221 done
23222
23223 fi
23224 echo "$as_me:23224: result: $cf_cv_sizechange" >&5
23225 echo "${ECHO_T}$cf_cv_sizechange" >&6
23226 if test "$cf_cv_sizechange" != no ; then
23227
23228 cat >>confdefs.h <<\EOF
23229 #define HAVE_SIZECHANGE 1
23230 EOF
23231
23232         case "$cf_cv_sizechange" in
23233         (NEED*)
23234                 cat >>confdefs.h <<EOF
23235 #define $cf_cv_sizechange  1
23236 EOF
23237
23238                 ;;
23239         esac
23240 fi
23241
23242 echo "$as_me:23242: checking for memmove" >&5
23243 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
23244 if test "${ac_cv_func_memmove+set}" = set; then
23245   echo $ECHO_N "(cached) $ECHO_C" >&6
23246 else
23247   cat >"conftest.$ac_ext" <<_ACEOF
23248 #line 23248 "configure"
23249 #include "confdefs.h"
23250 #define memmove autoconf_temporary
23251 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23252 #undef memmove
23253
23254 #ifdef __cplusplus
23255 extern "C"
23256 #endif
23257
23258 /* We use char because int might match the return type of a gcc2
23259    builtin and then its argument prototype would still apply.  */
23260 char memmove (void);
23261
23262 int
23263 main (void)
23264 {
23265
23266 /* The GNU C library defines stubs for functions which it implements
23267     to always fail with ENOSYS.  Some functions are actually named
23268     something starting with __ and the normal name is an alias.  */
23269 #if defined (__stub_memmove) || defined (__stub___memmove)
23270 #error found stub for memmove
23271 #endif
23272
23273         return memmove ();
23274   ;
23275   return 0;
23276 }
23277 _ACEOF
23278 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23279 if { (eval echo "$as_me:23279: \"$ac_link\"") >&5
23280   (eval $ac_link) 2>&5
23281   ac_status=$?
23282   echo "$as_me:23282: \$? = $ac_status" >&5
23283   (exit "$ac_status"); } &&
23284          { ac_try='test -s "conftest$ac_exeext"'
23285   { (eval echo "$as_me:23285: \"$ac_try\"") >&5
23286   (eval $ac_try) 2>&5
23287   ac_status=$?
23288   echo "$as_me:23288: \$? = $ac_status" >&5
23289   (exit "$ac_status"); }; }; then
23290   ac_cv_func_memmove=yes
23291 else
23292   echo "$as_me: failed program was:" >&5
23293 cat "conftest.$ac_ext" >&5
23294 ac_cv_func_memmove=no
23295 fi
23296 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23297 fi
23298 echo "$as_me:23298: result: $ac_cv_func_memmove" >&5
23299 echo "${ECHO_T}$ac_cv_func_memmove" >&6
23300 if test "$ac_cv_func_memmove" = yes; then
23301   :
23302 else
23303
23304 echo "$as_me:23304: checking for bcopy" >&5
23305 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
23306 if test "${ac_cv_func_bcopy+set}" = set; then
23307   echo $ECHO_N "(cached) $ECHO_C" >&6
23308 else
23309   cat >"conftest.$ac_ext" <<_ACEOF
23310 #line 23310 "configure"
23311 #include "confdefs.h"
23312 #define bcopy autoconf_temporary
23313 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23314 #undef bcopy
23315
23316 #ifdef __cplusplus
23317 extern "C"
23318 #endif
23319
23320 /* We use char because int might match the return type of a gcc2
23321    builtin and then its argument prototype would still apply.  */
23322 char bcopy (void);
23323
23324 int
23325 main (void)
23326 {
23327
23328 /* The GNU C library defines stubs for functions which it implements
23329     to always fail with ENOSYS.  Some functions are actually named
23330     something starting with __ and the normal name is an alias.  */
23331 #if defined (__stub_bcopy) || defined (__stub___bcopy)
23332 #error found stub for bcopy
23333 #endif
23334
23335         return bcopy ();
23336   ;
23337   return 0;
23338 }
23339 _ACEOF
23340 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23341 if { (eval echo "$as_me:23341: \"$ac_link\"") >&5
23342   (eval $ac_link) 2>&5
23343   ac_status=$?
23344   echo "$as_me:23344: \$? = $ac_status" >&5
23345   (exit "$ac_status"); } &&
23346          { ac_try='test -s "conftest$ac_exeext"'
23347   { (eval echo "$as_me:23347: \"$ac_try\"") >&5
23348   (eval $ac_try) 2>&5
23349   ac_status=$?
23350   echo "$as_me:23350: \$? = $ac_status" >&5
23351   (exit "$ac_status"); }; }; then
23352   ac_cv_func_bcopy=yes
23353 else
23354   echo "$as_me: failed program was:" >&5
23355 cat "conftest.$ac_ext" >&5
23356 ac_cv_func_bcopy=no
23357 fi
23358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23359 fi
23360 echo "$as_me:23360: result: $ac_cv_func_bcopy" >&5
23361 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
23362 if test "$ac_cv_func_bcopy" = yes; then
23363
23364         echo "$as_me:23364: checking if bcopy does overlapping moves" >&5
23365 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
23366 if test "${cf_cv_good_bcopy+set}" = set; then
23367   echo $ECHO_N "(cached) $ECHO_C" >&6
23368 else
23369
23370                 if test "$cross_compiling" = yes; then
23371   cf_cv_good_bcopy=unknown
23372 else
23373   cat >"conftest.$ac_ext" <<_ACEOF
23374 #line 23374 "configure"
23375 #include "confdefs.h"
23376
23377 $ac_includes_default
23378
23379 int main(void) {
23380         static char data[] = "abcdefghijklmnopqrstuwwxyz";
23381         char temp[40];
23382         bcopy(data, temp, sizeof(data));
23383         bcopy(temp+10, temp, 15);
23384         bcopy(temp+5, temp+15, 10);
23385         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
23386 }
23387
23388 _ACEOF
23389 rm -f "conftest$ac_exeext"
23390 if { (eval echo "$as_me:23390: \"$ac_link\"") >&5
23391   (eval $ac_link) 2>&5
23392   ac_status=$?
23393   echo "$as_me:23393: \$? = $ac_status" >&5
23394   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23395   { (eval echo "$as_me:23395: \"$ac_try\"") >&5
23396   (eval $ac_try) 2>&5
23397   ac_status=$?
23398   echo "$as_me:23398: \$? = $ac_status" >&5
23399   (exit "$ac_status"); }; }; then
23400   cf_cv_good_bcopy=yes
23401 else
23402   echo "$as_me: program exited with status $ac_status" >&5
23403 echo "$as_me: failed program was:" >&5
23404 cat "conftest.$ac_ext" >&5
23405 cf_cv_good_bcopy=no
23406 fi
23407 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23408 fi
23409
23410 fi
23411 echo "$as_me:23411: result: $cf_cv_good_bcopy" >&5
23412 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
23413
23414 else
23415   cf_cv_good_bcopy=no
23416 fi
23417
23418         if test "$cf_cv_good_bcopy" = yes ; then
23419
23420 cat >>confdefs.h <<\EOF
23421 #define USE_OK_BCOPY 1
23422 EOF
23423
23424         else
23425
23426 cat >>confdefs.h <<\EOF
23427 #define USE_MY_MEMMOVE 1
23428 EOF
23429
23430         fi
23431
23432 fi
23433
23434 tty >/dev/null 2>&1 || {
23435 for ac_func in posix_openpt
23436 do
23437 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23438 echo "$as_me:23438: checking for $ac_func" >&5
23439 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23440 if eval "test \"\${$as_ac_var+set}\" = set"; then
23441   echo $ECHO_N "(cached) $ECHO_C" >&6
23442 else
23443   cat >"conftest.$ac_ext" <<_ACEOF
23444 #line 23444 "configure"
23445 #include "confdefs.h"
23446 #define $ac_func autoconf_temporary
23447 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23448 #undef $ac_func
23449
23450 #ifdef __cplusplus
23451 extern "C"
23452 #endif
23453
23454 /* We use char because int might match the return type of a gcc2
23455    builtin and then its argument prototype would still apply.  */
23456 char $ac_func (void);
23457
23458 int
23459 main (void)
23460 {
23461
23462 /* The GNU C library defines stubs for functions which it implements
23463     to always fail with ENOSYS.  Some functions are actually named
23464     something starting with __ and the normal name is an alias.  */
23465 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23466 #error found stub for $ac_func
23467 #endif
23468
23469         return $ac_func ();
23470   ;
23471   return 0;
23472 }
23473 _ACEOF
23474 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23475 if { (eval echo "$as_me:23475: \"$ac_link\"") >&5
23476   (eval $ac_link) 2>&5
23477   ac_status=$?
23478   echo "$as_me:23478: \$? = $ac_status" >&5
23479   (exit "$ac_status"); } &&
23480          { ac_try='test -s "conftest$ac_exeext"'
23481   { (eval echo "$as_me:23481: \"$ac_try\"") >&5
23482   (eval $ac_try) 2>&5
23483   ac_status=$?
23484   echo "$as_me:23484: \$? = $ac_status" >&5
23485   (exit "$ac_status"); }; }; then
23486   eval "$as_ac_var=yes"
23487 else
23488   echo "$as_me: failed program was:" >&5
23489 cat "conftest.$ac_ext" >&5
23490 eval "$as_ac_var=no"
23491 fi
23492 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23493 fi
23494 echo "$as_me:23494: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23495 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23496 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23497   cat >>confdefs.h <<EOF
23498 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23499 EOF
23500
23501 fi
23502 done
23503  }
23504 echo "$as_me:23504: checking if poll really works" >&5
23505 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
23506 if test "${cf_cv_working_poll+set}" = set; then
23507   echo $ECHO_N "(cached) $ECHO_C" >&6
23508 else
23509
23510 if test "$cross_compiling" = yes; then
23511   cf_cv_working_poll=unknown
23512 else
23513   cat >"conftest.$ac_ext" <<_ACEOF
23514 #line 23514 "configure"
23515 #include "confdefs.h"
23516
23517 $ac_includes_default
23518
23519 #include <fcntl.h>
23520
23521 #ifdef HAVE_POLL_H
23522 #include <poll.h>
23523 #else
23524 #include <sys/poll.h>
23525 #endif
23526
23527 int main(void) {
23528         struct pollfd myfds;
23529         int ret;
23530
23531         /* check for Darwin bug with respect to "devices" */
23532         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
23533         if (myfds.fd < 0)
23534                 myfds.fd = 0;
23535         myfds.events = POLLIN;
23536         myfds.revents = 0;
23537
23538         ret = poll(&myfds, 1, 100);
23539
23540         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23541                 ret = -1;
23542         } else {
23543                 int fd = 0;
23544                 if (!isatty(fd)) {
23545                         fd = open("/dev/tty", 2);       /* O_RDWR */
23546                 }
23547 #ifdef HAVE_POSIX_OPENPT
23548                 if (fd < 0) {
23549                         fd = posix_openpt(O_RDWR);
23550                 }
23551 #endif
23552
23553                 if (fd >= 0) {
23554                         /* also check with standard input */
23555                         myfds.fd = fd;
23556                         myfds.events = POLLIN;
23557                         myfds.revents = 0;
23558                         ret = poll(&myfds, 1, 100);
23559                 } else {
23560                         ret = -1;
23561                 }
23562         }
23563         ${cf_cv_main_return:-return}(ret < 0);
23564 }
23565 _ACEOF
23566 rm -f "conftest$ac_exeext"
23567 if { (eval echo "$as_me:23567: \"$ac_link\"") >&5
23568   (eval $ac_link) 2>&5
23569   ac_status=$?
23570   echo "$as_me:23570: \$? = $ac_status" >&5
23571   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23572   { (eval echo "$as_me:23572: \"$ac_try\"") >&5
23573   (eval $ac_try) 2>&5
23574   ac_status=$?
23575   echo "$as_me:23575: \$? = $ac_status" >&5
23576   (exit "$ac_status"); }; }; then
23577   cf_cv_working_poll=yes
23578 else
23579   echo "$as_me: program exited with status $ac_status" >&5
23580 echo "$as_me: failed program was:" >&5
23581 cat "conftest.$ac_ext" >&5
23582 cf_cv_working_poll=no
23583 fi
23584 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23585 fi
23586 fi
23587 echo "$as_me:23587: result: $cf_cv_working_poll" >&5
23588 echo "${ECHO_T}$cf_cv_working_poll" >&6
23589 test "$cf_cv_working_poll" = "yes" &&
23590 cat >>confdefs.h <<\EOF
23591 #define HAVE_WORKING_POLL 1
23592 EOF
23593
23594 echo "$as_me:23594: checking for va_copy" >&5
23595 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23596 if test "${cf_cv_have_va_copy+set}" = set; then
23597   echo $ECHO_N "(cached) $ECHO_C" >&6
23598 else
23599
23600 cat >"conftest.$ac_ext" <<_ACEOF
23601 #line 23601 "configure"
23602 #include "confdefs.h"
23603
23604 #include <stdarg.h>
23605
23606 int
23607 main (void)
23608 {
23609
23610         static va_list dst;
23611         static va_list src;
23612         va_copy(dst, src)
23613   ;
23614   return 0;
23615 }
23616 _ACEOF
23617 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23618 if { (eval echo "$as_me:23618: \"$ac_link\"") >&5
23619   (eval $ac_link) 2>&5
23620   ac_status=$?
23621   echo "$as_me:23621: \$? = $ac_status" >&5
23622   (exit "$ac_status"); } &&
23623          { ac_try='test -s "conftest$ac_exeext"'
23624   { (eval echo "$as_me:23624: \"$ac_try\"") >&5
23625   (eval $ac_try) 2>&5
23626   ac_status=$?
23627   echo "$as_me:23627: \$? = $ac_status" >&5
23628   (exit "$ac_status"); }; }; then
23629   cf_cv_have_va_copy=yes
23630 else
23631   echo "$as_me: failed program was:" >&5
23632 cat "conftest.$ac_ext" >&5
23633 cf_cv_have_va_copy=no
23634 fi
23635 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23636 fi
23637 echo "$as_me:23637: result: $cf_cv_have_va_copy" >&5
23638 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23639
23640 if test "$cf_cv_have_va_copy" = yes;
23641 then
23642
23643 cat >>confdefs.h <<\EOF
23644 #define HAVE_VA_COPY 1
23645 EOF
23646
23647 else # !cf_cv_have_va_copy
23648
23649 echo "$as_me:23649: checking for __va_copy" >&5
23650 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23651 if test "${cf_cv_have___va_copy+set}" = set; then
23652   echo $ECHO_N "(cached) $ECHO_C" >&6
23653 else
23654
23655 cat >"conftest.$ac_ext" <<_ACEOF
23656 #line 23656 "configure"
23657 #include "confdefs.h"
23658
23659 #include <stdarg.h>
23660
23661 int
23662 main (void)
23663 {
23664
23665         static va_list dst;
23666         static va_list src;
23667         __va_copy(dst, src)
23668   ;
23669   return 0;
23670 }
23671 _ACEOF
23672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23673 if { (eval echo "$as_me:23673: \"$ac_link\"") >&5
23674   (eval $ac_link) 2>&5
23675   ac_status=$?
23676   echo "$as_me:23676: \$? = $ac_status" >&5
23677   (exit "$ac_status"); } &&
23678          { ac_try='test -s "conftest$ac_exeext"'
23679   { (eval echo "$as_me:23679: \"$ac_try\"") >&5
23680   (eval $ac_try) 2>&5
23681   ac_status=$?
23682   echo "$as_me:23682: \$? = $ac_status" >&5
23683   (exit "$ac_status"); }; }; then
23684   cf_cv_have___va_copy=yes
23685 else
23686   echo "$as_me: failed program was:" >&5
23687 cat "conftest.$ac_ext" >&5
23688 cf_cv_have___va_copy=no
23689 fi
23690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23691 fi
23692 echo "$as_me:23692: result: $cf_cv_have___va_copy" >&5
23693 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23694
23695 if test "$cf_cv_have___va_copy" = yes
23696 then
23697
23698 cat >>confdefs.h <<\EOF
23699 #define HAVE___VA_COPY 1
23700 EOF
23701
23702 else # !cf_cv_have___va_copy
23703
23704 echo "$as_me:23704: checking for __builtin_va_copy" >&5
23705 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23706 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23707   echo $ECHO_N "(cached) $ECHO_C" >&6
23708 else
23709
23710 cat >"conftest.$ac_ext" <<_ACEOF
23711 #line 23711 "configure"
23712 #include "confdefs.h"
23713
23714 #include <stdarg.h>
23715
23716 int
23717 main (void)
23718 {
23719
23720         static va_list dst;
23721         static va_list src;
23722         __builtin_va_copy(dst, src)
23723   ;
23724   return 0;
23725 }
23726 _ACEOF
23727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23728 if { (eval echo "$as_me:23728: \"$ac_link\"") >&5
23729   (eval $ac_link) 2>&5
23730   ac_status=$?
23731   echo "$as_me:23731: \$? = $ac_status" >&5
23732   (exit "$ac_status"); } &&
23733          { ac_try='test -s "conftest$ac_exeext"'
23734   { (eval echo "$as_me:23734: \"$ac_try\"") >&5
23735   (eval $ac_try) 2>&5
23736   ac_status=$?
23737   echo "$as_me:23737: \$? = $ac_status" >&5
23738   (exit "$ac_status"); }; }; then
23739   cf_cv_have___builtin_va_copy=yes
23740 else
23741   echo "$as_me: failed program was:" >&5
23742 cat "conftest.$ac_ext" >&5
23743 cf_cv_have___builtin_va_copy=no
23744 fi
23745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23746 fi
23747 echo "$as_me:23747: result: $cf_cv_have___builtin_va_copy" >&5
23748 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23749
23750 test "$cf_cv_have___builtin_va_copy" = yes &&
23751
23752 cat >>confdefs.h <<\EOF
23753 #define HAVE___BUILTIN_VA_COPY 1
23754 EOF
23755
23756 fi # cf_cv_have___va_copy
23757
23758 fi # cf_cv_have_va_copy
23759
23760 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23761 (*yes*)
23762         ;;
23763
23764 (*)
23765         echo "$as_me:23765: checking if we can simply copy va_list" >&5
23766 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23767 if test "${cf_cv_pointer_va_list+set}" = set; then
23768   echo $ECHO_N "(cached) $ECHO_C" >&6
23769 else
23770
23771 cat >"conftest.$ac_ext" <<_ACEOF
23772 #line 23772 "configure"
23773 #include "confdefs.h"
23774
23775 #include <stdarg.h>
23776
23777 int
23778 main (void)
23779 {
23780
23781         va_list dst;
23782         va_list src;
23783         dst = src
23784   ;
23785   return 0;
23786 }
23787 _ACEOF
23788 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23789 if { (eval echo "$as_me:23789: \"$ac_link\"") >&5
23790   (eval $ac_link) 2>&5
23791   ac_status=$?
23792   echo "$as_me:23792: \$? = $ac_status" >&5
23793   (exit "$ac_status"); } &&
23794          { ac_try='test -s "conftest$ac_exeext"'
23795   { (eval echo "$as_me:23795: \"$ac_try\"") >&5
23796   (eval $ac_try) 2>&5
23797   ac_status=$?
23798   echo "$as_me:23798: \$? = $ac_status" >&5
23799   (exit "$ac_status"); }; }; then
23800   cf_cv_pointer_va_list=yes
23801 else
23802   echo "$as_me: failed program was:" >&5
23803 cat "conftest.$ac_ext" >&5
23804 cf_cv_pointer_va_list=no
23805 fi
23806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23807 fi
23808 echo "$as_me:23808: result: $cf_cv_pointer_va_list" >&5
23809 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23810
23811         if test "$cf_cv_pointer_va_list" = no
23812         then
23813                 echo "$as_me:23813: checking if we can copy va_list indirectly" >&5
23814 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23815 if test "${cf_cv_array_va_list+set}" = set; then
23816   echo $ECHO_N "(cached) $ECHO_C" >&6
23817 else
23818
23819 cat >"conftest.$ac_ext" <<_ACEOF
23820 #line 23820 "configure"
23821 #include "confdefs.h"
23822
23823 #include <stdarg.h>
23824
23825 int
23826 main (void)
23827 {
23828
23829         va_list dst;
23830         va_list src;
23831         *dst = *src
23832   ;
23833   return 0;
23834 }
23835 _ACEOF
23836 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23837 if { (eval echo "$as_me:23837: \"$ac_link\"") >&5
23838   (eval $ac_link) 2>&5
23839   ac_status=$?
23840   echo "$as_me:23840: \$? = $ac_status" >&5
23841   (exit "$ac_status"); } &&
23842          { ac_try='test -s "conftest$ac_exeext"'
23843   { (eval echo "$as_me:23843: \"$ac_try\"") >&5
23844   (eval $ac_try) 2>&5
23845   ac_status=$?
23846   echo "$as_me:23846: \$? = $ac_status" >&5
23847   (exit "$ac_status"); }; }; then
23848   cf_cv_array_va_list=yes
23849 else
23850   echo "$as_me: failed program was:" >&5
23851 cat "conftest.$ac_ext" >&5
23852 cf_cv_array_va_list=no
23853 fi
23854 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23855 fi
23856 echo "$as_me:23856: result: $cf_cv_array_va_list" >&5
23857 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23858                 test "$cf_cv_array_va_list" = yes &&
23859 cat >>confdefs.h <<\EOF
23860 #define ARRAY_VA_LIST 1
23861 EOF
23862
23863         fi
23864         ;;
23865 esac
23866
23867 echo "$as_me:23867: checking for pid_t" >&5
23868 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23869 if test "${ac_cv_type_pid_t+set}" = set; then
23870   echo $ECHO_N "(cached) $ECHO_C" >&6
23871 else
23872   cat >"conftest.$ac_ext" <<_ACEOF
23873 #line 23873 "configure"
23874 #include "confdefs.h"
23875 $ac_includes_default
23876 int
23877 main (void)
23878 {
23879 if ((pid_t *) 0)
23880   return 0;
23881 if (sizeof (pid_t))
23882   return 0;
23883   ;
23884   return 0;
23885 }
23886 _ACEOF
23887 rm -f "conftest.$ac_objext"
23888 if { (eval echo "$as_me:23888: \"$ac_compile\"") >&5
23889   (eval $ac_compile) 2>&5
23890   ac_status=$?
23891   echo "$as_me:23891: \$? = $ac_status" >&5
23892   (exit "$ac_status"); } &&
23893          { ac_try='test -s "conftest.$ac_objext"'
23894   { (eval echo "$as_me:23894: \"$ac_try\"") >&5
23895   (eval $ac_try) 2>&5
23896   ac_status=$?
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); }; }; then
23899   ac_cv_type_pid_t=yes
23900 else
23901   echo "$as_me: failed program was:" >&5
23902 cat "conftest.$ac_ext" >&5
23903 ac_cv_type_pid_t=no
23904 fi
23905 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23906 fi
23907 echo "$as_me:23907: result: $ac_cv_type_pid_t" >&5
23908 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23909 if test "$ac_cv_type_pid_t" = yes; then
23910   :
23911 else
23912
23913 cat >>confdefs.h <<EOF
23914 #define pid_t int
23915 EOF
23916
23917 fi
23918
23919 for ac_header in unistd.h vfork.h
23920 do
23921 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23922 echo "$as_me:23922: checking for $ac_header" >&5
23923 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23924 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23925   echo $ECHO_N "(cached) $ECHO_C" >&6
23926 else
23927   cat >"conftest.$ac_ext" <<_ACEOF
23928 #line 23928 "configure"
23929 #include "confdefs.h"
23930 #include <$ac_header>
23931 _ACEOF
23932 if { (eval echo "$as_me:23932: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23933   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23934   ac_status=$?
23935   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23936   rm -f conftest.er1
23937   cat conftest.err >&5
23938   echo "$as_me:23938: \$? = $ac_status" >&5
23939   (exit "$ac_status"); } >/dev/null; then
23940   if test -s conftest.err; then
23941     ac_cpp_err=$ac_c_preproc_warn_flag
23942   else
23943     ac_cpp_err=
23944   fi
23945 else
23946   ac_cpp_err=yes
23947 fi
23948 if test -z "$ac_cpp_err"; then
23949   eval "$as_ac_Header=yes"
23950 else
23951   echo "$as_me: failed program was:" >&5
23952   cat "conftest.$ac_ext" >&5
23953   eval "$as_ac_Header=no"
23954 fi
23955 rm -f conftest.err "conftest.$ac_ext"
23956 fi
23957 echo "$as_me:23957: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23958 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23959 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23960   cat >>confdefs.h <<EOF
23961 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23962 EOF
23963
23964 fi
23965 done
23966
23967 for ac_func in fork vfork
23968 do
23969 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23970 echo "$as_me:23970: checking for $ac_func" >&5
23971 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23972 if eval "test \"\${$as_ac_var+set}\" = set"; then
23973   echo $ECHO_N "(cached) $ECHO_C" >&6
23974 else
23975   cat >"conftest.$ac_ext" <<_ACEOF
23976 #line 23976 "configure"
23977 #include "confdefs.h"
23978 #define $ac_func autoconf_temporary
23979 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23980 #undef $ac_func
23981
23982 #ifdef __cplusplus
23983 extern "C"
23984 #endif
23985
23986 /* We use char because int might match the return type of a gcc2
23987    builtin and then its argument prototype would still apply.  */
23988 char $ac_func (void);
23989
23990 int
23991 main (void)
23992 {
23993
23994 /* The GNU C library defines stubs for functions which it implements
23995     to always fail with ENOSYS.  Some functions are actually named
23996     something starting with __ and the normal name is an alias.  */
23997 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23998 #error found stub for $ac_func
23999 #endif
24000
24001         return $ac_func ();
24002   ;
24003   return 0;
24004 }
24005 _ACEOF
24006 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24007 if { (eval echo "$as_me:24007: \"$ac_link\"") >&5
24008   (eval $ac_link) 2>&5
24009   ac_status=$?
24010   echo "$as_me:24010: \$? = $ac_status" >&5
24011   (exit "$ac_status"); } &&
24012          { ac_try='test -s "conftest$ac_exeext"'
24013   { (eval echo "$as_me:24013: \"$ac_try\"") >&5
24014   (eval $ac_try) 2>&5
24015   ac_status=$?
24016   echo "$as_me:24016: \$? = $ac_status" >&5
24017   (exit "$ac_status"); }; }; then
24018   eval "$as_ac_var=yes"
24019 else
24020   echo "$as_me: failed program was:" >&5
24021 cat "conftest.$ac_ext" >&5
24022 eval "$as_ac_var=no"
24023 fi
24024 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24025 fi
24026 echo "$as_me:24026: result: `eval echo '${'"$as_ac_var"'}'`" >&5
24027 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
24028 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
24029   cat >>confdefs.h <<EOF
24030 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24031 EOF
24032
24033 fi
24034 done
24035
24036 ac_cv_func_fork_works=$ac_cv_func_fork
24037 if test "x$ac_cv_func_fork" = xyes; then
24038   echo "$as_me:24038: checking for working fork" >&5
24039 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
24040 if test "${ac_cv_func_fork_works+set}" = set; then
24041   echo $ECHO_N "(cached) $ECHO_C" >&6
24042 else
24043   if test "$cross_compiling" = yes; then
24044   ac_cv_func_fork_works=cross
24045 else
24046   cat >"conftest.$ac_ext" <<_ACEOF
24047 /* By Rüdiger Kuhlmann. */
24048       #include <sys/types.h>
24049       #if HAVE_UNISTD_H
24050       # include <unistd.h>
24051       #endif
24052       /* Some systems only have a dummy stub for fork() */
24053       int main (void)
24054       {
24055         if (fork() < 0)
24056           $ac_main_return (1);
24057         $ac_main_return (0);
24058       }
24059 _ACEOF
24060 rm -f "conftest$ac_exeext"
24061 if { (eval echo "$as_me:24061: \"$ac_link\"") >&5
24062   (eval $ac_link) 2>&5
24063   ac_status=$?
24064   echo "$as_me:24064: \$? = $ac_status" >&5
24065   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24066   { (eval echo "$as_me:24066: \"$ac_try\"") >&5
24067   (eval $ac_try) 2>&5
24068   ac_status=$?
24069   echo "$as_me:24069: \$? = $ac_status" >&5
24070   (exit "$ac_status"); }; }; then
24071   ac_cv_func_fork_works=yes
24072 else
24073   echo "$as_me: program exited with status $ac_status" >&5
24074 echo "$as_me: failed program was:" >&5
24075 cat "conftest.$ac_ext" >&5
24076 ac_cv_func_fork_works=no
24077 fi
24078 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24079 fi
24080 fi
24081 echo "$as_me:24081: result: $ac_cv_func_fork_works" >&5
24082 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
24083
24084 fi
24085 if test "x$ac_cv_func_fork_works" = xcross; then
24086   case $host in
24087     *-*-amigaos* | *-*-msdosdjgpp*)
24088       # Override, as these systems have only a dummy fork() stub
24089       ac_cv_func_fork_works=no
24090       ;;
24091     *)
24092       ac_cv_func_fork_works=yes
24093       ;;
24094   esac
24095   { echo "$as_me:24095: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
24096 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
24097 fi
24098 ac_cv_func_vfork_works=$ac_cv_func_vfork
24099 if test "x$ac_cv_func_vfork" = xyes; then
24100   echo "$as_me:24100: checking for working vfork" >&5
24101 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
24102 if test "${ac_cv_func_vfork_works+set}" = set; then
24103   echo $ECHO_N "(cached) $ECHO_C" >&6
24104 else
24105   if test "$cross_compiling" = yes; then
24106   ac_cv_func_vfork_works=cross
24107 else
24108   cat >"conftest.$ac_ext" <<_ACEOF
24109 #line 24109 "configure"
24110 #include "confdefs.h"
24111 /* Thanks to Paul Eggert for this test.  */
24112 #include <stdio.h>
24113 #include <sys/types.h>
24114 #include <sys/stat.h>
24115 #if HAVE_UNISTD_H
24116 # include <unistd.h>
24117 #endif
24118 #if HAVE_VFORK_H
24119 # include <vfork.h>
24120 #endif
24121 /* On some sparc systems, changes by the child to local and incoming
24122    argument registers are propagated back to the parent.  The compiler
24123    is told about this with #include <vfork.h>, but some compilers
24124    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
24125    static variable whose address is put into a register that is
24126    clobbered by the vfork.  */
24127 static
24128 sparc_address_test (int arg)
24129 {
24130   static pid_t child;
24131   if (!child) {
24132     child = vfork ();
24133     if (child < 0) {
24134       perror ("vfork");
24135       _exit(2);
24136     }
24137     if (!child) {
24138       arg = getpid();
24139       write(-1, "", 0);
24140       _exit (arg);
24141     }
24142   }
24143 }
24144
24145 int
24146 main (void)
24147 {
24148   pid_t parent = getpid ();
24149   pid_t child;
24150
24151   sparc_address_test ();
24152
24153   child = vfork ();
24154
24155   if (child == 0) {
24156     /* Here is another test for sparc vfork register problems.  This
24157        test uses lots of local variables, at least as many local
24158        variables as main has allocated so far including compiler
24159        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
24160        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
24161        reuse the register of parent for one of the local variables,
24162        since it will think that parent can't possibly be used any more
24163        in this routine.  Assigning to the local variable will thus
24164        munge parent in the parent process.  */
24165     pid_t
24166       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
24167       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
24168     /* Convince the compiler that p..p7 are live; otherwise, it might
24169        use the same hardware register for all 8 local variables.  */
24170     if (p != p1 || p != p2 || p != p3 || p != p4
24171         || p != p5 || p != p6 || p != p7)
24172       _exit(1);
24173
24174     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
24175        from child file descriptors.  If the child closes a descriptor
24176        before it execs or exits, this munges the parent's descriptor
24177        as well.  Test for this by closing stdout in the child.  */
24178     _exit(close(fileno(stdout)) != 0);
24179   } else {
24180     int status;
24181     struct stat st;
24182
24183     while (wait(&status) != child)
24184       ;
24185     $ac_main_return(
24186          /* Was there some problem with vforking?  */
24187          child < 0
24188
24189          /* Did the child fail?  (This shouldn't happen.)  */
24190          || status
24191
24192          /* Did the vfork/compiler bug occur?  */
24193          || parent != getpid()
24194
24195          /* Did the file descriptor bug occur?  */
24196          || fstat(fileno(stdout), &st) != 0
24197          );
24198   }
24199 }
24200 _ACEOF
24201 rm -f "conftest$ac_exeext"
24202 if { (eval echo "$as_me:24202: \"$ac_link\"") >&5
24203   (eval $ac_link) 2>&5
24204   ac_status=$?
24205   echo "$as_me:24205: \$? = $ac_status" >&5
24206   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24207   { (eval echo "$as_me:24207: \"$ac_try\"") >&5
24208   (eval $ac_try) 2>&5
24209   ac_status=$?
24210   echo "$as_me:24210: \$? = $ac_status" >&5
24211   (exit "$ac_status"); }; }; then
24212   ac_cv_func_vfork_works=yes
24213 else
24214   echo "$as_me: program exited with status $ac_status" >&5
24215 echo "$as_me: failed program was:" >&5
24216 cat "conftest.$ac_ext" >&5
24217 ac_cv_func_vfork_works=no
24218 fi
24219 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24220 fi
24221 fi
24222 echo "$as_me:24222: result: $ac_cv_func_vfork_works" >&5
24223 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
24224
24225 fi;
24226 if test "x$ac_cv_func_fork_works" = xcross; then
24227   ac_cv_func_vfork_works=ac_cv_func_vfork
24228   { echo "$as_me:24228: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
24229 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
24230 fi
24231
24232 if test "x$ac_cv_func_vfork_works" = xyes; then
24233
24234 cat >>confdefs.h <<\EOF
24235 #define HAVE_WORKING_VFORK 1
24236 EOF
24237
24238 else
24239
24240 cat >>confdefs.h <<\EOF
24241 #define vfork fork
24242 EOF
24243
24244 fi
24245 if test "x$ac_cv_func_fork_works" = xyes; then
24246
24247 cat >>confdefs.h <<\EOF
24248 #define HAVE_WORKING_FORK 1
24249 EOF
24250
24251 fi
24252
24253 echo "$as_me:24253: checking if fopen accepts explicit binary mode" >&5
24254 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
24255 if test "${cf_cv_fopen_bin_r+set}" = set; then
24256   echo $ECHO_N "(cached) $ECHO_C" >&6
24257 else
24258
24259         if test "$cross_compiling" = yes; then
24260   cf_cv_fopen_bin_r=unknown
24261 else
24262   cat >"conftest.$ac_ext" <<_ACEOF
24263 #line 24263 "configure"
24264 #include "confdefs.h"
24265
24266 $ac_includes_default
24267
24268 int main(void)
24269 {
24270         FILE *fp = fopen("conftest.tmp", "wb");
24271         int rc = 0;
24272         if (fp != 0) {
24273                 int p, q;
24274                 for (p = 0; p < 256; ++p) {
24275                         fputc(p, fp);
24276                 }
24277                 fclose(fp);
24278                 fp = fopen("conftest.tmp", "rb");
24279                 if (fp != 0) {
24280                         for (p = 0; p < 256; ++p) {
24281                                 q = fgetc(fp);
24282                                 if (q != p) {
24283                                         rc = 1;
24284                                         break;
24285                                 }
24286                         }
24287                 } else {
24288                         rc = 1;
24289                 }
24290         } else {
24291                 rc = 1;
24292         }
24293         ${cf_cv_main_return:-return} (rc);
24294 }
24295
24296 _ACEOF
24297 rm -f "conftest$ac_exeext"
24298 if { (eval echo "$as_me:24298: \"$ac_link\"") >&5
24299   (eval $ac_link) 2>&5
24300   ac_status=$?
24301   echo "$as_me:24301: \$? = $ac_status" >&5
24302   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24303   { (eval echo "$as_me:24303: \"$ac_try\"") >&5
24304   (eval $ac_try) 2>&5
24305   ac_status=$?
24306   echo "$as_me:24306: \$? = $ac_status" >&5
24307   (exit "$ac_status"); }; }; then
24308   cf_cv_fopen_bin_r=yes
24309 else
24310   echo "$as_me: program exited with status $ac_status" >&5
24311 echo "$as_me: failed program was:" >&5
24312 cat "conftest.$ac_ext" >&5
24313 cf_cv_fopen_bin_r=no
24314 fi
24315 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24316 fi
24317
24318 fi
24319 echo "$as_me:24319: result: $cf_cv_fopen_bin_r" >&5
24320 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
24321 test "x$cf_cv_fopen_bin_r" != xno &&
24322 cat >>confdefs.h <<\EOF
24323 #define USE_FOPEN_BIN_R 1
24324 EOF
24325
24326 # special check for test/ditto.c
24327
24328 echo "$as_me:24328: checking for openpty in -lutil" >&5
24329 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
24330 if test "${ac_cv_lib_util_openpty+set}" = set; then
24331   echo $ECHO_N "(cached) $ECHO_C" >&6
24332 else
24333   ac_check_lib_save_LIBS=$LIBS
24334 LIBS="-lutil  $LIBS"
24335 cat >"conftest.$ac_ext" <<_ACEOF
24336 #line 24336 "configure"
24337 #include "confdefs.h"
24338
24339 /* Override any gcc2 internal prototype to avoid an error.  */
24340 #ifdef __cplusplus
24341 extern "C"
24342 #endif
24343 /* We use char because int might match the return type of a gcc2
24344    builtin and then its argument prototype would still apply.  */
24345 char openpty ();
24346 int
24347 main (void)
24348 {
24349 openpty ();
24350   ;
24351   return 0;
24352 }
24353 _ACEOF
24354 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24355 if { (eval echo "$as_me:24355: \"$ac_link\"") >&5
24356   (eval $ac_link) 2>&5
24357   ac_status=$?
24358   echo "$as_me:24358: \$? = $ac_status" >&5
24359   (exit "$ac_status"); } &&
24360          { ac_try='test -s "conftest$ac_exeext"'
24361   { (eval echo "$as_me:24361: \"$ac_try\"") >&5
24362   (eval $ac_try) 2>&5
24363   ac_status=$?
24364   echo "$as_me:24364: \$? = $ac_status" >&5
24365   (exit "$ac_status"); }; }; then
24366   ac_cv_lib_util_openpty=yes
24367 else
24368   echo "$as_me: failed program was:" >&5
24369 cat "conftest.$ac_ext" >&5
24370 ac_cv_lib_util_openpty=no
24371 fi
24372 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24373 LIBS=$ac_check_lib_save_LIBS
24374 fi
24375 echo "$as_me:24375: result: $ac_cv_lib_util_openpty" >&5
24376 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
24377 if test "$ac_cv_lib_util_openpty" = yes; then
24378   cf_cv_lib_util=yes
24379 else
24380   cf_cv_lib_util=no
24381 fi
24382
24383 echo "$as_me:24383: checking for openpty header" >&5
24384 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
24385 if test "${cf_cv_func_openpty+set}" = set; then
24386   echo $ECHO_N "(cached) $ECHO_C" >&6
24387 else
24388
24389         cf_save_LIBS="$LIBS"
24390         test "$cf_cv_lib_util" = yes && {
24391 cf_add_libs="$LIBS"
24392 # reverse order
24393 cf_add_0lib=
24394 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24395 # filter duplicates
24396 for cf_add_1lib in $cf_add_0lib; do
24397         for cf_add_2lib in $cf_add_libs; do
24398                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24399                         cf_add_1lib=
24400                         break
24401                 fi
24402         done
24403         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24404 done
24405 LIBS="$cf_add_libs"
24406  }
24407         for cf_header in pty.h libutil.h util.h
24408         do
24409         cat >"conftest.$ac_ext" <<_ACEOF
24410 #line 24410 "configure"
24411 #include "confdefs.h"
24412
24413 #include <$cf_header>
24414
24415 int
24416 main (void)
24417 {
24418
24419         int x = openpty((int *)0, (int *)0, (char *)0,
24420                                    (struct termios *)0, (struct winsize *)0);
24421
24422   ;
24423   return 0;
24424 }
24425 _ACEOF
24426 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24427 if { (eval echo "$as_me:24427: \"$ac_link\"") >&5
24428   (eval $ac_link) 2>&5
24429   ac_status=$?
24430   echo "$as_me:24430: \$? = $ac_status" >&5
24431   (exit "$ac_status"); } &&
24432          { ac_try='test -s "conftest$ac_exeext"'
24433   { (eval echo "$as_me:24433: \"$ac_try\"") >&5
24434   (eval $ac_try) 2>&5
24435   ac_status=$?
24436   echo "$as_me:24436: \$? = $ac_status" >&5
24437   (exit "$ac_status"); }; }; then
24438
24439                 cf_cv_func_openpty=$cf_header
24440                 break
24441
24442 else
24443   echo "$as_me: failed program was:" >&5
24444 cat "conftest.$ac_ext" >&5
24445
24446                 cf_cv_func_openpty=no
24447
24448 fi
24449 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24450         done
24451         LIBS="$cf_save_LIBS"
24452
24453 fi
24454 echo "$as_me:24454: result: $cf_cv_func_openpty" >&5
24455 echo "${ECHO_T}$cf_cv_func_openpty" >&6
24456
24457 if test "$cf_cv_func_openpty" != no ; then
24458
24459 cat >>confdefs.h <<EOF
24460 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
24461 EOF
24462
24463 cat >>confdefs.h <<\EOF
24464 #define USE_XTERM_PTY 1
24465 EOF
24466
24467         if test "x$cf_cv_lib_util" = xyes ; then
24468
24469 cf_add_libs="$TEST_LIBS"
24470 # reverse order
24471 cf_add_0lib=
24472 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24473 # filter duplicates
24474 for cf_add_1lib in $cf_add_0lib; do
24475         for cf_add_2lib in $cf_add_libs; do
24476                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24477                         cf_add_1lib=
24478                         break
24479                 fi
24480         done
24481         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24482 done
24483 TEST_LIBS="$cf_add_libs"
24484
24485         fi
24486 fi
24487
24488 if test "$with_hashed_db" != no ; then
24489
24490 cat >>confdefs.h <<\EOF
24491 #define USE_HASHED_DB 1
24492 EOF
24493
24494 case $with_hashed_db in
24495 (yes|*able*)
24496         ;;
24497 (*)
24498         if test -d "$with_hashed_db" ; then
24499
24500 if test -n "$with_hashed_db/include" ; then
24501   for cf_add_incdir in $with_hashed_db/include
24502   do
24503         while test "$cf_add_incdir" != /usr/include
24504         do
24505           if test -d "$cf_add_incdir"
24506           then
24507                 cf_have_incdir=no
24508                 if test -n "$CFLAGS$CPPFLAGS" ; then
24509                   # a loop is needed to ensure we can add subdirs of existing dirs
24510                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24511                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24512                           cf_have_incdir=yes; break
24513                         fi
24514                   done
24515                 fi
24516
24517                 if test "$cf_have_incdir" = no ; then
24518                   if test "$cf_add_incdir" = /usr/local/include ; then
24519                         if test "$GCC" = yes
24520                         then
24521                           cf_save_CPPFLAGS=$CPPFLAGS
24522
24523         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24524         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24525
24526                           cat >"conftest.$ac_ext" <<_ACEOF
24527 #line 24527 "configure"
24528 #include "confdefs.h"
24529 #include <stdio.h>
24530 int
24531 main (void)
24532 {
24533 printf("Hello")
24534   ;
24535   return 0;
24536 }
24537 _ACEOF
24538 rm -f "conftest.$ac_objext"
24539 if { (eval echo "$as_me:24539: \"$ac_compile\"") >&5
24540   (eval $ac_compile) 2>&5
24541   ac_status=$?
24542   echo "$as_me:24542: \$? = $ac_status" >&5
24543   (exit "$ac_status"); } &&
24544          { ac_try='test -s "conftest.$ac_objext"'
24545   { (eval echo "$as_me:24545: \"$ac_try\"") >&5
24546   (eval $ac_try) 2>&5
24547   ac_status=$?
24548   echo "$as_me:24548: \$? = $ac_status" >&5
24549   (exit "$ac_status"); }; }; then
24550   :
24551 else
24552   echo "$as_me: failed program was:" >&5
24553 cat "conftest.$ac_ext" >&5
24554 cf_have_incdir=yes
24555 fi
24556 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24557                           CPPFLAGS=$cf_save_CPPFLAGS
24558                         fi
24559                   fi
24560                 fi
24561
24562                 if test "$cf_have_incdir" = no ; then
24563                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24564
24565 echo "${as_me:-configure}:24565: testing adding $cf_add_incdir to include-path ..." 1>&5
24566
24567                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24568
24569                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24570                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24571                   cf_add_incdir="$cf_top_incdir"
24572                 else
24573                   break
24574                 fi
24575           else
24576                 break
24577           fi
24578         done
24579   done
24580 fi
24581
24582 if test -n "$with_hashed_db/lib" ; then
24583         for cf_add_libdir in $with_hashed_db/lib
24584         do
24585                 if test "$cf_add_libdir" = /usr/lib ; then
24586                         :
24587                 elif test -d "$cf_add_libdir"
24588                 then
24589                         cf_have_libdir=no
24590                         if test -n "$LDFLAGS$LIBS" ; then
24591                                 # a loop is needed to ensure we can add subdirs of existing dirs
24592                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24593                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24594                                                 cf_have_libdir=yes; break
24595                                         fi
24596                                 done
24597                         fi
24598                         if test "$cf_have_libdir" = no ; then
24599                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24600
24601 echo "${as_me:-configure}:24601: testing adding $cf_add_libdir to library-path ..." 1>&5
24602
24603                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24604                         fi
24605                 fi
24606         done
24607 fi
24608
24609         else
24610                 case "$with_hashed_db" in
24611                 (./*|../*|/*)
24612                         { echo "$as_me:24612: WARNING: no such directory $with_hashed_db" >&5
24613 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24614                         ;;
24615                 (*)
24616
24617 cf_search=
24618
24619 test "x$prefix" != "xNONE" && \
24620 test -d "$prefix" && \
24621  {
24622         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24623         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24624         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24625         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24626         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24627         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24628 }
24629
24630 for cf_subdir_prefix in \
24631         /usr \
24632         /usr/local \
24633         /usr/pkg \
24634         /opt \
24635         /opt/local \
24636         $HOME
24637 do
24638
24639 test "x$cf_subdir_prefix" != "x$prefix" && \
24640 test -d "$cf_subdir_prefix" && \
24641 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24642         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24643         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24644         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24645         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24646         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24647         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"
24648 }
24649
24650 done
24651
24652         for cf_item in $cf_search
24653         do
24654                 case "$cf_item" in
24655                 (*/$with_hashed_db)
24656
24657 if test -n "$cf_item" ; then
24658   for cf_add_incdir in $cf_item
24659   do
24660         while test "$cf_add_incdir" != /usr/include
24661         do
24662           if test -d "$cf_add_incdir"
24663           then
24664                 cf_have_incdir=no
24665                 if test -n "$CFLAGS$CPPFLAGS" ; then
24666                   # a loop is needed to ensure we can add subdirs of existing dirs
24667                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24668                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24669                           cf_have_incdir=yes; break
24670                         fi
24671                   done
24672                 fi
24673
24674                 if test "$cf_have_incdir" = no ; then
24675                   if test "$cf_add_incdir" = /usr/local/include ; then
24676                         if test "$GCC" = yes
24677                         then
24678                           cf_save_CPPFLAGS=$CPPFLAGS
24679
24680         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24681         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24682
24683                           cat >"conftest.$ac_ext" <<_ACEOF
24684 #line 24684 "configure"
24685 #include "confdefs.h"
24686 #include <stdio.h>
24687 int
24688 main (void)
24689 {
24690 printf("Hello")
24691   ;
24692   return 0;
24693 }
24694 _ACEOF
24695 rm -f "conftest.$ac_objext"
24696 if { (eval echo "$as_me:24696: \"$ac_compile\"") >&5
24697   (eval $ac_compile) 2>&5
24698   ac_status=$?
24699   echo "$as_me:24699: \$? = $ac_status" >&5
24700   (exit "$ac_status"); } &&
24701          { ac_try='test -s "conftest.$ac_objext"'
24702   { (eval echo "$as_me:24702: \"$ac_try\"") >&5
24703   (eval $ac_try) 2>&5
24704   ac_status=$?
24705   echo "$as_me:24705: \$? = $ac_status" >&5
24706   (exit "$ac_status"); }; }; then
24707   :
24708 else
24709   echo "$as_me: failed program was:" >&5
24710 cat "conftest.$ac_ext" >&5
24711 cf_have_incdir=yes
24712 fi
24713 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24714                           CPPFLAGS=$cf_save_CPPFLAGS
24715                         fi
24716                   fi
24717                 fi
24718
24719                 if test "$cf_have_incdir" = no ; then
24720                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24721
24722 echo "${as_me:-configure}:24722: testing adding $cf_add_incdir to include-path ..." 1>&5
24723
24724                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24725
24726                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24727                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24728                   cf_add_incdir="$cf_top_incdir"
24729                 else
24730                   break
24731                 fi
24732           else
24733                 break
24734           fi
24735         done
24736   done
24737 fi
24738
24739                         ;;
24740                 esac
24741         done
24742
24743 cf_search=
24744
24745 test "x$prefix" != "xNONE" && \
24746 test -d "$prefix" && \
24747  {
24748         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24749         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24750         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24751         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24752         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24753         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24754 }
24755
24756 for cf_subdir_prefix in \
24757         /usr \
24758         /usr/local \
24759         /usr/pkg \
24760         /opt \
24761         /opt/local \
24762         $HOME
24763 do
24764
24765 test "x$cf_subdir_prefix" != "x$prefix" && \
24766 test -d "$cf_subdir_prefix" && \
24767 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24768         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24769         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24770         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24771         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24772         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24773         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"
24774 }
24775
24776 done
24777
24778         for cf_item in $cf_search
24779         do
24780                 case "$cf_item" in
24781                 (*/$with_hashed_db)
24782
24783 if test -n "$cf_item" ; then
24784         for cf_add_libdir in $cf_item
24785         do
24786                 if test "$cf_add_libdir" = /usr/lib ; then
24787                         :
24788                 elif test -d "$cf_add_libdir"
24789                 then
24790                         cf_have_libdir=no
24791                         if test -n "$LDFLAGS$LIBS" ; then
24792                                 # a loop is needed to ensure we can add subdirs of existing dirs
24793                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24794                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24795                                                 cf_have_libdir=yes; break
24796                                         fi
24797                                 done
24798                         fi
24799                         if test "$cf_have_libdir" = no ; then
24800                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24801
24802 echo "${as_me:-configure}:24802: testing adding $cf_add_libdir to library-path ..." 1>&5
24803
24804                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24805                         fi
24806                 fi
24807         done
24808 fi
24809
24810                         ;;
24811                 esac
24812         done
24813
24814                         ;;
24815                 esac
24816         fi
24817 esac
24818
24819 echo "$as_me:24819: checking for db.h" >&5
24820 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24821 if test "${ac_cv_header_db_h+set}" = set; then
24822   echo $ECHO_N "(cached) $ECHO_C" >&6
24823 else
24824   cat >"conftest.$ac_ext" <<_ACEOF
24825 #line 24825 "configure"
24826 #include "confdefs.h"
24827 #include <db.h>
24828 _ACEOF
24829 if { (eval echo "$as_me:24829: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24830   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24831   ac_status=$?
24832   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24833   rm -f conftest.er1
24834   cat conftest.err >&5
24835   echo "$as_me:24835: \$? = $ac_status" >&5
24836   (exit "$ac_status"); } >/dev/null; then
24837   if test -s conftest.err; then
24838     ac_cpp_err=$ac_c_preproc_warn_flag
24839   else
24840     ac_cpp_err=
24841   fi
24842 else
24843   ac_cpp_err=yes
24844 fi
24845 if test -z "$ac_cpp_err"; then
24846   ac_cv_header_db_h=yes
24847 else
24848   echo "$as_me: failed program was:" >&5
24849   cat "conftest.$ac_ext" >&5
24850   ac_cv_header_db_h=no
24851 fi
24852 rm -f conftest.err "conftest.$ac_ext"
24853 fi
24854 echo "$as_me:24854: result: $ac_cv_header_db_h" >&5
24855 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24856 if test "$ac_cv_header_db_h" = yes; then
24857
24858 echo "$as_me:24858: checking for version of db" >&5
24859 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24860 if test "${cf_cv_hashed_db_version+set}" = set; then
24861   echo $ECHO_N "(cached) $ECHO_C" >&6
24862 else
24863
24864 cf_cv_hashed_db_version=unknown
24865
24866 for cf_db_version in 1 2 3 4 5 6
24867 do
24868
24869 echo "${as_me:-configure}:24869: testing checking for db version $cf_db_version ..." 1>&5
24870
24871         cat >"conftest.$ac_ext" <<_ACEOF
24872 #line 24872 "configure"
24873 #include "confdefs.h"
24874
24875 $ac_includes_default
24876 #include <db.h>
24877
24878 #ifdef DB_VERSION_MAJOR
24879         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24880 #if $cf_db_version == DB_VERSION_MAJOR
24881         /* ok */
24882 #else
24883         #error $cf_db_version is not DB_VERSION_MAJOR
24884 #endif
24885 #else
24886 #if $cf_db_version == 1
24887         /* ok: assuming this is DB 1.8.5 */
24888 #else
24889         #error $cf_db_version is not 1
24890 #endif
24891 #endif
24892
24893 int
24894 main (void)
24895 {
24896 DBT *foo = 0
24897   ;
24898   return 0;
24899 }
24900 _ACEOF
24901 rm -f "conftest.$ac_objext"
24902 if { (eval echo "$as_me:24902: \"$ac_compile\"") >&5
24903   (eval $ac_compile) 2>&5
24904   ac_status=$?
24905   echo "$as_me:24905: \$? = $ac_status" >&5
24906   (exit "$ac_status"); } &&
24907          { ac_try='test -s "conftest.$ac_objext"'
24908   { (eval echo "$as_me:24908: \"$ac_try\"") >&5
24909   (eval $ac_try) 2>&5
24910   ac_status=$?
24911   echo "$as_me:24911: \$? = $ac_status" >&5
24912   (exit "$ac_status"); }; }; then
24913
24914         cf_cv_hashed_db_version=$cf_db_version
24915         break
24916
24917 else
24918   echo "$as_me: failed program was:" >&5
24919 cat "conftest.$ac_ext" >&5
24920 fi
24921 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24922 done
24923
24924 fi
24925 echo "$as_me:24925: result: $cf_cv_hashed_db_version" >&5
24926 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24927
24928 if test "$cf_cv_hashed_db_version" = unknown ; then
24929         { { echo "$as_me:24929: error: Cannot determine version of db" >&5
24930 echo "$as_me: error: Cannot determine version of db" >&2;}
24931    { (exit 1); exit 1; }; }
24932 else
24933
24934 echo "$as_me:24934: checking for db libraries" >&5
24935 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24936 if test "${cf_cv_hashed_db_libs+set}" = set; then
24937   echo $ECHO_N "(cached) $ECHO_C" >&6
24938 else
24939
24940 cf_cv_hashed_db_libs=unknown
24941 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24942 do
24943         cf_save_libs="$LIBS"
24944         if test -n "$cf_db_libs"; then
24945
24946 cf_add_libs="$LIBS"
24947 # reverse order
24948 cf_add_0lib=
24949 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24950 # filter duplicates
24951 for cf_add_1lib in $cf_add_0lib; do
24952         for cf_add_2lib in $cf_add_libs; do
24953                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24954                         cf_add_1lib=
24955                         break
24956                 fi
24957         done
24958         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24959 done
24960 LIBS="$cf_add_libs"
24961
24962         fi
24963
24964 echo "${as_me:-configure}:24964: testing checking for library $cf_db_libs ..." 1>&5
24965
24966         cat >"conftest.$ac_ext" <<_ACEOF
24967 #line 24967 "configure"
24968 #include "confdefs.h"
24969
24970 $ac_includes_default
24971 #include <db.h>
24972
24973 int
24974 main (void)
24975 {
24976
24977         char *path = "/tmp/foo";
24978 #ifdef DB_VERSION_MAJOR
24979 #if DB_VERSION_MAJOR >= 4
24980         DB *result = 0;
24981         db_create(&result, NULL, 0);
24982         result->open(result,
24983                 NULL,
24984                 path,
24985                 path,
24986                 DB_HASH,
24987                 DB_CREATE,
24988                 0644);
24989 #elif DB_VERSION_MAJOR >= 3
24990         DB *result = 0;
24991         db_create(&result, NULL, 0);
24992         result->open(result,
24993                 path,
24994                 path,
24995                 DB_HASH,
24996                 DB_CREATE,
24997                 0644);
24998 #elif DB_VERSION_MAJOR >= 2
24999         DB *result = 0;
25000         db_open(path,
25001                 DB_HASH,
25002                 DB_CREATE,
25003                 0644,
25004                 (DB_ENV *) 0,
25005                 (DB_INFO *) 0,
25006                 &result);
25007 #endif /* DB_VERSION_MAJOR */
25008 #else
25009         DB *result = dbopen(path,
25010                      2,
25011                      0644,
25012                      DB_HASH,
25013                      0);
25014 #endif
25015         ${cf_cv_main_return:-return}(result != 0)
25016
25017   ;
25018   return 0;
25019 }
25020 _ACEOF
25021 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25022 if { (eval echo "$as_me:25022: \"$ac_link\"") >&5
25023   (eval $ac_link) 2>&5
25024   ac_status=$?
25025   echo "$as_me:25025: \$? = $ac_status" >&5
25026   (exit "$ac_status"); } &&
25027          { ac_try='test -s "conftest$ac_exeext"'
25028   { (eval echo "$as_me:25028: \"$ac_try\"") >&5
25029   (eval $ac_try) 2>&5
25030   ac_status=$?
25031   echo "$as_me:25031: \$? = $ac_status" >&5
25032   (exit "$ac_status"); }; }; then
25033
25034         if test -n "$cf_db_libs" ; then
25035                 cf_cv_hashed_db_libs=$cf_db_libs
25036         else
25037                 cf_cv_hashed_db_libs=default
25038         fi
25039         LIBS="$cf_save_libs"
25040         break
25041
25042 else
25043   echo "$as_me: failed program was:" >&5
25044 cat "conftest.$ac_ext" >&5
25045 fi
25046 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25047         LIBS="$cf_save_libs"
25048 done
25049
25050 fi
25051 echo "$as_me:25051: result: $cf_cv_hashed_db_libs" >&5
25052 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
25053
25054         if test "$cf_cv_hashed_db_libs" = unknown ; then
25055                 { { echo "$as_me:25055: error: Cannot determine library for db" >&5
25056 echo "$as_me: error: Cannot determine library for db" >&2;}
25057    { (exit 1); exit 1; }; }
25058         elif test "$cf_cv_hashed_db_libs" != default ; then
25059
25060 cf_add_libs="$LIBS"
25061 # reverse order
25062 cf_add_0lib=
25063 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25064 # filter duplicates
25065 for cf_add_1lib in $cf_add_0lib; do
25066         for cf_add_2lib in $cf_add_libs; do
25067                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25068                         cf_add_1lib=
25069                         break
25070                 fi
25071         done
25072         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25073 done
25074 LIBS="$cf_add_libs"
25075
25076         fi
25077 fi
25078
25079 else
25080
25081         { { echo "$as_me:25081: error: Cannot find db.h" >&5
25082 echo "$as_me: error: Cannot find db.h" >&2;}
25083    { (exit 1); exit 1; }; }
25084
25085 fi
25086
25087 fi
25088
25089 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
25090         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25091         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
25092 fi
25093
25094 # Just in case, check if the C compiler has a bool type.
25095
25096 echo "$as_me:25096: checking if we should include stdbool.h" >&5
25097 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25098
25099 if test "${cf_cv_header_stdbool_h+set}" = set; then
25100   echo $ECHO_N "(cached) $ECHO_C" >&6
25101 else
25102
25103         cat >"conftest.$ac_ext" <<_ACEOF
25104 #line 25104 "configure"
25105 #include "confdefs.h"
25106
25107 int
25108 main (void)
25109 {
25110 bool foo = false
25111   ;
25112   return 0;
25113 }
25114 _ACEOF
25115 rm -f "conftest.$ac_objext"
25116 if { (eval echo "$as_me:25116: \"$ac_compile\"") >&5
25117   (eval $ac_compile) 2>&5
25118   ac_status=$?
25119   echo "$as_me:25119: \$? = $ac_status" >&5
25120   (exit "$ac_status"); } &&
25121          { ac_try='test -s "conftest.$ac_objext"'
25122   { (eval echo "$as_me:25122: \"$ac_try\"") >&5
25123   (eval $ac_try) 2>&5
25124   ac_status=$?
25125   echo "$as_me:25125: \$? = $ac_status" >&5
25126   (exit "$ac_status"); }; }; then
25127   cf_cv_header_stdbool_h=0
25128 else
25129   echo "$as_me: failed program was:" >&5
25130 cat "conftest.$ac_ext" >&5
25131 cat >"conftest.$ac_ext" <<_ACEOF
25132 #line 25132 "configure"
25133 #include "confdefs.h"
25134
25135 #ifndef __BEOS__
25136 #include <stdbool.h>
25137 #endif
25138
25139 int
25140 main (void)
25141 {
25142 bool foo = false
25143   ;
25144   return 0;
25145 }
25146 _ACEOF
25147 rm -f "conftest.$ac_objext"
25148 if { (eval echo "$as_me:25148: \"$ac_compile\"") >&5
25149   (eval $ac_compile) 2>&5
25150   ac_status=$?
25151   echo "$as_me:25151: \$? = $ac_status" >&5
25152   (exit "$ac_status"); } &&
25153          { ac_try='test -s "conftest.$ac_objext"'
25154   { (eval echo "$as_me:25154: \"$ac_try\"") >&5
25155   (eval $ac_try) 2>&5
25156   ac_status=$?
25157   echo "$as_me:25157: \$? = $ac_status" >&5
25158   (exit "$ac_status"); }; }; then
25159   cf_cv_header_stdbool_h=1
25160 else
25161   echo "$as_me: failed program was:" >&5
25162 cat "conftest.$ac_ext" >&5
25163 cf_cv_header_stdbool_h=0
25164 fi
25165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25166 fi
25167 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25168 fi
25169
25170 if test "$cf_cv_header_stdbool_h" = 1
25171 then    echo "$as_me:25171: result: yes" >&5
25172 echo "${ECHO_T}yes" >&6
25173 else    echo "$as_me:25173: result: no" >&5
25174 echo "${ECHO_T}no" >&6
25175 fi
25176
25177 echo "$as_me:25177: checking for builtin bool type" >&5
25178 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25179
25180 if test "${cf_cv_cc_bool_type+set}" = set; then
25181   echo $ECHO_N "(cached) $ECHO_C" >&6
25182 else
25183
25184         cat >"conftest.$ac_ext" <<_ACEOF
25185 #line 25185 "configure"
25186 #include "confdefs.h"
25187
25188 #include <stdio.h>
25189 #include <sys/types.h>
25190
25191 int
25192 main (void)
25193 {
25194 bool x = false
25195   ;
25196   return 0;
25197 }
25198 _ACEOF
25199 rm -f "conftest.$ac_objext"
25200 if { (eval echo "$as_me:25200: \"$ac_compile\"") >&5
25201   (eval $ac_compile) 2>&5
25202   ac_status=$?
25203   echo "$as_me:25203: \$? = $ac_status" >&5
25204   (exit "$ac_status"); } &&
25205          { ac_try='test -s "conftest.$ac_objext"'
25206   { (eval echo "$as_me:25206: \"$ac_try\"") >&5
25207   (eval $ac_try) 2>&5
25208   ac_status=$?
25209   echo "$as_me:25209: \$? = $ac_status" >&5
25210   (exit "$ac_status"); }; }; then
25211   cf_cv_cc_bool_type=1
25212 else
25213   echo "$as_me: failed program was:" >&5
25214 cat "conftest.$ac_ext" >&5
25215 cf_cv_cc_bool_type=0
25216 fi
25217 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25218
25219 fi
25220
25221 if test "$cf_cv_cc_bool_type" = 1
25222 then    echo "$as_me:25222: result: yes" >&5
25223 echo "${ECHO_T}yes" >&6
25224 else    echo "$as_me:25224: result: no" >&5
25225 echo "${ECHO_T}no" >&6
25226 fi
25227
25228 # Check for C++ compiler characteristics (and ensure that it's there!)
25229 if test -n "$CXX" ; then
25230         ac_ext=cc
25231 ac_cpp='$CXXCPP $CPPFLAGS'
25232 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25233 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25234 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25235 ac_main_return="return"
25236
25237 if test -n "$GXX" ; then
25238
25239         cf_save="$LIBS"
25240         LIBS="$LIBS $CXXLIBS"
25241         echo "$as_me:25241: checking if we already have C++ library" >&5
25242 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
25243         cat >"conftest.$ac_ext" <<_ACEOF
25244 #line 25244 "configure"
25245 #include "confdefs.h"
25246
25247                         #include <iostream>
25248 int
25249 main (void)
25250 {
25251
25252                         std::cout << "Hello World!" << std::endl;
25253   ;
25254   return 0;
25255 }
25256 _ACEOF
25257 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25258 if { (eval echo "$as_me:25258: \"$ac_link\"") >&5
25259   (eval $ac_link) 2>&5
25260   ac_status=$?
25261   echo "$as_me:25261: \$? = $ac_status" >&5
25262   (exit "$ac_status"); } &&
25263          { ac_try='test -s "conftest$ac_exeext"'
25264   { (eval echo "$as_me:25264: \"$ac_try\"") >&5
25265   (eval $ac_try) 2>&5
25266   ac_status=$?
25267   echo "$as_me:25267: \$? = $ac_status" >&5
25268   (exit "$ac_status"); }; }; then
25269   cf_have_libstdcpp=yes
25270 else
25271   echo "$as_me: failed program was:" >&5
25272 cat "conftest.$ac_ext" >&5
25273 cf_have_libstdcpp=no
25274 fi
25275 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25276         echo "$as_me:25276: result: $cf_have_libstdcpp" >&5
25277 echo "${ECHO_T}$cf_have_libstdcpp" >&6
25278         LIBS="$cf_save"
25279
25280         if test "$cf_have_libstdcpp" != yes
25281         then
25282                 case "$cf_cv_system_name" in
25283                 (os2*)
25284                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
25285                                 cf_stdcpp_libname=stdcpp
25286                         else
25287                                 cf_stdcpp_libname=stdc++
25288                         fi
25289                         ;;
25290                 (*)
25291                         cf_stdcpp_libname=stdc++
25292                         ;;
25293                 esac
25294
25295                 echo "$as_me:25295: checking for library $cf_stdcpp_libname" >&5
25296 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
25297 if test "${cf_cv_libstdcpp+set}" = set; then
25298   echo $ECHO_N "(cached) $ECHO_C" >&6
25299 else
25300
25301                         cf_save="$LIBS"
25302                         LIBS="$LIBS $CXXLIBS"
25303
25304 cf_add_libs="$LIBS"
25305 # reverse order
25306 cf_add_0lib=
25307 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25308 # filter duplicates
25309 for cf_add_1lib in $cf_add_0lib; do
25310         for cf_add_2lib in $cf_add_libs; do
25311                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25312                         cf_add_1lib=
25313                         break
25314                 fi
25315         done
25316         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25317 done
25318 LIBS="$cf_add_libs"
25319
25320                 cat >"conftest.$ac_ext" <<_ACEOF
25321 #line 25321 "configure"
25322 #include "confdefs.h"
25323
25324                                 #include <iostream>
25325 int
25326 main (void)
25327 {
25328
25329                                 std::cout << "Hello World!" << std::endl;
25330   ;
25331   return 0;
25332 }
25333 _ACEOF
25334 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25335 if { (eval echo "$as_me:25335: \"$ac_link\"") >&5
25336   (eval $ac_link) 2>&5
25337   ac_status=$?
25338   echo "$as_me:25338: \$? = $ac_status" >&5
25339   (exit "$ac_status"); } &&
25340          { ac_try='test -s "conftest$ac_exeext"'
25341   { (eval echo "$as_me:25341: \"$ac_try\"") >&5
25342   (eval $ac_try) 2>&5
25343   ac_status=$?
25344   echo "$as_me:25344: \$? = $ac_status" >&5
25345   (exit "$ac_status"); }; }; then
25346   cf_cv_libstdcpp=yes
25347 else
25348   echo "$as_me: failed program was:" >&5
25349 cat "conftest.$ac_ext" >&5
25350 cf_cv_libstdcpp=no
25351 fi
25352 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25353                         LIBS="$cf_save"
25354
25355 fi
25356 echo "$as_me:25356: result: $cf_cv_libstdcpp" >&5
25357 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
25358                 test "$cf_cv_libstdcpp" = yes && {
25359 cf_add_libs="$CXXLIBS"
25360 # reverse order
25361 cf_add_0lib=
25362 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25363 # filter duplicates
25364 for cf_add_1lib in $cf_add_0lib; do
25365         for cf_add_2lib in $cf_add_libs; do
25366                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25367                         cf_add_1lib=
25368                         break
25369                 fi
25370         done
25371         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25372 done
25373 CXXLIBS="$cf_add_libs"
25374  }
25375         fi
25376 fi
25377
25378         echo "$as_me:25378: checking whether $CXX understands -c and -o together" >&5
25379 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
25380 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
25381   echo $ECHO_N "(cached) $ECHO_C" >&6
25382 else
25383
25384 cat > conftest.$ac_ext <<CF_EOF
25385 int main(void)
25386 {
25387         ${cf_cv_main_return:-return}(0);
25388 }
25389 CF_EOF
25390 # We do the test twice because some compilers refuse to overwrite an
25391 # existing .o file with -o, though they will create one.
25392 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
25393 if { (eval echo "$as_me:25393: \"$ac_try\"") >&5
25394   (eval $ac_try) 2>&5
25395   ac_status=$?
25396   echo "$as_me:25396: \$? = $ac_status" >&5
25397   (exit "$ac_status"); } &&
25398   test -f conftest2.$ac_objext && { (eval echo "$as_me:25398: \"$ac_try\"") >&5
25399   (eval $ac_try) 2>&5
25400   ac_status=$?
25401   echo "$as_me:25401: \$? = $ac_status" >&5
25402   (exit "$ac_status"); };
25403 then
25404   eval cf_cv_prog_CXX_c_o=yes
25405 else
25406   eval cf_cv_prog_CXX_c_o=no
25407 fi
25408 rm -rf ./conftest*
25409
25410 fi
25411 if test "$cf_cv_prog_CXX_c_o" = yes; then
25412   echo "$as_me:25412: result: yes" >&5
25413 echo "${ECHO_T}yes" >&6
25414 else
25415   echo "$as_me:25415: result: no" >&5
25416 echo "${ECHO_T}no" >&6
25417 fi
25418
25419         case "$GXX_VERSION" in
25420         (1.*|2.[0-6]*|[1-9][0-9].*)
25421                 cf_cxx_library=yes
25422                 ;;
25423         (*-2.7*|2.7*)
25424
25425 cf_cxx_library=unknown
25426 case "$cf_cv_system_name" in
25427 (os2*)
25428         cf_gpp_libname=gpp
25429         ;;
25430 (*)
25431         cf_gpp_libname=g++
25432         ;;
25433 esac
25434 if test "$GXX" = yes; then
25435         echo "$as_me:25435: checking for lib$cf_gpp_libname" >&5
25436 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
25437         cf_save="$LIBS"
25438
25439 cf_add_libs="$LIBS"
25440 # reverse order
25441 cf_add_0lib=
25442 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25443 # filter duplicates
25444 for cf_add_1lib in $cf_add_0lib; do
25445         for cf_add_2lib in $cf_add_libs; do
25446                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25447                         cf_add_1lib=
25448                         break
25449                 fi
25450         done
25451         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25452 done
25453 LIBS="$cf_add_libs"
25454
25455         cat >"conftest.$ac_ext" <<_ACEOF
25456 #line 25456 "configure"
25457 #include "confdefs.h"
25458
25459 #include <$cf_gpp_libname/builtin.h>
25460
25461 int
25462 main (void)
25463 {
25464 two_arg_error_handler_t foo2 = lib_error_handler
25465   ;
25466   return 0;
25467 }
25468 _ACEOF
25469 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25470 if { (eval echo "$as_me:25470: \"$ac_link\"") >&5
25471   (eval $ac_link) 2>&5
25472   ac_status=$?
25473   echo "$as_me:25473: \$? = $ac_status" >&5
25474   (exit "$ac_status"); } &&
25475          { ac_try='test -s "conftest$ac_exeext"'
25476   { (eval echo "$as_me:25476: \"$ac_try\"") >&5
25477   (eval $ac_try) 2>&5
25478   ac_status=$?
25479   echo "$as_me:25479: \$? = $ac_status" >&5
25480   (exit "$ac_status"); }; }; then
25481   cf_cxx_library=yes
25482
25483 cf_add_libs="$CXXLIBS"
25484 # reverse order
25485 cf_add_0lib=
25486 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25487 # filter duplicates
25488 for cf_add_1lib in $cf_add_0lib; do
25489         for cf_add_2lib in $cf_add_libs; do
25490                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25491                         cf_add_1lib=
25492                         break
25493                 fi
25494         done
25495         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25496 done
25497 CXXLIBS="$cf_add_libs"
25498
25499          if test "$cf_gpp_libname" = cpp ; then
25500
25501 cat >>confdefs.h <<\EOF
25502 #define HAVE_GPP_BUILTIN_H 1
25503 EOF
25504
25505          else
25506
25507 cat >>confdefs.h <<\EOF
25508 #define HAVE_GXX_BUILTIN_H 1
25509 EOF
25510
25511          fi
25512 else
25513   echo "$as_me: failed program was:" >&5
25514 cat "conftest.$ac_ext" >&5
25515 cat >"conftest.$ac_ext" <<_ACEOF
25516 #line 25516 "configure"
25517 #include "confdefs.h"
25518
25519 #include <builtin.h>
25520
25521 int
25522 main (void)
25523 {
25524 two_arg_error_handler_t foo2 = lib_error_handler
25525   ;
25526   return 0;
25527 }
25528 _ACEOF
25529 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25530 if { (eval echo "$as_me:25530: \"$ac_link\"") >&5
25531   (eval $ac_link) 2>&5
25532   ac_status=$?
25533   echo "$as_me:25533: \$? = $ac_status" >&5
25534   (exit "$ac_status"); } &&
25535          { ac_try='test -s "conftest$ac_exeext"'
25536   { (eval echo "$as_me:25536: \"$ac_try\"") >&5
25537   (eval $ac_try) 2>&5
25538   ac_status=$?
25539   echo "$as_me:25539: \$? = $ac_status" >&5
25540   (exit "$ac_status"); }; }; then
25541   cf_cxx_library=yes
25542
25543 cf_add_libs="$CXXLIBS"
25544 # reverse order
25545 cf_add_0lib=
25546 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25547 # filter duplicates
25548 for cf_add_1lib in $cf_add_0lib; do
25549         for cf_add_2lib in $cf_add_libs; do
25550                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25551                         cf_add_1lib=
25552                         break
25553                 fi
25554         done
25555         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25556 done
25557 CXXLIBS="$cf_add_libs"
25558
25559 cat >>confdefs.h <<\EOF
25560 #define HAVE_BUILTIN_H 1
25561 EOF
25562
25563 else
25564   echo "$as_me: failed program was:" >&5
25565 cat "conftest.$ac_ext" >&5
25566 cf_cxx_library=no
25567 fi
25568 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25569 fi
25570 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25571         LIBS="$cf_save"
25572         echo "$as_me:25572: result: $cf_cxx_library" >&5
25573 echo "${ECHO_T}$cf_cxx_library" >&6
25574 fi
25575
25576                 ;;
25577         (*)
25578                 cf_cxx_library=no
25579                 ;;
25580         esac
25581
25582         ac_ext=cc
25583 ac_cpp='$CXXCPP $CPPFLAGS'
25584 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25585 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25586 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25587 ac_main_return="return"
25588 echo "$as_me:25588: checking how to run the C++ preprocessor" >&5
25589 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25590 if test -z "$CXXCPP"; then
25591   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25592   echo $ECHO_N "(cached) $ECHO_C" >&6
25593 else
25594       # Double quotes because CXXCPP needs to be expanded
25595     for CXXCPP in "$CXX -E" "/lib/cpp"
25596     do
25597       ac_preproc_ok=false
25598 for ac_cxx_preproc_warn_flag in '' yes
25599 do
25600   # Use a header file that comes with gcc, so configuring glibc
25601   # with a fresh cross-compiler works.
25602   # On the NeXT, cc -E runs the code through the compiler's parser,
25603   # not just through cpp. "Syntax error" is here to catch this case.
25604   cat >"conftest.$ac_ext" <<_ACEOF
25605 #line 25605 "configure"
25606 #include "confdefs.h"
25607 #include <assert.h>
25608                      Syntax error
25609 _ACEOF
25610 if { (eval echo "$as_me:25610: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25611   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25612   ac_status=$?
25613   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25614   rm -f conftest.er1
25615   cat conftest.err >&5
25616   echo "$as_me:25616: \$? = $ac_status" >&5
25617   (exit "$ac_status"); } >/dev/null; then
25618   if test -s conftest.err; then
25619     ac_cpp_err=$ac_cxx_preproc_warn_flag
25620   else
25621     ac_cpp_err=
25622   fi
25623 else
25624   ac_cpp_err=yes
25625 fi
25626 if test -z "$ac_cpp_err"; then
25627   :
25628 else
25629   echo "$as_me: failed program was:" >&5
25630   cat "conftest.$ac_ext" >&5
25631   # Broken: fails on valid input.
25632 continue
25633 fi
25634 rm -f conftest.err "conftest.$ac_ext"
25635
25636   # OK, works on sane cases.  Now check whether non-existent headers
25637   # can be detected and how.
25638   cat >"conftest.$ac_ext" <<_ACEOF
25639 #line 25639 "configure"
25640 #include "confdefs.h"
25641 #include <ac_nonexistent.h>
25642 _ACEOF
25643 if { (eval echo "$as_me:25643: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25644   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25645   ac_status=$?
25646   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25647   rm -f conftest.er1
25648   cat conftest.err >&5
25649   echo "$as_me:25649: \$? = $ac_status" >&5
25650   (exit "$ac_status"); } >/dev/null; then
25651   if test -s conftest.err; then
25652     ac_cpp_err=$ac_cxx_preproc_warn_flag
25653   else
25654     ac_cpp_err=
25655   fi
25656 else
25657   ac_cpp_err=yes
25658 fi
25659 if test -z "$ac_cpp_err"; then
25660   # Broken: success on invalid input.
25661 continue
25662 else
25663   echo "$as_me: failed program was:" >&5
25664   cat "conftest.$ac_ext" >&5
25665   # Passes both tests.
25666 ac_preproc_ok=:
25667 break
25668 fi
25669 rm -f conftest.err "conftest.$ac_ext"
25670
25671 done
25672 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25673 rm -f conftest.err "conftest.$ac_ext"
25674 if $ac_preproc_ok; then
25675   break
25676 fi
25677
25678     done
25679     ac_cv_prog_CXXCPP=$CXXCPP
25680
25681 fi
25682   CXXCPP=$ac_cv_prog_CXXCPP
25683 else
25684   ac_cv_prog_CXXCPP=$CXXCPP
25685 fi
25686 echo "$as_me:25686: result: $CXXCPP" >&5
25687 echo "${ECHO_T}$CXXCPP" >&6
25688 ac_preproc_ok=false
25689 for ac_cxx_preproc_warn_flag in '' yes
25690 do
25691   # Use a header file that comes with gcc, so configuring glibc
25692   # with a fresh cross-compiler works.
25693   # On the NeXT, cc -E runs the code through the compiler's parser,
25694   # not just through cpp. "Syntax error" is here to catch this case.
25695   cat >"conftest.$ac_ext" <<_ACEOF
25696 #line 25696 "configure"
25697 #include "confdefs.h"
25698 #include <assert.h>
25699                      Syntax error
25700 _ACEOF
25701 if { (eval echo "$as_me:25701: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25702   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25703   ac_status=$?
25704   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25705   rm -f conftest.er1
25706   cat conftest.err >&5
25707   echo "$as_me:25707: \$? = $ac_status" >&5
25708   (exit "$ac_status"); } >/dev/null; then
25709   if test -s conftest.err; then
25710     ac_cpp_err=$ac_cxx_preproc_warn_flag
25711   else
25712     ac_cpp_err=
25713   fi
25714 else
25715   ac_cpp_err=yes
25716 fi
25717 if test -z "$ac_cpp_err"; then
25718   :
25719 else
25720   echo "$as_me: failed program was:" >&5
25721   cat "conftest.$ac_ext" >&5
25722   # Broken: fails on valid input.
25723 continue
25724 fi
25725 rm -f conftest.err "conftest.$ac_ext"
25726
25727   # OK, works on sane cases.  Now check whether non-existent headers
25728   # can be detected and how.
25729   cat >"conftest.$ac_ext" <<_ACEOF
25730 #line 25730 "configure"
25731 #include "confdefs.h"
25732 #include <ac_nonexistent.h>
25733 _ACEOF
25734 if { (eval echo "$as_me:25734: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25735   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25736   ac_status=$?
25737   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25738   rm -f conftest.er1
25739   cat conftest.err >&5
25740   echo "$as_me:25740: \$? = $ac_status" >&5
25741   (exit "$ac_status"); } >/dev/null; then
25742   if test -s conftest.err; then
25743     ac_cpp_err=$ac_cxx_preproc_warn_flag
25744   else
25745     ac_cpp_err=
25746   fi
25747 else
25748   ac_cpp_err=yes
25749 fi
25750 if test -z "$ac_cpp_err"; then
25751   # Broken: success on invalid input.
25752 continue
25753 else
25754   echo "$as_me: failed program was:" >&5
25755   cat "conftest.$ac_ext" >&5
25756   # Passes both tests.
25757 ac_preproc_ok=:
25758 break
25759 fi
25760 rm -f conftest.err "conftest.$ac_ext"
25761
25762 done
25763 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25764 rm -f conftest.err "conftest.$ac_ext"
25765 if $ac_preproc_ok; then
25766   :
25767 else
25768   { { echo "$as_me:25768: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25769 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25770    { (exit 1); exit 1; }; }
25771 fi
25772
25773 ac_ext=cc
25774 ac_cpp='$CXXCPP $CPPFLAGS'
25775 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25776 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25777 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25778 ac_main_return="return"
25779
25780 for ac_header in typeinfo
25781 do
25782 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25783 echo "$as_me:25783: checking for $ac_header" >&5
25784 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25785 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25786   echo $ECHO_N "(cached) $ECHO_C" >&6
25787 else
25788   cat >"conftest.$ac_ext" <<_ACEOF
25789 #line 25789 "configure"
25790 #include "confdefs.h"
25791 #include <$ac_header>
25792 _ACEOF
25793 if { (eval echo "$as_me:25793: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25794   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25795   ac_status=$?
25796   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25797   rm -f conftest.er1
25798   cat conftest.err >&5
25799   echo "$as_me:25799: \$? = $ac_status" >&5
25800   (exit "$ac_status"); } >/dev/null; then
25801   if test -s conftest.err; then
25802     ac_cpp_err=$ac_cxx_preproc_warn_flag
25803   else
25804     ac_cpp_err=
25805   fi
25806 else
25807   ac_cpp_err=yes
25808 fi
25809 if test -z "$ac_cpp_err"; then
25810   eval "$as_ac_Header=yes"
25811 else
25812   echo "$as_me: failed program was:" >&5
25813   cat "conftest.$ac_ext" >&5
25814   eval "$as_ac_Header=no"
25815 fi
25816 rm -f conftest.err "conftest.$ac_ext"
25817 fi
25818 echo "$as_me:25818: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25819 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25820 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25821   cat >>confdefs.h <<EOF
25822 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25823 EOF
25824
25825 fi
25826 done
25827
25828 for ac_header in iostream
25829 do
25830 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25831 echo "$as_me:25831: checking for $ac_header" >&5
25832 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25833 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25834   echo $ECHO_N "(cached) $ECHO_C" >&6
25835 else
25836   cat >"conftest.$ac_ext" <<_ACEOF
25837 #line 25837 "configure"
25838 #include "confdefs.h"
25839 #include <$ac_header>
25840 _ACEOF
25841 if { (eval echo "$as_me:25841: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25842   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25843   ac_status=$?
25844   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25845   rm -f conftest.er1
25846   cat conftest.err >&5
25847   echo "$as_me:25847: \$? = $ac_status" >&5
25848   (exit "$ac_status"); } >/dev/null; then
25849   if test -s conftest.err; then
25850     ac_cpp_err=$ac_cxx_preproc_warn_flag
25851   else
25852     ac_cpp_err=
25853   fi
25854 else
25855   ac_cpp_err=yes
25856 fi
25857 if test -z "$ac_cpp_err"; then
25858   eval "$as_ac_Header=yes"
25859 else
25860   echo "$as_me: failed program was:" >&5
25861   cat "conftest.$ac_ext" >&5
25862   eval "$as_ac_Header=no"
25863 fi
25864 rm -f conftest.err "conftest.$ac_ext"
25865 fi
25866 echo "$as_me:25866: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25867 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25868 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25869   cat >>confdefs.h <<EOF
25870 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25871 EOF
25872
25873 fi
25874 done
25875
25876 if test x"$ac_cv_header_iostream" = xyes ; then
25877         echo "$as_me:25877: checking if iostream uses std-namespace" >&5
25878 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25879         cat >"conftest.$ac_ext" <<_ACEOF
25880 #line 25880 "configure"
25881 #include "confdefs.h"
25882
25883 #include <iostream>
25884 using std::endl;
25885 using std::cerr;
25886 int
25887 main (void)
25888 {
25889
25890 cerr << "testing" << endl;
25891
25892   ;
25893   return 0;
25894 }
25895 _ACEOF
25896 rm -f "conftest.$ac_objext"
25897 if { (eval echo "$as_me:25897: \"$ac_compile\"") >&5
25898   (eval $ac_compile) 2>&5
25899   ac_status=$?
25900   echo "$as_me:25900: \$? = $ac_status" >&5
25901   (exit "$ac_status"); } &&
25902          { ac_try='test -s "conftest.$ac_objext"'
25903   { (eval echo "$as_me:25903: \"$ac_try\"") >&5
25904   (eval $ac_try) 2>&5
25905   ac_status=$?
25906   echo "$as_me:25906: \$? = $ac_status" >&5
25907   (exit "$ac_status"); }; }; then
25908   cf_iostream_namespace=yes
25909 else
25910   echo "$as_me: failed program was:" >&5
25911 cat "conftest.$ac_ext" >&5
25912 cf_iostream_namespace=no
25913 fi
25914 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25915         echo "$as_me:25915: result: $cf_iostream_namespace" >&5
25916 echo "${ECHO_T}$cf_iostream_namespace" >&6
25917         if test "$cf_iostream_namespace" = yes ; then
25918
25919 cat >>confdefs.h <<\EOF
25920 #define IOSTREAM_NAMESPACE 1
25921 EOF
25922
25923         fi
25924 fi
25925
25926 echo "$as_me:25926: checking if we should include stdbool.h" >&5
25927 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25928
25929 if test "${cf_cv_header_stdbool_h+set}" = set; then
25930   echo $ECHO_N "(cached) $ECHO_C" >&6
25931 else
25932
25933         cat >"conftest.$ac_ext" <<_ACEOF
25934 #line 25934 "configure"
25935 #include "confdefs.h"
25936
25937 int
25938 main (void)
25939 {
25940 bool foo = false
25941   ;
25942   return 0;
25943 }
25944 _ACEOF
25945 rm -f "conftest.$ac_objext"
25946 if { (eval echo "$as_me:25946: \"$ac_compile\"") >&5
25947   (eval $ac_compile) 2>&5
25948   ac_status=$?
25949   echo "$as_me:25949: \$? = $ac_status" >&5
25950   (exit "$ac_status"); } &&
25951          { ac_try='test -s "conftest.$ac_objext"'
25952   { (eval echo "$as_me:25952: \"$ac_try\"") >&5
25953   (eval $ac_try) 2>&5
25954   ac_status=$?
25955   echo "$as_me:25955: \$? = $ac_status" >&5
25956   (exit "$ac_status"); }; }; then
25957   cf_cv_header_stdbool_h=0
25958 else
25959   echo "$as_me: failed program was:" >&5
25960 cat "conftest.$ac_ext" >&5
25961 cat >"conftest.$ac_ext" <<_ACEOF
25962 #line 25962 "configure"
25963 #include "confdefs.h"
25964
25965 #ifndef __BEOS__
25966 #include <stdbool.h>
25967 #endif
25968
25969 int
25970 main (void)
25971 {
25972 bool foo = false
25973   ;
25974   return 0;
25975 }
25976 _ACEOF
25977 rm -f "conftest.$ac_objext"
25978 if { (eval echo "$as_me:25978: \"$ac_compile\"") >&5
25979   (eval $ac_compile) 2>&5
25980   ac_status=$?
25981   echo "$as_me:25981: \$? = $ac_status" >&5
25982   (exit "$ac_status"); } &&
25983          { ac_try='test -s "conftest.$ac_objext"'
25984   { (eval echo "$as_me:25984: \"$ac_try\"") >&5
25985   (eval $ac_try) 2>&5
25986   ac_status=$?
25987   echo "$as_me:25987: \$? = $ac_status" >&5
25988   (exit "$ac_status"); }; }; then
25989   cf_cv_header_stdbool_h=1
25990 else
25991   echo "$as_me: failed program was:" >&5
25992 cat "conftest.$ac_ext" >&5
25993 cf_cv_header_stdbool_h=0
25994 fi
25995 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25996 fi
25997 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25998 fi
25999
26000 if test "$cf_cv_header_stdbool_h" = 1
26001 then    echo "$as_me:26001: result: yes" >&5
26002 echo "${ECHO_T}yes" >&6
26003 else    echo "$as_me:26003: result: no" >&5
26004 echo "${ECHO_T}no" >&6
26005 fi
26006
26007 echo "$as_me:26007: checking for builtin bool type" >&5
26008 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
26009
26010 if test "${cf_cv_builtin_bool+set}" = set; then
26011   echo $ECHO_N "(cached) $ECHO_C" >&6
26012 else
26013
26014         cat >"conftest.$ac_ext" <<_ACEOF
26015 #line 26015 "configure"
26016 #include "confdefs.h"
26017
26018 #include <stdio.h>
26019 #include <sys/types.h>
26020
26021 int
26022 main (void)
26023 {
26024 bool x = false
26025   ;
26026   return 0;
26027 }
26028 _ACEOF
26029 rm -f "conftest.$ac_objext"
26030 if { (eval echo "$as_me:26030: \"$ac_compile\"") >&5
26031   (eval $ac_compile) 2>&5
26032   ac_status=$?
26033   echo "$as_me:26033: \$? = $ac_status" >&5
26034   (exit "$ac_status"); } &&
26035          { ac_try='test -s "conftest.$ac_objext"'
26036   { (eval echo "$as_me:26036: \"$ac_try\"") >&5
26037   (eval $ac_try) 2>&5
26038   ac_status=$?
26039   echo "$as_me:26039: \$? = $ac_status" >&5
26040   (exit "$ac_status"); }; }; then
26041   cf_cv_builtin_bool=1
26042 else
26043   echo "$as_me: failed program was:" >&5
26044 cat "conftest.$ac_ext" >&5
26045 cf_cv_builtin_bool=0
26046 fi
26047 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26048
26049 fi
26050
26051 if test "$cf_cv_builtin_bool" = 1
26052 then    echo "$as_me:26052: result: yes" >&5
26053 echo "${ECHO_T}yes" >&6
26054 else    echo "$as_me:26054: result: no" >&5
26055 echo "${ECHO_T}no" >&6
26056 fi
26057
26058 echo "$as_me:26058: checking for bool" >&5
26059 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26060 if test "${ac_cv_type_bool+set}" = set; then
26061   echo $ECHO_N "(cached) $ECHO_C" >&6
26062 else
26063   cat >"conftest.$ac_ext" <<_ACEOF
26064 #line 26064 "configure"
26065 #include "confdefs.h"
26066
26067 $ac_includes_default
26068
26069 #if defined(__cplusplus)
26070
26071 #ifdef HAVE_GXX_BUILTIN_H
26072 #include <g++/builtin.h>
26073 #elif HAVE_GPP_BUILTIN_H
26074 #include <gpp/builtin.h>
26075 #elif HAVE_BUILTIN_H
26076 #include <builtin.h>
26077 #endif
26078
26079 #else
26080
26081 #if $cf_cv_header_stdbool_h
26082 #include <stdbool.h>
26083 #endif
26084
26085 #endif
26086
26087 int
26088 main (void)
26089 {
26090 if ((bool *) 0)
26091   return 0;
26092 if (sizeof (bool))
26093   return 0;
26094   ;
26095   return 0;
26096 }
26097 _ACEOF
26098 rm -f "conftest.$ac_objext"
26099 if { (eval echo "$as_me:26099: \"$ac_compile\"") >&5
26100   (eval $ac_compile) 2>&5
26101   ac_status=$?
26102   echo "$as_me:26102: \$? = $ac_status" >&5
26103   (exit "$ac_status"); } &&
26104          { ac_try='test -s "conftest.$ac_objext"'
26105   { (eval echo "$as_me:26105: \"$ac_try\"") >&5
26106   (eval $ac_try) 2>&5
26107   ac_status=$?
26108   echo "$as_me:26108: \$? = $ac_status" >&5
26109   (exit "$ac_status"); }; }; then
26110   ac_cv_type_bool=yes
26111 else
26112   echo "$as_me: failed program was:" >&5
26113 cat "conftest.$ac_ext" >&5
26114 ac_cv_type_bool=no
26115 fi
26116 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26117 fi
26118 echo "$as_me:26118: result: $ac_cv_type_bool" >&5
26119 echo "${ECHO_T}$ac_cv_type_bool" >&6
26120
26121 echo "$as_me:26121: checking size of bool" >&5
26122 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26123 if test "${ac_cv_sizeof_bool+set}" = set; then
26124   echo $ECHO_N "(cached) $ECHO_C" >&6
26125 else
26126   if test "$ac_cv_type_bool" = yes; then
26127   if test "$cross_compiling" = yes; then
26128   # Depending upon the size, compute the lo and hi bounds.
26129 cat >"conftest.$ac_ext" <<_ACEOF
26130 #line 26130 "configure"
26131 #include "confdefs.h"
26132
26133 $ac_includes_default
26134
26135 #if defined(__cplusplus)
26136
26137 #ifdef HAVE_GXX_BUILTIN_H
26138 #include <g++/builtin.h>
26139 #elif HAVE_GPP_BUILTIN_H
26140 #include <gpp/builtin.h>
26141 #elif HAVE_BUILTIN_H
26142 #include <builtin.h>
26143 #endif
26144
26145 #else
26146
26147 #if $cf_cv_header_stdbool_h
26148 #include <stdbool.h>
26149 #endif
26150
26151 #endif
26152
26153 int
26154 main (void)
26155 {
26156 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26157   ;
26158   return 0;
26159 }
26160 _ACEOF
26161 rm -f "conftest.$ac_objext"
26162 if { (eval echo "$as_me:26162: \"$ac_compile\"") >&5
26163   (eval $ac_compile) 2>&5
26164   ac_status=$?
26165   echo "$as_me:26165: \$? = $ac_status" >&5
26166   (exit "$ac_status"); } &&
26167          { ac_try='test -s "conftest.$ac_objext"'
26168   { (eval echo "$as_me:26168: \"$ac_try\"") >&5
26169   (eval $ac_try) 2>&5
26170   ac_status=$?
26171   echo "$as_me:26171: \$? = $ac_status" >&5
26172   (exit "$ac_status"); }; }; then
26173   ac_lo=0 ac_mid=0
26174   while :; do
26175     cat >"conftest.$ac_ext" <<_ACEOF
26176 #line 26176 "configure"
26177 #include "confdefs.h"
26178
26179 $ac_includes_default
26180
26181 #if defined(__cplusplus)
26182
26183 #ifdef HAVE_GXX_BUILTIN_H
26184 #include <g++/builtin.h>
26185 #elif HAVE_GPP_BUILTIN_H
26186 #include <gpp/builtin.h>
26187 #elif HAVE_BUILTIN_H
26188 #include <builtin.h>
26189 #endif
26190
26191 #else
26192
26193 #if $cf_cv_header_stdbool_h
26194 #include <stdbool.h>
26195 #endif
26196
26197 #endif
26198
26199 int
26200 main (void)
26201 {
26202 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26203   ;
26204   return 0;
26205 }
26206 _ACEOF
26207 rm -f "conftest.$ac_objext"
26208 if { (eval echo "$as_me:26208: \"$ac_compile\"") >&5
26209   (eval $ac_compile) 2>&5
26210   ac_status=$?
26211   echo "$as_me:26211: \$? = $ac_status" >&5
26212   (exit "$ac_status"); } &&
26213          { ac_try='test -s "conftest.$ac_objext"'
26214   { (eval echo "$as_me:26214: \"$ac_try\"") >&5
26215   (eval $ac_try) 2>&5
26216   ac_status=$?
26217   echo "$as_me:26217: \$? = $ac_status" >&5
26218   (exit "$ac_status"); }; }; then
26219   ac_hi=$ac_mid; break
26220 else
26221   echo "$as_me: failed program was:" >&5
26222 cat "conftest.$ac_ext" >&5
26223 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26224 fi
26225 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26226   done
26227 else
26228   echo "$as_me: failed program was:" >&5
26229 cat "conftest.$ac_ext" >&5
26230 ac_hi=-1 ac_mid=-1
26231   while :; do
26232     cat >"conftest.$ac_ext" <<_ACEOF
26233 #line 26233 "configure"
26234 #include "confdefs.h"
26235
26236 $ac_includes_default
26237
26238 #if defined(__cplusplus)
26239
26240 #ifdef HAVE_GXX_BUILTIN_H
26241 #include <g++/builtin.h>
26242 #elif HAVE_GPP_BUILTIN_H
26243 #include <gpp/builtin.h>
26244 #elif HAVE_BUILTIN_H
26245 #include <builtin.h>
26246 #endif
26247
26248 #else
26249
26250 #if $cf_cv_header_stdbool_h
26251 #include <stdbool.h>
26252 #endif
26253
26254 #endif
26255
26256 int
26257 main (void)
26258 {
26259 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26260   ;
26261   return 0;
26262 }
26263 _ACEOF
26264 rm -f "conftest.$ac_objext"
26265 if { (eval echo "$as_me:26265: \"$ac_compile\"") >&5
26266   (eval $ac_compile) 2>&5
26267   ac_status=$?
26268   echo "$as_me:26268: \$? = $ac_status" >&5
26269   (exit "$ac_status"); } &&
26270          { ac_try='test -s "conftest.$ac_objext"'
26271   { (eval echo "$as_me:26271: \"$ac_try\"") >&5
26272   (eval $ac_try) 2>&5
26273   ac_status=$?
26274   echo "$as_me:26274: \$? = $ac_status" >&5
26275   (exit "$ac_status"); }; }; then
26276   ac_lo=$ac_mid; break
26277 else
26278   echo "$as_me: failed program was:" >&5
26279 cat "conftest.$ac_ext" >&5
26280 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26281 fi
26282 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26283   done
26284 fi
26285 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26286 # Binary search between lo and hi bounds.
26287 while test "x$ac_lo" != "x$ac_hi"; do
26288   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26289   cat >"conftest.$ac_ext" <<_ACEOF
26290 #line 26290 "configure"
26291 #include "confdefs.h"
26292
26293 $ac_includes_default
26294
26295 #if defined(__cplusplus)
26296
26297 #ifdef HAVE_GXX_BUILTIN_H
26298 #include <g++/builtin.h>
26299 #elif HAVE_GPP_BUILTIN_H
26300 #include <gpp/builtin.h>
26301 #elif HAVE_BUILTIN_H
26302 #include <builtin.h>
26303 #endif
26304
26305 #else
26306
26307 #if $cf_cv_header_stdbool_h
26308 #include <stdbool.h>
26309 #endif
26310
26311 #endif
26312
26313 int
26314 main (void)
26315 {
26316 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26317   ;
26318   return 0;
26319 }
26320 _ACEOF
26321 rm -f "conftest.$ac_objext"
26322 if { (eval echo "$as_me:26322: \"$ac_compile\"") >&5
26323   (eval $ac_compile) 2>&5
26324   ac_status=$?
26325   echo "$as_me:26325: \$? = $ac_status" >&5
26326   (exit "$ac_status"); } &&
26327          { ac_try='test -s "conftest.$ac_objext"'
26328   { (eval echo "$as_me:26328: \"$ac_try\"") >&5
26329   (eval $ac_try) 2>&5
26330   ac_status=$?
26331   echo "$as_me:26331: \$? = $ac_status" >&5
26332   (exit "$ac_status"); }; }; then
26333   ac_hi=$ac_mid
26334 else
26335   echo "$as_me: failed program was:" >&5
26336 cat "conftest.$ac_ext" >&5
26337 ac_lo=`expr "$ac_mid" + 1`
26338 fi
26339 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26340 done
26341 ac_cv_sizeof_bool=$ac_lo
26342 else
26343   if test "$cross_compiling" = yes; then
26344   { { echo "$as_me:26344: error: cannot run test program while cross compiling" >&5
26345 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26346    { (exit 1); exit 1; }; }
26347 else
26348   cat >"conftest.$ac_ext" <<_ACEOF
26349 #line 26349 "configure"
26350 #include "confdefs.h"
26351
26352 $ac_includes_default
26353
26354 #if defined(__cplusplus)
26355
26356 #ifdef HAVE_GXX_BUILTIN_H
26357 #include <g++/builtin.h>
26358 #elif HAVE_GPP_BUILTIN_H
26359 #include <gpp/builtin.h>
26360 #elif HAVE_BUILTIN_H
26361 #include <builtin.h>
26362 #endif
26363
26364 #else
26365
26366 #if $cf_cv_header_stdbool_h
26367 #include <stdbool.h>
26368 #endif
26369
26370 #endif
26371
26372 int
26373 main (void)
26374 {
26375 FILE *f = fopen ("conftest.val", "w");
26376 if (!f)
26377   $ac_main_return (1);
26378 fprintf (f, "%ld", (long)(sizeof (bool)));
26379 fclose (f);
26380   ;
26381   return 0;
26382 }
26383 _ACEOF
26384 rm -f "conftest$ac_exeext"
26385 if { (eval echo "$as_me:26385: \"$ac_link\"") >&5
26386   (eval $ac_link) 2>&5
26387   ac_status=$?
26388   echo "$as_me:26388: \$? = $ac_status" >&5
26389   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26390   { (eval echo "$as_me:26390: \"$ac_try\"") >&5
26391   (eval $ac_try) 2>&5
26392   ac_status=$?
26393   echo "$as_me:26393: \$? = $ac_status" >&5
26394   (exit "$ac_status"); }; }; then
26395   ac_cv_sizeof_bool=`cat conftest.val`
26396 else
26397   echo "$as_me: program exited with status $ac_status" >&5
26398 echo "$as_me: failed program was:" >&5
26399 cat "conftest.$ac_ext" >&5
26400 fi
26401 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26402 fi
26403 fi
26404 rm -f conftest.val
26405 else
26406   ac_cv_sizeof_bool=0
26407 fi
26408 fi
26409 echo "$as_me:26409: result: $ac_cv_sizeof_bool" >&5
26410 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26411 cat >>confdefs.h <<EOF
26412 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26413 EOF
26414
26415 echo "$as_me:26415: checking for type of bool" >&5
26416 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26417 if test "${cf_cv_type_of_bool+set}" = set; then
26418   echo $ECHO_N "(cached) $ECHO_C" >&6
26419 else
26420
26421         rm -f cf_test.out
26422         if test "$cross_compiling" = yes; then
26423
26424                 case x$ac_cv_sizeof_bool in
26425                 (x1) cf_cv_type_of_bool="unsigned char";;
26426                 (x2) cf_cv_type_of_bool="unsigned short";;
26427                 (x4) cf_cv_type_of_bool="unsigned int";;
26428                 (x8) cf_cv_type_of_bool="unsigned long";;
26429                 (*)  cf_cv_type_of_bool=unknown;;
26430                 esac
26431
26432 else
26433   cat >"conftest.$ac_ext" <<_ACEOF
26434 #line 26434 "configure"
26435 #include "confdefs.h"
26436
26437 $ac_includes_default
26438
26439 #if defined(__cplusplus)
26440
26441 #ifdef HAVE_GXX_BUILTIN_H
26442 #include <g++/builtin.h>
26443 #elif HAVE_GPP_BUILTIN_H
26444 #include <gpp/builtin.h>
26445 #elif HAVE_BUILTIN_H
26446 #include <builtin.h>
26447 #endif
26448
26449 #else
26450
26451 #if $cf_cv_header_stdbool_h
26452 #include <stdbool.h>
26453 #endif
26454
26455 #endif
26456
26457 int main(void)
26458 {
26459         FILE *fp = fopen("cf_test.out", "w");
26460         if (fp != 0) {
26461                 bool x = true;
26462                 if ((bool)(-x) >= 0)
26463                         fputs("unsigned ", fp);
26464                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26465                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26466                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26467                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26468                 fclose(fp);
26469         }
26470         ${cf_cv_main_return:-return}(0);
26471 }
26472
26473 _ACEOF
26474 rm -f "conftest$ac_exeext"
26475 if { (eval echo "$as_me:26475: \"$ac_link\"") >&5
26476   (eval $ac_link) 2>&5
26477   ac_status=$?
26478   echo "$as_me:26478: \$? = $ac_status" >&5
26479   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26480   { (eval echo "$as_me:26480: \"$ac_try\"") >&5
26481   (eval $ac_try) 2>&5
26482   ac_status=$?
26483   echo "$as_me:26483: \$? = $ac_status" >&5
26484   (exit "$ac_status"); }; }; then
26485   cf_cv_type_of_bool=`cat cf_test.out`
26486                  if test -z "$cf_cv_type_of_bool"; then
26487                    cf_cv_type_of_bool=unknown
26488                  fi
26489 else
26490   echo "$as_me: program exited with status $ac_status" >&5
26491 echo "$as_me: failed program was:" >&5
26492 cat "conftest.$ac_ext" >&5
26493 cf_cv_type_of_bool=unknown
26494 fi
26495 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26496 fi
26497         rm -f cf_test.out
26498
26499 fi
26500 echo "$as_me:26500: result: $cf_cv_type_of_bool" >&5
26501 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26502
26503 if test "$cf_cv_type_of_bool" = unknown ; then
26504         case .$NCURSES_BOOL in
26505         (.auto|.) NCURSES_BOOL=unsigned;;
26506         esac
26507         { echo "$as_me:26507: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26508 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26509         cf_cv_type_of_bool=$NCURSES_BOOL
26510 fi
26511
26512 echo "$as_me:26512: checking for special defines needed for etip.h" >&5
26513 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
26514 cf_save_CXXFLAGS="$CXXFLAGS"
26515 cf_result="none"
26516
26517 # etip.h includes ncurses.h which includes ncurses_dll.h
26518 # But ncurses_dll.h is generated - fix here.
26519 test -d include || mkdir include
26520 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
26521
26522 for cf_math in "" MATH_H
26523 do
26524 for cf_excp in "" MATH_EXCEPTION
26525 do
26526         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26527         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26528         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26529 cat >"conftest.$ac_ext" <<_ACEOF
26530 #line 26530 "configure"
26531 #include "confdefs.h"
26532
26533 #include <etip.h.in>
26534
26535 int
26536 main (void)
26537 {
26538
26539   ;
26540   return 0;
26541 }
26542 _ACEOF
26543 rm -f "conftest.$ac_objext"
26544 if { (eval echo "$as_me:26544: \"$ac_compile\"") >&5
26545   (eval $ac_compile) 2>&5
26546   ac_status=$?
26547   echo "$as_me:26547: \$? = $ac_status" >&5
26548   (exit "$ac_status"); } &&
26549          { ac_try='test -s "conftest.$ac_objext"'
26550   { (eval echo "$as_me:26550: \"$ac_try\"") >&5
26551   (eval $ac_try) 2>&5
26552   ac_status=$?
26553   echo "$as_me:26553: \$? = $ac_status" >&5
26554   (exit "$ac_status"); }; }; then
26555
26556         test -n "$cf_math" && cat >>confdefs.h <<EOF
26557 #define ETIP_NEEDS_${cf_math} 1
26558 EOF
26559
26560         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26561 #define ETIP_NEEDS_${cf_excp} 1
26562 EOF
26563
26564         cf_result="$cf_math $cf_excp"
26565         break 2
26566
26567 else
26568   echo "$as_me: failed program was:" >&5
26569 cat "conftest.$ac_ext" >&5
26570 fi
26571 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26572 done
26573 done
26574 echo "$as_me:26574: result: ${cf_result:-(none)}" >&5
26575 echo "${ECHO_T}${cf_result:-(none)}" >&6
26576 CXXFLAGS="$cf_save_CXXFLAGS"
26577
26578 if test -n "$CXX"; then
26579 echo "$as_me:26579: checking if $CXX accepts override keyword" >&5
26580 echo $ECHO_N "checking if $CXX accepts override keyword... $ECHO_C" >&6
26581 if test "${cf_cv_cpp_override+set}" = set; then
26582   echo $ECHO_N "(cached) $ECHO_C" >&6
26583 else
26584
26585         ac_ext=cc
26586 ac_cpp='$CXXCPP $CPPFLAGS'
26587 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26588 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26589 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26590 ac_main_return="return"
26591
26592         if test "$cross_compiling" = yes; then
26593   cf_cv_cpp_override=unknown
26594 else
26595   cat >"conftest.$ac_ext" <<_ACEOF
26596 #line 26596 "configure"
26597 #include "confdefs.h"
26598
26599 class base
26600 {
26601 public:
26602         virtual int foo(float x) = 0;
26603 };
26604
26605 class derived: public base
26606 {
26607 public:
26608         int foo(float x) override { return x != 0.0 ? 1 : 0; }
26609 };
26610
26611 int main(void) { }
26612
26613 _ACEOF
26614 rm -f "conftest$ac_exeext"
26615 if { (eval echo "$as_me:26615: \"$ac_link\"") >&5
26616   (eval $ac_link) 2>&5
26617   ac_status=$?
26618   echo "$as_me:26618: \$? = $ac_status" >&5
26619   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26620   { (eval echo "$as_me:26620: \"$ac_try\"") >&5
26621   (eval $ac_try) 2>&5
26622   ac_status=$?
26623   echo "$as_me:26623: \$? = $ac_status" >&5
26624   (exit "$ac_status"); }; }; then
26625   cf_cv_cpp_override=yes
26626 else
26627   echo "$as_me: program exited with status $ac_status" >&5
26628 echo "$as_me: failed program was:" >&5
26629 cat "conftest.$ac_ext" >&5
26630 cf_cv_cpp_override=no
26631 fi
26632 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26633 fi
26634         ac_ext=cc
26635 ac_cpp='$CXXCPP $CPPFLAGS'
26636 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26637 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26638 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26639 ac_main_return="return"
26640
26641 fi
26642 echo "$as_me:26642: result: $cf_cv_cpp_override" >&5
26643 echo "${ECHO_T}$cf_cv_cpp_override" >&6
26644 fi
26645 test "$cf_cv_cpp_override" = yes &&
26646 cat >>confdefs.h <<\EOF
26647 #define CPP_HAS_OVERRIDE 1
26648 EOF
26649
26650 if test -n "$CXX"; then
26651 echo "$as_me:26651: checking if $CXX accepts parameter initialization" >&5
26652 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26653 if test "${cf_cv_cpp_param_init+set}" = set; then
26654   echo $ECHO_N "(cached) $ECHO_C" >&6
26655 else
26656
26657         ac_ext=cc
26658 ac_cpp='$CXXCPP $CPPFLAGS'
26659 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26660 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26661 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26662 ac_main_return="return"
26663
26664         if test "$cross_compiling" = yes; then
26665   cf_cv_cpp_param_init=unknown
26666 else
26667   cat >"conftest.$ac_ext" <<_ACEOF
26668 #line 26668 "configure"
26669 #include "confdefs.h"
26670
26671 class TEST {
26672 private:
26673         int value;
26674 public:
26675         TEST(int x = 1);
26676         ~TEST();
26677 };
26678
26679 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26680 {
26681         value = x;
26682 }
26683 int main(void) { }
26684
26685 _ACEOF
26686 rm -f "conftest$ac_exeext"
26687 if { (eval echo "$as_me:26687: \"$ac_link\"") >&5
26688   (eval $ac_link) 2>&5
26689   ac_status=$?
26690   echo "$as_me:26690: \$? = $ac_status" >&5
26691   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26692   { (eval echo "$as_me:26692: \"$ac_try\"") >&5
26693   (eval $ac_try) 2>&5
26694   ac_status=$?
26695   echo "$as_me:26695: \$? = $ac_status" >&5
26696   (exit "$ac_status"); }; }; then
26697   cf_cv_cpp_param_init=yes
26698 else
26699   echo "$as_me: program exited with status $ac_status" >&5
26700 echo "$as_me: failed program was:" >&5
26701 cat "conftest.$ac_ext" >&5
26702 cf_cv_cpp_param_init=no
26703 fi
26704 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26705 fi
26706         ac_ext=cc
26707 ac_cpp='$CXXCPP $CPPFLAGS'
26708 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26709 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26710 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26711 ac_main_return="return"
26712
26713 fi
26714 echo "$as_me:26714: result: $cf_cv_cpp_param_init" >&5
26715 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26716 fi
26717 test "$cf_cv_cpp_param_init" = yes &&
26718 cat >>confdefs.h <<\EOF
26719 #define CPP_HAS_PARAM_INIT 1
26720 EOF
26721
26722 if test -n "$CXX"; then
26723
26724 echo "$as_me:26724: checking if $CXX accepts static_cast" >&5
26725 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26726 if test "${cf_cv_cpp_static_cast+set}" = set; then
26727   echo $ECHO_N "(cached) $ECHO_C" >&6
26728 else
26729
26730         ac_ext=cc
26731 ac_cpp='$CXXCPP $CPPFLAGS'
26732 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26733 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26734 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26735 ac_main_return="return"
26736
26737         cat >"conftest.$ac_ext" <<_ACEOF
26738 #line 26738 "configure"
26739 #include "confdefs.h"
26740
26741 class NCursesPanel
26742 {
26743 public:
26744   NCursesPanel(int nlines,
26745                int ncols,
26746                int begin_y = 0,
26747                int begin_x = 0)
26748   {
26749   }
26750   NCursesPanel();
26751   ~NCursesPanel();
26752 };
26753
26754 template<class T> class NCursesUserPanel : public NCursesPanel
26755 {
26756 public:
26757   NCursesUserPanel (int nlines,
26758                     int ncols,
26759                     int begin_y = 0,
26760                     int begin_x = 0,
26761                     const T* p_UserData = static_cast<T*>(0))
26762     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26763   {
26764   };
26765   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26766   {
26767   };
26768
26769   virtual ~NCursesUserPanel() {};
26770 };
26771
26772 int
26773 main (void)
26774 {
26775
26776         const char* p_UserData = static_cast<char*>(0)
26777   ;
26778   return 0;
26779 }
26780 _ACEOF
26781 rm -f "conftest.$ac_objext"
26782 if { (eval echo "$as_me:26782: \"$ac_compile\"") >&5
26783   (eval $ac_compile) 2>&5
26784   ac_status=$?
26785   echo "$as_me:26785: \$? = $ac_status" >&5
26786   (exit "$ac_status"); } &&
26787          { ac_try='test -s "conftest.$ac_objext"'
26788   { (eval echo "$as_me:26788: \"$ac_try\"") >&5
26789   (eval $ac_try) 2>&5
26790   ac_status=$?
26791   echo "$as_me:26791: \$? = $ac_status" >&5
26792   (exit "$ac_status"); }; }; then
26793   cf_cv_cpp_static_cast=yes
26794 else
26795   echo "$as_me: failed program was:" >&5
26796 cat "conftest.$ac_ext" >&5
26797 cf_cv_cpp_static_cast=no
26798 fi
26799 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26800
26801         ac_ext=cc
26802 ac_cpp='$CXXCPP $CPPFLAGS'
26803 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26804 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26805 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26806 ac_main_return="return"
26807
26808 fi
26809 echo "$as_me:26809: result: $cf_cv_cpp_static_cast" >&5
26810 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26811
26812 fi
26813
26814 test "$cf_cv_cpp_static_cast" = yes &&
26815 cat >>confdefs.h <<\EOF
26816 #define CPP_HAS_STATIC_CAST 1
26817 EOF
26818
26819         CXX_AR='$(AR)'
26820         CXX_ARFLAGS='$(ARFLAGS)'
26821         case "$cf_cv_system_name" in
26822         (irix*)
26823             if test "$GXX" != yes ; then
26824                 CXX_AR='$(CXX)'
26825                 CXX_ARFLAGS='-ar -o'
26826             fi
26827             ;;
26828         (sco3.2v5*)
26829             CXXLDFLAGS="-u main"
26830             ;;
26831         (solaris2*)
26832             if test "$GXX" != yes ; then
26833                 CXX_AR='$(CXX)'
26834                 CXX_ARFLAGS='-xar -o'
26835             fi
26836             ;;
26837         esac
26838
26839 else
26840         cf_cxx_library=no
26841         cf_cv_builtin_bool=1
26842
26843         # Just because we are not configuring against C++ right now does not
26844         # mean that a user will not want to use C++.  Some distributors disable
26845         # the C++ portion of this configuration as a shortcut (or just to avoid
26846         # compiling the demo in the c++ directory).  So we need a reasonable
26847         # default for the 'bool' type.
26848         #
26849         # Caveat: since the storage of the bool type is not standardized, it
26850         # may change.
26851
26852         if test "$NCURSES_BOOL" != auto ; then
26853                 cf_cv_type_of_bool=$NCURSES_BOOL
26854                 cf_cv_header_stdbool_h=0
26855         else
26856                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26857
26858 echo "$as_me:26858: checking for bool" >&5
26859 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26860 if test "${ac_cv_type_bool+set}" = set; then
26861   echo $ECHO_N "(cached) $ECHO_C" >&6
26862 else
26863   cat >"conftest.$ac_ext" <<_ACEOF
26864 #line 26864 "configure"
26865 #include "confdefs.h"
26866
26867 $ac_includes_default
26868
26869 #if defined(__cplusplus)
26870
26871 #ifdef HAVE_GXX_BUILTIN_H
26872 #include <g++/builtin.h>
26873 #elif HAVE_GPP_BUILTIN_H
26874 #include <gpp/builtin.h>
26875 #elif HAVE_BUILTIN_H
26876 #include <builtin.h>
26877 #endif
26878
26879 #else
26880
26881 #if $cf_cv_header_stdbool_h
26882 #include <stdbool.h>
26883 #endif
26884
26885 #endif
26886
26887 int
26888 main (void)
26889 {
26890 if ((bool *) 0)
26891   return 0;
26892 if (sizeof (bool))
26893   return 0;
26894   ;
26895   return 0;
26896 }
26897 _ACEOF
26898 rm -f "conftest.$ac_objext"
26899 if { (eval echo "$as_me:26899: \"$ac_compile\"") >&5
26900   (eval $ac_compile) 2>&5
26901   ac_status=$?
26902   echo "$as_me:26902: \$? = $ac_status" >&5
26903   (exit "$ac_status"); } &&
26904          { ac_try='test -s "conftest.$ac_objext"'
26905   { (eval echo "$as_me:26905: \"$ac_try\"") >&5
26906   (eval $ac_try) 2>&5
26907   ac_status=$?
26908   echo "$as_me:26908: \$? = $ac_status" >&5
26909   (exit "$ac_status"); }; }; then
26910   ac_cv_type_bool=yes
26911 else
26912   echo "$as_me: failed program was:" >&5
26913 cat "conftest.$ac_ext" >&5
26914 ac_cv_type_bool=no
26915 fi
26916 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26917 fi
26918 echo "$as_me:26918: result: $ac_cv_type_bool" >&5
26919 echo "${ECHO_T}$ac_cv_type_bool" >&6
26920
26921 echo "$as_me:26921: checking size of bool" >&5
26922 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26923 if test "${ac_cv_sizeof_bool+set}" = set; then
26924   echo $ECHO_N "(cached) $ECHO_C" >&6
26925 else
26926   if test "$ac_cv_type_bool" = yes; then
26927   if test "$cross_compiling" = yes; then
26928   # Depending upon the size, compute the lo and hi bounds.
26929 cat >"conftest.$ac_ext" <<_ACEOF
26930 #line 26930 "configure"
26931 #include "confdefs.h"
26932
26933 $ac_includes_default
26934
26935 #if defined(__cplusplus)
26936
26937 #ifdef HAVE_GXX_BUILTIN_H
26938 #include <g++/builtin.h>
26939 #elif HAVE_GPP_BUILTIN_H
26940 #include <gpp/builtin.h>
26941 #elif HAVE_BUILTIN_H
26942 #include <builtin.h>
26943 #endif
26944
26945 #else
26946
26947 #if $cf_cv_header_stdbool_h
26948 #include <stdbool.h>
26949 #endif
26950
26951 #endif
26952
26953 int
26954 main (void)
26955 {
26956 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26957   ;
26958   return 0;
26959 }
26960 _ACEOF
26961 rm -f "conftest.$ac_objext"
26962 if { (eval echo "$as_me:26962: \"$ac_compile\"") >&5
26963   (eval $ac_compile) 2>&5
26964   ac_status=$?
26965   echo "$as_me:26965: \$? = $ac_status" >&5
26966   (exit "$ac_status"); } &&
26967          { ac_try='test -s "conftest.$ac_objext"'
26968   { (eval echo "$as_me:26968: \"$ac_try\"") >&5
26969   (eval $ac_try) 2>&5
26970   ac_status=$?
26971   echo "$as_me:26971: \$? = $ac_status" >&5
26972   (exit "$ac_status"); }; }; then
26973   ac_lo=0 ac_mid=0
26974   while :; do
26975     cat >"conftest.$ac_ext" <<_ACEOF
26976 #line 26976 "configure"
26977 #include "confdefs.h"
26978
26979 $ac_includes_default
26980
26981 #if defined(__cplusplus)
26982
26983 #ifdef HAVE_GXX_BUILTIN_H
26984 #include <g++/builtin.h>
26985 #elif HAVE_GPP_BUILTIN_H
26986 #include <gpp/builtin.h>
26987 #elif HAVE_BUILTIN_H
26988 #include <builtin.h>
26989 #endif
26990
26991 #else
26992
26993 #if $cf_cv_header_stdbool_h
26994 #include <stdbool.h>
26995 #endif
26996
26997 #endif
26998
26999 int
27000 main (void)
27001 {
27002 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27003   ;
27004   return 0;
27005 }
27006 _ACEOF
27007 rm -f "conftest.$ac_objext"
27008 if { (eval echo "$as_me:27008: \"$ac_compile\"") >&5
27009   (eval $ac_compile) 2>&5
27010   ac_status=$?
27011   echo "$as_me:27011: \$? = $ac_status" >&5
27012   (exit "$ac_status"); } &&
27013          { ac_try='test -s "conftest.$ac_objext"'
27014   { (eval echo "$as_me:27014: \"$ac_try\"") >&5
27015   (eval $ac_try) 2>&5
27016   ac_status=$?
27017   echo "$as_me:27017: \$? = $ac_status" >&5
27018   (exit "$ac_status"); }; }; then
27019   ac_hi=$ac_mid; break
27020 else
27021   echo "$as_me: failed program was:" >&5
27022 cat "conftest.$ac_ext" >&5
27023 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27024 fi
27025 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27026   done
27027 else
27028   echo "$as_me: failed program was:" >&5
27029 cat "conftest.$ac_ext" >&5
27030 ac_hi=-1 ac_mid=-1
27031   while :; do
27032     cat >"conftest.$ac_ext" <<_ACEOF
27033 #line 27033 "configure"
27034 #include "confdefs.h"
27035
27036 $ac_includes_default
27037
27038 #if defined(__cplusplus)
27039
27040 #ifdef HAVE_GXX_BUILTIN_H
27041 #include <g++/builtin.h>
27042 #elif HAVE_GPP_BUILTIN_H
27043 #include <gpp/builtin.h>
27044 #elif HAVE_BUILTIN_H
27045 #include <builtin.h>
27046 #endif
27047
27048 #else
27049
27050 #if $cf_cv_header_stdbool_h
27051 #include <stdbool.h>
27052 #endif
27053
27054 #endif
27055
27056 int
27057 main (void)
27058 {
27059 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
27060   ;
27061   return 0;
27062 }
27063 _ACEOF
27064 rm -f "conftest.$ac_objext"
27065 if { (eval echo "$as_me:27065: \"$ac_compile\"") >&5
27066   (eval $ac_compile) 2>&5
27067   ac_status=$?
27068   echo "$as_me:27068: \$? = $ac_status" >&5
27069   (exit "$ac_status"); } &&
27070          { ac_try='test -s "conftest.$ac_objext"'
27071   { (eval echo "$as_me:27071: \"$ac_try\"") >&5
27072   (eval $ac_try) 2>&5
27073   ac_status=$?
27074   echo "$as_me:27074: \$? = $ac_status" >&5
27075   (exit "$ac_status"); }; }; then
27076   ac_lo=$ac_mid; break
27077 else
27078   echo "$as_me: failed program was:" >&5
27079 cat "conftest.$ac_ext" >&5
27080 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27081 fi
27082 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27083   done
27084 fi
27085 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27086 # Binary search between lo and hi bounds.
27087 while test "x$ac_lo" != "x$ac_hi"; do
27088   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27089   cat >"conftest.$ac_ext" <<_ACEOF
27090 #line 27090 "configure"
27091 #include "confdefs.h"
27092
27093 $ac_includes_default
27094
27095 #if defined(__cplusplus)
27096
27097 #ifdef HAVE_GXX_BUILTIN_H
27098 #include <g++/builtin.h>
27099 #elif HAVE_GPP_BUILTIN_H
27100 #include <gpp/builtin.h>
27101 #elif HAVE_BUILTIN_H
27102 #include <builtin.h>
27103 #endif
27104
27105 #else
27106
27107 #if $cf_cv_header_stdbool_h
27108 #include <stdbool.h>
27109 #endif
27110
27111 #endif
27112
27113 int
27114 main (void)
27115 {
27116 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
27117   ;
27118   return 0;
27119 }
27120 _ACEOF
27121 rm -f "conftest.$ac_objext"
27122 if { (eval echo "$as_me:27122: \"$ac_compile\"") >&5
27123   (eval $ac_compile) 2>&5
27124   ac_status=$?
27125   echo "$as_me:27125: \$? = $ac_status" >&5
27126   (exit "$ac_status"); } &&
27127          { ac_try='test -s "conftest.$ac_objext"'
27128   { (eval echo "$as_me:27128: \"$ac_try\"") >&5
27129   (eval $ac_try) 2>&5
27130   ac_status=$?
27131   echo "$as_me:27131: \$? = $ac_status" >&5
27132   (exit "$ac_status"); }; }; then
27133   ac_hi=$ac_mid
27134 else
27135   echo "$as_me: failed program was:" >&5
27136 cat "conftest.$ac_ext" >&5
27137 ac_lo=`expr "$ac_mid" + 1`
27138 fi
27139 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27140 done
27141 ac_cv_sizeof_bool=$ac_lo
27142 else
27143   if test "$cross_compiling" = yes; then
27144   { { echo "$as_me:27144: error: cannot run test program while cross compiling" >&5
27145 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27146    { (exit 1); exit 1; }; }
27147 else
27148   cat >"conftest.$ac_ext" <<_ACEOF
27149 #line 27149 "configure"
27150 #include "confdefs.h"
27151
27152 $ac_includes_default
27153
27154 #if defined(__cplusplus)
27155
27156 #ifdef HAVE_GXX_BUILTIN_H
27157 #include <g++/builtin.h>
27158 #elif HAVE_GPP_BUILTIN_H
27159 #include <gpp/builtin.h>
27160 #elif HAVE_BUILTIN_H
27161 #include <builtin.h>
27162 #endif
27163
27164 #else
27165
27166 #if $cf_cv_header_stdbool_h
27167 #include <stdbool.h>
27168 #endif
27169
27170 #endif
27171
27172 int
27173 main (void)
27174 {
27175 FILE *f = fopen ("conftest.val", "w");
27176 if (!f)
27177   $ac_main_return (1);
27178 fprintf (f, "%ld", (long)(sizeof (bool)));
27179 fclose (f);
27180   ;
27181   return 0;
27182 }
27183 _ACEOF
27184 rm -f "conftest$ac_exeext"
27185 if { (eval echo "$as_me:27185: \"$ac_link\"") >&5
27186   (eval $ac_link) 2>&5
27187   ac_status=$?
27188   echo "$as_me:27188: \$? = $ac_status" >&5
27189   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27190   { (eval echo "$as_me:27190: \"$ac_try\"") >&5
27191   (eval $ac_try) 2>&5
27192   ac_status=$?
27193   echo "$as_me:27193: \$? = $ac_status" >&5
27194   (exit "$ac_status"); }; }; then
27195   ac_cv_sizeof_bool=`cat conftest.val`
27196 else
27197   echo "$as_me: program exited with status $ac_status" >&5
27198 echo "$as_me: failed program was:" >&5
27199 cat "conftest.$ac_ext" >&5
27200 fi
27201 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27202 fi
27203 fi
27204 rm -f conftest.val
27205 else
27206   ac_cv_sizeof_bool=0
27207 fi
27208 fi
27209 echo "$as_me:27209: result: $ac_cv_sizeof_bool" >&5
27210 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
27211 cat >>confdefs.h <<EOF
27212 #define SIZEOF_BOOL $ac_cv_sizeof_bool
27213 EOF
27214
27215 echo "$as_me:27215: checking for type of bool" >&5
27216 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
27217 if test "${cf_cv_type_of_bool+set}" = set; then
27218   echo $ECHO_N "(cached) $ECHO_C" >&6
27219 else
27220
27221         rm -f cf_test.out
27222         if test "$cross_compiling" = yes; then
27223
27224                 case x$ac_cv_sizeof_bool in
27225                 (x1) cf_cv_type_of_bool="unsigned char";;
27226                 (x2) cf_cv_type_of_bool="unsigned short";;
27227                 (x4) cf_cv_type_of_bool="unsigned int";;
27228                 (x8) cf_cv_type_of_bool="unsigned long";;
27229                 (*)  cf_cv_type_of_bool=unknown;;
27230                 esac
27231
27232 else
27233   cat >"conftest.$ac_ext" <<_ACEOF
27234 #line 27234 "configure"
27235 #include "confdefs.h"
27236
27237 $ac_includes_default
27238
27239 #if defined(__cplusplus)
27240
27241 #ifdef HAVE_GXX_BUILTIN_H
27242 #include <g++/builtin.h>
27243 #elif HAVE_GPP_BUILTIN_H
27244 #include <gpp/builtin.h>
27245 #elif HAVE_BUILTIN_H
27246 #include <builtin.h>
27247 #endif
27248
27249 #else
27250
27251 #if $cf_cv_header_stdbool_h
27252 #include <stdbool.h>
27253 #endif
27254
27255 #endif
27256
27257 int main(void)
27258 {
27259         FILE *fp = fopen("cf_test.out", "w");
27260         if (fp != 0) {
27261                 bool x = true;
27262                 if ((bool)(-x) >= 0)
27263                         fputs("unsigned ", fp);
27264                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
27265                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
27266                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
27267                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
27268                 fclose(fp);
27269         }
27270         ${cf_cv_main_return:-return}(0);
27271 }
27272
27273 _ACEOF
27274 rm -f "conftest$ac_exeext"
27275 if { (eval echo "$as_me:27275: \"$ac_link\"") >&5
27276   (eval $ac_link) 2>&5
27277   ac_status=$?
27278   echo "$as_me:27278: \$? = $ac_status" >&5
27279   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27280   { (eval echo "$as_me:27280: \"$ac_try\"") >&5
27281   (eval $ac_try) 2>&5
27282   ac_status=$?
27283   echo "$as_me:27283: \$? = $ac_status" >&5
27284   (exit "$ac_status"); }; }; then
27285   cf_cv_type_of_bool=`cat cf_test.out`
27286                  if test -z "$cf_cv_type_of_bool"; then
27287                    cf_cv_type_of_bool=unknown
27288                  fi
27289 else
27290   echo "$as_me: program exited with status $ac_status" >&5
27291 echo "$as_me: failed program was:" >&5
27292 cat "conftest.$ac_ext" >&5
27293 cf_cv_type_of_bool=unknown
27294 fi
27295 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27296 fi
27297         rm -f cf_test.out
27298
27299 fi
27300 echo "$as_me:27300: result: $cf_cv_type_of_bool" >&5
27301 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27302
27303 if test "$cf_cv_type_of_bool" = unknown ; then
27304         case .$NCURSES_BOOL in
27305         (.auto|.) NCURSES_BOOL=unsigned;;
27306         esac
27307         { echo "$as_me:27307: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
27308 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
27309         cf_cv_type_of_bool=$NCURSES_BOOL
27310 fi
27311
27312                 else
27313                         echo "$as_me:27313: checking for fallback type of bool" >&5
27314 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
27315                         case "$host_cpu" in
27316                         (i?86)  cf_cv_type_of_bool=char ;;
27317                         (*)     cf_cv_type_of_bool=int  ;;
27318                         esac
27319                         echo "$as_me:27319: result: $cf_cv_type_of_bool" >&5
27320 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
27321                 fi
27322         fi
27323 fi
27324
27325 # If the C compiler did not declare bool, and we did not determine that the C++
27326 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
27327 # ncurses library use the same type as C++ bool.  Note that this allows one to
27328 # specify the type of bool in a configure-script option and postpone
27329 # integration with the C++ compiler provided that the types are compatible.
27330 USE_CXX_BOOL=1
27331 if test "$cf_cv_cc_bool_type" = 1
27332 then
27333         # oops: C has a bool.  Unlikely, but C++ could differ.
27334         USE_CXX_BOOL=0
27335 elif test "$cf_cv_builtin_bool" = 0
27336 then
27337         # C++ has no bool
27338         USE_CXX_BOOL=0
27339 else
27340         # this is the normal case
27341         USE_CXX_BOOL='defined(__cplusplus)'
27342 fi
27343
27344 if test -f "${srcdir}/Ada95/Makefile.in" ; then
27345
27346         if test "$cf_with_ada" != "no" ; then
27347                 if test "$with_libtool" != "no"; then
27348                         { echo "$as_me:27348: WARNING: libtool does not support Ada - disabling feature" >&5
27349 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
27350                         cf_with_ada=no
27351                 fi
27352         fi
27353
27354         if test "$cf_with_ada" != "no" ; then
27355
27356 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
27357 do
27358
27359 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27360
27361         unset ac_cv_path_cf_TEMP_gnat
27362         unset cf_TEMP_gnat
27363         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
27364 set dummy $cf_prog_gnat; ac_word=$2
27365 echo "$as_me:27365: checking for $ac_word" >&5
27366 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27367 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
27368   echo $ECHO_N "(cached) $ECHO_C" >&6
27369 else
27370   case $cf_TEMP_gnat in
27371   [\\/]* | ?:[\\/]*)
27372   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
27373   ;;
27374   *)
27375   ac_save_IFS=$IFS; IFS=$ac_path_separator
27376 ac_dummy="$PATH"
27377 for ac_dir in $ac_dummy; do
27378   IFS=$ac_save_IFS
27379   test -z "$ac_dir" && ac_dir=.
27380   if $as_executable_p "$ac_dir/$ac_word"; then
27381    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
27382    echo "$as_me:27382: found $ac_dir/$ac_word" >&5
27383    break
27384 fi
27385 done
27386
27387   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
27388   ;;
27389 esac
27390 fi
27391 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
27392
27393 if test -n "$cf_TEMP_gnat"; then
27394   echo "$as_me:27394: result: $cf_TEMP_gnat" >&5
27395 echo "${ECHO_T}$cf_TEMP_gnat" >&6
27396 else
27397   echo "$as_me:27397: result: no" >&5
27398 echo "${ECHO_T}no" >&6
27399 fi
27400
27401         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
27402
27403         if test "x$cf_TEMP_gnat" != xno; then
27404                 unset cf_cv_gnat_version
27405                 unset cf_TEMP_gnat
27406
27407 echo "$as_me:27407: checking for $cf_prog_gnat version" >&5
27408 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
27409 if test "${cf_cv_gnat_version+set}" = set; then
27410   echo $ECHO_N "(cached) $ECHO_C" >&6
27411 else
27412
27413 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
27414         grep '[0-9].[0-9][0-9]*' |\
27415         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27416
27417 fi
27418 echo "$as_me:27418: result: $cf_cv_gnat_version" >&5
27419 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27420 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27421 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
27422
27423         fi
27424         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
27425
27426         unset cf_TEMP_gnat
27427         unset cf_cv_gnat_version
27428         unset ac_cv_path_cf_TEMP_gnat
27429 done
27430
27431 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
27432         cf_ada_make=
27433         cf_cv_prog_gnat_correct=no
27434 else
27435         cf_ada_make=gnatmake
27436         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
27437                 # gprconfig is newer than gnatmake; we can continue...
27438                 cf_ada_config="##"
27439         else
27440                 rm -rf ./conftest* ./*~conftest*
27441                 if mkdir conftest.src
27442                 then
27443                         cf_ada_config=""
27444                         cd conftest.src
27445                         for cf_gprconfig in Ada C
27446                         do
27447                                 echo "$as_me:27447: checking for gprconfig name for $cf_gprconfig" >&5
27448 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
27449                                 if test "$cf_gprconfig" = C
27450                                 then
27451                                         for cf_gprconfig_param in \
27452                                                 "$cf_gprconfig,,,,GNATGCC" \
27453                                                 "$cf_gprconfig,,,,GCC" \
27454                                                 "$cf_gprconfig"
27455                                         do
27456                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27457                                                 test -n "$cf_gprconfig_value" && break
27458                                         done
27459                                 else
27460                                         cf_gprconfig_param=$cf_gprconfig
27461                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
27462                                 fi
27463                                 if test -n "$cf_gprconfig_value"
27464                                 then
27465                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
27466                                         echo "$as_me:27466: result: $cf_gprconfig_value" >&5
27467 echo "${ECHO_T}$cf_gprconfig_value" >&6
27468                                 else
27469                                         echo "$as_me:27469: result: missing" >&5
27470 echo "${ECHO_T}missing" >&6
27471                                         cf_ada_config="#"
27472                                         break
27473                                 fi
27474                         done
27475                         cd ..
27476                         rm -rf ./conftest* ./*~conftest*
27477                 fi
27478         fi
27479         if test "x$cf_ada_config" != "x#"
27480         then
27481
27482 echo "$as_me:27482: checking for gnat version" >&5
27483 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
27484 if test "${cf_cv_gnat_version+set}" = set; then
27485   echo $ECHO_N "(cached) $ECHO_C" >&6
27486 else
27487
27488 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
27489         grep '[0-9].[0-9][0-9]*' |\
27490         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
27491
27492 fi
27493 echo "$as_me:27493: result: $cf_cv_gnat_version" >&5
27494 echo "${ECHO_T}$cf_cv_gnat_version" >&6
27495 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
27496
27497 case "$cf_cv_gnat_version" in
27498 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27499         cf_cv_prog_gnat_correct=yes
27500         ;;
27501 (*)
27502         { echo "$as_me:27502: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
27503 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
27504         cf_cv_prog_gnat_correct=no
27505         ;;
27506 esac
27507
27508                 # Extract the first word of "m4", so it can be a program name with args.
27509 set dummy m4; ac_word=$2
27510 echo "$as_me:27510: checking for $ac_word" >&5
27511 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
27512 if test "${ac_cv_prog_M4_exists+set}" = set; then
27513   echo $ECHO_N "(cached) $ECHO_C" >&6
27514 else
27515   if test -n "$M4_exists"; then
27516   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
27517 else
27518   ac_save_IFS=$IFS; IFS=$ac_path_separator
27519 ac_dummy="$PATH"
27520 for ac_dir in $ac_dummy; do
27521   IFS=$ac_save_IFS
27522   test -z "$ac_dir" && ac_dir=.
27523   $as_executable_p "$ac_dir/$ac_word" || continue
27524 ac_cv_prog_M4_exists="yes"
27525 echo "$as_me:27525: found $ac_dir/$ac_word" >&5
27526 break
27527 done
27528
27529   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
27530 fi
27531 fi
27532 M4_exists=$ac_cv_prog_M4_exists
27533 if test -n "$M4_exists"; then
27534   echo "$as_me:27534: result: $M4_exists" >&5
27535 echo "${ECHO_T}$M4_exists" >&6
27536 else
27537   echo "$as_me:27537: result: no" >&5
27538 echo "${ECHO_T}no" >&6
27539 fi
27540
27541                 if test "$ac_cv_prog_M4_exists" = no; then
27542                         cf_cv_prog_gnat_correct=no
27543                         { echo "$as_me:27543: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
27544 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
27545                 fi
27546                 if test "$cf_cv_prog_gnat_correct" = yes; then
27547                         echo "$as_me:27547: checking if GNAT works" >&5
27548 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
27549
27550 rm -rf ./conftest* ./*~conftest*
27551 cat >>conftest.ads <<CF_EOF
27552 procedure conftest;
27553 CF_EOF
27554 cat >>conftest.adb <<CF_EOF
27555 with Text_IO;
27556 with GNAT.OS_Lib;
27557 procedure conftest is
27558 begin
27559    Text_IO.Put ("Hello World");
27560    Text_IO.New_Line;
27561    GNAT.OS_Lib.OS_Exit (0);
27562 end conftest;
27563 CF_EOF
27564 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27565    if ( ./conftest 1>&5 2>&1 ) ; then
27566       cf_cv_prog_gnat_correct=yes
27567    else
27568       cf_cv_prog_gnat_correct=no
27569    fi
27570 else
27571    cf_cv_prog_gnat_correct=no
27572 fi
27573 rm -rf ./conftest* ./*~conftest*
27574
27575                         echo "$as_me:27575: result: $cf_cv_prog_gnat_correct" >&5
27576 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
27577                 fi
27578         else
27579                 cf_cv_prog_gnat_correct=no
27580         fi
27581 fi
27582
27583                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
27584
27585         ADAFLAGS="$ADAFLAGS -gnatpn"
27586
27587         echo "$as_me:27587: checking optimization options for ADAFLAGS" >&5
27588 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
27589         case "$CFLAGS" in
27590         (*-g*)
27591
27592         ADAFLAGS="$ADAFLAGS -g"
27593
27594                 ;;
27595         esac
27596         case "$CFLAGS" in
27597         (*-O*)
27598                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27599
27600         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27601
27602                 ;;
27603         esac
27604         echo "$as_me:27604: result: $ADAFLAGS" >&5
27605 echo "${ECHO_T}$ADAFLAGS" >&6
27606
27607 echo "$as_me:27607: checking if GNATPREP supports -T option" >&5
27608 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27609 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27610   echo $ECHO_N "(cached) $ECHO_C" >&6
27611 else
27612
27613 cf_cv_gnatprep_opt_t=no
27614 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27615
27616 fi
27617 echo "$as_me:27617: result: $cf_cv_gnatprep_opt_t" >&5
27618 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27619 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27620
27621 echo "$as_me:27621: checking if GNAT supports generics" >&5
27622 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27623 case "$cf_cv_gnat_version" in
27624 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27625         cf_gnat_generics=yes
27626         ;;
27627 (*)
27628         cf_gnat_generics=no
27629         ;;
27630 esac
27631 echo "$as_me:27631: result: $cf_gnat_generics" >&5
27632 echo "${ECHO_T}$cf_gnat_generics" >&6
27633
27634 if test "$cf_gnat_generics" = yes
27635 then
27636         cf_compile_generics=generics
27637         cf_generic_objects="\${GENOBJS}"
27638 else
27639         cf_compile_generics=
27640         cf_generic_objects=
27641 fi
27642
27643 echo "$as_me:27643: checking if GNAT supports SIGINT" >&5
27644 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27645 if test "${cf_cv_gnat_sigint+set}" = set; then
27646   echo $ECHO_N "(cached) $ECHO_C" >&6
27647 else
27648
27649 rm -rf ./conftest* ./*~conftest*
27650 cat >>conftest.ads <<CF_EOF
27651 with Ada.Interrupts.Names;
27652
27653 package ConfTest is
27654
27655    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27656    pragma Unreserve_All_Interrupts;
27657    pragma Warnings (On);
27658
27659    protected Process is
27660       procedure Stop;
27661       function Continue return Boolean;
27662       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27663    private
27664       Done : Boolean := False;
27665    end Process;
27666
27667 end ConfTest;
27668 CF_EOF
27669 cat >>conftest.adb <<CF_EOF
27670 package body ConfTest is
27671    protected body Process is
27672       procedure Stop is
27673       begin
27674          Done := True;
27675       end Stop;
27676       function Continue return Boolean is
27677       begin
27678          return not Done;
27679       end Continue;
27680    end Process;
27681 end ConfTest;
27682 CF_EOF
27683 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27684       cf_cv_gnat_sigint=yes
27685 else
27686    cf_cv_gnat_sigint=no
27687 fi
27688 rm -rf ./conftest* ./*~conftest*
27689
27690 fi
27691 echo "$as_me:27691: result: $cf_cv_gnat_sigint" >&5
27692 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27693
27694 if test "$cf_cv_gnat_sigint" = yes ; then
27695         USE_GNAT_SIGINT=""
27696 else
27697         USE_GNAT_SIGINT="#"
27698 fi
27699
27700 cf_gnat_libraries=no
27701 cf_gnat_projects=no
27702
27703 if test "$enable_gnat_projects" != no ; then
27704 echo "$as_me:27704: checking if GNAT supports project files" >&5
27705 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27706 case "$cf_cv_gnat_version" in
27707 (3.[0-9]*)
27708         ;;
27709 (*)
27710         case "$cf_cv_system_name" in
27711         (cygwin*|msys*)
27712                 ;;
27713         (*)
27714                 rm -rf ./conftest* ./*~conftest*
27715                 if mkdir conftest.src conftest.bin conftest.lib
27716                 then
27717                         cd conftest.src
27718                         rm -rf ./conftest* ./*~conftest*
27719                         cat >>library.gpr <<CF_EOF
27720 project Library is
27721   Kind := External ("LIB_KIND");
27722   for Library_Name use "ConfTest";
27723   for Object_Dir use ".";
27724   for Library_ALI_Dir use External("LIBRARY_DIR");
27725   for Library_Version use External ("SONAME");
27726   for Library_Kind use Kind;
27727   for Library_Dir use External("BUILD_DIR");
27728   Source_Dir := External ("SOURCE_DIR");
27729   for Source_Dirs use (Source_Dir);
27730 end Library;
27731 CF_EOF
27732                         cat >>confpackage.ads <<CF_EOF
27733 package ConfPackage is
27734    procedure conftest;
27735 end ConfPackage;
27736 CF_EOF
27737                         cat >>confpackage.adb <<CF_EOF
27738 with Text_IO;
27739 package body ConfPackage is
27740    procedure conftest is
27741    begin
27742       Text_IO.Put ("Hello World");
27743       Text_IO.New_Line;
27744    end conftest;
27745 end ConfPackage;
27746 CF_EOF
27747                         if ( "$cf_ada_make" $ADAFLAGS \
27748                                         -Plibrary.gpr \
27749                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27750                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27751                                         -XSOURCE_DIR="`pwd`" \
27752                                         -XSONAME=libConfTest.so.1 \
27753                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27754                                 cf_gnat_projects=yes
27755                         fi
27756                         cd ..
27757                 fi
27758                 if test -f conftest.lib/confpackage.ali
27759                 then
27760                         cf_gnat_libraries=yes
27761                 fi
27762                 rm -rf ./conftest* ./*~conftest*
27763                 ;;
27764         esac
27765         ;;
27766 esac
27767 echo "$as_me:27767: result: $cf_gnat_projects" >&5
27768 echo "${ECHO_T}$cf_gnat_projects" >&6
27769 fi # enable_gnat_projects
27770
27771 if test "$cf_gnat_projects" = yes
27772 then
27773         echo "$as_me:27773: checking if GNAT supports libraries" >&5
27774 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27775         echo "$as_me:27775: result: $cf_gnat_libraries" >&5
27776 echo "${ECHO_T}$cf_gnat_libraries" >&6
27777 fi
27778
27779 USE_OLD_MAKERULES=""
27780 USE_GNAT_PROJECTS="#"
27781 USE_GNAT_MAKE_GPR="#"
27782 USE_GNAT_GPRBUILD="#"
27783
27784 if test "$cf_gnat_projects" = yes
27785 then
27786         USE_OLD_MAKERULES="#"
27787         USE_GNAT_PROJECTS=""
27788         if test "$cf_cv_VERSION_GPRBUILD" != no
27789         then
27790                 USE_GNAT_GPRBUILD=""
27791         elif test "$cf_cv_VERSION_GNATMAKE" != no
27792         then
27793                 USE_GNAT_MAKE_GPR=""
27794         else
27795                 { echo "$as_me:27795: WARNING: use old makefile rules since tools are missing" >&5
27796 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27797         fi
27798 fi
27799
27800 if test "$cf_gnat_libraries" = yes
27801 then
27802         USE_GNAT_LIBRARIES=""
27803 else
27804         USE_GNAT_LIBRARIES="#"
27805 fi
27806
27807 echo "$as_me:27807: checking for Ada95 compiler" >&5
27808 echo $ECHO_N "checking for Ada95 compiler... $ECHO_C" >&6
27809
27810 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27811 if test "${with_ada_compiler+set}" = set; then
27812   withval="$with_ada_compiler"
27813   cf_ada_compiler=$withval
27814 else
27815   cf_ada_compiler=gnatmake
27816 fi;
27817
27818 echo "$as_me:27818: result: $cf_ada_compiler" >&5
27819 echo "${ECHO_T}$cf_ada_compiler" >&6
27820
27821                         cf_ada_package=terminal_interface
27822
27823 echo "$as_me:27823: checking for Ada95 include directory" >&5
27824 echo $ECHO_N "checking for Ada95 include directory... $ECHO_C" >&6
27825
27826 # Check whether --with-ada-include or --without-ada-include was given.
27827 if test "${with_ada_include+set}" = set; then
27828   withval="$with_ada_include"
27829
27830 else
27831   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27832 fi; if test -n "$prefix/share/ada/adainclude" ; then
27833
27834 if test "x$prefix" != xNONE; then
27835         cf_path_syntax="$prefix"
27836 else
27837         cf_path_syntax="$ac_default_prefix"
27838 fi
27839
27840 case ".$withval" in
27841 (.\$\(*\)*|.\'*\'*)
27842         ;;
27843 (..|./*|.\\*)
27844         ;;
27845 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27846         ;;
27847 (.\$\{*prefix\}*|.\$\{*dir\}*)
27848         eval withval="$withval"
27849         case ".$withval" in
27850         (.NONE/*)
27851                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27852                 ;;
27853         esac
27854         ;;
27855 (.no|.NONE/*)
27856         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27857         ;;
27858 (*)
27859         { { echo "$as_me:27859: error: expected a pathname, not \"$withval\"" >&5
27860 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27861    { (exit 1); exit 1; }; }
27862         ;;
27863 esac
27864
27865 fi
27866 eval ADA_INCLUDE="$withval"
27867
27868 echo "$as_me:27868: result: $ADA_INCLUDE" >&5
27869 echo "${ECHO_T}$ADA_INCLUDE" >&6
27870
27871 echo "$as_me:27871: checking for Ada95 object directory" >&5
27872 echo $ECHO_N "checking for Ada95 object directory... $ECHO_C" >&6
27873
27874 # Check whether --with-ada-objects or --without-ada-objects was given.
27875 if test "${with_ada_objects+set}" = set; then
27876   withval="$with_ada_objects"
27877
27878 else
27879   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27880 fi; if test -n "$prefix/lib/ada/adalib" ; then
27881
27882 if test "x$prefix" != xNONE; then
27883         cf_path_syntax="$prefix"
27884 else
27885         cf_path_syntax="$ac_default_prefix"
27886 fi
27887
27888 case ".$withval" in
27889 (.\$\(*\)*|.\'*\'*)
27890         ;;
27891 (..|./*|.\\*)
27892         ;;
27893 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27894         ;;
27895 (.\$\{*prefix\}*|.\$\{*dir\}*)
27896         eval withval="$withval"
27897         case ".$withval" in
27898         (.NONE/*)
27899                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27900                 ;;
27901         esac
27902         ;;
27903 (.no|.NONE/*)
27904         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27905         ;;
27906 (*)
27907         { { echo "$as_me:27907: error: expected a pathname, not \"$withval\"" >&5
27908 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27909    { (exit 1); exit 1; }; }
27910         ;;
27911 esac
27912
27913 fi
27914 eval ADA_OBJECTS="$withval"
27915
27916 echo "$as_me:27916: result: $ADA_OBJECTS" >&5
27917 echo "${ECHO_T}$ADA_OBJECTS" >&6
27918
27919 echo "$as_me:27919: checking whether to build an Ada95 shared library" >&5
27920 echo $ECHO_N "checking whether to build an Ada95 shared library... $ECHO_C" >&6
27921
27922 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27923 if test "${with_ada_sharedlib+set}" = set; then
27924   withval="$with_ada_sharedlib"
27925   with_ada_sharedlib=$withval
27926 else
27927   with_ada_sharedlib=no
27928 fi;
27929 cf_ada_sharedlib_warn=no
27930
27931 if test "x$with_ada_sharedlib" != xno
27932 then
27933         if test "x$cf_gnat_projects" != xyes
27934         then
27935                 with_ada_sharedlib=no
27936                 cf_ada_sharedlib_warn=yes
27937         fi
27938 fi
27939
27940 echo "$as_me:27940: result: $with_ada_sharedlib" >&5
27941 echo "${ECHO_T}$with_ada_sharedlib" >&6
27942 if test "x$cf_ada_sharedlib_warn" != xno
27943 then
27944         { echo "$as_me:27944: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&5
27945 echo "$as_me: WARNING: disabling Ada95 shared library since GNAT projects are not supported" >&2;}
27946 fi
27947
27948 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27949 MAKE_ADA_SHAREDLIB="#"
27950
27951 if test "x$with_ada_sharedlib" != xno
27952 then
27953         MAKE_ADA_SHAREDLIB=
27954         if test "x$with_ada_sharedlib" != xyes
27955         then
27956                 ADA_SHAREDLIB="$with_ada_sharedlib"
27957         fi
27958 fi
27959
27960                         # allow the Ada binding to be renamed
27961
27962 echo "$as_me:27962: checking for Ada95 curses library name" >&5
27963 echo $ECHO_N "checking for Ada95 curses library name... $ECHO_C" >&6
27964
27965 # Check whether --with-ada-libname or --without-ada-libname was given.
27966 if test "${with_ada_libname+set}" = set; then
27967   withval="$with_ada_libname"
27968   ADA_LIBNAME=$withval
27969 else
27970   ADA_LIBNAME=AdaCurses
27971 fi;
27972 case "x$ADA_LIBNAME" in
27973 (x|xyes|xno)
27974         ADA_LIBNAME=AdaCurses
27975         ;;
27976 esac
27977
27978 echo "$as_me:27978: result: $ADA_LIBNAME" >&5
27979 echo "${ECHO_T}$ADA_LIBNAME" >&6
27980
27981                 fi
27982         fi
27983 else
27984         cf_with_ada=no
27985 fi
27986
27987 # do this "late" to avoid conflict with header-checks
27988 if test "x$with_widec" = xyes ; then
27989         echo "$as_me:27989: checking for wchar_t" >&5
27990 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27991 if test "${ac_cv_type_wchar_t+set}" = set; then
27992   echo $ECHO_N "(cached) $ECHO_C" >&6
27993 else
27994   cat >"conftest.$ac_ext" <<_ACEOF
27995 #line 27995 "configure"
27996 #include "confdefs.h"
27997 $ac_includes_default
27998 int
27999 main (void)
28000 {
28001 if ((wchar_t *) 0)
28002   return 0;
28003 if (sizeof (wchar_t))
28004   return 0;
28005   ;
28006   return 0;
28007 }
28008 _ACEOF
28009 rm -f "conftest.$ac_objext"
28010 if { (eval echo "$as_me:28010: \"$ac_compile\"") >&5
28011   (eval $ac_compile) 2>&5
28012   ac_status=$?
28013   echo "$as_me:28013: \$? = $ac_status" >&5
28014   (exit "$ac_status"); } &&
28015          { ac_try='test -s "conftest.$ac_objext"'
28016   { (eval echo "$as_me:28016: \"$ac_try\"") >&5
28017   (eval $ac_try) 2>&5
28018   ac_status=$?
28019   echo "$as_me:28019: \$? = $ac_status" >&5
28020   (exit "$ac_status"); }; }; then
28021   ac_cv_type_wchar_t=yes
28022 else
28023   echo "$as_me: failed program was:" >&5
28024 cat "conftest.$ac_ext" >&5
28025 ac_cv_type_wchar_t=no
28026 fi
28027 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28028 fi
28029 echo "$as_me:28029: result: $ac_cv_type_wchar_t" >&5
28030 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
28031
28032 echo "$as_me:28032: checking size of wchar_t" >&5
28033 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
28034 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
28035   echo $ECHO_N "(cached) $ECHO_C" >&6
28036 else
28037   if test "$ac_cv_type_wchar_t" = yes; then
28038   if test "$cross_compiling" = yes; then
28039   # Depending upon the size, compute the lo and hi bounds.
28040 cat >"conftest.$ac_ext" <<_ACEOF
28041 #line 28041 "configure"
28042 #include "confdefs.h"
28043 $ac_includes_default
28044 int
28045 main (void)
28046 {
28047 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
28048   ;
28049   return 0;
28050 }
28051 _ACEOF
28052 rm -f "conftest.$ac_objext"
28053 if { (eval echo "$as_me:28053: \"$ac_compile\"") >&5
28054   (eval $ac_compile) 2>&5
28055   ac_status=$?
28056   echo "$as_me:28056: \$? = $ac_status" >&5
28057   (exit "$ac_status"); } &&
28058          { ac_try='test -s "conftest.$ac_objext"'
28059   { (eval echo "$as_me:28059: \"$ac_try\"") >&5
28060   (eval $ac_try) 2>&5
28061   ac_status=$?
28062   echo "$as_me:28062: \$? = $ac_status" >&5
28063   (exit "$ac_status"); }; }; then
28064   ac_lo=0 ac_mid=0
28065   while :; do
28066     cat >"conftest.$ac_ext" <<_ACEOF
28067 #line 28067 "configure"
28068 #include "confdefs.h"
28069 $ac_includes_default
28070 int
28071 main (void)
28072 {
28073 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28074   ;
28075   return 0;
28076 }
28077 _ACEOF
28078 rm -f "conftest.$ac_objext"
28079 if { (eval echo "$as_me:28079: \"$ac_compile\"") >&5
28080   (eval $ac_compile) 2>&5
28081   ac_status=$?
28082   echo "$as_me:28082: \$? = $ac_status" >&5
28083   (exit "$ac_status"); } &&
28084          { ac_try='test -s "conftest.$ac_objext"'
28085   { (eval echo "$as_me:28085: \"$ac_try\"") >&5
28086   (eval $ac_try) 2>&5
28087   ac_status=$?
28088   echo "$as_me:28088: \$? = $ac_status" >&5
28089   (exit "$ac_status"); }; }; then
28090   ac_hi=$ac_mid; break
28091 else
28092   echo "$as_me: failed program was:" >&5
28093 cat "conftest.$ac_ext" >&5
28094 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
28095 fi
28096 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28097   done
28098 else
28099   echo "$as_me: failed program was:" >&5
28100 cat "conftest.$ac_ext" >&5
28101 ac_hi=-1 ac_mid=-1
28102   while :; do
28103     cat >"conftest.$ac_ext" <<_ACEOF
28104 #line 28104 "configure"
28105 #include "confdefs.h"
28106 $ac_includes_default
28107 int
28108 main (void)
28109 {
28110 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
28111   ;
28112   return 0;
28113 }
28114 _ACEOF
28115 rm -f "conftest.$ac_objext"
28116 if { (eval echo "$as_me:28116: \"$ac_compile\"") >&5
28117   (eval $ac_compile) 2>&5
28118   ac_status=$?
28119   echo "$as_me:28119: \$? = $ac_status" >&5
28120   (exit "$ac_status"); } &&
28121          { ac_try='test -s "conftest.$ac_objext"'
28122   { (eval echo "$as_me:28122: \"$ac_try\"") >&5
28123   (eval $ac_try) 2>&5
28124   ac_status=$?
28125   echo "$as_me:28125: \$? = $ac_status" >&5
28126   (exit "$ac_status"); }; }; then
28127   ac_lo=$ac_mid; break
28128 else
28129   echo "$as_me: failed program was:" >&5
28130 cat "conftest.$ac_ext" >&5
28131 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
28132 fi
28133 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28134   done
28135 fi
28136 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28137 # Binary search between lo and hi bounds.
28138 while test "x$ac_lo" != "x$ac_hi"; do
28139   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
28140   cat >"conftest.$ac_ext" <<_ACEOF
28141 #line 28141 "configure"
28142 #include "confdefs.h"
28143 $ac_includes_default
28144 int
28145 main (void)
28146 {
28147 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
28148   ;
28149   return 0;
28150 }
28151 _ACEOF
28152 rm -f "conftest.$ac_objext"
28153 if { (eval echo "$as_me:28153: \"$ac_compile\"") >&5
28154   (eval $ac_compile) 2>&5
28155   ac_status=$?
28156   echo "$as_me:28156: \$? = $ac_status" >&5
28157   (exit "$ac_status"); } &&
28158          { ac_try='test -s "conftest.$ac_objext"'
28159   { (eval echo "$as_me:28159: \"$ac_try\"") >&5
28160   (eval $ac_try) 2>&5
28161   ac_status=$?
28162   echo "$as_me:28162: \$? = $ac_status" >&5
28163   (exit "$ac_status"); }; }; then
28164   ac_hi=$ac_mid
28165 else
28166   echo "$as_me: failed program was:" >&5
28167 cat "conftest.$ac_ext" >&5
28168 ac_lo=`expr "$ac_mid" + 1`
28169 fi
28170 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28171 done
28172 ac_cv_sizeof_wchar_t=$ac_lo
28173 else
28174   if test "$cross_compiling" = yes; then
28175   { { echo "$as_me:28175: error: cannot run test program while cross compiling" >&5
28176 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
28177    { (exit 1); exit 1; }; }
28178 else
28179   cat >"conftest.$ac_ext" <<_ACEOF
28180 #line 28180 "configure"
28181 #include "confdefs.h"
28182 $ac_includes_default
28183 int
28184 main (void)
28185 {
28186 FILE *f = fopen ("conftest.val", "w");
28187 if (!f)
28188   $ac_main_return (1);
28189 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
28190 fclose (f);
28191   ;
28192   return 0;
28193 }
28194 _ACEOF
28195 rm -f "conftest$ac_exeext"
28196 if { (eval echo "$as_me:28196: \"$ac_link\"") >&5
28197   (eval $ac_link) 2>&5
28198   ac_status=$?
28199   echo "$as_me:28199: \$? = $ac_status" >&5
28200   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
28201   { (eval echo "$as_me:28201: \"$ac_try\"") >&5
28202   (eval $ac_try) 2>&5
28203   ac_status=$?
28204   echo "$as_me:28204: \$? = $ac_status" >&5
28205   (exit "$ac_status"); }; }; then
28206   ac_cv_sizeof_wchar_t=`cat conftest.val`
28207 else
28208   echo "$as_me: program exited with status $ac_status" >&5
28209 echo "$as_me: failed program was:" >&5
28210 cat "conftest.$ac_ext" >&5
28211 fi
28212 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
28213 fi
28214 fi
28215 rm -f conftest.val
28216 else
28217   ac_cv_sizeof_wchar_t=0
28218 fi
28219 fi
28220 echo "$as_me:28220: result: $ac_cv_sizeof_wchar_t" >&5
28221 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
28222 cat >>confdefs.h <<EOF
28223 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
28224 EOF
28225
28226         # cross-compiling to mingw can run into the problem that attempting to
28227         # link with the regex library fails, causing the test to not set this to
28228         # a number.  "recent" autoconf does not address this problem either -TD
28229         if test -z "$ac_cv_sizeof_wchar_t"
28230         then
28231                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
28232
28233 echo "${as_me:-configure}:28233: testing test failed (assume 2) ..." 1>&5
28234
28235                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
28236                 mv confdefs.tmp confdefs.h
28237                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
28238         fi
28239 fi
28240
28241 ### Construct the ncurses library-subsets, if any, from this set of keywords:
28242 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
28243 ###
28244 ### ticlib modules may be a separate library, otherwise contained in termlib.
28245 ### termlib modules may be a separate library, otherwise contained in ncurses.
28246 ###
28247 ### The of "+" or " " between the tokens controls the way the script
28248 ### chooses to split module lists into libraries.
28249 ###
28250 ### (see CF_LIB_RULES).
28251 echo "$as_me:28251: checking for library subsets" >&5
28252 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
28253 LIB_SUBSETS=
28254
28255 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
28256         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
28257         if test "$with_ticlib" != no ; then
28258                 LIB_SUBSETS="${LIB_SUBSETS} "
28259         else
28260                 LIB_SUBSETS="${LIB_SUBSETS}+"
28261         fi
28262 fi
28263
28264 LIB_SUBSETS="${LIB_SUBSETS}termlib"
28265 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
28266
28267 if test "$with_termlib" != no ; then
28268         LIB_SUBSETS="${LIB_SUBSETS} "
28269 else
28270         LIB_SUBSETS="${LIB_SUBSETS}+"
28271 fi
28272
28273 LIB_SUBSETS="${LIB_SUBSETS}base"
28274
28275 # Most term-driver calls are to tinfo, but some like init_pair are to the
28276 # base library (so it resides in base).
28277 if test "$with_term_driver" != no ; then
28278         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
28279         case "$cf_cv_system_name" in
28280         (*mingw32*|*mingw64*)
28281                 if test "x$with_exp_win32" = xyes ; then
28282                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
28283                 else
28284                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
28285                 fi
28286                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
28287                 ;;
28288         (*)
28289                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
28290                 ;;
28291         esac
28292 elif test "x$with_exp_win32" = xyes ; then
28293         case "$cf_cv_system_name" in
28294         (*mingw32*|*mingw64*)
28295                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
28296                 ;;
28297         (*)
28298                 ;;
28299         esac
28300 fi
28301
28302 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
28303 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
28304
28305 echo "$as_me:28305: result: $LIB_SUBSETS" >&5
28306 echo "${ECHO_T}$LIB_SUBSETS" >&6
28307
28308 ### Construct the list of include-directories to be generated
28309
28310 if test "$srcdir" != "."; then
28311         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
28312 fi
28313 CPPFLAGS="-I../include $CPPFLAGS"
28314 if test "$srcdir" != "."; then
28315         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
28316 fi
28317 CPPFLAGS="-I. $CPPFLAGS"
28318
28319 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
28320 if test "$srcdir" != "."; then
28321         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
28322 fi
28323 if test "$GCC" != yes; then
28324         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28325 elif test "$includedir" != "/usr/include"; then
28326         if test "$includedir" = '${prefix}/include' ; then
28327                 if test x$prefix != x/usr ; then
28328                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28329                 fi
28330         else
28331                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
28332         fi
28333 fi
28334
28335 ### Build up pieces for makefile rules
28336 echo "$as_me:28336: checking default library suffix" >&5
28337 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
28338
28339         case $DFT_LWR_MODEL in
28340         (libtool) DFT_ARG_SUFFIX=''   ;;
28341         (normal)  DFT_ARG_SUFFIX=''   ;;
28342         (debug)   DFT_ARG_SUFFIX='_g' ;;
28343         (profile) DFT_ARG_SUFFIX='_p' ;;
28344         (shared)  DFT_ARG_SUFFIX=''   ;;
28345         esac
28346         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
28347 echo "$as_me:28347: result: $DFT_ARG_SUFFIX" >&5
28348 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
28349
28350 echo "$as_me:28350: checking default library-dependency suffix" >&5
28351 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
28352
28353         case X$DFT_LWR_MODEL in
28354         (Xlibtool)
28355                 DFT_LIB_SUFFIX='.la'
28356                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28357                 ;;
28358         (Xdebug)
28359                 case "$cf_cv_system_name" in
28360                 (*-msvc*)
28361                         DFT_LIB_SUFFIX='_g.lib'
28362                         ;;
28363                 (*)
28364                         DFT_LIB_SUFFIX='_g.a'
28365                         ;;
28366                 esac
28367                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28368                 ;;
28369         (Xprofile)
28370                 case "$cf_cv_system_name" in
28371                 (*-msvc*)
28372                         DFT_LIB_SUFFIX='_p.lib'
28373                         ;;
28374                 (*)
28375                         DFT_LIB_SUFFIX='_p.a'
28376                         ;;
28377                 esac
28378                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28379                 ;;
28380         (Xshared)
28381                 case "$cf_cv_system_name" in
28382                 (aix[5-7]*)
28383                         DFT_LIB_SUFFIX='.so'
28384                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28385                         ;;
28386                 (*-msvc*)
28387                         DFT_LIB_SUFFIX='.dll'
28388                         DFT_DEP_SUFFIX='.dll.lib'
28389                         ;;
28390                 (cygwin*|msys*|mingw*)
28391                         DFT_LIB_SUFFIX='.dll'
28392                         DFT_DEP_SUFFIX='.dll.a'
28393                         ;;
28394                 (darwin*)
28395                         DFT_LIB_SUFFIX='.dylib'
28396                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28397                         ;;
28398                 (hpux*)
28399                         case "$target" in
28400                         (ia64*)
28401                                 DFT_LIB_SUFFIX='.so'
28402                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28403                                 ;;
28404                         (*)
28405                                 DFT_LIB_SUFFIX='.sl'
28406                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28407                                 ;;
28408                         esac
28409                         ;;
28410                 (*)
28411                         DFT_LIB_SUFFIX='.so'
28412                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28413                         ;;
28414                 esac
28415                 ;;
28416         (*)
28417                 case "$target" in
28418                 (*-msvc*)
28419                         DFT_LIB_SUFFIX='.lib'
28420                         ;;
28421                 (*)
28422                         DFT_LIB_SUFFIX='.a'
28423                         ;;
28424                 esac
28425                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
28426                 ;;
28427         esac
28428         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28429         then
28430                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
28431                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
28432         fi
28433 echo "$as_me:28433: result: $DFT_DEP_SUFFIX" >&5
28434 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
28435
28436 echo "$as_me:28436: checking default object directory" >&5
28437 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
28438
28439         case $DFT_LWR_MODEL in
28440         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
28441         (normal)  DFT_OBJ_SUBDIR='objects' ;;
28442         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
28443         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
28444         (shared)
28445                 case "$cf_cv_system_name" in
28446                 (cygwin|msys)
28447                         DFT_OBJ_SUBDIR='objects' ;;
28448                 (*)
28449                         DFT_OBJ_SUBDIR='obj_s' ;;
28450                 esac
28451         esac
28452 echo "$as_me:28452: result: $DFT_OBJ_SUBDIR" >&5
28453 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
28454
28455 if test "x$cf_with_cxx" = xyes ; then
28456 echo "$as_me:28456: checking c++ library-dependency suffix" >&5
28457 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
28458 if test "$with_libtool" != "no"; then
28459         # libtool thinks it can make c++ shared libraries (perhaps only g++)
28460         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28461 elif test "$with_shared_cxx" != "no"; then
28462         # also for g++ users...
28463         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
28464 else
28465         # we normally make a static library because C/C++ library rules differ
28466
28467         case Xnormal in
28468         (Xlibtool)
28469                 CXX_LIB_SUFFIX='.la'
28470                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28471                 ;;
28472         (Xdebug)
28473                 case "$cf_cv_system_name" in
28474                 (*-msvc*)
28475                         CXX_LIB_SUFFIX='_g.lib'
28476                         ;;
28477                 (*)
28478                         CXX_LIB_SUFFIX='_g.a'
28479                         ;;
28480                 esac
28481                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28482                 ;;
28483         (Xprofile)
28484                 case "$cf_cv_system_name" in
28485                 (*-msvc*)
28486                         CXX_LIB_SUFFIX='_p.lib'
28487                         ;;
28488                 (*)
28489                         CXX_LIB_SUFFIX='_p.a'
28490                         ;;
28491                 esac
28492                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28493                 ;;
28494         (Xshared)
28495                 case "$cf_cv_system_name" in
28496                 (aix[5-7]*)
28497                         CXX_LIB_SUFFIX='.so'
28498                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28499                         ;;
28500                 (*-msvc*)
28501                         CXX_LIB_SUFFIX='.dll'
28502                         CXX_DEP_SUFFIX='.dll.lib'
28503                         ;;
28504                 (cygwin*|msys*|mingw*)
28505                         CXX_LIB_SUFFIX='.dll'
28506                         CXX_DEP_SUFFIX='.dll.a'
28507                         ;;
28508                 (darwin*)
28509                         CXX_LIB_SUFFIX='.dylib'
28510                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28511                         ;;
28512                 (hpux*)
28513                         case "$target" in
28514                         (ia64*)
28515                                 CXX_LIB_SUFFIX='.so'
28516                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28517                                 ;;
28518                         (*)
28519                                 CXX_LIB_SUFFIX='.sl'
28520                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28521                                 ;;
28522                         esac
28523                         ;;
28524                 (*)
28525                         CXX_LIB_SUFFIX='.so'
28526                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28527                         ;;
28528                 esac
28529                 ;;
28530         (*)
28531                 case "$target" in
28532                 (*-msvc*)
28533                         CXX_LIB_SUFFIX='.lib'
28534                         ;;
28535                 (*)
28536                         CXX_LIB_SUFFIX='.a'
28537                         ;;
28538                 esac
28539                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
28540                 ;;
28541         esac
28542         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
28543         then
28544                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
28545                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
28546         fi
28547
28548 fi
28549 echo "$as_me:28549: result: $CXX_LIB_SUFFIX" >&5
28550 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
28551
28552 fi
28553
28554 # do not want -ldl in build except as needed for -lncurses dependency
28555 if test "x$with_dlsym" = xyes ; then
28556 if test "$DFT_LWR_MODEL" = shared || \
28557    test "$DFT_LWR_MODEL" = libtool ; then
28558
28559 # remove dl library from $LIBS
28560 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
28561
28562 fi
28563 fi
28564 ### Set up low-level terminfo dependencies for makefiles.
28565
28566 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
28567 # do not need libdl
28568 TICS_LIST=
28569 if test "x$with_dlsym" = xyes ; then
28570
28571 # remove dl library from $SHLIB_LIST
28572 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
28573
28574 fi
28575
28576 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
28577 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
28578 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
28579 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
28580 then
28581         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
28582 fi
28583
28584 if test "$with_ticlib" != no ; then
28585
28586         if test "x$with_ticlib" != xyes ; then
28587                 TICS_NAME=$with_ticlib
28588                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28589                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28590                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28591                 TICS_LIB_SUFFIX="${with_ticlib}"
28592         else
28593                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
28594                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
28595                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
28596                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28597         fi
28598         TICS_LDFLAGS="-L${LIB_DIR}"
28599         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28600 else
28601         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28602         TICS_LDFLAGS="-L${LIB_DIR}"
28603         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28604 fi
28605
28606 if test "$with_termlib" != no ; then
28607
28608         if test "x$with_termlib" != xyes ; then
28609                 TINFO_NAME=$with_termlib
28610                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28611                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28612                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28613                 TINFO_LIB_SUFFIX="${with_termlib}"
28614         else
28615                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28616                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28617                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28618                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28619         fi
28620
28621         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28622         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28623         if test "$DFT_LWR_MODEL" = "libtool"; then
28624                 TEST_ARGS="${TEST_DEPS}"
28625                 TEST_ARG2="${TEST_DEP2}"
28626                 TINFO_LDFLAGS="-L${LIB_DIR}"
28627                 TINFO_LIBS="$TEST_ARGS"
28628                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28629                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28630         else
28631                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28632                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28633                 if test "x$with_term_driver" != xno ; then
28634                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28635                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28636                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28637                 else
28638                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28639                         TINFO_LIBS="$TEST_ARGS"
28640                 fi
28641                 TINFO_LDFLAGS="-L${LIB_DIR}"
28642                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28643         fi
28644 else
28645         # the next lines are needed for linking libtic over libncurses
28646         TINFO_NAME=${LIB_NAME}
28647         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28648         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28649         if test "x$with_tic_depends" = xyes ; then
28650                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28651         else
28652                 TICS_LIST="$SHLIB_LIST"
28653         fi
28654
28655         TINFO_LDFLAGS="-L${LIB_DIR}"
28656         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28657 fi
28658
28659 if test "$DFT_LWR_MODEL" = shared ; then
28660         case "$cf_cv_system_name" in
28661         (cygwin*|msys*)
28662                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28663                 TINFO_SUFFIX=.dll
28664                 ;;
28665         esac
28666 fi
28667
28668 if test "x$with_dlsym" = xyes ; then
28669
28670 # remove dl library from $TICS_LIST
28671 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28672
28673 fi
28674
28675 if test "$DFT_LWR_MODEL" = "libtool"; then
28676         OBJEXT=lo
28677 fi
28678
28679 # needed for Ada95
28680 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28681
28682 case "$DFT_LWR_MODEL" in
28683 (normal|debug|profile)
28684
28685 if test "$GCC" = yes ; then
28686         case "$cf_cv_system_name" in
28687         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28688                 LDFLAGS_STATIC=
28689                 LDFLAGS_SHARED=
28690                 ;;
28691         (*)     # normally, except when broken
28692                 LDFLAGS_STATIC=-static
28693                 LDFLAGS_SHARED=-dynamic
28694                 ;;
28695         esac
28696 else
28697         case "$cf_cv_system_name" in
28698         (aix[4-7]*)     # from ld manpage
28699                 LDFLAGS_STATIC=-bstatic
28700                 LDFLAGS_SHARED=-bdynamic
28701                 ;;
28702         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28703                 # We could also use just "archive" and "shared".
28704                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28705                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28706                 ;;
28707         (irix*)         # from ld manpage IRIX64
28708                 LDFLAGS_STATIC=-Bstatic
28709                 LDFLAGS_SHARED=-Bdynamic
28710                 ;;
28711         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28712                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28713                 LDFLAGS_STATIC=-noso
28714                 LDFLAGS_SHARED=-so_archive
28715                 ;;
28716         (solaris2*)
28717                 LDFLAGS_STATIC=-Bstatic
28718                 LDFLAGS_SHARED=-Bdynamic
28719                 ;;
28720         esac
28721 fi
28722
28723 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28724 then
28725         echo "$as_me:28725: checking if linker supports switching between static/dynamic" >&5
28726 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28727
28728         rm -f libconftest.a
28729         cat >conftest.$ac_ext <<EOF
28730 #line 28730 "configure"
28731 #include <stdio.h>
28732 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28733 EOF
28734         if { (eval echo "$as_me:28734: \"$ac_compile\"") >&5
28735   (eval $ac_compile) 2>&5
28736   ac_status=$?
28737   echo "$as_me:28737: \$? = $ac_status" >&5
28738   (exit "$ac_status"); } ; then
28739                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28740                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28741         fi
28742         rm -f conftest.*
28743
28744         cf_save_LIBS="$LIBS"
28745
28746         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28747         cat >"conftest.$ac_ext" <<_ACEOF
28748 #line 28748 "configure"
28749 #include "confdefs.h"
28750
28751 #line 28751 "configure"
28752 #include <stdio.h>
28753 int cf_ldflags_static(FILE *fp);
28754
28755 int
28756 main (void)
28757 {
28758
28759         return cf_ldflags_static(stdin);
28760
28761   ;
28762   return 0;
28763 }
28764 _ACEOF
28765 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28766 if { (eval echo "$as_me:28766: \"$ac_link\"") >&5
28767   (eval $ac_link) 2>&5
28768   ac_status=$?
28769   echo "$as_me:28769: \$? = $ac_status" >&5
28770   (exit "$ac_status"); } &&
28771          { ac_try='test -s "conftest$ac_exeext"'
28772   { (eval echo "$as_me:28772: \"$ac_try\"") >&5
28773   (eval $ac_try) 2>&5
28774   ac_status=$?
28775   echo "$as_me:28775: \$? = $ac_status" >&5
28776   (exit "$ac_status"); }; }; then
28777
28778         # some linkers simply ignore the -dynamic
28779         case x`file "conftest$ac_exeext" 2>/dev/null` in
28780         (*static*)
28781                 cf_ldflags_static=no
28782                 ;;
28783         (*)
28784                 cf_ldflags_static=yes
28785                 ;;
28786         esac
28787
28788 else
28789   echo "$as_me: failed program was:" >&5
28790 cat "conftest.$ac_ext" >&5
28791 cf_ldflags_static=no
28792 fi
28793 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28794
28795         rm -f libconftest.*
28796         LIBS="$cf_save_LIBS"
28797
28798         echo "$as_me:28798: result: $cf_ldflags_static" >&5
28799 echo "${ECHO_T}$cf_ldflags_static" >&6
28800
28801         if test "$cf_ldflags_static" != yes
28802         then
28803                 LDFLAGS_STATIC=
28804                 LDFLAGS_SHARED=
28805         fi
28806 else
28807         LDFLAGS_STATIC=
28808         LDFLAGS_SHARED=
28809 fi
28810
28811         ;;
28812 esac
28813
28814 echo "$as_me:28814: checking where we will install curses.h" >&5
28815 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28816
28817 includesubdir=
28818 if test "$with_overwrite" = no && \
28819  { test "x$includedir" = 'x${prefix}/include' || \
28820    test "x$includedir" = "x${prefix}/include"; }
28821 then
28822         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28823 fi
28824 echo "$as_me:28824: result: ${includedir}${includesubdir}" >&5
28825 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28826
28827 ### Resolve a conflict between normal and wide-curses by forcing applications
28828 ### that will need libutf8 to add it to their configure script.
28829 if test "$with_overwrite" != no ; then
28830 if test "$NCURSES_LIBUTF8" = 1 ; then
28831         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28832         { echo "$as_me:28832: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28833 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28834 fi
28835 fi
28836 WITH_OVERWRITE=$with_overwrite
28837
28838 ### At least on MinGW a shared library build without libtool
28839 ### requires adding the additional libs to the link list.
28840 case "$cf_cv_system_name" in
28841 (*mingw32*|*mingw64*)
28842         if test "$DFT_LWR_MODEL" != "libtool"; then
28843            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28844         fi
28845         ;;
28846 *)      ;;
28847 esac
28848
28849 ### predefined stuff for the test programs
28850
28851 cat >>confdefs.h <<\EOF
28852 #define HAVE_SLK_COLOR 1
28853 EOF
28854
28855 # pkgsrc uses these
28856
28857 echo "$as_me:28857: checking for desired basename for form library" >&5
28858 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28859
28860 # Check whether --with-form-libname or --without-form-libname was given.
28861 if test "${with_form_libname+set}" = set; then
28862   withval="$with_form_libname"
28863   with_lib_basename=$withval
28864 else
28865   with_lib_basename=form
28866 fi;
28867 FORM_NAME="$with_lib_basename"
28868
28869 case "x$FORM_NAME" in
28870 (x|xno|xnone|xyes)
28871         FORM_NAME=form
28872         ;;
28873 (*)
28874         ;;
28875 esac
28876
28877 echo "$as_me:28877: result: $FORM_NAME" >&5
28878 echo "${ECHO_T}$FORM_NAME" >&6
28879
28880 echo "$as_me:28880: checking for desired basename for menu library" >&5
28881 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28882
28883 # Check whether --with-menu-libname or --without-menu-libname was given.
28884 if test "${with_menu_libname+set}" = set; then
28885   withval="$with_menu_libname"
28886   with_lib_basename=$withval
28887 else
28888   with_lib_basename=menu
28889 fi;
28890 MENU_NAME="$with_lib_basename"
28891
28892 case "x$MENU_NAME" in
28893 (x|xno|xnone|xyes)
28894         MENU_NAME=menu
28895         ;;
28896 (*)
28897         ;;
28898 esac
28899
28900 echo "$as_me:28900: result: $MENU_NAME" >&5
28901 echo "${ECHO_T}$MENU_NAME" >&6
28902
28903 echo "$as_me:28903: checking for desired basename for panel library" >&5
28904 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28905
28906 # Check whether --with-panel-libname or --without-panel-libname was given.
28907 if test "${with_panel_libname+set}" = set; then
28908   withval="$with_panel_libname"
28909   with_lib_basename=$withval
28910 else
28911   with_lib_basename=panel
28912 fi;
28913 PANEL_NAME="$with_lib_basename"
28914
28915 case "x$PANEL_NAME" in
28916 (x|xno|xnone|xyes)
28917         PANEL_NAME=panel
28918         ;;
28919 (*)
28920         ;;
28921 esac
28922
28923 echo "$as_me:28923: result: $PANEL_NAME" >&5
28924 echo "${ECHO_T}$PANEL_NAME" >&6
28925
28926 echo "$as_me:28926: checking for desired basename for cxx library" >&5
28927 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28928
28929 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28930 if test "${with_cxx_libname+set}" = set; then
28931   withval="$with_cxx_libname"
28932   with_lib_basename=$withval
28933 else
28934   with_lib_basename=ncurses++
28935 fi;
28936 CXX_NAME="$with_lib_basename"
28937
28938 case "x$CXX_NAME" in
28939 (x|xno|xnone|xyes)
28940         CXX_NAME=ncurses++
28941         ;;
28942 (*)
28943         ;;
28944 esac
28945
28946 echo "$as_me:28946: result: $CXX_NAME" >&5
28947 echo "${ECHO_T}$CXX_NAME" >&6
28948
28949 ### Construct the list of subdirectories for which we'll customize makefiles
28950 ### with the appropriate compile-rules.
28951
28952 echo "$as_me:28952: checking for src modules" >&5
28953 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28954
28955 # dependencies and linker-arguments for test-programs
28956 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28957 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28958 if test "$DFT_LWR_MODEL" = "libtool"; then
28959         TEST_ARGS="${TEST_DEPS}"
28960         TEST_ARG2="${TEST_DEP2}"
28961 else
28962         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28963         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28964 fi
28965
28966 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28967 cf_cv_src_modules=
28968 for cf_dir in $modules_to_build
28969 do
28970         if test -f "$srcdir/$cf_dir/modules" ; then
28971
28972                 if test -z "$cf_cv_src_modules"; then
28973                         cf_cv_src_modules=$cf_dir
28974                 else
28975                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28976                 fi
28977
28978                 # Make the ncurses_cfg.h file record the library interface files as
28979                 # well.  These are header files that are the same name as their
28980                 # directory.  Ncurses is the only library that does not follow
28981                 # that pattern.
28982                 if test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28983
28984 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28985
28986                         cat >>confdefs.h <<EOF
28987 #define HAVE_${cf_have_include}_H 1
28988 EOF
28989
28990                         cat >>confdefs.h <<EOF
28991 #define HAVE_LIB${cf_have_include} 1
28992 EOF
28993
28994 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28995
28996 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28997
28998                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28999                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
29000                         if test "$DFT_LWR_MODEL" = "libtool"; then
29001                                 TEST_ARGS="${TEST_DEPS}"
29002                                 TEST_ARG2="${TEST_DEP2}"
29003                         else
29004                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
29005                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
29006                         fi
29007                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
29008                 fi
29009         fi
29010 done
29011 echo "$as_me:29011: result: $cf_cv_src_modules" >&5
29012 echo "${ECHO_T}$cf_cv_src_modules" >&6
29013
29014 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
29015 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
29016
29017 SRC_SUBDIRS=
29018 if test "x$cf_with_manpages" != xno ; then
29019         SRC_SUBDIRS="$SRC_SUBDIRS man"
29020 fi
29021 SRC_SUBDIRS="$SRC_SUBDIRS include"
29022 for cf_dir in $cf_cv_src_modules
29023 do
29024         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
29025 done
29026 if test "x$cf_with_tests" != "xno" ; then
29027         SRC_SUBDIRS="$SRC_SUBDIRS test"
29028 fi
29029 # always make this, to install the ncurses-config script
29030 SRC_SUBDIRS="$SRC_SUBDIRS misc"
29031 if test "$cf_with_cxx_binding" != no; then
29032         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
29033         SRC_SUBDIRS="$SRC_SUBDIRS c++"
29034 fi
29035
29036 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
29037 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
29038
29039 ADA_SUBDIRS=
29040 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
29041         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
29042         ADA_SUBDIRS="gen src"
29043         if test "x$cf_with_tests" != "xno" ; then
29044                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
29045         fi
29046 fi
29047
29048 SUB_MAKEFILES=
29049 for cf_dir in $SRC_SUBDIRS
29050 do
29051         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
29052 done
29053
29054 if test -n "$ADA_SUBDIRS"; then
29055         for cf_dir in $ADA_SUBDIRS
29056         do
29057                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
29058         done
29059
29060 fi
29061
29062 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
29063    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
29064    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
29065    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
29066 fi
29067
29068 DIRS_TO_MAKE="lib"
29069 for cf_item in $cf_list_models
29070 do
29071
29072         case $cf_item in
29073         (libtool) cf_subdir='obj_lo'  ;;
29074         (normal)  cf_subdir='objects' ;;
29075         (debug)   cf_subdir='obj_g' ;;
29076         (profile) cf_subdir='obj_p' ;;
29077         (shared)
29078                 case "$cf_cv_system_name" in
29079                 (cygwin|msys)
29080                         cf_subdir='objects' ;;
29081                 (*)
29082                         cf_subdir='obj_s' ;;
29083                 esac
29084         esac
29085
29086         for cf_item2 in $DIRS_TO_MAKE
29087         do
29088                 test "$cf_item2" = "$cf_subdir" && break
29089         done
29090         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
29091 done
29092 for cf_dir in $DIRS_TO_MAKE
29093 do
29094         test ! -d "$cf_dir" && mkdir "$cf_dir"
29095 done
29096
29097 # symbols that differ when compiling Ada95 by itself.
29098 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
29099
29100 # values to use as strings
29101
29102 cat >>confdefs.h <<EOF
29103 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
29104 EOF
29105
29106 cat >>confdefs.h <<EOF
29107 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
29108 EOF
29109
29110 ### Define substitutions for header files to avoid name-pollution
29111
29112 if test "x$cf_cv_have_tcgetattr" = xyes ; then
29113         HAVE_TCGETATTR=1
29114 else
29115         HAVE_TCGETATTR=0
29116 fi
29117
29118 if test "x$ac_cv_header_stdint_h" = xyes ; then
29119         HAVE_STDINT_H=1
29120 else
29121         HAVE_STDINT_H=0
29122 fi
29123
29124 if test "x$ac_cv_header_termio_h" = xyes ; then
29125         HAVE_TERMIO_H=1
29126 else
29127         HAVE_TERMIO_H=0
29128 fi
29129
29130 if test "x$ac_cv_header_termios_h" = xyes ; then
29131         HAVE_TERMIOS_H=1
29132 else
29133         HAVE_TERMIOS_H=0
29134 fi
29135
29136 ################################################################################
29137 test "x$use_database" = xyes && \
29138 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
29139
29140 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
29141 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
29142
29143 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
29144 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
29145 fi
29146
29147 if test "x$cf_with_tests" != xno ; then
29148         MAKE_TESTS=
29149 else
29150         MAKE_TESTS="#"
29151 fi
29152
29153 ADAHTML_DIR=../../doc/html/ada
29154
29155 # workaround for OS/2 (20151017)
29156 case "$cf_cv_system_name" in
29157 (os2*)
29158         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
29159         ;;
29160 (*)
29161         LIBTOOL_OPTS_CXX=
29162         ;;
29163 esac
29164
29165 # workaround for g++ versus Solaris (20131116)
29166 case "$cf_cv_system_name" in
29167 (solaris2*)
29168         case "x$CPPFLAGS" in
29169         (*-D_XOPEN_SOURCE_EXTENDED*)
29170                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
29171
29172 echo "${as_me:-configure}:29172: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
29173
29174                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
29175                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
29176                 ;;
29177         esac
29178         ;;
29179 esac
29180
29181 # Help to automatically enable the extended curses features when using either
29182 # the *-config or the ".pc" files by adding defines.
29183 echo "$as_me:29183: checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script" >&5
29184 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}${cf_config_suffix}-config script... $ECHO_C" >&6
29185 PKG_CFLAGS=
29186 for cf_loop1 in $CPPFLAGS_after_XOPEN
29187 do
29188         cf_found=no
29189         for cf_loop2 in $CPPFLAGS_before_XOPEN
29190         do
29191                 if test "x$cf_loop1" = "x$cf_loop2"
29192                 then
29193                         cf_found=yes
29194                         break
29195                 fi
29196         done
29197         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
29198 done
29199 echo "$as_me:29199: result: $PKG_CFLAGS" >&5
29200 echo "${ECHO_T}$PKG_CFLAGS" >&6
29201
29202 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
29203 case "x$NCURSES_OSPEED" in
29204 (*short*)
29205         cf_compatible=1
29206         ;;
29207 (*)
29208         cf_compatible=0
29209         ;;
29210 esac
29211
29212 cat >>confdefs.h <<EOF
29213 #define NCURSES_OSPEED_COMPAT $cf_compatible
29214 EOF
29215
29216 case "x$cf_cv_typeof_chtype" in
29217 (xshort|xint|xlong)
29218         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
29219         ;;
29220 esac
29221
29222 case "x$cf_cv_typeof_mmask_t" in
29223 (xshort|xint|xlong)
29224         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
29225         ;;
29226 esac
29227
29228 # substitute into misc/Makefile to suppress
29229 # (un)install.data from the
29230 # (un)install rules.
29231 if test "x$cf_with_db_install" = "xno"; then
29232         MISC_INSTALL_DATA=
29233         MISC_UNINSTALL_DATA=
29234 else
29235         MISC_INSTALL_DATA=install.data
29236         MISC_UNINSTALL_DATA=uninstall.data
29237 fi
29238
29239 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
29240         MAKE_DATABASE="#"
29241 else
29242         MAKE_DATABASE="$MAKE_TERMINFO"
29243 fi
29244
29245 if test -n "$PACKAGE"
29246 then
29247         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
29248         export PACKAGE
29249         echo "package: $PACKAGE"
29250 fi
29251
29252 UNALTERED_SYMS=
29253 cf_filter_syms=no
29254
29255 if test -n "$RESULTING_SYMS"
29256 then
29257         cf_filter_syms=$cf_dft_filter_syms
29258         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_default" 1>&6
29259
29260 echo "${as_me:-configure}:29260: testing will map symbols to ABI=$cf_cv_abi_default ..." 1>&5
29261
29262 fi
29263
29264 if test "x$WILDCARD_SYMS" = xno
29265 then
29266         cf_filter_syms=yes
29267 fi
29268
29269 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
29270
29271 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
29272 if test "$cf_filter_syms" = yes
29273 then
29274         RESULTING_SYMS=resulting.map
29275 fi
29276
29277 if test "x$cross_compiling" = xyes ; then
29278         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
29279         CHECK_BUILD="#"
29280 else
29281         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
29282         CHECK_BUILD=
29283 fi
29284
29285 # This is used for the *-config script and *.pc data files.
29286
29287 echo "$as_me:29287: checking for linker search path" >&5
29288 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
29289 if test "${cf_cv_ld_searchpath+set}" = set; then
29290   echo $ECHO_N "(cached) $ECHO_C" >&6
29291 else
29292
29293 if test "$cross_compiling" != yes ; then
29294
29295 # GNU binutils' ld does not involve permissions which may stop ldconfig.
29296 cf_pathlist=`${LD:-ld} --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
29297
29298 # The -NX options tell newer versions of Linux ldconfig to not attempt to
29299 # update the cache, which makes it run faster.
29300 test -z "$cf_pathlist" && \
29301         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
29302
29303 test -z "$cf_pathlist" &&
29304         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
29305
29306 # This works with OpenBSD 6.5, which lists only filenames
29307 test -z "$cf_pathlist" &&
29308         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
29309
29310 if test -z "$cf_pathlist"
29311 then
29312         # dyld default path with MacOS
29313         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
29314         then
29315                 # do this to bypass check
29316                 cf_cv_ld_searchpath='$HOME/lib'
29317                 cf_pathlist="/usr/local/lib /lib /usr/lib"
29318         fi
29319 fi
29320
29321 if test -z "$cf_pathlist"
29322 then
29323         # Solaris is "SunOS"
29324         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
29325         then
29326                 case x`(isainfo -b)` in
29327                 (x64)
29328                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
29329                         ;;
29330                 (x32)
29331                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
29332                         cf_pathlist="$cf_pathlist /lib /usr/lib"
29333                         ;;
29334                 (*)
29335                         { echo "$as_me:29335: WARNING: problem with Solaris architecture" >&5
29336 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
29337                         ;;
29338                 esac
29339         fi
29340 fi
29341
29342 if test -z "$cf_pathlist"
29343 then
29344         # HP-UX
29345         if test x"`uname -s`" = xHP-UX
29346         then
29347                 case x`getconf LONG_BIT` in
29348                 (x64)
29349                         cf_pathlist="/usr/lib/hpux64"
29350                         ;;
29351                 (x*)
29352                         cf_pathlist="/usr/lib/hpux32"
29353                         ;;
29354                 esac
29355         fi
29356 fi
29357
29358 fi
29359
29360 # If nothing else, assume it is conventional
29361 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
29362
29363 # Finally, check that this is only directories
29364 for cf_path in $0 $cf_pathlist
29365 do
29366         if test -d "$cf_path"; then
29367                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
29368                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
29369         fi
29370 done
29371
29372 # Ensure that it is nonempty
29373 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
29374
29375 fi
29376 echo "$as_me:29376: result: $cf_cv_ld_searchpath" >&5
29377 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
29378
29379 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
29380
29381 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"
29382 ac_config_commands="$ac_config_commands default"
29383 cat >confcache <<\_ACEOF
29384 # This file is a shell script that caches the results of configure
29385 # tests run on this system so they can be shared between configure
29386 # scripts and configure runs, see configure's option --config-cache.
29387 # It is not useful on other systems.  If it contains results you don't
29388 # want to keep, you may remove or edit it.
29389 #
29390 # config.status only pays attention to the cache file if you give it
29391 # the --recheck option to rerun configure.
29392 #
29393 # `ac_cv_env_foo' variables (set or unset) will be overriden when
29394 # loading this file, other *unset* `ac_cv_foo' will be assigned the
29395 # following values.
29396
29397 _ACEOF
29398
29399 # The following way of writing the cache mishandles newlines in values,
29400 # but we know of no workaround that is simple, portable, and efficient.
29401 # So, don't put newlines in cache variables' values.
29402 # Ultrix sh set writes to stderr and can't be redirected directly,
29403 # and sets the high bit in the cache file unless we assign to the vars.
29404 {
29405   (set) 2>&1 |
29406     case `(ac_space=' '; set | grep ac_space) 2>&1` in
29407     *ac_space=\ *)
29408       # `set' does not quote correctly, so add quotes (double-quote
29409       # substitution turns \\\\ into \\, and sed turns \\ into \).
29410       sed -n \
29411         "s/'/'\\\\''/g;
29412           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
29413       ;;
29414     *)
29415       # `set' quotes correctly as required by POSIX, so do not add quotes.
29416       sed -n \
29417         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
29418       ;;
29419     esac;
29420 } |
29421   sed '
29422      t clear
29423      : clear
29424      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
29425      t end
29426      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
29427      : end' >>confcache
29428 if cmp -s $cache_file confcache; then :; else
29429   if test -w $cache_file; then
29430     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
29431     cat confcache >$cache_file
29432   else
29433     echo "not updating unwritable cache $cache_file"
29434   fi
29435 fi
29436 rm -f confcache
29437
29438 test "x$prefix" = xNONE && prefix=$ac_default_prefix
29439 # Let make expand exec_prefix.
29440 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
29441
29442 # VPATH may cause trouble with some makes, so we remove $(srcdir),
29443 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
29444 # trailing colons and then remove the whole line if VPATH becomes empty
29445 # (actually we leave an empty line to preserve line numbers).
29446 if test "x$srcdir" = x.; then
29447   ac_vpsub='/^[         ]*VPATH[        ]*=/{
29448 s/:*\$(srcdir):*/:/;
29449 s/:*\${srcdir}:*/:/;
29450 s/:*@srcdir@:*/:/;
29451 s/^\([^=]*=[    ]*\):*/\1/;
29452 s/:*$//;
29453 s/^[^=]*=[      ]*$//;
29454 }'
29455 fi
29456
29457 DEFS=-DHAVE_CONFIG_H
29458
29459 : "${CONFIG_STATUS=./config.status}"
29460 ac_clean_files_save=$ac_clean_files
29461 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
29462 { echo "$as_me:29462: creating $CONFIG_STATUS" >&5
29463 echo "$as_me: creating $CONFIG_STATUS" >&6;}
29464 cat >"$CONFIG_STATUS" <<_ACEOF
29465 #! $SHELL
29466 # Generated automatically by configure.
29467 # Run this file to recreate the current configuration.
29468 # Compiler output produced by configure, useful for debugging
29469 # configure, is in config.log if it exists.
29470
29471 me=\`echo "\$0" | sed -e 's,.*\\/,,'\`
29472
29473 debug=false
29474 SHELL=\${CONFIG_SHELL-$SHELL}
29475 ac_cs_invocation="\$0 \$@"
29476
29477 CLICOLOR_FORCE= GREP_OPTIONS=
29478 unset CLICOLOR_FORCE GREP_OPTIONS
29479 _ACEOF
29480
29481 cat >>"$CONFIG_STATUS" <<\_ACEOF
29482 # Be Bourne compatible
29483 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
29484   emulate sh
29485   NULLCMD=:
29486 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29487   set -o posix
29488 fi
29489
29490 # Name of the executable.
29491 as_me=`echo "$0" |sed 's,.*[\\/],,'`
29492
29493 if expr a : '\(a\)' >/dev/null 2>&1; then
29494   as_expr="expr"
29495 else
29496   as_expr="false"
29497 fi
29498
29499 rm -f conf$$ conf$$.exe conf$$.file
29500 echo >conf$$.file
29501 if ln -s conf$$.file conf$$ 2>/dev/null; then
29502   # We could just check for DJGPP; but this test a) works b) is more generic
29503   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
29504   if test -f conf$$.exe; then
29505     # Don't use ln at all; we don't have any links
29506     as_ln_s='cp -p'
29507   else
29508     as_ln_s='ln -s'
29509   fi
29510 elif ln conf$$.file conf$$ 2>/dev/null; then
29511   as_ln_s='ln'
29512 else
29513   as_ln_s='cp -p'
29514 fi
29515 rm -f conf$$ conf$$.exe conf$$.file
29516
29517 as_executable_p="test -f"
29518
29519 # Support unset when possible.
29520 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
29521   as_unset="unset"
29522 else
29523   as_unset="false"
29524 fi
29525
29526 # NLS nuisances.
29527 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
29528 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
29529 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
29530 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
29531 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
29532 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
29533 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
29534 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
29535
29536 # IFS
29537 # We need space, tab and new line, in precisely that order.
29538 as_nl='
29539 '
29540 IFS="   $as_nl"
29541
29542 # CDPATH.
29543 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
29544
29545 exec 6>&1
29546
29547 _ACEOF
29548
29549 # Files that config.status was made for.
29550 if test -n "$ac_config_files"; then
29551   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
29552 fi
29553
29554 if test -n "$ac_config_headers"; then
29555   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
29556 fi
29557
29558 if test -n "$ac_config_links"; then
29559   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
29560 fi
29561
29562 if test -n "$ac_config_commands"; then
29563   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
29564 fi
29565
29566 cat >>"$CONFIG_STATUS" <<\EOF
29567
29568 ac_cs_usage="\
29569 \`$as_me' instantiates files from templates according to the
29570 current configuration.
29571
29572 Usage: $0 [OPTIONS] [FILE]...
29573
29574   -h, --help       print this help, then exit
29575   -V, --version    print version number, then exit
29576   -d, --debug      don't remove temporary files
29577       --recheck    update $as_me by reconfiguring in the same conditions
29578   --file=FILE[:TEMPLATE]
29579                    instantiate the configuration file FILE
29580   --header=FILE[:TEMPLATE]
29581                    instantiate the configuration header FILE
29582
29583 Configuration files:
29584 $config_files
29585
29586 Configuration headers:
29587 $config_headers
29588
29589 Configuration commands:
29590 $config_commands
29591
29592 Report bugs to <dickey@invisible-island.net>."
29593 EOF
29594
29595 cat >>"$CONFIG_STATUS" <<EOF
29596 ac_cs_version="\\
29597 config.status
29598 configured by $0, generated by GNU Autoconf 2.52.20230903,
29599   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29600
29601 Copyright 2003-2022,2023        Thomas E. Dickey
29602 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29603 Free Software Foundation, Inc.
29604 This config.status script is free software; the Free Software Foundation
29605 gives unlimited permission to copy, distribute and modify it."
29606 srcdir="$srcdir"
29607 INSTALL="$INSTALL"
29608 EOF
29609
29610 cat >>"$CONFIG_STATUS" <<\EOF
29611 # If no file are specified by the user, then we need to provide default
29612 # value.  By we need to know if files were specified by the user.
29613 ac_need_defaults=:
29614 while test $# != 0
29615 do
29616   case $1 in
29617   --*=*)
29618     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29619     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29620     shift
29621     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29622     shift
29623     ;;
29624   -*);;
29625   *) # This is not an option, so the user has probably given explicit
29626      # arguments.
29627      ac_need_defaults=false;;
29628   esac
29629
29630   case $1 in
29631   # Handling of the options.
29632 EOF
29633 cat >>"$CONFIG_STATUS" <<EOF
29634   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29635     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29636     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29637 EOF
29638 cat >>"$CONFIG_STATUS" <<\EOF
29639   --version | --vers* | -V )
29640     echo "$ac_cs_version"; exit 0 ;;
29641   --he | --h)
29642     # Conflict between --help and --header
29643     { { echo "$as_me:29643: error: ambiguous option: $1
29644 Try \`$0 --help' for more information." >&5
29645 echo "$as_me: error: ambiguous option: $1
29646 Try \`$0 --help' for more information." >&2;}
29647    { (exit 1); exit 1; }; };;
29648   --help | --hel | -h )
29649     echo "$ac_cs_usage"; exit 0 ;;
29650   --debug | --d* | -d )
29651     debug=: ;;
29652   --file | --fil | --fi | --f )
29653     shift
29654     CONFIG_FILES="$CONFIG_FILES $1"
29655     ac_need_defaults=false;;
29656   --header | --heade | --head | --hea )
29657     shift
29658     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29659     ac_need_defaults=false;;
29660
29661   # This is an error.
29662   -*) { { echo "$as_me:29662: error: unrecognized option: $1
29663 Try \`$0 --help' for more information." >&5
29664 echo "$as_me: error: unrecognized option: $1
29665 Try \`$0 --help' for more information." >&2;}
29666    { (exit 1); exit 1; }; } ;;
29667
29668   *) ac_config_targets="$ac_config_targets $1" ;;
29669
29670   esac
29671   shift
29672 done
29673
29674 exec 5>>config.log
29675 cat >&5 << _ACEOF
29676
29677 ## ----------------------- ##
29678 ## Running config.status.  ##
29679 ## ----------------------- ##
29680
29681 This file was extended by $as_me 2.52.20230903, executed with
29682   CONFIG_FILES    = $CONFIG_FILES
29683   CONFIG_HEADERS  = $CONFIG_HEADERS
29684   CONFIG_LINKS    = $CONFIG_LINKS
29685   CONFIG_COMMANDS = $CONFIG_COMMANDS
29686   > "$ac_cs_invocation"
29687 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29688
29689 _ACEOF
29690 EOF
29691
29692 cat >>"$CONFIG_STATUS" <<EOF
29693 #
29694 # INIT-COMMANDS section.
29695 #
29696
29697 ### Special initialization commands, used to pass information from the
29698 ### configuration-run into config.status
29699
29700 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29701 AWK="$AWK"
29702 CXX_NAME="$CXX_NAME"
29703 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29704 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29705 ECHO_LD="$ECHO_LD"
29706 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29707 FORM_NAME="$FORM_NAME"
29708 LDCONFIG="$LDCONFIG"
29709 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29710 LIB_NAME="$LIB_NAME"
29711 LIB_PREFIX="$LIB_PREFIX"
29712 LIB_SUBSETS="$LIB_SUBSETS"
29713 LIB_SUFFIX="$LIB_SUFFIX"
29714 LIB_TRACING="$LIB_TRACING"
29715 LN_S="$LN_S"
29716 MAKE_TERMINFO="$MAKE_TERMINFO"
29717 MANPAGE_RENAMES="$MANPAGE_RENAMES"
29718 MENU_NAME="$MENU_NAME"
29719 NCURSES_MAJOR="$NCURSES_MAJOR"
29720 NCURSES_MINOR="$NCURSES_MINOR"
29721 NCURSES_OSPEED="$NCURSES_OSPEED"
29722 NCURSES_PATCH="$NCURSES_PATCH"
29723 PANEL_NAME="$PANEL_NAME"
29724 SRC_SUBDIRS="$SRC_SUBDIRS"
29725 TERMINFO="$TERMINFO"
29726 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29727 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29728 TICS_NAME="$TICS_NAME"
29729 TICS_SUFFIX="$TICS_SUFFIX"
29730 TIC_PATH="$TIC_PATH"
29731 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29732 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29733 TINFO_NAME="$TINFO_NAME"
29734 TINFO_SUFFIX="$TINFO_SUFFIX"
29735 UNALTERED_SYMS="$UNALTERED_SYMS"
29736 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29737 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29738 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29739 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29740 WILDCARD_SYMS="$WILDCARD_SYMS"
29741 WITH_CURSES_H="$with_curses_h"
29742 WITH_ECHO="${enable_echo:=yes}"
29743 WITH_OVERWRITE="$with_overwrite"
29744 cf_LIST_MODELS="$cf_list_models"
29745 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29746 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29747 cf_cv_abi_default="$cf_cv_abi_default"
29748 cf_cv_abi_version="$cf_cv_abi_version"
29749 cf_cv_do_relink="$cf_cv_do_relink"
29750 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29751 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29752 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29753 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29754 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29755 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29756 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29757 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29758 cf_cv_rel_version="$cf_cv_rel_version"
29759 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29760 cf_cv_shared_soname='$cf_cv_shared_soname'
29761 cf_cv_shlib_version="$cf_cv_shlib_version"
29762 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29763 cf_cv_system_name="$cf_cv_system_name"
29764 cf_cv_term_driver="$with_term_driver"
29765 cf_with_ada="$cf_with_ada"
29766 cf_with_cxx_binding="$cf_with_cxx_binding"
29767 cf_with_db_install="$cf_with_db_install"
29768 cf_with_manpages="$cf_with_manpages"
29769 cf_with_tests="$cf_with_tests"
29770 host="$host"
29771 target="$target"
29772 verbose="$verbose"
29773 with_shared_cxx="$with_shared_cxx"
29774
29775 EOF
29776
29777 cat >>"$CONFIG_STATUS" <<\EOF
29778 for ac_config_target in $ac_config_targets
29779 do
29780   case "$ac_config_target" in
29781   # Handling of arguments.
29782   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29783   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29784   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29785   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29786   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29787   "man/man_db.renames" ) CONFIG_FILES="$CONFIG_FILES man/man_db.renames" ;;
29788   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29789   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29790   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29791   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29792   *) { { echo "$as_me:29792: error: invalid argument: $ac_config_target" >&5
29793 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29794    { (exit 1); exit 1; }; };;
29795   esac
29796 done
29797
29798 # If the user did not use the arguments to specify the items to instantiate,
29799 # then the envvar interface is used.  Set only those that are not.
29800 # We use the long form for the default assignment because of an extremely
29801 # bizarre bug on SunOS 4.1.3.
29802 if "$ac_need_defaults"; then
29803   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29804   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29805   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29806 fi
29807
29808 # Create a temporary directory, and hook for its removal unless debugging.
29809 $debug ||
29810 {
29811   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29812   trap '{ (exit 1); exit 1; }' 1 2 13 15
29813 }
29814
29815 # Create a (secure) tmp directory for tmp files.
29816 : "${TMPDIR=/tmp}"
29817 {
29818   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29819   test -n "$tmp" && test -d "$tmp"
29820 }  ||
29821 {
29822   tmp=$TMPDIR/cs$$-$RANDOM
29823   (umask 077 && mkdir "$tmp")
29824 } ||
29825 {
29826    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29827    { (exit 1); exit 1; }
29828 }
29829
29830 EOF
29831
29832 cat >>"$CONFIG_STATUS" <<EOF
29833
29834 #
29835 # CONFIG_FILES section.
29836 #
29837
29838 # No need to generate the scripts if there are no CONFIG_FILES.
29839 # This happens for instance when ./config.status config.h
29840 if test -n "\$CONFIG_FILES"; then
29841   # Protect against being on the right side of a sed subst in config.status.
29842   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29843    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >"\$tmp"/subs.sed <<\\CEOF
29844 s,@SHELL@,$SHELL,;t t
29845 s,@exec_prefix@,$exec_prefix,;t t
29846 s,@prefix@,$prefix,;t t
29847 s,@program_transform_name@,$program_transform_name,;t t
29848 s,@bindir@,$bindir,;t t
29849 s,@sbindir@,$sbindir,;t t
29850 s,@libexecdir@,$libexecdir,;t t
29851 s,@datarootdir@,$datarootdir,;t t
29852 s,@datadir@,$datadir,;t t
29853 s,@sysconfdir@,$sysconfdir,;t t
29854 s,@sharedstatedir@,$sharedstatedir,;t t
29855 s,@localstatedir@,$localstatedir,;t t
29856 s,@runstatedir@,$runstatedir,;t t
29857 s,@libdir@,$libdir,;t t
29858 s,@includedir@,$includedir,;t t
29859 s,@oldincludedir@,$oldincludedir,;t t
29860 s,@infodir@,$infodir,;t t
29861 s,@mandir@,$mandir,;t t
29862 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29863 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29864 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29865 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29866 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29867 s,@build_alias@,$build_alias,;t t
29868 s,@host_alias@,$host_alias,;t t
29869 s,@target_alias@,$target_alias,;t t
29870 s,@ECHO_C@,$ECHO_C,;t t
29871 s,@ECHO_N@,$ECHO_N,;t t
29872 s,@ECHO_T@,$ECHO_T,;t t
29873 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29874 s,@DEFS@,$DEFS,;t t
29875 s,@LIBS@,$LIBS,;t t
29876 s,@top_builddir@,$top_builddir,;t t
29877 s,@GREP@,$GREP,;t t
29878 s,@EGREP@,$EGREP,;t t
29879 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29880 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29881 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29882 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29883 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29884 s,@cf_cv_abi_default@,$cf_cv_abi_default,;t t
29885 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29886 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29887 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29888 s,@VERSION@,$VERSION,;t t
29889 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29890 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29891 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29892 s,@PACKAGE@,$PACKAGE,;t t
29893 s,@build@,$build,;t t
29894 s,@build_cpu@,$build_cpu,;t t
29895 s,@build_vendor@,$build_vendor,;t t
29896 s,@build_os@,$build_os,;t t
29897 s,@host@,$host,;t t
29898 s,@host_cpu@,$host_cpu,;t t
29899 s,@host_vendor@,$host_vendor,;t t
29900 s,@host_os@,$host_os,;t t
29901 s,@target@,$target,;t t
29902 s,@target_cpu@,$target_cpu,;t t
29903 s,@target_vendor@,$target_vendor,;t t
29904 s,@target_os@,$target_os,;t t
29905 s,@FGREP@,$FGREP,;t t
29906 s,@CC@,$CC,;t t
29907 s,@CFLAGS@,$CFLAGS,;t t
29908 s,@LDFLAGS@,$LDFLAGS,;t t
29909 s,@CPPFLAGS@,$CPPFLAGS,;t t
29910 s,@ac_ct_CC@,$ac_ct_CC,;t t
29911 s,@EXEEXT@,$EXEEXT,;t t
29912 s,@OBJEXT@,$OBJEXT,;t t
29913 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29914 s,@CPP@,$CPP,;t t
29915 s,@LDCONFIG@,$LDCONFIG,;t t
29916 s,@CXX@,$CXX,;t t
29917 s,@CXXFLAGS@,$CXXFLAGS,;t t
29918 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29919 s,@AWK@,$AWK,;t t
29920 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29921 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29922 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29923 s,@LINT@,$LINT,;t t
29924 s,@LINT_OPTS@,$LINT_OPTS,;t t
29925 s,@LINT_LIBS@,$LINT_LIBS,;t t
29926 s,@LN_S@,$LN_S,;t t
29927 s,@cf_config_suffix@,$cf_config_suffix,;t t
29928 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29929 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29930 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29931 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29932 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29933 s,@SET_MAKE@,$SET_MAKE,;t t
29934 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29935 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29936 s,@CTAGS@,$CTAGS,;t t
29937 s,@ETAGS@,$ETAGS,;t t
29938 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29939 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29940 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29941 s,@RANLIB@,$RANLIB,;t t
29942 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29943 s,@LD@,$LD,;t t
29944 s,@ac_ct_LD@,$ac_ct_LD,;t t
29945 s,@AR@,$AR,;t t
29946 s,@ac_ct_AR@,$ac_ct_AR,;t t
29947 s,@NM@,$NM,;t t
29948 s,@ac_ct_NM@,$ac_ct_NM,;t t
29949 s,@ARFLAGS@,$ARFLAGS,;t t
29950 s,@DESTDIR@,$DESTDIR,;t t
29951 s,@BUILD_CC@,$BUILD_CC,;t t
29952 s,@BUILD_CPP@,$BUILD_CPP,;t t
29953 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29954 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29955 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29956 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29957 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29958 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29959 s,@cf_list_models@,$cf_list_models,;t t
29960 s,@ABI_VERSION@,$ABI_VERSION,;t t
29961 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29962 s,@LIBTOOL@,$LIBTOOL,;t t
29963 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29964 s,@LT_UNDEF@,$LT_UNDEF,;t t
29965 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29966 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29967 s,@LIB_CREATE@,$LIB_CREATE,;t t
29968 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29969 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29970 s,@LIB_PREP@,$LIB_PREP,;t t
29971 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29972 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29973 s,@LIB_LINK@,$LIB_LINK,;t t
29974 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29975 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29976 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29977 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29978 s,@TICS_NAME@,$TICS_NAME,;t t
29979 s,@TINFO_NAME@,$TINFO_NAME,;t t
29980 s,@LIB_NAME@,$LIB_NAME,;t t
29981 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29982 s,@CC_G_OPT@,$CC_G_OPT,;t t
29983 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29984 s,@LD_MODEL@,$LD_MODEL,;t t
29985 s,@shlibdir@,$shlibdir,;t t
29986 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29987 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29988 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29989 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29990 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29991 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29992 s,@LINK_PROGS@,$LINK_PROGS,;t t
29993 s,@LINK_TESTS@,$LINK_TESTS,;t t
29994 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29995 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29996 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29997 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29998 s,@RPATH_LIST@,$RPATH_LIST,;t t
29999 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
30000 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
30001 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
30002 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
30003 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
30004 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
30005 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
30006 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
30007 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
30008 s,@TIC@,$TIC,;t t
30009 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
30010 s,@INFOCMP@,$INFOCMP,;t t
30011 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
30012 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
30013 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
30014 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
30015 s,@XTERM_KBS@,$XTERM_KBS,;t t
30016 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
30017 s,@TERMINFO@,$TERMINFO,;t t
30018 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
30019 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
30020 s,@TERMPATH@,$TERMPATH,;t t
30021 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
30022 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
30023 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
30024 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
30025 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
30026 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
30027 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
30028 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
30029 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
30030 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
30031 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
30032 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
30033 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
30034 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
30035 s,@RGB_PATH@,$RGB_PATH,;t t
30036 s,@no_x11_rgb@,$no_x11_rgb,;t t
30037 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
30038 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
30039 s,@NCURSES_CHTYPE@,$NCURSES_CHTYPE,;t t
30040 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
30041 s,@NCURSES_MMASK_T@,$NCURSES_MMASK_T,;t t
30042 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
30043 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
30044 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
30045 s,@cf_manpage_format@,$cf_manpage_format,;t t
30046 s,@cf_manpage_inboth@,$cf_manpage_inboth,;t t
30047 s,@cf_manpage_so_strip@,$cf_manpage_so_strip,;t t
30048 s,@cf_manpage_compress@,$cf_manpage_compress,;t t
30049 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
30050 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
30051 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
30052 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
30053 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
30054 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
30055 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
30056 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
30057 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
30058 s,@PTHREAD@,$PTHREAD,;t t
30059 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
30060 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
30061 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
30062 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
30063 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
30064 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
30065 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
30066 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
30067 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
30068 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
30069 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
30070 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
30071 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
30072 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
30073 s,@ECHO_LT@,$ECHO_LT,;t t
30074 s,@ECHO_LD@,$ECHO_LD,;t t
30075 s,@RULE_CC@,$RULE_CC,;t t
30076 s,@SHOW_CC@,$SHOW_CC,;t t
30077 s,@ECHO_CC@,$ECHO_CC,;t t
30078 s,@ECHO_LINK@,$ECHO_LINK,;t t
30079 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
30080 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
30081 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
30082 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
30083 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
30084 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
30085 s,@ADAFLAGS@,$ADAFLAGS,;t t
30086 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
30087 s,@ADA_TRACE@,$ADA_TRACE,;t t
30088 s,@MATH_LIB@,$MATH_LIB,;t t
30089 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
30090 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
30091 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
30092 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
30093 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
30094 s,@TEST_LIBS@,$TEST_LIBS,;t t
30095 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
30096 s,@CXXCPP@,$CXXCPP,;t t
30097 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
30098 s,@CXX_AR@,$CXX_AR,;t t
30099 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
30100 s,@CXXLIBS@,$CXXLIBS,;t t
30101 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
30102 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
30103 s,@M4_exists@,$M4_exists,;t t
30104 s,@cf_ada_make@,$cf_ada_make,;t t
30105 s,@cf_ada_config@,$cf_ada_config,;t t
30106 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
30107 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
30108 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
30109 s,@cf_compile_generics@,$cf_compile_generics,;t t
30110 s,@cf_generic_objects@,$cf_generic_objects,;t t
30111 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
30112 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
30113 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
30114 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
30115 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
30116 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
30117 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
30118 s,@cf_ada_package@,$cf_ada_package,;t t
30119 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
30120 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
30121 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
30122 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
30123 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
30124 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
30125 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
30126 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
30127 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
30128 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
30129 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
30130 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
30131 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
30132 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
30133 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
30134 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
30135 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
30136 s,@TICS_LIBS@,$TICS_LIBS,;t t
30137 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
30138 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
30139 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
30140 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
30141 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
30142 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
30143 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
30144 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
30145 s,@includesubdir@,$includesubdir,;t t
30146 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
30147 s,@TICS_LIST@,$TICS_LIST,;t t
30148 s,@TINFO_LIST@,$TINFO_LIST,;t t
30149 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
30150 s,@FORM_NAME@,$FORM_NAME,;t t
30151 s,@MENU_NAME@,$MENU_NAME,;t t
30152 s,@PANEL_NAME@,$PANEL_NAME,;t t
30153 s,@CXX_NAME@,$CXX_NAME,;t t
30154 s,@TEST_ARGS@,$TEST_ARGS,;t t
30155 s,@TEST_DEPS@,$TEST_DEPS,;t t
30156 s,@TEST_ARG2@,$TEST_ARG2,;t t
30157 s,@TEST_DEP2@,$TEST_DEP2,;t t
30158 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
30159 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
30160 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
30161 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
30162 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
30163 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
30164 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
30165 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
30166 s,@cross_compiling@,$cross_compiling,;t t
30167 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
30168 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
30169 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
30170 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
30171 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
30172 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
30173 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
30174 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
30175 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
30176 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
30177 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
30178 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
30179 CEOF
30180
30181 EOF
30182
30183   cat >>"$CONFIG_STATUS" <<\EOF
30184   # Split the substitutions into bite-sized pieces for seds with
30185   # small command number limits, like on Digital OSF/1 and HP-UX.
30186   ac_max_sed_lines=48
30187   ac_sed_frag=1 # Number of current file.
30188   ac_beg=1 # First line for current file.
30189   ac_end=$ac_max_sed_lines # Line after last line for current file.
30190   ac_more_lines=:
30191   ac_sed_cmds=
30192   while "$ac_more_lines"; do
30193     if test "$ac_beg" -gt 1; then
30194       sed "1,${ac_beg}d; ${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30195     else
30196       sed "${ac_end}q" "$tmp"/subs.sed >"$tmp"/subs.frag
30197     fi
30198     if test ! -s "$tmp"/subs.frag; then
30199       ac_more_lines=false
30200     else
30201       # The purpose of the label and of the branching condition is to
30202       # speed up the sed processing (if there are no `@' at all, there
30203       # is no need to browse any of the substitutions).
30204       # These are the two extra sed commands mentioned above.
30205       (echo ':t
30206   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat "$tmp"/subs.frag) >"$tmp"/subs-$ac_sed_frag.sed
30207       # It is possible to make a multiline substitution using escaped newlines.
30208       # Ensure that we do not split the substitution between script fragments.
30209       ac_BEG=$ac_end
30210       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
30211       sed "1,${ac_BEG}d; ${ac_END}p; q" "$tmp"/subs.sed >"$tmp"/subs.next
30212       if test -s "$tmp"/subs.next; then
30213         grep '^s,@[^@,][^@,]*@,.*\\$' "$tmp"/subs.next >"$tmp"/subs.edit
30214         if test ! -s "$tmp"/subs.edit; then
30215           grep "^s,@[^@,][^@,]*@,.*,;t t$" "$tmp"/subs.next >"$tmp"/subs.edit
30216           if test ! -s "$tmp"/subs.edit; then
30217             if test "$ac_beg" -gt 1; then
30218               ac_end=`expr "$ac_end" - 1`
30219               continue
30220             fi
30221           fi
30222         fi
30223       fi
30224
30225       if test -z "$ac_sed_cmds"; then
30226         ac_sed_cmds="sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30227       else
30228         ac_sed_cmds="$ac_sed_cmds | sed -f \"$tmp\"/subs-$ac_sed_frag.sed"
30229       fi
30230       ac_sed_frag=`expr "$ac_sed_frag" + 1`
30231       ac_beg=$ac_end
30232       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
30233     fi
30234   done
30235   if test -z "$ac_sed_cmds"; then
30236     ac_sed_cmds="cat"
30237   fi
30238 fi # test -n "$CONFIG_FILES"
30239
30240 EOF
30241 cat >>"$CONFIG_STATUS" <<\EOF
30242 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
30243   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30244   case "$ac_file" in
30245   - | *:- | *:-:* ) # input from stdin
30246         cat >"$tmp"/stdin
30247         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30248         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30249   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30250         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30251   * )   ac_file_in=$ac_file.in ;;
30252   esac
30253
30254   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
30255   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30256          X"$ac_file" : 'X\(//\)[^/]' \| \
30257          X"$ac_file" : 'X\(//\)$' \| \
30258          X"$ac_file" : 'X\(/\)' \| \
30259          .     : '\(.\)' 2>/dev/null ||
30260 echo X"$ac_file" |
30261     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30262           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30263           /^X\(\/\/\)$/{ s//\1/; q; }
30264           /^X\(\/\).*/{ s//\1/; q; }
30265           s/.*/./; q'`
30266   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30267     { case "$ac_dir" in
30268   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30269   *)                      as_incr_dir=.;;
30270 esac
30271 as_dummy="$ac_dir"
30272 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30273   case $as_mkdir_dir in
30274     # Skip DOS drivespec
30275     ?:) as_incr_dir=$as_mkdir_dir ;;
30276     *)
30277       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30278       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30279     ;;
30280   esac
30281 done; }
30282
30283     ac_dir_suffix="/`echo "$ac_dir"|sed 's,^\./,,'`"
30284     # A "../" for each directory in $ac_dir_suffix.
30285     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
30286   else
30287     ac_dir_suffix= ac_dots=
30288   fi
30289
30290   case "$srcdir" in
30291   .)  ac_srcdir=.
30292       if test -z "$ac_dots"; then
30293          ac_top_srcdir=.
30294       else
30295          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
30296       fi ;;
30297   [\\/]* | ?:[\\/]* )
30298       ac_srcdir="$srcdir$ac_dir_suffix";
30299       ac_top_srcdir="$srcdir" ;;
30300   *) # Relative path.
30301     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
30302     ac_top_srcdir="$ac_dots$srcdir" ;;
30303   esac
30304
30305   case $INSTALL in
30306   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
30307   *) ac_INSTALL=$ac_dots$INSTALL ;;
30308   esac
30309
30310   if test x"$ac_file" != x-; then
30311     { echo "$as_me:30311: creating $ac_file" >&5
30312 echo "$as_me: creating $ac_file" >&6;}
30313     rm -f "$ac_file"
30314   fi
30315   # Let's still pretend it is `configure' which instantiates (i.e., don't
30316   # use $as_me), people would be surprised to read:
30317   #    /* config.h.  Generated automatically by config.status.  */
30318   configure_input="Generated automatically from `echo $ac_file_in |
30319                                                  sed 's,.*/,,'` by configure."
30320
30321   # First look for the input files in the build tree, otherwise in the
30322   # src tree.
30323   ac_file_inputs=`IFS=:
30324     for f in $ac_file_in; do
30325       case $f in
30326       -) echo "$tmp"/stdin ;;
30327       [\\/$]*)
30328          # Absolute (can't be DOS-style, as IFS=:)
30329          test -f "$f" || { { echo "$as_me:30329: error: cannot find input file: $f" >&5
30330 echo "$as_me: error: cannot find input file: $f" >&2;}
30331    { (exit 1); exit 1; }; }
30332          echo "$f";;
30333       *) # Relative
30334          if test -f "$f"; then
30335            # Build tree
30336            echo "$f"
30337          elif test -f "$srcdir/$f"; then
30338            # Source tree
30339            echo "$srcdir/$f"
30340          else
30341            # /dev/null tree
30342            { { echo "$as_me:30342: error: cannot find input file: $f" >&5
30343 echo "$as_me: error: cannot find input file: $f" >&2;}
30344    { (exit 1); exit 1; }; }
30345          fi;;
30346       esac
30347     done` || { (exit 1); exit 1; }
30348 EOF
30349 cat >>"$CONFIG_STATUS" <<\EOF
30350   ac_warn_datarootdir=no
30351   if test x"$ac_file" != x-; then
30352     for ac_item in $ac_file_inputs
30353     do
30354       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
30355       if test -n "$ac_seen"; then
30356         ac_used=`grep '@datarootdir@' "$ac_item"`
30357         if test -z "$ac_used"; then
30358           { echo "$as_me:30358: WARNING: datarootdir was used implicitly but not set:
30359 $ac_seen" >&5
30360 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
30361 $ac_seen" >&2;}
30362           ac_warn_datarootdir=yes
30363         fi
30364       fi
30365       ac_seen=`grep '${datarootdir}' "$ac_item"`
30366       if test -n "$ac_seen"; then
30367         { echo "$as_me:30367: WARNING: datarootdir was used explicitly but not set:
30368 $ac_seen" >&5
30369 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
30370 $ac_seen" >&2;}
30371         ac_warn_datarootdir=yes
30372       fi
30373     done
30374   fi
30375
30376 if test "x$ac_warn_datarootdir" = xyes; then
30377   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
30378 fi
30379
30380 EOF
30381 cat >>"$CONFIG_STATUS" <<EOF
30382   sed "$ac_vpsub
30383 $extrasub
30384 EOF
30385 cat >>"$CONFIG_STATUS" <<\EOF
30386 :t
30387 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
30388 s,@configure_input@,$configure_input,;t t
30389 s,@srcdir@,$ac_srcdir,;t t
30390 s,@top_srcdir@,$ac_top_srcdir,;t t
30391 s,@INSTALL@,$ac_INSTALL,;t t
30392 " $ac_file_inputs | (eval "$ac_sed_cmds") >"$tmp"/out
30393   rm -f "$tmp"/stdin
30394 EOF
30395 test -n "${FGREP}" || FGREP="grep -F"
30396 test -n "${EGREP}" || EGREP="grep -E"
30397 cat >>"$CONFIG_STATUS" <<EOF
30398   test -n "\${FGREP}" || FGREP="$FGREP"
30399   test -n "\${EGREP}" || EGREP="$EGREP"
30400 EOF
30401 cat >>"$CONFIG_STATUS" <<\EOF
30402   if test x"$ac_file" != x-; then
30403     cp "$tmp/out" "$ac_file"
30404
30405     for ac_name in prefix exec_prefix datarootdir
30406     do
30407         ac_seen=`$FGREP -n '${'$ac_name'[:=].*}' "$ac_file"`
30408         if test -n "$ac_seen"; then
30409             ac_init=`$EGREP '[  ]*'$ac_name'[   ]*=' "$ac_file"`
30410             if test -z "$ac_init"; then
30411               ac_seen=`echo "$ac_seen" |sed -e 's,^,'"$ac_file"':,'`
30412               { echo "$as_me:30412: WARNING: Variable $ac_name is used but was not set:
30413 $ac_seen" >&5
30414 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
30415 $ac_seen" >&2;}
30416             fi
30417         fi
30418     done
30419     $EGREP -n '@[a-z_][a-z_0-9]+@' "$ac_file" >"$tmp"/out
30420     $EGREP -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>"$tmp"/out
30421     if test -s "$tmp"/out; then
30422       ac_seen=`sed -e 's,^,'"$ac_file"':,' < "$tmp"/out`
30423       { echo "$as_me:30423: WARNING: Some variables may not be substituted:
30424 $ac_seen" >&5
30425 echo "$as_me: WARNING: Some variables may not be substituted:
30426 $ac_seen" >&2;}
30427     fi
30428   else
30429     cat "$tmp"/out
30430   fi
30431   rm -f "$tmp"/out
30432
30433 done
30434 EOF
30435 cat >>"$CONFIG_STATUS" <<\EOF
30436
30437 #
30438 # CONFIG_HEADER section.
30439 #
30440
30441 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
30442 # NAME is the cpp macro being defined and VALUE is the value it is being given.
30443 #
30444 # ac_d sets the value in "#define NAME VALUE" lines.
30445 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
30446 ac_dB='[        ].*$,\1#\2'
30447 ac_dC=' '
30448 ac_dD=',;t'
30449 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
30450 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30451 ac_iB='\([      ]\),\1#\2define\3'
30452 ac_iC=' '
30453 ac_iD='\4,;t'
30454 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
30455 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
30456 ac_uB='$,\1#\2define\3'
30457 ac_uC=' '
30458 ac_uD=',;t'
30459
30460 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
30461   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
30462   case "$ac_file" in
30463   - | *:- | *:-:* ) # input from stdin
30464         cat >"$tmp"/stdin
30465         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30466         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30467   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
30468         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
30469   * )   ac_file_in=$ac_file.in ;;
30470   esac
30471
30472   test x"$ac_file" != x- && { echo "$as_me:30472: creating $ac_file" >&5
30473 echo "$as_me: creating $ac_file" >&6;}
30474
30475   # First look for the input files in the build tree, otherwise in the
30476   # src tree.
30477   ac_file_inputs=`IFS=:
30478     for f in $ac_file_in; do
30479       case $f in
30480       -) echo "$tmp"/stdin ;;
30481       [\\/$]*)
30482          # Absolute (can't be DOS-style, as IFS=:)
30483          test -f "$f" || { { echo "$as_me:30483: error: cannot find input file: $f" >&5
30484 echo "$as_me: error: cannot find input file: $f" >&2;}
30485    { (exit 1); exit 1; }; }
30486          echo $f;;
30487       *) # Relative
30488          if test -f "$f"; then
30489            # Build tree
30490            echo $f
30491          elif test -f "$srcdir/$f"; then
30492            # Source tree
30493            echo "$srcdir/$f"
30494          else
30495            # /dev/null tree
30496            { { echo "$as_me:30496: error: cannot find input file: $f" >&5
30497 echo "$as_me: error: cannot find input file: $f" >&2;}
30498    { (exit 1); exit 1; }; }
30499          fi;;
30500       esac
30501     done` || { (exit 1); exit 1; }
30502   # Remove the trailing spaces.
30503   sed 's/[      ]*$//' $ac_file_inputs >"$tmp"/in
30504
30505 EOF
30506
30507 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
30508 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
30509 # be either 'cat' or 'sort'.
30510 cat confdefs.h | uniq >conftest.vals
30511
30512 # Break up conftest.vals because some shells have a limit on
30513 # the size of here documents, and old seds have small limits too.
30514
30515 rm -f conftest.tail
30516 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
30517 while grep . conftest.vals >/dev/null
30518 do
30519   # Write chunks of a limited-size here document to conftest.frag.
30520   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
30521   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
30522   echo 'CEOF' >> "$CONFIG_STATUS"
30523   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
30524   rm -f conftest.vals
30525   mv conftest.tail conftest.vals
30526 done
30527 rm -f conftest.vals
30528
30529 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
30530 # marker @DEFS@.
30531 echo '  cat >> conftest.edit <<CEOF
30532 /@DEFS@/r conftest.frag
30533 /@DEFS@/d
30534 CEOF
30535 sed -f conftest.edit "$tmp"/in > "$tmp"/out
30536 rm -f "$tmp"/in
30537 mv "$tmp"/out "$tmp"/in
30538 rm -f conftest.edit conftest.frag
30539 ' >> "$CONFIG_STATUS"
30540
30541 cat >>"$CONFIG_STATUS" <<\EOF
30542   # Let's still pretend it is `configure' which instantiates (i.e., don't
30543   # use $as_me), people would be surprised to read:
30544   #    /* config.h.  Generated automatically by config.status.  */
30545   if test x"$ac_file" = x-; then
30546     echo "/* Generated automatically by configure.  */" >"$tmp"/config.h
30547   else
30548     echo "/* $ac_file.  Generated automatically by configure.  */" >"$tmp"/config.h
30549   fi
30550   cat "$tmp"/in >>"$tmp"/config.h
30551   rm -f "$tmp"/in
30552   if test x"$ac_file" != x-; then
30553     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
30554       { echo "$as_me:30554: $ac_file is unchanged" >&5
30555 echo "$as_me: $ac_file is unchanged" >&6;}
30556     else
30557       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
30558          X"$ac_file" : 'X\(//\)[^/]' \| \
30559          X"$ac_file" : 'X\(//\)$' \| \
30560          X"$ac_file" : 'X\(/\)' \| \
30561          .     : '\(.\)' 2>/dev/null ||
30562 echo X"$ac_file" |
30563     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
30564           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
30565           /^X\(\/\/\)$/{ s//\1/; q; }
30566           /^X\(\/\).*/{ s//\1/; q; }
30567           s/.*/./; q'`
30568       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
30569         { case "$ac_dir" in
30570   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
30571   *)                      as_incr_dir=.;;
30572 esac
30573 as_dummy="$ac_dir"
30574 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
30575   case $as_mkdir_dir in
30576     # Skip DOS drivespec
30577     ?:) as_incr_dir=$as_mkdir_dir ;;
30578     *)
30579       as_incr_dir=$as_incr_dir/$as_mkdir_dir
30580       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
30581     ;;
30582   esac
30583 done; }
30584
30585       fi
30586       rm -f "$ac_file"
30587       mv "$tmp/config.h" "$ac_file"
30588     fi
30589   else
30590     cat "$tmp"/config.h
30591     rm -f "$tmp"/config.h
30592   fi
30593 done
30594 EOF
30595 cat >>"$CONFIG_STATUS" <<\EOF
30596 #
30597 # CONFIG_COMMANDS section.
30598 #
30599 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
30600   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30601   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30602
30603   case "$ac_dest" in
30604     default )
30605 if test "x$cf_with_tests" != xno ; then
30606
30607 for cf_dir in test
30608 do
30609         if test ! -d "$srcdir/$cf_dir" ; then
30610                 continue
30611         elif test -f "$srcdir/$cf_dir/programs" ; then
30612                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30613         fi
30614 done
30615
30616 fi
30617
30618 cf_prefix=$LIB_PREFIX
30619
30620 case "$cf_cv_shlib_version" in
30621 (cygdll|msysdll|mingw|msvcdll)
30622         TINFO_NAME=$TINFO_ARG_SUFFIX
30623         TINFO_SUFFIX=.dll
30624         ;;
30625 esac
30626
30627 if test -n "$TINFO_SUFFIX" ; then
30628         case "$TINFO_SUFFIX" in
30629         (tw*)
30630                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30631                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30632                 ;;
30633         (t*)
30634                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30635                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30636                 ;;
30637         (w*)
30638                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30639                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30640                 ;;
30641         esac
30642 fi
30643
30644 for cf_dir in $SRC_SUBDIRS
30645 do
30646         if test ! -d "$srcdir/$cf_dir" ; then
30647                 continue
30648         elif test -f "$srcdir/$cf_dir/modules" ; then
30649
30650                 SHARED_LIB=
30651                 Libs_To_Make=
30652                 cf_awk_program=
30653                 if test -n "${cf_cv_abi_default}" && test "x${cf_cv_abi_default}" != "x5"
30654                 then
30655                         cf_awk_program="$cf_awk_program\
30656 /deprecated in ABI${cf_cv_abi_default}/ { next; }\
30657 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_default}\"); }\
30658 "
30659                 fi
30660
30661                 if test "x$WILDCARD_SYMS" = xno
30662                 then
30663                         cf_awk_program="$cf_awk_program\
30664 /[      ]_\\*;/ { skip=1; next; }\
30665 "
30666                 fi
30667
30668                 if test "x$cf_awk_program" != "x"
30669                 then
30670                         cat >>$cf_dir/Makefile <<CF_EOF
30671
30672 # Generated by CF_LIB_RULES
30673 resulting.map: $UNALTERED_SYMS
30674         $AWK 'BEGIN { skip = 1; last=""; } \
30675 $cf_awk_program \
30676 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30677  skip = 0; last = \$\$0; } \
30678 END { print last; }' < "$UNALTERED_SYMS" >\$@
30679
30680 distclean::
30681         rm -f resulting.map
30682 CF_EOF
30683                 fi
30684
30685                 for cf_item in $cf_LIST_MODELS
30686                 do
30687
30688         case X$cf_item in
30689         (Xlibtool)
30690                 cf_suffix='.la'
30691                 cf_depsuf=$cf_suffix
30692                 ;;
30693         (Xdebug)
30694                 case "$cf_cv_system_name" in
30695                 (*-msvc*)
30696                         cf_suffix='_g.lib'
30697                         ;;
30698                 (*)
30699                         cf_suffix='_g.a'
30700                         ;;
30701                 esac
30702                 cf_depsuf=$cf_suffix
30703                 ;;
30704         (Xprofile)
30705                 case "$cf_cv_system_name" in
30706                 (*-msvc*)
30707                         cf_suffix='_p.lib'
30708                         ;;
30709                 (*)
30710                         cf_suffix='_p.a'
30711                         ;;
30712                 esac
30713                 cf_depsuf=$cf_suffix
30714                 ;;
30715         (Xshared)
30716                 case "$cf_cv_system_name" in
30717                 (aix[5-7]*)
30718                         cf_suffix='.so'
30719                         cf_depsuf=$cf_suffix
30720                         ;;
30721                 (*-msvc*)
30722                         cf_suffix='.dll'
30723                         cf_depsuf='.dll.lib'
30724                         ;;
30725                 (cygwin*|msys*|mingw*)
30726                         cf_suffix='.dll'
30727                         cf_depsuf='.dll.a'
30728                         ;;
30729                 (darwin*)
30730                         cf_suffix='.dylib'
30731                         cf_depsuf=$cf_suffix
30732                         ;;
30733                 (hpux*)
30734                         case "$target" in
30735                         (ia64*)
30736                                 cf_suffix='.so'
30737                                 cf_depsuf=$cf_suffix
30738                                 ;;
30739                         (*)
30740                                 cf_suffix='.sl'
30741                                 cf_depsuf=$cf_suffix
30742                                 ;;
30743                         esac
30744                         ;;
30745                 (*)
30746                         cf_suffix='.so'
30747                         cf_depsuf=$cf_suffix
30748                         ;;
30749                 esac
30750                 ;;
30751         (*)
30752                 case "$target" in
30753                 (*-msvc*)
30754                         cf_suffix='.lib'
30755                         ;;
30756                 (*)
30757                         cf_suffix='.a'
30758                         ;;
30759                 esac
30760                 cf_depsuf=$cf_suffix
30761                 ;;
30762         esac
30763         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30764         then
30765                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30766                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30767         fi
30768
30769                         if test "$cf_dir" = "c++"
30770                         then
30771
30772 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30773
30774 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30775
30776                         else
30777
30778 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30779
30780 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30781
30782                         fi
30783                         test -z "$cf_libname" && cf_libname="$cf_dir"
30784                         if test "$cf_item" = shared ; then
30785                                 if test -n "${LIB_SUFFIX}"
30786                                 then
30787                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30788                                 else
30789                                         cf_shared_suffix="$cf_suffix"
30790                                 fi
30791                                 if test "$cf_cv_do_symlinks" = yes ; then
30792                                         cf_version_name=
30793
30794                                         case "$cf_cv_shlib_version" in
30795                                         (rel)
30796                                                 cf_version_name=REL_VERSION
30797                                                 ;;
30798                                         (abi)
30799                                                 cf_version_name=ABI_VERSION
30800                                                 ;;
30801                                         esac
30802
30803                                         if test -n "$cf_version_name"
30804                                         then
30805                                                 case "$cf_cv_system_name" in
30806                                                 (darwin*)
30807                                                         # "w", etc?
30808                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30809                                                         ;;
30810                                                 (*)
30811                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30812                                                         ;;
30813                                                 esac
30814                                         fi
30815                                         if test -n "${USE_LIB_SUFFIX}"
30816                                         then
30817                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30818                                         else
30819                                                 cf_shared_suffix="$cf_suffix"
30820                                         fi
30821                                 fi
30822                                 # cygwin needs import library, and has unique naming convention
30823                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30824                                 # use 'cyg' prefix for shared lib.
30825                                 case "$cf_cv_shlib_version" in
30826                                 (cygdll)
30827                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30828                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30829                                         ;;
30830                                 (msysdll)
30831                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30832                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30833                                         ;;
30834                                 (mingw)
30835                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30836                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30837                                         ;;
30838                                 (msvcdll)
30839                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30840                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30841                                         ;;
30842                                 (*)
30843                                         cf_add_lib=
30844                                         ;;
30845                                 esac
30846                                 if test -n "$cf_add_lib"
30847                                 then
30848                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30849                                         continue
30850                                 fi
30851                         fi
30852                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30853                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30854                 done
30855
30856                 if test "$cf_dir" = ncurses ; then
30857                         cf_subsets="$LIB_SUBSETS"
30858                         cf_r_parts="$cf_subsets"
30859                         cf_liblist="$Libs_To_Make"
30860
30861                         while test -n "$cf_r_parts"
30862                         do
30863                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30864                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30865                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30866                                         cf_add_lib=
30867                                         case "$cf_l_parts" in
30868                                         (*termlib*)
30869                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30870                                                 ;;
30871                                         (*ticlib*)
30872                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30873                                                 ;;
30874                                         (*)
30875                                                 break
30876                                                 ;;
30877                                         esac
30878                                         if test -n "$cf_add_lib"; then
30879                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30880                                         fi
30881                                 else
30882                                         break
30883                                 fi
30884                         done
30885                 else
30886                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30887                 fi
30888
30889                 if test "$cf_dir" = c++; then
30890                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30891                                 cf_list=
30892                                 for cf_item in $Libs_To_Make
30893                                 do
30894                                         case "$cf_item" in
30895                                         (*.a)
30896                                                 ;;
30897                                         (*)
30898                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30899                                                 ;;
30900                                         esac
30901                                         for cf_test in $cf_list
30902                                         do
30903                                                 if test "$cf_test" = "$cf_item"
30904                                                 then
30905                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30906                                                         cf_item=
30907                                                         break
30908                                                 fi
30909                                         done
30910                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30911                                 done
30912                                 Libs_To_Make="$cf_list"
30913                         fi
30914                 fi
30915
30916                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30917                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30918                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30919                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30920
30921                 $AWK -f "$srcdir/mk-0th.awk" \
30922                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30923                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30924
30925                 for cf_subset in $cf_subsets
30926                 do
30927                         cf_subdirs=
30928                         for cf_item in $cf_LIST_MODELS
30929                         do
30930
30931                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30932
30933 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30934
30935                         CXX_MODEL=$cf_ITEM
30936                         if test "$CXX_MODEL" = SHARED; then
30937                                 case "$cf_cv_shlib_version" in
30938                                 (cygdll|msysdll|mingw|msvcdll)
30939                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30940
30941 echo "${as_me:-configure}:30941: testing overriding CXX_MODEL to SHARED ..." 1>&5
30942
30943                                         with_shared_cxx=yes
30944                                         ;;
30945                                 (*)
30946                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30947                                         ;;
30948                                 esac
30949                         fi
30950
30951         case X$cf_item in
30952         (Xlibtool)
30953                 cf_suffix='.la'
30954                 cf_depsuf=$cf_suffix
30955                 ;;
30956         (Xdebug)
30957                 case "$cf_cv_system_name" in
30958                 (*-msvc*)
30959                         cf_suffix='_g.lib'
30960                         ;;
30961                 (*)
30962                         cf_suffix='_g.a'
30963                         ;;
30964                 esac
30965                 cf_depsuf=$cf_suffix
30966                 ;;
30967         (Xprofile)
30968                 case "$cf_cv_system_name" in
30969                 (*-msvc*)
30970                         cf_suffix='_p.lib'
30971                         ;;
30972                 (*)
30973                         cf_suffix='_p.a'
30974                         ;;
30975                 esac
30976                 cf_depsuf=$cf_suffix
30977                 ;;
30978         (Xshared)
30979                 case "$cf_cv_system_name" in
30980                 (aix[5-7]*)
30981                         cf_suffix='.so'
30982                         cf_depsuf=$cf_suffix
30983                         ;;
30984                 (*-msvc*)
30985                         cf_suffix='.dll'
30986                         cf_depsuf='.dll.lib'
30987                         ;;
30988                 (cygwin*|msys*|mingw*)
30989                         cf_suffix='.dll'
30990                         cf_depsuf='.dll.a'
30991                         ;;
30992                 (darwin*)
30993                         cf_suffix='.dylib'
30994                         cf_depsuf=$cf_suffix
30995                         ;;
30996                 (hpux*)
30997                         case "$target" in
30998                         (ia64*)
30999                                 cf_suffix='.so'
31000                                 cf_depsuf=$cf_suffix
31001                                 ;;
31002                         (*)
31003                                 cf_suffix='.sl'
31004                                 cf_depsuf=$cf_suffix
31005                                 ;;
31006                         esac
31007                         ;;
31008                 (*)
31009                         cf_suffix='.so'
31010                         cf_depsuf=$cf_suffix
31011                         ;;
31012                 esac
31013                 ;;
31014         (*)
31015                 case "$target" in
31016                 (*-msvc*)
31017                         cf_suffix='.lib'
31018                         ;;
31019                 (*)
31020                         cf_suffix='.a'
31021                         ;;
31022                 esac
31023                 cf_depsuf=$cf_suffix
31024                 ;;
31025         esac
31026         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
31027         then
31028                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
31029                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
31030         fi
31031
31032         case $cf_item in
31033         (libtool) cf_subdir='obj_lo'  ;;
31034         (normal)  cf_subdir='objects' ;;
31035         (debug)   cf_subdir='obj_g' ;;
31036         (profile) cf_subdir='obj_p' ;;
31037         (shared)
31038                 case "$cf_cv_system_name" in
31039                 (cygwin|msys)
31040                         cf_subdir='objects' ;;
31041                 (*)
31042                         cf_subdir='obj_s' ;;
31043                 esac
31044         esac
31045
31046                         # Test for case where we build libtinfo with a different name.
31047                         cf_libname=$cf_dir
31048                         if test "$cf_dir" = ncurses ; then
31049                                 case "$cf_subset" in
31050                                 (*base*)
31051                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
31052                                         ;;
31053                                 (*termlib*)
31054                                         cf_libname=$TINFO_LIB_SUFFIX
31055                                         ;;
31056                                 (ticlib*)
31057                                         cf_libname=$TICS_LIB_SUFFIX
31058                                         ;;
31059                                 esac
31060                         elif test "$cf_dir" = c++ ; then
31061
31062 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31063
31064 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31065
31066                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31067                         else
31068
31069 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
31070
31071 eval cf_libname="\$${cf_map_lib_basename}_NAME"
31072
31073                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
31074                         fi
31075                         if test -n "${USE_ARG_SUFFIX}" ; then
31076                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
31077                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
31078                         fi
31079
31080                         # These dependencies really are for development, not
31081                         # builds, but they are useful in porting, too.
31082                         cf_depend="../include/ncurses_cfg.h"
31083                         if test "$srcdir" = "."; then
31084                                 cf_reldir="."
31085                         else
31086                                 cf_reldir="\${srcdir}"
31087                         fi
31088
31089                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
31090                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
31091                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
31092                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
31093                         fi
31094
31095                         cf_dir_suffix=
31096                         old_cf_suffix="$cf_suffix"
31097                         if test "$cf_cv_shlib_version_infix" = yes ; then
31098                         if test -n "$USE_LIB_SUFFIX" ; then
31099                                 case "$USE_LIB_SUFFIX" in
31100                                 (tw*)
31101                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
31102                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
31103                                         cf_dir_suffix=tw$EXTRA_SUFFIX
31104                                         ;;
31105                                 (t*)
31106                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
31107                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
31108                                         cf_dir_suffix=t$EXTRA_SUFFIX
31109                                         ;;
31110                                 (w*)
31111                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
31112                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
31113                                         cf_dir_suffix=w$EXTRA_SUFFIX
31114                                         ;;
31115                                 (*)
31116                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
31117                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
31118                                         cf_dir_suffix=$EXTRA_SUFFIX
31119                                         ;;
31120                                 esac
31121                         fi
31122                         fi
31123
31124                         $AWK -f "$srcdir/mk-1st.awk" \
31125                                 name=${cf_libname}${cf_dir_suffix} \
31126                                 traces=$LIB_TRACING \
31127                                 MODEL=$cf_ITEM \
31128                                 CXX_MODEL=$CXX_MODEL \
31129                                 LIB_SUFFIX=$LIB_SUFFIX \
31130                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
31131                                 make_phony="${cf_cv_make_PHONY:-no}" \
31132                                 model=$cf_subdir \
31133                                 prefix=$cf_prefix \
31134                                 suffix=$cf_suffix \
31135                                 subset=$cf_subset \
31136                                 driver=$cf_cv_term_driver \
31137                                 SymLink="$LN_S" \
31138                                 TermlibRoot=$TINFO_NAME \
31139                                 TermlibSuffix=$TINFO_SUFFIX \
31140                                 ShlibVer=$cf_cv_shlib_version \
31141                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
31142                                 ReLink=${cf_cv_do_relink:-no} \
31143                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
31144                                 DoLinks=$cf_cv_do_symlinks \
31145                                 rmSoLocs=$cf_cv_rm_so_locs \
31146                                 ldconfig="$LDCONFIG" \
31147                                 overwrite=$WITH_OVERWRITE \
31148                                 depend="$cf_depend" \
31149                                 host="$host" \
31150                                 libtool_version="$LIBTOOL_VERSION" \
31151                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31152
31153                         cf_suffix="$old_cf_suffix"
31154
31155                         for cf_subdir2 in $cf_subdirs lib
31156                         do
31157                                 test "$cf_subdir" = "$cf_subdir2" && break
31158                         done
31159                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
31160                         $AWK -f "$srcdir/mk-2nd.awk" \
31161                                 name=$cf_dir \
31162                                 traces=$LIB_TRACING \
31163                                 MODEL=$cf_ITEM \
31164                                 model=$cf_subdir \
31165                                 subset=$cf_subset \
31166                                 srcdir=$srcdir \
31167                                 echo=$WITH_ECHO \
31168                                 crenames=$cf_cv_prog_CC_c_o \
31169                                 cxxrenames=$cf_cv_prog_CXX_c_o \
31170                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
31171                         cf_subdirs="$cf_subdirs $cf_subdir"
31172                         done
31173                 done
31174         fi
31175
31176         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
31177 done
31178
31179 echo >> Makefile
31180 echo '# generated by CF_LIB_RULES' >> Makefile
31181
31182 if test "x$cf_cv_make_PHONY" = xyes ; then
31183         cat >> Makefile <<-CF_EOF
31184
31185         .PHONY :        libs
31186         .PHONY :        lintlib
31187         .PHONY :        install.includes
31188         .PHONY :        uninstall.includes
31189         .PHONY :        install.libs
31190         .PHONY :        uninstall.libs
31191 CF_EOF
31192 fi
31193
31194 for cf_dir in $SRC_SUBDIRS
31195 do
31196         if test ! -d "$srcdir/$cf_dir" ; then
31197                 continue
31198         fi
31199
31200         if test -f "$cf_dir/Makefile" ; then
31201                 case "$cf_dir" in
31202                 (Ada95)
31203                         echo 'libs \' >> Makefile
31204                         echo 'install.libs \' >> Makefile
31205                         echo 'uninstall.libs ::' >> Makefile
31206                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
31207                         ;;
31208                 esac
31209         fi
31210
31211         if test -f "$srcdir/$cf_dir/modules" ; then
31212
31213                 if test "x$cf_cv_make_PHONY" = xyes ; then
31214                         cat >> Makefile <<-CF_EOF
31215
31216                         .PHONY :        install.$cf_dir
31217                         .PHONY :        uninstall.$cf_dir
31218 CF_EOF
31219                 fi
31220
31221                 echo >> Makefile
31222                 if test -f "$srcdir/$cf_dir/headers" ; then
31223 cat >> Makefile <<CF_EOF
31224 install.includes \\
31225 uninstall.includes \\
31226 CF_EOF
31227                 fi
31228
31229 cat >> Makefile <<CF_EOF
31230 lint \\
31231 libs \\
31232 lintlib \\
31233 install.libs \\
31234 uninstall.libs \\
31235 install.$cf_dir \\
31236 uninstall.$cf_dir ::
31237         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31238 CF_EOF
31239         elif test -f "$srcdir/$cf_dir/headers" ; then
31240 cat >> Makefile <<CF_EOF
31241
31242 libs \\
31243 install.libs \\
31244 uninstall.libs \\
31245 install.includes \\
31246 uninstall.includes ::
31247         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
31248 CF_EOF
31249 fi
31250 done
31251
31252 if test "x$cf_cv_make_PHONY" = xyes ; then
31253         cat >> Makefile <<-CF_EOF
31254
31255         .PHONY :        install.data
31256         .PHONY :        uninstall.data
31257 CF_EOF
31258 fi
31259
31260 if test "x$cf_with_db_install" = xyes; then
31261 cat >> Makefile <<CF_EOF
31262
31263 install.libs uninstall.libs \\
31264 install.data uninstall.data ::
31265 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31266 CF_EOF
31267 else
31268 cat >> Makefile <<CF_EOF
31269
31270 install.libs uninstall.libs ::
31271         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
31272 CF_EOF
31273 fi
31274
31275 if test "x$cf_with_manpages" = xyes; then
31276
31277 if test "x$cf_cv_make_PHONY" = xyes ; then
31278         cat >> Makefile <<-CF_EOF
31279
31280         .PHONY :        install.man
31281         .PHONY :        uninstall.man
31282 CF_EOF
31283 fi
31284
31285 cat >> Makefile <<CF_EOF
31286
31287 install.man \\
31288 uninstall.man ::
31289         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
31290 CF_EOF
31291 fi
31292
31293 cat >> Makefile <<CF_EOF
31294
31295 distclean ::
31296         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
31297         rm -f headers.sh headers.sed mk_shared_lib.sh
31298         rm -f edit_man.* man_alias.* *.tmp
31299         rm -rf \${DIRS_TO_MAKE}
31300 CF_EOF
31301
31302 rm -f headers.sed headers.sh
31303
31304 echo creating headers.sh
31305 cat >headers.sh <<CF_EOF
31306 #! $SHELL
31307 # This shell script is generated by the 'configure' script.  It is invoked in a
31308 # subdirectory of the build tree.  It generates a sed-script in the parent
31309 # directory that is used to adjust includes for header files that reside in a
31310 # subdirectory of /usr/include, etc.
31311 PRG=""
31312 while test \$# != 3
31313 do
31314 PRG="\$PRG \$1"; shift
31315 done
31316 DST=\$1
31317 REF=\$2
31318 SRC=\$3
31319 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
31320 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
31321 echo installing \$SRC in \$DST
31322 CF_EOF
31323
31324 if test "$WITH_CURSES_H" = yes; then
31325         cat >>headers.sh <<CF_EOF
31326 case \$DST in
31327 (/*/include/*)
31328         END=\`basename \$DST\`
31329         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31330         do
31331                 NAME=\`basename \$i\`
31332                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31333         done
31334         ;;
31335 (*)
31336         echo "" >> \$TMPSED
31337         ;;
31338 esac
31339 CF_EOF
31340
31341 else
31342         cat >>headers.sh <<CF_EOF
31343 case \$DST in
31344 (/*/include/*)
31345         END=\`basename \$DST\`
31346         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
31347         do
31348                 NAME=\`basename \$i\`
31349                 if test "\$NAME" = "curses.h"
31350                 then
31351                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31352                         NAME=ncurses.h
31353                 fi
31354                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
31355         done
31356         ;;
31357 (*)
31358         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
31359         ;;
31360 esac
31361 CF_EOF
31362 fi
31363 cat >>headers.sh <<CF_EOF
31364 rm -f \$TMPSRC
31365 sed -f \$TMPSED \$SRC > \$TMPSRC
31366 NAME=\`basename \$SRC\`
31367 CF_EOF
31368 if test "$WITH_CURSES_H" != yes; then
31369         cat >>headers.sh <<CF_EOF
31370 test "\$NAME" = "curses.h" && NAME=ncurses.h
31371 CF_EOF
31372 fi
31373 cat >>headers.sh <<CF_EOF
31374 # Just in case someone gzip'd manpages, remove the conflicting copy.
31375 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
31376
31377 eval \$PRG \$TMPSRC \$DST/\$NAME
31378 rm -f \$TMPSRC \$TMPSED
31379 CF_EOF
31380
31381 chmod 0755 headers.sh
31382
31383 for cf_dir in $SRC_SUBDIRS
31384 do
31385         if test ! -d "$srcdir/$cf_dir" ; then
31386                 continue
31387         fi
31388
31389         if test -f "$srcdir/$cf_dir/headers" ; then
31390                 $AWK -f "$srcdir/mk-hdr.awk" \
31391                         subset="$LIB_SUBSETS" \
31392                         compat="$WITH_CURSES_H" \
31393                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
31394         fi
31395
31396         if test -f "$srcdir/$cf_dir/modules" ; then
31397                 if test "$cf_dir" != "c++" ; then
31398                         if test "x$cf_cv_make_PHONY" = xyes ; then
31399                                 cat >> $cf_dir/Makefile <<-CF_EOF
31400
31401                                 .PHONY :        depend
31402 CF_EOF
31403                         fi
31404
31405                         cat >>$cf_dir/Makefile <<"CF_EOF"
31406 depend : ${AUTO_SRC}
31407         makedepend -- ${CPPFLAGS} -- ${C_SRC}
31408
31409 # DO NOT DELETE THIS LINE -- make depend depends on it.
31410 CF_EOF
31411                 fi
31412         fi
31413 done
31414
31415 if test "$MANPAGE_RENAMES" != no ; then
31416         # Construct a sed-script to perform renaming within man-pages
31417         test -n "$verbose" && echo "creating edit_man.sed"
31418         test ! -d man && mkdir man
31419         FGREP="${FGREP-grep -F}" $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
31420 fi
31421
31422 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
31423 if test -z "$USE_OLD_MAKERULES" ; then
31424         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
31425 fi
31426 fi
31427  ;;
31428   esac
31429 done
31430 EOF
31431
31432 cat >>"$CONFIG_STATUS" <<\EOF
31433
31434 { (exit 0); exit 0; }
31435 EOF
31436 chmod +x "$CONFIG_STATUS"
31437 ac_clean_files=$ac_clean_files_save
31438
31439 # configure is writing to config.log, and then calls config.status.
31440 # config.status does its own redirection, appending to config.log.
31441 # Unfortunately, on DOS this fails, as config.log is still kept open
31442 # by configure, so config.status won't be able to write to it; its
31443 # output is simply discarded.  So we exec the FD to /dev/null,
31444 # effectively closing config.log, so it can be properly (re)opened and
31445 # appended to by config.status.  When coming back to configure, we
31446 # need to make the FD available again.
31447 if test "$no_create" != yes; then
31448   ac_cs_success=:
31449   exec 5>/dev/null
31450   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
31451   exec 5>>config.log
31452   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31453   # would make configure fail if this is the last instruction.
31454   "$ac_cs_success" || { (exit 1); exit 1; }
31455 fi
31456 ${MAKE:-make} preinstall