]> ncurses.scripts.mit.edu Git - ncurses.git/blob - configure
ncurses 6.3 - patch 20211127
[ncurses.git] / configure
1 #! /bin/sh
2 # From configure.in Revision: 1.737 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by Autoconf 2.52.20210509.
5 #
6 # Copyright 2003-2020,2021      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   --without-ada           suppress check for Ada compiler, don't build demo
720   --without-cxx           do not adjust ncurses bool to match C++
721   --without-cxx-binding   do not build C++ binding and demo
722   --disable-db-install    suppress install of terminal database
723   --without-manpages      suppress install of manpages
724   --without-progs         suppress build/install with programs (e.g., tic)
725   --without-tack          suppress build/install with tack program
726   --without-tests         suppress build/install with test-programs
727   --without-curses-h      install curses.h as ncurses.h only
728   --with-config-suffix=X  suffixes ncursesXX-config file
729   --with-pkg-config{=path} enable/disable use of pkg-config
730   --with-pkg-config-libdir=XXX use given directory for installing pc-files
731   --enable-pc-files       generate and install .pc files for pkg-config
732   --with-pc-suffix        suffixes pc-files
733   --enable-mixed-case     tic should assume mixed-case filenames
734   --with-install-prefix   prefixes actual install-location ($DESTDIR)
735 Build-Tools Needed to Compile Temporary Applications for Cross-compiling:
736   --with-build-cc=XXX     the build C compiler ($BUILD_CC)
737   --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
738   --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
739   --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
740   --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
741   --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
742 Options to Specify the Libraries Built/Used:
743   --disable-libtool-version  enable to use libtool's incompatible naming scheme
744   --with-libtool          generate libraries with libtool
745   --with-shared           generate shared-libraries
746   --with-normal           generate normal-libraries (default)
747   --with-debug            generate debug-libraries (default)
748   --with-profile          generate profile-libraries
749   --with-cxx-shared       generate C++ shared-libraries
750   --with-lib-prefix       override library-prefix
751   --with-termlib          generate separate terminfo library
752   --with-ticlib           generate separate tic library
753   --enable-rpath          use rpath option when generating shared libraries
754   --disable-relink        relink shared libraries during install
755   --with-shlib-version=X  Specify rel or abi version for shared libs
756   --with-libtool-opts=XXX specify additional libtool options
757   --with-export-syms=XXX  limit exported symbols using libtool
758   --with-versioned-syms=X markup versioned symbols using ld
759   --with-gpm              use Alessandro Rubini's GPM library
760   --without-dlsym         do not use dlsym() to load GPM dynamically
761   --with-pcre2            use PCRE2 for regular-expressions
762   --with-sysmouse         use sysmouse (FreeBSD console)
763   --disable-lib-suffixes  disable library suffixes
764   --disable-rpath-hack    don't add rpath options for additional libraries
765   --disable-pkg-ldflags   disable extra LDFLAGS for package-scripts
766 Fine-Tuning Your Configuration:
767   --with-extra-suffix=X   append extra suffix to header/library paths
768   --disable-overwrite     put headers in subdir, omit link to -lcurses
769   --disable-database      do not use terminfo, only fallbacks/termcap
770   --with-database=XXX     specify terminfo source to install
771   --with-hashed-db        specify hashed-database library
772   --with-fallbacks=XXX    specify list of fallback terminal descriptions
773   --with-tic-path=XXX     specify path of tic for fallbacks
774   --with-infocmp-path=XXX     specify path of infocmp for fallbacks
775   --without-xterm-new     specify if xterm terminfo should be old version
776   --with-xterm-kbs=XXX    specify if xterm backspace sends BS or DEL
777   --with-terminfo-dirs=XXX specify list of terminfo directories (default: DATADIR/terminfo)
778   --with-default-terminfo-dir=DIR default terminfo directory (default: DATADIR/terminfo)
779   --disable-big-core      assume machine has little memory
780   --disable-big-strings   assume compiler has only standard-size strings
781   --enable-termcap        compile in termcap fallback support
782   --with-termpath=XXX     specify list of termcap files (default: /etc/termcap:/usr/share/misc/termcap)
783   --enable-getcap         fast termcap load, no xrefs to terminfo
784   --enable-getcap-cache   cache translated termcaps in ~/.terminfo
785   --disable-home-terminfo drop ~/.terminfo from terminfo search-path
786   --disable-root-environ  restrict root use of ncurses environment variables
787   --disable-root-access   restrict file-access when running setuid
788   --enable-symlinks       make tic use symbolic links not hard links
789   --enable-broken_linker  compile with broken-linker support code
790   --enable-bsdpad         recognize BSD-style prefix padding
791   --enable-widec          compile with wide-char/UTF-8 code
792   --disable-lp64          allow chtype to be long (ignore _LP64)
793   --disable-largefile     omit support for large files
794   --disable-tparm-varargs compile tparm() without varargs interface
795   --disable-tic-depends   link tic library without explicit dependency on ncurses library
796   --enable-wattr-macros   enable wattr* macros
797   --with-x11-rgb=FILE   file containing X11 rgb information (EPREFIX/lib/X11/rgb.txt)
798   --with-bool=TYPE        override fallback type of bool variable
799   --with-caps=alt         compile with alternate Caps file
800   --with-chtype=TYPE      override type of chtype
801   --with-ospeed=TYPE      override type of ospeed variable
802   --with-mmask-t=TYPE     override type of mmask_t
803   --with-ccharw-max=XXX   override size CCHARW_MAX
804   --enable-signed-char    compile using signed Boolean's in term.h
805   --with-tparm-arg=TYPE   override parameter type of tparm
806   --with-rcs-ids          compile-in RCS identifiers
807 Options to Specify How Manpages are Installed:
808   --with-manpage-format   specify manpage-format: gzip/compress/BSDI/normal and
809                           optionally formatted/catonly, e.g., gzip,formatted
810   --with-manpage-renames  specify manpage-renaming
811   --with-manpage-aliases  specify manpage-aliases using .so
812   --with-manpage-symlinks specify manpage-aliases using symlinks
813   --with-manpage-tbl      specify manpage processing with tbl
814 Extensions:
815   --disable-ext-funcs     disable function-extensions
816   --enable-sp-funcs       enable SCREEN-extensions
817   --enable-term-driver    enable terminal-driver
818   --enable-const          compile with extra/non-standard const
819   --enable-ext-colors     compile for 256-color support
820   --enable-ext-mouse      compile for extended mouse-encoding
821   --enable-ext-putwin     compile with extended putwin/screendump
822   --enable-no-padding     compile with $NCURSES_NO_PADDING code
823   --enable-sigwinch       compile with SIGWINCH handler
824   --enable-tcap-names     compile with user-definable terminal capabilities
825 Reentrant Code:
826   --with-pthread          use POSIX thread library
827   --enable-pthreads-eintr enable EINTR in wgetch with pthreads
828   --enable-weak-symbols   enable weak-symbols for pthreads
829   --enable-reentrant      compile with reentrant code
830   --enable-opaque-curses  make curses WINDOW, etc., "opaque"
831   --enable-opaque-form    make form-library structures "opaque"
832   --enable-opaque-menu    make menu-library structures "opaque"
833   --enable-opaque-panel   make panel-library structures "opaque"
834   --with-wrap-prefix=XXX  override prefix used for public variables
835 Development Code:
836   --without-develop       disable development options
837   --enable-hard-tabs      compile with hard-tabs code
838   --enable-xmc-glitch     compile with support for xmc (magic-cookie)
839 Experimental Code:
840   --disable-assumed-color do not assume anything about default-colors
841   --disable-hashmap       compile without hashmap scrolling-optimization
842   --enable-colorfgbg      compile-in experimental $COLORFGBG code
843   --enable-fvisibility    compile with -fvisibility=hidden
844   --enable-interop        compile-in interop bindings
845   --enable-safe-sprintf   compile with experimental safe-sprintf code
846   --disable-scroll-hints  compile without scroll-hints code
847   --enable-wgetch-events  compile with wgetch-events code
848   --enable-exp-win32      compile with experimental-Windows driver
849 Testing/development Options:
850   --disable-echo          do not display "compiling" commands
851   --disable-stripping     do not strip (debug info) installed executables
852   --enable-warnings       test: turn on gcc compiler warnings
853   --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
854   --enable-string-hacks   work around bogus compiler/loader warnings
855   --enable-assertions     test: turn on generation of assertion code
856   --with-dmalloc          test: use Gray Watson's dmalloc library
857   --with-dbmalloc         test: use Conor Cahill's dbmalloc library
858   --with-valgrind         test: use valgrind
859   --disable-leaks         test: free permanent memory, analyze leaks
860   --enable-expanded       test: generate functions for certain macros
861   --disable-macros        test: use functions rather than macros
862   --with-trace            test: add trace() function to all models of ncurses
863   --disable-gnat-projects test: disable GNAT projects even if usable
864 Ada Binding Options:
865   --with-ada-compiler=CMD specify Ada95 compiler command (default gnatmake)
866   --with-ada-include=DIR  Ada includes are in DIR (default: PREFIX/share/ada/adainclude)
867   --with-ada-objects=DIR  Ada objects are in DIR (default: PREFIX/lib/ada/adalib)
868   --with-ada-sharedlib=soname build shared-library (requires GNAT projects)
869   --with-ada-libname=XXX  override default Ada library-name
870   --with-form-libname=XXX override form basename of library
871   --with-menu-libname=XXX override menu basename of library
872   --with-panel-libname=XXX override panel basename of library
873   --with-cxx-libname=XXX override ncurses++ basename of library
874
875 Some influential environment variables:
876   CC          C compiler command
877   CFLAGS      C compiler flags
878   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
879               nonstandard directory <lib dir>
880   CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
881               headers in a nonstandard directory <include dir>
882   CPP         C preprocessor
883   CXX         C++ compiler command
884   CXXFLAGS    C++ compiler flags
885   CXXCPP      C++ preprocessor
886
887 Use these variables to override the choices made by `configure' or to help
888 it to find libraries and programs with nonstandard names/locations.
889
890 EOF
891 fi
892
893 if test "$ac_init_help" = "recursive"; then
894   # If there are subdirs, report their specific --help.
895   ac_popdir=`pwd`
896   for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
897     cd "$ac_subdir"
898     # A "../" for each directory in /$ac_subdir.
899     ac_dots=`echo "$ac_subdir" |
900              sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
901
902     case "$srcdir" in
903     .) # No --srcdir option.  We are building in place.
904       ac_sub_srcdir="$srcdir" ;;
905     [\\/]* | ?:[\\/]* ) # Absolute path.
906       ac_sub_srcdir="$srcdir/$ac_subdir" ;;
907     *) # Relative path.
908       ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
909     esac
910
911     # Check for guested configure; otherwise get Cygnus style configure.
912     if test -f "$ac_sub_srcdir/configure.gnu"; then
913       echo
914       $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
915     elif test -f "$ac_sub_srcdir/configure"; then
916       echo
917       $SHELL "$ac_sub_srcdir/configure" --help=recursive
918     elif test -f "$ac_sub_srcdir/configure.ac" ||
919            test -f "$ac_sub_srcdir/configure.in"; then
920       echo
921       "$ac_configure" --help
922     else
923       echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
924     fi
925     cd "$ac_popdir"
926   done
927 fi
928
929 test -n "$ac_init_help" && exit 0
930 if "$ac_init_version"; then
931   cat <<\EOF
932
933 Copyright 2003-2020,2021        Thomas E. Dickey
934 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
935 Free Software Foundation, Inc.
936 This configure script is free software; the Free Software Foundation
937 gives unlimited permission to copy, distribute and modify it.
938 EOF
939   exit 0
940 fi
941 exec 5>config.log
942 cat >&5 <<EOF
943 This file contains any messages produced by compilers while
944 running configure, to aid debugging if configure makes a mistake.
945
946 It was created by $as_me, which was
947 generated by GNU Autoconf 2.52.20210509.  Invocation command line was
948
949   $ $0 $@
950
951 EOF
952 {
953 cat <<_ASUNAME
954 ## ---------- ##
955 ## Platform.  ##
956 ## ---------- ##
957
958 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
959 uname -m = `(uname -m) 2>/dev/null || echo unknown`
960 uname -r = `(uname -r) 2>/dev/null || echo unknown`
961 uname -s = `(uname -s) 2>/dev/null || echo unknown`
962 uname -v = `(uname -v) 2>/dev/null || echo unknown`
963
964 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
965 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
966
967 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
968 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
969 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
970 hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
971 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
972 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
973 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
974
975 PATH = $PATH
976
977 _ASUNAME
978 } >&5
979
980 cat >&5 <<EOF
981 ## ------------ ##
982 ## Core tests.  ##
983 ## ------------ ##
984
985 EOF
986
987 # Keep a trace of the command line.
988 # Strip out --no-create and --no-recursion so they do not pile up.
989 # Also quote any args containing shell meta-characters.
990 ac_configure_args=
991 ac_sep=
992 for ac_arg
993 do
994   case "$ac_arg" in
995   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
996   | --no-cr | --no-c) ;;
997   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
998   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
999   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1000     ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
1001     ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
1002     ac_sep=" " ;;
1003   *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
1004      ac_sep=" " ;;
1005   esac
1006   # Get rid of the leading space.
1007 done
1008
1009 # When interrupted or exit'd, cleanup temporary files, and complete
1010 # config.log.  We remove comments because anyway the quotes in there
1011 # would cause problems or look ugly.
1012 trap 'exit_status=$?
1013   # Save into config.log some information that might help in debugging.
1014   echo >&5
1015   echo "## ----------------- ##" >&5
1016   echo "## Cache variables.  ##" >&5
1017   echo "## ----------------- ##" >&5
1018   echo >&5
1019   # The following way of writing the cache mishandles newlines in values,
1020 {
1021   (set) 2>&1 |
1022     case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
1023     *ac_space=\ *)
1024       sed -n \
1025         "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
1026           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
1027       ;;
1028     *)
1029       sed -n \
1030         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
1031       ;;
1032     esac;
1033 } >&5
1034   sed "/^$/d" confdefs.h >conftest.log
1035   if test -s conftest.log; then
1036     echo >&5
1037     echo "## ------------ ##" >&5
1038     echo "## confdefs.h.  ##" >&5
1039     echo "## ------------ ##" >&5
1040     echo >&5
1041     cat conftest.log >&5
1042   fi
1043   (echo; echo) >&5
1044   test "$ac_signal" != 0 &&
1045     echo "$as_me: caught signal $ac_signal" >&5
1046   echo "$as_me: exit $exit_status" >&5
1047   rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1048     exit $exit_status
1049      ' 0
1050 for ac_signal in 1 2 13 15; do
1051   trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1052 done
1053 ac_signal=0
1054
1055 # confdefs.h avoids OS command line length limits that DEFS can exceed.
1056 rm -rf conftest* confdefs.h
1057 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
1058 echo >confdefs.h
1059
1060 # Let the site file select an alternate cache file if it wants to.
1061 # Prefer explicitly selected file to automatically selected ones.
1062 if test -z "$CONFIG_SITE"; then
1063   if test "x$prefix" != xNONE; then
1064     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1065   else
1066     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1067   fi
1068 fi
1069 for ac_site_file in $CONFIG_SITE; do
1070   if test -r "$ac_site_file"; then
1071     { echo "$as_me:1071: loading site script $ac_site_file" >&5
1072 echo "$as_me: loading site script $ac_site_file" >&6;}
1073     cat "$ac_site_file" >&5
1074     . "$ac_site_file"
1075   fi
1076 done
1077
1078 if test -r "$cache_file"; then
1079   # Some versions of bash will fail to source /dev/null (special
1080   # files actually), so we avoid doing that.
1081   if test -f "$cache_file"; then
1082     { echo "$as_me:1082: loading cache $cache_file" >&5
1083 echo "$as_me: loading cache $cache_file" >&6;}
1084     case $cache_file in
1085       [\\/]* | ?:[\\/]* ) . $cache_file;;
1086       *)                      . ./$cache_file;;
1087     esac
1088   fi
1089 else
1090   { echo "$as_me:1090: creating cache $cache_file" >&5
1091 echo "$as_me: creating cache $cache_file" >&6;}
1092   >$cache_file
1093 fi
1094
1095 # Check that the precious variables saved in the cache have kept the same
1096 # value.
1097 ac_cache_corrupted=false
1098 for ac_var in `(set) 2>&1 |
1099                sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1100   eval ac_old_set=\$ac_cv_env_${ac_var}_set
1101   eval ac_new_set=\$ac_env_${ac_var}_set
1102   eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1103   eval ac_new_val="\$ac_env_${ac_var}_value"
1104   case "$ac_old_set,$ac_new_set" in
1105     set,)
1106       { echo "$as_me:1106: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1107 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1108       ac_cache_corrupted=: ;;
1109     ,set)
1110       { echo "$as_me:1110: error: \`$ac_var' was not set in the previous run" >&5
1111 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1112       ac_cache_corrupted=: ;;
1113     ,);;
1114     *)
1115       if test "x$ac_old_val" != "x$ac_new_val"; then
1116         { echo "$as_me:1116: error: \`$ac_var' has changed since the previous run:" >&5
1117 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1118         { echo "$as_me:1118:   former value:  $ac_old_val" >&5
1119 echo "$as_me:   former value:  $ac_old_val" >&2;}
1120         { echo "$as_me:1120:   current value: $ac_new_val" >&5
1121 echo "$as_me:   current value: $ac_new_val" >&2;}
1122         ac_cache_corrupted=:
1123       fi;;
1124   esac
1125   # Pass precious variables to config.status.  It doesn't matter if
1126   # we pass some twice (in addition to the command line arguments).
1127   if test "$ac_new_set" = set; then
1128     case "$ac_new_val" in
1129     *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1130       ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1131       ac_configure_args="$ac_configure_args '$ac_arg'"
1132       ;;
1133     *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1134        ;;
1135     esac
1136   fi
1137 done
1138 if "$ac_cache_corrupted"; then
1139   { echo "$as_me:1139: error: changes in the environment can compromise the build" >&5
1140 echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1141   { { echo "$as_me:1141: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1142 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1143    { (exit 1); exit 1; }; }
1144 fi
1145
1146 ac_ext=c
1147 ac_cpp='$CPP $CPPFLAGS'
1148 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1149 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1150 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1151 ac_main_return="return"
1152
1153 case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1154   *c*,-n*) ECHO_N=
1155            ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1156            ECHO_T='     '
1157            ;;
1158   *c*,*  ) ECHO_N=-n
1159            ECHO_C=
1160            ECHO_T=
1161            ;;
1162   *)       ECHO_N=
1163            ECHO_C='\c'
1164            ECHO_T=
1165            ;;
1166 esac
1167 echo "#! $SHELL" >conftest.sh
1168 echo  "exit 0"   >>conftest.sh
1169 chmod +x conftest.sh
1170 if { (echo "$as_me:1170: PATH=\".;.\"; conftest.sh") >&5
1171   (PATH=".;."; conftest.sh) 2>&5
1172   ac_status=$?
1173   echo "$as_me:1173: \$? = $ac_status" >&5
1174   (exit "$ac_status"); }; then
1175   ac_path_separator=';'
1176 else
1177   ac_path_separator=:
1178 fi
1179 PATH_SEPARATOR="$ac_path_separator"
1180 rm -f conftest.sh
1181
1182 ac_config_headers="$ac_config_headers include/ncurses_cfg.h:include/ncurses_cfg.hin"
1183
1184 top_builddir=`pwd`
1185
1186 for ac_prog in ggrep grep
1187 do
1188   # Extract the first word of "$ac_prog", so it can be a program name with args.
1189 set dummy $ac_prog; ac_word=$2
1190 echo "$as_me:1190: checking for $ac_word" >&5
1191 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1192 if test "${ac_cv_prog_GREP+set}" = set; then
1193   echo $ECHO_N "(cached) $ECHO_C" >&6
1194 else
1195   if test -n "$GREP"; then
1196   ac_cv_prog_GREP="$GREP" # Let the user override the test.
1197 else
1198   ac_save_IFS=$IFS; IFS=$ac_path_separator
1199 ac_dummy="$PATH"
1200 for ac_dir in $ac_dummy; do
1201   IFS=$ac_save_IFS
1202   test -z "$ac_dir" && ac_dir=.
1203   $as_executable_p "$ac_dir/$ac_word" || continue
1204 ac_cv_prog_GREP="$ac_prog"
1205 echo "$as_me:1205: found $ac_dir/$ac_word" >&5
1206 break
1207 done
1208
1209 fi
1210 fi
1211 GREP=$ac_cv_prog_GREP
1212 if test -n "$GREP"; then
1213   echo "$as_me:1213: result: $GREP" >&5
1214 echo "${ECHO_T}$GREP" >&6
1215 else
1216   echo "$as_me:1216: result: no" >&5
1217 echo "${ECHO_T}no" >&6
1218 fi
1219
1220   test -n "$GREP" && break
1221 done
1222 test -n "$GREP" || GREP=": "
1223
1224 echo "$as_me:1224: checking for egrep" >&5
1225 echo $ECHO_N "checking for egrep... $ECHO_C" >&6
1226 if test "${ac_cv_path_EGREP+set}" = set; then
1227   echo $ECHO_N "(cached) $ECHO_C" >&6
1228 else
1229   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
1230    then ac_cv_path_EGREP="$GREP -E"
1231    else
1232      for ac_prog in gegrep egrep
1233 do
1234   # Extract the first word of "$ac_prog", so it can be a program name with args.
1235 set dummy $ac_prog; ac_word=$2
1236 echo "$as_me:1236: checking for $ac_word" >&5
1237 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1238 if test "${ac_cv_path_EGREP+set}" = set; then
1239   echo $ECHO_N "(cached) $ECHO_C" >&6
1240 else
1241   case $EGREP in
1242   [\\/]* | ?:[\\/]*)
1243   ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
1244   ;;
1245   *)
1246   ac_save_IFS=$IFS; IFS=$ac_path_separator
1247 ac_dummy="$PATH"
1248 for ac_dir in $ac_dummy; do
1249   IFS=$ac_save_IFS
1250   test -z "$ac_dir" && ac_dir=.
1251   if $as_executable_p "$ac_dir/$ac_word"; then
1252    ac_cv_path_EGREP="$ac_dir/$ac_word"
1253    echo "$as_me:1253: found $ac_dir/$ac_word" >&5
1254    break
1255 fi
1256 done
1257
1258   ;;
1259 esac
1260 fi
1261 EGREP=$ac_cv_path_EGREP
1262
1263 if test -n "$EGREP"; then
1264   echo "$as_me:1264: result: $EGREP" >&5
1265 echo "${ECHO_T}$EGREP" >&6
1266 else
1267   echo "$as_me:1267: result: no" >&5
1268 echo "${ECHO_T}no" >&6
1269 fi
1270
1271   test -n "$EGREP" && break
1272 done
1273 test -n "$EGREP" || EGREP=": "
1274
1275      test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:1275: error: cannot find workable egrep" >&5
1276 echo "$as_me: error: cannot find workable egrep" >&2;}
1277    { (exit 1); exit 1; }; }
1278    fi
1279 fi
1280 echo "$as_me:1280: result: $ac_cv_path_EGREP" >&5
1281 echo "${ECHO_T}$ac_cv_path_EGREP" >&6
1282  EGREP="$ac_cv_path_EGREP"
1283
1284 NCURSES_MAJOR="`${EGREP-egrep} '^NCURSES_MAJOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1285 NCURSES_MINOR="`${EGREP-egrep} '^NCURSES_MINOR[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1286 NCURSES_PATCH="`${EGREP-egrep} '^NCURSES_PATCH[         ]*=' "$srcdir/dist.mk" | sed -e 's/^[^0-9]*//'`"
1287 cf_cv_abi_version=${NCURSES_MAJOR}
1288 cf_cv_rel_version=${NCURSES_MAJOR}.${NCURSES_MINOR}
1289 cf_cv_timestamp=`date`
1290 echo "$as_me:1290: result: Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&5
1291 echo "${ECHO_T}Configuring NCURSES $cf_cv_rel_version ABI $cf_cv_abi_version ($cf_cv_timestamp)" >&6
1292
1293 if test -f "$srcdir/VERSION" ; then
1294         echo "$as_me:1294: checking for package version" >&5
1295 echo $ECHO_N "checking for package version... $ECHO_C" >&6
1296
1297         # if there are not enough fields, cut returns the last one...
1298         cf_field1=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
1299         cf_field2=`sed -e '2,$d' "$srcdir/VERSION" |cut -f2`
1300         cf_field3=`sed -e '2,$d' "$srcdir/VERSION" |cut -f3`
1301
1302         # this is how CF_BUNDLED_INTL uses $VERSION:
1303         VERSION="$cf_field1"
1304
1305         VERSION_MAJOR=`echo "$cf_field2" | sed -e 's/\..*//'`
1306         test -z "$VERSION_MAJOR" && { { echo "$as_me:1306: error: missing major-version" >&5
1307 echo "$as_me: error: missing major-version" >&2;}
1308    { (exit 1); exit 1; }; }
1309
1310         VERSION_MINOR=`echo "$cf_field2" | sed -e 's/^[^.]*\.//' -e 's/-.*//'`
1311         test -z "$VERSION_MINOR" && { { echo "$as_me:1311: error: missing minor-version" >&5
1312 echo "$as_me: error: missing minor-version" >&2;}
1313    { (exit 1); exit 1; }; }
1314
1315         echo "$as_me:1315: result: ${VERSION_MAJOR}.${VERSION_MINOR}" >&5
1316 echo "${ECHO_T}${VERSION_MAJOR}.${VERSION_MINOR}" >&6
1317
1318         echo "$as_me:1318: checking for package patch date" >&5
1319 echo $ECHO_N "checking for package patch date... $ECHO_C" >&6
1320         VERSION_PATCH=`echo "$cf_field3" | sed -e 's/^[^-]*-//'`
1321         case .$VERSION_PATCH in
1322         (.)
1323                 { { echo "$as_me:1323: error: missing patch-date $VERSION_PATCH" >&5
1324 echo "$as_me: error: missing patch-date $VERSION_PATCH" >&2;}
1325    { (exit 1); exit 1; }; }
1326                 ;;
1327         (.[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9])
1328                 ;;
1329         (*)
1330                 { { echo "$as_me:1330: error: illegal patch-date $VERSION_PATCH" >&5
1331 echo "$as_me: error: illegal patch-date $VERSION_PATCH" >&2;}
1332    { (exit 1); exit 1; }; }
1333                 ;;
1334         esac
1335         echo "$as_me:1335: result: $VERSION_PATCH" >&5
1336 echo "${ECHO_T}$VERSION_PATCH" >&6
1337 else
1338         { { echo "$as_me:1338: error: did not find $srcdir/VERSION" >&5
1339 echo "$as_me: error: did not find $srcdir/VERSION" >&2;}
1340    { (exit 1); exit 1; }; }
1341 fi
1342
1343 # show the actual data that we have for versions:
1344 test -n "$verbose" && echo "    ABI VERSION $VERSION" 1>&6
1345
1346 echo "${as_me:-configure}:1346: testing ABI VERSION $VERSION ..." 1>&5
1347
1348 test -n "$verbose" && echo "    VERSION_MAJOR $VERSION_MAJOR" 1>&6
1349
1350 echo "${as_me:-configure}:1350: testing VERSION_MAJOR $VERSION_MAJOR ..." 1>&5
1351
1352 test -n "$verbose" && echo "    VERSION_MINOR $VERSION_MINOR" 1>&6
1353
1354 echo "${as_me:-configure}:1354: testing VERSION_MINOR $VERSION_MINOR ..." 1>&5
1355
1356 test -n "$verbose" && echo "    VERSION_PATCH $VERSION_PATCH" 1>&6
1357
1358 echo "${as_me:-configure}:1358: testing VERSION_PATCH $VERSION_PATCH ..." 1>&5
1359
1360         cf_PACKAGE=NCURSES
1361         PACKAGE=ncurses
1362
1363 cat >>confdefs.h <<EOF
1364 #define PACKAGE "$PACKAGE"
1365 EOF
1366
1367 cf_PACKAGE=`echo "$cf_PACKAGE" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
1368
1369         cat >>confdefs.h <<EOF
1370 #define ${cf_PACKAGE}_VERSION "${VERSION_MAJOR}.${VERSION_MINOR}"
1371 EOF
1372
1373         cat >>confdefs.h <<EOF
1374 #define ${cf_PACKAGE}_PATCHDATE ${VERSION_PATCH}
1375 EOF
1376
1377 test -z "$cf_cv_rel_version" && cf_cv_rel_version=0.0
1378
1379 # Check whether --with-rel-version or --without-rel-version was given.
1380 if test "${with_rel_version+set}" = set; then
1381   withval="$with_rel_version"
1382   { echo "$as_me:1382: WARNING: overriding release version $cf_cv_rel_version to $withval" >&5
1383 echo "$as_me: WARNING: overriding release version $cf_cv_rel_version to $withval" >&2;}
1384  cf_cv_rel_version=$withval
1385 fi;
1386
1387  NCURSES_MAJOR=`echo "$cf_cv_rel_version" | sed -e 's/\..*//'`
1388  NCURSES_MINOR=`echo "$cf_cv_rel_version" | sed -e 's/^[^.]*//' -e 's/^\.//' -e 's/\..*//'`
1389
1390 if test -n "$NCURSES_MAJOR" ; then
1391   case $NCURSES_MAJOR in
1392   ([0-9]*)
1393         ;;
1394   (*)
1395         { { echo "$as_me:1395: error: Release major-version is not a number: $NCURSES_MAJOR" >&5
1396 echo "$as_me: error: Release major-version is not a number: $NCURSES_MAJOR" >&2;}
1397    { (exit 1); exit 1; }; }
1398         ;;
1399   esac
1400 else
1401   { { echo "$as_me:1401: error: Release major-version value is empty" >&5
1402 echo "$as_me: error: Release major-version value is empty" >&2;}
1403    { (exit 1); exit 1; }; }
1404 fi
1405
1406 if test -n "$NCURSES_MINOR" ; then
1407   case $NCURSES_MINOR in
1408   ([0-9]*)
1409         ;;
1410   (*)
1411         { { echo "$as_me:1411: error: Release minor-version is not a number: $NCURSES_MINOR" >&5
1412 echo "$as_me: error: Release minor-version is not a number: $NCURSES_MINOR" >&2;}
1413    { (exit 1); exit 1; }; }
1414         ;;
1415   esac
1416 else
1417   { { echo "$as_me:1417: error: Release minor-version value is empty" >&5
1418 echo "$as_me: error: Release minor-version value is empty" >&2;}
1419    { (exit 1); exit 1; }; }
1420 fi
1421
1422 test -z "$cf_cv_abi_version" && cf_cv_abi_version=0
1423
1424 # Check whether --with-abi-version or --without-abi-version was given.
1425 if test "${with_abi_version+set}" = set; then
1426   withval="$with_abi_version"
1427
1428         if test "x$cf_cv_abi_version" != "x$withval"
1429         then
1430                 { echo "$as_me:1430: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&5
1431 echo "$as_me: WARNING: overriding ABI version $cf_cv_abi_version to $withval" >&2;}
1432                 case "$cf_cv_rel_version" in
1433                 (5.*)
1434                         cf_cv_rel_version=$withval.0
1435                         ;;
1436                 (6.*)
1437                         cf_cv_rel_version=$withval.9    # FIXME: should be 10 as of 6.0 release
1438                         ;;
1439                 esac
1440         fi
1441         cf_cv_abi_version=$withval
1442 fi;
1443
1444 if test -n "$cf_cv_abi_version" ; then
1445   case $cf_cv_abi_version in
1446   ([0-9]*)
1447         ;;
1448   (*)
1449         { { echo "$as_me:1449: error: ABI version is not a number: $cf_cv_abi_version" >&5
1450 echo "$as_me: error: ABI version is not a number: $cf_cv_abi_version" >&2;}
1451    { (exit 1); exit 1; }; }
1452         ;;
1453   esac
1454 else
1455   { { echo "$as_me:1455: error: ABI version value is empty" >&5
1456 echo "$as_me: error: ABI version value is empty" >&2;}
1457    { (exit 1); exit 1; }; }
1458 fi
1459
1460 if test "x$cf_cv_abi_version" != "x$with_abi_version"
1461 then
1462         case "$cf_cv_rel_version" in
1463         (5.*)
1464                 cf_cv_rel_version=$with_abi_version.0
1465                 ;;
1466         esac
1467 fi
1468
1469 ac_aux_dir=
1470 for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1471   if test -f "$ac_dir/install-sh"; then
1472     ac_aux_dir=$ac_dir
1473     ac_install_sh="$ac_aux_dir/install-sh -c"
1474     break
1475   elif test -f "$ac_dir/install.sh"; then
1476     ac_aux_dir=$ac_dir
1477     ac_install_sh="$ac_aux_dir/install.sh -c"
1478     break
1479   elif test -f "$ac_dir/shtool"; then
1480     ac_aux_dir=$ac_dir
1481     ac_install_sh="$ac_aux_dir/shtool install -c"
1482     break
1483   fi
1484 done
1485 if test -z "$ac_aux_dir"; then
1486   { { echo "$as_me:1486: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1487 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1488    { (exit 1); exit 1; }; }
1489 fi
1490 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1491 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1492 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1493
1494 # Make sure we can run config.sub.
1495 $ac_config_sub sun4 >/dev/null 2>&1 ||
1496   { { echo "$as_me:1496: error: cannot run $ac_config_sub" >&5
1497 echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1498    { (exit 1); exit 1; }; }
1499
1500 echo "$as_me:1500: checking build system type" >&5
1501 echo $ECHO_N "checking build system type... $ECHO_C" >&6
1502 if test "${ac_cv_build+set}" = set; then
1503   echo $ECHO_N "(cached) $ECHO_C" >&6
1504 else
1505   ac_cv_build_alias=$build_alias
1506 test -z "$ac_cv_build_alias" &&
1507   ac_cv_build_alias=`$ac_config_guess`
1508 test -z "$ac_cv_build_alias" &&
1509   { { echo "$as_me:1509: error: cannot guess build type; you must specify one" >&5
1510 echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1511    { (exit 1); exit 1; }; }
1512 ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1513   { { echo "$as_me:1513: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1514 echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1515    { (exit 1); exit 1; }; }
1516
1517 fi
1518 echo "$as_me:1518: result: $ac_cv_build" >&5
1519 echo "${ECHO_T}$ac_cv_build" >&6
1520 build=$ac_cv_build
1521 build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1522 build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1523 build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1524
1525 echo "$as_me:1525: checking host system type" >&5
1526 echo $ECHO_N "checking host system type... $ECHO_C" >&6
1527 if test "${ac_cv_host+set}" = set; then
1528   echo $ECHO_N "(cached) $ECHO_C" >&6
1529 else
1530   ac_cv_host_alias=$host_alias
1531 test -z "$ac_cv_host_alias" &&
1532   ac_cv_host_alias=$ac_cv_build_alias
1533 ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1534   { { echo "$as_me:1534: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1535 echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1536    { (exit 1); exit 1; }; }
1537
1538 fi
1539 echo "$as_me:1539: result: $ac_cv_host" >&5
1540 echo "${ECHO_T}$ac_cv_host" >&6
1541 host=$ac_cv_host
1542 host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1543 host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1544 host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1545
1546 if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1547         echo "$as_me:1547: checking target system type" >&5
1548 echo $ECHO_N "checking target system type... $ECHO_C" >&6
1549 if test "${ac_cv_target+set}" = set; then
1550   echo $ECHO_N "(cached) $ECHO_C" >&6
1551 else
1552   ac_cv_target_alias=$target_alias
1553 test "x$ac_cv_target_alias" = "x" &&
1554   ac_cv_target_alias=$ac_cv_host_alias
1555 ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1556   { { echo "$as_me:1556: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1557 echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1558    { (exit 1); exit 1; }; }
1559
1560 fi
1561 echo "$as_me:1561: result: $ac_cv_target" >&5
1562 echo "${ECHO_T}$ac_cv_target" >&6
1563 target=$ac_cv_target
1564 target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1565 target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1566 target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1567
1568 # The aliases save the names the user supplied, while $host etc.
1569 # will get canonicalized.
1570 test -n "$target_alias" &&
1571   test "$program_prefix$program_suffix$program_transform_name" = \
1572     NONENONEs,x,x, &&
1573   program_prefix=${target_alias}-
1574         system_name="$host_os"
1575 else
1576         system_name="`(uname -s -r) 2>/dev/null`"
1577         if test -z "$system_name" ; then
1578                 system_name="`(hostname) 2>/dev/null`"
1579         fi
1580 fi
1581 test -n "$system_name" &&
1582 cat >>confdefs.h <<EOF
1583 #define SYSTEM_NAME "$system_name"
1584 EOF
1585
1586 if test "${cf_cv_system_name+set}" = set; then
1587   echo $ECHO_N "(cached) $ECHO_C" >&6
1588 else
1589   cf_cv_system_name="$system_name"
1590 fi
1591
1592 test -z "$system_name" && system_name="$cf_cv_system_name"
1593 test -n "$cf_cv_system_name" && echo "$as_me:1593: result: Configuring for $cf_cv_system_name" >&5
1594 echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1595
1596 if test ".$system_name" != ".$cf_cv_system_name" ; then
1597         echo "$as_me:1597: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1598 echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1599         { { echo "$as_me:1599: error: \"Please remove config.cache and try again.\"" >&5
1600 echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1601    { (exit 1); exit 1; }; }
1602 fi
1603
1604 # Check whether --with-system-type or --without-system-type was given.
1605 if test "${with_system_type+set}" = set; then
1606   withval="$with_system_type"
1607   { echo "$as_me:1607: WARNING: overriding system type to $withval" >&5
1608 echo "$as_me: WARNING: overriding system type to $withval" >&2;}
1609         cf_cv_system_name=$withval
1610         host_os=$withval
1611
1612 fi;
1613
1614 ###     Save the given $CFLAGS to allow user-override.
1615 cf_user_CFLAGS="$CFLAGS"
1616
1617 ###     Default install-location
1618 echo "$as_me:1618: checking for fgrep" >&5
1619 echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
1620 if test "${ac_cv_path_FGREP+set}" = set; then
1621   echo $ECHO_N "(cached) $ECHO_C" >&6
1622 else
1623   if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
1624    then ac_cv_path_FGREP="$GREP -F"
1625    else
1626      for ac_prog in gfgrep fgrep
1627 do
1628   # Extract the first word of "$ac_prog", so it can be a program name with args.
1629 set dummy $ac_prog; ac_word=$2
1630 echo "$as_me:1630: checking for $ac_word" >&5
1631 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1632 if test "${ac_cv_path_FGREP+set}" = set; then
1633   echo $ECHO_N "(cached) $ECHO_C" >&6
1634 else
1635   case $FGREP in
1636   [\\/]* | ?:[\\/]*)
1637   ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
1638   ;;
1639   *)
1640   ac_save_IFS=$IFS; IFS=$ac_path_separator
1641 ac_dummy="$PATH"
1642 for ac_dir in $ac_dummy; do
1643   IFS=$ac_save_IFS
1644   test -z "$ac_dir" && ac_dir=.
1645   if $as_executable_p "$ac_dir/$ac_word"; then
1646    ac_cv_path_FGREP="$ac_dir/$ac_word"
1647    echo "$as_me:1647: found $ac_dir/$ac_word" >&5
1648    break
1649 fi
1650 done
1651
1652   ;;
1653 esac
1654 fi
1655 FGREP=$ac_cv_path_FGREP
1656
1657 if test -n "$FGREP"; then
1658   echo "$as_me:1658: result: $FGREP" >&5
1659 echo "${ECHO_T}$FGREP" >&6
1660 else
1661   echo "$as_me:1661: result: no" >&5
1662 echo "${ECHO_T}no" >&6
1663 fi
1664
1665   test -n "$FGREP" && break
1666 done
1667 test -n "$FGREP" || FGREP=": "
1668
1669      test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:1669: error: cannot find workable fgrep" >&5
1670 echo "$as_me: error: cannot find workable fgrep" >&2;}
1671    { (exit 1); exit 1; }; }
1672    fi
1673 fi
1674 echo "$as_me:1674: result: $ac_cv_path_FGREP" >&5
1675 echo "${ECHO_T}$ac_cv_path_FGREP" >&6
1676  FGREP="$ac_cv_path_FGREP"
1677
1678 echo "$as_me:1678: checking for prefix" >&5
1679 echo $ECHO_N "checking for prefix... $ECHO_C" >&6
1680 if test "x$prefix" = "xNONE" ; then
1681         case "$cf_cv_system_name" in
1682                 # non-vendor systems don't have a conflict
1683         (openbsd*|freebsd*|mirbsd*|linux*|cygwin*|msys*|k*bsd*-gnu|mingw*)
1684                 prefix=/usr
1685                 ;;
1686         (*)     prefix=$ac_default_prefix
1687                 ;;
1688         esac
1689 fi
1690 echo "$as_me:1690: result: $prefix" >&5
1691 echo "${ECHO_T}$prefix" >&6
1692
1693 if test "x$prefix" = "xNONE" ; then
1694 echo "$as_me:1694: checking for default include-directory" >&5
1695 echo $ECHO_N "checking for default include-directory... $ECHO_C" >&6
1696 test -n "$verbose" && echo 1>&6
1697 for cf_symbol in \
1698         "$includedir" \
1699         "$includedir/ncurses" \
1700         "$prefix/include" \
1701         "$prefix/include/ncurses" \
1702         /usr/local/include \
1703         /usr/local/include/ncurses \
1704         /usr/include \
1705         /usr/include/ncurses
1706 do
1707         cf_dir=`eval echo "$cf_symbol"`
1708         if test -f "$cf_dir/curses.h" ; then
1709         if ( ${FGREP-fgrep} NCURSES_VERSION "$cf_dir/curses.h" >/dev/null 2>&1 ) ; then
1710                 includedir="$cf_symbol"
1711                 test -n "$verbose"  && echo $ECHO_N "   found " 1>&6
1712                 break
1713         fi
1714         fi
1715         test -n "$verbose"  && echo "   tested $cf_dir" 1>&6
1716 done
1717 echo "$as_me:1717: result: $includedir" >&5
1718 echo "${ECHO_T}$includedir" >&6
1719 fi
1720
1721 ### Defaults for ncurses ABI
1722
1723 case x$cf_cv_abi_version in
1724 (x[6789])
1725         cf_dft_ext_colors=yes
1726         cf_dft_ext_const=yes
1727         cf_dft_ext_mouse=yes
1728         cf_dft_ext_putwin=yes
1729         cf_dft_ext_spfuncs=yes
1730         cf_dft_filter_syms=yes
1731         cf_dft_chtype=uint32_t
1732         cf_dft_mmask_t=uint32_t
1733         cf_dft_interop=yes
1734         cf_dft_tparm_arg=intptr_t
1735         cf_dft_with_lp64=yes
1736         ;;
1737 (*)
1738         cf_dft_ext_colors=no
1739         cf_dft_ext_const=no
1740         cf_dft_ext_mouse=no
1741         cf_dft_ext_putwin=no
1742         cf_dft_ext_spfuncs=no
1743         cf_dft_filter_syms=no
1744         cf_dft_chtype=auto
1745         cf_dft_mmask_t=auto
1746         cf_dft_interop=no
1747         cf_dft_tparm_arg=long
1748         cf_dft_with_lp64=no
1749         ;;
1750 esac
1751
1752 ###     Checks for programs.
1753
1754 # Check whether --with-ada or --without-ada was given.
1755 if test "${with_ada+set}" = set; then
1756   withval="$with_ada"
1757   cf_with_ada=$withval
1758 else
1759   cf_with_ada=yes
1760 fi;
1761
1762 if test "x$cf_with_ada" = xyes
1763 then
1764         cf_prog_cc="gnatgcc gcc cc"
1765 else
1766         cf_prog_cc="gcc cc"
1767 fi
1768
1769 ac_ext=c
1770 ac_cpp='$CPP $CPPFLAGS'
1771 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1772 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1773 ac_compiler_gnu=$ac_cv_c_compiler_gnu
1774 ac_main_return="return"
1775 if test -n "$ac_tool_prefix"; then
1776   for ac_prog in $cf_prog_cc
1777   do
1778     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1779 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1780 echo "$as_me:1780: checking for $ac_word" >&5
1781 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1782 if test "${ac_cv_prog_CC+set}" = set; then
1783   echo $ECHO_N "(cached) $ECHO_C" >&6
1784 else
1785   if test -n "$CC"; then
1786   ac_cv_prog_CC="$CC" # Let the user override the test.
1787 else
1788   ac_save_IFS=$IFS; IFS=$ac_path_separator
1789 ac_dummy="$PATH"
1790 for ac_dir in $ac_dummy; do
1791   IFS=$ac_save_IFS
1792   test -z "$ac_dir" && ac_dir=.
1793   $as_executable_p "$ac_dir/$ac_word" || continue
1794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1795 echo "$as_me:1795: found $ac_dir/$ac_word" >&5
1796 break
1797 done
1798
1799 fi
1800 fi
1801 CC=$ac_cv_prog_CC
1802 if test -n "$CC"; then
1803   echo "$as_me:1803: result: $CC" >&5
1804 echo "${ECHO_T}$CC" >&6
1805 else
1806   echo "$as_me:1806: result: no" >&5
1807 echo "${ECHO_T}no" >&6
1808 fi
1809
1810     test -n "$CC" && break
1811   done
1812 fi
1813 if test -z "$CC"; then
1814   ac_ct_CC=$CC
1815   for ac_prog in $cf_prog_cc
1816 do
1817   # Extract the first word of "$ac_prog", so it can be a program name with args.
1818 set dummy $ac_prog; ac_word=$2
1819 echo "$as_me:1819: checking for $ac_word" >&5
1820 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1821 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1822   echo $ECHO_N "(cached) $ECHO_C" >&6
1823 else
1824   if test -n "$ac_ct_CC"; then
1825   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1826 else
1827   ac_save_IFS=$IFS; IFS=$ac_path_separator
1828 ac_dummy="$PATH"
1829 for ac_dir in $ac_dummy; do
1830   IFS=$ac_save_IFS
1831   test -z "$ac_dir" && ac_dir=.
1832   $as_executable_p "$ac_dir/$ac_word" || continue
1833 ac_cv_prog_ac_ct_CC="$ac_prog"
1834 echo "$as_me:1834: found $ac_dir/$ac_word" >&5
1835 break
1836 done
1837
1838 fi
1839 fi
1840 ac_ct_CC=$ac_cv_prog_ac_ct_CC
1841 if test -n "$ac_ct_CC"; then
1842   echo "$as_me:1842: result: $ac_ct_CC" >&5
1843 echo "${ECHO_T}$ac_ct_CC" >&6
1844 else
1845   echo "$as_me:1845: result: no" >&5
1846 echo "${ECHO_T}no" >&6
1847 fi
1848
1849   test -n "$ac_ct_CC" && break
1850 done
1851
1852   CC=$ac_ct_CC
1853 fi
1854
1855 test -z "$CC" && { { echo "$as_me:1855: error: no acceptable cc found in \$PATH" >&5
1856 echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1857    { (exit 1); exit 1; }; }
1858
1859 # Provide some information about the compiler.
1860 echo "$as_me:1860:" \
1861      "checking for C compiler version" >&5
1862 ac_compiler=`set X $ac_compile; echo "$2"`
1863 { (eval echo "$as_me:1863: \"$ac_compiler --version </dev/null >&5\"") >&5
1864   (eval $ac_compiler --version </dev/null >&5) 2>&5
1865   ac_status=$?
1866   echo "$as_me:1866: \$? = $ac_status" >&5
1867   (exit "$ac_status"); }
1868 { (eval echo "$as_me:1868: \"$ac_compiler -v </dev/null >&5\"") >&5
1869   (eval $ac_compiler -v </dev/null >&5) 2>&5
1870   ac_status=$?
1871   echo "$as_me:1871: \$? = $ac_status" >&5
1872   (exit "$ac_status"); }
1873 { (eval echo "$as_me:1873: \"$ac_compiler -V </dev/null >&5\"") >&5
1874   (eval $ac_compiler -V </dev/null >&5) 2>&5
1875   ac_status=$?
1876   echo "$as_me:1876: \$? = $ac_status" >&5
1877   (exit "$ac_status"); }
1878
1879 cat >"conftest.$ac_ext" <<_ACEOF
1880 #line 1880 "configure"
1881 #include "confdefs.h"
1882
1883 int
1884 main (void)
1885 {
1886
1887   ;
1888   return 0;
1889 }
1890 _ACEOF
1891 ac_clean_files_save=$ac_clean_files
1892 ac_clean_files="$ac_clean_files a.out a.exe"
1893 # Try to create an executable without -o first, disregard a.out.
1894 # It will help us diagnose broken compilers, and finding out an intuition
1895 # of exeext.
1896 echo "$as_me:1896: checking for C compiler default output" >&5
1897 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1898 ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1899 if { (eval echo "$as_me:1899: \"$ac_link_default\"") >&5
1900   (eval $ac_link_default) 2>&5
1901   ac_status=$?
1902   echo "$as_me:1902: \$? = $ac_status" >&5
1903   (exit "$ac_status"); }; then
1904   # Find the output, starting from the most likely.  This scheme is
1905 # not robust to junk in `.', hence go to wildcards (a.*) only as a last
1906 # resort.
1907 for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1908                 ls a.out conftest 2>/dev/null;
1909                 ls a.* conftest.* 2>/dev/null`; do
1910   case $ac_file in
1911     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1912     a.out ) # We found the default executable, but exeext='' is most
1913             # certainly right.
1914             break;;
1915     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1916           # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1917           export ac_cv_exeext
1918           break;;
1919     * ) break;;
1920   esac
1921 done
1922 else
1923   echo "$as_me: failed program was:" >&5
1924 cat "conftest.$ac_ext" >&5
1925 { { echo "$as_me:1925: error: C compiler cannot create executables" >&5
1926 echo "$as_me: error: C compiler cannot create executables" >&2;}
1927    { (exit 77); exit 77; }; }
1928 fi
1929
1930 ac_exeext=$ac_cv_exeext
1931 echo "$as_me:1931: result: $ac_file" >&5
1932 echo "${ECHO_T}$ac_file" >&6
1933
1934 # Check the compiler produces executables we can run.  If not, either
1935 # the compiler is broken, or we cross compile.
1936 echo "$as_me:1936: checking whether the C compiler works" >&5
1937 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1938 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1939 # If not cross compiling, check that we can run a simple program.
1940 if test "$cross_compiling" != yes; then
1941   if { ac_try='./$ac_file'
1942   { (eval echo "$as_me:1942: \"$ac_try\"") >&5
1943   (eval $ac_try) 2>&5
1944   ac_status=$?
1945   echo "$as_me:1945: \$? = $ac_status" >&5
1946   (exit "$ac_status"); }; }; then
1947     cross_compiling=no
1948   else
1949     if test "$cross_compiling" = maybe; then
1950         cross_compiling=yes
1951     else
1952         { { echo "$as_me:1952: error: cannot run C compiled programs.
1953 If you meant to cross compile, use \`--host'." >&5
1954 echo "$as_me: error: cannot run C compiled programs.
1955 If you meant to cross compile, use \`--host'." >&2;}
1956    { (exit 1); exit 1; }; }
1957     fi
1958   fi
1959 fi
1960 echo "$as_me:1960: result: yes" >&5
1961 echo "${ECHO_T}yes" >&6
1962
1963 rm -f a.out a.exe "conftest$ac_cv_exeext"
1964 ac_clean_files=$ac_clean_files_save
1965 # Check the compiler produces executables we can run.  If not, either
1966 # the compiler is broken, or we cross compile.
1967 echo "$as_me:1967: checking whether we are cross compiling" >&5
1968 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1969 echo "$as_me:1969: result: $cross_compiling" >&5
1970 echo "${ECHO_T}$cross_compiling" >&6
1971
1972 echo "$as_me:1972: checking for executable suffix" >&5
1973 echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1974 if { (eval echo "$as_me:1974: \"$ac_link\"") >&5
1975   (eval $ac_link) 2>&5
1976   ac_status=$?
1977   echo "$as_me:1977: \$? = $ac_status" >&5
1978   (exit "$ac_status"); }; then
1979   # If both `conftest.exe' and `conftest' are `present' (well, observable)
1980 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1981 # work properly (i.e., refer to `conftest.exe'), while it won't with
1982 # `rm'.
1983 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1984   case $ac_file in
1985     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1986     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1987           export ac_cv_exeext
1988           break;;
1989     * ) break;;
1990   esac
1991 done
1992 else
1993   { { echo "$as_me:1993: error: cannot compute EXEEXT: cannot compile and link" >&5
1994 echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1995    { (exit 1); exit 1; }; }
1996 fi
1997
1998 rm -f "conftest$ac_cv_exeext"
1999 echo "$as_me:1999: result: $ac_cv_exeext" >&5
2000 echo "${ECHO_T}$ac_cv_exeext" >&6
2001
2002 rm -f "conftest.$ac_ext"
2003 EXEEXT=$ac_cv_exeext
2004 ac_exeext=$EXEEXT
2005 echo "$as_me:2005: checking for object suffix" >&5
2006 echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
2007 if test "${ac_cv_objext+set}" = set; then
2008   echo $ECHO_N "(cached) $ECHO_C" >&6
2009 else
2010   cat >"conftest.$ac_ext" <<_ACEOF
2011 #line 2011 "configure"
2012 #include "confdefs.h"
2013
2014 int
2015 main (void)
2016 {
2017
2018   ;
2019   return 0;
2020 }
2021 _ACEOF
2022 rm -f conftest.o conftest.obj
2023 if { (eval echo "$as_me:2023: \"$ac_compile\"") >&5
2024   (eval $ac_compile) 2>&5
2025   ac_status=$?
2026   echo "$as_me:2026: \$? = $ac_status" >&5
2027   (exit "$ac_status"); }; then
2028   for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
2029   case $ac_file in
2030     *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
2031     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2032        break;;
2033   esac
2034 done
2035 else
2036   echo "$as_me: failed program was:" >&5
2037 cat "conftest.$ac_ext" >&5
2038 { { echo "$as_me:2038: error: cannot compute OBJEXT: cannot compile" >&5
2039 echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
2040    { (exit 1); exit 1; }; }
2041 fi
2042
2043 rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
2044 fi
2045 echo "$as_me:2045: result: $ac_cv_objext" >&5
2046 echo "${ECHO_T}$ac_cv_objext" >&6
2047 OBJEXT=$ac_cv_objext
2048 ac_objext=$OBJEXT
2049 echo "$as_me:2049: checking whether we are using the GNU C compiler" >&5
2050 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
2051 if test "${ac_cv_c_compiler_gnu+set}" = set; then
2052   echo $ECHO_N "(cached) $ECHO_C" >&6
2053 else
2054   cat >"conftest.$ac_ext" <<_ACEOF
2055 #line 2055 "configure"
2056 #include "confdefs.h"
2057
2058 int
2059 main (void)
2060 {
2061 #ifndef __GNUC__
2062        choke me
2063 #endif
2064
2065   ;
2066   return 0;
2067 }
2068 _ACEOF
2069 rm -f "conftest.$ac_objext"
2070 if { (eval echo "$as_me:2070: \"$ac_compile\"") >&5
2071   (eval $ac_compile) 2>&5
2072   ac_status=$?
2073   echo "$as_me:2073: \$? = $ac_status" >&5
2074   (exit "$ac_status"); } &&
2075          { ac_try='test -s "conftest.$ac_objext"'
2076   { (eval echo "$as_me:2076: \"$ac_try\"") >&5
2077   (eval $ac_try) 2>&5
2078   ac_status=$?
2079   echo "$as_me:2079: \$? = $ac_status" >&5
2080   (exit "$ac_status"); }; }; then
2081   ac_compiler_gnu=yes
2082 else
2083   echo "$as_me: failed program was:" >&5
2084 cat "conftest.$ac_ext" >&5
2085 ac_compiler_gnu=no
2086 fi
2087 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2088 ac_cv_c_compiler_gnu=$ac_compiler_gnu
2089
2090 fi
2091 echo "$as_me:2091: result: $ac_cv_c_compiler_gnu" >&5
2092 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
2093 GCC=`test $ac_compiler_gnu = yes && echo yes`
2094 ac_test_CFLAGS=${CFLAGS+set}
2095 ac_save_CFLAGS=$CFLAGS
2096 CFLAGS="-g"
2097 echo "$as_me:2097: checking whether $CC accepts -g" >&5
2098 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
2099 if test "${ac_cv_prog_cc_g+set}" = set; then
2100   echo $ECHO_N "(cached) $ECHO_C" >&6
2101 else
2102   cat >"conftest.$ac_ext" <<_ACEOF
2103 #line 2103 "configure"
2104 #include "confdefs.h"
2105
2106 int
2107 main (void)
2108 {
2109
2110   ;
2111   return 0;
2112 }
2113 _ACEOF
2114 rm -f "conftest.$ac_objext"
2115 if { (eval echo "$as_me:2115: \"$ac_compile\"") >&5
2116   (eval $ac_compile) 2>&5
2117   ac_status=$?
2118   echo "$as_me:2118: \$? = $ac_status" >&5
2119   (exit "$ac_status"); } &&
2120          { ac_try='test -s "conftest.$ac_objext"'
2121   { (eval echo "$as_me:2121: \"$ac_try\"") >&5
2122   (eval $ac_try) 2>&5
2123   ac_status=$?
2124   echo "$as_me:2124: \$? = $ac_status" >&5
2125   (exit "$ac_status"); }; }; then
2126   ac_cv_prog_cc_g=yes
2127 else
2128   echo "$as_me: failed program was:" >&5
2129 cat "conftest.$ac_ext" >&5
2130 ac_cv_prog_cc_g=no
2131 fi
2132 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2133 fi
2134 echo "$as_me:2134: result: $ac_cv_prog_cc_g" >&5
2135 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
2136 if test "$ac_test_CFLAGS" = set; then
2137   CFLAGS=$ac_save_CFLAGS
2138 elif test $ac_cv_prog_cc_g = yes; then
2139   if test "$GCC" = yes; then
2140     CFLAGS="-g -O2"
2141   else
2142     CFLAGS="-g"
2143   fi
2144 else
2145   if test "$GCC" = yes; then
2146     CFLAGS="-O2"
2147   else
2148     CFLAGS=
2149   fi
2150 fi
2151 # Some people use a C++ compiler to compile C.  Since we use `exit',
2152 # in C++ we need to declare it.  In case someone uses the same compiler
2153 # for both compiling C and C++ we need to have the C++ compiler decide
2154 # the declaration of exit, since it's the most demanding environment.
2155 cat >"conftest.$ac_ext" <<_ACEOF
2156 #ifndef __cplusplus
2157   choke me
2158 #endif
2159 _ACEOF
2160 rm -f "conftest.$ac_objext"
2161 if { (eval echo "$as_me:2161: \"$ac_compile\"") >&5
2162   (eval $ac_compile) 2>&5
2163   ac_status=$?
2164   echo "$as_me:2164: \$? = $ac_status" >&5
2165   (exit "$ac_status"); } &&
2166          { ac_try='test -s "conftest.$ac_objext"'
2167   { (eval echo "$as_me:2167: \"$ac_try\"") >&5
2168   (eval $ac_try) 2>&5
2169   ac_status=$?
2170   echo "$as_me:2170: \$? = $ac_status" >&5
2171   (exit "$ac_status"); }; }; then
2172   for ac_declaration in \
2173    ''\
2174    '#include <stdlib.h>' \
2175    'extern "C" void std::exit (int) throw (); using std::exit;' \
2176    'extern "C" void std::exit (int); using std::exit;' \
2177    'extern "C" void exit (int) throw ();' \
2178    'extern "C" void exit (int);' \
2179    'void exit (int);'
2180 do
2181   cat >"conftest.$ac_ext" <<_ACEOF
2182 #line 2182 "configure"
2183 #include "confdefs.h"
2184 #include <stdlib.h>
2185 $ac_declaration
2186 int
2187 main (void)
2188 {
2189 exit (42);
2190   ;
2191   return 0;
2192 }
2193 _ACEOF
2194 rm -f "conftest.$ac_objext"
2195 if { (eval echo "$as_me:2195: \"$ac_compile\"") >&5
2196   (eval $ac_compile) 2>&5
2197   ac_status=$?
2198   echo "$as_me:2198: \$? = $ac_status" >&5
2199   (exit "$ac_status"); } &&
2200          { ac_try='test -s "conftest.$ac_objext"'
2201   { (eval echo "$as_me:2201: \"$ac_try\"") >&5
2202   (eval $ac_try) 2>&5
2203   ac_status=$?
2204   echo "$as_me:2204: \$? = $ac_status" >&5
2205   (exit "$ac_status"); }; }; then
2206   :
2207 else
2208   echo "$as_me: failed program was:" >&5
2209 cat "conftest.$ac_ext" >&5
2210 continue
2211 fi
2212 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2213   cat >"conftest.$ac_ext" <<_ACEOF
2214 #line 2214 "configure"
2215 #include "confdefs.h"
2216 $ac_declaration
2217 int
2218 main (void)
2219 {
2220 exit (42);
2221   ;
2222   return 0;
2223 }
2224 _ACEOF
2225 rm -f "conftest.$ac_objext"
2226 if { (eval echo "$as_me:2226: \"$ac_compile\"") >&5
2227   (eval $ac_compile) 2>&5
2228   ac_status=$?
2229   echo "$as_me:2229: \$? = $ac_status" >&5
2230   (exit "$ac_status"); } &&
2231          { ac_try='test -s "conftest.$ac_objext"'
2232   { (eval echo "$as_me:2232: \"$ac_try\"") >&5
2233   (eval $ac_try) 2>&5
2234   ac_status=$?
2235   echo "$as_me:2235: \$? = $ac_status" >&5
2236   (exit "$ac_status"); }; }; then
2237   break
2238 else
2239   echo "$as_me: failed program was:" >&5
2240 cat "conftest.$ac_ext" >&5
2241 fi
2242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2243 done
2244 rm -rf conftest*
2245 if test -n "$ac_declaration"; then
2246   echo '#ifdef __cplusplus' >>confdefs.h
2247   echo "$ac_declaration"    >>confdefs.h
2248   echo '#endif'             >>confdefs.h
2249 fi
2250
2251 else
2252   echo "$as_me: failed program was:" >&5
2253 cat "conftest.$ac_ext" >&5
2254 fi
2255 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2256 ac_ext=c
2257 ac_cpp='$CPP $CPPFLAGS'
2258 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2259 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2260 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2261 ac_main_return="return"
2262
2263 GCC_VERSION=none
2264 if test "$GCC" = yes ; then
2265         echo "$as_me:2265: checking version of $CC" >&5
2266 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2267         GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2268         test -z "$GCC_VERSION" && GCC_VERSION=unknown
2269         echo "$as_me:2269: result: $GCC_VERSION" >&5
2270 echo "${ECHO_T}$GCC_VERSION" >&6
2271 fi
2272
2273 INTEL_COMPILER=no
2274
2275 if test "$GCC" = yes ; then
2276         case "$host_os" in
2277         (linux*|gnu*)
2278                 echo "$as_me:2278: checking if this is really Intel C compiler" >&5
2279 echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2280                 cf_save_CFLAGS="$CFLAGS"
2281                 CFLAGS="$CFLAGS -no-gcc"
2282                 cat >"conftest.$ac_ext" <<_ACEOF
2283 #line 2283 "configure"
2284 #include "confdefs.h"
2285
2286 int
2287 main (void)
2288 {
2289
2290 #ifdef __INTEL_COMPILER
2291 #else
2292 make an error
2293 #endif
2294
2295   ;
2296   return 0;
2297 }
2298 _ACEOF
2299 rm -f "conftest.$ac_objext"
2300 if { (eval echo "$as_me:2300: \"$ac_compile\"") >&5
2301   (eval $ac_compile) 2>&5
2302   ac_status=$?
2303   echo "$as_me:2303: \$? = $ac_status" >&5
2304   (exit "$ac_status"); } &&
2305          { ac_try='test -s "conftest.$ac_objext"'
2306   { (eval echo "$as_me:2306: \"$ac_try\"") >&5
2307   (eval $ac_try) 2>&5
2308   ac_status=$?
2309   echo "$as_me:2309: \$? = $ac_status" >&5
2310   (exit "$ac_status"); }; }; then
2311   INTEL_COMPILER=yes
2312 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2313
2314 else
2315   echo "$as_me: failed program was:" >&5
2316 cat "conftest.$ac_ext" >&5
2317 fi
2318 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2319                 CFLAGS="$cf_save_CFLAGS"
2320                 echo "$as_me:2320: result: $INTEL_COMPILER" >&5
2321 echo "${ECHO_T}$INTEL_COMPILER" >&6
2322                 ;;
2323         esac
2324 fi
2325
2326 CLANG_COMPILER=no
2327
2328 if test "$GCC" = yes ; then
2329         echo "$as_me:2329: checking if this is really Clang C compiler" >&5
2330 echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2331         cf_save_CFLAGS="$CFLAGS"
2332         cat >"conftest.$ac_ext" <<_ACEOF
2333 #line 2333 "configure"
2334 #include "confdefs.h"
2335
2336 int
2337 main (void)
2338 {
2339
2340 #ifdef __clang__
2341 #else
2342 make an error
2343 #endif
2344
2345   ;
2346   return 0;
2347 }
2348 _ACEOF
2349 rm -f "conftest.$ac_objext"
2350 if { (eval echo "$as_me:2350: \"$ac_compile\"") >&5
2351   (eval $ac_compile) 2>&5
2352   ac_status=$?
2353   echo "$as_me:2353: \$? = $ac_status" >&5
2354   (exit "$ac_status"); } &&
2355          { ac_try='test -s "conftest.$ac_objext"'
2356   { (eval echo "$as_me:2356: \"$ac_try\"") >&5
2357   (eval $ac_try) 2>&5
2358   ac_status=$?
2359   echo "$as_me:2359: \$? = $ac_status" >&5
2360   (exit "$ac_status"); }; }; then
2361   CLANG_COMPILER=yes
2362
2363 else
2364   echo "$as_me: failed program was:" >&5
2365 cat "conftest.$ac_ext" >&5
2366 fi
2367 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2368         CFLAGS="$cf_save_CFLAGS"
2369         echo "$as_me:2369: result: $CLANG_COMPILER" >&5
2370 echo "${ECHO_T}$CLANG_COMPILER" >&6
2371 fi
2372
2373 CLANG_VERSION=none
2374
2375 if test "x$CLANG_COMPILER" = "xyes" ; then
2376         case "$CC" in
2377         (c[1-9][0-9]|*/c[1-9][0-9])
2378                 { echo "$as_me:2378: WARNING: replacing broken compiler alias $CC" >&5
2379 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2380                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2381                 CC=clang
2382                 ;;
2383         esac
2384
2385         echo "$as_me:2385: checking version of $CC" >&5
2386 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2387         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.].*//'`"
2388         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2389         echo "$as_me:2389: result: $CLANG_VERSION" >&5
2390 echo "${ECHO_T}$CLANG_VERSION" >&6
2391
2392         for cf_clang_opt in \
2393                 -Qunused-arguments \
2394                 -Wno-error=implicit-function-declaration
2395         do
2396                 echo "$as_me:2396: checking if option $cf_clang_opt works" >&5
2397 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2398                 cf_save_CFLAGS="$CFLAGS"
2399                 CFLAGS="$CFLAGS $cf_clang_opt"
2400                 cat >"conftest.$ac_ext" <<_ACEOF
2401 #line 2401 "configure"
2402 #include "confdefs.h"
2403
2404                         #include <stdio.h>
2405 int
2406 main (void)
2407 {
2408
2409                         printf("hello!\\n");
2410   ;
2411   return 0;
2412 }
2413 _ACEOF
2414 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2415 if { (eval echo "$as_me:2415: \"$ac_link\"") >&5
2416   (eval $ac_link) 2>&5
2417   ac_status=$?
2418   echo "$as_me:2418: \$? = $ac_status" >&5
2419   (exit "$ac_status"); } &&
2420          { ac_try='test -s "conftest$ac_exeext"'
2421   { (eval echo "$as_me:2421: \"$ac_try\"") >&5
2422   (eval $ac_try) 2>&5
2423   ac_status=$?
2424   echo "$as_me:2424: \$? = $ac_status" >&5
2425   (exit "$ac_status"); }; }; then
2426
2427                         cf_clang_optok=yes
2428 else
2429   echo "$as_me: failed program was:" >&5
2430 cat "conftest.$ac_ext" >&5
2431
2432                         cf_clang_optok=no
2433 fi
2434 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2435                 echo "$as_me:2435: result: $cf_clang_optok" >&5
2436 echo "${ECHO_T}$cf_clang_optok" >&6
2437                 CFLAGS="$cf_save_CFLAGS"
2438                 if test "$cf_clang_optok" = yes; then
2439                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
2440
2441 echo "${as_me:-configure}:2441: testing adding option $cf_clang_opt ..." 1>&5
2442
2443         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2444         CFLAGS="${CFLAGS}$cf_clang_opt"
2445
2446                 fi
2447         done
2448 fi
2449
2450 echo "$as_me:2450: checking for $CC option to accept ANSI C" >&5
2451 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2452 if test "${ac_cv_prog_cc_stdc+set}" = set; then
2453   echo $ECHO_N "(cached) $ECHO_C" >&6
2454 else
2455   ac_cv_prog_cc_stdc=no
2456 ac_save_CC=$CC
2457 cat >"conftest.$ac_ext" <<_ACEOF
2458 #line 2458 "configure"
2459 #include "confdefs.h"
2460 #include <stdarg.h>
2461 #include <stdio.h>
2462 #include <sys/types.h>
2463 #include <sys/stat.h>
2464 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2465 struct buf { int x; };
2466 FILE * (*rcsopen) (struct buf *, struct stat *, int);
2467 static char *e (p, i)
2468      char **p;
2469      int i;
2470 {
2471   return p[i];
2472 }
2473 static char *f (char * (*g) (char **, int), char **p, ...)
2474 {
2475   char *s;
2476   va_list v;
2477   va_start (v,p);
2478   s = g (p, va_arg (v,int));
2479   va_end (v);
2480   return s;
2481 }
2482 int test (int i, double x);
2483 struct s1 {int (*f) (int a);};
2484 struct s2 {int (*f) (double a);};
2485 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2486 int argc;
2487 char **argv;
2488 int
2489 main (void)
2490 {
2491 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2492   ;
2493   return 0;
2494 }
2495 _ACEOF
2496 # Don't try gcc -ansi; that turns off useful extensions and
2497 # breaks some systems' header files.
2498 # AIX                   -qlanglvl=ansi
2499 # Ultrix and OSF/1      -std1
2500 # HP-UX 10.20 and later -Ae
2501 # HP-UX older versions  -Aa -D_HPUX_SOURCE
2502 # SVR4                  -Xc -D__EXTENSIONS__
2503 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2504 do
2505   CC="$ac_save_CC $ac_arg"
2506   rm -f "conftest.$ac_objext"
2507 if { (eval echo "$as_me:2507: \"$ac_compile\"") >&5
2508   (eval $ac_compile) 2>&5
2509   ac_status=$?
2510   echo "$as_me:2510: \$? = $ac_status" >&5
2511   (exit "$ac_status"); } &&
2512          { ac_try='test -s "conftest.$ac_objext"'
2513   { (eval echo "$as_me:2513: \"$ac_try\"") >&5
2514   (eval $ac_try) 2>&5
2515   ac_status=$?
2516   echo "$as_me:2516: \$? = $ac_status" >&5
2517   (exit "$ac_status"); }; }; then
2518   ac_cv_prog_cc_stdc=$ac_arg
2519 break
2520 else
2521   echo "$as_me: failed program was:" >&5
2522 cat "conftest.$ac_ext" >&5
2523 fi
2524 rm -f "conftest.$ac_objext"
2525 done
2526 rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2527 CC=$ac_save_CC
2528
2529 fi
2530
2531 case "x$ac_cv_prog_cc_stdc" in
2532   x|xno)
2533     echo "$as_me:2533: result: none needed" >&5
2534 echo "${ECHO_T}none needed" >&6 ;;
2535   *)
2536     echo "$as_me:2536: result: $ac_cv_prog_cc_stdc" >&5
2537 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2538     CC="$CC $ac_cv_prog_cc_stdc" ;;
2539 esac
2540
2541 # This should have been defined by AC_PROG_CC
2542 : "${CC:=cc}"
2543
2544 echo "$as_me:2544: checking \$CFLAGS variable" >&5
2545 echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2546 case "x$CFLAGS" in
2547 (*-[IUD]*)
2548         echo "$as_me:2548: result: broken" >&5
2549 echo "${ECHO_T}broken" >&6
2550         { echo "$as_me:2550: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2551 echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2552         cf_flags="$CFLAGS"
2553         CFLAGS=
2554         for cf_arg in $cf_flags
2555         do
2556
2557 cf_fix_cppflags=no
2558 cf_new_cflags=
2559 cf_new_cppflags=
2560 cf_new_extra_cppflags=
2561
2562 for cf_add_cflags in $cf_arg
2563 do
2564 case "$cf_fix_cppflags" in
2565 (no)
2566         case "$cf_add_cflags" in
2567         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2568                 case "$cf_add_cflags" in
2569                 (-D*)
2570                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2571
2572                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2573                                 && test -z "${cf_tst_cflags}" \
2574                                 && cf_fix_cppflags=yes
2575
2576                         if test "$cf_fix_cppflags" = yes ; then
2577
2578         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2579         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2580
2581                                 continue
2582                         elif test "${cf_tst_cflags}" = "\"'" ; then
2583
2584         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2585         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2586
2587                                 continue
2588                         fi
2589                         ;;
2590                 esac
2591                 case "$CPPFLAGS" in
2592                 (*$cf_add_cflags)
2593                         ;;
2594                 (*)
2595                         case "$cf_add_cflags" in
2596                         (-D*)
2597                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2598
2599 CPPFLAGS=`echo "$CPPFLAGS" | \
2600         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2601                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2602
2603                                 ;;
2604                         esac
2605
2606         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2607         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2608
2609                         ;;
2610                 esac
2611                 ;;
2612         (*)
2613
2614         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2615         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2616
2617                 ;;
2618         esac
2619         ;;
2620 (yes)
2621
2622         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2623         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2624
2625         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2626
2627         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2628                 && test -z "${cf_tst_cflags}" \
2629                 && cf_fix_cppflags=no
2630         ;;
2631 esac
2632 done
2633
2634 if test -n "$cf_new_cflags" ; then
2635
2636         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2637         CFLAGS="${CFLAGS}$cf_new_cflags"
2638
2639 fi
2640
2641 if test -n "$cf_new_cppflags" ; then
2642
2643         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2644         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2645
2646 fi
2647
2648 if test -n "$cf_new_extra_cppflags" ; then
2649
2650         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2651         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2652
2653 fi
2654
2655         done
2656         ;;
2657 (*)
2658         echo "$as_me:2658: result: ok" >&5
2659 echo "${ECHO_T}ok" >&6
2660         ;;
2661 esac
2662
2663 echo "$as_me:2663: checking \$CC variable" >&5
2664 echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2665 case "$CC" in
2666 (*[\ \  ]-*)
2667         echo "$as_me:2667: result: broken" >&5
2668 echo "${ECHO_T}broken" >&6
2669         { echo "$as_me:2669: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2670 echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2671         # humor him...
2672         cf_prog=`echo "$CC" | sed -e 's/        / /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2673         cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2674         CC="$cf_prog"
2675         for cf_arg in $cf_flags
2676         do
2677                 case "x$cf_arg" in
2678                 (x-[IUDfgOW]*)
2679
2680 cf_fix_cppflags=no
2681 cf_new_cflags=
2682 cf_new_cppflags=
2683 cf_new_extra_cppflags=
2684
2685 for cf_add_cflags in $cf_arg
2686 do
2687 case "$cf_fix_cppflags" in
2688 (no)
2689         case "$cf_add_cflags" in
2690         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2691                 case "$cf_add_cflags" in
2692                 (-D*)
2693                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2694
2695                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2696                                 && test -z "${cf_tst_cflags}" \
2697                                 && cf_fix_cppflags=yes
2698
2699                         if test "$cf_fix_cppflags" = yes ; then
2700
2701         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2702         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2703
2704                                 continue
2705                         elif test "${cf_tst_cflags}" = "\"'" ; then
2706
2707         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2708         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2709
2710                                 continue
2711                         fi
2712                         ;;
2713                 esac
2714                 case "$CPPFLAGS" in
2715                 (*$cf_add_cflags)
2716                         ;;
2717                 (*)
2718                         case "$cf_add_cflags" in
2719                         (-D*)
2720                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2721
2722 CPPFLAGS=`echo "$CPPFLAGS" | \
2723         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
2724                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
2725
2726                                 ;;
2727                         esac
2728
2729         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2730         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2731
2732                         ;;
2733                 esac
2734                 ;;
2735         (*)
2736
2737         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2738         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2739
2740                 ;;
2741         esac
2742         ;;
2743 (yes)
2744
2745         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2746         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2747
2748         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2749
2750         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2751                 && test -z "${cf_tst_cflags}" \
2752                 && cf_fix_cppflags=no
2753         ;;
2754 esac
2755 done
2756
2757 if test -n "$cf_new_cflags" ; then
2758
2759         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2760         CFLAGS="${CFLAGS}$cf_new_cflags"
2761
2762 fi
2763
2764 if test -n "$cf_new_cppflags" ; then
2765
2766         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2767         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2768
2769 fi
2770
2771 if test -n "$cf_new_extra_cppflags" ; then
2772
2773         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2774         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2775
2776 fi
2777
2778                         ;;
2779                 (*)
2780                         CC="$CC $cf_arg"
2781                         ;;
2782                 esac
2783         done
2784         test -n "$verbose" && echo "    resulting CC: '$CC'" 1>&6
2785
2786 echo "${as_me:-configure}:2786: testing resulting CC: '$CC' ..." 1>&5
2787
2788         test -n "$verbose" && echo "    resulting CFLAGS: '$CFLAGS'" 1>&6
2789
2790 echo "${as_me:-configure}:2790: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2791
2792         test -n "$verbose" && echo "    resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2793
2794 echo "${as_me:-configure}:2794: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2795
2796         ;;
2797 (*)
2798         echo "$as_me:2798: result: ok" >&5
2799 echo "${ECHO_T}ok" >&6
2800         ;;
2801 esac
2802
2803 ac_ext=c
2804 ac_cpp='$CPP $CPPFLAGS'
2805 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2806 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2807 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2808 ac_main_return="return"
2809 echo "$as_me:2809: checking how to run the C preprocessor" >&5
2810 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2811 # On Suns, sometimes $CPP names a directory.
2812 if test -n "$CPP" && test -d "$CPP"; then
2813   CPP=
2814 fi
2815 if test -z "$CPP"; then
2816   if test "${ac_cv_prog_CPP+set}" = set; then
2817   echo $ECHO_N "(cached) $ECHO_C" >&6
2818 else
2819       # Double quotes because CPP needs to be expanded
2820     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2821     do
2822       ac_preproc_ok=false
2823 for ac_c_preproc_warn_flag in '' yes
2824 do
2825   # Use a header file that comes with gcc, so configuring glibc
2826   # with a fresh cross-compiler works.
2827   # On the NeXT, cc -E runs the code through the compiler's parser,
2828   # not just through cpp. "Syntax error" is here to catch this case.
2829   cat >"conftest.$ac_ext" <<_ACEOF
2830 #line 2830 "configure"
2831 #include "confdefs.h"
2832 #include <assert.h>
2833                      Syntax error
2834 _ACEOF
2835 if { (eval echo "$as_me:2835: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2836   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2837   ac_status=$?
2838   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2839   rm -f conftest.er1
2840   cat conftest.err >&5
2841   echo "$as_me:2841: \$? = $ac_status" >&5
2842   (exit "$ac_status"); } >/dev/null; then
2843   if test -s conftest.err; then
2844     ac_cpp_err=$ac_c_preproc_warn_flag
2845   else
2846     ac_cpp_err=
2847   fi
2848 else
2849   ac_cpp_err=yes
2850 fi
2851 if test -z "$ac_cpp_err"; then
2852   :
2853 else
2854   echo "$as_me: failed program was:" >&5
2855   cat "conftest.$ac_ext" >&5
2856   # Broken: fails on valid input.
2857 continue
2858 fi
2859 rm -f conftest.err "conftest.$ac_ext"
2860
2861   # OK, works on sane cases.  Now check whether non-existent headers
2862   # can be detected and how.
2863   cat >"conftest.$ac_ext" <<_ACEOF
2864 #line 2864 "configure"
2865 #include "confdefs.h"
2866 #include <ac_nonexistent.h>
2867 _ACEOF
2868 if { (eval echo "$as_me:2868: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2869   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2870   ac_status=$?
2871   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2872   rm -f conftest.er1
2873   cat conftest.err >&5
2874   echo "$as_me:2874: \$? = $ac_status" >&5
2875   (exit "$ac_status"); } >/dev/null; then
2876   if test -s conftest.err; then
2877     ac_cpp_err=$ac_c_preproc_warn_flag
2878   else
2879     ac_cpp_err=
2880   fi
2881 else
2882   ac_cpp_err=yes
2883 fi
2884 if test -z "$ac_cpp_err"; then
2885   # Broken: success on invalid input.
2886 continue
2887 else
2888   echo "$as_me: failed program was:" >&5
2889   cat "conftest.$ac_ext" >&5
2890   # Passes both tests.
2891 ac_preproc_ok=:
2892 break
2893 fi
2894 rm -f conftest.err "conftest.$ac_ext"
2895
2896 done
2897 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2898 rm -f conftest.err "conftest.$ac_ext"
2899 if $ac_preproc_ok; then
2900   break
2901 fi
2902
2903     done
2904     ac_cv_prog_CPP=$CPP
2905
2906 fi
2907   CPP=$ac_cv_prog_CPP
2908 else
2909   ac_cv_prog_CPP=$CPP
2910 fi
2911 echo "$as_me:2911: result: $CPP" >&5
2912 echo "${ECHO_T}$CPP" >&6
2913 ac_preproc_ok=false
2914 for ac_c_preproc_warn_flag in '' yes
2915 do
2916   # Use a header file that comes with gcc, so configuring glibc
2917   # with a fresh cross-compiler works.
2918   # On the NeXT, cc -E runs the code through the compiler's parser,
2919   # not just through cpp. "Syntax error" is here to catch this case.
2920   cat >"conftest.$ac_ext" <<_ACEOF
2921 #line 2921 "configure"
2922 #include "confdefs.h"
2923 #include <assert.h>
2924                      Syntax error
2925 _ACEOF
2926 if { (eval echo "$as_me:2926: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2927   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2928   ac_status=$?
2929   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2930   rm -f conftest.er1
2931   cat conftest.err >&5
2932   echo "$as_me:2932: \$? = $ac_status" >&5
2933   (exit "$ac_status"); } >/dev/null; then
2934   if test -s conftest.err; then
2935     ac_cpp_err=$ac_c_preproc_warn_flag
2936   else
2937     ac_cpp_err=
2938   fi
2939 else
2940   ac_cpp_err=yes
2941 fi
2942 if test -z "$ac_cpp_err"; then
2943   :
2944 else
2945   echo "$as_me: failed program was:" >&5
2946   cat "conftest.$ac_ext" >&5
2947   # Broken: fails on valid input.
2948 continue
2949 fi
2950 rm -f conftest.err "conftest.$ac_ext"
2951
2952   # OK, works on sane cases.  Now check whether non-existent headers
2953   # can be detected and how.
2954   cat >"conftest.$ac_ext" <<_ACEOF
2955 #line 2955 "configure"
2956 #include "confdefs.h"
2957 #include <ac_nonexistent.h>
2958 _ACEOF
2959 if { (eval echo "$as_me:2959: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2960   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2961   ac_status=$?
2962   $EGREP -v '^ *\+' conftest.er1 >conftest.err
2963   rm -f conftest.er1
2964   cat conftest.err >&5
2965   echo "$as_me:2965: \$? = $ac_status" >&5
2966   (exit "$ac_status"); } >/dev/null; then
2967   if test -s conftest.err; then
2968     ac_cpp_err=$ac_c_preproc_warn_flag
2969   else
2970     ac_cpp_err=
2971   fi
2972 else
2973   ac_cpp_err=yes
2974 fi
2975 if test -z "$ac_cpp_err"; then
2976   # Broken: success on invalid input.
2977 continue
2978 else
2979   echo "$as_me: failed program was:" >&5
2980   cat "conftest.$ac_ext" >&5
2981   # Passes both tests.
2982 ac_preproc_ok=:
2983 break
2984 fi
2985 rm -f conftest.err "conftest.$ac_ext"
2986
2987 done
2988 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2989 rm -f conftest.err "conftest.$ac_ext"
2990 if $ac_preproc_ok; then
2991   :
2992 else
2993   { { echo "$as_me:2993: error: C preprocessor \"$CPP\" fails sanity check" >&5
2994 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2995    { (exit 1); exit 1; }; }
2996 fi
2997
2998 ac_ext=c
2999 ac_cpp='$CPP $CPPFLAGS'
3000 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3001 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3002 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3003 ac_main_return="return"
3004
3005 if test $ac_cv_c_compiler_gnu = yes; then
3006     echo "$as_me:3006: checking whether $CC needs -traditional" >&5
3007 echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
3008 if test "${ac_cv_prog_gcc_traditional+set}" = set; then
3009   echo $ECHO_N "(cached) $ECHO_C" >&6
3010 else
3011     ac_pattern="Autoconf.*'x'"
3012   cat >"conftest.$ac_ext" <<_ACEOF
3013 #line 3013 "configure"
3014 #include "confdefs.h"
3015 #include <sgtty.h>
3016 int Autoconf = TIOCGETP;
3017 _ACEOF
3018 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3019   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3020   ac_cv_prog_gcc_traditional=yes
3021 else
3022   ac_cv_prog_gcc_traditional=no
3023 fi
3024 rm -rf conftest*
3025
3026   if test $ac_cv_prog_gcc_traditional = no; then
3027     cat >"conftest.$ac_ext" <<_ACEOF
3028 #line 3028 "configure"
3029 #include "confdefs.h"
3030 #include <termio.h>
3031 int Autoconf = TCGETA;
3032 _ACEOF
3033 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3034   $EGREP "$ac_pattern" >/dev/null 2>&1; then
3035   ac_cv_prog_gcc_traditional=yes
3036 fi
3037 rm -rf conftest*
3038
3039   fi
3040 fi
3041 echo "$as_me:3041: result: $ac_cv_prog_gcc_traditional" >&5
3042 echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
3043   if test $ac_cv_prog_gcc_traditional = yes; then
3044     CC="$CC -traditional"
3045   fi
3046 fi
3047
3048 echo "$as_me:3048: checking whether $CC understands -c and -o together" >&5
3049 echo $ECHO_N "checking whether $CC understands -c and -o together... $ECHO_C" >&6
3050 if test "${cf_cv_prog_CC_c_o+set}" = set; then
3051   echo $ECHO_N "(cached) $ECHO_C" >&6
3052 else
3053
3054 cat > conftest.$ac_ext <<CF_EOF
3055 int main(void)
3056 {
3057         ${cf_cv_main_return:-return}(0);
3058 }
3059 CF_EOF
3060 # We do the test twice because some compilers refuse to overwrite an
3061 # existing .o file with -o, though they will create one.
3062 ac_try='$CC $CFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
3063 if { (eval echo "$as_me:3063: \"$ac_try\"") >&5
3064   (eval $ac_try) 2>&5
3065   ac_status=$?
3066   echo "$as_me:3066: \$? = $ac_status" >&5
3067   (exit "$ac_status"); } &&
3068   test -f conftest2.$ac_objext && { (eval echo "$as_me:3068: \"$ac_try\"") >&5
3069   (eval $ac_try) 2>&5
3070   ac_status=$?
3071   echo "$as_me:3071: \$? = $ac_status" >&5
3072   (exit "$ac_status"); };
3073 then
3074   eval cf_cv_prog_CC_c_o=yes
3075 else
3076   eval cf_cv_prog_CC_c_o=no
3077 fi
3078 rm -rf ./conftest*
3079
3080 fi
3081 if test "$cf_cv_prog_CC_c_o" = yes; then
3082   echo "$as_me:3082: result: yes" >&5
3083 echo "${ECHO_T}yes" >&6
3084 else
3085   echo "$as_me:3085: result: no" >&5
3086 echo "${ECHO_T}no" >&6
3087 fi
3088
3089 if test "$cross_compiling" = yes ; then
3090         LDCONFIG=:
3091 else
3092         case "$cf_cv_system_name" in
3093         (dragonfly*|mirbsd*|freebsd*)
3094                 test -z "$LDCONFIG" && LDCONFIG="/sbin/ldconfig -R"
3095                 ;;
3096         (*) LDPATH=$PATH:/sbin:/usr/sbin
3097                 # Extract the first word of "ldconfig", so it can be a program name with args.
3098 set dummy ldconfig; ac_word=$2
3099 echo "$as_me:3099: checking for $ac_word" >&5
3100 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3101 if test "${ac_cv_path_LDCONFIG+set}" = set; then
3102   echo $ECHO_N "(cached) $ECHO_C" >&6
3103 else
3104   case $LDCONFIG in
3105   [\\/]* | ?:[\\/]*)
3106   ac_cv_path_LDCONFIG="$LDCONFIG" # Let the user override the test with a path.
3107   ;;
3108   *)
3109   ac_save_IFS=$IFS; IFS=$ac_path_separator
3110 ac_dummy="$LDPATH"
3111 for ac_dir in $ac_dummy; do
3112   IFS=$ac_save_IFS
3113   test -z "$ac_dir" && ac_dir=.
3114   if $as_executable_p "$ac_dir/$ac_word"; then
3115    ac_cv_path_LDCONFIG="$ac_dir/$ac_word"
3116    echo "$as_me:3116: found $ac_dir/$ac_word" >&5
3117    break
3118 fi
3119 done
3120
3121   ;;
3122 esac
3123 fi
3124 LDCONFIG=$ac_cv_path_LDCONFIG
3125
3126 if test -n "$LDCONFIG"; then
3127   echo "$as_me:3127: result: $LDCONFIG" >&5
3128 echo "${ECHO_T}$LDCONFIG" >&6
3129 else
3130   echo "$as_me:3130: result: no" >&5
3131 echo "${ECHO_T}no" >&6
3132 fi
3133
3134                 ;;
3135         esac
3136 fi
3137
3138 echo "$as_me:3138: checking if you want to ensure bool is consistent with C++" >&5
3139 echo $ECHO_N "checking if you want to ensure bool is consistent with C++... $ECHO_C" >&6
3140
3141 # Check whether --with-cxx or --without-cxx was given.
3142 if test "${with_cxx+set}" = set; then
3143   withval="$with_cxx"
3144   cf_with_cxx=$withval
3145 else
3146   cf_with_cxx=yes
3147 fi;
3148 echo "$as_me:3148: result: $cf_with_cxx" >&5
3149 echo "${ECHO_T}$cf_with_cxx" >&6
3150 if test "X$cf_with_cxx" = Xno ; then
3151         CXX=""
3152         GXX=""
3153 else
3154         # with autoconf 2.13, we can change the error to a warning:
3155                 ac_ext=cc
3156 ac_cpp='$CXXCPP $CPPFLAGS'
3157 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3158 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3159 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3160 ac_main_return="return"
3161 if test -n "$ac_tool_prefix"; then
3162   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3163   do
3164     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3165 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3166 echo "$as_me:3166: checking for $ac_word" >&5
3167 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3168 if test "${ac_cv_prog_CXX+set}" = set; then
3169   echo $ECHO_N "(cached) $ECHO_C" >&6
3170 else
3171   if test -n "$CXX"; then
3172   ac_cv_prog_CXX="$CXX" # Let the user override the test.
3173 else
3174   ac_save_IFS=$IFS; IFS=$ac_path_separator
3175 ac_dummy="$PATH"
3176 for ac_dir in $ac_dummy; do
3177   IFS=$ac_save_IFS
3178   test -z "$ac_dir" && ac_dir=.
3179   $as_executable_p "$ac_dir/$ac_word" || continue
3180 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3181 echo "$as_me:3181: found $ac_dir/$ac_word" >&5
3182 break
3183 done
3184
3185 fi
3186 fi
3187 CXX=$ac_cv_prog_CXX
3188 if test -n "$CXX"; then
3189   echo "$as_me:3189: result: $CXX" >&5
3190 echo "${ECHO_T}$CXX" >&6
3191 else
3192   echo "$as_me:3192: result: no" >&5
3193 echo "${ECHO_T}no" >&6
3194 fi
3195
3196     test -n "$CXX" && break
3197   done
3198 fi
3199 if test -z "$CXX"; then
3200   ac_ct_CXX=$CXX
3201   for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
3202 do
3203   # Extract the first word of "$ac_prog", so it can be a program name with args.
3204 set dummy $ac_prog; ac_word=$2
3205 echo "$as_me:3205: checking for $ac_word" >&5
3206 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3207 if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
3208   echo $ECHO_N "(cached) $ECHO_C" >&6
3209 else
3210   if test -n "$ac_ct_CXX"; then
3211   ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3212 else
3213   ac_save_IFS=$IFS; IFS=$ac_path_separator
3214 ac_dummy="$PATH"
3215 for ac_dir in $ac_dummy; do
3216   IFS=$ac_save_IFS
3217   test -z "$ac_dir" && ac_dir=.
3218   $as_executable_p "$ac_dir/$ac_word" || continue
3219 ac_cv_prog_ac_ct_CXX="$ac_prog"
3220 echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221 break
3222 done
3223
3224 fi
3225 fi
3226 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3227 if test -n "$ac_ct_CXX"; then
3228   echo "$as_me:3228: result: $ac_ct_CXX" >&5
3229 echo "${ECHO_T}$ac_ct_CXX" >&6
3230 else
3231   echo "$as_me:3231: result: no" >&5
3232 echo "${ECHO_T}no" >&6
3233 fi
3234
3235   test -n "$ac_ct_CXX" && break
3236 done
3237 test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
3238
3239   CXX=$ac_ct_CXX
3240 fi
3241
3242 # Provide some information about the compiler.
3243 echo "$as_me:3243:" \
3244      "checking for C++ compiler version" >&5
3245 ac_compiler=`set X $ac_compile; echo $2`
3246 { (eval echo "$as_me:3246: \"$ac_compiler --version </dev/null >&5\"") >&5
3247   (eval $ac_compiler --version </dev/null >&5) 2>&5
3248   ac_status=$?
3249   echo "$as_me:3249: \$? = $ac_status" >&5
3250   (exit "$ac_status"); }
3251 { (eval echo "$as_me:3251: \"$ac_compiler -v </dev/null >&5\"") >&5
3252   (eval $ac_compiler -v </dev/null >&5) 2>&5
3253   ac_status=$?
3254   echo "$as_me:3254: \$? = $ac_status" >&5
3255   (exit "$ac_status"); }
3256 { (eval echo "$as_me:3256: \"$ac_compiler -V </dev/null >&5\"") >&5
3257   (eval $ac_compiler -V </dev/null >&5) 2>&5
3258   ac_status=$?
3259   echo "$as_me:3259: \$? = $ac_status" >&5
3260   (exit "$ac_status"); }
3261
3262 echo "$as_me:3262: checking whether we are using the GNU C++ compiler" >&5
3263 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
3264 if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
3265   echo $ECHO_N "(cached) $ECHO_C" >&6
3266 else
3267   cat >"conftest.$ac_ext" <<_ACEOF
3268 #line 3268 "configure"
3269 #include "confdefs.h"
3270
3271 int
3272 main (void)
3273 {
3274 #ifndef __GNUC__
3275        choke me
3276 #endif
3277
3278   ;
3279   return 0;
3280 }
3281 _ACEOF
3282 rm -f "conftest.$ac_objext"
3283 if { (eval echo "$as_me:3283: \"$ac_compile\"") >&5
3284   (eval $ac_compile) 2>&5
3285   ac_status=$?
3286   echo "$as_me:3286: \$? = $ac_status" >&5
3287   (exit "$ac_status"); } &&
3288          { ac_try='test -s "conftest.$ac_objext"'
3289   { (eval echo "$as_me:3289: \"$ac_try\"") >&5
3290   (eval $ac_try) 2>&5
3291   ac_status=$?
3292   echo "$as_me:3292: \$? = $ac_status" >&5
3293   (exit "$ac_status"); }; }; then
3294   ac_compiler_gnu=yes
3295 else
3296   echo "$as_me: failed program was:" >&5
3297 cat "conftest.$ac_ext" >&5
3298 ac_compiler_gnu=no
3299 fi
3300 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3301 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3302
3303 fi
3304 echo "$as_me:3304: result: $ac_cv_cxx_compiler_gnu" >&5
3305 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
3306 GXX=`test $ac_compiler_gnu = yes && echo yes`
3307 ac_test_CXXFLAGS=${CXXFLAGS+set}
3308 ac_save_CXXFLAGS=$CXXFLAGS
3309 CXXFLAGS="-g"
3310 echo "$as_me:3310: checking whether $CXX accepts -g" >&5
3311 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
3312 if test "${ac_cv_prog_cxx_g+set}" = set; then
3313   echo $ECHO_N "(cached) $ECHO_C" >&6
3314 else
3315   cat >"conftest.$ac_ext" <<_ACEOF
3316 #line 3316 "configure"
3317 #include "confdefs.h"
3318
3319 int
3320 main (void)
3321 {
3322
3323   ;
3324   return 0;
3325 }
3326 _ACEOF
3327 rm -f "conftest.$ac_objext"
3328 if { (eval echo "$as_me:3328: \"$ac_compile\"") >&5
3329   (eval $ac_compile) 2>&5
3330   ac_status=$?
3331   echo "$as_me:3331: \$? = $ac_status" >&5
3332   (exit "$ac_status"); } &&
3333          { ac_try='test -s "conftest.$ac_objext"'
3334   { (eval echo "$as_me:3334: \"$ac_try\"") >&5
3335   (eval $ac_try) 2>&5
3336   ac_status=$?
3337   echo "$as_me:3337: \$? = $ac_status" >&5
3338   (exit "$ac_status"); }; }; then
3339   ac_cv_prog_cxx_g=yes
3340 else
3341   echo "$as_me: failed program was:" >&5
3342 cat "conftest.$ac_ext" >&5
3343 ac_cv_prog_cxx_g=no
3344 fi
3345 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3346 fi
3347 echo "$as_me:3347: result: $ac_cv_prog_cxx_g" >&5
3348 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
3349 if test "$ac_test_CXXFLAGS" = set; then
3350   CXXFLAGS=$ac_save_CXXFLAGS
3351 elif test $ac_cv_prog_cxx_g = yes; then
3352   if test "$GXX" = yes; then
3353     CXXFLAGS="-g -O2"
3354   else
3355     CXXFLAGS="-g"
3356   fi
3357 else
3358   if test "$GXX" = yes; then
3359     CXXFLAGS="-O2"
3360   else
3361     CXXFLAGS=
3362   fi
3363 fi
3364 for ac_declaration in \
3365    ''\
3366    '#include <stdlib.h>' \
3367    'extern "C" void std::exit (int) throw (); using std::exit;' \
3368    'extern "C" void std::exit (int); using std::exit;' \
3369    'extern "C" void exit (int) throw ();' \
3370    'extern "C" void exit (int);' \
3371    'void exit (int);'
3372 do
3373   cat >"conftest.$ac_ext" <<_ACEOF
3374 #line 3374 "configure"
3375 #include "confdefs.h"
3376 #include <stdlib.h>
3377 $ac_declaration
3378 int
3379 main (void)
3380 {
3381 exit (42);
3382   ;
3383   return 0;
3384 }
3385 _ACEOF
3386 rm -f "conftest.$ac_objext"
3387 if { (eval echo "$as_me:3387: \"$ac_compile\"") >&5
3388   (eval $ac_compile) 2>&5
3389   ac_status=$?
3390   echo "$as_me:3390: \$? = $ac_status" >&5
3391   (exit "$ac_status"); } &&
3392          { ac_try='test -s "conftest.$ac_objext"'
3393   { (eval echo "$as_me:3393: \"$ac_try\"") >&5
3394   (eval $ac_try) 2>&5
3395   ac_status=$?
3396   echo "$as_me:3396: \$? = $ac_status" >&5
3397   (exit "$ac_status"); }; }; then
3398   :
3399 else
3400   echo "$as_me: failed program was:" >&5
3401 cat "conftest.$ac_ext" >&5
3402 continue
3403 fi
3404 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3405   cat >"conftest.$ac_ext" <<_ACEOF
3406 #line 3406 "configure"
3407 #include "confdefs.h"
3408 $ac_declaration
3409 int
3410 main (void)
3411 {
3412 exit (42);
3413   ;
3414   return 0;
3415 }
3416 _ACEOF
3417 rm -f "conftest.$ac_objext"
3418 if { (eval echo "$as_me:3418: \"$ac_compile\"") >&5
3419   (eval $ac_compile) 2>&5
3420   ac_status=$?
3421   echo "$as_me:3421: \$? = $ac_status" >&5
3422   (exit "$ac_status"); } &&
3423          { ac_try='test -s "conftest.$ac_objext"'
3424   { (eval echo "$as_me:3424: \"$ac_try\"") >&5
3425   (eval $ac_try) 2>&5
3426   ac_status=$?
3427   echo "$as_me:3427: \$? = $ac_status" >&5
3428   (exit "$ac_status"); }; }; then
3429   break
3430 else
3431   echo "$as_me: failed program was:" >&5
3432 cat "conftest.$ac_ext" >&5
3433 fi
3434 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3435 done
3436 rm -rf conftest*
3437 if test -n "$ac_declaration"; then
3438   echo '#ifdef __cplusplus' >>confdefs.h
3439   echo "$ac_declaration"    >>confdefs.h
3440   echo '#endif'             >>confdefs.h
3441 fi
3442
3443 ac_ext=c
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3446 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3447 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3448 ac_main_return="return"
3449
3450         ac_ext=cc
3451 ac_cpp='$CXXCPP $CPPFLAGS'
3452 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3453 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3454 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3455 ac_main_return="return"
3456
3457         if test "x$cf_with_cxx" != xno
3458         then
3459                 # Several of the C++ configurations do not work, particularly when
3460                 # cross-compiling (20140913 -TD)
3461                 echo "$as_me:3461: checking if $CXX works" >&5
3462 echo $ECHO_N "checking if $CXX works... $ECHO_C" >&6
3463
3464                 save_CPPFLAGS="$CPPFLAGS"
3465                 eval cf_includedir=${includedir}
3466                 CPPFLAGS="$CPPFLAGS -I${cf_includedir}"
3467
3468 cat >"conftest.$ac_ext" <<_ACEOF
3469 #line 3469 "configure"
3470 #include "confdefs.h"
3471
3472 #include <stdlib.h>
3473 #include <stdio.h>
3474
3475 int
3476 main (void)
3477 {
3478
3479                 printf("Hello world!\n")
3480
3481   ;
3482   return 0;
3483 }
3484 _ACEOF
3485 rm -f "conftest.$ac_objext"
3486 if { (eval echo "$as_me:3486: \"$ac_compile\"") >&5
3487   (eval $ac_compile) 2>&5
3488   ac_status=$?
3489   echo "$as_me:3489: \$? = $ac_status" >&5
3490   (exit "$ac_status"); } &&
3491          { ac_try='test -s "conftest.$ac_objext"'
3492   { (eval echo "$as_me:3492: \"$ac_try\"") >&5
3493   (eval $ac_try) 2>&5
3494   ac_status=$?
3495   echo "$as_me:3495: \$? = $ac_status" >&5
3496   (exit "$ac_status"); }; }; then
3497   cf_cxx_works=yes
3498 else
3499   echo "$as_me: failed program was:" >&5
3500 cat "conftest.$ac_ext" >&5
3501 cf_cxx_works=no
3502 fi
3503 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3504                 CPPFLAGS="$save_CPPFLAGS"
3505
3506                 echo "$as_me:3506: result: $cf_cxx_works" >&5
3507 echo "${ECHO_T}$cf_cxx_works" >&6
3508                 if test "x$cf_cxx_works" = xno
3509                 then
3510                         { echo "$as_me:3510: WARNING: Ignore $CXX, since it cannot compile hello-world." >&5
3511 echo "$as_me: WARNING: Ignore $CXX, since it cannot compile hello-world." >&2;}
3512                         cf_with_cxx=no; CXX=""; GXX="";
3513                 fi
3514         fi
3515         ac_ext=c
3516 ac_cpp='$CPP $CPPFLAGS'
3517 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
3518 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
3519 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3520 ac_main_return="return"
3521
3522         # autoconf 2.5x removed the error (hardcoding it to g++, or just blank)
3523         if test "$CXX" = "g++" ; then
3524                 # Extract the first word of "g++", so it can be a program name with args.
3525 set dummy g++; ac_word=$2
3526 echo "$as_me:3526: checking for $ac_word" >&5
3527 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3528 if test "${ac_cv_path_CXX+set}" = set; then
3529   echo $ECHO_N "(cached) $ECHO_C" >&6
3530 else
3531   case $CXX in
3532   [\\/]* | ?:[\\/]*)
3533   ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3534   ;;
3535   *)
3536   ac_save_IFS=$IFS; IFS=$ac_path_separator
3537 ac_dummy="$PATH"
3538 for ac_dir in $ac_dummy; do
3539   IFS=$ac_save_IFS
3540   test -z "$ac_dir" && ac_dir=.
3541   if $as_executable_p "$ac_dir/$ac_word"; then
3542    ac_cv_path_CXX="$ac_dir/$ac_word"
3543    echo "$as_me:3543: found $ac_dir/$ac_word" >&5
3544    break
3545 fi
3546 done
3547
3548   ;;
3549 esac
3550 fi
3551 CXX=$ac_cv_path_CXX
3552
3553 if test -n "$CXX"; then
3554   echo "$as_me:3554: result: $CXX" >&5
3555 echo "${ECHO_T}$CXX" >&6
3556 else
3557   echo "$as_me:3557: result: no" >&5
3558 echo "${ECHO_T}no" >&6
3559 fi
3560
3561         fi
3562         case "x$CXX" in
3563         (x|xg++)
3564                 { echo "$as_me:3564: WARNING: You don't have any C++ compiler, too bad" >&5
3565 echo "$as_me: WARNING: You don't have any C++ compiler, too bad" >&2;}
3566                 cf_with_cxx=no; CXX=""; GXX="";
3567                 ;;
3568         esac
3569 fi
3570
3571 GXX_VERSION=none
3572 if test "$GXX" = yes; then
3573         echo "$as_me:3573: checking version of ${CXX:-g++}" >&5
3574 echo $ECHO_N "checking version of ${CXX:-g++}... $ECHO_C" >&6
3575         GXX_VERSION="`${CXX:-g++} --version| sed -e '2,$d' -e 's/^.*(GCC) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
3576         if test -z "$GXX_VERSION"
3577         then
3578                 GXX_VERSION=unknown
3579                 GXX=no
3580         fi
3581         echo "$as_me:3581: result: $GXX_VERSION" >&5
3582 echo "${ECHO_T}$GXX_VERSION" >&6
3583 fi
3584
3585 case "$GXX_VERSION" in
3586 ([1-9][0-9].*)
3587         ;;
3588 (1.*|2.[0-6]*)
3589         { echo "$as_me:3589: WARNING: templates do not work" >&5
3590 echo "$as_me: WARNING: templates do not work" >&2;}
3591         ;;
3592 esac
3593
3594 echo "$as_me:3594: checking if you want to build C++ binding and demo" >&5
3595 echo $ECHO_N "checking if you want to build C++ binding and demo... $ECHO_C" >&6
3596
3597 # Check whether --with-cxx-binding or --without-cxx-binding was given.
3598 if test "${with_cxx_binding+set}" = set; then
3599   withval="$with_cxx_binding"
3600   cf_with_cxx_binding=$withval
3601 else
3602   cf_with_cxx_binding=$cf_with_cxx
3603 fi;
3604 echo "$as_me:3604: result: $cf_with_cxx_binding" >&5
3605 echo "${ECHO_T}$cf_with_cxx_binding" >&6
3606
3607 echo "$as_me:3607: checking if you want to build with Ada" >&5
3608 echo $ECHO_N "checking if you want to build with Ada... $ECHO_C" >&6
3609 echo "$as_me:3609: result: $cf_with_ada" >&5
3610 echo "${ECHO_T}$cf_with_ada" >&6
3611
3612 echo "$as_me:3612: checking if you want to install terminal database" >&5
3613 echo $ECHO_N "checking if you want to install terminal database... $ECHO_C" >&6
3614
3615 # Check whether --enable-db-install or --disable-db-install was given.
3616 if test "${enable_db_install+set}" = set; then
3617   enableval="$enable_db_install"
3618   cf_with_db_install=$enableval
3619 else
3620   cf_with_db_install=yes
3621 fi;
3622 echo "$as_me:3622: result: $cf_with_db_install" >&5
3623 echo "${ECHO_T}$cf_with_db_install" >&6
3624
3625 echo "$as_me:3625: checking if you want to install manpages" >&5
3626 echo $ECHO_N "checking if you want to install manpages... $ECHO_C" >&6
3627
3628 # Check whether --with-manpages or --without-manpages was given.
3629 if test "${with_manpages+set}" = set; then
3630   withval="$with_manpages"
3631   cf_with_manpages=$withval
3632 else
3633   cf_with_manpages=yes
3634 fi;
3635 echo "$as_me:3635: result: $cf_with_manpages" >&5
3636 echo "${ECHO_T}$cf_with_manpages" >&6
3637
3638 echo "$as_me:3638: checking if you want to build programs such as tic" >&5
3639 echo $ECHO_N "checking if you want to build programs such as tic... $ECHO_C" >&6
3640
3641 # Check whether --with-progs or --without-progs was given.
3642 if test "${with_progs+set}" = set; then
3643   withval="$with_progs"
3644   cf_with_progs=$withval
3645 else
3646   cf_with_progs=yes
3647 fi;
3648 echo "$as_me:3648: result: $cf_with_progs" >&5
3649 echo "${ECHO_T}$cf_with_progs" >&6
3650
3651 if test -f "$srcdir/tack/tack.h" ; then
3652         if test "x$cross_compiling" = xyes ; then
3653                 test -n "$verbose" && echo "    ignoring tack because we are cross-compiling" 1>&6
3654
3655 echo "${as_me:-configure}:3655: testing ignoring tack because we are cross-compiling ..." 1>&5
3656
3657                 cf_with_tack=no
3658         else
3659                 echo "$as_me:3659: checking if you want to build the tack program" >&5
3660 echo $ECHO_N "checking if you want to build the tack program... $ECHO_C" >&6
3661
3662 # Check whether --with-tack or --without-tack was given.
3663 if test "${with_tack+set}" = set; then
3664   withval="$with_tack"
3665   cf_with_tack=$withval
3666 else
3667   cf_with_tack=$cf_with_progs
3668 fi;
3669                 echo "$as_me:3669: result: $cf_with_tack" >&5
3670 echo "${ECHO_T}$cf_with_tack" >&6
3671         fi
3672 else
3673         cf_with_tack=no
3674 fi
3675
3676 echo "$as_me:3676: checking if you want to build test-programs" >&5
3677 echo $ECHO_N "checking if you want to build test-programs... $ECHO_C" >&6
3678
3679 # Check whether --with-tests or --without-tests was given.
3680 if test "${with_tests+set}" = set; then
3681   withval="$with_tests"
3682   cf_with_tests=$withval
3683 else
3684   cf_with_tests=yes
3685 fi;
3686 echo "$as_me:3686: result: $cf_with_tests" >&5
3687 echo "${ECHO_T}$cf_with_tests" >&6
3688
3689 echo "$as_me:3689: checking if you wish to install curses.h" >&5
3690 echo $ECHO_N "checking if you wish to install curses.h... $ECHO_C" >&6
3691
3692 # Check whether --with-curses-h or --without-curses-h was given.
3693 if test "${with_curses_h+set}" = set; then
3694   withval="$with_curses_h"
3695   with_curses_h=$withval
3696 else
3697   with_curses_h=yes
3698 fi;
3699 echo "$as_me:3699: result: $with_curses_h" >&5
3700 echo "${ECHO_T}$with_curses_h" >&6
3701
3702 modules_to_build="ncurses"
3703 test "X$cf_with_progs" != Xno && modules_to_build="$modules_to_build progs"
3704 test "X$cf_with_tack"  != Xno && modules_to_build="$modules_to_build tack"
3705 modules_to_build="$modules_to_build panel menu form"
3706
3707 test "$program_prefix" != NONE &&
3708   program_transform_name="s,^,$program_prefix,;$program_transform_name"
3709 # Use a double $ so make ignores it.
3710 test "$program_suffix" != NONE &&
3711   program_transform_name="s,\$,$program_suffix,;$program_transform_name"
3712 # Double any \ or $.  echo might interpret backslashes.
3713 # By default was `s,x,x', remove it if useless.
3714 cat <<\_ACEOF >conftest.sed
3715 s/[\\$]/&&/g;s/;s,x,x,$//
3716 _ACEOF
3717 program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
3718 rm conftest.sed
3719
3720 for ac_prog in mawk gawk nawk awk
3721 do
3722   # Extract the first word of "$ac_prog", so it can be a program name with args.
3723 set dummy $ac_prog; ac_word=$2
3724 echo "$as_me:3724: checking for $ac_word" >&5
3725 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3726 if test "${ac_cv_prog_AWK+set}" = set; then
3727   echo $ECHO_N "(cached) $ECHO_C" >&6
3728 else
3729   if test -n "$AWK"; then
3730   ac_cv_prog_AWK="$AWK" # Let the user override the test.
3731 else
3732   ac_save_IFS=$IFS; IFS=$ac_path_separator
3733 ac_dummy="$PATH"
3734 for ac_dir in $ac_dummy; do
3735   IFS=$ac_save_IFS
3736   test -z "$ac_dir" && ac_dir=.
3737   $as_executable_p "$ac_dir/$ac_word" || continue
3738 ac_cv_prog_AWK="$ac_prog"
3739 echo "$as_me:3739: found $ac_dir/$ac_word" >&5
3740 break
3741 done
3742
3743 fi
3744 fi
3745 AWK=$ac_cv_prog_AWK
3746 if test -n "$AWK"; then
3747   echo "$as_me:3747: result: $AWK" >&5
3748 echo "${ECHO_T}$AWK" >&6
3749 else
3750   echo "$as_me:3750: result: no" >&5
3751 echo "${ECHO_T}no" >&6
3752 fi
3753
3754   test -n "$AWK" && break
3755 done
3756
3757 test -z "$AWK" && { { echo "$as_me:3757: error: No awk program found" >&5
3758 echo "$as_me: error: No awk program found" >&2;}
3759    { (exit 1); exit 1; }; }
3760
3761 # Find a good install program.  We prefer a C program (faster),
3762 # so one script is as good as another.  But avoid the broken or
3763 # incompatible versions:
3764 # SysV /etc/install, /usr/sbin/install
3765 # SunOS /usr/etc/install
3766 # IRIX /sbin/install
3767 # AIX /bin/install
3768 # AmigaOS /C/install, which installs bootblocks on floppy discs
3769 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3770 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3771 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3772 # ./install, which can be erroneously created by make from ./install.sh.
3773 echo "$as_me:3773: checking for a BSD compatible install" >&5
3774 echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
3775 if test -z "$INSTALL"; then
3776 if test "${ac_cv_path_install+set}" = set; then
3777   echo $ECHO_N "(cached) $ECHO_C" >&6
3778 else
3779     ac_save_IFS=$IFS; IFS=$ac_path_separator
3780   for ac_dir in $PATH; do
3781     IFS=$ac_save_IFS
3782     # Account for people who put trailing slashes in PATH elements.
3783     case $ac_dir/ in
3784     / | ./ | .// | /cC/* \
3785     | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3786     | /usr/ucb/* ) ;;
3787     *)
3788       # OSF1 and SCO ODT 3.0 have their own names for install.
3789       # Don't use installbsd from OSF since it installs stuff as root
3790       # by default.
3791       for ac_prog in ginstall scoinst install; do
3792         if $as_executable_p "$ac_dir/$ac_prog"; then
3793           if test $ac_prog = install &&
3794             grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3795             # AIX install.  It has an incompatible calling convention.
3796             :
3797           elif test $ac_prog = install &&
3798             grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3799             # program-specific install script used by HP pwplus--don't use.
3800             :
3801           else
3802             ac_cv_path_install="$ac_dir/$ac_prog -c"
3803             break 2
3804           fi
3805         fi
3806       done
3807       ;;
3808     esac
3809   done
3810
3811 fi
3812   if test "${ac_cv_path_install+set}" = set; then
3813     INSTALL=$ac_cv_path_install
3814   else
3815     # As a last resort, use the slow shell script.  We don't cache a
3816     # path for INSTALL within a source directory, because that will
3817     # break other packages using the cache if that directory is
3818     # removed, or if the path is relative.
3819     INSTALL=$ac_install_sh
3820   fi
3821 fi
3822 echo "$as_me:3822: result: $INSTALL" >&5
3823 echo "${ECHO_T}$INSTALL" >&6
3824
3825 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3826 # It thinks the first close brace ends the variable substitution.
3827 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3828
3829 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3830
3831 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3832
3833 case $INSTALL in
3834 (/*)
3835         ;;
3836 (*)
3837         cf_dir=`echo "$INSTALL" | sed -e 's%/[^/]*$%%'`
3838         test -z "$cf_dir" && cf_dir=.
3839         INSTALL="`cd \"$cf_dir\" && pwd`"/"`echo "$INSTALL" | sed -e 's%^.*/%%'`"
3840         ;;
3841 esac
3842
3843 for ac_prog in lint cppcheck splint
3844 do
3845   # Extract the first word of "$ac_prog", so it can be a program name with args.
3846 set dummy $ac_prog; ac_word=$2
3847 echo "$as_me:3847: checking for $ac_word" >&5
3848 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849 if test "${ac_cv_prog_LINT+set}" = set; then
3850   echo $ECHO_N "(cached) $ECHO_C" >&6
3851 else
3852   if test -n "$LINT"; then
3853   ac_cv_prog_LINT="$LINT" # Let the user override the test.
3854 else
3855   ac_save_IFS=$IFS; IFS=$ac_path_separator
3856 ac_dummy="$PATH"
3857 for ac_dir in $ac_dummy; do
3858   IFS=$ac_save_IFS
3859   test -z "$ac_dir" && ac_dir=.
3860   $as_executable_p "$ac_dir/$ac_word" || continue
3861 ac_cv_prog_LINT="$ac_prog"
3862 echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863 break
3864 done
3865
3866 fi
3867 fi
3868 LINT=$ac_cv_prog_LINT
3869 if test -n "$LINT"; then
3870   echo "$as_me:3870: result: $LINT" >&5
3871 echo "${ECHO_T}$LINT" >&6
3872 else
3873   echo "$as_me:3873: result: no" >&5
3874 echo "${ECHO_T}no" >&6
3875 fi
3876
3877   test -n "$LINT" && break
3878 done
3879
3880 case "x$LINT" in
3881 (xcppcheck|x*/cppcheck)
3882         test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3883         ;;
3884 esac
3885
3886 echo "$as_me:3886: checking whether ln -s works" >&5
3887 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
3888 LN_S=$as_ln_s
3889 if test "$LN_S" = "ln -s"; then
3890   echo "$as_me:3890: result: yes" >&5
3891 echo "${ECHO_T}yes" >&6
3892 else
3893   echo "$as_me:3893: result: no, using $LN_S" >&5
3894 echo "${ECHO_T}no, using $LN_S" >&6
3895 fi
3896
3897 echo "$as_me:3897: checking if $LN_S -f options work" >&5
3898 echo $ECHO_N "checking if $LN_S -f options work... $ECHO_C" >&6
3899
3900 rm -f conf$$.src conf$$dst
3901 echo >conf$$.dst
3902 echo first >conf$$.src
3903 if $LN_S -f conf$$.src conf$$.dst 2>/dev/null; then
3904         cf_prog_ln_sf=yes
3905 else
3906         cf_prog_ln_sf=no
3907 fi
3908 rm -f conf$$.dst conf$$src
3909 echo "$as_me:3909: result: $cf_prog_ln_sf" >&5
3910 echo "${ECHO_T}$cf_prog_ln_sf" >&6
3911
3912 test "$cf_prog_ln_sf" = yes && LN_S="$LN_S -f"
3913
3914 echo "$as_me:3914: checking for long file names" >&5
3915 echo $ECHO_N "checking for long file names... $ECHO_C" >&6
3916 if test "${ac_cv_sys_long_file_names+set}" = set; then
3917   echo $ECHO_N "(cached) $ECHO_C" >&6
3918 else
3919   ac_cv_sys_long_file_names=yes
3920 # Test for long file names in all the places we know might matter:
3921 #      .                the current directory, where building will happen
3922 #      $prefix/lib      where we will be installing things
3923 #      $exec_prefix/lib likewise
3924 # eval it to expand exec_prefix.
3925 #      $TMPDIR          if set, where it might want to write temporary files
3926 # if $TMPDIR is not set:
3927 #      /tmp             where it might want to write temporary files
3928 #      /var/tmp         likewise
3929 #      /usr/tmp         likewise
3930 if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
3931   ac_tmpdirs=$TMPDIR
3932 else
3933   ac_tmpdirs='/tmp /var/tmp /usr/tmp'
3934 fi
3935 for ac_dir in  . $ac_tmpdirs `eval echo "$prefix/lib" "$exec_prefix/lib"` ; do
3936   test -d "$ac_dir" || continue
3937   test -w "$ac_dir" || continue # It is less confusing to not echo anything here.
3938   ac_xdir=$ac_dir/cf$$
3939   (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
3940   ac_tf1=$ac_xdir/conftest9012345
3941   ac_tf2=$ac_xdir/conftest9012346
3942   (echo 1 >"$ac_tf1") 2>/dev/null
3943   (echo 2 >"$ac_tf2") 2>/dev/null
3944   ac_val=`cat "$ac_tf1" 2>/dev/null`
3945   if test ! -f "$ac_tf1" || test "$ac_val" != 1; then
3946     ac_cv_sys_long_file_names=no
3947     rm -rf "$ac_xdir" 2>/dev/null
3948     break
3949   fi
3950   rm -rf "$ac_xdir" 2>/dev/null
3951 done
3952 fi
3953 echo "$as_me:3953: result: $ac_cv_sys_long_file_names" >&5
3954 echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
3955 if test "$ac_cv_sys_long_file_names" = yes; then
3956
3957 cat >>confdefs.h <<\EOF
3958 #define HAVE_LONG_FILE_NAMES 1
3959 EOF
3960
3961 fi
3962
3963 # Provide for renaming "ncurses5-config" to "ncurses5X-config", etc., in case
3964 # of package conflict.
3965 cf_config_suffix=
3966
3967 # Check whether --with-config-suffix or --without-config-suffix was given.
3968 if test "${with_config_suffix+set}" = set; then
3969   withval="$with_config_suffix"
3970   case "x$withval" in
3971         (xyes|xno)
3972                 { echo "$as_me:3972: WARNING: expected a value for config-suffix option" >&5
3973 echo "$as_me: WARNING: expected a value for config-suffix option" >&2;}
3974                 ;;
3975         (*)     cf_config_suffix="$withval"
3976                 ;;
3977         esac
3978 fi;
3979
3980 # If we find pkg-config, check if we should install the ".pc" files.
3981
3982 echo "$as_me:3982: checking if you want to use pkg-config" >&5
3983 echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
3984
3985 # Check whether --with-pkg-config or --without-pkg-config was given.
3986 if test "${with_pkg_config+set}" = set; then
3987   withval="$with_pkg_config"
3988   cf_pkg_config=$withval
3989 else
3990   cf_pkg_config=yes
3991 fi;
3992 echo "$as_me:3992: result: $cf_pkg_config" >&5
3993 echo "${ECHO_T}$cf_pkg_config" >&6
3994
3995 case "$cf_pkg_config" in
3996 (no)
3997         PKG_CONFIG=none
3998         ;;
3999 (yes)
4000
4001 if test -n "$ac_tool_prefix"; then
4002   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
4003 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
4004 echo "$as_me:4004: checking for $ac_word" >&5
4005 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4006 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
4007   echo $ECHO_N "(cached) $ECHO_C" >&6
4008 else
4009   case $PKG_CONFIG in
4010   [\\/]* | ?:[\\/]*)
4011   ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
4012   ;;
4013   *)
4014   ac_save_IFS=$IFS; IFS=$ac_path_separator
4015 ac_dummy="$PATH"
4016 for ac_dir in $ac_dummy; do
4017   IFS=$ac_save_IFS
4018   test -z "$ac_dir" && ac_dir=.
4019   if $as_executable_p "$ac_dir/$ac_word"; then
4020    ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
4021    echo "$as_me:4021: found $ac_dir/$ac_word" >&5
4022    break
4023 fi
4024 done
4025
4026   ;;
4027 esac
4028 fi
4029 PKG_CONFIG=$ac_cv_path_PKG_CONFIG
4030
4031 if test -n "$PKG_CONFIG"; then
4032   echo "$as_me:4032: result: $PKG_CONFIG" >&5
4033 echo "${ECHO_T}$PKG_CONFIG" >&6
4034 else
4035   echo "$as_me:4035: result: no" >&5
4036 echo "${ECHO_T}no" >&6
4037 fi
4038
4039 fi
4040 if test -z "$ac_cv_path_PKG_CONFIG"; then
4041   ac_pt_PKG_CONFIG=$PKG_CONFIG
4042   # Extract the first word of "pkg-config", so it can be a program name with args.
4043 set dummy pkg-config; ac_word=$2
4044 echo "$as_me:4044: checking for $ac_word" >&5
4045 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4046 if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
4047   echo $ECHO_N "(cached) $ECHO_C" >&6
4048 else
4049   case $ac_pt_PKG_CONFIG in
4050   [\\/]* | ?:[\\/]*)
4051   ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
4052   ;;
4053   *)
4054   ac_save_IFS=$IFS; IFS=$ac_path_separator
4055 ac_dummy="$PATH"
4056 for ac_dir in $ac_dummy; do
4057   IFS=$ac_save_IFS
4058   test -z "$ac_dir" && ac_dir=.
4059   if $as_executable_p "$ac_dir/$ac_word"; then
4060    ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
4061    echo "$as_me:4061: found $ac_dir/$ac_word" >&5
4062    break
4063 fi
4064 done
4065
4066   test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
4067   ;;
4068 esac
4069 fi
4070 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
4071
4072 if test -n "$ac_pt_PKG_CONFIG"; then
4073   echo "$as_me:4073: result: $ac_pt_PKG_CONFIG" >&5
4074 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
4075 else
4076   echo "$as_me:4076: result: no" >&5
4077 echo "${ECHO_T}no" >&6
4078 fi
4079
4080   PKG_CONFIG=$ac_pt_PKG_CONFIG
4081 else
4082   PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
4083 fi
4084
4085         ;;
4086 (*)
4087         PKG_CONFIG=$withval
4088         ;;
4089 esac
4090
4091 test -z "$PKG_CONFIG" && PKG_CONFIG=none
4092 if test "$PKG_CONFIG" != none ; then
4093
4094 if test "x$prefix" != xNONE; then
4095         cf_path_syntax="$prefix"
4096 else
4097         cf_path_syntax="$ac_default_prefix"
4098 fi
4099
4100 case ".$PKG_CONFIG" in
4101 (.\$\(*\)*|.\'*\'*)
4102         ;;
4103 (..|./*|.\\*)
4104         ;;
4105 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4106         ;;
4107 (.\$\{*prefix\}*|.\$\{*dir\}*)
4108         eval PKG_CONFIG="$PKG_CONFIG"
4109         case ".$PKG_CONFIG" in
4110         (.NONE/*)
4111                 PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4112                 ;;
4113         esac
4114         ;;
4115 (.no|.NONE/*)
4116         PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
4117         ;;
4118 (*)
4119         { { echo "$as_me:4119: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
4120 echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
4121    { (exit 1); exit 1; }; }
4122         ;;
4123 esac
4124
4125 elif test "x$cf_pkg_config" != xno ; then
4126         { echo "$as_me:4126: WARNING: pkg-config is not installed" >&5
4127 echo "$as_me: WARNING: pkg-config is not installed" >&2;}
4128 fi
4129
4130 case "$PKG_CONFIG" in
4131 (no|none|yes)
4132         echo "$as_me:4132: checking for pkg-config library directory" >&5
4133 echo $ECHO_N "checking for pkg-config library directory... $ECHO_C" >&6
4134         ;;
4135 (*)
4136         echo "$as_me:4136: checking for $PKG_CONFIG library directory" >&5
4137 echo $ECHO_N "checking for $PKG_CONFIG library directory... $ECHO_C" >&6
4138         ;;
4139 esac
4140
4141 # if $PKG_CONFIG_LIBDIR is set, try to use that
4142 cf_search_path=`echo "$PKG_CONFIG_LIBDIR" | sed -e 's/:/ /g' -e 's,^[   ]*,,'`
4143
4144 # if the option is used, let that override.  otherwise default to "libdir"
4145
4146 # Check whether --with-pkg-config-libdir or --without-pkg-config-libdir was given.
4147 if test "${with_pkg_config_libdir+set}" = set; then
4148   withval="$with_pkg_config_libdir"
4149   cf_search_path=$withval
4150 else
4151   test "x$PKG_CONFIG" != xnone && test -z "$cf_search_path" && cf_search_path=libdir
4152 fi;
4153
4154 case x$cf_search_path in
4155 (xlibdir)
4156         PKG_CONFIG_LIBDIR='${libdir}/pkgconfig'
4157         echo "$as_me:4157: result: $PKG_CONFIG_LIBDIR" >&5
4158 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4159         cf_search_path=
4160         ;;
4161 (x)
4162         ;;
4163 (x/*)
4164         PKG_CONFIG_LIBDIR="$cf_search_path"
4165         echo "$as_me:4165: result: $PKG_CONFIG_LIBDIR" >&5
4166 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4167         cf_search_path=
4168         ;;
4169 (xyes|xauto)
4170         echo "$as_me:4170: result: auto" >&5
4171 echo "${ECHO_T}auto" >&6
4172         cf_search_path=
4173         # Look for the library directory using the same prefix as the executable
4174         echo "$as_me:4174: checking for search-list" >&5
4175 echo $ECHO_N "checking for search-list... $ECHO_C" >&6
4176         if test "x$PKG_CONFIG" != xnone
4177         then
4178                 # works for pkg-config since version 0.24 (2009)
4179                 # works for pkgconf since version 0.8.3 (2012)
4180                 for cf_pkg_program in \
4181                         `echo "$PKG_CONFIG" | sed -e 's,^.*/,,'` \
4182                         pkg-config \
4183                         pkgconf
4184                 do
4185                         cf_search_path=`"$PKG_CONFIG" --variable=pc_path "$cf_pkg_program" 2>/dev/null | tr : ' '`
4186                         test -n "$cf_search_path" && break
4187                 done
4188
4189                 # works for pkg-config since import in 2005 of original 2001 HP code.
4190                 test -z "$cf_search_path" && \
4191                 cf_search_path=`
4192                 "$PKG_CONFIG" --debug --exists no-such-package 2>&1 | $AWK "\
4193 /^Scanning directory (#[1-9][0-9]* )?'.*'$/{ \
4194         sub(\"^[^']*'\",\"\"); \
4195         sub(\"'.*\",\"\"); \
4196         printf \" %s\", \\$0; } \
4197 { next; } \
4198 "`
4199         fi
4200
4201         echo "$as_me:4201: result: $cf_search_path" >&5
4202 echo "${ECHO_T}$cf_search_path" >&6
4203         ;;
4204 (*)
4205         { { echo "$as_me:4205: error: Unexpected option value: $cf_search_path" >&5
4206 echo "$as_me: error: Unexpected option value: $cf_search_path" >&2;}
4207    { (exit 1); exit 1; }; }
4208         ;;
4209 esac
4210
4211 if test -n "$cf_search_path"
4212 then
4213         echo "$as_me:4213: checking for first directory" >&5
4214 echo $ECHO_N "checking for first directory... $ECHO_C" >&6
4215         cf_pkg_config_path=none
4216         for cf_config in $cf_search_path
4217         do
4218                 if test -d "$cf_config"
4219                 then
4220                         cf_pkg_config_path=$cf_config
4221                         break
4222                 fi
4223         done
4224         echo "$as_me:4224: result: $cf_pkg_config_path" >&5
4225 echo "${ECHO_T}$cf_pkg_config_path" >&6
4226
4227         if test "x$cf_pkg_config_path" != xnone ; then
4228                 # limit this to the first directory found
4229                 PKG_CONFIG_LIBDIR="$cf_pkg_config_path"
4230         fi
4231
4232         if test -z "$PKG_CONFIG_LIBDIR" && test -n "$cf_search_path"
4233         then
4234                 echo "$as_me:4234: checking for workaround" >&5
4235 echo $ECHO_N "checking for workaround... $ECHO_C" >&6
4236                 if test "$prefix" = "NONE" ; then
4237                         cf_prefix="$ac_default_prefix"
4238                 else
4239                         cf_prefix="$prefix"
4240                 fi
4241                 eval cf_libdir=$libdir
4242                 cf_libdir=`echo "$cf_libdir" | sed -e "s,^NONE,$cf_prefix,"`
4243                 cf_backup=
4244                 for cf_config in $cf_search_path
4245                 do
4246                         case $cf_config in
4247                         $cf_libdir/pkgconfig)
4248                                 PKG_CONFIG_LIBDIR=$cf_libdir/pkgconfig
4249                                 break
4250                                 ;;
4251                         *)
4252                                 test -z "$cf_backup" && cf_backup=$cf_config
4253                                 ;;
4254                         esac
4255                 done
4256                 test -z "$PKG_CONFIG_LIBDIR" && PKG_CONFIG_LIBDIR=$cf_backup
4257                 echo "$as_me:4257: result: $PKG_CONFIG_LIBDIR" >&5
4258 echo "${ECHO_T}$PKG_CONFIG_LIBDIR" >&6
4259         fi
4260 fi
4261
4262 if test "x$PKG_CONFIG" != xnone
4263 then
4264         echo "$as_me:4264: checking if we should install .pc files for $PKG_CONFIG" >&5
4265 echo $ECHO_N "checking if we should install .pc files for $PKG_CONFIG... $ECHO_C" >&6
4266 else
4267         echo "$as_me:4267: checking if we should install .pc files" >&5
4268 echo $ECHO_N "checking if we should install .pc files... $ECHO_C" >&6
4269 fi
4270
4271 # Check whether --enable-pc-files or --disable-pc-files was given.
4272 if test "${enable_pc_files+set}" = set; then
4273   enableval="$enable_pc_files"
4274   enable_pc_files=$enableval
4275 else
4276   enable_pc_files=no
4277 fi;
4278 echo "$as_me:4278: result: $enable_pc_files" >&5
4279 echo "${ECHO_T}$enable_pc_files" >&6
4280
4281 if test "x$enable_pc_files" != xno
4282 then
4283         MAKE_PC_FILES=
4284         case "x$PKG_CONFIG_LIBDIR" in
4285         (xno|xnone|xyes|x)
4286                 { echo "$as_me:4286: WARNING: no PKG_CONFIG_LIBDIR was found" >&5
4287 echo "$as_me: WARNING: no PKG_CONFIG_LIBDIR was found" >&2;}
4288                 ;;
4289         (*)
4290                 cf_pkg_config_libdir="$PKG_CONFIG_LIBDIR"
4291
4292 if test "x$prefix" != xNONE; then
4293         cf_path_syntax="$prefix"
4294 else
4295         cf_path_syntax="$ac_default_prefix"
4296 fi
4297
4298 case ".$cf_pkg_config_libdir" in
4299 (.\$\(*\)*|.\'*\'*)
4300         ;;
4301 (..|./*|.\\*)
4302         ;;
4303 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
4304         ;;
4305 (.\$\{*prefix\}*|.\$\{*dir\}*)
4306         eval cf_pkg_config_libdir="$cf_pkg_config_libdir"
4307         case ".$cf_pkg_config_libdir" in
4308         (.NONE/*)
4309                 cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4310                 ;;
4311         esac
4312         ;;
4313 (.no|.NONE/*)
4314         cf_pkg_config_libdir=`echo "$cf_pkg_config_libdir" | sed -e s%NONE%$cf_path_syntax%`
4315         ;;
4316 (*)
4317         { { echo "$as_me:4317: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&5
4318 echo "$as_me: error: expected a pathname, not \"$cf_pkg_config_libdir\"" >&2;}
4319    { (exit 1); exit 1; }; }
4320         ;;
4321 esac
4322
4323                 ;;
4324         esac
4325 else
4326         MAKE_PC_FILES="#"
4327 fi
4328
4329 if test -z "$MAKE_PC_FILES"
4330 then
4331         echo "$as_me:4331: checking for suffix to add to pc-files" >&5
4332 echo $ECHO_N "checking for suffix to add to pc-files... $ECHO_C" >&6
4333
4334 # Check whether --with-pc-suffix or --without-pc-suffix was given.
4335 if test "${with_pc_suffix+set}" = set; then
4336   withval="$with_pc_suffix"
4337   case "x$withval" in
4338         (xyes|xno)
4339                 PC_MODULE_SUFFIX=
4340                 ;;
4341         (*)     PC_MODULE_SUFFIX="$withval"
4342                 ;;
4343         esac
4344 fi;
4345         test -z "$PC_MODULE_SUFFIX" && PC_MODULE_SUFFIX=none
4346         echo "$as_me:4346: result: $PC_MODULE_SUFFIX" >&5
4347 echo "${ECHO_T}$PC_MODULE_SUFFIX" >&6
4348         test "$PC_MODULE_SUFFIX" = none && PC_MODULE_SUFFIX=
4349
4350 fi
4351
4352 echo "$as_me:4352: checking if we should assume mixed-case filenames" >&5
4353 echo $ECHO_N "checking if we should assume mixed-case filenames... $ECHO_C" >&6
4354
4355 # Check whether --enable-mixed-case or --disable-mixed-case was given.
4356 if test "${enable_mixed_case+set}" = set; then
4357   enableval="$enable_mixed_case"
4358   enable_mixedcase=$enableval
4359 else
4360   enable_mixedcase=auto
4361 fi;
4362 echo "$as_me:4362: result: $enable_mixedcase" >&5
4363 echo "${ECHO_T}$enable_mixedcase" >&6
4364 if test "$enable_mixedcase" = "auto" ; then
4365
4366 echo "$as_me:4366: checking if filesystem supports mixed-case filenames" >&5
4367 echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
4368 if test "${cf_cv_mixedcase+set}" = set; then
4369   echo $ECHO_N "(cached) $ECHO_C" >&6
4370 else
4371
4372 if test "$cross_compiling" = yes ; then
4373         case "$target_alias" in
4374         (*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
4375                 cf_cv_mixedcase=no
4376                 ;;
4377         (*)
4378                 cf_cv_mixedcase=yes
4379                 ;;
4380         esac
4381 else
4382         rm -f conftest CONFTEST
4383         echo test >conftest
4384         if test -f CONFTEST ; then
4385                 cf_cv_mixedcase=no
4386         else
4387                 cf_cv_mixedcase=yes
4388         fi
4389         rm -f conftest CONFTEST
4390 fi
4391
4392 fi
4393 echo "$as_me:4393: result: $cf_cv_mixedcase" >&5
4394 echo "${ECHO_T}$cf_cv_mixedcase" >&6
4395 test "$cf_cv_mixedcase" = yes &&
4396 cat >>confdefs.h <<\EOF
4397 #define MIXEDCASE_FILENAMES 1
4398 EOF
4399
4400 else
4401         cf_cv_mixedcase=$enable_mixedcase
4402         if test "x$enable_mixedcase" = "xyes" ; then
4403
4404 cat >>confdefs.h <<\EOF
4405 #define MIXEDCASE_FILENAMES 1
4406 EOF
4407
4408         fi
4409 fi
4410
4411 # do this after mixed-case option (tags/TAGS is not as important as tic).
4412 echo "$as_me:4412: checking whether ${MAKE-make} sets \${MAKE}" >&5
4413 echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
4414 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
4415 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
4416   echo $ECHO_N "(cached) $ECHO_C" >&6
4417 else
4418   cat >conftest.make <<\EOF
4419 all:
4420         @echo 'ac_maketemp="${MAKE}"'
4421 EOF
4422 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4423 eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
4424 if test -n "$ac_maketemp"; then
4425   eval ac_cv_prog_make_${ac_make}_set=yes
4426 else
4427   eval ac_cv_prog_make_${ac_make}_set=no
4428 fi
4429 rm -f conftest.make
4430 fi
4431 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
4432   echo "$as_me:4432: result: yes" >&5
4433 echo "${ECHO_T}yes" >&6
4434   SET_MAKE=
4435 else
4436   echo "$as_me:4436: result: no" >&5
4437 echo "${ECHO_T}no" >&6
4438   SET_MAKE="MAKE=${MAKE-make}"
4439 fi
4440
4441 echo "$as_me:4441: checking for \".PHONY\" make-support" >&5
4442 echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
4443 if test "${cf_cv_make_PHONY+set}" = set; then
4444   echo $ECHO_N "(cached) $ECHO_C" >&6
4445 else
4446
4447         rm -rf conftest*
4448         (
4449                 mkdir conftest || exit 1
4450                 cd conftest
4451                 cat >makefile <<'CF_EOF'
4452 .PHONY: always
4453 DATA=0
4454 always: always.out
4455         @echo "** making $@ $(DATA)"
4456 once: once.out
4457         @echo "** making $@ $(DATA)"
4458 always.out:
4459         @echo "** making $@ $(DATA)"
4460         echo $(DATA) > $@
4461 once.out:
4462         @echo "** making $@ $(DATA)"
4463         echo $(DATA) > $@
4464 CF_EOF
4465                 for cf_data in 1 2 3
4466                 do
4467                         ${MAKE:-make} always DATA=$cf_data
4468                         ${MAKE:-make} once   DATA=$cf_data
4469                         ${MAKE:-make} -t always once
4470                         if test -f always ; then
4471                                 echo "no (case 1)" > ../conftest.tmp
4472                         elif test ! -f always.out ; then
4473                                 echo "no (case 2)" > ../conftest.tmp
4474                         elif test ! -f once.out ; then
4475                                 echo "no (case 3)" > ../conftest.tmp
4476                         elif ! cmp -s always.out once.out ; then
4477                                 echo "no (case 4)" > ../conftest.tmp
4478                                 diff always.out once.out
4479                         else
4480                                 cf_check="`cat always.out`"
4481                                 if test "x$cf_check" != "x$cf_data" ; then
4482                                         echo "no (case 5)" > ../conftest.tmp
4483                                 else
4484                                         echo yes > ../conftest.tmp
4485                                         rm -f ./*.out
4486                                         continue
4487                                 fi
4488                         fi
4489                         break
4490                 done
4491         ) >&5 2>&1
4492         cf_cv_make_PHONY="`cat conftest.tmp`"
4493         rm -rf conftest*
4494
4495 fi
4496 echo "$as_me:4496: result: $cf_cv_make_PHONY" >&5
4497 echo "${ECHO_T}$cf_cv_make_PHONY" >&6
4498 MAKE_NO_PHONY="#"
4499 MAKE_PHONY="#"
4500 test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
4501 test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
4502
4503 for ac_prog in exctags ctags
4504 do
4505   # Extract the first word of "$ac_prog", so it can be a program name with args.
4506 set dummy $ac_prog; ac_word=$2
4507 echo "$as_me:4507: checking for $ac_word" >&5
4508 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4509 if test "${ac_cv_prog_CTAGS+set}" = set; then
4510   echo $ECHO_N "(cached) $ECHO_C" >&6
4511 else
4512   if test -n "$CTAGS"; then
4513   ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
4514 else
4515   ac_save_IFS=$IFS; IFS=$ac_path_separator
4516 ac_dummy="$PATH"
4517 for ac_dir in $ac_dummy; do
4518   IFS=$ac_save_IFS
4519   test -z "$ac_dir" && ac_dir=.
4520   $as_executable_p "$ac_dir/$ac_word" || continue
4521 ac_cv_prog_CTAGS="$ac_prog"
4522 echo "$as_me:4522: found $ac_dir/$ac_word" >&5
4523 break
4524 done
4525
4526 fi
4527 fi
4528 CTAGS=$ac_cv_prog_CTAGS
4529 if test -n "$CTAGS"; then
4530   echo "$as_me:4530: result: $CTAGS" >&5
4531 echo "${ECHO_T}$CTAGS" >&6
4532 else
4533   echo "$as_me:4533: result: no" >&5
4534 echo "${ECHO_T}no" >&6
4535 fi
4536
4537   test -n "$CTAGS" && break
4538 done
4539
4540 for ac_prog in exetags etags
4541 do
4542   # Extract the first word of "$ac_prog", so it can be a program name with args.
4543 set dummy $ac_prog; ac_word=$2
4544 echo "$as_me:4544: checking for $ac_word" >&5
4545 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4546 if test "${ac_cv_prog_ETAGS+set}" = set; then
4547   echo $ECHO_N "(cached) $ECHO_C" >&6
4548 else
4549   if test -n "$ETAGS"; then
4550   ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
4551 else
4552   ac_save_IFS=$IFS; IFS=$ac_path_separator
4553 ac_dummy="$PATH"
4554 for ac_dir in $ac_dummy; do
4555   IFS=$ac_save_IFS
4556   test -z "$ac_dir" && ac_dir=.
4557   $as_executable_p "$ac_dir/$ac_word" || continue
4558 ac_cv_prog_ETAGS="$ac_prog"
4559 echo "$as_me:4559: found $ac_dir/$ac_word" >&5
4560 break
4561 done
4562
4563 fi
4564 fi
4565 ETAGS=$ac_cv_prog_ETAGS
4566 if test -n "$ETAGS"; then
4567   echo "$as_me:4567: result: $ETAGS" >&5
4568 echo "${ECHO_T}$ETAGS" >&6
4569 else
4570   echo "$as_me:4570: result: no" >&5
4571 echo "${ECHO_T}no" >&6
4572 fi
4573
4574   test -n "$ETAGS" && break
4575 done
4576
4577 # Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
4578 set dummy ${CTAGS:-ctags}; ac_word=$2
4579 echo "$as_me:4579: checking for $ac_word" >&5
4580 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4581 if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
4582   echo $ECHO_N "(cached) $ECHO_C" >&6
4583 else
4584   if test -n "$MAKE_LOWER_TAGS"; then
4585   ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
4586 else
4587   ac_save_IFS=$IFS; IFS=$ac_path_separator
4588 ac_dummy="$PATH"
4589 for ac_dir in $ac_dummy; do
4590   IFS=$ac_save_IFS
4591   test -z "$ac_dir" && ac_dir=.
4592   $as_executable_p "$ac_dir/$ac_word" || continue
4593 ac_cv_prog_MAKE_LOWER_TAGS="yes"
4594 echo "$as_me:4594: found $ac_dir/$ac_word" >&5
4595 break
4596 done
4597
4598   test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
4599 fi
4600 fi
4601 MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
4602 if test -n "$MAKE_LOWER_TAGS"; then
4603   echo "$as_me:4603: result: $MAKE_LOWER_TAGS" >&5
4604 echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
4605 else
4606   echo "$as_me:4606: result: no" >&5
4607 echo "${ECHO_T}no" >&6
4608 fi
4609
4610 if test "$cf_cv_mixedcase" = yes ; then
4611         # Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
4612 set dummy ${ETAGS:-etags}; ac_word=$2
4613 echo "$as_me:4613: checking for $ac_word" >&5
4614 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4615 if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
4616   echo $ECHO_N "(cached) $ECHO_C" >&6
4617 else
4618   if test -n "$MAKE_UPPER_TAGS"; then
4619   ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
4620 else
4621   ac_save_IFS=$IFS; IFS=$ac_path_separator
4622 ac_dummy="$PATH"
4623 for ac_dir in $ac_dummy; do
4624   IFS=$ac_save_IFS
4625   test -z "$ac_dir" && ac_dir=.
4626   $as_executable_p "$ac_dir/$ac_word" || continue
4627 ac_cv_prog_MAKE_UPPER_TAGS="yes"
4628 echo "$as_me:4628: found $ac_dir/$ac_word" >&5
4629 break
4630 done
4631
4632   test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
4633 fi
4634 fi
4635 MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
4636 if test -n "$MAKE_UPPER_TAGS"; then
4637   echo "$as_me:4637: result: $MAKE_UPPER_TAGS" >&5
4638 echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
4639 else
4640   echo "$as_me:4640: result: no" >&5
4641 echo "${ECHO_T}no" >&6
4642 fi
4643
4644 else
4645         MAKE_UPPER_TAGS=no
4646 fi
4647
4648 if test "$MAKE_UPPER_TAGS" = yes ; then
4649         MAKE_UPPER_TAGS=
4650 else
4651         MAKE_UPPER_TAGS="#"
4652 fi
4653
4654 if test "$MAKE_LOWER_TAGS" = yes ; then
4655         MAKE_LOWER_TAGS=
4656 else
4657         MAKE_LOWER_TAGS="#"
4658 fi
4659
4660 echo "$as_me:4660: checking for makeflags variable" >&5
4661 echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
4662 if test "${cf_cv_makeflags+set}" = set; then
4663   echo $ECHO_N "(cached) $ECHO_C" >&6
4664 else
4665
4666         cf_cv_makeflags=''
4667         for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
4668         do
4669                 cat >cf_makeflags.tmp <<CF_EOF
4670 SHELL = $SHELL
4671 all :
4672         @ echo '.$cf_option'
4673 CF_EOF
4674                 cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[   ]*$,,'`
4675                 case "$cf_result" in
4676                 (.*k|.*kw)
4677                         cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
4678                         case "$cf_result" in
4679                         (.*CC=*)        cf_cv_makeflags=
4680                                 ;;
4681                         (*)     cf_cv_makeflags=$cf_option
4682                                 ;;
4683                         esac
4684                         break
4685                         ;;
4686                 (.-)
4687                         ;;
4688                 (*)
4689
4690 echo "${as_me:-configure}:4690: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
4691
4692                         ;;
4693                 esac
4694         done
4695         rm -f cf_makeflags.tmp
4696
4697 fi
4698 echo "$as_me:4698: result: $cf_cv_makeflags" >&5
4699 echo "${ECHO_T}$cf_cv_makeflags" >&6
4700
4701 if test -n "$ac_tool_prefix"; then
4702   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4703 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4704 echo "$as_me:4704: checking for $ac_word" >&5
4705 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4706 if test "${ac_cv_prog_RANLIB+set}" = set; then
4707   echo $ECHO_N "(cached) $ECHO_C" >&6
4708 else
4709   if test -n "$RANLIB"; then
4710   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4711 else
4712   ac_save_IFS=$IFS; IFS=$ac_path_separator
4713 ac_dummy="$PATH"
4714 for ac_dir in $ac_dummy; do
4715   IFS=$ac_save_IFS
4716   test -z "$ac_dir" && ac_dir=.
4717   $as_executable_p "$ac_dir/$ac_word" || continue
4718 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4719 echo "$as_me:4719: found $ac_dir/$ac_word" >&5
4720 break
4721 done
4722
4723 fi
4724 fi
4725 RANLIB=$ac_cv_prog_RANLIB
4726 if test -n "$RANLIB"; then
4727   echo "$as_me:4727: result: $RANLIB" >&5
4728 echo "${ECHO_T}$RANLIB" >&6
4729 else
4730   echo "$as_me:4730: result: no" >&5
4731 echo "${ECHO_T}no" >&6
4732 fi
4733
4734 fi
4735 if test -z "$ac_cv_prog_RANLIB"; then
4736   ac_ct_RANLIB=$RANLIB
4737   # Extract the first word of "ranlib", so it can be a program name with args.
4738 set dummy ranlib; ac_word=$2
4739 echo "$as_me:4739: checking for $ac_word" >&5
4740 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4741 if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4742   echo $ECHO_N "(cached) $ECHO_C" >&6
4743 else
4744   if test -n "$ac_ct_RANLIB"; then
4745   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4746 else
4747   ac_save_IFS=$IFS; IFS=$ac_path_separator
4748 ac_dummy="$PATH"
4749 for ac_dir in $ac_dummy; do
4750   IFS=$ac_save_IFS
4751   test -z "$ac_dir" && ac_dir=.
4752   $as_executable_p "$ac_dir/$ac_word" || continue
4753 ac_cv_prog_ac_ct_RANLIB="ranlib"
4754 echo "$as_me:4754: found $ac_dir/$ac_word" >&5
4755 break
4756 done
4757
4758   test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
4759 fi
4760 fi
4761 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4762 if test -n "$ac_ct_RANLIB"; then
4763   echo "$as_me:4763: result: $ac_ct_RANLIB" >&5
4764 echo "${ECHO_T}$ac_ct_RANLIB" >&6
4765 else
4766   echo "$as_me:4766: result: no" >&5
4767 echo "${ECHO_T}no" >&6
4768 fi
4769
4770   RANLIB=$ac_ct_RANLIB
4771 else
4772   RANLIB="$ac_cv_prog_RANLIB"
4773 fi
4774
4775 if test -n "$ac_tool_prefix"; then
4776   # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
4777 set dummy ${ac_tool_prefix}ld; ac_word=$2
4778 echo "$as_me:4778: checking for $ac_word" >&5
4779 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4780 if test "${ac_cv_prog_LD+set}" = set; then
4781   echo $ECHO_N "(cached) $ECHO_C" >&6
4782 else
4783   if test -n "$LD"; then
4784   ac_cv_prog_LD="$LD" # Let the user override the test.
4785 else
4786   ac_save_IFS=$IFS; IFS=$ac_path_separator
4787 ac_dummy="$PATH"
4788 for ac_dir in $ac_dummy; do
4789   IFS=$ac_save_IFS
4790   test -z "$ac_dir" && ac_dir=.
4791   $as_executable_p "$ac_dir/$ac_word" || continue
4792 ac_cv_prog_LD="${ac_tool_prefix}ld"
4793 echo "$as_me:4793: found $ac_dir/$ac_word" >&5
4794 break
4795 done
4796
4797 fi
4798 fi
4799 LD=$ac_cv_prog_LD
4800 if test -n "$LD"; then
4801   echo "$as_me:4801: result: $LD" >&5
4802 echo "${ECHO_T}$LD" >&6
4803 else
4804   echo "$as_me:4804: result: no" >&5
4805 echo "${ECHO_T}no" >&6
4806 fi
4807
4808 fi
4809 if test -z "$ac_cv_prog_LD"; then
4810   ac_ct_LD=$LD
4811   # Extract the first word of "ld", so it can be a program name with args.
4812 set dummy ld; ac_word=$2
4813 echo "$as_me:4813: checking for $ac_word" >&5
4814 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4815 if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
4816   echo $ECHO_N "(cached) $ECHO_C" >&6
4817 else
4818   if test -n "$ac_ct_LD"; then
4819   ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
4820 else
4821   ac_save_IFS=$IFS; IFS=$ac_path_separator
4822 ac_dummy="$PATH"
4823 for ac_dir in $ac_dummy; do
4824   IFS=$ac_save_IFS
4825   test -z "$ac_dir" && ac_dir=.
4826   $as_executable_p "$ac_dir/$ac_word" || continue
4827 ac_cv_prog_ac_ct_LD="ld"
4828 echo "$as_me:4828: found $ac_dir/$ac_word" >&5
4829 break
4830 done
4831
4832   test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
4833 fi
4834 fi
4835 ac_ct_LD=$ac_cv_prog_ac_ct_LD
4836 if test -n "$ac_ct_LD"; then
4837   echo "$as_me:4837: result: $ac_ct_LD" >&5
4838 echo "${ECHO_T}$ac_ct_LD" >&6
4839 else
4840   echo "$as_me:4840: result: no" >&5
4841 echo "${ECHO_T}no" >&6
4842 fi
4843
4844   LD=$ac_ct_LD
4845 else
4846   LD="$ac_cv_prog_LD"
4847 fi
4848
4849 if test -n "$ac_tool_prefix"; then
4850   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4851 set dummy ${ac_tool_prefix}ar; ac_word=$2
4852 echo "$as_me:4852: checking for $ac_word" >&5
4853 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4854 if test "${ac_cv_prog_AR+set}" = set; then
4855   echo $ECHO_N "(cached) $ECHO_C" >&6
4856 else
4857   if test -n "$AR"; then
4858   ac_cv_prog_AR="$AR" # Let the user override the test.
4859 else
4860   ac_save_IFS=$IFS; IFS=$ac_path_separator
4861 ac_dummy="$PATH"
4862 for ac_dir in $ac_dummy; do
4863   IFS=$ac_save_IFS
4864   test -z "$ac_dir" && ac_dir=.
4865   $as_executable_p "$ac_dir/$ac_word" || continue
4866 ac_cv_prog_AR="${ac_tool_prefix}ar"
4867 echo "$as_me:4867: found $ac_dir/$ac_word" >&5
4868 break
4869 done
4870
4871 fi
4872 fi
4873 AR=$ac_cv_prog_AR
4874 if test -n "$AR"; then
4875   echo "$as_me:4875: result: $AR" >&5
4876 echo "${ECHO_T}$AR" >&6
4877 else
4878   echo "$as_me:4878: result: no" >&5
4879 echo "${ECHO_T}no" >&6
4880 fi
4881
4882 fi
4883 if test -z "$ac_cv_prog_AR"; then
4884   ac_ct_AR=$AR
4885   # Extract the first word of "ar", so it can be a program name with args.
4886 set dummy ar; ac_word=$2
4887 echo "$as_me:4887: checking for $ac_word" >&5
4888 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4889 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
4890   echo $ECHO_N "(cached) $ECHO_C" >&6
4891 else
4892   if test -n "$ac_ct_AR"; then
4893   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4894 else
4895   ac_save_IFS=$IFS; IFS=$ac_path_separator
4896 ac_dummy="$PATH"
4897 for ac_dir in $ac_dummy; do
4898   IFS=$ac_save_IFS
4899   test -z "$ac_dir" && ac_dir=.
4900   $as_executable_p "$ac_dir/$ac_word" || continue
4901 ac_cv_prog_ac_ct_AR="ar"
4902 echo "$as_me:4902: found $ac_dir/$ac_word" >&5
4903 break
4904 done
4905
4906   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
4907 fi
4908 fi
4909 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4910 if test -n "$ac_ct_AR"; then
4911   echo "$as_me:4911: result: $ac_ct_AR" >&5
4912 echo "${ECHO_T}$ac_ct_AR" >&6
4913 else
4914   echo "$as_me:4914: result: no" >&5
4915 echo "${ECHO_T}no" >&6
4916 fi
4917
4918   AR=$ac_ct_AR
4919 else
4920   AR="$ac_cv_prog_AR"
4921 fi
4922
4923 if test -n "$ac_tool_prefix"; then
4924   # Extract the first word of "${ac_tool_prefix}nm", so it can be a program name with args.
4925 set dummy ${ac_tool_prefix}nm; ac_word=$2
4926 echo "$as_me:4926: checking for $ac_word" >&5
4927 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4928 if test "${ac_cv_prog_NM+set}" = set; then
4929   echo $ECHO_N "(cached) $ECHO_C" >&6
4930 else
4931   if test -n "$NM"; then
4932   ac_cv_prog_NM="$NM" # Let the user override the test.
4933 else
4934   ac_save_IFS=$IFS; IFS=$ac_path_separator
4935 ac_dummy="$PATH"
4936 for ac_dir in $ac_dummy; do
4937   IFS=$ac_save_IFS
4938   test -z "$ac_dir" && ac_dir=.
4939   $as_executable_p "$ac_dir/$ac_word" || continue
4940 ac_cv_prog_NM="${ac_tool_prefix}nm"
4941 echo "$as_me:4941: found $ac_dir/$ac_word" >&5
4942 break
4943 done
4944
4945 fi
4946 fi
4947 NM=$ac_cv_prog_NM
4948 if test -n "$NM"; then
4949   echo "$as_me:4949: result: $NM" >&5
4950 echo "${ECHO_T}$NM" >&6
4951 else
4952   echo "$as_me:4952: result: no" >&5
4953 echo "${ECHO_T}no" >&6
4954 fi
4955
4956 fi
4957 if test -z "$ac_cv_prog_NM"; then
4958   ac_ct_NM=$NM
4959   # Extract the first word of "nm", so it can be a program name with args.
4960 set dummy nm; ac_word=$2
4961 echo "$as_me:4961: checking for $ac_word" >&5
4962 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
4963 if test "${ac_cv_prog_ac_ct_NM+set}" = set; then
4964   echo $ECHO_N "(cached) $ECHO_C" >&6
4965 else
4966   if test -n "$ac_ct_NM"; then
4967   ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
4968 else
4969   ac_save_IFS=$IFS; IFS=$ac_path_separator
4970 ac_dummy="$PATH"
4971 for ac_dir in $ac_dummy; do
4972   IFS=$ac_save_IFS
4973   test -z "$ac_dir" && ac_dir=.
4974   $as_executable_p "$ac_dir/$ac_word" || continue
4975 ac_cv_prog_ac_ct_NM="nm"
4976 echo "$as_me:4976: found $ac_dir/$ac_word" >&5
4977 break
4978 done
4979
4980   test -z "$ac_cv_prog_ac_ct_NM" && ac_cv_prog_ac_ct_NM="nm"
4981 fi
4982 fi
4983 ac_ct_NM=$ac_cv_prog_ac_ct_NM
4984 if test -n "$ac_ct_NM"; then
4985   echo "$as_me:4985: result: $ac_ct_NM" >&5
4986 echo "${ECHO_T}$ac_ct_NM" >&6
4987 else
4988   echo "$as_me:4988: result: no" >&5
4989 echo "${ECHO_T}no" >&6
4990 fi
4991
4992   NM=$ac_ct_NM
4993 else
4994   NM="$ac_cv_prog_NM"
4995 fi
4996
4997 if test -n "$ac_tool_prefix"; then
4998   # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
4999 set dummy ${ac_tool_prefix}ar; ac_word=$2
5000 echo "$as_me:5000: checking for $ac_word" >&5
5001 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5002 if test "${ac_cv_prog_AR+set}" = set; then
5003   echo $ECHO_N "(cached) $ECHO_C" >&6
5004 else
5005   if test -n "$AR"; then
5006   ac_cv_prog_AR="$AR" # Let the user override the test.
5007 else
5008   ac_save_IFS=$IFS; IFS=$ac_path_separator
5009 ac_dummy="$PATH"
5010 for ac_dir in $ac_dummy; do
5011   IFS=$ac_save_IFS
5012   test -z "$ac_dir" && ac_dir=.
5013   $as_executable_p "$ac_dir/$ac_word" || continue
5014 ac_cv_prog_AR="${ac_tool_prefix}ar"
5015 echo "$as_me:5015: found $ac_dir/$ac_word" >&5
5016 break
5017 done
5018
5019 fi
5020 fi
5021 AR=$ac_cv_prog_AR
5022 if test -n "$AR"; then
5023   echo "$as_me:5023: result: $AR" >&5
5024 echo "${ECHO_T}$AR" >&6
5025 else
5026   echo "$as_me:5026: result: no" >&5
5027 echo "${ECHO_T}no" >&6
5028 fi
5029
5030 fi
5031 if test -z "$ac_cv_prog_AR"; then
5032   ac_ct_AR=$AR
5033   # Extract the first word of "ar", so it can be a program name with args.
5034 set dummy ar; ac_word=$2
5035 echo "$as_me:5035: checking for $ac_word" >&5
5036 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5037 if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5038   echo $ECHO_N "(cached) $ECHO_C" >&6
5039 else
5040   if test -n "$ac_ct_AR"; then
5041   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5042 else
5043   ac_save_IFS=$IFS; IFS=$ac_path_separator
5044 ac_dummy="$PATH"
5045 for ac_dir in $ac_dummy; do
5046   IFS=$ac_save_IFS
5047   test -z "$ac_dir" && ac_dir=.
5048   $as_executable_p "$ac_dir/$ac_word" || continue
5049 ac_cv_prog_ac_ct_AR="ar"
5050 echo "$as_me:5050: found $ac_dir/$ac_word" >&5
5051 break
5052 done
5053
5054   test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5055 fi
5056 fi
5057 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5058 if test -n "$ac_ct_AR"; then
5059   echo "$as_me:5059: result: $ac_ct_AR" >&5
5060 echo "${ECHO_T}$ac_ct_AR" >&6
5061 else
5062   echo "$as_me:5062: result: no" >&5
5063 echo "${ECHO_T}no" >&6
5064 fi
5065
5066   AR=$ac_ct_AR
5067 else
5068   AR="$ac_cv_prog_AR"
5069 fi
5070
5071 echo "$as_me:5071: checking for options to update archives" >&5
5072 echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5073 if test "${cf_cv_ar_flags+set}" = set; then
5074   echo $ECHO_N "(cached) $ECHO_C" >&6
5075 else
5076
5077         case "$cf_cv_system_name" in
5078         (*-msvc*)
5079                 cf_cv_ar_flags=''
5080                 cat >mk_static_lib.sh <<-EOF
5081                 #!$SHELL
5082                 MSVC_BIN="$AR"
5083                 out="\$1"
5084                 shift
5085                 exec \$MSVC_BIN -out:"\$out" \$@
5086                 EOF
5087                 chmod +x mk_static_lib.sh
5088                 AR=`pwd`/mk_static_lib.sh
5089                 ;;
5090         (*)
5091                 cf_cv_ar_flags=unknown
5092                 for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5093                 do
5094
5095                         # check if $ARFLAGS already contains this choice
5096                         if test "x$ARFLAGS" != "x" ; then
5097                                 cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5098                                 if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5099                                         cf_cv_ar_flags=
5100                                         break
5101                                 fi
5102                         fi
5103
5104                         rm -f "conftest.$ac_cv_objext"
5105                         rm -f conftest.a
5106
5107                         cat >"conftest.$ac_ext" <<EOF
5108 #line 5108 "configure"
5109 int     testdata[3] = { 123, 456, 789 };
5110 EOF
5111                         if { (eval echo "$as_me:5111: \"$ac_compile\"") >&5
5112   (eval $ac_compile) 2>&5
5113   ac_status=$?
5114   echo "$as_me:5114: \$? = $ac_status" >&5
5115   (exit "$ac_status"); } ; then
5116                                 echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5117                                 $AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
5118                                 if test -f conftest.a ; then
5119                                         cf_cv_ar_flags="$cf_ar_flags"
5120                                         break
5121                                 fi
5122                         else
5123                                 test -n "$verbose" && echo "    cannot compile test-program" 1>&6
5124
5125 echo "${as_me:-configure}:5125: testing cannot compile test-program ..." 1>&5
5126
5127                                 break
5128                         fi
5129                 done
5130                 rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
5131                 ;;
5132         esac
5133
5134 fi
5135 echo "$as_me:5135: result: $cf_cv_ar_flags" >&5
5136 echo "${ECHO_T}$cf_cv_ar_flags" >&6
5137
5138 if test -n "$ARFLAGS" ; then
5139         if test -n "$cf_cv_ar_flags" ; then
5140                 ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5141         fi
5142 else
5143         ARFLAGS=$cf_cv_ar_flags
5144 fi
5145
5146 echo "$as_me:5146: checking if you have specified an install-prefix" >&5
5147 echo $ECHO_N "checking if you have specified an install-prefix... $ECHO_C" >&6
5148
5149 # Check whether --with-install-prefix or --without-install-prefix was given.
5150 if test "${with_install_prefix+set}" = set; then
5151   withval="$with_install_prefix"
5152   case "x$withval" in
5153         (xyes|xno)
5154                 ;;
5155         (*)     DESTDIR="$withval"
5156                 ;;
5157         esac
5158 fi;
5159 echo "$as_me:5159: result: $DESTDIR" >&5
5160 echo "${ECHO_T}$DESTDIR" >&6
5161
5162 ###############################################################################
5163
5164 # If we're cross-compiling, allow the user to override the tools and their
5165 # options.  The configure script is oriented toward identifying the host
5166 # compiler, etc., but we need a build compiler to generate parts of the source.
5167
5168 case "$cf_cv_system_name" in
5169 (*-msvc*)
5170         LDFLAGS="$LDFLAGS user32.lib"
5171         export LDFLAGS
5172         ;;
5173 esac
5174
5175 if test "$cross_compiling" = yes ; then
5176
5177         # defaults that we might want to override
5178         : ${BUILD_CFLAGS:=''}
5179         : ${BUILD_CPPFLAGS:=''}
5180         : ${BUILD_LDFLAGS:=''}
5181         : ${BUILD_LIBS:=''}
5182         : ${BUILD_EXEEXT:='$x'}
5183         : ${BUILD_OBJEXT:='o'}
5184
5185 # Check whether --with-build-cc or --without-build-cc was given.
5186 if test "${with_build_cc+set}" = set; then
5187   withval="$with_build_cc"
5188   BUILD_CC="$withval"
5189 else
5190   for ac_prog in gcc clang c99 c89 cc cl
5191 do
5192   # Extract the first word of "$ac_prog", so it can be a program name with args.
5193 set dummy $ac_prog; ac_word=$2
5194 echo "$as_me:5194: checking for $ac_word" >&5
5195 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5196 if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5197   echo $ECHO_N "(cached) $ECHO_C" >&6
5198 else
5199   if test -n "$BUILD_CC"; then
5200   ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5201 else
5202   ac_save_IFS=$IFS; IFS=$ac_path_separator
5203 ac_dummy="$PATH"
5204 for ac_dir in $ac_dummy; do
5205   IFS=$ac_save_IFS
5206   test -z "$ac_dir" && ac_dir=.
5207   $as_executable_p "$ac_dir/$ac_word" || continue
5208 ac_cv_prog_BUILD_CC="$ac_prog"
5209 echo "$as_me:5209: found $ac_dir/$ac_word" >&5
5210 break
5211 done
5212
5213 fi
5214 fi
5215 BUILD_CC=$ac_cv_prog_BUILD_CC
5216 if test -n "$BUILD_CC"; then
5217   echo "$as_me:5217: result: $BUILD_CC" >&5
5218 echo "${ECHO_T}$BUILD_CC" >&6
5219 else
5220   echo "$as_me:5220: result: no" >&5
5221 echo "${ECHO_T}no" >&6
5222 fi
5223
5224   test -n "$BUILD_CC" && break
5225 done
5226 test -n "$BUILD_CC" || BUILD_CC="none"
5227
5228 fi;
5229         echo "$as_me:5229: checking for native build C compiler" >&5
5230 echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5231         echo "$as_me:5231: result: $BUILD_CC" >&5
5232 echo "${ECHO_T}$BUILD_CC" >&6
5233
5234         echo "$as_me:5234: checking for native build C preprocessor" >&5
5235 echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5236
5237 # Check whether --with-build-cpp or --without-build-cpp was given.
5238 if test "${with_build_cpp+set}" = set; then
5239   withval="$with_build_cpp"
5240   BUILD_CPP="$withval"
5241 else
5242   BUILD_CPP='${BUILD_CC} -E'
5243 fi;
5244         echo "$as_me:5244: result: $BUILD_CPP" >&5
5245 echo "${ECHO_T}$BUILD_CPP" >&6
5246
5247         echo "$as_me:5247: checking for native build C flags" >&5
5248 echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5249
5250 # Check whether --with-build-cflags or --without-build-cflags was given.
5251 if test "${with_build_cflags+set}" = set; then
5252   withval="$with_build_cflags"
5253   BUILD_CFLAGS="$withval"
5254 fi;
5255         echo "$as_me:5255: result: $BUILD_CFLAGS" >&5
5256 echo "${ECHO_T}$BUILD_CFLAGS" >&6
5257
5258         echo "$as_me:5258: checking for native build C preprocessor-flags" >&5
5259 echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5260
5261 # Check whether --with-build-cppflags or --without-build-cppflags was given.
5262 if test "${with_build_cppflags+set}" = set; then
5263   withval="$with_build_cppflags"
5264   BUILD_CPPFLAGS="$withval"
5265 fi;
5266         echo "$as_me:5266: result: $BUILD_CPPFLAGS" >&5
5267 echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5268
5269         echo "$as_me:5269: checking for native build linker-flags" >&5
5270 echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5271
5272 # Check whether --with-build-ldflags or --without-build-ldflags was given.
5273 if test "${with_build_ldflags+set}" = set; then
5274   withval="$with_build_ldflags"
5275   BUILD_LDFLAGS="$withval"
5276 fi;
5277         echo "$as_me:5277: result: $BUILD_LDFLAGS" >&5
5278 echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5279
5280         echo "$as_me:5280: checking for native build linker-libraries" >&5
5281 echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5282
5283 # Check whether --with-build-libs or --without-build-libs was given.
5284 if test "${with_build_libs+set}" = set; then
5285   withval="$with_build_libs"
5286   BUILD_LIBS="$withval"
5287 fi;
5288         echo "$as_me:5288: result: $BUILD_LIBS" >&5
5289 echo "${ECHO_T}$BUILD_LIBS" >&6
5290
5291         # this assumes we're on Unix.
5292         BUILD_EXEEXT=
5293         BUILD_OBJEXT=o
5294
5295         : ${BUILD_CC:='${CC}'}
5296
5297         if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
5298                 { { echo "$as_me:5298: error: Cross-build requires two compilers.
5299 Use --with-build-cc to specify the native compiler." >&5
5300 echo "$as_me: error: Cross-build requires two compilers.
5301 Use --with-build-cc to specify the native compiler." >&2;}
5302    { (exit 1); exit 1; }; }
5303         fi
5304
5305 else
5306         : ${BUILD_CC:='${CC}'}
5307         : ${BUILD_CPP:='${CPP}'}
5308         : ${BUILD_CFLAGS:='${CFLAGS}'}
5309         : ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5310         : ${BUILD_LDFLAGS:='${LDFLAGS}'}
5311         : ${BUILD_LIBS:='${LIBS}'}
5312         : ${BUILD_EXEEXT:='$x'}
5313         : ${BUILD_OBJEXT:='o'}
5314 fi
5315
5316 ###############################################################################
5317
5318 ### Options to allow the user to specify the set of libraries which are used.
5319 ### Use "--without-normal --with-shared" to allow the default model to be
5320 ### shared, for example.
5321 cf_list_models=""
5322
5323 echo "$as_me:5323: checking if libtool -version-number should be used" >&5
5324 echo $ECHO_N "checking if libtool -version-number should be used... $ECHO_C" >&6
5325
5326 # Check whether --enable-libtool-version or --disable-libtool-version was given.
5327 if test "${enable_libtool_version+set}" = set; then
5328   enableval="$enable_libtool_version"
5329   test "$enableval" != no && enableval=yes
5330         if test "$enableval" != "yes" ; then
5331     cf_libtool_version=no
5332         else
5333                 cf_libtool_version=yes
5334         fi
5335 else
5336   enableval=yes
5337         cf_libtool_version=yes
5338
5339 fi;
5340 echo "$as_me:5340: result: $cf_libtool_version" >&5
5341 echo "${ECHO_T}$cf_libtool_version" >&6
5342
5343 if test "$cf_libtool_version" = yes ; then
5344         LIBTOOL_VERSION="-version-number"
5345 else
5346         LIBTOOL_VERSION="-version-info"
5347         case "x$VERSION" in
5348         (x)
5349                 { echo "$as_me:5349: WARNING: VERSION was not set" >&5
5350 echo "$as_me: WARNING: VERSION was not set" >&2;}
5351                 ;;
5352         (x*.*.*)
5353                 ABI_VERSION="$VERSION"
5354                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5355
5356 echo "${as_me:-configure}:5356: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5357
5358                 ;;
5359         (x*:*:*)
5360                 ABI_VERSION=`echo "$VERSION" | sed -e 's/:/./g'`
5361                 test -n "$verbose" && echo "    ABI_VERSION: $ABI_VERSION" 1>&6
5362
5363 echo "${as_me:-configure}:5363: testing ABI_VERSION: $ABI_VERSION ..." 1>&5
5364
5365                 ;;
5366         (*)
5367                 { echo "$as_me:5367: WARNING: unexpected VERSION value: $VERSION" >&5
5368 echo "$as_me: WARNING: unexpected VERSION value: $VERSION" >&2;}
5369                 ;;
5370         esac
5371 fi
5372
5373 LIBTOOL=
5374
5375 # common library maintenance symbols that are convenient for libtool scripts:
5376 LIB_CREATE='${AR} -cr'
5377 LIB_OBJECT='${OBJECTS}'
5378 LIB_SUFFIX=.a
5379 LIB_PREP="$RANLIB"
5380
5381 # symbols used to prop libtool up to enable it to determine what it should be
5382 # doing:
5383 LIB_CLEAN=
5384 LIB_COMPILE=
5385 LIB_LINK='${CC}'
5386 LIB_INSTALL=
5387 LIB_UNINSTALL=
5388
5389 echo "$as_me:5389: checking if you want to build libraries with libtool" >&5
5390 echo $ECHO_N "checking if you want to build libraries with libtool... $ECHO_C" >&6
5391
5392 # Check whether --with-libtool or --without-libtool was given.
5393 if test "${with_libtool+set}" = set; then
5394   withval="$with_libtool"
5395   with_libtool=$withval
5396 else
5397   with_libtool=no
5398 fi;
5399 echo "$as_me:5399: result: $with_libtool" >&5
5400 echo "${ECHO_T}$with_libtool" >&6
5401 if test "$with_libtool" != "no"; then
5402
5403         if test "$with_libtool" != "yes" ; then
5404
5405 if test "x$prefix" != xNONE; then
5406         cf_path_syntax="$prefix"
5407 else
5408         cf_path_syntax="$ac_default_prefix"
5409 fi
5410
5411 case ".$with_libtool" in
5412 (.\$\(*\)*|.\'*\'*)
5413         ;;
5414 (..|./*|.\\*)
5415         ;;
5416 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
5417         ;;
5418 (.\$\{*prefix\}*|.\$\{*dir\}*)
5419         eval with_libtool="$with_libtool"
5420         case ".$with_libtool" in
5421         (.NONE/*)
5422                 with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5423                 ;;
5424         esac
5425         ;;
5426 (.no|.NONE/*)
5427         with_libtool=`echo "$with_libtool" | sed -e s%NONE%$cf_path_syntax%`
5428         ;;
5429 (*)
5430         { { echo "$as_me:5430: error: expected a pathname, not \"$with_libtool\"" >&5
5431 echo "$as_me: error: expected a pathname, not \"$with_libtool\"" >&2;}
5432    { (exit 1); exit 1; }; }
5433         ;;
5434 esac
5435
5436                 LIBTOOL=$with_libtool
5437         else
5438                 if test -n "$ac_tool_prefix"; then
5439   for ac_prog in libtool glibtool
5440   do
5441     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5442 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5443 echo "$as_me:5443: checking for $ac_word" >&5
5444 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5445 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5446   echo $ECHO_N "(cached) $ECHO_C" >&6
5447 else
5448   if test -n "$LIBTOOL"; then
5449   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5450 else
5451   ac_save_IFS=$IFS; IFS=$ac_path_separator
5452 ac_dummy="$PATH"
5453 for ac_dir in $ac_dummy; do
5454   IFS=$ac_save_IFS
5455   test -z "$ac_dir" && ac_dir=.
5456   $as_executable_p "$ac_dir/$ac_word" || continue
5457 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5458 echo "$as_me:5458: found $ac_dir/$ac_word" >&5
5459 break
5460 done
5461
5462 fi
5463 fi
5464 LIBTOOL=$ac_cv_prog_LIBTOOL
5465 if test -n "$LIBTOOL"; then
5466   echo "$as_me:5466: result: $LIBTOOL" >&5
5467 echo "${ECHO_T}$LIBTOOL" >&6
5468 else
5469   echo "$as_me:5469: result: no" >&5
5470 echo "${ECHO_T}no" >&6
5471 fi
5472
5473     test -n "$LIBTOOL" && break
5474   done
5475 fi
5476 if test -z "$LIBTOOL"; then
5477   ac_ct_LIBTOOL=$LIBTOOL
5478   for ac_prog in libtool glibtool
5479 do
5480   # Extract the first word of "$ac_prog", so it can be a program name with args.
5481 set dummy $ac_prog; ac_word=$2
5482 echo "$as_me:5482: checking for $ac_word" >&5
5483 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5484 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5485   echo $ECHO_N "(cached) $ECHO_C" >&6
5486 else
5487   if test -n "$ac_ct_LIBTOOL"; then
5488   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5489 else
5490   ac_save_IFS=$IFS; IFS=$ac_path_separator
5491 ac_dummy="$PATH"
5492 for ac_dir in $ac_dummy; do
5493   IFS=$ac_save_IFS
5494   test -z "$ac_dir" && ac_dir=.
5495   $as_executable_p "$ac_dir/$ac_word" || continue
5496 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5497 echo "$as_me:5497: found $ac_dir/$ac_word" >&5
5498 break
5499 done
5500
5501 fi
5502 fi
5503 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5504 if test -n "$ac_ct_LIBTOOL"; then
5505   echo "$as_me:5505: result: $ac_ct_LIBTOOL" >&5
5506 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5507 else
5508   echo "$as_me:5508: result: no" >&5
5509 echo "${ECHO_T}no" >&6
5510 fi
5511
5512   test -n "$ac_ct_LIBTOOL" && break
5513 done
5514 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5515
5516   LIBTOOL=$ac_ct_LIBTOOL
5517 fi
5518
5519 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5520 then
5521         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.].*//'`
5522 else
5523         cf_cv_libtool_version=
5524 fi
5525 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5526
5527                 if test -z "$cf_cv_libtool_version" && test "$LIBTOOL" = libtool
5528                 then
5529
5530 unset ac_cv_prog_ac_ct_LIBTOOL
5531 unset ac_ct_LIBTOOL
5532 unset LIBTOOL
5533
5534                         if test -n "$ac_tool_prefix"; then
5535   for ac_prog in glibtool
5536   do
5537     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
5538 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
5539 echo "$as_me:5539: checking for $ac_word" >&5
5540 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5541 if test "${ac_cv_prog_LIBTOOL+set}" = set; then
5542   echo $ECHO_N "(cached) $ECHO_C" >&6
5543 else
5544   if test -n "$LIBTOOL"; then
5545   ac_cv_prog_LIBTOOL="$LIBTOOL" # Let the user override the test.
5546 else
5547   ac_save_IFS=$IFS; IFS=$ac_path_separator
5548 ac_dummy="$PATH"
5549 for ac_dir in $ac_dummy; do
5550   IFS=$ac_save_IFS
5551   test -z "$ac_dir" && ac_dir=.
5552   $as_executable_p "$ac_dir/$ac_word" || continue
5553 ac_cv_prog_LIBTOOL="$ac_tool_prefix$ac_prog"
5554 echo "$as_me:5554: found $ac_dir/$ac_word" >&5
5555 break
5556 done
5557
5558 fi
5559 fi
5560 LIBTOOL=$ac_cv_prog_LIBTOOL
5561 if test -n "$LIBTOOL"; then
5562   echo "$as_me:5562: result: $LIBTOOL" >&5
5563 echo "${ECHO_T}$LIBTOOL" >&6
5564 else
5565   echo "$as_me:5565: result: no" >&5
5566 echo "${ECHO_T}no" >&6
5567 fi
5568
5569     test -n "$LIBTOOL" && break
5570   done
5571 fi
5572 if test -z "$LIBTOOL"; then
5573   ac_ct_LIBTOOL=$LIBTOOL
5574   for ac_prog in glibtool
5575 do
5576   # Extract the first word of "$ac_prog", so it can be a program name with args.
5577 set dummy $ac_prog; ac_word=$2
5578 echo "$as_me:5578: checking for $ac_word" >&5
5579 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5580 if test "${ac_cv_prog_ac_ct_LIBTOOL+set}" = set; then
5581   echo $ECHO_N "(cached) $ECHO_C" >&6
5582 else
5583   if test -n "$ac_ct_LIBTOOL"; then
5584   ac_cv_prog_ac_ct_LIBTOOL="$ac_ct_LIBTOOL" # Let the user override the test.
5585 else
5586   ac_save_IFS=$IFS; IFS=$ac_path_separator
5587 ac_dummy="$PATH"
5588 for ac_dir in $ac_dummy; do
5589   IFS=$ac_save_IFS
5590   test -z "$ac_dir" && ac_dir=.
5591   $as_executable_p "$ac_dir/$ac_word" || continue
5592 ac_cv_prog_ac_ct_LIBTOOL="$ac_prog"
5593 echo "$as_me:5593: found $ac_dir/$ac_word" >&5
5594 break
5595 done
5596
5597 fi
5598 fi
5599 ac_ct_LIBTOOL=$ac_cv_prog_ac_ct_LIBTOOL
5600 if test -n "$ac_ct_LIBTOOL"; then
5601   echo "$as_me:5601: result: $ac_ct_LIBTOOL" >&5
5602 echo "${ECHO_T}$ac_ct_LIBTOOL" >&6
5603 else
5604   echo "$as_me:5604: result: no" >&5
5605 echo "${ECHO_T}no" >&6
5606 fi
5607
5608   test -n "$ac_ct_LIBTOOL" && break
5609 done
5610 test -n "$ac_ct_LIBTOOL" || ac_ct_LIBTOOL="none"
5611
5612   LIBTOOL=$ac_ct_LIBTOOL
5613 fi
5614
5615 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5616 then
5617         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.].*//'`
5618 else
5619         cf_cv_libtool_version=
5620 fi
5621 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5622
5623                 fi
5624         fi
5625         if test -z "$LIBTOOL" ; then
5626                 { { echo "$as_me:5626: error: Cannot find libtool" >&5
5627 echo "$as_me: error: Cannot find libtool" >&2;}
5628    { (exit 1); exit 1; }; }
5629         fi
5630         LIB_CREATE='${LIBTOOL} --mode=link ${CC} -rpath ${libdir} ${LIBTOOL_VERSION} `cut -f1 ${top_srcdir}/VERSION` ${LIBTOOL_OPTS} ${LT_UNDEF} $(LIBS) -o'
5631         LIB_OBJECT='${OBJECTS:.o=.lo}'
5632         LIB_SUFFIX=.la
5633         LIB_CLEAN='${LIBTOOL} --mode=clean'
5634         LIB_COMPILE='${LIBTOOL} --mode=compile'
5635         LIB_LINK='${LIBTOOL} --mode=link ${CC} ${LIBTOOL_OPTS}'
5636         LIB_INSTALL='${LIBTOOL} --mode=install'
5637         LIB_UNINSTALL='${LIBTOOL} --mode=uninstall'
5638         LIB_PREP=:
5639
5640 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5641 then
5642         echo "$as_me:5642: checking version of $LIBTOOL" >&5
5643 echo $ECHO_N "checking version of $LIBTOOL... $ECHO_C" >&6
5644
5645 if test -n "$LIBTOOL" && test "$LIBTOOL" != none
5646 then
5647         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.].*//'`
5648 else
5649         cf_cv_libtool_version=
5650 fi
5651 test -z "$cf_cv_libtool_version" && unset cf_cv_libtool_version
5652
5653         echo "$as_me:5653: result: $cf_cv_libtool_version" >&5
5654 echo "${ECHO_T}$cf_cv_libtool_version" >&6
5655         if test -n "$cf_cv_libtool_version"
5656         then
5657                 cf_check_libtool_version=`$LIBTOOL --version 2>&1 | sed -e '/^$/d' -e 's,[()],...,g' -e 's,[ ],-,g' -e '2,$d'`
5658                 case "x$cf_check_libtool_version" in
5659                 (*...GNU-libtool...*)
5660                         ;;
5661                 (*)
5662                         { { echo "$as_me:5662: error: This is not GNU libtool" >&5
5663 echo "$as_me: error: This is not GNU libtool" >&2;}
5664    { (exit 1); exit 1; }; }
5665                         ;;
5666                 esac
5667         else
5668                 { { echo "$as_me:5668: error: No version found for $LIBTOOL" >&5
5669 echo "$as_me: error: No version found for $LIBTOOL" >&2;}
5670    { (exit 1); exit 1; }; }
5671         fi
5672 else
5673         { { echo "$as_me:5673: error: GNU libtool has not been found" >&5
5674 echo "$as_me: error: GNU libtool has not been found" >&2;}
5675    { (exit 1); exit 1; }; }
5676 fi
5677
5678         # special hack to add -no-undefined (which libtool should do for itself)
5679         LT_UNDEF=
5680         case "$cf_cv_system_name" in
5681         (cygwin*|msys*|mingw32*|os2*|uwin*|aix[4-7])
5682                 LT_UNDEF=-no-undefined
5683                 ;;
5684         esac
5685
5686         # special hack to add --tag option for C++ compiler
5687         case "$cf_cv_libtool_version" in
5688         (1.[5-9]*|[2-9].[0-9.a-z]*)
5689                 LIBTOOL_CXX="$LIBTOOL --tag=CXX"
5690                 LIBTOOL="$LIBTOOL --tag=CC"
5691                 ;;
5692         (*)
5693                 LIBTOOL_CXX="$LIBTOOL"
5694                 ;;
5695         esac
5696 else
5697         LIBTOOL=""
5698         LIBTOOL_CXX=""
5699 fi
5700
5701 test -z "$LIBTOOL" && ECHO_LT=
5702
5703 if test "$with_libtool" != "no" ; then
5704
5705 cf_list_models="$cf_list_models libtool"
5706
5707 else
5708
5709 echo "$as_me:5709: checking if you want to build shared libraries" >&5
5710 echo $ECHO_N "checking if you want to build shared libraries... $ECHO_C" >&6
5711
5712 # Check whether --with-shared or --without-shared was given.
5713 if test "${with_shared+set}" = set; then
5714   withval="$with_shared"
5715   with_shared=$withval
5716 else
5717   with_shared=no
5718 fi;
5719 echo "$as_me:5719: result: $with_shared" >&5
5720 echo "${ECHO_T}$with_shared" >&6
5721 test "x$with_shared" = "xyes" && cf_list_models="$cf_list_models shared"
5722
5723 echo "$as_me:5723: checking if you want to build static libraries" >&5
5724 echo $ECHO_N "checking if you want to build static libraries... $ECHO_C" >&6
5725
5726 # Check whether --with-normal or --without-normal was given.
5727 if test "${with_normal+set}" = set; then
5728   withval="$with_normal"
5729   with_normal=$withval
5730 else
5731   with_normal=yes
5732 fi;
5733 echo "$as_me:5733: result: $with_normal" >&5
5734 echo "${ECHO_T}$with_normal" >&6
5735 test "x$with_normal" = "xyes" && cf_list_models="$cf_list_models normal"
5736
5737 echo "$as_me:5737: checking if you want to build debug libraries" >&5
5738 echo $ECHO_N "checking if you want to build debug libraries... $ECHO_C" >&6
5739
5740 # Check whether --with-debug or --without-debug was given.
5741 if test "${with_debug+set}" = set; then
5742   withval="$with_debug"
5743   with_debug=$withval
5744 else
5745   with_debug=yes
5746 fi;
5747 echo "$as_me:5747: result: $with_debug" >&5
5748 echo "${ECHO_T}$with_debug" >&6
5749 test "x$with_debug" = "xyes" && cf_list_models="$cf_list_models debug"
5750
5751 echo "$as_me:5751: checking if you want to build profiling libraries" >&5
5752 echo $ECHO_N "checking if you want to build profiling libraries... $ECHO_C" >&6
5753
5754 # Check whether --with-profile or --without-profile was given.
5755 if test "${with_profile+set}" = set; then
5756   withval="$with_profile"
5757   with_profile=$withval
5758 else
5759   with_profile=no
5760 fi;
5761 echo "$as_me:5761: result: $with_profile" >&5
5762 echo "${ECHO_T}$with_profile" >&6
5763 test "x$with_profile" = "xyes" && cf_list_models="$cf_list_models profile"
5764
5765 fi
5766
5767 if test "X$cf_with_cxx_binding" != Xno; then
5768 if test "x$with_shared" = "xyes"; then
5769 echo "$as_me:5769: checking if you want to build C++ shared libraries" >&5
5770 echo $ECHO_N "checking if you want to build C++ shared libraries... $ECHO_C" >&6
5771
5772 # Check whether --with-cxx-shared or --without-cxx-shared was given.
5773 if test "${with_cxx_shared+set}" = set; then
5774   withval="$with_cxx_shared"
5775   with_shared_cxx=$withval
5776 else
5777   with_shared_cxx=no
5778 fi;
5779 echo "$as_me:5779: result: $with_shared_cxx" >&5
5780 echo "${ECHO_T}$with_shared_cxx" >&6
5781 fi
5782 fi
5783
5784 ###############################################################################
5785
5786 echo "$as_me:5786: checking for specified models" >&5
5787 echo $ECHO_N "checking for specified models... $ECHO_C" >&6
5788 test -z "$cf_list_models" && cf_list_models=normal
5789 test "$with_libtool" != "no" && cf_list_models=libtool
5790 echo "$as_me:5790: result: $cf_list_models" >&5
5791 echo "${ECHO_T}$cf_list_models" >&6
5792
5793 ### Use the first model as the default, and save its suffix for use in building
5794 ### up test-applications.
5795 echo "$as_me:5795: checking for default model" >&5
5796 echo $ECHO_N "checking for default model... $ECHO_C" >&6
5797 DFT_LWR_MODEL=`echo "$cf_list_models" | $AWK '{print $1}'`
5798 echo "$as_me:5798: result: $DFT_LWR_MODEL" >&5
5799 echo "${ECHO_T}$DFT_LWR_MODEL" >&6
5800
5801 DFT_UPR_MODEL=`echo "$DFT_LWR_MODEL" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5802
5803 TICS_NAME=tic
5804
5805 TINFO_NAME=tinfo
5806
5807 LIB_NAME=ncurses
5808
5809 LIB_DIR=../lib
5810 LIB_2ND=../../lib
5811
5812 echo "$as_me:5812: checking if you want to have a library-prefix" >&5
5813 echo $ECHO_N "checking if you want to have a library-prefix... $ECHO_C" >&6
5814
5815 # Check whether --with-lib-prefix or --without-lib-prefix was given.
5816 if test "${with_lib_prefix+set}" = set; then
5817   withval="$with_lib_prefix"
5818   with_lib_prefix=$withval
5819 else
5820   with_lib_prefix=auto
5821 fi;
5822 echo "$as_me:5822: result: $with_lib_prefix" >&5
5823 echo "${ECHO_T}$with_lib_prefix" >&6
5824
5825 if test "$with_lib_prefix" = auto
5826 then
5827
5828         case "$cf_cv_system_name" in
5829         (OS/2*|os2*)
5830                 if test "$DFT_LWR_MODEL" = libtool; then
5831                         LIB_PREFIX='lib'
5832                 else
5833                         LIB_PREFIX=''
5834                 fi
5835                 ;;
5836         (*-msvc*)
5837                 LIB_PREFIX=''
5838                 ;;
5839         (*)     LIB_PREFIX='lib'
5840                 ;;
5841         esac
5842 cf_prefix=$LIB_PREFIX
5843
5844 elif test "$with_lib_prefix" = no
5845 then
5846         LIB_PREFIX=
5847 else
5848         LIB_PREFIX=$with_lib_prefix
5849 fi
5850
5851 LIB_SUFFIX=
5852
5853         echo "$as_me:5853: checking for PATH separator" >&5
5854 echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
5855         case "$cf_cv_system_name" in
5856         (os2*)  PATH_SEPARATOR=';'  ;;
5857         (*)     ${PATH_SEPARATOR:=':'}  ;;
5858         esac
5859
5860         echo "$as_me:5860: result: $PATH_SEPARATOR" >&5
5861 echo "${ECHO_T}$PATH_SEPARATOR" >&6
5862
5863 ###############################################################################
5864
5865 echo "$as_me:5865: checking if you want to build a separate terminfo library" >&5
5866 echo $ECHO_N "checking if you want to build a separate terminfo library... $ECHO_C" >&6
5867
5868 # Check whether --with-termlib or --without-termlib was given.
5869 if test "${with_termlib+set}" = set; then
5870   withval="$with_termlib"
5871   with_termlib=$withval
5872 else
5873   with_termlib=no
5874 fi;
5875 echo "$as_me:5875: result: $with_termlib" >&5
5876 echo "${ECHO_T}$with_termlib" >&6
5877
5878 echo "$as_me:5878: checking if you want to build a separate tic library" >&5
5879 echo $ECHO_N "checking if you want to build a separate tic library... $ECHO_C" >&6
5880
5881 # Check whether --with-ticlib or --without-ticlib was given.
5882 if test "${with_ticlib+set}" = set; then
5883   withval="$with_ticlib"
5884   with_ticlib=$withval
5885 else
5886   with_ticlib=no
5887 fi;
5888 echo "$as_me:5888: result: $with_ticlib" >&5
5889 echo "${ECHO_T}$with_ticlib" >&6
5890
5891 if test X"$CC_G_OPT" = X"" ; then
5892         CC_G_OPT='-g'
5893         test -n "$GCC" && test "x${ac_cv_prog_cc_g}" != xyes && CC_G_OPT=''
5894 fi
5895
5896 if test X"$CXX_G_OPT" = X"" ; then
5897         CXX_G_OPT='-g'
5898         test -n "$GXX" && test "x${ac_cv_prog_cxx_g}" != xyes && CXX_G_OPT=''
5899 fi
5900
5901 echo "$as_me:5901: checking for default loader flags" >&5
5902 echo $ECHO_N "checking for default loader flags... $ECHO_C" >&6
5903 case "$DFT_LWR_MODEL" in
5904 (libtool) LD_MODEL=''   ;;
5905 (normal)  LD_MODEL=''   ;;
5906 (debug)   LD_MODEL=$CC_G_OPT ;;
5907 (profile) LD_MODEL='-pg';;
5908 (shared)  LD_MODEL=''   ;;
5909 esac
5910 echo "$as_me:5910: result: $LD_MODEL" >&5
5911 echo "${ECHO_T}$LD_MODEL" >&6
5912
5913 case "$DFT_LWR_MODEL" in
5914 (shared)
5915
5916 echo "$as_me:5916: checking if rpath option should be used" >&5
5917 echo $ECHO_N "checking if rpath option should be used... $ECHO_C" >&6
5918
5919 # Check whether --enable-rpath or --disable-rpath was given.
5920 if test "${enable_rpath+set}" = set; then
5921   enableval="$enable_rpath"
5922   cf_cv_enable_rpath=$enableval
5923 else
5924   cf_cv_enable_rpath=no
5925 fi;
5926 echo "$as_me:5926: result: $cf_cv_enable_rpath" >&5
5927 echo "${ECHO_T}$cf_cv_enable_rpath" >&6
5928
5929 echo "$as_me:5929: checking if shared libraries should be relinked during install" >&5
5930 echo $ECHO_N "checking if shared libraries should be relinked during install... $ECHO_C" >&6
5931
5932 # Check whether --enable-relink or --disable-relink was given.
5933 if test "${enable_relink+set}" = set; then
5934   enableval="$enable_relink"
5935   cf_cv_do_relink=$enableval
5936 else
5937   cf_cv_do_relink=yes
5938 fi;
5939 echo "$as_me:5939: result: $cf_cv_do_relink" >&5
5940 echo "${ECHO_T}$cf_cv_do_relink" >&6
5941         ;;
5942 esac
5943
5944 # we will build libraries one-level down.
5945 rel_builddir=..
5946
5947 LD_RPATH_OPT=
5948 if test "x$cf_cv_enable_rpath" != xno
5949 then
5950         echo "$as_me:5950: checking for an rpath option" >&5
5951 echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
5952         case "$cf_cv_system_name" in
5953         (irix*)
5954                 if test "$GCC" = yes; then
5955                         LD_RPATH_OPT="-Wl,-rpath,"
5956                 else
5957                         LD_RPATH_OPT="-rpath "
5958                 fi
5959                 ;;
5960         (linux*|gnu*|k*bsd*-gnu|freebsd*)
5961                 LD_RPATH_OPT="-Wl,-rpath,"
5962                 ;;
5963         (openbsd[2-9].*|mirbsd*)
5964                 LD_RPATH_OPT="-Wl,-rpath,"
5965                 ;;
5966         (dragonfly*)
5967                 LD_RPATH_OPT="-rpath "
5968                 ;;
5969         (netbsd*)
5970                 LD_RPATH_OPT="-Wl,-rpath,"
5971                 ;;
5972         (osf*|mls+*)
5973                 LD_RPATH_OPT="-rpath "
5974                 ;;
5975         (solaris2*)
5976                 LD_RPATH_OPT="-R"
5977                 ;;
5978         (*)
5979                 ;;
5980         esac
5981         echo "$as_me:5981: result: $LD_RPATH_OPT" >&5
5982 echo "${ECHO_T}$LD_RPATH_OPT" >&6
5983
5984         case "x$LD_RPATH_OPT" in
5985         (x-R*)
5986                 echo "$as_me:5986: checking if we need a space after rpath option" >&5
5987 echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
5988                 cf_save_LIBS="$LIBS"
5989
5990 cf_add_libs="$LIBS"
5991 # reverse order
5992 cf_add_0lib=
5993 for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
5994 # filter duplicates
5995 for cf_add_1lib in $cf_add_0lib; do
5996         for cf_add_2lib in $cf_add_libs; do
5997                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
5998                         cf_add_1lib=
5999                         break
6000                 fi
6001         done
6002         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6003 done
6004 LIBS="$cf_add_libs"
6005
6006                 cat >"conftest.$ac_ext" <<_ACEOF
6007 #line 6007 "configure"
6008 #include "confdefs.h"
6009
6010 int
6011 main (void)
6012 {
6013
6014   ;
6015   return 0;
6016 }
6017 _ACEOF
6018 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6019 if { (eval echo "$as_me:6019: \"$ac_link\"") >&5
6020   (eval $ac_link) 2>&5
6021   ac_status=$?
6022   echo "$as_me:6022: \$? = $ac_status" >&5
6023   (exit "$ac_status"); } &&
6024          { ac_try='test -s "conftest$ac_exeext"'
6025   { (eval echo "$as_me:6025: \"$ac_try\"") >&5
6026   (eval $ac_try) 2>&5
6027   ac_status=$?
6028   echo "$as_me:6028: \$? = $ac_status" >&5
6029   (exit "$ac_status"); }; }; then
6030   cf_rpath_space=no
6031 else
6032   echo "$as_me: failed program was:" >&5
6033 cat "conftest.$ac_ext" >&5
6034 cf_rpath_space=yes
6035 fi
6036 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6037                 LIBS="$cf_save_LIBS"
6038                 echo "$as_me:6038: result: $cf_rpath_space" >&5
6039 echo "${ECHO_T}$cf_rpath_space" >&6
6040                 test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
6041                 ;;
6042         esac
6043 fi
6044
6045         RM_SHARED_OPTS=
6046         LOCAL_LDFLAGS=
6047         LOCAL_LDFLAGS2=
6048         LD_SHARED_OPTS=
6049         INSTALL_LIB="-m 644"
6050         : ${rel_builddir:=.}
6051
6052         shlibdir=$libdir
6053
6054         MAKE_DLLS="#"
6055
6056         cf_cv_do_symlinks=no
6057         cf_ld_rpath_opt=
6058         test "$cf_cv_enable_rpath" = yes && cf_ld_rpath_opt="$LD_RPATH_OPT"
6059
6060         echo "$as_me:6060: checking if release/abi version should be used for shared libs" >&5
6061 echo $ECHO_N "checking if release/abi version should be used for shared libs... $ECHO_C" >&6
6062
6063 # Check whether --with-shlib-version or --without-shlib-version was given.
6064 if test "${with_shlib_version+set}" = set; then
6065   withval="$with_shlib_version"
6066   test -z "$withval" && withval=auto
6067         case "$withval" in
6068         (yes)
6069                 cf_cv_shlib_version=auto
6070                 ;;
6071         (rel|abi|auto)
6072                 cf_cv_shlib_version=$withval
6073                 ;;
6074         (*)
6075                 echo "$as_me:6075: result: $withval" >&5
6076 echo "${ECHO_T}$withval" >&6
6077                 { { echo "$as_me:6077: error: option value must be one of: rel, abi, or auto" >&5
6078 echo "$as_me: error: option value must be one of: rel, abi, or auto" >&2;}
6079    { (exit 1); exit 1; }; }
6080                 ;;
6081         esac
6082
6083 else
6084   cf_cv_shlib_version=auto
6085 fi;
6086         echo "$as_me:6086: result: $cf_cv_shlib_version" >&5
6087 echo "${ECHO_T}$cf_cv_shlib_version" >&6
6088
6089         cf_cv_rm_so_locs=no
6090         cf_try_cflags=
6091
6092         # Some less-capable ports of gcc support only -fpic
6093         CC_SHARED_OPTS=
6094
6095         cf_try_fPIC=no
6096         if test "$GCC" = yes
6097         then
6098                 cf_try_fPIC=yes
6099         else
6100                 case "$cf_cv_system_name" in
6101                 (*linux*)       # e.g., PGI compiler
6102                         cf_try_fPIC=yes
6103                         ;;
6104                 esac
6105         fi
6106
6107         if test "$cf_try_fPIC" = yes
6108         then
6109                 echo "$as_me:6109: checking which $CC option to use" >&5
6110 echo $ECHO_N "checking which $CC option to use... $ECHO_C" >&6
6111                 cf_save_CFLAGS="$CFLAGS"
6112                 for CC_SHARED_OPTS in -fPIC -fpic ''
6113                 do
6114                         CFLAGS="$cf_save_CFLAGS $CC_SHARED_OPTS"
6115                         cat >"conftest.$ac_ext" <<_ACEOF
6116 #line 6116 "configure"
6117 #include "confdefs.h"
6118 #include <stdio.h>
6119 int
6120 main (void)
6121 {
6122 int x = 1
6123   ;
6124   return 0;
6125 }
6126 _ACEOF
6127 rm -f "conftest.$ac_objext"
6128 if { (eval echo "$as_me:6128: \"$ac_compile\"") >&5
6129   (eval $ac_compile) 2>&5
6130   ac_status=$?
6131   echo "$as_me:6131: \$? = $ac_status" >&5
6132   (exit "$ac_status"); } &&
6133          { ac_try='test -s "conftest.$ac_objext"'
6134   { (eval echo "$as_me:6134: \"$ac_try\"") >&5
6135   (eval $ac_try) 2>&5
6136   ac_status=$?
6137   echo "$as_me:6137: \$? = $ac_status" >&5
6138   (exit "$ac_status"); }; }; then
6139   break
6140 else
6141   echo "$as_me: failed program was:" >&5
6142 cat "conftest.$ac_ext" >&5
6143 fi
6144 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6145                 done
6146                 echo "$as_me:6146: result: $CC_SHARED_OPTS" >&5
6147 echo "${ECHO_T}$CC_SHARED_OPTS" >&6
6148                 CFLAGS="$cf_save_CFLAGS"
6149         fi
6150
6151         cf_cv_shlib_version_infix=no
6152
6153         case "$cf_cv_system_name" in
6154         (aix4.3-9*|aix[5-7]*)
6155                 if test "$GCC" = yes; then
6156                         CC_SHARED_OPTS='-Wl,-brtl'
6157                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6158                 else
6159                         CC_SHARED_OPTS='-brtl'
6160                         # as well as '-qpic=large -G' or perhaps "-bM:SRE -bnoentry -bexpall"
6161                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -G -Wl,-brtl -Wl,-blibpath:${RPATH_LIST}:/usr/lib -o $@'
6162                 fi
6163                 ;;
6164         (beos*)
6165                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -o $@ -Xlinker -soname=`basename $@` -nostart -e 0'
6166                 ;;
6167         (cygwin*)
6168                 CC_SHARED_OPTS=
6169                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6170                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6171                 cf_cv_shlib_version=cygdll
6172                 cf_cv_shlib_version_infix=cygdll
6173                 shlibdir=$bindir
6174                 MAKE_DLLS=
6175                 cat >mk_shared_lib.sh <<-CF_EOF
6176                 #!$SHELL
6177                 SHARED_LIB=\$1
6178                 IMPORT_LIB=\`echo "\$1" | sed -e 's/cyg/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6179                 shift
6180                 cat <<-EOF
6181                 Linking shared library
6182                 ** SHARED_LIB \$SHARED_LIB
6183                 ** IMPORT_LIB \$IMPORT_LIB
6184 EOF
6185                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6186 CF_EOF
6187                 chmod +x mk_shared_lib.sh
6188                 ;;
6189         (msys*)
6190                 CC_SHARED_OPTS=
6191                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6192                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6193                 cf_cv_shlib_version=msysdll
6194                 cf_cv_shlib_version_infix=msysdll
6195                 shlibdir=$bindir
6196                 MAKE_DLLS=
6197                 cat >mk_shared_lib.sh <<-CF_EOF
6198                 #!$SHELL
6199                 SHARED_LIB=\$1
6200                 IMPORT_LIB=\`echo "\$1" | sed -e 's/msys-/lib/' -e 's/[0-9]*\.dll$/.dll.a/'\`
6201                 shift
6202                 cat <<-EOF
6203                 Linking shared library
6204                 ** SHARED_LIB \$SHARED_LIB
6205                 ** IMPORT_LIB \$IMPORT_LIB
6206 EOF
6207                 exec \$* ${LDFLAGS} -shared -Wl,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6208 CF_EOF
6209                 chmod +x mk_shared_lib.sh
6210                 ;;
6211         (darwin*)
6212                 cf_try_cflags="no-cpp-precomp"
6213                 CC_SHARED_OPTS="-dynamic"
6214                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dynamiclib -install_name ${libdir}/`basename $@` -compatibility_version ${ABI_VERSION} -current_version ${ABI_VERSION} -o $@'
6215                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=abi
6216                 cf_cv_shlib_version_infix=yes
6217                 echo "$as_me:6217: checking if ld -search_paths_first works" >&5
6218 echo $ECHO_N "checking if ld -search_paths_first works... $ECHO_C" >&6
6219 if test "${cf_cv_ldflags_search_paths_first+set}" = set; then
6220   echo $ECHO_N "(cached) $ECHO_C" >&6
6221 else
6222
6223                         cf_save_LDFLAGS=$LDFLAGS
6224                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6225                         cat >"conftest.$ac_ext" <<_ACEOF
6226 #line 6226 "configure"
6227 #include "confdefs.h"
6228
6229 int
6230 main (void)
6231 {
6232 int i;
6233   ;
6234   return 0;
6235 }
6236 _ACEOF
6237 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6238 if { (eval echo "$as_me:6238: \"$ac_link\"") >&5
6239   (eval $ac_link) 2>&5
6240   ac_status=$?
6241   echo "$as_me:6241: \$? = $ac_status" >&5
6242   (exit "$ac_status"); } &&
6243          { ac_try='test -s "conftest$ac_exeext"'
6244   { (eval echo "$as_me:6244: \"$ac_try\"") >&5
6245   (eval $ac_try) 2>&5
6246   ac_status=$?
6247   echo "$as_me:6247: \$? = $ac_status" >&5
6248   (exit "$ac_status"); }; }; then
6249   cf_cv_ldflags_search_paths_first=yes
6250 else
6251   echo "$as_me: failed program was:" >&5
6252 cat "conftest.$ac_ext" >&5
6253 cf_cv_ldflags_search_paths_first=no
6254 fi
6255 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6256                                 LDFLAGS=$cf_save_LDFLAGS
6257 fi
6258 echo "$as_me:6258: result: $cf_cv_ldflags_search_paths_first" >&5
6259 echo "${ECHO_T}$cf_cv_ldflags_search_paths_first" >&6
6260                 if test "$cf_cv_ldflags_search_paths_first" = yes; then
6261                         LDFLAGS="$LDFLAGS -Wl,-search_paths_first"
6262                 fi
6263                 ;;
6264         (haiku*)
6265
6266         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6267         if test "$cf_cv_shlib_version" = rel; then
6268                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6269         else
6270                 cf_cv_shared_soname='`basename $@`'
6271         fi
6272
6273                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6274                 ;;
6275         (hpux[7-8]*)
6276                 # HP-UX 8.07 ld lacks "+b" option used for libdir search-list
6277                 if test "$GCC" != yes; then
6278                         CC_SHARED_OPTS='+Z'
6279                 fi
6280                 MK_SHARED_LIB='${LD} ${LDFLAGS} -b -o $@'
6281                 INSTALL_LIB="-m 555"
6282                 ;;
6283         (hpux*)
6284                 # (tested with gcc 2.7.2 -- I don't have c89)
6285                 if test "$GCC" = yes; then
6286                         LD_SHARED_OPTS='-Xlinker +b -Xlinker ${libdir}'
6287                 else
6288                         CC_SHARED_OPTS='+Z'
6289                         LD_SHARED_OPTS='-Wl,+b,${libdir}'
6290                 fi
6291                 MK_SHARED_LIB='${LD} ${LDFLAGS} +b ${libdir} -b -o $@'
6292                 # HP-UX shared libraries must be executable, and should be
6293                 # readonly to exploit a quirk in the memory manager.
6294                 INSTALL_LIB="-m 555"
6295                 ;;
6296         (interix*)
6297                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6298                 if test "$cf_cv_shlib_version" = rel; then
6299                         cf_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6300                 else
6301                         cf_shared_soname='`basename $@`'
6302                 fi
6303                 CC_SHARED_OPTS=
6304                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-rpath,${RPATH_LIST} -Wl,-h,'$cf_shared_soname' -o $@'
6305                 ;;
6306         (irix*)
6307                 if test "$cf_cv_enable_rpath" = yes ; then
6308                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6309                 fi
6310                 # tested with IRIX 5.2 and 'cc'.
6311                 if test "$GCC" != yes; then
6312                         CC_SHARED_OPTS='-KPIC'
6313                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -rdata_shared -soname `basename $@` -o $@'
6314                 else
6315                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,`basename $@` -o $@'
6316                 fi
6317                 cf_cv_rm_so_locs=yes
6318                 ;;
6319         (linux*|gnu*|k*bsd*-gnu)
6320                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6321                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6322                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6323                 fi
6324                 if test "$cf_cv_enable_rpath" = yes ; then
6325                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6326                 fi
6327
6328         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6329         if test "$cf_cv_shlib_version" = rel; then
6330                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6331         else
6332                 cf_cv_shared_soname='`basename $@`'
6333         fi
6334
6335                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6336                 ;;
6337         (mingw*msvc*)
6338                 cf_cv_shlib_version=msvcdll
6339                 cf_cv_shlib_version_infix=msvcdll
6340                 shlibdir=$bindir
6341                 MAKE_DLLS=
6342                 if test "$DFT_LWR_MODEL" = "shared" ; then
6343                         LOCAL_LDFLAGS="-link -dll"
6344                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6345                         EXTRA_LDFLAGS="-link -dll $EXTRA_LDFLAGS"
6346                 fi
6347                 CC_SHARED_OPTS=
6348                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${LD} ${CFLAGS}'
6349                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.lib"
6350                 cat >mk_shared_lib.sh <<-CF_EOF
6351                 #!$SHELL
6352                 SHARED_LIB=\$1
6353                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.lib/'\`
6354                 shift
6355                 my_ld=\$1
6356                 shift
6357                 cat <<-EOF
6358                 Linking shared library
6359                 ** SHARED LIB \$SHARED_LIB
6360                 ** IMPORT_LIB \$IMPORT_LIB
6361 EOF
6362                 args=\$(echo \$* | sed -E "s#-l(\w*)#\1.dll.lib#g" | sed -E "s#-L(\w*)#-LIBPATH:\1#g")
6363                 exec \$my_ld -DLL -IMPLIB:"\${IMPORT_LIB}" -OUT:"\${SHARED_LIB}" ${LDFLAGS} \$args
6364                 mv "\${IMPORT_LIB}" "\${IMPORT_LIB}"
6365 CF_EOF
6366                 chmod +x mk_shared_lib.sh
6367                 cat >mk_prog.sh <<-CF_EOF
6368                 #!$SHELL
6369                 shift
6370                 # Ignore first argument (compiler) and use LD (link.exe) unconditionally
6371                 LD="$LD"
6372                 clopts=()
6373                 ldopts=("/subsystem:console")
6374                 libs=()
6375                 isdll=0
6376                 while test \$# -gt 0; do
6377                         case "\$1" in
6378                                 -link)
6379                                         # ignore -link argument
6380                                         ;;
6381                                 -M[TD] | -M[TD]d)
6382                                         # ignore runtime-library option
6383                                         ;;
6384                                 -dll)
6385                                         isdll=1
6386                                         ;;
6387                                 -W* | -w*)
6388                                         # ignore warnings
6389                                         ;;
6390                                 -D*)
6391                                         clopts+=("\$1")
6392                                         ;;
6393                                 -I*)
6394                                         clopts+=("\$1")
6395                                         ;;
6396                                 -l*)
6397                                         libs+=("\`echo \"\$1\" | sed \"s/^-l//\"\`")
6398                                         ;;
6399                                 -L*)
6400                                         ldopts+=("\`echo \"\$1\" | sed \"s/^-L/-LIBPATH:/\"\`")
6401                                         ;;
6402                                 *.obj | *.o)
6403                                         ldopts+=("\$1")
6404                                         ;;
6405                                 -Wl,*)
6406                                         for linkarg in \`echo '\$1' | sed -e 's/-Wl,//' -e 's/,/ /'\`; do
6407                                                 ldopts+=("\${linkarg}")
6408                                         done
6409                                         ;;
6410                                 *.lib)
6411                                         ldopts+=("\$1")
6412                                         ;;
6413                                 -o)
6414                                         shift
6415                                         ldopts+=("-out:\$1")
6416                                         ;;
6417                                 *)
6418                                         clopts+=("\$1")
6419                                         ldopts+=("\$1")
6420                                         ;;
6421                         esac
6422                         shift
6423                 done
6424                 if [ "\$isdll" -ne 0 ]; then
6425                         for lib in \${libs[*]}; do
6426                                 ldopts+=("\$lib.dll.lib")
6427                         done
6428                 else
6429                         for lib in \${libs[*]}; do
6430                                 ldopts+=("\$lib.lib")
6431                         done
6432                 fi
6433                 cat <<-EOF
6434                 Creating program
6435                 ** ld options:   "\${ldopts[@]}"
6436 EOF
6437                 exec \$LD \${ldopts[@]}
6438 CF_EOF
6439                 chmod +x mk_prog.sh
6440                 LINK_PROGS="$SHELL ${rel_builddir}/mk_prog.sh"
6441                 LINK_TESTS="$SHELL ${rel_builddir}/mk_prog.sh"
6442                 ;;
6443         (mingw*)
6444                 cf_cv_shlib_version=mingw
6445                 cf_cv_shlib_version_infix=mingw
6446                 shlibdir=$bindir
6447                 MAKE_DLLS=
6448                 if test "$DFT_LWR_MODEL" = "shared" ; then
6449                         LOCAL_LDFLAGS="-Wl,--enable-auto-import"
6450                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6451                         EXTRA_LDFLAGS="-Wl,--enable-auto-import $EXTRA_LDFLAGS"
6452                 fi
6453                 CC_SHARED_OPTS=
6454                 MK_SHARED_LIB=$SHELL' '$rel_builddir'/mk_shared_lib.sh $@ ${CC} ${CFLAGS}'
6455                 RM_SHARED_OPTS="$RM_SHARED_OPTS $rel_builddir/mk_shared_lib.sh *.dll.a"
6456                 cat >mk_shared_lib.sh <<-CF_EOF
6457                 #!$SHELL
6458                 SHARED_LIB=\$1
6459                 IMPORT_LIB=\`echo "\$1" | sed -e 's/[0-9]*\.dll$/.dll.a/'\`
6460                 shift
6461                 cat <<-EOF
6462                 Linking shared library
6463                 ** SHARED_LIB \$SHARED_LIB
6464                 ** IMPORT_LIB \$IMPORT_LIB
6465 EOF
6466                 exec \$* ${LDFLAGS} -shared -Wl,--enable-auto-import,--out-implib=\${IMPORT_LIB} -Wl,--export-all-symbols -o \${SHARED_LIB}
6467 CF_EOF
6468                 chmod +x mk_shared_lib.sh
6469                 ;;
6470         (openbsd[2-9].*|mirbsd*)
6471                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6472                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6473                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6474                 fi
6475                 if test "$cf_cv_enable_rpath" = yes ; then
6476                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6477                 fi
6478                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6479
6480         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6481         if test "$cf_cv_shlib_version" = rel; then
6482                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6483         else
6484                 cf_cv_shared_soname='`basename $@`'
6485         fi
6486
6487                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-Bshareable,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6488                 ;;
6489         (nskJ*)
6490                 CC_SHARED_OPTS=
6491                 MK_SHARED_LIB='${LD} -Wshared -Weld=-export_all -o $@'
6492                 ;;
6493         (nskL*)
6494                 CC_SHARED_OPTS=
6495                 MK_SHARED_LIB='${LD} -Wshared -Wxld=-export_all -o $@'
6496                 ;;
6497         (nto-qnx*|openbsd*|freebsd[12].*)
6498                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6499                 MK_SHARED_LIB='${LD} ${LDFLAGS} -Bshareable -o $@'
6500                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6501                 ;;
6502         (dragonfly*|freebsd*)
6503                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6504                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6505                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6506                         LOCAL_LDFLAGS2="${cf_ld_rpath_opt}\${RPATH_LIST} $LOCAL_LDFLAGS"
6507                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6508                 fi
6509
6510         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6511         if test "$cf_cv_shlib_version" = rel; then
6512                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6513         else
6514                 cf_cv_shared_soname='`basename $@`'
6515         fi
6516
6517                 MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname',-stats,-lc -o $@'
6518                 ;;
6519         (netbsd*)
6520                 CC_SHARED_OPTS="$CC_SHARED_OPTS -DPIC"
6521                 if test "$DFT_LWR_MODEL" = "shared" && test "$cf_cv_enable_rpath" = yes ; then
6522                         LOCAL_LDFLAGS="${cf_ld_rpath_opt}\$(LOCAL_LIBDIR)"
6523                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6524                         EXTRA_LDFLAGS="${cf_ld_rpath_opt}\${RPATH_LIST} $EXTRA_LDFLAGS"
6525                         if test "$cf_cv_shlib_version" = auto; then
6526                         if test -f /usr/libexec/ld.elf_so; then
6527                                 cf_cv_shlib_version=abi
6528                         else
6529                                 cf_cv_shlib_version=rel
6530                         fi
6531                         fi
6532
6533         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6534         if test "$cf_cv_shlib_version" = rel; then
6535                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6536         else
6537                 cf_cv_shared_soname='`basename $@`'
6538         fi
6539
6540                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -Wl,-soname,'$cf_cv_shared_soname' -o $@'
6541                 else
6542                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -o $@'
6543                 fi
6544                 ;;
6545         (osf*|mls+*)
6546                 # tested with OSF/1 V3.2 and 'cc'
6547                 # tested with OSF/1 V3.2 and gcc 2.6.3 (but the c++ demo didn't
6548                 # link with shared libs).
6549                 MK_SHARED_LIB='${LD} ${LDFLAGS} -set_version ${REL_VERSION}:${ABI_VERSION} -expect_unresolved "*" -shared -soname `basename $@`'
6550                 case "$host_os" in
6551                 (osf4*)
6552                         MK_SHARED_LIB="${MK_SHARED_LIB} -msym"
6553                         ;;
6554                 esac
6555                 MK_SHARED_LIB="${MK_SHARED_LIB}"' -o $@'
6556                 if test "$DFT_LWR_MODEL" = "shared" && test -n "$LD_RPATH_OPT" ; then
6557                         LOCAL_LDFLAGS="${LD_RPATH_OPT}\$(LOCAL_LIBDIR)"
6558                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6559                 fi
6560                 cf_cv_rm_so_locs=yes
6561                 ;;
6562         (sco3.2v5*)  # also uw2* and UW7: hops 13-Apr-98
6563                 # tested with osr5.0.5
6564                 if test "$GCC" != yes; then
6565                         CC_SHARED_OPTS='-belf -KPIC'
6566                 fi
6567                 MK_SHARED_LIB='${LD} ${LDFLAGS} -dy -G -h `basename $@ .${REL_VERSION}`.${ABI_VERSION} -o $@'
6568                 if test "$cf_cv_enable_rpath" = yes ; then
6569                         # only way is to set LD_RUN_PATH but no switch for it
6570                         RUN_PATH=$libdir
6571                 fi
6572                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6573                 LINK_PROGS='LD_RUN_PATH=${libdir}'
6574                 LINK_TESTS='Pwd=`pwd`;LD_RUN_PATH=`dirname $${Pwd}`/lib'
6575                 ;;
6576         (sunos4*)
6577                 # tested with SunOS 4.1.1 and gcc 2.7.0
6578                 if test "$GCC" != yes; then
6579                         CC_SHARED_OPTS='-KPIC'
6580                 fi
6581                 MK_SHARED_LIB='${LD} ${LDFLAGS} -assert pure-text -o $@'
6582                 test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6583                 ;;
6584         (solaris2*)
6585                 # tested with SunOS 5.5.1 (solaris 2.5.1) and gcc 2.7.2
6586                 # tested with SunOS 5.10 (solaris 10) and gcc 3.4.3
6587                 if test "$DFT_LWR_MODEL" = "shared" ; then
6588                         LOCAL_LDFLAGS="-R \$(LOCAL_LIBDIR):\${libdir}"
6589                         LOCAL_LDFLAGS2="$LOCAL_LDFLAGS"
6590                 fi
6591                 if test "$cf_cv_enable_rpath" = yes ; then
6592                         EXTRA_LDFLAGS="-R \${libdir} $EXTRA_LDFLAGS"
6593                 fi
6594
6595         test "$cf_cv_shlib_version" = auto && cf_cv_shlib_version=rel
6596         if test "$cf_cv_shlib_version" = rel; then
6597                 cf_cv_shared_soname='`basename $@ .${REL_VERSION}`.${ABI_VERSION}'
6598         else
6599                 cf_cv_shared_soname='`basename $@`'
6600         fi
6601
6602                 if test "$GCC" != yes; then
6603                         cf_save_CFLAGS="$CFLAGS"
6604                         for cf_shared_opts in -xcode=pic32 -xcode=pic13 -KPIC -Kpic -O
6605                         do
6606                                 CFLAGS="$cf_shared_opts $cf_save_CFLAGS"
6607                                 cat >"conftest.$ac_ext" <<_ACEOF
6608 #line 6608 "configure"
6609 #include "confdefs.h"
6610 #include <stdio.h>
6611 int
6612 main (void)
6613 {
6614 printf("Hello\\n");
6615   ;
6616   return 0;
6617 }
6618 _ACEOF
6619 rm -f "conftest.$ac_objext"
6620 if { (eval echo "$as_me:6620: \"$ac_compile\"") >&5
6621   (eval $ac_compile) 2>&5
6622   ac_status=$?
6623   echo "$as_me:6623: \$? = $ac_status" >&5
6624   (exit "$ac_status"); } &&
6625          { ac_try='test -s "conftest.$ac_objext"'
6626   { (eval echo "$as_me:6626: \"$ac_try\"") >&5
6627   (eval $ac_try) 2>&5
6628   ac_status=$?
6629   echo "$as_me:6629: \$? = $ac_status" >&5
6630   (exit "$ac_status"); }; }; then
6631   break
6632 else
6633   echo "$as_me: failed program was:" >&5
6634 cat "conftest.$ac_ext" >&5
6635 fi
6636 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6637                         done
6638                         CFLAGS="$cf_save_CFLAGS"
6639                         CC_SHARED_OPTS=$cf_shared_opts
6640                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -dy -G -h '$cf_cv_shared_soname' -o $@'
6641                 else
6642                         MK_SHARED_LIB='${CC} ${LDFLAGS} ${CFLAGS} -shared -dy -G -h '$cf_cv_shared_soname' -o $@'
6643                 fi
6644                 ;;
6645         (sysv5uw7*|unix_sv*)
6646                 # tested with UnixWare 7.1.0 (gcc 2.95.2 and cc)
6647                 if test "$GCC" != yes; then
6648                         CC_SHARED_OPTS='-KPIC'
6649                 fi
6650                 MK_SHARED_LIB='${LD} ${LDFLAGS} -d y -G -o $@'
6651                 ;;
6652         (*)
6653                 CC_SHARED_OPTS='unknown'
6654                 MK_SHARED_LIB='echo unknown'
6655                 ;;
6656         esac
6657
6658         # This works if the last tokens in $MK_SHARED_LIB are the -o target.
6659         case "$cf_cv_shlib_version" in
6660         (rel|abi)
6661                 case "$MK_SHARED_LIB" in
6662                 (*'-o $@')
6663                         test "$cf_cv_do_symlinks" = no && cf_cv_do_symlinks=yes
6664                         ;;
6665                 (*)
6666                         { echo "$as_me:6666: WARNING: ignored --with-shlib-version" >&5
6667 echo "$as_me: WARNING: ignored --with-shlib-version" >&2;}
6668                         ;;
6669                 esac
6670                 ;;
6671         esac
6672
6673         if test -n "$cf_try_cflags"
6674         then
6675 cat > conftest.$ac_ext <<EOF
6676 #line 6676 "${as_me:-configure}"
6677 #include <stdio.h>
6678 int main(int argc, char *argv[])
6679 {
6680         printf("hello\\n");
6681         return (argv[argc-1] == 0) ;
6682 }
6683 EOF
6684                 cf_save_CFLAGS="$CFLAGS"
6685                 for cf_opt in $cf_try_cflags
6686                 do
6687                         CFLAGS="$cf_save_CFLAGS -$cf_opt"
6688                         echo "$as_me:6688: checking if CFLAGS option -$cf_opt works" >&5
6689 echo $ECHO_N "checking if CFLAGS option -$cf_opt works... $ECHO_C" >&6
6690                         if { (eval echo "$as_me:6690: \"$ac_compile\"") >&5
6691   (eval $ac_compile) 2>&5
6692   ac_status=$?
6693   echo "$as_me:6693: \$? = $ac_status" >&5
6694   (exit "$ac_status"); }; then
6695                                 echo "$as_me:6695: result: yes" >&5
6696 echo "${ECHO_T}yes" >&6
6697                                 cf_save_CFLAGS="$CFLAGS"
6698                         else
6699                                 echo "$as_me:6699: result: no" >&5
6700 echo "${ECHO_T}no" >&6
6701                         fi
6702                 done
6703                 CFLAGS="$cf_save_CFLAGS"
6704         fi
6705
6706         # RPATH_LIST is a colon-separated list of directories
6707         test -n "$cf_ld_rpath_opt" && MK_SHARED_LIB="$MK_SHARED_LIB $cf_ld_rpath_opt\${RPATH_LIST}"
6708         test -z "$RPATH_LIST" && RPATH_LIST="\${libdir}"
6709
6710         test "$cf_cv_rm_so_locs" = yes && RM_SHARED_OPTS="$RM_SHARED_OPTS so_locations"
6711
6712         test -n "$verbose" && echo "    CC_SHARED_OPTS: $CC_SHARED_OPTS" 1>&6
6713
6714 echo "${as_me:-configure}:6714: testing CC_SHARED_OPTS: $CC_SHARED_OPTS ..." 1>&5
6715
6716         test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6717
6718 echo "${as_me:-configure}:6718: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6719
6720 for model in $cf_list_models ; do
6721         case "$model" in
6722         (libtool)
6723
6724 echo "$as_me:6724: checking for additional libtool options" >&5
6725 echo $ECHO_N "checking for additional libtool options... $ECHO_C" >&6
6726
6727 # Check whether --with-libtool-opts or --without-libtool-opts was given.
6728 if test "${with_libtool_opts+set}" = set; then
6729   withval="$with_libtool_opts"
6730   with_libtool_opts=$withval
6731 else
6732   with_libtool_opts=no
6733 fi;
6734 echo "$as_me:6734: result: $with_libtool_opts" >&5
6735 echo "${ECHO_T}$with_libtool_opts" >&6
6736
6737 case .$with_libtool_opts in
6738 (.yes|.no|.)
6739         ;;
6740 (*)
6741         LIBTOOL_OPTS="$LIBTOOL_OPTS $with_libtool_opts"
6742         ;;
6743 esac
6744
6745 echo "$as_me:6745: checking if exported-symbols file should be used" >&5
6746 echo $ECHO_N "checking if exported-symbols file should be used... $ECHO_C" >&6
6747
6748 # Check whether --with-export-syms or --without-export-syms was given.
6749 if test "${with_export_syms+set}" = set; then
6750   withval="$with_export_syms"
6751   with_export_syms=$withval
6752 else
6753   with_export_syms=no
6754 fi;
6755 if test "x$with_export_syms" = xyes
6756 then
6757         with_export_syms='${top_srcdir}/package/${PACKAGE}.sym'
6758
6759 fi
6760 echo "$as_me:6760: result: $with_export_syms" >&5
6761 echo "${ECHO_T}$with_export_syms" >&6
6762 if test "x$with_export_syms" != xno
6763 then
6764         EXPORT_SYMS="-export-symbols $with_export_syms"
6765
6766 fi
6767
6768                 ;;
6769         (shared)
6770                 if test "$CC_SHARED_OPTS" = "unknown"; then
6771                         { { echo "$as_me:6771: error: Shared libraries are not supported in this version" >&5
6772 echo "$as_me: error: Shared libraries are not supported in this version" >&2;}
6773    { (exit 1); exit 1; }; }
6774                 fi
6775                 # workaround for inept transition to PIE vs PIC...
6776                 echo "$as_me:6776: checking if current CFLAGS link properly" >&5
6777 echo $ECHO_N "checking if current CFLAGS link properly... $ECHO_C" >&6
6778                 cat >"conftest.$ac_ext" <<_ACEOF
6779 #line 6779 "configure"
6780 #include "confdefs.h"
6781 #include <stdio.h>
6782 int
6783 main (void)
6784 {
6785 printf("Hello work\\n");
6786   ;
6787   return 0;
6788 }
6789 _ACEOF
6790 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6791 if { (eval echo "$as_me:6791: \"$ac_link\"") >&5
6792   (eval $ac_link) 2>&5
6793   ac_status=$?
6794   echo "$as_me:6794: \$? = $ac_status" >&5
6795   (exit "$ac_status"); } &&
6796          { ac_try='test -s "conftest$ac_exeext"'
6797   { (eval echo "$as_me:6797: \"$ac_try\"") >&5
6798   (eval $ac_try) 2>&5
6799   ac_status=$?
6800   echo "$as_me:6800: \$? = $ac_status" >&5
6801   (exit "$ac_status"); }; }; then
6802   cf_cflags_work=yes
6803 else
6804   echo "$as_me: failed program was:" >&5
6805 cat "conftest.$ac_ext" >&5
6806 cf_cflags_work=no
6807 fi
6808 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6809                 echo "$as_me:6809: result: $cf_cflags_work" >&5
6810 echo "${ECHO_T}$cf_cflags_work" >&6
6811                 if test "$cf_cflags_work" = no
6812                 then
6813                         test -n "$verbose" && echo "    try to work around by appending shared-options" 1>&6
6814
6815 echo "${as_me:-configure}:6815: testing try to work around by appending shared-options ..." 1>&5
6816
6817                         CFLAGS="$CFLAGS $CC_SHARED_OPTS"
6818                 fi
6819
6820 echo "$as_me:6820: checking if versioned-symbols file should be used" >&5
6821 echo $ECHO_N "checking if versioned-symbols file should be used... $ECHO_C" >&6
6822
6823 # Check whether --with-versioned-syms or --without-versioned-syms was given.
6824 if test "${with_versioned_syms+set}" = set; then
6825   withval="$with_versioned_syms"
6826   with_versioned_syms=$withval
6827 else
6828   with_versioned_syms=no
6829 fi;
6830 case "x$with_versioned_syms" in
6831 (xyes)
6832         with_versioned_syms='${top_srcdir}/package/${PACKAGE}.map'
6833
6834         ;;
6835 (xno)
6836         ;;
6837 (x/*)
6838         test -f "$with_versioned_syms" || { { echo "$as_me:6838: error: expected a filename: $with_versioned_syms" >&5
6839 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6840    { (exit 1); exit 1; }; }
6841         ;;
6842 (*)
6843         test -f "$with_versioned_syms" || { { echo "$as_me:6843: error: expected a filename: $with_versioned_syms" >&5
6844 echo "$as_me: error: expected a filename: $with_versioned_syms" >&2;}
6845    { (exit 1); exit 1; }; }
6846         with_versioned_syms=`pwd`/"$with_versioned_syms"
6847         ;;
6848 esac
6849 echo "$as_me:6849: result: $with_versioned_syms" >&5
6850 echo "${ECHO_T}$with_versioned_syms" >&6
6851
6852 RESULTING_SYMS=
6853 VERSIONED_SYMS=
6854 WILDCARD_SYMS=
6855
6856 if test "x$with_versioned_syms" != xno
6857 then
6858         RESULTING_SYMS=$with_versioned_syms
6859         case "x$MK_SHARED_LIB" in
6860         (*-Wl,*)
6861                 VERSIONED_SYMS="-Wl,--version-script,\${RESULTING_SYMS}"
6862                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-Wl,%\\${VERSIONED_SYMS} -Wl,%"`
6863                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6864
6865 echo "${as_me:-configure}:6865: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6866
6867                 ;;
6868         (*-dy\ *)
6869                 VERSIONED_SYMS="-Wl,-M,\${RESULTING_SYMS}"
6870                 MK_SHARED_LIB=`echo "$MK_SHARED_LIB" | sed -e "s%-dy%\\${VERSIONED_SYMS} -dy%"`
6871                 test -n "$verbose" && echo "    MK_SHARED_LIB:  $MK_SHARED_LIB" 1>&6
6872
6873 echo "${as_me:-configure}:6873: testing MK_SHARED_LIB:  $MK_SHARED_LIB ..." 1>&5
6874
6875                 ;;
6876         (*)
6877                 { echo "$as_me:6877: WARNING: this system does not support versioned-symbols" >&5
6878 echo "$as_me: WARNING: this system does not support versioned-symbols" >&2;}
6879                 ;;
6880         esac
6881
6882         # Linux ld can selectively override scope, e.g., of symbols beginning with
6883         # "_" by first declaring some as global, and then using a wildcard to
6884         # declare the others as local.  Some other loaders cannot do this.  Check
6885         # by constructing a (very) simple shared library and inspecting its
6886         # symbols.
6887         if test "x$VERSIONED_SYMS" != "x"
6888         then
6889                 echo "$as_me:6889: checking if wildcards can be used to selectively omit symbols" >&5
6890 echo $ECHO_N "checking if wildcards can be used to selectively omit symbols... $ECHO_C" >&6
6891                 WILDCARD_SYMS=no
6892
6893                 # make sources
6894                 rm -f conftest.*
6895
6896                 cat >conftest.ver <<EOF
6897 module_1.0 {
6898 global:
6899         globalf1;
6900 local:
6901         localf1;
6902 };
6903 module_2.0 {
6904 global:
6905         globalf2;
6906 local:
6907         localf2;
6908         _*;
6909 } module_1.0;
6910 submodule_1.0 {
6911 global:
6912         subglobalf1;
6913         _ismissing;
6914 local:
6915         sublocalf1;
6916 };
6917 submodule_2.0 {
6918 global:
6919         subglobalf2;
6920 local:
6921         sublocalf2;
6922         _*;
6923 } submodule_1.0;
6924 EOF
6925                 cat >conftest.$ac_ext <<EOF
6926 #line 6926 "configure"
6927 int     _ismissing(void) { return 1; }
6928 int     _localf1(void) { return 1; }
6929 int     _localf2(void) { return 2; }
6930 int     globalf1(void) { return 1; }
6931 int     globalf2(void) { return 2; }
6932 int     _sublocalf1(void) { return 1; }
6933 int     _sublocalf2(void) { return 2; }
6934 int     subglobalf1(void) { return 1; }
6935 int     subglobalf2(void) { return 2; }
6936 EOF
6937                 cat >conftest.mk <<EOF
6938 CC=${CC}
6939 CFLAGS=${CFLAGS}
6940 CPPFLAGS=${CPPFLAGS}
6941 LDFLAGS=${LDFLAGS}
6942 LIBS=${LIBS}
6943 VERSIONED_SYMS=${VERSIONED_SYMS}
6944 RESULTING_SYMS=conftest.ver
6945 MK_SHARED_LIB=${MK_SHARED_LIB}
6946 conftest.so: conftest.$ac_cv_objext
6947                 \$(MK_SHARED_LIB) conftest.$ac_cv_objext
6948 EOF
6949
6950                 # compile source, make library
6951                 if make -f conftest.mk 2>&5 >/dev/null
6952                 then
6953                         # test for missing symbol in either Data or Text section
6954                         cf_missing="`nm -P conftest.so 2>&5 |${FGREP-fgrep} _ismissing | ${EGREP-egrep} '[      ][DT][  ]'`"
6955                         test -n "$cf_missing" && WILDCARD_SYMS=yes
6956                 fi
6957                 echo "$as_me:6957: result: $WILDCARD_SYMS" >&5
6958 echo "${ECHO_T}$WILDCARD_SYMS" >&6
6959                 rm -f conftest.*
6960         fi
6961 fi
6962
6963                 ;;
6964         esac
6965 done
6966
6967 ### Checks for special libraries, must be done up-front.
6968 SHLIB_LIST=""
6969
6970 echo "$as_me:6970: checking if you want to link with the GPM mouse library" >&5
6971 echo $ECHO_N "checking if you want to link with the GPM mouse library... $ECHO_C" >&6
6972
6973 # Check whether --with-gpm or --without-gpm was given.
6974 if test "${with_gpm+set}" = set; then
6975   withval="$with_gpm"
6976   with_gpm=$withval
6977 else
6978   with_gpm=maybe
6979 fi;
6980 echo "$as_me:6980: result: $with_gpm" >&5
6981 echo "${ECHO_T}$with_gpm" >&6
6982
6983 if test "$with_gpm" != no ; then
6984         echo "$as_me:6984: checking for gpm.h" >&5
6985 echo $ECHO_N "checking for gpm.h... $ECHO_C" >&6
6986 if test "${ac_cv_header_gpm_h+set}" = set; then
6987   echo $ECHO_N "(cached) $ECHO_C" >&6
6988 else
6989   cat >"conftest.$ac_ext" <<_ACEOF
6990 #line 6990 "configure"
6991 #include "confdefs.h"
6992 #include <gpm.h>
6993 _ACEOF
6994 if { (eval echo "$as_me:6994: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6995   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6996   ac_status=$?
6997   $EGREP -v '^ *\+' conftest.er1 >conftest.err
6998   rm -f conftest.er1
6999   cat conftest.err >&5
7000   echo "$as_me:7000: \$? = $ac_status" >&5
7001   (exit "$ac_status"); } >/dev/null; then
7002   if test -s conftest.err; then
7003     ac_cpp_err=$ac_c_preproc_warn_flag
7004   else
7005     ac_cpp_err=
7006   fi
7007 else
7008   ac_cpp_err=yes
7009 fi
7010 if test -z "$ac_cpp_err"; then
7011   ac_cv_header_gpm_h=yes
7012 else
7013   echo "$as_me: failed program was:" >&5
7014   cat "conftest.$ac_ext" >&5
7015   ac_cv_header_gpm_h=no
7016 fi
7017 rm -f conftest.err "conftest.$ac_ext"
7018 fi
7019 echo "$as_me:7019: result: $ac_cv_header_gpm_h" >&5
7020 echo "${ECHO_T}$ac_cv_header_gpm_h" >&6
7021 if test "$ac_cv_header_gpm_h" = yes; then
7022
7023 cat >>confdefs.h <<\EOF
7024 #define HAVE_GPM_H 1
7025 EOF
7026
7027                 if test "$with_gpm" != yes && test "$with_gpm" != maybe ; then
7028                         test -n "$verbose" && echo "    assuming we really have GPM library" 1>&6
7029
7030 echo "${as_me:-configure}:7030: testing assuming we really have GPM library ..." 1>&5
7031
7032 cat >>confdefs.h <<\EOF
7033 #define HAVE_LIBGPM 1
7034 EOF
7035
7036                         with_gpm=yes
7037                 else
7038                         echo "$as_me:7038: checking for Gpm_Open in -lgpm" >&5
7039 echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
7040 if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
7041   echo $ECHO_N "(cached) $ECHO_C" >&6
7042 else
7043   ac_check_lib_save_LIBS=$LIBS
7044 LIBS="-lgpm  $LIBS"
7045 cat >"conftest.$ac_ext" <<_ACEOF
7046 #line 7046 "configure"
7047 #include "confdefs.h"
7048
7049 /* Override any gcc2 internal prototype to avoid an error.  */
7050 #ifdef __cplusplus
7051 extern "C"
7052 #endif
7053 /* We use char because int might match the return type of a gcc2
7054    builtin and then its argument prototype would still apply.  */
7055 char Gpm_Open ();
7056 int
7057 main (void)
7058 {
7059 Gpm_Open ();
7060   ;
7061   return 0;
7062 }
7063 _ACEOF
7064 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7065 if { (eval echo "$as_me:7065: \"$ac_link\"") >&5
7066   (eval $ac_link) 2>&5
7067   ac_status=$?
7068   echo "$as_me:7068: \$? = $ac_status" >&5
7069   (exit "$ac_status"); } &&
7070          { ac_try='test -s "conftest$ac_exeext"'
7071   { (eval echo "$as_me:7071: \"$ac_try\"") >&5
7072   (eval $ac_try) 2>&5
7073   ac_status=$?
7074   echo "$as_me:7074: \$? = $ac_status" >&5
7075   (exit "$ac_status"); }; }; then
7076   ac_cv_lib_gpm_Gpm_Open=yes
7077 else
7078   echo "$as_me: failed program was:" >&5
7079 cat "conftest.$ac_ext" >&5
7080 ac_cv_lib_gpm_Gpm_Open=no
7081 fi
7082 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7083 LIBS=$ac_check_lib_save_LIBS
7084 fi
7085 echo "$as_me:7085: result: $ac_cv_lib_gpm_Gpm_Open" >&5
7086 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
7087 if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
7088   with_gpm=yes
7089 else
7090
7091                                 if test "$with_gpm" = maybe; then
7092                                         { echo "$as_me:7092: WARNING: Cannot link with GPM library" >&5
7093 echo "$as_me: WARNING: Cannot link with GPM library" >&2;}
7094                                         with_gpm=no
7095                                 else
7096                                         { { echo "$as_me:7096: error: Cannot link with GPM library" >&5
7097 echo "$as_me: error: Cannot link with GPM library" >&2;}
7098    { (exit 1); exit 1; }; }
7099                                 fi
7100
7101 fi
7102
7103                 fi
7104
7105 else
7106
7107                 test "$with_gpm" != maybe && { echo "$as_me:7107: WARNING: Cannot find GPM header" >&5
7108 echo "$as_me: WARNING: Cannot find GPM header" >&2;}
7109                 with_gpm=no
7110
7111 fi
7112
7113 fi
7114
7115 if test "$with_gpm" != no ; then
7116         echo "$as_me:7116: checking if you want to load GPM dynamically" >&5
7117 echo $ECHO_N "checking if you want to load GPM dynamically... $ECHO_C" >&6
7118
7119 # Check whether --with-dlsym or --without-dlsym was given.
7120 if test "${with_dlsym+set}" = set; then
7121   withval="$with_dlsym"
7122   with_dlsym=$withval
7123 else
7124   with_dlsym=yes
7125 fi;
7126         echo "$as_me:7126: result: $with_dlsym" >&5
7127 echo "${ECHO_T}$with_dlsym" >&6
7128         if test "x$with_dlsym" = xyes ; then
7129
7130 cf_have_dlsym=no
7131 echo "$as_me:7131: checking for dlsym" >&5
7132 echo $ECHO_N "checking for dlsym... $ECHO_C" >&6
7133 if test "${ac_cv_func_dlsym+set}" = set; then
7134   echo $ECHO_N "(cached) $ECHO_C" >&6
7135 else
7136   cat >"conftest.$ac_ext" <<_ACEOF
7137 #line 7137 "configure"
7138 #include "confdefs.h"
7139 #define dlsym autoconf_temporary
7140 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7141 #undef dlsym
7142
7143 #ifdef __cplusplus
7144 extern "C"
7145 #endif
7146
7147 /* We use char because int might match the return type of a gcc2
7148    builtin and then its argument prototype would still apply.  */
7149 char dlsym (void);
7150
7151 int
7152 main (void)
7153 {
7154
7155 /* The GNU C library defines stubs for functions which it implements
7156     to always fail with ENOSYS.  Some functions are actually named
7157     something starting with __ and the normal name is an alias.  */
7158 #if defined (__stub_dlsym) || defined (__stub___dlsym)
7159 #error found stub for dlsym
7160 #endif
7161
7162         return dlsym ();
7163   ;
7164   return 0;
7165 }
7166 _ACEOF
7167 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7168 if { (eval echo "$as_me:7168: \"$ac_link\"") >&5
7169   (eval $ac_link) 2>&5
7170   ac_status=$?
7171   echo "$as_me:7171: \$? = $ac_status" >&5
7172   (exit "$ac_status"); } &&
7173          { ac_try='test -s "conftest$ac_exeext"'
7174   { (eval echo "$as_me:7174: \"$ac_try\"") >&5
7175   (eval $ac_try) 2>&5
7176   ac_status=$?
7177   echo "$as_me:7177: \$? = $ac_status" >&5
7178   (exit "$ac_status"); }; }; then
7179   ac_cv_func_dlsym=yes
7180 else
7181   echo "$as_me: failed program was:" >&5
7182 cat "conftest.$ac_ext" >&5
7183 ac_cv_func_dlsym=no
7184 fi
7185 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7186 fi
7187 echo "$as_me:7187: result: $ac_cv_func_dlsym" >&5
7188 echo "${ECHO_T}$ac_cv_func_dlsym" >&6
7189 if test "$ac_cv_func_dlsym" = yes; then
7190   cf_have_dlsym=yes
7191 else
7192
7193 cf_have_libdl=no
7194 echo "$as_me:7194: checking for dlsym in -ldl" >&5
7195 echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
7196 if test "${ac_cv_lib_dl_dlsym+set}" = set; then
7197   echo $ECHO_N "(cached) $ECHO_C" >&6
7198 else
7199   ac_check_lib_save_LIBS=$LIBS
7200 LIBS="-ldl  $LIBS"
7201 cat >"conftest.$ac_ext" <<_ACEOF
7202 #line 7202 "configure"
7203 #include "confdefs.h"
7204
7205 /* Override any gcc2 internal prototype to avoid an error.  */
7206 #ifdef __cplusplus
7207 extern "C"
7208 #endif
7209 /* We use char because int might match the return type of a gcc2
7210    builtin and then its argument prototype would still apply.  */
7211 char dlsym ();
7212 int
7213 main (void)
7214 {
7215 dlsym ();
7216   ;
7217   return 0;
7218 }
7219 _ACEOF
7220 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7221 if { (eval echo "$as_me:7221: \"$ac_link\"") >&5
7222   (eval $ac_link) 2>&5
7223   ac_status=$?
7224   echo "$as_me:7224: \$? = $ac_status" >&5
7225   (exit "$ac_status"); } &&
7226          { ac_try='test -s "conftest$ac_exeext"'
7227   { (eval echo "$as_me:7227: \"$ac_try\"") >&5
7228   (eval $ac_try) 2>&5
7229   ac_status=$?
7230   echo "$as_me:7230: \$? = $ac_status" >&5
7231   (exit "$ac_status"); }; }; then
7232   ac_cv_lib_dl_dlsym=yes
7233 else
7234   echo "$as_me: failed program was:" >&5
7235 cat "conftest.$ac_ext" >&5
7236 ac_cv_lib_dl_dlsym=no
7237 fi
7238 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7239 LIBS=$ac_check_lib_save_LIBS
7240 fi
7241 echo "$as_me:7241: result: $ac_cv_lib_dl_dlsym" >&5
7242 echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
7243 if test "$ac_cv_lib_dl_dlsym" = yes; then
7244
7245         cf_have_dlsym=yes
7246         cf_have_libdl=yes
7247 fi
7248
7249 fi
7250
7251 if test "$cf_have_dlsym" = yes ; then
7252         test "$cf_have_libdl" = yes && {
7253 cf_add_libs="$LIBS"
7254 # reverse order
7255 cf_add_0lib=
7256 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7257 # filter duplicates
7258 for cf_add_1lib in $cf_add_0lib; do
7259         for cf_add_2lib in $cf_add_libs; do
7260                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7261                         cf_add_1lib=
7262                         break
7263                 fi
7264         done
7265         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7266 done
7267 LIBS="$cf_add_libs"
7268  }
7269
7270         echo "$as_me:7270: checking whether able to link to dl*() functions" >&5
7271 echo $ECHO_N "checking whether able to link to dl*() functions... $ECHO_C" >&6
7272         cat >"conftest.$ac_ext" <<_ACEOF
7273 #line 7273 "configure"
7274 #include "confdefs.h"
7275 #include <dlfcn.h>
7276 int
7277 main (void)
7278 {
7279
7280                 void *obj;
7281                 if ((obj = dlopen("filename", 0)) != 0) {
7282                         if (dlsym(obj, "symbolname") == 0) {
7283                         dlclose(obj);
7284                         }
7285                 }
7286   ;
7287   return 0;
7288 }
7289 _ACEOF
7290 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7291 if { (eval echo "$as_me:7291: \"$ac_link\"") >&5
7292   (eval $ac_link) 2>&5
7293   ac_status=$?
7294   echo "$as_me:7294: \$? = $ac_status" >&5
7295   (exit "$ac_status"); } &&
7296          { ac_try='test -s "conftest$ac_exeext"'
7297   { (eval echo "$as_me:7297: \"$ac_try\"") >&5
7298   (eval $ac_try) 2>&5
7299   ac_status=$?
7300   echo "$as_me:7300: \$? = $ac_status" >&5
7301   (exit "$ac_status"); }; }; then
7302
7303 cat >>confdefs.h <<\EOF
7304 #define HAVE_LIBDL 1
7305 EOF
7306
7307 else
7308   echo "$as_me: failed program was:" >&5
7309 cat "conftest.$ac_ext" >&5
7310
7311                 { { echo "$as_me:7311: error: Cannot link test program for libdl" >&5
7312 echo "$as_me: error: Cannot link test program for libdl" >&2;}
7313    { (exit 1); exit 1; }; }
7314 fi
7315 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7316         echo "$as_me:7316: result: ok" >&5
7317 echo "${ECHO_T}ok" >&6
7318 else
7319         { { echo "$as_me:7319: error: Cannot find dlsym function" >&5
7320 echo "$as_me: error: Cannot find dlsym function" >&2;}
7321    { (exit 1); exit 1; }; }
7322 fi
7323
7324                 if test "x$with_gpm" != xyes ; then
7325                         test -n "$verbose" && echo "    assuming soname for gpm is $with_gpm" 1>&6
7326
7327 echo "${as_me:-configure}:7327: testing assuming soname for gpm is $with_gpm ..." 1>&5
7328
7329                         cf_cv_gpm_soname="$with_gpm"
7330                 else
7331
7332 echo "$as_me:7332: checking for soname of gpm library" >&5
7333 echo $ECHO_N "checking for soname of gpm library... $ECHO_C" >&6
7334 if test "${cf_cv_gpm_soname+set}" = set; then
7335   echo $ECHO_N "(cached) $ECHO_C" >&6
7336 else
7337
7338 cf_cv_gpm_soname=unknown
7339 if test "$cross_compiling" != yes ; then
7340 cat >conftest.$ac_ext <<CF_EOF
7341 #include <gpm.h>
7342 int main(void)
7343 {
7344 if (Gpm_Open(0,0)) Gpm_Close();
7345         ${cf_cv_main_return:-return}(0);
7346 }
7347 CF_EOF
7348 cf_save_LIBS="$LIBS"
7349
7350 cf_add_libs="$LIBS"
7351 # reverse order
7352 cf_add_0lib=
7353 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7354 # filter duplicates
7355 for cf_add_1lib in $cf_add_0lib; do
7356         for cf_add_2lib in $cf_add_libs; do
7357                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7358                         cf_add_1lib=
7359                         break
7360                 fi
7361         done
7362         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7363 done
7364 LIBS="$cf_add_libs"
7365
7366         if { (eval echo "$as_me:7366: \"$ac_compile\"") >&5
7367   (eval $ac_compile) 2>&5
7368   ac_status=$?
7369   echo "$as_me:7369: \$? = $ac_status" >&5
7370   (exit "$ac_status"); } ; then
7371                 if { (eval echo "$as_me:7371: \"$ac_link\"") >&5
7372   (eval $ac_link) 2>&5
7373   ac_status=$?
7374   echo "$as_me:7374: \$? = $ac_status" >&5
7375   (exit "$ac_status"); } ; then
7376                         cf_cv_gpm_soname="`ldd \"conftest$ac_exeext\" 2>/dev/null | sed -e 's,^.*/,,' -e 's, .*$,,' | ${FGREP-fgrep} libgpm.`"
7377                         test -z "$cf_cv_gpm_soname" && cf_cv_gpm_soname=unknown
7378                 fi
7379         fi
7380 rm -rf ./conftest*
7381 LIBS="$cf_save_LIBS"
7382 fi
7383
7384 fi
7385 echo "$as_me:7385: result: $cf_cv_gpm_soname" >&5
7386 echo "${ECHO_T}$cf_cv_gpm_soname" >&6
7387
7388                 fi
7389                 test "$cf_cv_gpm_soname" != "unknown" &&
7390 cat >>confdefs.h <<EOF
7391 #define LIBGPM_SONAME "$cf_cv_gpm_soname"
7392 EOF
7393
7394                 SHLIB_LIST="-ldl $SHLIB_LIST"
7395
7396 cf_add_libs="$PRIVATE_LIBS"
7397 # reverse order
7398 cf_add_0lib=
7399 for cf_add_1lib in -ldl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7400 # filter duplicates
7401 for cf_add_1lib in $cf_add_0lib; do
7402         for cf_add_2lib in $cf_add_libs; do
7403                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7404                         cf_add_1lib=
7405                         break
7406                 fi
7407         done
7408         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7409 done
7410 PRIVATE_LIBS="$cf_add_libs"
7411
7412         else
7413                 SHLIB_LIST="-lgpm $SHLIB_LIST"
7414
7415 cf_add_libs="$TEST_LIBS"
7416 # reverse order
7417 cf_add_0lib=
7418 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7419 # filter duplicates
7420 for cf_add_1lib in $cf_add_0lib; do
7421         for cf_add_2lib in $cf_add_libs; do
7422                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7423                         cf_add_1lib=
7424                         break
7425                 fi
7426         done
7427         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7428 done
7429 TEST_LIBS="$cf_add_libs"
7430
7431 cf_add_libs="$PRIVATE_LIBS"
7432 # reverse order
7433 cf_add_0lib=
7434 for cf_add_1lib in -lgpm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7435 # filter duplicates
7436 for cf_add_1lib in $cf_add_0lib; do
7437         for cf_add_2lib in $cf_add_libs; do
7438                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7439                         cf_add_1lib=
7440                         break
7441                 fi
7442         done
7443         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7444 done
7445 PRIVATE_LIBS="$cf_add_libs"
7446
7447         fi
7448
7449 cat >>confdefs.h <<\EOF
7450 #define HAVE_LIBGPM 1
7451 EOF
7452
7453 echo "$as_me:7453: checking for Gpm_Wgetch in -lgpm" >&5
7454 echo $ECHO_N "checking for Gpm_Wgetch in -lgpm... $ECHO_C" >&6
7455 if test "${ac_cv_lib_gpm_Gpm_Wgetch+set}" = set; then
7456   echo $ECHO_N "(cached) $ECHO_C" >&6
7457 else
7458   ac_check_lib_save_LIBS=$LIBS
7459 LIBS="-lgpm  $LIBS"
7460 cat >"conftest.$ac_ext" <<_ACEOF
7461 #line 7461 "configure"
7462 #include "confdefs.h"
7463
7464 /* Override any gcc2 internal prototype to avoid an error.  */
7465 #ifdef __cplusplus
7466 extern "C"
7467 #endif
7468 /* We use char because int might match the return type of a gcc2
7469    builtin and then its argument prototype would still apply.  */
7470 char Gpm_Wgetch ();
7471 int
7472 main (void)
7473 {
7474 Gpm_Wgetch ();
7475   ;
7476   return 0;
7477 }
7478 _ACEOF
7479 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7480 if { (eval echo "$as_me:7480: \"$ac_link\"") >&5
7481   (eval $ac_link) 2>&5
7482   ac_status=$?
7483   echo "$as_me:7483: \$? = $ac_status" >&5
7484   (exit "$ac_status"); } &&
7485          { ac_try='test -s "conftest$ac_exeext"'
7486   { (eval echo "$as_me:7486: \"$ac_try\"") >&5
7487   (eval $ac_try) 2>&5
7488   ac_status=$?
7489   echo "$as_me:7489: \$? = $ac_status" >&5
7490   (exit "$ac_status"); }; }; then
7491   ac_cv_lib_gpm_Gpm_Wgetch=yes
7492 else
7493   echo "$as_me: failed program was:" >&5
7494 cat "conftest.$ac_ext" >&5
7495 ac_cv_lib_gpm_Gpm_Wgetch=no
7496 fi
7497 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7498 LIBS=$ac_check_lib_save_LIBS
7499 fi
7500 echo "$as_me:7500: result: $ac_cv_lib_gpm_Gpm_Wgetch" >&5
7501 echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Wgetch" >&6
7502 if test "$ac_cv_lib_gpm_Gpm_Wgetch" = yes; then
7503
7504 echo "$as_me:7504: checking if GPM is weakly bound to curses library" >&5
7505 echo $ECHO_N "checking if GPM is weakly bound to curses library... $ECHO_C" >&6
7506 if test "${cf_cv_check_gpm_wgetch+set}" = set; then
7507   echo $ECHO_N "(cached) $ECHO_C" >&6
7508 else
7509
7510 cf_cv_check_gpm_wgetch=unknown
7511 if test "$cross_compiling" != yes ; then
7512
7513 cat >conftest.$ac_ext <<CF_EOF
7514 #include <gpm.h>
7515 int main(void)
7516 {
7517         Gpm_Wgetch();
7518         ${cf_cv_main_return:-return}(0);
7519 }
7520 CF_EOF
7521
7522         cf_save_LIBS="$LIBS"
7523         # This only works if we can look at the symbol table.  If a shared
7524         # library is stripped for install, we cannot use that.  So we're forced
7525         # to rely on the static library, noting that some packagers may not
7526         # include it.
7527         LIBS="-static -lgpm -dynamic $LIBS"
7528         if { (eval echo "$as_me:7528: \"$ac_compile\"") >&5
7529   (eval $ac_compile) 2>&5
7530   ac_status=$?
7531   echo "$as_me:7531: \$? = $ac_status" >&5
7532   (exit "$ac_status"); } ; then
7533                 if { (eval echo "$as_me:7533: \"$ac_link\"") >&5
7534   (eval $ac_link) 2>&5
7535   ac_status=$?
7536   echo "$as_me:7536: \$? = $ac_status" >&5
7537   (exit "$ac_status"); } ; then
7538                         cf_cv_check_gpm_wgetch="`nm \"conftest$ac_exeext\" | ${EGREP-egrep} '\<wgetch\>' | ${EGREP-egrep} '\<[vVwW]\>'`"
7539                         test -n "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=yes
7540                         test -z "$cf_cv_check_gpm_wgetch" && cf_cv_check_gpm_wgetch=no
7541                 fi
7542         fi
7543         rm -rf ./conftest*
7544         LIBS="$cf_save_LIBS"
7545 fi
7546
7547 fi
7548 echo "$as_me:7548: result: $cf_cv_check_gpm_wgetch" >&5
7549 echo "${ECHO_T}$cf_cv_check_gpm_wgetch" >&6
7550
7551 if test "$cf_cv_check_gpm_wgetch" != yes ; then
7552         { echo "$as_me:7552: WARNING: GPM library is already linked with curses - read the FAQ" >&5
7553 echo "$as_me: WARNING: GPM library is already linked with curses - read the FAQ" >&2;}
7554 fi
7555
7556 fi
7557
7558 fi
7559
7560 echo "$as_me:7560: checking if you want to use PCRE2 for regular-expressions" >&5
7561 echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
7562
7563 # Check whether --with-pcre2 or --without-pcre2 was given.
7564 if test "${with_pcre2+set}" = set; then
7565   withval="$with_pcre2"
7566
7567 fi;
7568 test -z "$with_pcre2" && with_pcre2=no
7569 echo "$as_me:7569: result: $with_pcre2" >&5
7570 echo "${ECHO_T}$with_pcre2" >&6
7571
7572 if test "x$with_pcre2" != xno ; then
7573         cf_with_pcre2_ok=no
7574         for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
7575         do
7576
7577 if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
7578         test -n "$verbose" && echo "    found package $cf_with_pcre2" 1>&6
7579
7580 echo "${as_me:-configure}:7580: testing found package $cf_with_pcre2 ..." 1>&5
7581
7582         cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
7583         cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
7584         test -n "$verbose" && echo "    package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
7585
7586 echo "${as_me:-configure}:7586: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
7587
7588         test -n "$verbose" && echo "    package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
7589
7590 echo "${as_me:-configure}:7590: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
7591
7592 cf_fix_cppflags=no
7593 cf_new_cflags=
7594 cf_new_cppflags=
7595 cf_new_extra_cppflags=
7596
7597 for cf_add_cflags in $cf_pkgconfig_incs
7598 do
7599 case "$cf_fix_cppflags" in
7600 (no)
7601         case "$cf_add_cflags" in
7602         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7603                 case "$cf_add_cflags" in
7604                 (-D*)
7605                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7606
7607                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7608                                 && test -z "${cf_tst_cflags}" \
7609                                 && cf_fix_cppflags=yes
7610
7611                         if test "$cf_fix_cppflags" = yes ; then
7612
7613         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7614         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7615
7616                                 continue
7617                         elif test "${cf_tst_cflags}" = "\"'" ; then
7618
7619         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7620         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7621
7622                                 continue
7623                         fi
7624                         ;;
7625                 esac
7626                 case "$CPPFLAGS" in
7627                 (*$cf_add_cflags)
7628                         ;;
7629                 (*)
7630                         case "$cf_add_cflags" in
7631                         (-D*)
7632                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7633
7634 CPPFLAGS=`echo "$CPPFLAGS" | \
7635         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
7636                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
7637
7638                                 ;;
7639                         esac
7640
7641         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7642         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7643
7644                         ;;
7645                 esac
7646                 ;;
7647         (*)
7648
7649         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7650         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7651
7652                 ;;
7653         esac
7654         ;;
7655 (yes)
7656
7657         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7658         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7659
7660         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7661
7662         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7663                 && test -z "${cf_tst_cflags}" \
7664                 && cf_fix_cppflags=no
7665         ;;
7666 esac
7667 done
7668
7669 if test -n "$cf_new_cflags" ; then
7670
7671         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7672         CFLAGS="${CFLAGS}$cf_new_cflags"
7673
7674 fi
7675
7676 if test -n "$cf_new_cppflags" ; then
7677
7678         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7679         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7680
7681 fi
7682
7683 if test -n "$cf_new_extra_cppflags" ; then
7684
7685         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7686         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7687
7688 fi
7689
7690 cf_add_libs="$LIBS"
7691 # reverse order
7692 cf_add_0lib=
7693 for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7694 # filter duplicates
7695 for cf_add_1lib in $cf_add_0lib; do
7696         for cf_add_2lib in $cf_add_libs; do
7697                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7698                         cf_add_1lib=
7699                         break
7700                 fi
7701         done
7702         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7703 done
7704 LIBS="$cf_add_libs"
7705
7706         cf_with_pcre2_ok=yes; break
7707 else
7708         cf_pkgconfig_incs=
7709         cf_pkgconfig_libs=
7710         :
7711 fi
7712
7713         done
7714         cf_with_pcre2_ok=yes || { { echo "$as_me:7714: error: Cannot find PCRE2 library" >&5
7715 echo "$as_me: error: Cannot find PCRE2 library" >&2;}
7716    { (exit 1); exit 1; }; }
7717
7718 cat >>confdefs.h <<\EOF
7719 #define HAVE_LIB_PCRE2 1
7720 EOF
7721
7722         # if pkgconfig gave no results, look for the libraries directly
7723         case "$LIBS" in
7724         (*pcre2-posix*|*pcreposix*)
7725                 ;;
7726         (*)
7727                 echo "$as_me:7727: checking for regcomp in -lpcre2-posix" >&5
7728 echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
7729 if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
7730   echo $ECHO_N "(cached) $ECHO_C" >&6
7731 else
7732   ac_check_lib_save_LIBS=$LIBS
7733 LIBS="-lpcre2-posix  $LIBS"
7734 cat >"conftest.$ac_ext" <<_ACEOF
7735 #line 7735 "configure"
7736 #include "confdefs.h"
7737
7738 /* Override any gcc2 internal prototype to avoid an error.  */
7739 #ifdef __cplusplus
7740 extern "C"
7741 #endif
7742 /* We use char because int might match the return type of a gcc2
7743    builtin and then its argument prototype would still apply.  */
7744 char regcomp ();
7745 int
7746 main (void)
7747 {
7748 regcomp ();
7749   ;
7750   return 0;
7751 }
7752 _ACEOF
7753 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7754 if { (eval echo "$as_me:7754: \"$ac_link\"") >&5
7755   (eval $ac_link) 2>&5
7756   ac_status=$?
7757   echo "$as_me:7757: \$? = $ac_status" >&5
7758   (exit "$ac_status"); } &&
7759          { ac_try='test -s "conftest$ac_exeext"'
7760   { (eval echo "$as_me:7760: \"$ac_try\"") >&5
7761   (eval $ac_try) 2>&5
7762   ac_status=$?
7763   echo "$as_me:7763: \$? = $ac_status" >&5
7764   (exit "$ac_status"); }; }; then
7765   ac_cv_lib_pcre2_posix_regcomp=yes
7766 else
7767   echo "$as_me: failed program was:" >&5
7768 cat "conftest.$ac_ext" >&5
7769 ac_cv_lib_pcre2_posix_regcomp=no
7770 fi
7771 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7772 LIBS=$ac_check_lib_save_LIBS
7773 fi
7774 echo "$as_me:7774: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
7775 echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
7776 if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
7777
7778 cf_add_libs="$LIBS"
7779 # reverse order
7780 cf_add_0lib=
7781 for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7782 # filter duplicates
7783 for cf_add_1lib in $cf_add_0lib; do
7784         for cf_add_2lib in $cf_add_libs; do
7785                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7786                         cf_add_1lib=
7787                         break
7788                 fi
7789         done
7790         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7791 done
7792 LIBS="$cf_add_libs"
7793
7794 else
7795   echo "$as_me:7795: checking for regcomp in -lpcreposix" >&5
7796 echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
7797 if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
7798   echo $ECHO_N "(cached) $ECHO_C" >&6
7799 else
7800   ac_check_lib_save_LIBS=$LIBS
7801 LIBS="-lpcreposix  $LIBS"
7802 cat >"conftest.$ac_ext" <<_ACEOF
7803 #line 7803 "configure"
7804 #include "confdefs.h"
7805
7806 /* Override any gcc2 internal prototype to avoid an error.  */
7807 #ifdef __cplusplus
7808 extern "C"
7809 #endif
7810 /* We use char because int might match the return type of a gcc2
7811    builtin and then its argument prototype would still apply.  */
7812 char regcomp ();
7813 int
7814 main (void)
7815 {
7816 regcomp ();
7817   ;
7818   return 0;
7819 }
7820 _ACEOF
7821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7822 if { (eval echo "$as_me:7822: \"$ac_link\"") >&5
7823   (eval $ac_link) 2>&5
7824   ac_status=$?
7825   echo "$as_me:7825: \$? = $ac_status" >&5
7826   (exit "$ac_status"); } &&
7827          { ac_try='test -s "conftest$ac_exeext"'
7828   { (eval echo "$as_me:7828: \"$ac_try\"") >&5
7829   (eval $ac_try) 2>&5
7830   ac_status=$?
7831   echo "$as_me:7831: \$? = $ac_status" >&5
7832   (exit "$ac_status"); }; }; then
7833   ac_cv_lib_pcreposix_regcomp=yes
7834 else
7835   echo "$as_me: failed program was:" >&5
7836 cat "conftest.$ac_ext" >&5
7837 ac_cv_lib_pcreposix_regcomp=no
7838 fi
7839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7840 LIBS=$ac_check_lib_save_LIBS
7841 fi
7842 echo "$as_me:7842: result: $ac_cv_lib_pcreposix_regcomp" >&5
7843 echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
7844 if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
7845
7846 cf_add_libs="$LIBS"
7847 # reverse order
7848 cf_add_0lib=
7849 for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7850 # filter duplicates
7851 for cf_add_1lib in $cf_add_0lib; do
7852         for cf_add_2lib in $cf_add_libs; do
7853                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7854                         cf_add_1lib=
7855                         break
7856                 fi
7857         done
7858         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7859 done
7860 LIBS="$cf_add_libs"
7861
7862 else
7863   { { echo "$as_me:7863: error: Cannot find PCRE2 POSIX library" >&5
7864 echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
7865    { (exit 1); exit 1; }; }
7866 fi
7867
7868 fi
7869
7870                 ;;
7871         esac
7872
7873         # either way, check for the library header files
7874
7875 for ac_header in pcre2posix.h pcreposix.h
7876 do
7877 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7878 echo "$as_me:7878: checking for $ac_header" >&5
7879 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7880 if eval "test \"\${$as_ac_Header+set}\" = set"; then
7881   echo $ECHO_N "(cached) $ECHO_C" >&6
7882 else
7883   cat >"conftest.$ac_ext" <<_ACEOF
7884 #line 7884 "configure"
7885 #include "confdefs.h"
7886 #include <$ac_header>
7887 _ACEOF
7888 if { (eval echo "$as_me:7888: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7889   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7890   ac_status=$?
7891   $EGREP -v '^ *\+' conftest.er1 >conftest.err
7892   rm -f conftest.er1
7893   cat conftest.err >&5
7894   echo "$as_me:7894: \$? = $ac_status" >&5
7895   (exit "$ac_status"); } >/dev/null; then
7896   if test -s conftest.err; then
7897     ac_cpp_err=$ac_c_preproc_warn_flag
7898   else
7899     ac_cpp_err=
7900   fi
7901 else
7902   ac_cpp_err=yes
7903 fi
7904 if test -z "$ac_cpp_err"; then
7905   eval "$as_ac_Header=yes"
7906 else
7907   echo "$as_me: failed program was:" >&5
7908   cat "conftest.$ac_ext" >&5
7909   eval "$as_ac_Header=no"
7910 fi
7911 rm -f conftest.err "conftest.$ac_ext"
7912 fi
7913 echo "$as_me:7913: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7914 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7915 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7916   cat >>confdefs.h <<EOF
7917 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7918 EOF
7919
7920 fi
7921 done
7922
7923 for ac_func in PCRE2regcomp
7924 do
7925 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7926 echo "$as_me:7926: checking for $ac_func" >&5
7927 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
7928 if eval "test \"\${$as_ac_var+set}\" = set"; then
7929   echo $ECHO_N "(cached) $ECHO_C" >&6
7930 else
7931   cat >"conftest.$ac_ext" <<_ACEOF
7932 #line 7932 "configure"
7933 #include "confdefs.h"
7934 #define $ac_func autoconf_temporary
7935 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
7936 #undef $ac_func
7937
7938 #ifdef __cplusplus
7939 extern "C"
7940 #endif
7941
7942 /* We use char because int might match the return type of a gcc2
7943    builtin and then its argument prototype would still apply.  */
7944 char $ac_func (void);
7945
7946 int
7947 main (void)
7948 {
7949
7950 /* The GNU C library defines stubs for functions which it implements
7951     to always fail with ENOSYS.  Some functions are actually named
7952     something starting with __ and the normal name is an alias.  */
7953 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
7954 #error found stub for $ac_func
7955 #endif
7956
7957         return $ac_func ();
7958   ;
7959   return 0;
7960 }
7961 _ACEOF
7962 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7963 if { (eval echo "$as_me:7963: \"$ac_link\"") >&5
7964   (eval $ac_link) 2>&5
7965   ac_status=$?
7966   echo "$as_me:7966: \$? = $ac_status" >&5
7967   (exit "$ac_status"); } &&
7968          { ac_try='test -s "conftest$ac_exeext"'
7969   { (eval echo "$as_me:7969: \"$ac_try\"") >&5
7970   (eval $ac_try) 2>&5
7971   ac_status=$?
7972   echo "$as_me:7972: \$? = $ac_status" >&5
7973   (exit "$ac_status"); }; }; then
7974   eval "$as_ac_var=yes"
7975 else
7976   echo "$as_me: failed program was:" >&5
7977 cat "conftest.$ac_ext" >&5
7978 eval "$as_ac_var=no"
7979 fi
7980 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7981 fi
7982 echo "$as_me:7982: result: `eval echo '${'"$as_ac_var"'}'`" >&5
7983 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
7984 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
7985   cat >>confdefs.h <<EOF
7986 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
7987 EOF
7988
7989 fi
7990 done
7991
7992 fi
7993
7994 # not everyone has "test -c"
7995 if test -c /dev/sysmouse 2>/dev/null ; then
7996 echo "$as_me:7996: checking if you want to use sysmouse" >&5
7997 echo $ECHO_N "checking if you want to use sysmouse... $ECHO_C" >&6
7998
7999 # Check whether --with-sysmouse or --without-sysmouse was given.
8000 if test "${with_sysmouse+set}" = set; then
8001   withval="$with_sysmouse"
8002   cf_with_sysmouse=$withval
8003 else
8004   cf_with_sysmouse=maybe
8005 fi;
8006         if test "$cf_with_sysmouse" != no ; then
8007         cat >"conftest.$ac_ext" <<_ACEOF
8008 #line 8008 "configure"
8009 #include "confdefs.h"
8010
8011 #include <osreldate.h>
8012 #if (__FreeBSD_version >= 400017)
8013 #include <sys/consio.h>
8014 #include <sys/fbio.h>
8015 #else
8016 #include <machine/console.h>
8017 #endif
8018
8019 int
8020 main (void)
8021 {
8022
8023         struct mouse_info the_mouse;
8024         ioctl(0, CONS_MOUSECTL, &the_mouse);
8025
8026   ;
8027   return 0;
8028 }
8029 _ACEOF
8030 rm -f "conftest.$ac_objext"
8031 if { (eval echo "$as_me:8031: \"$ac_compile\"") >&5
8032   (eval $ac_compile) 2>&5
8033   ac_status=$?
8034   echo "$as_me:8034: \$? = $ac_status" >&5
8035   (exit "$ac_status"); } &&
8036          { ac_try='test -s "conftest.$ac_objext"'
8037   { (eval echo "$as_me:8037: \"$ac_try\"") >&5
8038   (eval $ac_try) 2>&5
8039   ac_status=$?
8040   echo "$as_me:8040: \$? = $ac_status" >&5
8041   (exit "$ac_status"); }; }; then
8042   cf_with_sysmouse=yes
8043 else
8044   echo "$as_me: failed program was:" >&5
8045 cat "conftest.$ac_ext" >&5
8046 cf_with_sysmouse=no
8047 fi
8048 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8049         fi
8050 echo "$as_me:8050: result: $cf_with_sysmouse" >&5
8051 echo "${ECHO_T}$cf_with_sysmouse" >&6
8052 test "$cf_with_sysmouse" = yes &&
8053 cat >>confdefs.h <<\EOF
8054 #define USE_SYSMOUSE 1
8055 EOF
8056
8057 fi
8058
8059 # pretend that ncurses==ncursesw==ncursest
8060 echo "$as_me:8060: checking if you want to disable library suffixes" >&5
8061 echo $ECHO_N "checking if you want to disable library suffixes... $ECHO_C" >&6
8062
8063 # Check whether --enable-lib-suffixes or --disable-lib-suffixes was given.
8064 if test "${enable_lib_suffixes+set}" = set; then
8065   enableval="$enable_lib_suffixes"
8066   test "$enableval" != no && enableval=yes
8067         if test "$enableval" != "yes" ; then
8068     disable_lib_suffixes=yes
8069         else
8070                 disable_lib_suffixes=no
8071         fi
8072 else
8073   enableval=yes
8074         disable_lib_suffixes=no
8075
8076 fi;
8077 echo "$as_me:8077: result: $disable_lib_suffixes" >&5
8078 echo "${ECHO_T}$disable_lib_suffixes" >&6
8079
8080 ### If we're building with rpath, try to link non-standard libs that way too.
8081 if test "$DFT_LWR_MODEL" = "shared" && test "x$cf_cv_enable_rpath" != xno; then
8082
8083 echo "$as_me:8083: checking if rpath-hack should be disabled" >&5
8084 echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
8085
8086 # Check whether --enable-rpath-hack or --disable-rpath-hack was given.
8087 if test "${enable_rpath_hack+set}" = set; then
8088   enableval="$enable_rpath_hack"
8089   test "$enableval" != no && enableval=yes
8090         if test "$enableval" != "yes" ; then
8091     enable_rpath_hack=no
8092         else
8093                 enable_rpath_hack=yes
8094         fi
8095 else
8096   enableval=yes
8097         enable_rpath_hack=yes
8098
8099 fi;
8100 if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
8101 echo "$as_me:8101: result: $cf_disable_rpath_hack" >&5
8102 echo "${ECHO_T}$cf_disable_rpath_hack" >&6
8103
8104 if test "$enable_rpath_hack" = yes ; then
8105
8106 echo "$as_me:8106: checking for updated LDFLAGS" >&5
8107 echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
8108 if test -n "$LD_RPATH_OPT" ; then
8109         echo "$as_me:8109: result: maybe" >&5
8110 echo "${ECHO_T}maybe" >&6
8111
8112         for ac_prog in ldd
8113 do
8114   # Extract the first word of "$ac_prog", so it can be a program name with args.
8115 set dummy $ac_prog; ac_word=$2
8116 echo "$as_me:8116: checking for $ac_word" >&5
8117 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8118 if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
8119   echo $ECHO_N "(cached) $ECHO_C" >&6
8120 else
8121   if test -n "$cf_ldd_prog"; then
8122   ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
8123 else
8124   ac_save_IFS=$IFS; IFS=$ac_path_separator
8125 ac_dummy="$PATH"
8126 for ac_dir in $ac_dummy; do
8127   IFS=$ac_save_IFS
8128   test -z "$ac_dir" && ac_dir=.
8129   $as_executable_p "$ac_dir/$ac_word" || continue
8130 ac_cv_prog_cf_ldd_prog="$ac_prog"
8131 echo "$as_me:8131: found $ac_dir/$ac_word" >&5
8132 break
8133 done
8134
8135 fi
8136 fi
8137 cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
8138 if test -n "$cf_ldd_prog"; then
8139   echo "$as_me:8139: result: $cf_ldd_prog" >&5
8140 echo "${ECHO_T}$cf_ldd_prog" >&6
8141 else
8142   echo "$as_me:8142: result: no" >&5
8143 echo "${ECHO_T}no" >&6
8144 fi
8145
8146   test -n "$cf_ldd_prog" && break
8147 done
8148 test -n "$cf_ldd_prog" || cf_ldd_prog="no"
8149
8150         cf_rpath_list="/usr/lib /lib"
8151         if test "$cf_ldd_prog" != no
8152         then
8153                 cf_rpath_oops=
8154
8155 cat >"conftest.$ac_ext" <<_ACEOF
8156 #line 8156 "configure"
8157 #include "confdefs.h"
8158 #include <stdio.h>
8159 int
8160 main (void)
8161 {
8162 printf("Hello");
8163   ;
8164   return 0;
8165 }
8166 _ACEOF
8167 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8168 if { (eval echo "$as_me:8168: \"$ac_link\"") >&5
8169   (eval $ac_link) 2>&5
8170   ac_status=$?
8171   echo "$as_me:8171: \$? = $ac_status" >&5
8172   (exit "$ac_status"); } &&
8173          { ac_try='test -s "conftest$ac_exeext"'
8174   { (eval echo "$as_me:8174: \"$ac_try\"") >&5
8175   (eval $ac_try) 2>&5
8176   ac_status=$?
8177   echo "$as_me:8177: \$? = $ac_status" >&5
8178   (exit "$ac_status"); }; }; then
8179   cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
8180                  cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[         ]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
8181 else
8182   echo "$as_me: failed program was:" >&5
8183 cat "conftest.$ac_ext" >&5
8184 fi
8185 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8186
8187                 # If we passed the link-test, but get a "not found" on a given library,
8188                 # this could be due to inept reconfiguration of gcc to make it only
8189                 # partly honor /usr/local/lib (or whatever).  Sometimes this behavior
8190                 # is intentional, e.g., installing gcc in /usr/bin and suppressing the
8191                 # /usr/local libraries.
8192                 if test -n "$cf_rpath_oops"
8193                 then
8194                         for cf_rpath_src in $cf_rpath_oops
8195                         do
8196                                 for cf_rpath_dir in \
8197                                         /usr/local \
8198                                         /usr/pkg \
8199                                         /opt/sfw
8200                                 do
8201                                         if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
8202                                         then
8203                                                 test -n "$verbose" && echo "    ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
8204
8205 echo "${as_me:-configure}:8205: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
8206
8207                                                 LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
8208                                                 break
8209                                         fi
8210                                 done
8211                         done
8212                 fi
8213         fi
8214
8215         test -n "$verbose" && echo "    ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8216
8217 echo "${as_me:-configure}:8217: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8218
8219 test -n "$verbose" && echo "    ...checking LDFLAGS $LDFLAGS" 1>&6
8220
8221 echo "${as_me:-configure}:8221: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
8222
8223 cf_rpath_dst=
8224 for cf_rpath_src in $LDFLAGS
8225 do
8226         case "$cf_rpath_src" in
8227         (-L*)
8228
8229                 # check if this refers to a directory which we will ignore
8230                 cf_rpath_skip=no
8231                 if test -n "$cf_rpath_list"
8232                 then
8233                         for cf_rpath_item in $cf_rpath_list
8234                         do
8235                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8236                                 then
8237                                         cf_rpath_skip=yes
8238                                         break
8239                                 fi
8240                         done
8241                 fi
8242
8243                 if test "$cf_rpath_skip" = no
8244                 then
8245                         # transform the option
8246                         if test "$LD_RPATH_OPT" = "-R " ; then
8247                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8248                         else
8249                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8250                         fi
8251
8252                         # if we have not already added this, add it now
8253                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8254                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8255                         then
8256                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8257
8258 echo "${as_me:-configure}:8258: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8259
8260                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8261                         fi
8262                 fi
8263                 ;;
8264         esac
8265         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8266 done
8267 LDFLAGS=$cf_rpath_dst
8268
8269 test -n "$verbose" && echo "    ...checked LDFLAGS $LDFLAGS" 1>&6
8270
8271 echo "${as_me:-configure}:8271: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
8272
8273 test -n "$verbose" && echo "    ...checking LIBS $LIBS" 1>&6
8274
8275 echo "${as_me:-configure}:8275: testing ...checking LIBS $LIBS ..." 1>&5
8276
8277 cf_rpath_dst=
8278 for cf_rpath_src in $LIBS
8279 do
8280         case "$cf_rpath_src" in
8281         (-L*)
8282
8283                 # check if this refers to a directory which we will ignore
8284                 cf_rpath_skip=no
8285                 if test -n "$cf_rpath_list"
8286                 then
8287                         for cf_rpath_item in $cf_rpath_list
8288                         do
8289                                 if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
8290                                 then
8291                                         cf_rpath_skip=yes
8292                                         break
8293                                 fi
8294                         done
8295                 fi
8296
8297                 if test "$cf_rpath_skip" = no
8298                 then
8299                         # transform the option
8300                         if test "$LD_RPATH_OPT" = "-R " ; then
8301                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
8302                         else
8303                                 cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
8304                         fi
8305
8306                         # if we have not already added this, add it now
8307                         cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
8308                         if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
8309                         then
8310                                 test -n "$verbose" && echo "    ...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
8311
8312 echo "${as_me:-configure}:8312: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
8313
8314                                 EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
8315                         fi
8316                 fi
8317                 ;;
8318         esac
8319         cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
8320 done
8321 LIBS=$cf_rpath_dst
8322
8323 test -n "$verbose" && echo "    ...checked LIBS $LIBS" 1>&6
8324
8325 echo "${as_me:-configure}:8325: testing ...checked LIBS $LIBS ..." 1>&5
8326
8327         test -n "$verbose" && echo "    ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
8328
8329 echo "${as_me:-configure}:8329: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
8330
8331 else
8332         echo "$as_me:8332: result: no" >&5
8333 echo "${ECHO_T}no" >&6
8334 fi
8335
8336 fi
8337
8338 fi
8339
8340 ### Depending on the system, someone may use rpath to build ncurses but not
8341 # want users of the package to rely upon that feature.  Give those people an
8342 # option to suppress that detail from EXTRA_LDFLAGS.
8343 EXTRA_PKG_LDFLAGS="$LDFLAGS $EXTRA_LDFLAGS"
8344 if test -n "$EXTRA_PKG_LDFLAGS"
8345 then
8346         echo "$as_me:8346: checking if you want to disable extra LDFLAGS for package-scripts" >&5
8347 echo $ECHO_N "checking if you want to disable extra LDFLAGS for package-scripts... $ECHO_C" >&6
8348
8349 # Check whether --enable-pkg-ldflags or --disable-pkg-ldflags was given.
8350 if test "${enable_pkg_ldflags+set}" = set; then
8351   enableval="$enable_pkg_ldflags"
8352   test "$enableval" != no && enableval=yes
8353         if test "$enableval" != "yes" ; then
8354     disable_pkg_ldflags=yes
8355         else
8356                 disable_pkg_ldflags=no
8357         fi
8358 else
8359   enableval=yes
8360         disable_pkg_ldflags=no
8361
8362 fi;
8363         echo "$as_me:8363: result: $disable_pkg_ldflags" >&5
8364 echo "${ECHO_T}$disable_pkg_ldflags" >&6
8365         test "$disable_pkg_ldflags" = yes && EXTRA_PKG_LDFLAGS=
8366 fi
8367
8368 ###############################################################################
8369
8370 ###     use option --with-extra-suffix to append suffix to headers and libraries
8371 echo "$as_me:8371: checking if you wish to append extra suffix to header/library paths" >&5
8372 echo $ECHO_N "checking if you wish to append extra suffix to header/library paths... $ECHO_C" >&6
8373 EXTRA_SUFFIX=
8374
8375 # Check whether --with-extra-suffix or --without-extra-suffix was given.
8376 if test "${with_extra_suffix+set}" = set; then
8377   withval="$with_extra_suffix"
8378   case x$withval in
8379         (xno)
8380                 ;;
8381         (xyes|x)
8382                 EXTRA_SUFFIX=$cf_cv_abi_version
8383                 ;;
8384         (*)
8385                 EXTRA_SUFFIX=$withval
8386                 ;;
8387         esac
8388
8389 fi;
8390 echo "$as_me:8390: result: $EXTRA_SUFFIX" >&5
8391 echo "${ECHO_T}$EXTRA_SUFFIX" >&6
8392
8393 ###     use option --disable-overwrite to leave out the link to -lcurses
8394 echo "$as_me:8394: checking if you wish to install ncurses overwriting curses" >&5
8395 echo $ECHO_N "checking if you wish to install ncurses overwriting curses... $ECHO_C" >&6
8396
8397 # Check whether --enable-overwrite or --disable-overwrite was given.
8398 if test "${enable_overwrite+set}" = set; then
8399   enableval="$enable_overwrite"
8400   with_overwrite=$enableval
8401 else
8402   if test "$prefix" = "/usr" ; then with_overwrite=yes; else with_overwrite=no; fi
8403 fi;
8404 echo "$as_me:8404: result: $with_overwrite" >&5
8405 echo "${ECHO_T}$with_overwrite" >&6
8406
8407 echo "$as_me:8407: checking if external terminfo-database is used" >&5
8408 echo $ECHO_N "checking if external terminfo-database is used... $ECHO_C" >&6
8409
8410 # Check whether --enable-database or --disable-database was given.
8411 if test "${enable_database+set}" = set; then
8412   enableval="$enable_database"
8413   use_database=$enableval
8414 else
8415   use_database=yes
8416 fi;
8417 echo "$as_me:8417: result: $use_database" >&5
8418 echo "${ECHO_T}$use_database" >&6
8419
8420 case "$host_os" in
8421 (os2*)
8422         TERMINFO_SRC='${top_srcdir}/misc/emx.src'
8423         ;;
8424 (*)
8425         TERMINFO_SRC='${top_srcdir}/misc/terminfo.src'
8426         ;;
8427 esac
8428
8429 NCURSES_USE_DATABASE=0
8430 if test "$use_database" != no ; then
8431         NCURSES_USE_DATABASE=1
8432
8433         echo "$as_me:8433: checking which terminfo source-file will be installed" >&5
8434 echo $ECHO_N "checking which terminfo source-file will be installed... $ECHO_C" >&6
8435
8436 # Check whether --with-database or --without-database was given.
8437 if test "${with_database+set}" = set; then
8438   withval="$with_database"
8439   TERMINFO_SRC=$withval
8440 fi;
8441         echo "$as_me:8441: result: $TERMINFO_SRC" >&5
8442 echo "${ECHO_T}$TERMINFO_SRC" >&6
8443
8444         echo "$as_me:8444: checking whether to use hashed database instead of directory/tree" >&5
8445 echo $ECHO_N "checking whether to use hashed database instead of directory/tree... $ECHO_C" >&6
8446
8447 # Check whether --with-hashed-db or --without-hashed-db was given.
8448 if test "${with_hashed_db+set}" = set; then
8449   withval="$with_hashed_db"
8450
8451 else
8452   with_hashed_db=no
8453 fi;
8454         echo "$as_me:8454: result: $with_hashed_db" >&5
8455 echo "${ECHO_T}$with_hashed_db" >&6
8456 else
8457         with_hashed_db=no
8458 fi
8459
8460 echo "$as_me:8460: checking for list of fallback descriptions" >&5
8461 echo $ECHO_N "checking for list of fallback descriptions... $ECHO_C" >&6
8462
8463 # Check whether --with-fallbacks or --without-fallbacks was given.
8464 if test "${with_fallbacks+set}" = set; then
8465   withval="$with_fallbacks"
8466   with_fallback=$withval
8467 else
8468   with_fallback=
8469 fi;
8470 echo "$as_me:8470: result: $with_fallback" >&5
8471 echo "${ECHO_T}$with_fallback" >&6
8472
8473 case ".$with_fallback" in
8474 (.|.no)
8475         FALLBACK_LIST=
8476         ;;
8477 (.yes)
8478         { echo "$as_me:8478: WARNING: expected a list of terminal descriptions" >&5
8479 echo "$as_me: WARNING: expected a list of terminal descriptions" >&2;}
8480         ;;
8481 (*)
8482         FALLBACK_LIST=`echo "$with_fallback" | sed -e 's/,/ /g'`
8483         ;;
8484 esac
8485
8486 # The fallback feature in ncurses relies upon tic/infocmp outside the build
8487 # tree for generating the terminal descriptions that will be compiled into the
8488 # library.  If your toolchain is old, it may not handle current terminal
8489 # databases.  Use configure-options to point to the tools which will be used,
8490 # rather than the first ones found on the $PATH.
8491 if test -n "$ac_tool_prefix"; then
8492   # Extract the first word of "${ac_tool_prefix}tic", so it can be a program name with args.
8493 set dummy ${ac_tool_prefix}tic; ac_word=$2
8494 echo "$as_me:8494: checking for $ac_word" >&5
8495 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8496 if test "${ac_cv_prog_TIC+set}" = set; then
8497   echo $ECHO_N "(cached) $ECHO_C" >&6
8498 else
8499   if test -n "$TIC"; then
8500   ac_cv_prog_TIC="$TIC" # Let the user override the test.
8501 else
8502   ac_save_IFS=$IFS; IFS=$ac_path_separator
8503 ac_dummy="$PATH"
8504 for ac_dir in $ac_dummy; do
8505   IFS=$ac_save_IFS
8506   test -z "$ac_dir" && ac_dir=.
8507   $as_executable_p "$ac_dir/$ac_word" || continue
8508 ac_cv_prog_TIC="${ac_tool_prefix}tic"
8509 echo "$as_me:8509: found $ac_dir/$ac_word" >&5
8510 break
8511 done
8512
8513 fi
8514 fi
8515 TIC=$ac_cv_prog_TIC
8516 if test -n "$TIC"; then
8517   echo "$as_me:8517: result: $TIC" >&5
8518 echo "${ECHO_T}$TIC" >&6
8519 else
8520   echo "$as_me:8520: result: no" >&5
8521 echo "${ECHO_T}no" >&6
8522 fi
8523
8524 fi
8525 if test -z "$ac_cv_prog_TIC"; then
8526   ac_ct_TIC=$TIC
8527   # Extract the first word of "tic", so it can be a program name with args.
8528 set dummy tic; ac_word=$2
8529 echo "$as_me:8529: checking for $ac_word" >&5
8530 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8531 if test "${ac_cv_prog_ac_ct_TIC+set}" = set; then
8532   echo $ECHO_N "(cached) $ECHO_C" >&6
8533 else
8534   if test -n "$ac_ct_TIC"; then
8535   ac_cv_prog_ac_ct_TIC="$ac_ct_TIC" # Let the user override the test.
8536 else
8537   ac_save_IFS=$IFS; IFS=$ac_path_separator
8538 ac_dummy="$PATH"
8539 for ac_dir in $ac_dummy; do
8540   IFS=$ac_save_IFS
8541   test -z "$ac_dir" && ac_dir=.
8542   $as_executable_p "$ac_dir/$ac_word" || continue
8543 ac_cv_prog_ac_ct_TIC="tic"
8544 echo "$as_me:8544: found $ac_dir/$ac_word" >&5
8545 break
8546 done
8547
8548 fi
8549 fi
8550 ac_ct_TIC=$ac_cv_prog_ac_ct_TIC
8551 if test -n "$ac_ct_TIC"; then
8552   echo "$as_me:8552: result: $ac_ct_TIC" >&5
8553 echo "${ECHO_T}$ac_ct_TIC" >&6
8554 else
8555   echo "$as_me:8555: result: no" >&5
8556 echo "${ECHO_T}no" >&6
8557 fi
8558
8559   TIC=$ac_ct_TIC
8560 else
8561   TIC="$ac_cv_prog_TIC"
8562 fi
8563
8564 if test -n "$ac_tool_prefix"; then
8565   # Extract the first word of "${ac_tool_prefix}infocmp", so it can be a program name with args.
8566 set dummy ${ac_tool_prefix}infocmp; ac_word=$2
8567 echo "$as_me:8567: checking for $ac_word" >&5
8568 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8569 if test "${ac_cv_prog_INFOCMP+set}" = set; then
8570   echo $ECHO_N "(cached) $ECHO_C" >&6
8571 else
8572   if test -n "$INFOCMP"; then
8573   ac_cv_prog_INFOCMP="$INFOCMP" # Let the user override the test.
8574 else
8575   ac_save_IFS=$IFS; IFS=$ac_path_separator
8576 ac_dummy="$PATH"
8577 for ac_dir in $ac_dummy; do
8578   IFS=$ac_save_IFS
8579   test -z "$ac_dir" && ac_dir=.
8580   $as_executable_p "$ac_dir/$ac_word" || continue
8581 ac_cv_prog_INFOCMP="${ac_tool_prefix}infocmp"
8582 echo "$as_me:8582: found $ac_dir/$ac_word" >&5
8583 break
8584 done
8585
8586 fi
8587 fi
8588 INFOCMP=$ac_cv_prog_INFOCMP
8589 if test -n "$INFOCMP"; then
8590   echo "$as_me:8590: result: $INFOCMP" >&5
8591 echo "${ECHO_T}$INFOCMP" >&6
8592 else
8593   echo "$as_me:8593: result: no" >&5
8594 echo "${ECHO_T}no" >&6
8595 fi
8596
8597 fi
8598 if test -z "$ac_cv_prog_INFOCMP"; then
8599   ac_ct_INFOCMP=$INFOCMP
8600   # Extract the first word of "infocmp", so it can be a program name with args.
8601 set dummy infocmp; ac_word=$2
8602 echo "$as_me:8602: checking for $ac_word" >&5
8603 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8604 if test "${ac_cv_prog_ac_ct_INFOCMP+set}" = set; then
8605   echo $ECHO_N "(cached) $ECHO_C" >&6
8606 else
8607   if test -n "$ac_ct_INFOCMP"; then
8608   ac_cv_prog_ac_ct_INFOCMP="$ac_ct_INFOCMP" # Let the user override the test.
8609 else
8610   ac_save_IFS=$IFS; IFS=$ac_path_separator
8611 ac_dummy="$PATH"
8612 for ac_dir in $ac_dummy; do
8613   IFS=$ac_save_IFS
8614   test -z "$ac_dir" && ac_dir=.
8615   $as_executable_p "$ac_dir/$ac_word" || continue
8616 ac_cv_prog_ac_ct_INFOCMP="infocmp"
8617 echo "$as_me:8617: found $ac_dir/$ac_word" >&5
8618 break
8619 done
8620
8621 fi
8622 fi
8623 ac_ct_INFOCMP=$ac_cv_prog_ac_ct_INFOCMP
8624 if test -n "$ac_ct_INFOCMP"; then
8625   echo "$as_me:8625: result: $ac_ct_INFOCMP" >&5
8626 echo "${ECHO_T}$ac_ct_INFOCMP" >&6
8627 else
8628   echo "$as_me:8628: result: no" >&5
8629 echo "${ECHO_T}no" >&6
8630 fi
8631
8632   INFOCMP=$ac_ct_INFOCMP
8633 else
8634   INFOCMP="$ac_cv_prog_INFOCMP"
8635 fi
8636
8637 if test -n "$FALLBACK_LIST"
8638 then
8639
8640 # Check whether --with-tic-path or --without-tic-path was given.
8641 if test "${with_tic_path+set}" = set; then
8642   withval="$with_tic_path"
8643   echo "$as_me:8643: checking for tic program for fallbacks" >&5
8644 echo $ECHO_N "checking for tic program for fallbacks... $ECHO_C" >&6
8645                 TIC=$withval
8646                 echo "$as_me:8646: result: $TIC" >&5
8647 echo "${ECHO_T}$TIC" >&6
8648
8649 if test "x$prefix" != xNONE; then
8650         cf_path_syntax="$prefix"
8651 else
8652         cf_path_syntax="$ac_default_prefix"
8653 fi
8654
8655 case ".$TIC" in
8656 (.\$\(*\)*|.\'*\'*)
8657         ;;
8658 (..|./*|.\\*)
8659         ;;
8660 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8661         ;;
8662 (.\$\{*prefix\}*|.\$\{*dir\}*)
8663         eval TIC="$TIC"
8664         case ".$TIC" in
8665         (.NONE/*)
8666                 TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8667                 ;;
8668         esac
8669         ;;
8670 (.no|.NONE/*)
8671         TIC=`echo "$TIC" | sed -e s%NONE%$cf_path_syntax%`
8672         ;;
8673 (*)
8674         { { echo "$as_me:8674: error: expected a pathname, not \"$TIC\"" >&5
8675 echo "$as_me: error: expected a pathname, not \"$TIC\"" >&2;}
8676    { (exit 1); exit 1; }; }
8677         ;;
8678 esac
8679
8680 else
8681
8682 test -z "$TIC" && TIC="tic"
8683 for ac_prog in $TIC tic
8684 do
8685   # Extract the first word of "$ac_prog", so it can be a program name with args.
8686 set dummy $ac_prog; ac_word=$2
8687 echo "$as_me:8687: checking for $ac_word" >&5
8688 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8689 if test "${ac_cv_path_TIC+set}" = set; then
8690   echo $ECHO_N "(cached) $ECHO_C" >&6
8691 else
8692   case $TIC in
8693   [\\/]* | ?:[\\/]*)
8694   ac_cv_path_TIC="$TIC" # Let the user override the test with a path.
8695   ;;
8696   *)
8697   ac_save_IFS=$IFS; IFS=$ac_path_separator
8698 ac_dummy="$PATH:/usr/local/ncurses/bin"
8699 for ac_dir in $ac_dummy; do
8700   IFS=$ac_save_IFS
8701   test -z "$ac_dir" && ac_dir=.
8702   if $as_executable_p "$ac_dir/$ac_word"; then
8703    ac_cv_path_TIC="$ac_dir/$ac_word"
8704    echo "$as_me:8704: found $ac_dir/$ac_word" >&5
8705    break
8706 fi
8707 done
8708
8709   ;;
8710 esac
8711 fi
8712 TIC=$ac_cv_path_TIC
8713
8714 if test -n "$TIC"; then
8715   echo "$as_me:8715: result: $TIC" >&5
8716 echo "${ECHO_T}$TIC" >&6
8717 else
8718   echo "$as_me:8718: result: no" >&5
8719 echo "${ECHO_T}no" >&6
8720 fi
8721
8722   test -n "$TIC" && break
8723 done
8724 test -n "$TIC" || TIC="$TIC"
8725
8726 cf_path_prog=""
8727 cf_path_args=""
8728 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8729 for cf_temp in $ac_cv_path_TIC
8730 do
8731         if test -z "$cf_path_prog" ; then
8732                 if test "$with_full_paths" = yes ; then
8733
8734 if test "x$prefix" != xNONE; then
8735         cf_path_syntax="$prefix"
8736 else
8737         cf_path_syntax="$ac_default_prefix"
8738 fi
8739
8740 case ".$cf_temp" in
8741 (.\$\(*\)*|.\'*\'*)
8742         ;;
8743 (..|./*|.\\*)
8744         ;;
8745 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8746         ;;
8747 (.\$\{*prefix\}*|.\$\{*dir\}*)
8748         eval cf_temp="$cf_temp"
8749         case ".$cf_temp" in
8750         (.NONE/*)
8751                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8752                 ;;
8753         esac
8754         ;;
8755 (.no|.NONE/*)
8756         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8757         ;;
8758 (*)
8759         break
8760         ;;
8761 esac
8762
8763                         cf_path_prog="$cf_temp"
8764                 else
8765                         cf_path_prog="`basename "$cf_temp"`"
8766                 fi
8767         elif test -z "$cf_path_args" ; then
8768                 cf_path_args="$cf_temp"
8769         else
8770                 cf_path_args="$cf_path_args $cf_temp"
8771         fi
8772 done
8773 IFS="$cf_save_ifs"
8774
8775 if test -n "$cf_path_prog" ; then
8776
8777 echo "${as_me:-configure}:8777: testing defining path for ${cf_path_prog} ..." 1>&5
8778
8779 cat >>confdefs.h <<EOF
8780 #define TIC_PATH "$cf_path_prog"
8781 EOF
8782
8783         test -n "$cf_path_args" &&
8784 cat >>confdefs.h <<EOF
8785 #define TIC_ARGS "$cf_path_args"
8786 EOF
8787
8788 fi
8789
8790                 if test -z "$TIC"
8791                 then
8792                         { echo "$as_me:8792: WARNING: no tic program found for fallbacks" >&5
8793 echo "$as_me: WARNING: no tic program found for fallbacks" >&2;}
8794                 fi
8795
8796 fi;
8797
8798 # Check whether --with-infocmp-path or --without-infocmp-path was given.
8799 if test "${with_infocmp_path+set}" = set; then
8800   withval="$with_infocmp_path"
8801   echo "$as_me:8801: checking for infocmp program for fallbacks" >&5
8802 echo $ECHO_N "checking for infocmp program for fallbacks... $ECHO_C" >&6
8803                 INFOCMP=$withval
8804                 echo "$as_me:8804: result: $INFOCMP" >&5
8805 echo "${ECHO_T}$INFOCMP" >&6
8806
8807 if test "x$prefix" != xNONE; then
8808         cf_path_syntax="$prefix"
8809 else
8810         cf_path_syntax="$ac_default_prefix"
8811 fi
8812
8813 case ".$INFOCMP" in
8814 (.\$\(*\)*|.\'*\'*)
8815         ;;
8816 (..|./*|.\\*)
8817         ;;
8818 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8819         ;;
8820 (.\$\{*prefix\}*|.\$\{*dir\}*)
8821         eval INFOCMP="$INFOCMP"
8822         case ".$INFOCMP" in
8823         (.NONE/*)
8824                 INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8825                 ;;
8826         esac
8827         ;;
8828 (.no|.NONE/*)
8829         INFOCMP=`echo "$INFOCMP" | sed -e s%NONE%$cf_path_syntax%`
8830         ;;
8831 (*)
8832         { { echo "$as_me:8832: error: expected a pathname, not \"$INFOCMP\"" >&5
8833 echo "$as_me: error: expected a pathname, not \"$INFOCMP\"" >&2;}
8834    { (exit 1); exit 1; }; }
8835         ;;
8836 esac
8837
8838 else
8839
8840 test -z "$INFOCMP" && INFOCMP="infocmp"
8841 for ac_prog in $INFOCMP infocmp
8842 do
8843   # Extract the first word of "$ac_prog", so it can be a program name with args.
8844 set dummy $ac_prog; ac_word=$2
8845 echo "$as_me:8845: checking for $ac_word" >&5
8846 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8847 if test "${ac_cv_path_INFOCMP+set}" = set; then
8848   echo $ECHO_N "(cached) $ECHO_C" >&6
8849 else
8850   case $INFOCMP in
8851   [\\/]* | ?:[\\/]*)
8852   ac_cv_path_INFOCMP="$INFOCMP" # Let the user override the test with a path.
8853   ;;
8854   *)
8855   ac_save_IFS=$IFS; IFS=$ac_path_separator
8856 ac_dummy="$PATH:/usr/local/ncurses/bin"
8857 for ac_dir in $ac_dummy; do
8858   IFS=$ac_save_IFS
8859   test -z "$ac_dir" && ac_dir=.
8860   if $as_executable_p "$ac_dir/$ac_word"; then
8861    ac_cv_path_INFOCMP="$ac_dir/$ac_word"
8862    echo "$as_me:8862: found $ac_dir/$ac_word" >&5
8863    break
8864 fi
8865 done
8866
8867   ;;
8868 esac
8869 fi
8870 INFOCMP=$ac_cv_path_INFOCMP
8871
8872 if test -n "$INFOCMP"; then
8873   echo "$as_me:8873: result: $INFOCMP" >&5
8874 echo "${ECHO_T}$INFOCMP" >&6
8875 else
8876   echo "$as_me:8876: result: no" >&5
8877 echo "${ECHO_T}no" >&6
8878 fi
8879
8880   test -n "$INFOCMP" && break
8881 done
8882 test -n "$INFOCMP" || INFOCMP="$INFOCMP"
8883
8884 cf_path_prog=""
8885 cf_path_args=""
8886 IFS="${IFS:-    }"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
8887 for cf_temp in $ac_cv_path_INFOCMP
8888 do
8889         if test -z "$cf_path_prog" ; then
8890                 if test "$with_full_paths" = yes ; then
8891
8892 if test "x$prefix" != xNONE; then
8893         cf_path_syntax="$prefix"
8894 else
8895         cf_path_syntax="$ac_default_prefix"
8896 fi
8897
8898 case ".$cf_temp" in
8899 (.\$\(*\)*|.\'*\'*)
8900         ;;
8901 (..|./*|.\\*)
8902         ;;
8903 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
8904         ;;
8905 (.\$\{*prefix\}*|.\$\{*dir\}*)
8906         eval cf_temp="$cf_temp"
8907         case ".$cf_temp" in
8908         (.NONE/*)
8909                 cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8910                 ;;
8911         esac
8912         ;;
8913 (.no|.NONE/*)
8914         cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
8915         ;;
8916 (*)
8917         break
8918         ;;
8919 esac
8920
8921                         cf_path_prog="$cf_temp"
8922                 else
8923                         cf_path_prog="`basename "$cf_temp"`"
8924                 fi
8925         elif test -z "$cf_path_args" ; then
8926                 cf_path_args="$cf_temp"
8927         else
8928                 cf_path_args="$cf_path_args $cf_temp"
8929         fi
8930 done
8931 IFS="$cf_save_ifs"
8932
8933 if test -n "$cf_path_prog" ; then
8934
8935 echo "${as_me:-configure}:8935: testing defining path for ${cf_path_prog} ..." 1>&5
8936
8937 cat >>confdefs.h <<EOF
8938 #define INFOCMP_PATH "$cf_path_prog"
8939 EOF
8940
8941         test -n "$cf_path_args" &&
8942 cat >>confdefs.h <<EOF
8943 #define INFOCMP_ARGS "$cf_path_args"
8944 EOF
8945
8946 fi
8947
8948                 if test -z "$INFOCMP"
8949                 then
8950                         { echo "$as_me:8950: WARNING: no infocmp program found for fallbacks" >&5
8951 echo "$as_me: WARNING: no infocmp program found for fallbacks" >&2;}
8952                 fi
8953
8954 fi;
8955
8956         test -z "$TIC" && FALLBACK_LIST=
8957         test -z "$INFOCMP" && FALLBACK_LIST=
8958         if test -z "$FALLBACK_LIST"
8959         then
8960                 { echo "$as_me:8960: WARNING: ignoring fallback option because tic/infocmp are not available" >&5
8961 echo "$as_me: WARNING: ignoring fallback option because tic/infocmp are not available" >&2;}
8962         fi
8963 fi
8964
8965 USE_FALLBACKS=
8966 test -z "$FALLBACK_LIST" && USE_FALLBACKS="#"
8967
8968 echo "$as_me:8968: checking if you want modern xterm or antique" >&5
8969 echo $ECHO_N "checking if you want modern xterm or antique... $ECHO_C" >&6
8970
8971 # Check whether --with-xterm-new or --without-xterm-new was given.
8972 if test "${with_xterm_new+set}" = set; then
8973   withval="$with_xterm_new"
8974   with_xterm_new=$withval
8975 else
8976   with_xterm_new=yes
8977 fi;
8978 case "$with_xterm_new" in
8979 (no) with_xterm_new=xterm-old;;
8980 (*)      with_xterm_new=xterm-new;;
8981 esac
8982 echo "$as_me:8982: result: $with_xterm_new" >&5
8983 echo "${ECHO_T}$with_xterm_new" >&6
8984 WHICH_XTERM=$with_xterm_new
8985
8986 echo "$as_me:8986: checking if xterm backspace sends BS or DEL" >&5
8987 echo $ECHO_N "checking if xterm backspace sends BS or DEL... $ECHO_C" >&6
8988
8989 # Check whether --with-xterm-kbs or --without-xterm-kbs was given.
8990 if test "${with_xterm_kbs+set}" = set; then
8991   withval="$with_xterm_kbs"
8992   with_xterm_kbs=$withval
8993 else
8994   with_xterm_kbs=BS
8995 fi;
8996 case x$with_xterm_kbs in
8997 (xyes|xno|xBS|xbs|x8)
8998         with_xterm_kbs=BS
8999         ;;
9000 (xDEL|xdel|x127)
9001         with_xterm_kbs=DEL
9002         ;;
9003 (*)
9004         with_xterm_kbs=$withval
9005         ;;
9006 esac
9007 echo "$as_me:9007: result: $with_xterm_kbs" >&5
9008 echo "${ECHO_T}$with_xterm_kbs" >&6
9009 XTERM_KBS=$with_xterm_kbs
9010
9011 MAKE_TERMINFO=
9012 if test "$use_database" = no ; then
9013         TERMINFO="${datadir}/terminfo"
9014         MAKE_TERMINFO="#"
9015 else
9016
9017 echo "$as_me:9017: checking for list of terminfo directories" >&5
9018 echo $ECHO_N "checking for list of terminfo directories... $ECHO_C" >&6
9019
9020 # Check whether --with-terminfo-dirs or --without-terminfo-dirs was given.
9021 if test "${with_terminfo_dirs+set}" = set; then
9022   withval="$with_terminfo_dirs"
9023
9024 else
9025   withval=${TERMINFO_DIRS:-${datadir}/terminfo}
9026 fi;
9027 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9028 cf_dst_path=
9029 for cf_src_path in $withval
9030 do
9031
9032 if test "x$prefix" != xNONE; then
9033         cf_path_syntax="$prefix"
9034 else
9035         cf_path_syntax="$ac_default_prefix"
9036 fi
9037
9038 case ".$cf_src_path" in
9039 (.\$\(*\)*|.\'*\'*)
9040         ;;
9041 (..|./*|.\\*)
9042         ;;
9043 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9044         ;;
9045 (.\$\{*prefix\}*|.\$\{*dir\}*)
9046         eval cf_src_path="$cf_src_path"
9047         case ".$cf_src_path" in
9048         (.NONE/*)
9049                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9050                 ;;
9051         esac
9052         ;;
9053 (.no|.NONE/*)
9054         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9055         ;;
9056 (*)
9057         { { echo "$as_me:9057: error: expected a pathname, not \"$cf_src_path\"" >&5
9058 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9059    { (exit 1); exit 1; }; }
9060         ;;
9061 esac
9062
9063   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9064   cf_dst_path="${cf_dst_path}${cf_src_path}"
9065 done
9066 IFS="$ac_save_ifs"
9067
9068 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9069 # so we have to check/work around.  We do prefer the result of "eval"...
9070 eval cf_dst_eval="$cf_dst_path"
9071 case "x$cf_dst_eval" in
9072 (xNONE*)
9073         TERMINFO_DIRS=$cf_dst_path
9074         ;;
9075 (*)
9076         TERMINFO_DIRS="$cf_dst_eval"
9077         ;;
9078 esac
9079
9080 echo "$as_me:9080: result: $TERMINFO_DIRS" >&5
9081 echo "${ECHO_T}$TERMINFO_DIRS" >&6
9082 test -n "$TERMINFO_DIRS" &&
9083 cat >>confdefs.h <<EOF
9084 #define TERMINFO_DIRS "$TERMINFO_DIRS"
9085 EOF
9086
9087 case "x$TERMINFO" in
9088 x???:*)
9089         { echo "$as_me:9089: WARNING: ignoring non-directory/file TERMINFO value" >&5
9090 echo "$as_me: WARNING: ignoring non-directory/file TERMINFO value" >&2;}
9091         unset TERMINFO
9092         ;;
9093 esac
9094
9095 echo "$as_me:9095: checking for default terminfo directory" >&5
9096 echo $ECHO_N "checking for default terminfo directory... $ECHO_C" >&6
9097
9098 # Check whether --with-default-terminfo-dir or --without-default-terminfo-dir was given.
9099 if test "${with_default_terminfo_dir+set}" = set; then
9100   withval="$with_default_terminfo_dir"
9101
9102 else
9103   withval="${TERMINFO:-${datadir}/terminfo}"
9104 fi; if test -n "${datadir}/terminfo" ; then
9105
9106 if test "x$prefix" != xNONE; then
9107         cf_path_syntax="$prefix"
9108 else
9109         cf_path_syntax="$ac_default_prefix"
9110 fi
9111
9112 case ".$withval" in
9113 (.\$\(*\)*|.\'*\'*)
9114         ;;
9115 (..|./*|.\\*)
9116         ;;
9117 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9118         ;;
9119 (.\$\{*prefix\}*|.\$\{*dir\}*)
9120         eval withval="$withval"
9121         case ".$withval" in
9122         (.NONE/*)
9123                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9124                 ;;
9125         esac
9126         ;;
9127 (.no|.NONE/*)
9128         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
9129         ;;
9130 (*)
9131         { { echo "$as_me:9131: error: expected a pathname, not \"$withval\"" >&5
9132 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
9133    { (exit 1); exit 1; }; }
9134         ;;
9135 esac
9136
9137 fi
9138 eval TERMINFO="$withval"
9139
9140 echo "$as_me:9140: result: $TERMINFO" >&5
9141 echo "${ECHO_T}$TERMINFO" >&6
9142
9143 cat >>confdefs.h <<EOF
9144 #define TERMINFO "$TERMINFO"
9145 EOF
9146
9147 fi
9148
9149 ###     use option --disable-big-core to make tic run on small machines
9150 ###     We need 4Mb, check if we can allocate 50% more than that.
9151 echo "$as_me:9151: checking if big-core option selected" >&5
9152 echo $ECHO_N "checking if big-core option selected... $ECHO_C" >&6
9153
9154 # Check whether --enable-big-core or --disable-big-core was given.
9155 if test "${enable_big_core+set}" = set; then
9156   enableval="$enable_big_core"
9157   with_big_core=$enableval
9158 else
9159   if test "$cross_compiling" = yes; then
9160   with_big_core=no
9161 else
9162   cat >"conftest.$ac_ext" <<_ACEOF
9163 #line 9163 "configure"
9164 #include "confdefs.h"
9165
9166 #include <stdlib.h>
9167 #include <string.h>
9168 int main() {
9169         unsigned long n = 6000000L;
9170         char *s = malloc(n);
9171         if (s != 0)
9172                 s[0] = s[n-1] = 0;
9173         ${cf_cv_main_return:-return}(s == 0);
9174 }
9175 _ACEOF
9176 rm -f "conftest$ac_exeext"
9177 if { (eval echo "$as_me:9177: \"$ac_link\"") >&5
9178   (eval $ac_link) 2>&5
9179   ac_status=$?
9180   echo "$as_me:9180: \$? = $ac_status" >&5
9181   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9182   { (eval echo "$as_me:9182: \"$ac_try\"") >&5
9183   (eval $ac_try) 2>&5
9184   ac_status=$?
9185   echo "$as_me:9185: \$? = $ac_status" >&5
9186   (exit "$ac_status"); }; }; then
9187   with_big_core=yes
9188 else
9189   echo "$as_me: program exited with status $ac_status" >&5
9190 echo "$as_me: failed program was:" >&5
9191 cat "conftest.$ac_ext" >&5
9192 with_big_core=no
9193 fi
9194 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9195 fi
9196 fi;
9197 echo "$as_me:9197: result: $with_big_core" >&5
9198 echo "${ECHO_T}$with_big_core" >&6
9199 test "x$with_big_core" = "xyes" &&
9200 cat >>confdefs.h <<\EOF
9201 #define HAVE_BIG_CORE 1
9202 EOF
9203
9204 ### ISO C only guarantees 512-char strings, we have tables which load faster
9205 ### when constructed using "big" strings.  More than the C compiler, the awk
9206 ### program is a limit on most vendor UNIX systems.  Check that we can build.
9207 echo "$as_me:9207: checking if big-strings option selected" >&5
9208 echo $ECHO_N "checking if big-strings option selected... $ECHO_C" >&6
9209
9210 # Check whether --enable-big-strings or --disable-big-strings was given.
9211 if test "${enable_big_strings+set}" = set; then
9212   enableval="$enable_big_strings"
9213   with_big_strings=$enableval
9214 else
9215
9216         case x$AWK in
9217         (x)
9218                 eval with_big_strings=no
9219                 ;;
9220         (*)
9221                 if ( ${AWK} 'BEGIN { xx = "x"; while (length(xx) < 12000) { xx = xx "x"; }; printf("%s\n", xx); }' 2>/dev/null \
9222                         | $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
9223                         eval with_big_strings=yes
9224                 else
9225                         eval with_big_strings=no
9226                 fi
9227                 ;;
9228         esac
9229
9230 fi;
9231 echo "$as_me:9231: result: $with_big_strings" >&5
9232 echo "${ECHO_T}$with_big_strings" >&6
9233
9234 USE_BIG_STRINGS=0
9235 test "x$with_big_strings" = "xyes" && USE_BIG_STRINGS=1
9236
9237 ###     use option --enable-termcap to compile in the termcap fallback support
9238 echo "$as_me:9238: checking if you want termcap-fallback support" >&5
9239 echo $ECHO_N "checking if you want termcap-fallback support... $ECHO_C" >&6
9240
9241 # Check whether --enable-termcap or --disable-termcap was given.
9242 if test "${enable_termcap+set}" = set; then
9243   enableval="$enable_termcap"
9244   with_termcap=$enableval
9245 else
9246   with_termcap=no
9247 fi;
9248 echo "$as_me:9248: result: $with_termcap" >&5
9249 echo "${ECHO_T}$with_termcap" >&6
9250
9251 NCURSES_USE_TERMCAP=0
9252 if test "x$with_termcap" != "xyes" ; then
9253         if test "$use_database" = no ; then
9254                 if test -z "$with_fallback" ; then
9255                         { { echo "$as_me:9255: error: You have disabled the database w/o specifying fallbacks" >&5
9256 echo "$as_me: error: You have disabled the database w/o specifying fallbacks" >&2;}
9257    { (exit 1); exit 1; }; }
9258                 fi
9259         fi
9260
9261 cat >>confdefs.h <<\EOF
9262 #define PURE_TERMINFO 1
9263 EOF
9264
9265 else
9266
9267         if test "$with_ticlib" != no ; then
9268                 { { echo "$as_me:9268: error: Options --with-ticlib and --enable-termcap cannot be combined" >&5
9269 echo "$as_me: error: Options --with-ticlib and --enable-termcap cannot be combined" >&2;}
9270    { (exit 1); exit 1; }; }
9271         fi
9272
9273         NCURSES_USE_TERMCAP=1
9274         echo "$as_me:9274: checking for list of termcap files" >&5
9275 echo $ECHO_N "checking for list of termcap files... $ECHO_C" >&6
9276
9277 # Check whether --with-termpath or --without-termpath was given.
9278 if test "${with_termpath+set}" = set; then
9279   withval="$with_termpath"
9280
9281 else
9282   withval=${TERMPATH:-/etc/termcap:/usr/share/misc/termcap}
9283 fi;
9284 IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${PATH_SEPARATOR}"
9285 cf_dst_path=
9286 for cf_src_path in $withval
9287 do
9288
9289 if test "x$prefix" != xNONE; then
9290         cf_path_syntax="$prefix"
9291 else
9292         cf_path_syntax="$ac_default_prefix"
9293 fi
9294
9295 case ".$cf_src_path" in
9296 (.\$\(*\)*|.\'*\'*)
9297         ;;
9298 (..|./*|.\\*)
9299         ;;
9300 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
9301         ;;
9302 (.\$\{*prefix\}*|.\$\{*dir\}*)
9303         eval cf_src_path="$cf_src_path"
9304         case ".$cf_src_path" in
9305         (.NONE/*)
9306                 cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9307                 ;;
9308         esac
9309         ;;
9310 (.no|.NONE/*)
9311         cf_src_path=`echo "$cf_src_path" | sed -e s%NONE%$cf_path_syntax%`
9312         ;;
9313 (*)
9314         { { echo "$as_me:9314: error: expected a pathname, not \"$cf_src_path\"" >&5
9315 echo "$as_me: error: expected a pathname, not \"$cf_src_path\"" >&2;}
9316    { (exit 1); exit 1; }; }
9317         ;;
9318 esac
9319
9320   test -n "$cf_dst_path" && cf_dst_path="${cf_dst_path}$PATH_SEPARATOR"
9321   cf_dst_path="${cf_dst_path}${cf_src_path}"
9322 done
9323 IFS="$ac_save_ifs"
9324
9325 # This may use the prefix/exec_prefix symbols which will only yield "NONE"
9326 # so we have to check/work around.  We do prefer the result of "eval"...
9327 eval cf_dst_eval="$cf_dst_path"
9328 case "x$cf_dst_eval" in
9329 (xNONE*)
9330         TERMPATH=$cf_dst_path
9331         ;;
9332 (*)
9333         TERMPATH="$cf_dst_eval"
9334         ;;
9335 esac
9336
9337         echo "$as_me:9337: result: $TERMPATH" >&5
9338 echo "${ECHO_T}$TERMPATH" >&6
9339         test -n "$TERMPATH" &&
9340 cat >>confdefs.h <<EOF
9341 #define TERMPATH "$TERMPATH"
9342 EOF
9343
9344         ###     use option --enable-getcap to use a hacked getcap for reading termcaps
9345         echo "$as_me:9345: checking if fast termcap-loader is needed" >&5
9346 echo $ECHO_N "checking if fast termcap-loader is needed... $ECHO_C" >&6
9347
9348 # Check whether --enable-getcap or --disable-getcap was given.
9349 if test "${enable_getcap+set}" = set; then
9350   enableval="$enable_getcap"
9351   with_getcap=$enableval
9352 else
9353   with_getcap=no
9354 fi;
9355         echo "$as_me:9355: result: $with_getcap" >&5
9356 echo "${ECHO_T}$with_getcap" >&6
9357         test "x$with_getcap" = "xyes" &&
9358 cat >>confdefs.h <<\EOF
9359 #define USE_GETCAP 1
9360 EOF
9361
9362         echo "$as_me:9362: checking if translated termcaps will be cached in ~/.terminfo" >&5
9363 echo $ECHO_N "checking if translated termcaps will be cached in ~/.terminfo... $ECHO_C" >&6
9364
9365 # Check whether --enable-getcap-cache or --disable-getcap-cache was given.
9366 if test "${enable_getcap_cache+set}" = set; then
9367   enableval="$enable_getcap_cache"
9368   with_getcap_cache=$enableval
9369 else
9370   with_getcap_cache=no
9371 fi;
9372         echo "$as_me:9372: result: $with_getcap_cache" >&5
9373 echo "${ECHO_T}$with_getcap_cache" >&6
9374         test "x$with_getcap_cache" = "xyes" &&
9375 cat >>confdefs.h <<\EOF
9376 #define USE_GETCAP_CACHE 1
9377 EOF
9378
9379 fi
9380
9381 ###   Use option --disable-home-terminfo to completely remove ~/.terminfo
9382 echo "$as_me:9382: checking if ~/.terminfo is wanted" >&5
9383 echo $ECHO_N "checking if ~/.terminfo is wanted... $ECHO_C" >&6
9384
9385 # Check whether --enable-home-terminfo or --disable-home-terminfo was given.
9386 if test "${enable_home_terminfo+set}" = set; then
9387   enableval="$enable_home_terminfo"
9388   with_home_terminfo=$enableval
9389 else
9390   with_home_terminfo=yes
9391 fi;
9392 echo "$as_me:9392: result: $with_home_terminfo" >&5
9393 echo "${ECHO_T}$with_home_terminfo" >&6
9394 test "x$with_home_terminfo" = "xyes" &&
9395 cat >>confdefs.h <<\EOF
9396 #define USE_HOME_TERMINFO 1
9397 EOF
9398
9399 echo "$as_me:9399: checking if you want to permit root to use ncurses environment variables" >&5
9400 echo $ECHO_N "checking if you want to permit root to use ncurses environment variables... $ECHO_C" >&6
9401
9402 # Check whether --enable-root-environ or --disable-root-environ was given.
9403 if test "${enable_root_environ+set}" = set; then
9404   enableval="$enable_root_environ"
9405   with_root_environ=$enableval
9406 else
9407   with_root_environ=yes
9408 fi;
9409 echo "$as_me:9409: result: $with_root_environ" >&5
9410 echo "${ECHO_T}$with_root_environ" >&6
9411 test "x$with_root_environ" = xyes &&
9412 cat >>confdefs.h <<\EOF
9413 #define USE_ROOT_ENVIRON 1
9414 EOF
9415
9416 echo "$as_me:9416: checking if you want to permit setuid programs to access all files" >&5
9417 echo $ECHO_N "checking if you want to permit setuid programs to access all files... $ECHO_C" >&6
9418
9419 # Check whether --enable-root-environ or --disable-root-environ was given.
9420 if test "${enable_root_environ+set}" = set; then
9421   enableval="$enable_root_environ"
9422   with_root_access=$enableval
9423 else
9424   with_root_access=yes
9425 fi;
9426 echo "$as_me:9426: result: $with_root_access" >&5
9427 echo "${ECHO_T}$with_root_access" >&6
9428 test "x$with_root_access" = xyes &&
9429 cat >>confdefs.h <<\EOF
9430 #define USE_ROOT_ACCESS 1
9431 EOF
9432
9433 ###   Use option --enable-symlinks to make tic use symlinks, not hard links
9434 ###   to reduce storage requirements for the terminfo database.
9435
9436 for ac_header in \
9437 unistd.h \
9438
9439 do
9440 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9441 echo "$as_me:9441: checking for $ac_header" >&5
9442 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9443 if eval "test \"\${$as_ac_Header+set}\" = set"; then
9444   echo $ECHO_N "(cached) $ECHO_C" >&6
9445 else
9446   cat >"conftest.$ac_ext" <<_ACEOF
9447 #line 9447 "configure"
9448 #include "confdefs.h"
9449 #include <$ac_header>
9450 _ACEOF
9451 if { (eval echo "$as_me:9451: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9452   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9453   ac_status=$?
9454   $EGREP -v '^ *\+' conftest.er1 >conftest.err
9455   rm -f conftest.er1
9456   cat conftest.err >&5
9457   echo "$as_me:9457: \$? = $ac_status" >&5
9458   (exit "$ac_status"); } >/dev/null; then
9459   if test -s conftest.err; then
9460     ac_cpp_err=$ac_c_preproc_warn_flag
9461   else
9462     ac_cpp_err=
9463   fi
9464 else
9465   ac_cpp_err=yes
9466 fi
9467 if test -z "$ac_cpp_err"; then
9468   eval "$as_ac_Header=yes"
9469 else
9470   echo "$as_me: failed program was:" >&5
9471   cat "conftest.$ac_ext" >&5
9472   eval "$as_ac_Header=no"
9473 fi
9474 rm -f conftest.err "conftest.$ac_ext"
9475 fi
9476 echo "$as_me:9476: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
9477 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
9478 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
9479   cat >>confdefs.h <<EOF
9480 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9481 EOF
9482
9483 fi
9484 done
9485
9486 for ac_func in \
9487         remove \
9488         unlink
9489 do
9490 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9491 echo "$as_me:9491: checking for $ac_func" >&5
9492 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9493 if eval "test \"\${$as_ac_var+set}\" = set"; then
9494   echo $ECHO_N "(cached) $ECHO_C" >&6
9495 else
9496   cat >"conftest.$ac_ext" <<_ACEOF
9497 #line 9497 "configure"
9498 #include "confdefs.h"
9499 #define $ac_func autoconf_temporary
9500 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9501 #undef $ac_func
9502
9503 #ifdef __cplusplus
9504 extern "C"
9505 #endif
9506
9507 /* We use char because int might match the return type of a gcc2
9508    builtin and then its argument prototype would still apply.  */
9509 char $ac_func (void);
9510
9511 int
9512 main (void)
9513 {
9514
9515 /* The GNU C library defines stubs for functions which it implements
9516     to always fail with ENOSYS.  Some functions are actually named
9517     something starting with __ and the normal name is an alias.  */
9518 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9519 #error found stub for $ac_func
9520 #endif
9521
9522         return $ac_func ();
9523   ;
9524   return 0;
9525 }
9526 _ACEOF
9527 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9528 if { (eval echo "$as_me:9528: \"$ac_link\"") >&5
9529   (eval $ac_link) 2>&5
9530   ac_status=$?
9531   echo "$as_me:9531: \$? = $ac_status" >&5
9532   (exit "$ac_status"); } &&
9533          { ac_try='test -s "conftest$ac_exeext"'
9534   { (eval echo "$as_me:9534: \"$ac_try\"") >&5
9535   (eval $ac_try) 2>&5
9536   ac_status=$?
9537   echo "$as_me:9537: \$? = $ac_status" >&5
9538   (exit "$ac_status"); }; }; then
9539   eval "$as_ac_var=yes"
9540 else
9541   echo "$as_me: failed program was:" >&5
9542 cat "conftest.$ac_ext" >&5
9543 eval "$as_ac_var=no"
9544 fi
9545 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9546 fi
9547 echo "$as_me:9547: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9548 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9549 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9550   cat >>confdefs.h <<EOF
9551 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9552 EOF
9553
9554 fi
9555 done
9556
9557 if test "$cross_compiling" = yes ; then
9558
9559 for ac_func in \
9560                 link \
9561                 symlink
9562 do
9563 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9564 echo "$as_me:9564: checking for $ac_func" >&5
9565 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9566 if eval "test \"\${$as_ac_var+set}\" = set"; then
9567   echo $ECHO_N "(cached) $ECHO_C" >&6
9568 else
9569   cat >"conftest.$ac_ext" <<_ACEOF
9570 #line 9570 "configure"
9571 #include "confdefs.h"
9572 #define $ac_func autoconf_temporary
9573 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
9574 #undef $ac_func
9575
9576 #ifdef __cplusplus
9577 extern "C"
9578 #endif
9579
9580 /* We use char because int might match the return type of a gcc2
9581    builtin and then its argument prototype would still apply.  */
9582 char $ac_func (void);
9583
9584 int
9585 main (void)
9586 {
9587
9588 /* The GNU C library defines stubs for functions which it implements
9589     to always fail with ENOSYS.  Some functions are actually named
9590     something starting with __ and the normal name is an alias.  */
9591 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9592 #error found stub for $ac_func
9593 #endif
9594
9595         return $ac_func ();
9596   ;
9597   return 0;
9598 }
9599 _ACEOF
9600 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9601 if { (eval echo "$as_me:9601: \"$ac_link\"") >&5
9602   (eval $ac_link) 2>&5
9603   ac_status=$?
9604   echo "$as_me:9604: \$? = $ac_status" >&5
9605   (exit "$ac_status"); } &&
9606          { ac_try='test -s "conftest$ac_exeext"'
9607   { (eval echo "$as_me:9607: \"$ac_try\"") >&5
9608   (eval $ac_try) 2>&5
9609   ac_status=$?
9610   echo "$as_me:9610: \$? = $ac_status" >&5
9611   (exit "$ac_status"); }; }; then
9612   eval "$as_ac_var=yes"
9613 else
9614   echo "$as_me: failed program was:" >&5
9615 cat "conftest.$ac_ext" >&5
9616 eval "$as_ac_var=no"
9617 fi
9618 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9619 fi
9620 echo "$as_me:9620: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9621 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9622 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9623   cat >>confdefs.h <<EOF
9624 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9625 EOF
9626
9627 fi
9628 done
9629
9630 else
9631         echo "$as_me:9631: checking if link/symlink functions work" >&5
9632 echo $ECHO_N "checking if link/symlink functions work... $ECHO_C" >&6
9633 if test "${cf_cv_link_funcs+set}" = set; then
9634   echo $ECHO_N "(cached) $ECHO_C" >&6
9635 else
9636
9637                 cf_cv_link_funcs=
9638                 for cf_func in link symlink ; do
9639                         if test "$cross_compiling" = yes; then
9640
9641                         eval 'ac_cv_func_'$cf_func'=error'
9642 else
9643   cat >"conftest.$ac_ext" <<_ACEOF
9644 #line 9644 "configure"
9645 #include "confdefs.h"
9646
9647 #include <stdio.h>
9648 #include <sys/types.h>
9649 #include <sys/stat.h>
9650 #ifdef HAVE_UNISTD_H
9651 #include <unistd.h>
9652 #endif
9653 int main(void)
9654 {
9655         int fail = 0;
9656         char *src = "conftest.tmp";
9657         char *dst = "conftest.chk";
9658         struct stat src_sb, dst_sb;
9659         FILE *fp = fopen(src, "w");
9660         if (fp == 0) { fail = 3; } else {
9661                 fclose(fp); stat(src, &src_sb);
9662                 if ($cf_func(src, dst) < 0) {
9663                         fail = 1;
9664                 } else if (stat(dst, &dst_sb) < 0) {
9665                         fail = 2;
9666                 } else {
9667                         long diff = (dst_sb.st_mtime - src_sb.st_mtime);
9668                         if (diff < 0) diff = -diff;
9669                         if (diff > 2) fail = 3;
9670                 }
9671         }
9672 #ifdef HAVE_UNLINK
9673         unlink(dst); unlink(src);
9674 #else
9675         remove(dst); remove(src);
9676 #endif
9677         ${cf_cv_main_return:-return} (fail);
9678 }
9679
9680 _ACEOF
9681 rm -f "conftest$ac_exeext"
9682 if { (eval echo "$as_me:9682: \"$ac_link\"") >&5
9683   (eval $ac_link) 2>&5
9684   ac_status=$?
9685   echo "$as_me:9685: \$? = $ac_status" >&5
9686   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
9687   { (eval echo "$as_me:9687: \"$ac_try\"") >&5
9688   (eval $ac_try) 2>&5
9689   ac_status=$?
9690   echo "$as_me:9690: \$? = $ac_status" >&5
9691   (exit "$ac_status"); }; }; then
9692
9693                         cf_cv_link_funcs="$cf_cv_link_funcs $cf_func"
9694                         eval 'ac_cv_func_'$cf_func'=yes'
9695 else
9696   echo "$as_me: program exited with status $ac_status" >&5
9697 echo "$as_me: failed program was:" >&5
9698 cat "conftest.$ac_ext" >&5
9699
9700                         eval 'ac_cv_func_'$cf_func'=no'
9701 fi
9702 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
9703 fi
9704                 done
9705                 test -z "$cf_cv_link_funcs" && cf_cv_link_funcs=no
9706
9707 fi
9708 echo "$as_me:9708: result: $cf_cv_link_funcs" >&5
9709 echo "${ECHO_T}$cf_cv_link_funcs" >&6
9710         test "$ac_cv_func_link"    = yes &&
9711 cat >>confdefs.h <<\EOF
9712 #define HAVE_LINK 1
9713 EOF
9714
9715         test "$ac_cv_func_symlink" = yes &&
9716 cat >>confdefs.h <<\EOF
9717 #define HAVE_SYMLINK 1
9718 EOF
9719
9720 fi
9721
9722 with_links=no
9723 with_symlinks=no
9724
9725 # soft links (symbolic links) are useful for some systems where hard links do
9726 # not work, or to make it simpler to copy terminfo trees around.
9727 if test "x$ac_cv_func_symlink" = xyes ; then
9728         echo "$as_me:9728: checking if tic should use symbolic links" >&5
9729 echo $ECHO_N "checking if tic should use symbolic links... $ECHO_C" >&6
9730
9731 # Check whether --enable-symlinks or --disable-symlinks was given.
9732 if test "${enable_symlinks+set}" = set; then
9733   enableval="$enable_symlinks"
9734   with_symlinks=$enableval
9735 else
9736   with_symlinks=no
9737 fi;
9738         echo "$as_me:9738: result: $with_symlinks" >&5
9739 echo "${ECHO_T}$with_symlinks" >&6
9740 fi
9741
9742 # If we have hard links and did not choose to use soft links instead, there is
9743 # no reason to make this choice optional - use the hard links.
9744 if test "$with_symlinks" = no ; then
9745         echo "$as_me:9745: checking if tic should use hard links" >&5
9746 echo $ECHO_N "checking if tic should use hard links... $ECHO_C" >&6
9747         if test "x$ac_cv_func_link" = xyes ; then
9748                 with_links=yes
9749         else
9750                 with_links=no
9751         fi
9752         echo "$as_me:9752: result: $with_links" >&5
9753 echo "${ECHO_T}$with_links" >&6
9754 fi
9755
9756 test "x$with_links" = xyes &&
9757 cat >>confdefs.h <<\EOF
9758 #define USE_LINKS 1
9759 EOF
9760
9761 test "x$with_symlinks" = xyes &&
9762 cat >>confdefs.h <<\EOF
9763 #define USE_SYMLINKS 1
9764 EOF
9765
9766 ###   use option --enable-broken-linker to force on use of broken-linker support
9767
9768 echo "$as_me:9768: checking if you want broken-linker support code" >&5
9769 echo $ECHO_N "checking if you want broken-linker support code... $ECHO_C" >&6
9770
9771 # Check whether --enable-broken_linker or --disable-broken_linker was given.
9772 if test "${enable_broken_linker+set}" = set; then
9773   enableval="$enable_broken_linker"
9774   with_broken_linker=$enableval
9775 else
9776   with_broken_linker=no
9777 fi;
9778 echo "$as_me:9778: result: $with_broken_linker" >&5
9779 echo "${ECHO_T}$with_broken_linker" >&6
9780
9781 : "${BROKEN_LINKER:=0}"
9782 if test "x$with_broken_linker" = xyes ; then
9783
9784 cat >>confdefs.h <<\EOF
9785 #define BROKEN_LINKER 1
9786 EOF
9787
9788         BROKEN_LINKER=1
9789 fi
9790
9791 ###   use option --enable-bsdpad to have tputs process BSD-style prefix padding
9792 echo "$as_me:9792: checking if tputs should process BSD-style prefix padding" >&5
9793 echo $ECHO_N "checking if tputs should process BSD-style prefix padding... $ECHO_C" >&6
9794
9795 # Check whether --enable-bsdpad or --disable-bsdpad was given.
9796 if test "${enable_bsdpad+set}" = set; then
9797   enableval="$enable_bsdpad"
9798   with_bsdpad=$enableval
9799 else
9800   with_bsdpad=no
9801 fi;
9802 echo "$as_me:9802: result: $with_bsdpad" >&5
9803 echo "${ECHO_T}$with_bsdpad" >&6
9804 test "x$with_bsdpad" = xyes &&
9805 cat >>confdefs.h <<\EOF
9806 #define BSD_TPUTS 1
9807 EOF
9808
9809 ###   use option --enable-widec to turn on use of wide-character support
9810 NCURSES_CH_T=chtype
9811 NCURSES_LIBUTF8=0
9812
9813 NEED_WCHAR_H=0
9814 NCURSES_MBSTATE_T=0
9815 NCURSES_WCHAR_T=0
9816 NCURSES_WINT_T=0
9817
9818 # Check to define _XOPEN_SOURCE "automatically"
9819 CPPFLAGS_before_XOPEN="$CPPFLAGS"
9820
9821 echo "$as_me:9821: checking if the POSIX test-macros are already defined" >&5
9822 echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
9823 if test "${cf_cv_posix_visible+set}" = set; then
9824   echo $ECHO_N "(cached) $ECHO_C" >&6
9825 else
9826
9827 cat >"conftest.$ac_ext" <<_ACEOF
9828 #line 9828 "configure"
9829 #include "confdefs.h"
9830 #include <stdio.h>
9831 int
9832 main (void)
9833 {
9834
9835 #if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
9836         && defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
9837         && defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
9838         && defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
9839 #error conflicting symbols found
9840 #endif
9841
9842   ;
9843   return 0;
9844 }
9845 _ACEOF
9846 rm -f "conftest.$ac_objext"
9847 if { (eval echo "$as_me:9847: \"$ac_compile\"") >&5
9848   (eval $ac_compile) 2>&5
9849   ac_status=$?
9850   echo "$as_me:9850: \$? = $ac_status" >&5
9851   (exit "$ac_status"); } &&
9852          { ac_try='test -s "conftest.$ac_objext"'
9853   { (eval echo "$as_me:9853: \"$ac_try\"") >&5
9854   (eval $ac_try) 2>&5
9855   ac_status=$?
9856   echo "$as_me:9856: \$? = $ac_status" >&5
9857   (exit "$ac_status"); }; }; then
9858   cf_cv_posix_visible=no
9859 else
9860   echo "$as_me: failed program was:" >&5
9861 cat "conftest.$ac_ext" >&5
9862 cf_cv_posix_visible=yes
9863 fi
9864 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9865
9866 fi
9867 echo "$as_me:9867: result: $cf_cv_posix_visible" >&5
9868 echo "${ECHO_T}$cf_cv_posix_visible" >&6
9869
9870 if test "$cf_cv_posix_visible" = no; then
9871
9872 cf_XOPEN_SOURCE=600
9873 cf_POSIX_C_SOURCE=199506L
9874 cf_xopen_source=
9875
9876 case "$host_os" in
9877 (aix[4-7]*)
9878         cf_xopen_source="-D_ALL_SOURCE"
9879         ;;
9880 (msys)
9881         cf_XOPEN_SOURCE=600
9882         ;;
9883 (darwin[0-8].*)
9884         cf_xopen_source="-D_APPLE_C_SOURCE"
9885         ;;
9886 (darwin*)
9887         cf_xopen_source="-D_DARWIN_C_SOURCE"
9888         cf_XOPEN_SOURCE=
9889         ;;
9890 (freebsd*|dragonfly*|midnightbsd*)
9891         # 5.x headers associate
9892         #       _XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
9893         #       _XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
9894         cf_POSIX_C_SOURCE=200112L
9895         cf_XOPEN_SOURCE=600
9896         cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
9897         ;;
9898 (hpux11*)
9899         cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
9900         ;;
9901 (hpux*)
9902         cf_xopen_source="-D_HPUX_SOURCE"
9903         ;;
9904 (irix[56].*)
9905         cf_xopen_source="-D_SGI_SOURCE"
9906         cf_XOPEN_SOURCE=
9907         ;;
9908 (linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
9909
9910 cf_gnu_xopen_source=$cf_XOPEN_SOURCE
9911
9912 echo "$as_me:9912: checking if this is the GNU C library" >&5
9913 echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
9914 if test "${cf_cv_gnu_library+set}" = set; then
9915   echo $ECHO_N "(cached) $ECHO_C" >&6
9916 else
9917
9918 cat >"conftest.$ac_ext" <<_ACEOF
9919 #line 9919 "configure"
9920 #include "confdefs.h"
9921 #include <sys/types.h>
9922 int
9923 main (void)
9924 {
9925
9926         #if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
9927                 return 0;
9928         #elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
9929                 return 0;
9930         #else
9931         #       error not GNU C library
9932         #endif
9933   ;
9934   return 0;
9935 }
9936 _ACEOF
9937 rm -f "conftest.$ac_objext"
9938 if { (eval echo "$as_me:9938: \"$ac_compile\"") >&5
9939   (eval $ac_compile) 2>&5
9940   ac_status=$?
9941   echo "$as_me:9941: \$? = $ac_status" >&5
9942   (exit "$ac_status"); } &&
9943          { ac_try='test -s "conftest.$ac_objext"'
9944   { (eval echo "$as_me:9944: \"$ac_try\"") >&5
9945   (eval $ac_try) 2>&5
9946   ac_status=$?
9947   echo "$as_me:9947: \$? = $ac_status" >&5
9948   (exit "$ac_status"); }; }; then
9949   cf_cv_gnu_library=yes
9950 else
9951   echo "$as_me: failed program was:" >&5
9952 cat "conftest.$ac_ext" >&5
9953 cf_cv_gnu_library=no
9954 fi
9955 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9956
9957 fi
9958 echo "$as_me:9958: result: $cf_cv_gnu_library" >&5
9959 echo "${ECHO_T}$cf_cv_gnu_library" >&6
9960
9961 if test x$cf_cv_gnu_library = xyes; then
9962
9963         # With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
9964         # was changed to help a little.  newlib incorporated the change about 4
9965         # years later.
9966         echo "$as_me:9966: checking if _DEFAULT_SOURCE can be used as a basis" >&5
9967 echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
9968 if test "${cf_cv_gnu_library_219+set}" = set; then
9969   echo $ECHO_N "(cached) $ECHO_C" >&6
9970 else
9971
9972                 cf_save="$CPPFLAGS"
9973
9974         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9975         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
9976
9977                 cat >"conftest.$ac_ext" <<_ACEOF
9978 #line 9978 "configure"
9979 #include "confdefs.h"
9980 #include <sys/types.h>
9981 int
9982 main (void)
9983 {
9984
9985                         #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
9986                                 return 0;
9987                         #elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
9988                                 return 0;
9989                         #else
9990                         #       error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
9991                         #endif
9992   ;
9993   return 0;
9994 }
9995 _ACEOF
9996 rm -f "conftest.$ac_objext"
9997 if { (eval echo "$as_me:9997: \"$ac_compile\"") >&5
9998   (eval $ac_compile) 2>&5
9999   ac_status=$?
10000   echo "$as_me:10000: \$? = $ac_status" >&5
10001   (exit "$ac_status"); } &&
10002          { ac_try='test -s "conftest.$ac_objext"'
10003   { (eval echo "$as_me:10003: \"$ac_try\"") >&5
10004   (eval $ac_try) 2>&5
10005   ac_status=$?
10006   echo "$as_me:10006: \$? = $ac_status" >&5
10007   (exit "$ac_status"); }; }; then
10008   cf_cv_gnu_library_219=yes
10009 else
10010   echo "$as_me: failed program was:" >&5
10011 cat "conftest.$ac_ext" >&5
10012 cf_cv_gnu_library_219=no
10013 fi
10014 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10015                 CPPFLAGS="$cf_save"
10016
10017 fi
10018 echo "$as_me:10018: result: $cf_cv_gnu_library_219" >&5
10019 echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
10020
10021         if test "x$cf_cv_gnu_library_219" = xyes; then
10022                 cf_save="$CPPFLAGS"
10023                 echo "$as_me:10023: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
10024 echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
10025 if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
10026   echo $ECHO_N "(cached) $ECHO_C" >&6
10027 else
10028
10029 cf_fix_cppflags=no
10030 cf_new_cflags=
10031 cf_new_cppflags=
10032 cf_new_extra_cppflags=
10033
10034 for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
10035 do
10036 case "$cf_fix_cppflags" in
10037 (no)
10038         case "$cf_add_cflags" in
10039         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10040                 case "$cf_add_cflags" in
10041                 (-D*)
10042                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10043
10044                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10045                                 && test -z "${cf_tst_cflags}" \
10046                                 && cf_fix_cppflags=yes
10047
10048                         if test "$cf_fix_cppflags" = yes ; then
10049
10050         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10051         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10052
10053                                 continue
10054                         elif test "${cf_tst_cflags}" = "\"'" ; then
10055
10056         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10057         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10058
10059                                 continue
10060                         fi
10061                         ;;
10062                 esac
10063                 case "$CPPFLAGS" in
10064                 (*$cf_add_cflags)
10065                         ;;
10066                 (*)
10067                         case "$cf_add_cflags" in
10068                         (-D*)
10069                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10070
10071 CPPFLAGS=`echo "$CPPFLAGS" | \
10072         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10073                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10074
10075                                 ;;
10076                         esac
10077
10078         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10079         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10080
10081                         ;;
10082                 esac
10083                 ;;
10084         (*)
10085
10086         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10087         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10088
10089                 ;;
10090         esac
10091         ;;
10092 (yes)
10093
10094         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10095         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10096
10097         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10098
10099         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10100                 && test -z "${cf_tst_cflags}" \
10101                 && cf_fix_cppflags=no
10102         ;;
10103 esac
10104 done
10105
10106 if test -n "$cf_new_cflags" ; then
10107
10108         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10109         CFLAGS="${CFLAGS}$cf_new_cflags"
10110
10111 fi
10112
10113 if test -n "$cf_new_cppflags" ; then
10114
10115         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10116         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10117
10118 fi
10119
10120 if test -n "$cf_new_extra_cppflags" ; then
10121
10122         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10123         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10124
10125 fi
10126
10127                         cat >"conftest.$ac_ext" <<_ACEOF
10128 #line 10128 "configure"
10129 #include "confdefs.h"
10130
10131                                 #include <limits.h>
10132                                 #include <sys/types.h>
10133
10134 int
10135 main (void)
10136 {
10137
10138                                 #if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
10139                                         return 0;
10140                                 #else
10141                                 #       error GNU C library is too old
10142                                 #endif
10143   ;
10144   return 0;
10145 }
10146 _ACEOF
10147 rm -f "conftest.$ac_objext"
10148 if { (eval echo "$as_me:10148: \"$ac_compile\"") >&5
10149   (eval $ac_compile) 2>&5
10150   ac_status=$?
10151   echo "$as_me:10151: \$? = $ac_status" >&5
10152   (exit "$ac_status"); } &&
10153          { ac_try='test -s "conftest.$ac_objext"'
10154   { (eval echo "$as_me:10154: \"$ac_try\"") >&5
10155   (eval $ac_try) 2>&5
10156   ac_status=$?
10157   echo "$as_me:10157: \$? = $ac_status" >&5
10158   (exit "$ac_status"); }; }; then
10159   cf_cv_gnu_dftsrc_219=yes
10160 else
10161   echo "$as_me: failed program was:" >&5
10162 cat "conftest.$ac_ext" >&5
10163 cf_cv_gnu_dftsrc_219=no
10164 fi
10165 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10166
10167 fi
10168 echo "$as_me:10168: result: $cf_cv_gnu_dftsrc_219" >&5
10169 echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
10170                 test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
10171         else
10172                 cf_cv_gnu_dftsrc_219=maybe
10173         fi
10174
10175         if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
10176
10177                 echo "$as_me:10177: checking if we must define _GNU_SOURCE" >&5
10178 echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
10179 if test "${cf_cv_gnu_source+set}" = set; then
10180   echo $ECHO_N "(cached) $ECHO_C" >&6
10181 else
10182
10183                 cat >"conftest.$ac_ext" <<_ACEOF
10184 #line 10184 "configure"
10185 #include "confdefs.h"
10186 #include <sys/types.h>
10187 int
10188 main (void)
10189 {
10190
10191                         #ifndef _XOPEN_SOURCE
10192                         #error  expected _XOPEN_SOURCE to be defined
10193                         #endif
10194   ;
10195   return 0;
10196 }
10197 _ACEOF
10198 rm -f "conftest.$ac_objext"
10199 if { (eval echo "$as_me:10199: \"$ac_compile\"") >&5
10200   (eval $ac_compile) 2>&5
10201   ac_status=$?
10202   echo "$as_me:10202: \$? = $ac_status" >&5
10203   (exit "$ac_status"); } &&
10204          { ac_try='test -s "conftest.$ac_objext"'
10205   { (eval echo "$as_me:10205: \"$ac_try\"") >&5
10206   (eval $ac_try) 2>&5
10207   ac_status=$?
10208   echo "$as_me:10208: \$? = $ac_status" >&5
10209   (exit "$ac_status"); }; }; then
10210   cf_cv_gnu_source=no
10211 else
10212   echo "$as_me: failed program was:" >&5
10213 cat "conftest.$ac_ext" >&5
10214 cf_save="$CPPFLAGS"
10215
10216 cf_fix_cppflags=no
10217 cf_new_cflags=
10218 cf_new_cppflags=
10219 cf_new_extra_cppflags=
10220
10221 for cf_add_cflags in -D_GNU_SOURCE
10222 do
10223 case "$cf_fix_cppflags" in
10224 (no)
10225         case "$cf_add_cflags" in
10226         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10227                 case "$cf_add_cflags" in
10228                 (-D*)
10229                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10230
10231                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10232                                 && test -z "${cf_tst_cflags}" \
10233                                 && cf_fix_cppflags=yes
10234
10235                         if test "$cf_fix_cppflags" = yes ; then
10236
10237         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10238         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10239
10240                                 continue
10241                         elif test "${cf_tst_cflags}" = "\"'" ; then
10242
10243         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10244         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10245
10246                                 continue
10247                         fi
10248                         ;;
10249                 esac
10250                 case "$CPPFLAGS" in
10251                 (*$cf_add_cflags)
10252                         ;;
10253                 (*)
10254                         case "$cf_add_cflags" in
10255                         (-D*)
10256                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10257
10258 CPPFLAGS=`echo "$CPPFLAGS" | \
10259         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10260                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10261
10262                                 ;;
10263                         esac
10264
10265         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10266         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10267
10268                         ;;
10269                 esac
10270                 ;;
10271         (*)
10272
10273         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10274         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10275
10276                 ;;
10277         esac
10278         ;;
10279 (yes)
10280
10281         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10282         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10283
10284         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10285
10286         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10287                 && test -z "${cf_tst_cflags}" \
10288                 && cf_fix_cppflags=no
10289         ;;
10290 esac
10291 done
10292
10293 if test -n "$cf_new_cflags" ; then
10294
10295         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10296         CFLAGS="${CFLAGS}$cf_new_cflags"
10297
10298 fi
10299
10300 if test -n "$cf_new_cppflags" ; then
10301
10302         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10303         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10304
10305 fi
10306
10307 if test -n "$cf_new_extra_cppflags" ; then
10308
10309         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10310         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10311
10312 fi
10313
10314                          cat >"conftest.$ac_ext" <<_ACEOF
10315 #line 10315 "configure"
10316 #include "confdefs.h"
10317 #include <sys/types.h>
10318 int
10319 main (void)
10320 {
10321
10322                                 #ifdef _XOPEN_SOURCE
10323                                 #error  expected _XOPEN_SOURCE to be undefined
10324                                 #endif
10325   ;
10326   return 0;
10327 }
10328 _ACEOF
10329 rm -f "conftest.$ac_objext"
10330 if { (eval echo "$as_me:10330: \"$ac_compile\"") >&5
10331   (eval $ac_compile) 2>&5
10332   ac_status=$?
10333   echo "$as_me:10333: \$? = $ac_status" >&5
10334   (exit "$ac_status"); } &&
10335          { ac_try='test -s "conftest.$ac_objext"'
10336   { (eval echo "$as_me:10336: \"$ac_try\"") >&5
10337   (eval $ac_try) 2>&5
10338   ac_status=$?
10339   echo "$as_me:10339: \$? = $ac_status" >&5
10340   (exit "$ac_status"); }; }; then
10341   cf_cv_gnu_source=no
10342 else
10343   echo "$as_me: failed program was:" >&5
10344 cat "conftest.$ac_ext" >&5
10345 cf_cv_gnu_source=yes
10346 fi
10347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10348                         CPPFLAGS="$cf_save"
10349
10350 fi
10351 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10352
10353 fi
10354 echo "$as_me:10354: result: $cf_cv_gnu_source" >&5
10355 echo "${ECHO_T}$cf_cv_gnu_source" >&6
10356
10357                 if test "$cf_cv_gnu_source" = yes
10358                 then
10359                 echo "$as_me:10359: checking if we should also define _DEFAULT_SOURCE" >&5
10360 echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
10361 if test "${cf_cv_default_source+set}" = set; then
10362   echo $ECHO_N "(cached) $ECHO_C" >&6
10363 else
10364
10365         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10366         CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
10367
10368                         cat >"conftest.$ac_ext" <<_ACEOF
10369 #line 10369 "configure"
10370 #include "confdefs.h"
10371 #include <sys/types.h>
10372 int
10373 main (void)
10374 {
10375
10376                                 #ifdef _DEFAULT_SOURCE
10377                                 #error  expected _DEFAULT_SOURCE to be undefined
10378                                 #endif
10379   ;
10380   return 0;
10381 }
10382 _ACEOF
10383 rm -f "conftest.$ac_objext"
10384 if { (eval echo "$as_me:10384: \"$ac_compile\"") >&5
10385   (eval $ac_compile) 2>&5
10386   ac_status=$?
10387   echo "$as_me:10387: \$? = $ac_status" >&5
10388   (exit "$ac_status"); } &&
10389          { ac_try='test -s "conftest.$ac_objext"'
10390   { (eval echo "$as_me:10390: \"$ac_try\"") >&5
10391   (eval $ac_try) 2>&5
10392   ac_status=$?
10393   echo "$as_me:10393: \$? = $ac_status" >&5
10394   (exit "$ac_status"); }; }; then
10395   cf_cv_default_source=no
10396 else
10397   echo "$as_me: failed program was:" >&5
10398 cat "conftest.$ac_ext" >&5
10399 cf_cv_default_source=yes
10400 fi
10401 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10402
10403 fi
10404 echo "$as_me:10404: result: $cf_cv_default_source" >&5
10405 echo "${ECHO_T}$cf_cv_default_source" >&6
10406                         if test "$cf_cv_default_source" = yes
10407                         then
10408
10409         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10410         CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
10411
10412                         fi
10413                 fi
10414         fi
10415
10416 fi
10417
10418         ;;
10419 (minix*)
10420         cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
10421         ;;
10422 (mirbsd*)
10423         # setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
10424         cf_XOPEN_SOURCE=
10425
10426 if test "$cf_cv_posix_visible" = no; then
10427
10428 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10429
10430 cf_save_CFLAGS="$CFLAGS"
10431 cf_save_CPPFLAGS="$CPPFLAGS"
10432
10433 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10434         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10435                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10436
10437 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10438         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10439                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10440
10441 echo "$as_me:10441: checking if we should define _POSIX_C_SOURCE" >&5
10442 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10443 if test "${cf_cv_posix_c_source+set}" = set; then
10444   echo $ECHO_N "(cached) $ECHO_C" >&6
10445 else
10446
10447 echo "${as_me:-configure}:10447: testing if the symbol is already defined go no further ..." 1>&5
10448
10449         cat >"conftest.$ac_ext" <<_ACEOF
10450 #line 10450 "configure"
10451 #include "confdefs.h"
10452 #include <sys/types.h>
10453 int
10454 main (void)
10455 {
10456
10457 #ifndef _POSIX_C_SOURCE
10458 make an error
10459 #endif
10460   ;
10461   return 0;
10462 }
10463 _ACEOF
10464 rm -f "conftest.$ac_objext"
10465 if { (eval echo "$as_me:10465: \"$ac_compile\"") >&5
10466   (eval $ac_compile) 2>&5
10467   ac_status=$?
10468   echo "$as_me:10468: \$? = $ac_status" >&5
10469   (exit "$ac_status"); } &&
10470          { ac_try='test -s "conftest.$ac_objext"'
10471   { (eval echo "$as_me:10471: \"$ac_try\"") >&5
10472   (eval $ac_try) 2>&5
10473   ac_status=$?
10474   echo "$as_me:10474: \$? = $ac_status" >&5
10475   (exit "$ac_status"); }; }; then
10476   cf_cv_posix_c_source=no
10477 else
10478   echo "$as_me: failed program was:" >&5
10479 cat "conftest.$ac_ext" >&5
10480 cf_want_posix_source=no
10481          case .$cf_POSIX_C_SOURCE in
10482          (.[12]??*)
10483                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10484                 ;;
10485          (.2)
10486                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
10487                 cf_want_posix_source=yes
10488                 ;;
10489          (.*)
10490                 cf_want_posix_source=yes
10491                 ;;
10492          esac
10493          if test "$cf_want_posix_source" = yes ; then
10494                 cat >"conftest.$ac_ext" <<_ACEOF
10495 #line 10495 "configure"
10496 #include "confdefs.h"
10497 #include <sys/types.h>
10498 int
10499 main (void)
10500 {
10501
10502 #ifdef _POSIX_SOURCE
10503 make an error
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   :
10522 else
10523   echo "$as_me: failed program was:" >&5
10524 cat "conftest.$ac_ext" >&5
10525 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
10526 fi
10527 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10528          fi
10529
10530 echo "${as_me:-configure}:10530: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
10531
10532          CFLAGS="$cf_trim_CFLAGS"
10533          CPPFLAGS="$cf_trim_CPPFLAGS"
10534
10535         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10536         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
10537
10538 echo "${as_me:-configure}:10538: testing if the second compile does not leave our definition intact error ..." 1>&5
10539
10540          cat >"conftest.$ac_ext" <<_ACEOF
10541 #line 10541 "configure"
10542 #include "confdefs.h"
10543 #include <sys/types.h>
10544 int
10545 main (void)
10546 {
10547
10548 #ifndef _POSIX_C_SOURCE
10549 make an error
10550 #endif
10551   ;
10552   return 0;
10553 }
10554 _ACEOF
10555 rm -f "conftest.$ac_objext"
10556 if { (eval echo "$as_me:10556: \"$ac_compile\"") >&5
10557   (eval $ac_compile) 2>&5
10558   ac_status=$?
10559   echo "$as_me:10559: \$? = $ac_status" >&5
10560   (exit "$ac_status"); } &&
10561          { ac_try='test -s "conftest.$ac_objext"'
10562   { (eval echo "$as_me:10562: \"$ac_try\"") >&5
10563   (eval $ac_try) 2>&5
10564   ac_status=$?
10565   echo "$as_me:10565: \$? = $ac_status" >&5
10566   (exit "$ac_status"); }; }; then
10567   :
10568 else
10569   echo "$as_me: failed program was:" >&5
10570 cat "conftest.$ac_ext" >&5
10571 cf_cv_posix_c_source=no
10572 fi
10573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10574          CFLAGS="$cf_save_CFLAGS"
10575          CPPFLAGS="$cf_save_CPPFLAGS"
10576
10577 fi
10578 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10579
10580 fi
10581 echo "$as_me:10581: result: $cf_cv_posix_c_source" >&5
10582 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
10583
10584 if test "$cf_cv_posix_c_source" != no ; then
10585         CFLAGS="$cf_trim_CFLAGS"
10586         CPPFLAGS="$cf_trim_CPPFLAGS"
10587
10588 cf_fix_cppflags=no
10589 cf_new_cflags=
10590 cf_new_cppflags=
10591 cf_new_extra_cppflags=
10592
10593 for cf_add_cflags in $cf_cv_posix_c_source
10594 do
10595 case "$cf_fix_cppflags" in
10596 (no)
10597         case "$cf_add_cflags" in
10598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10599                 case "$cf_add_cflags" in
10600                 (-D*)
10601                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10602
10603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10604                                 && test -z "${cf_tst_cflags}" \
10605                                 && cf_fix_cppflags=yes
10606
10607                         if test "$cf_fix_cppflags" = yes ; then
10608
10609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10611
10612                                 continue
10613                         elif test "${cf_tst_cflags}" = "\"'" ; then
10614
10615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10617
10618                                 continue
10619                         fi
10620                         ;;
10621                 esac
10622                 case "$CPPFLAGS" in
10623                 (*$cf_add_cflags)
10624                         ;;
10625                 (*)
10626                         case "$cf_add_cflags" in
10627                         (-D*)
10628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10629
10630 CPPFLAGS=`echo "$CPPFLAGS" | \
10631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10633
10634                                 ;;
10635                         esac
10636
10637         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10638         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10639
10640                         ;;
10641                 esac
10642                 ;;
10643         (*)
10644
10645         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10646         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10647
10648                 ;;
10649         esac
10650         ;;
10651 (yes)
10652
10653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10655
10656         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10657
10658         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10659                 && test -z "${cf_tst_cflags}" \
10660                 && cf_fix_cppflags=no
10661         ;;
10662 esac
10663 done
10664
10665 if test -n "$cf_new_cflags" ; then
10666
10667         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10668         CFLAGS="${CFLAGS}$cf_new_cflags"
10669
10670 fi
10671
10672 if test -n "$cf_new_cppflags" ; then
10673
10674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10675         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10676
10677 fi
10678
10679 if test -n "$cf_new_extra_cppflags" ; then
10680
10681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10683
10684 fi
10685
10686 fi
10687
10688 fi # cf_cv_posix_visible
10689
10690         ;;
10691 (netbsd*)
10692         cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
10693         ;;
10694 (openbsd[6-9]*)
10695         # OpenBSD 6.x has broken locale support, both compile-time and runtime.
10696         # see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
10697         # Abusing the conformance level is a workaround.
10698         { echo "$as_me:10698: WARNING: this system does not provide usable locale support" >&5
10699 echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
10700         cf_xopen_source="-D_BSD_SOURCE"
10701         cf_XOPEN_SOURCE=700
10702         ;;
10703 (openbsd[4-5]*)
10704         # setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
10705         cf_xopen_source="-D_BSD_SOURCE"
10706         cf_XOPEN_SOURCE=600
10707         ;;
10708 (openbsd*)
10709         # setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
10710         ;;
10711 (osf[45]*)
10712         cf_xopen_source="-D_OSF_SOURCE"
10713         ;;
10714 (nto-qnx*)
10715         cf_xopen_source="-D_QNX_SOURCE"
10716         ;;
10717 (sco*)
10718         # setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
10719         ;;
10720 (solaris2.*)
10721         cf_xopen_source="-D__EXTENSIONS__"
10722         cf_cv_xopen_source=broken
10723         ;;
10724 (sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
10725         cf_XOPEN_SOURCE=
10726         cf_POSIX_C_SOURCE=
10727         ;;
10728 (*)
10729
10730 echo "$as_me:10730: checking if we should define _XOPEN_SOURCE" >&5
10731 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
10732 if test "${cf_cv_xopen_source+set}" = set; then
10733   echo $ECHO_N "(cached) $ECHO_C" >&6
10734 else
10735
10736         cat >"conftest.$ac_ext" <<_ACEOF
10737 #line 10737 "configure"
10738 #include "confdefs.h"
10739
10740 #include <stdlib.h>
10741 #include <string.h>
10742 #include <sys/types.h>
10743
10744 int
10745 main (void)
10746 {
10747
10748 #ifndef _XOPEN_SOURCE
10749 make an error
10750 #endif
10751   ;
10752   return 0;
10753 }
10754 _ACEOF
10755 rm -f "conftest.$ac_objext"
10756 if { (eval echo "$as_me:10756: \"$ac_compile\"") >&5
10757   (eval $ac_compile) 2>&5
10758   ac_status=$?
10759   echo "$as_me:10759: \$? = $ac_status" >&5
10760   (exit "$ac_status"); } &&
10761          { ac_try='test -s "conftest.$ac_objext"'
10762   { (eval echo "$as_me:10762: \"$ac_try\"") >&5
10763   (eval $ac_try) 2>&5
10764   ac_status=$?
10765   echo "$as_me:10765: \$? = $ac_status" >&5
10766   (exit "$ac_status"); }; }; then
10767   cf_cv_xopen_source=no
10768 else
10769   echo "$as_me: failed program was:" >&5
10770 cat "conftest.$ac_ext" >&5
10771 cf_save="$CPPFLAGS"
10772
10773         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10774         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
10775
10776          cat >"conftest.$ac_ext" <<_ACEOF
10777 #line 10777 "configure"
10778 #include "confdefs.h"
10779
10780 #include <stdlib.h>
10781 #include <string.h>
10782 #include <sys/types.h>
10783
10784 int
10785 main (void)
10786 {
10787
10788 #ifdef _XOPEN_SOURCE
10789 make an error
10790 #endif
10791   ;
10792   return 0;
10793 }
10794 _ACEOF
10795 rm -f "conftest.$ac_objext"
10796 if { (eval echo "$as_me:10796: \"$ac_compile\"") >&5
10797   (eval $ac_compile) 2>&5
10798   ac_status=$?
10799   echo "$as_me:10799: \$? = $ac_status" >&5
10800   (exit "$ac_status"); } &&
10801          { ac_try='test -s "conftest.$ac_objext"'
10802   { (eval echo "$as_me:10802: \"$ac_try\"") >&5
10803   (eval $ac_try) 2>&5
10804   ac_status=$?
10805   echo "$as_me:10805: \$? = $ac_status" >&5
10806   (exit "$ac_status"); }; }; then
10807   cf_cv_xopen_source=no
10808 else
10809   echo "$as_me: failed program was:" >&5
10810 cat "conftest.$ac_ext" >&5
10811 cf_cv_xopen_source=$cf_XOPEN_SOURCE
10812 fi
10813 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10814         CPPFLAGS="$cf_save"
10815
10816 fi
10817 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10818
10819 fi
10820 echo "$as_me:10820: result: $cf_cv_xopen_source" >&5
10821 echo "${ECHO_T}$cf_cv_xopen_source" >&6
10822
10823 if test "$cf_cv_xopen_source" != no ; then
10824
10825 CFLAGS=`echo "$CFLAGS" | \
10826         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10827                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10828
10829 CPPFLAGS=`echo "$CPPFLAGS" | \
10830         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
10831                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
10832
10833         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
10834
10835 for cf_add_cflags in $cf_temp_xopen_source
10836 do
10837         case "x$cf_add_cflags" in
10838         (x-[DU]*)
10839
10840 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10841 while true
10842 do
10843         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'`
10844         test "$CFLAGS" != "$cf_old_cflag" || break
10845
10846         CFLAGS="$cf_old_cflag"
10847 done
10848
10849 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
10850 while true
10851 do
10852         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'`
10853         test "$CPPFLAGS" != "$cf_old_cflag" || break
10854
10855         CPPFLAGS="$cf_old_cflag"
10856 done
10857
10858                 ;;
10859         esac
10860
10861 cf_fix_cppflags=no
10862 cf_new_cflags=
10863 cf_new_cppflags=
10864 cf_new_extra_cppflags=
10865
10866 for cf_add_cflags in $cf_add_cflags
10867 do
10868 case "$cf_fix_cppflags" in
10869 (no)
10870         case "$cf_add_cflags" in
10871         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10872                 case "$cf_add_cflags" in
10873                 (-D*)
10874                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10875
10876                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10877                                 && test -z "${cf_tst_cflags}" \
10878                                 && cf_fix_cppflags=yes
10879
10880                         if test "$cf_fix_cppflags" = yes ; then
10881
10882         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10883         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10884
10885                                 continue
10886                         elif test "${cf_tst_cflags}" = "\"'" ; then
10887
10888         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10889         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10890
10891                                 continue
10892                         fi
10893                         ;;
10894                 esac
10895                 case "$CPPFLAGS" in
10896                 (*$cf_add_cflags)
10897                         ;;
10898                 (*)
10899                         case "$cf_add_cflags" in
10900                         (-D*)
10901                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10902
10903 CPPFLAGS=`echo "$CPPFLAGS" | \
10904         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
10905                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
10906
10907                                 ;;
10908                         esac
10909
10910         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10911         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10912
10913                         ;;
10914                 esac
10915                 ;;
10916         (*)
10917
10918         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10919         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10920
10921                 ;;
10922         esac
10923         ;;
10924 (yes)
10925
10926         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10927         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10928
10929         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10930
10931         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10932                 && test -z "${cf_tst_cflags}" \
10933                 && cf_fix_cppflags=no
10934         ;;
10935 esac
10936 done
10937
10938 if test -n "$cf_new_cflags" ; then
10939
10940         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10941         CFLAGS="${CFLAGS}$cf_new_cflags"
10942
10943 fi
10944
10945 if test -n "$cf_new_cppflags" ; then
10946
10947         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10948         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10949
10950 fi
10951
10952 if test -n "$cf_new_extra_cppflags" ; then
10953
10954         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10955         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10956
10957 fi
10958
10959 done
10960
10961 fi
10962
10963 if test "$cf_cv_posix_visible" = no; then
10964
10965 cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
10966
10967 cf_save_CFLAGS="$CFLAGS"
10968 cf_save_CPPFLAGS="$CPPFLAGS"
10969
10970 cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
10971         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10972                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10973
10974 cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
10975         sed     -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?[         ]/ /g' \
10976                 -e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^     ]*\)\?$//g'`
10977
10978 echo "$as_me:10978: checking if we should define _POSIX_C_SOURCE" >&5
10979 echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
10980 if test "${cf_cv_posix_c_source+set}" = set; then
10981   echo $ECHO_N "(cached) $ECHO_C" >&6
10982 else
10983
10984 echo "${as_me:-configure}:10984: testing if the symbol is already defined go no further ..." 1>&5
10985
10986         cat >"conftest.$ac_ext" <<_ACEOF
10987 #line 10987 "configure"
10988 #include "confdefs.h"
10989 #include <sys/types.h>
10990 int
10991 main (void)
10992 {
10993
10994 #ifndef _POSIX_C_SOURCE
10995 make an error
10996 #endif
10997   ;
10998   return 0;
10999 }
11000 _ACEOF
11001 rm -f "conftest.$ac_objext"
11002 if { (eval echo "$as_me:11002: \"$ac_compile\"") >&5
11003   (eval $ac_compile) 2>&5
11004   ac_status=$?
11005   echo "$as_me:11005: \$? = $ac_status" >&5
11006   (exit "$ac_status"); } &&
11007          { ac_try='test -s "conftest.$ac_objext"'
11008   { (eval echo "$as_me:11008: \"$ac_try\"") >&5
11009   (eval $ac_try) 2>&5
11010   ac_status=$?
11011   echo "$as_me:11011: \$? = $ac_status" >&5
11012   (exit "$ac_status"); }; }; then
11013   cf_cv_posix_c_source=no
11014 else
11015   echo "$as_me: failed program was:" >&5
11016 cat "conftest.$ac_ext" >&5
11017 cf_want_posix_source=no
11018          case .$cf_POSIX_C_SOURCE in
11019          (.[12]??*)
11020                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11021                 ;;
11022          (.2)
11023                 cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11024                 cf_want_posix_source=yes
11025                 ;;
11026          (.*)
11027                 cf_want_posix_source=yes
11028                 ;;
11029          esac
11030          if test "$cf_want_posix_source" = yes ; then
11031                 cat >"conftest.$ac_ext" <<_ACEOF
11032 #line 11032 "configure"
11033 #include "confdefs.h"
11034 #include <sys/types.h>
11035 int
11036 main (void)
11037 {
11038
11039 #ifdef _POSIX_SOURCE
11040 make an error
11041 #endif
11042   ;
11043   return 0;
11044 }
11045 _ACEOF
11046 rm -f "conftest.$ac_objext"
11047 if { (eval echo "$as_me:11047: \"$ac_compile\"") >&5
11048   (eval $ac_compile) 2>&5
11049   ac_status=$?
11050   echo "$as_me:11050: \$? = $ac_status" >&5
11051   (exit "$ac_status"); } &&
11052          { ac_try='test -s "conftest.$ac_objext"'
11053   { (eval echo "$as_me:11053: \"$ac_try\"") >&5
11054   (eval $ac_try) 2>&5
11055   ac_status=$?
11056   echo "$as_me:11056: \$? = $ac_status" >&5
11057   (exit "$ac_status"); }; }; then
11058   :
11059 else
11060   echo "$as_me: failed program was:" >&5
11061 cat "conftest.$ac_ext" >&5
11062 cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
11063 fi
11064 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11065          fi
11066
11067 echo "${as_me:-configure}:11067: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
11068
11069          CFLAGS="$cf_trim_CFLAGS"
11070          CPPFLAGS="$cf_trim_CPPFLAGS"
11071
11072         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11073         CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
11074
11075 echo "${as_me:-configure}:11075: testing if the second compile does not leave our definition intact error ..." 1>&5
11076
11077          cat >"conftest.$ac_ext" <<_ACEOF
11078 #line 11078 "configure"
11079 #include "confdefs.h"
11080 #include <sys/types.h>
11081 int
11082 main (void)
11083 {
11084
11085 #ifndef _POSIX_C_SOURCE
11086 make an error
11087 #endif
11088   ;
11089   return 0;
11090 }
11091 _ACEOF
11092 rm -f "conftest.$ac_objext"
11093 if { (eval echo "$as_me:11093: \"$ac_compile\"") >&5
11094   (eval $ac_compile) 2>&5
11095   ac_status=$?
11096   echo "$as_me:11096: \$? = $ac_status" >&5
11097   (exit "$ac_status"); } &&
11098          { ac_try='test -s "conftest.$ac_objext"'
11099   { (eval echo "$as_me:11099: \"$ac_try\"") >&5
11100   (eval $ac_try) 2>&5
11101   ac_status=$?
11102   echo "$as_me:11102: \$? = $ac_status" >&5
11103   (exit "$ac_status"); }; }; then
11104   :
11105 else
11106   echo "$as_me: failed program was:" >&5
11107 cat "conftest.$ac_ext" >&5
11108 cf_cv_posix_c_source=no
11109 fi
11110 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11111          CFLAGS="$cf_save_CFLAGS"
11112          CPPFLAGS="$cf_save_CPPFLAGS"
11113
11114 fi
11115 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11116
11117 fi
11118 echo "$as_me:11118: result: $cf_cv_posix_c_source" >&5
11119 echo "${ECHO_T}$cf_cv_posix_c_source" >&6
11120
11121 if test "$cf_cv_posix_c_source" != no ; then
11122         CFLAGS="$cf_trim_CFLAGS"
11123         CPPFLAGS="$cf_trim_CPPFLAGS"
11124
11125 cf_fix_cppflags=no
11126 cf_new_cflags=
11127 cf_new_cppflags=
11128 cf_new_extra_cppflags=
11129
11130 for cf_add_cflags in $cf_cv_posix_c_source
11131 do
11132 case "$cf_fix_cppflags" in
11133 (no)
11134         case "$cf_add_cflags" in
11135         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11136                 case "$cf_add_cflags" in
11137                 (-D*)
11138                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11139
11140                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11141                                 && test -z "${cf_tst_cflags}" \
11142                                 && cf_fix_cppflags=yes
11143
11144                         if test "$cf_fix_cppflags" = yes ; then
11145
11146         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11147         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11148
11149                                 continue
11150                         elif test "${cf_tst_cflags}" = "\"'" ; then
11151
11152         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11153         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11154
11155                                 continue
11156                         fi
11157                         ;;
11158                 esac
11159                 case "$CPPFLAGS" in
11160                 (*$cf_add_cflags)
11161                         ;;
11162                 (*)
11163                         case "$cf_add_cflags" in
11164                         (-D*)
11165                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11166
11167 CPPFLAGS=`echo "$CPPFLAGS" | \
11168         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11169                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11170
11171                                 ;;
11172                         esac
11173
11174         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11175         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11176
11177                         ;;
11178                 esac
11179                 ;;
11180         (*)
11181
11182         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11183         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11184
11185                 ;;
11186         esac
11187         ;;
11188 (yes)
11189
11190         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11191         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11192
11193         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11194
11195         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11196                 && test -z "${cf_tst_cflags}" \
11197                 && cf_fix_cppflags=no
11198         ;;
11199 esac
11200 done
11201
11202 if test -n "$cf_new_cflags" ; then
11203
11204         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11205         CFLAGS="${CFLAGS}$cf_new_cflags"
11206
11207 fi
11208
11209 if test -n "$cf_new_cppflags" ; then
11210
11211         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11212         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11213
11214 fi
11215
11216 if test -n "$cf_new_extra_cppflags" ; then
11217
11218         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11219         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11220
11221 fi
11222
11223 fi
11224
11225 fi # cf_cv_posix_visible
11226
11227         ;;
11228 esac
11229
11230 if test -n "$cf_xopen_source" ; then
11231
11232 for cf_add_cflags in $cf_xopen_source
11233 do
11234         case "x$cf_add_cflags" in
11235         (x-[DU]*)
11236
11237 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11238 while true
11239 do
11240         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'`
11241         test "$CFLAGS" != "$cf_old_cflag" || break
11242         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CFLAGS" 1>&6
11243
11244 echo "${as_me:-configure}:11244: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
11245
11246         CFLAGS="$cf_old_cflag"
11247 done
11248
11249 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11250 while true
11251 do
11252         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'`
11253         test "$CPPFLAGS" != "$cf_old_cflag" || break
11254         test -n "$verbose" && echo "    removing old option $cf_add_cflags from CPPFLAGS" 1>&6
11255
11256 echo "${as_me:-configure}:11256: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
11257
11258         CPPFLAGS="$cf_old_cflag"
11259 done
11260
11261                 ;;
11262         esac
11263
11264 cf_fix_cppflags=no
11265 cf_new_cflags=
11266 cf_new_cppflags=
11267 cf_new_extra_cppflags=
11268
11269 for cf_add_cflags in $cf_add_cflags
11270 do
11271 case "$cf_fix_cppflags" in
11272 (no)
11273         case "$cf_add_cflags" in
11274         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11275                 case "$cf_add_cflags" in
11276                 (-D*)
11277                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11278
11279                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11280                                 && test -z "${cf_tst_cflags}" \
11281                                 && cf_fix_cppflags=yes
11282
11283                         if test "$cf_fix_cppflags" = yes ; then
11284
11285         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11286         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11287
11288                                 continue
11289                         elif test "${cf_tst_cflags}" = "\"'" ; then
11290
11291         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11292         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11293
11294                                 continue
11295                         fi
11296                         ;;
11297                 esac
11298                 case "$CPPFLAGS" in
11299                 (*$cf_add_cflags)
11300                         ;;
11301                 (*)
11302                         case "$cf_add_cflags" in
11303                         (-D*)
11304                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11305
11306 CPPFLAGS=`echo "$CPPFLAGS" | \
11307         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11308                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11309
11310                                 ;;
11311                         esac
11312
11313         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11314         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11315
11316                         ;;
11317                 esac
11318                 ;;
11319         (*)
11320
11321         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11322         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11323
11324                 ;;
11325         esac
11326         ;;
11327 (yes)
11328
11329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11331
11332         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11333
11334         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11335                 && test -z "${cf_tst_cflags}" \
11336                 && cf_fix_cppflags=no
11337         ;;
11338 esac
11339 done
11340
11341 if test -n "$cf_new_cflags" ; then
11342         test -n "$verbose" && echo "    add to \$CFLAGS $cf_new_cflags" 1>&6
11343
11344 echo "${as_me:-configure}:11344: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11345
11346         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11347         CFLAGS="${CFLAGS}$cf_new_cflags"
11348
11349 fi
11350
11351 if test -n "$cf_new_cppflags" ; then
11352         test -n "$verbose" && echo "    add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11353
11354 echo "${as_me:-configure}:11354: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11355
11356         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11357         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11358
11359 fi
11360
11361 if test -n "$cf_new_extra_cppflags" ; then
11362         test -n "$verbose" && echo "    add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11363
11364 echo "${as_me:-configure}:11364: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11365
11366         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11367         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11368
11369 fi
11370
11371 done
11372
11373 fi
11374
11375 if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
11376         echo "$as_me:11376: checking if _XOPEN_SOURCE really is set" >&5
11377 echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
11378         cat >"conftest.$ac_ext" <<_ACEOF
11379 #line 11379 "configure"
11380 #include "confdefs.h"
11381 #include <stdlib.h>
11382 int
11383 main (void)
11384 {
11385
11386 #ifndef _XOPEN_SOURCE
11387 make an error
11388 #endif
11389   ;
11390   return 0;
11391 }
11392 _ACEOF
11393 rm -f "conftest.$ac_objext"
11394 if { (eval echo "$as_me:11394: \"$ac_compile\"") >&5
11395   (eval $ac_compile) 2>&5
11396   ac_status=$?
11397   echo "$as_me:11397: \$? = $ac_status" >&5
11398   (exit "$ac_status"); } &&
11399          { ac_try='test -s "conftest.$ac_objext"'
11400   { (eval echo "$as_me:11400: \"$ac_try\"") >&5
11401   (eval $ac_try) 2>&5
11402   ac_status=$?
11403   echo "$as_me:11403: \$? = $ac_status" >&5
11404   (exit "$ac_status"); }; }; then
11405   cf_XOPEN_SOURCE_set=yes
11406 else
11407   echo "$as_me: failed program was:" >&5
11408 cat "conftest.$ac_ext" >&5
11409 cf_XOPEN_SOURCE_set=no
11410 fi
11411 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11412         echo "$as_me:11412: result: $cf_XOPEN_SOURCE_set" >&5
11413 echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
11414         if test "$cf_XOPEN_SOURCE_set" = yes
11415         then
11416                 cat >"conftest.$ac_ext" <<_ACEOF
11417 #line 11417 "configure"
11418 #include "confdefs.h"
11419 #include <stdlib.h>
11420 int
11421 main (void)
11422 {
11423
11424 #if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
11425 make an error
11426 #endif
11427   ;
11428   return 0;
11429 }
11430 _ACEOF
11431 rm -f "conftest.$ac_objext"
11432 if { (eval echo "$as_me:11432: \"$ac_compile\"") >&5
11433   (eval $ac_compile) 2>&5
11434   ac_status=$?
11435   echo "$as_me:11435: \$? = $ac_status" >&5
11436   (exit "$ac_status"); } &&
11437          { ac_try='test -s "conftest.$ac_objext"'
11438   { (eval echo "$as_me:11438: \"$ac_try\"") >&5
11439   (eval $ac_try) 2>&5
11440   ac_status=$?
11441   echo "$as_me:11441: \$? = $ac_status" >&5
11442   (exit "$ac_status"); }; }; then
11443   cf_XOPEN_SOURCE_set_ok=yes
11444 else
11445   echo "$as_me: failed program was:" >&5
11446 cat "conftest.$ac_ext" >&5
11447 cf_XOPEN_SOURCE_set_ok=no
11448 fi
11449 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11450                 if test "$cf_XOPEN_SOURCE_set_ok" = no
11451                 then
11452                         { echo "$as_me:11452: WARNING: _XOPEN_SOURCE is lower than requested" >&5
11453 echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
11454                 fi
11455         else
11456
11457 echo "$as_me:11457: checking if we should define _XOPEN_SOURCE" >&5
11458 echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
11459 if test "${cf_cv_xopen_source+set}" = set; then
11460   echo $ECHO_N "(cached) $ECHO_C" >&6
11461 else
11462
11463         cat >"conftest.$ac_ext" <<_ACEOF
11464 #line 11464 "configure"
11465 #include "confdefs.h"
11466
11467 #include <stdlib.h>
11468 #include <string.h>
11469 #include <sys/types.h>
11470
11471 int
11472 main (void)
11473 {
11474
11475 #ifndef _XOPEN_SOURCE
11476 make an error
11477 #endif
11478   ;
11479   return 0;
11480 }
11481 _ACEOF
11482 rm -f "conftest.$ac_objext"
11483 if { (eval echo "$as_me:11483: \"$ac_compile\"") >&5
11484   (eval $ac_compile) 2>&5
11485   ac_status=$?
11486   echo "$as_me:11486: \$? = $ac_status" >&5
11487   (exit "$ac_status"); } &&
11488          { ac_try='test -s "conftest.$ac_objext"'
11489   { (eval echo "$as_me:11489: \"$ac_try\"") >&5
11490   (eval $ac_try) 2>&5
11491   ac_status=$?
11492   echo "$as_me:11492: \$? = $ac_status" >&5
11493   (exit "$ac_status"); }; }; then
11494   cf_cv_xopen_source=no
11495 else
11496   echo "$as_me: failed program was:" >&5
11497 cat "conftest.$ac_ext" >&5
11498 cf_save="$CPPFLAGS"
11499
11500         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11501         CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11502
11503          cat >"conftest.$ac_ext" <<_ACEOF
11504 #line 11504 "configure"
11505 #include "confdefs.h"
11506
11507 #include <stdlib.h>
11508 #include <string.h>
11509 #include <sys/types.h>
11510
11511 int
11512 main (void)
11513 {
11514
11515 #ifdef _XOPEN_SOURCE
11516 make an error
11517 #endif
11518   ;
11519   return 0;
11520 }
11521 _ACEOF
11522 rm -f "conftest.$ac_objext"
11523 if { (eval echo "$as_me:11523: \"$ac_compile\"") >&5
11524   (eval $ac_compile) 2>&5
11525   ac_status=$?
11526   echo "$as_me:11526: \$? = $ac_status" >&5
11527   (exit "$ac_status"); } &&
11528          { ac_try='test -s "conftest.$ac_objext"'
11529   { (eval echo "$as_me:11529: \"$ac_try\"") >&5
11530   (eval $ac_try) 2>&5
11531   ac_status=$?
11532   echo "$as_me:11532: \$? = $ac_status" >&5
11533   (exit "$ac_status"); }; }; then
11534   cf_cv_xopen_source=no
11535 else
11536   echo "$as_me: failed program was:" >&5
11537 cat "conftest.$ac_ext" >&5
11538 cf_cv_xopen_source=$cf_XOPEN_SOURCE
11539 fi
11540 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11541         CPPFLAGS="$cf_save"
11542
11543 fi
11544 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11545
11546 fi
11547 echo "$as_me:11547: result: $cf_cv_xopen_source" >&5
11548 echo "${ECHO_T}$cf_cv_xopen_source" >&6
11549
11550 if test "$cf_cv_xopen_source" != no ; then
11551
11552 CFLAGS=`echo "$CFLAGS" | \
11553         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11554                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11555
11556 CPPFLAGS=`echo "$CPPFLAGS" | \
11557         sed     -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?[         ]/ /g' \
11558                 -e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^       ]*\)\?$//g'`
11559
11560         cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
11561
11562 for cf_add_cflags in $cf_temp_xopen_source
11563 do
11564         case "x$cf_add_cflags" in
11565         (x-[DU]*)
11566
11567 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11568 while true
11569 do
11570         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'`
11571         test "$CFLAGS" != "$cf_old_cflag" || break
11572
11573         CFLAGS="$cf_old_cflag"
11574 done
11575
11576 cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
11577 while true
11578 do
11579         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'`
11580         test "$CPPFLAGS" != "$cf_old_cflag" || break
11581
11582         CPPFLAGS="$cf_old_cflag"
11583 done
11584
11585                 ;;
11586         esac
11587
11588 cf_fix_cppflags=no
11589 cf_new_cflags=
11590 cf_new_cppflags=
11591 cf_new_extra_cppflags=
11592
11593 for cf_add_cflags in $cf_add_cflags
11594 do
11595 case "$cf_fix_cppflags" in
11596 (no)
11597         case "$cf_add_cflags" in
11598         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11599                 case "$cf_add_cflags" in
11600                 (-D*)
11601                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11602
11603                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11604                                 && test -z "${cf_tst_cflags}" \
11605                                 && cf_fix_cppflags=yes
11606
11607                         if test "$cf_fix_cppflags" = yes ; then
11608
11609         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11610         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11611
11612                                 continue
11613                         elif test "${cf_tst_cflags}" = "\"'" ; then
11614
11615         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11616         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11617
11618                                 continue
11619                         fi
11620                         ;;
11621                 esac
11622                 case "$CPPFLAGS" in
11623                 (*$cf_add_cflags)
11624                         ;;
11625                 (*)
11626                         case "$cf_add_cflags" in
11627                         (-D*)
11628                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11629
11630 CPPFLAGS=`echo "$CPPFLAGS" | \
11631         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
11632                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
11633
11634                                 ;;
11635                         esac
11636
11637         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11638         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11639
11640                         ;;
11641                 esac
11642                 ;;
11643         (*)
11644
11645         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11646         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11647
11648                 ;;
11649         esac
11650         ;;
11651 (yes)
11652
11653         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11654         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11655
11656         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11657
11658         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11659                 && test -z "${cf_tst_cflags}" \
11660                 && cf_fix_cppflags=no
11661         ;;
11662 esac
11663 done
11664
11665 if test -n "$cf_new_cflags" ; then
11666
11667         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11668         CFLAGS="${CFLAGS}$cf_new_cflags"
11669
11670 fi
11671
11672 if test -n "$cf_new_cppflags" ; then
11673
11674         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11675         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11676
11677 fi
11678
11679 if test -n "$cf_new_extra_cppflags" ; then
11680
11681         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11682         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11683
11684 fi
11685
11686 done
11687
11688 fi
11689
11690         fi
11691 fi
11692 fi # cf_cv_posix_visible
11693
11694 CPPFLAGS_after_XOPEN="$CPPFLAGS"
11695
11696 # Work around breakage on OS X
11697
11698 echo "$as_me:11698: checking if SIGWINCH is defined" >&5
11699 echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
11700 if test "${cf_cv_define_sigwinch+set}" = set; then
11701   echo $ECHO_N "(cached) $ECHO_C" >&6
11702 else
11703
11704         cat >"conftest.$ac_ext" <<_ACEOF
11705 #line 11705 "configure"
11706 #include "confdefs.h"
11707
11708 #include <sys/types.h>
11709 #include <sys/signal.h>
11710
11711 int
11712 main (void)
11713 {
11714 int x = SIGWINCH; (void)x
11715   ;
11716   return 0;
11717 }
11718 _ACEOF
11719 rm -f "conftest.$ac_objext"
11720 if { (eval echo "$as_me:11720: \"$ac_compile\"") >&5
11721   (eval $ac_compile) 2>&5
11722   ac_status=$?
11723   echo "$as_me:11723: \$? = $ac_status" >&5
11724   (exit "$ac_status"); } &&
11725          { ac_try='test -s "conftest.$ac_objext"'
11726   { (eval echo "$as_me:11726: \"$ac_try\"") >&5
11727   (eval $ac_try) 2>&5
11728   ac_status=$?
11729   echo "$as_me:11729: \$? = $ac_status" >&5
11730   (exit "$ac_status"); }; }; then
11731   cf_cv_define_sigwinch=yes
11732 else
11733   echo "$as_me: failed program was:" >&5
11734 cat "conftest.$ac_ext" >&5
11735 cat >"conftest.$ac_ext" <<_ACEOF
11736 #line 11736 "configure"
11737 #include "confdefs.h"
11738
11739 #undef _XOPEN_SOURCE
11740 #undef _POSIX_SOURCE
11741 #undef _POSIX_C_SOURCE
11742 #include <sys/types.h>
11743 #include <sys/signal.h>
11744
11745 int
11746 main (void)
11747 {
11748 int x = SIGWINCH; (void)x
11749   ;
11750   return 0;
11751 }
11752 _ACEOF
11753 rm -f "conftest.$ac_objext"
11754 if { (eval echo "$as_me:11754: \"$ac_compile\"") >&5
11755   (eval $ac_compile) 2>&5
11756   ac_status=$?
11757   echo "$as_me:11757: \$? = $ac_status" >&5
11758   (exit "$ac_status"); } &&
11759          { ac_try='test -s "conftest.$ac_objext"'
11760   { (eval echo "$as_me:11760: \"$ac_try\"") >&5
11761   (eval $ac_try) 2>&5
11762   ac_status=$?
11763   echo "$as_me:11763: \$? = $ac_status" >&5
11764   (exit "$ac_status"); }; }; then
11765   cf_cv_define_sigwinch=maybe
11766 else
11767   echo "$as_me: failed program was:" >&5
11768 cat "conftest.$ac_ext" >&5
11769 cf_cv_define_sigwinch=no
11770 fi
11771 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11772
11773 fi
11774 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11775
11776 fi
11777 echo "$as_me:11777: result: $cf_cv_define_sigwinch" >&5
11778 echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
11779
11780 if test "$cf_cv_define_sigwinch" = maybe ; then
11781 echo "$as_me:11781: checking for actual SIGWINCH definition" >&5
11782 echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
11783 if test "${cf_cv_fixup_sigwinch+set}" = set; then
11784   echo $ECHO_N "(cached) $ECHO_C" >&6
11785 else
11786
11787 cf_cv_fixup_sigwinch=unknown
11788 cf_sigwinch=32
11789 while test "$cf_sigwinch" != 1
11790 do
11791         cat >"conftest.$ac_ext" <<_ACEOF
11792 #line 11792 "configure"
11793 #include "confdefs.h"
11794
11795 #undef _XOPEN_SOURCE
11796 #undef _POSIX_SOURCE
11797 #undef _POSIX_C_SOURCE
11798 #include <sys/types.h>
11799 #include <sys/signal.h>
11800
11801 int
11802 main (void)
11803 {
11804
11805 #if SIGWINCH != $cf_sigwinch
11806 make an error
11807 #endif
11808 int x = SIGWINCH; (void)x
11809   ;
11810   return 0;
11811 }
11812 _ACEOF
11813 rm -f "conftest.$ac_objext"
11814 if { (eval echo "$as_me:11814: \"$ac_compile\"") >&5
11815   (eval $ac_compile) 2>&5
11816   ac_status=$?
11817   echo "$as_me:11817: \$? = $ac_status" >&5
11818   (exit "$ac_status"); } &&
11819          { ac_try='test -s "conftest.$ac_objext"'
11820   { (eval echo "$as_me:11820: \"$ac_try\"") >&5
11821   (eval $ac_try) 2>&5
11822   ac_status=$?
11823   echo "$as_me:11823: \$? = $ac_status" >&5
11824   (exit "$ac_status"); }; }; then
11825   cf_cv_fixup_sigwinch=$cf_sigwinch
11826          break
11827 else
11828   echo "$as_me: failed program was:" >&5
11829 cat "conftest.$ac_ext" >&5
11830 fi
11831 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11832
11833 cf_sigwinch="`expr "$cf_sigwinch" - 1`"
11834 done
11835
11836 fi
11837 echo "$as_me:11837: result: $cf_cv_fixup_sigwinch" >&5
11838 echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
11839
11840         if test "$cf_cv_fixup_sigwinch" != unknown ; then
11841                 CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
11842         fi
11843 fi
11844
11845 # Checks for CODESET support.
11846
11847 echo "$as_me:11847: checking for nl_langinfo and CODESET" >&5
11848 echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
11849 if test "${am_cv_langinfo_codeset+set}" = set; then
11850   echo $ECHO_N "(cached) $ECHO_C" >&6
11851 else
11852   cat >"conftest.$ac_ext" <<_ACEOF
11853 #line 11853 "configure"
11854 #include "confdefs.h"
11855 #include <langinfo.h>
11856 int
11857 main (void)
11858 {
11859 char* cs = nl_langinfo(CODESET); (void)cs
11860   ;
11861   return 0;
11862 }
11863 _ACEOF
11864 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11865 if { (eval echo "$as_me:11865: \"$ac_link\"") >&5
11866   (eval $ac_link) 2>&5
11867   ac_status=$?
11868   echo "$as_me:11868: \$? = $ac_status" >&5
11869   (exit "$ac_status"); } &&
11870          { ac_try='test -s "conftest$ac_exeext"'
11871   { (eval echo "$as_me:11871: \"$ac_try\"") >&5
11872   (eval $ac_try) 2>&5
11873   ac_status=$?
11874   echo "$as_me:11874: \$? = $ac_status" >&5
11875   (exit "$ac_status"); }; }; then
11876   am_cv_langinfo_codeset=yes
11877 else
11878   echo "$as_me: failed program was:" >&5
11879 cat "conftest.$ac_ext" >&5
11880 am_cv_langinfo_codeset=no
11881 fi
11882 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11883
11884 fi
11885 echo "$as_me:11885: result: $am_cv_langinfo_codeset" >&5
11886 echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
11887         if test "$am_cv_langinfo_codeset" = yes; then
11888
11889 cat >>confdefs.h <<\EOF
11890 #define HAVE_LANGINFO_CODESET 1
11891 EOF
11892
11893         fi
11894
11895 # use these variables to work around a defect in gcc's fixincludes.
11896 NCURSES_OK_WCHAR_T=
11897 NCURSES_OK_WINT_T=
11898
11899 echo "$as_me:11899: checking if you want wide-character code" >&5
11900 echo $ECHO_N "checking if you want wide-character code... $ECHO_C" >&6
11901
11902 # Check whether --enable-widec or --disable-widec was given.
11903 if test "${enable_widec+set}" = set; then
11904   enableval="$enable_widec"
11905   with_widec=$enableval
11906 else
11907   with_widec=no
11908 fi;
11909 echo "$as_me:11909: result: $with_widec" >&5
11910 echo "${ECHO_T}$with_widec" >&6
11911
11912 NCURSES_WCWIDTH_GRAPHICS=1
11913
11914 if test "x$with_widec" = xyes ; then
11915         if test "x$disable_lib_suffixes" = xno ; then
11916                 LIB_SUFFIX="w${LIB_SUFFIX}"
11917         fi
11918
11919 cat >>confdefs.h <<\EOF
11920 #define USE_WIDEC_SUPPORT 1
11921 EOF
11922
11923 cat >>confdefs.h <<\EOF
11924 #define NCURSES_WIDECHAR 1
11925 EOF
11926
11927 for ac_header in \
11928 wchar.h \
11929 wctype.h \
11930
11931 do
11932 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11933 echo "$as_me:11933: checking for $ac_header" >&5
11934 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11935 if eval "test \"\${$as_ac_Header+set}\" = set"; then
11936   echo $ECHO_N "(cached) $ECHO_C" >&6
11937 else
11938   cat >"conftest.$ac_ext" <<_ACEOF
11939 #line 11939 "configure"
11940 #include "confdefs.h"
11941 #include <$ac_header>
11942 _ACEOF
11943 if { (eval echo "$as_me:11943: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11944   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11945   ac_status=$?
11946   $EGREP -v '^ *\+' conftest.er1 >conftest.err
11947   rm -f conftest.er1
11948   cat conftest.err >&5
11949   echo "$as_me:11949: \$? = $ac_status" >&5
11950   (exit "$ac_status"); } >/dev/null; then
11951   if test -s conftest.err; then
11952     ac_cpp_err=$ac_c_preproc_warn_flag
11953   else
11954     ac_cpp_err=
11955   fi
11956 else
11957   ac_cpp_err=yes
11958 fi
11959 if test -z "$ac_cpp_err"; then
11960   eval "$as_ac_Header=yes"
11961 else
11962   echo "$as_me: failed program was:" >&5
11963   cat "conftest.$ac_ext" >&5
11964   eval "$as_ac_Header=no"
11965 fi
11966 rm -f conftest.err "conftest.$ac_ext"
11967 fi
11968 echo "$as_me:11968: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11969 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11970 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11971   cat >>confdefs.h <<EOF
11972 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11973 EOF
11974
11975 fi
11976 done
11977
11978 echo "$as_me:11978: checking if wchar.h can be used as is" >&5
11979 echo $ECHO_N "checking if wchar.h can be used as is... $ECHO_C" >&6
11980 if test "${cf_cv_wchar_h_okay+set}" = set; then
11981   echo $ECHO_N "(cached) $ECHO_C" >&6
11982 else
11983
11984 cat >"conftest.$ac_ext" <<_ACEOF
11985 #line 11985 "configure"
11986 #include "confdefs.h"
11987
11988 #include <stdlib.h>
11989 #ifdef HAVE_WCHAR_H
11990 #include <wchar.h>
11991 #endif
11992 #ifdef HAVE_WCTYPE_H
11993 #include <wctype.h>
11994 #endif
11995
11996 int
11997 main (void)
11998 {
11999
12000         wint_t foo = 0;
12001         int bar = iswpunct(foo)
12002   ;
12003   return 0;
12004 }
12005 _ACEOF
12006 rm -f "conftest.$ac_objext"
12007 if { (eval echo "$as_me:12007: \"$ac_compile\"") >&5
12008   (eval $ac_compile) 2>&5
12009   ac_status=$?
12010   echo "$as_me:12010: \$? = $ac_status" >&5
12011   (exit "$ac_status"); } &&
12012          { ac_try='test -s "conftest.$ac_objext"'
12013   { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014   (eval $ac_try) 2>&5
12015   ac_status=$?
12016   echo "$as_me:12016: \$? = $ac_status" >&5
12017   (exit "$ac_status"); }; }; then
12018   cf_cv_wchar_h_okay=yes
12019 else
12020   echo "$as_me: failed program was:" >&5
12021 cat "conftest.$ac_ext" >&5
12022 cf_cv_wchar_h_okay=no
12023 fi
12024 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12025 fi
12026 echo "$as_me:12026: result: $cf_cv_wchar_h_okay" >&5
12027 echo "${ECHO_T}$cf_cv_wchar_h_okay" >&6
12028
12029 if test "$cf_cv_wchar_h_okay" = no
12030 then
12031
12032 echo "$as_me:12032: checking if we must define _XOPEN_SOURCE_EXTENDED" >&5
12033 echo $ECHO_N "checking if we must define _XOPEN_SOURCE_EXTENDED... $ECHO_C" >&6
12034 cat >"conftest.$ac_ext" <<_ACEOF
12035 #line 12035 "configure"
12036 #include "confdefs.h"
12037 #include <sys/types.h>
12038
12039 int
12040 main (void)
12041 {
12042
12043 #ifndef _XOPEN_SOURCE_EXTENDED
12044 make an error
12045 #endif
12046   ;
12047   return 0;
12048 }
12049 _ACEOF
12050 rm -f "conftest.$ac_objext"
12051 if { (eval echo "$as_me:12051: \"$ac_compile\"") >&5
12052   (eval $ac_compile) 2>&5
12053   ac_status=$?
12054   echo "$as_me:12054: \$? = $ac_status" >&5
12055   (exit "$ac_status"); } &&
12056          { ac_try='test -s "conftest.$ac_objext"'
12057   { (eval echo "$as_me:12057: \"$ac_try\"") >&5
12058   (eval $ac_try) 2>&5
12059   ac_status=$?
12060   echo "$as_me:12060: \$? = $ac_status" >&5
12061   (exit "$ac_status"); }; }; then
12062   cf_result=no
12063 else
12064   echo "$as_me: failed program was:" >&5
12065 cat "conftest.$ac_ext" >&5
12066 cf_result=yes
12067 fi
12068 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12069 echo "$as_me:12069: result: $cf_result" >&5
12070 echo "${ECHO_T}$cf_result" >&6
12071
12072 if test "$cf_result" = yes ; then
12073         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED"
12074 elif test "x" != "x" ; then
12075         echo "$as_me:12075: checking checking for compatible value versus " >&5
12076 echo $ECHO_N "checking checking for compatible value versus ... $ECHO_C" >&6
12077         cat >"conftest.$ac_ext" <<_ACEOF
12078 #line 12078 "configure"
12079 #include "confdefs.h"
12080 #include <sys/types.h>
12081
12082 int
12083 main (void)
12084 {
12085
12086 #if _XOPEN_SOURCE_EXTENDED- < 0
12087 make an error
12088 #endif
12089   ;
12090   return 0;
12091 }
12092 _ACEOF
12093 rm -f "conftest.$ac_objext"
12094 if { (eval echo "$as_me:12094: \"$ac_compile\"") >&5
12095   (eval $ac_compile) 2>&5
12096   ac_status=$?
12097   echo "$as_me:12097: \$? = $ac_status" >&5
12098   (exit "$ac_status"); } &&
12099          { ac_try='test -s "conftest.$ac_objext"'
12100   { (eval echo "$as_me:12100: \"$ac_try\"") >&5
12101   (eval $ac_try) 2>&5
12102   ac_status=$?
12103   echo "$as_me:12103: \$? = $ac_status" >&5
12104   (exit "$ac_status"); }; }; then
12105   cf_result=yes
12106 else
12107   echo "$as_me: failed program was:" >&5
12108 cat "conftest.$ac_ext" >&5
12109 cf_result=no
12110 fi
12111 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12112         echo "$as_me:12112: result: $cf_result" >&5
12113 echo "${ECHO_T}$cf_result" >&6
12114         if test "$cf_result" = no ; then
12115                 # perhaps we can override it - try...
12116                 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE_EXTENDED="
12117         fi
12118 fi
12119
12120 fi
12121
12122 echo "$as_me:12122: checking if wcwidth agrees graphics are single-width" >&5
12123 echo $ECHO_N "checking if wcwidth agrees graphics are single-width... $ECHO_C" >&6
12124 if test "${cf_cv_wcwidth_graphics+set}" = set; then
12125   echo $ECHO_N "(cached) $ECHO_C" >&6
12126 else
12127
12128 cat >conftest.in <<CF_EOF
12129 -       VT100 symbols
12130 0x250c  upper left corner
12131 0x2514  lower left corner
12132 0x2510  upper right corner
12133 0x2518  lower right corner
12134 0x251c  tee pointing left
12135 0x2524  tee pointing right
12136 0x2534  tee pointing up
12137 0x252c  tee pointing down
12138 0x2500  horizontal line
12139 0x2502  vertical line
12140 0x253c  large plus or crossover
12141 0x23ba  scan line 1
12142 0x23bd  scan line 9
12143 0x25c6  diamond
12144 0x2592  checker board (stipple)
12145 0x00b0  degree symbol
12146 0x00b1  plus/minus
12147 0x00b7  bullet
12148 -       Teletype 5410v1 symbols
12149 0x2190  arrow pointing left
12150 0x2192  arrow pointing right
12151 0x2193  arrow pointing down
12152 0x2191  arrow pointing up
12153 0x2592  board of squares
12154 0x2603  lantern symbol
12155 0x25ae  solid square block
12156 -       these defaults were invented for ncurses
12157 0x23bb  scan line 3
12158 0x23bc  scan line 7
12159 0x2264  less-than-or-equal-to
12160 0x2265  greater-than-or-equal-to
12161 0x03c0  greek pi
12162 0x2260  not-equal
12163 0x00a3  pound-sterling symbol
12164 -       thick-line-drawing
12165 0x250f  upper left corner
12166 0x2517  lower left corner
12167 0x2513  upper right corner
12168 0x251b  lower right corner
12169 0x2523  tee pointing left
12170 0x252b  tee pointing right
12171 0x253b  tee pointing up
12172 0x2533  tee pointing down
12173 0x2501  horizontal line
12174 0x2503  vertical line
12175 0x254b  large plus or crossover
12176 -       double-line-drawing
12177 0x2554  upper left corner
12178 0x255a  lower left corner
12179 0x2557  upper right corner
12180 0x255d  lower right corner
12181 0x2563  tee pointing left
12182 0x2560  tee pointing right
12183 0x2569  tee pointing up
12184 0x2566  tee pointing down
12185 0x2550  horizontal line
12186 0x2551  vertical line
12187 0x256c  large plus or crossover
12188 CF_EOF
12189 if test "$cross_compiling" = yes; then
12190   cf_cv_wcwidth_graphics=unknown
12191 else
12192   cat >"conftest.$ac_ext" <<_ACEOF
12193 #line 12193 "configure"
12194 #include "confdefs.h"
12195
12196 #include <locale.h>
12197 #include <stdio.h>
12198 #include <wchar.h>
12199
12200 #define MY_LEN 80
12201
12202 int
12203 main(void)
12204 {
12205         FILE *fp;
12206         int value;
12207         char buffer[MY_LEN + 1];
12208         char notes[MY_LEN + 1];
12209         int totals = 0;
12210         int passed = 0;
12211
12212         if (setlocale(LC_ALL, "en_US.UTF8") ||
12213                 setlocale(LC_ALL, "en_US.UTF-8") ||
12214                 setlocale(LC_ALL, "en_US.utf8") ||
12215                 setlocale(LC_ALL, "en_US.utf-8")) {
12216                 if ((fp = fopen("conftest.in", "r")) != 0) {
12217                         while (fgets(buffer, MY_LEN, fp) != 0) {
12218                                 if (*buffer == '-') {
12219                                         fprintf(stderr, "\\t%s", buffer);
12220                                 } else if (sscanf(buffer, "%x %s", &value, notes) == 2) {
12221                                         ++totals;
12222                                         if (wcwidth(value) == 1)
12223                                                 ++passed;
12224                                         fprintf(stderr, "%d\\t%s", wcwidth(value), buffer);
12225                                 } else {
12226                                         fprintf(stderr, "?\\t%s", buffer);
12227                                 }
12228                         }
12229                 }
12230         }
12231         fprintf(stderr, "%d/%d passed wcwidth/graphics check\\n", passed, totals);
12232         return (totals == passed) ? 0 : 1;
12233 }
12234
12235 _ACEOF
12236 rm -f "conftest$ac_exeext"
12237 if { (eval echo "$as_me:12237: \"$ac_link\"") >&5
12238   (eval $ac_link) 2>&5
12239   ac_status=$?
12240   echo "$as_me:12240: \$? = $ac_status" >&5
12241   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
12242   { (eval echo "$as_me:12242: \"$ac_try\"") >&5
12243   (eval $ac_try) 2>&5
12244   ac_status=$?
12245   echo "$as_me:12245: \$? = $ac_status" >&5
12246   (exit "$ac_status"); }; }; then
12247   cf_cv_wcwidth_graphics=yes
12248 else
12249   echo "$as_me: program exited with status $ac_status" >&5
12250 echo "$as_me: failed program was:" >&5
12251 cat "conftest.$ac_ext" >&5
12252 cf_cv_wcwidth_graphics=no
12253 fi
12254 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
12255 fi
12256
12257 fi
12258 echo "$as_me:12258: result: $cf_cv_wcwidth_graphics" >&5
12259 echo "${ECHO_T}$cf_cv_wcwidth_graphics" >&6
12260
12261         test "$cf_cv_wcwidth_graphics" = no && NCURSES_WCWIDTH_GRAPHICS=0
12262
12263         # with_overwrite=no
12264         NCURSES_CH_T=cchar_t
12265
12266 for ac_func in putwc btowc wctob mbtowc wctomb mblen mbrlen mbrtowc wcsrtombs mbsrtowcs wcstombs mbstowcs
12267 do
12268 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
12269 echo "$as_me:12269: checking for $ac_func" >&5
12270 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
12271 if eval "test \"\${$as_ac_var+set}\" = set"; then
12272   echo $ECHO_N "(cached) $ECHO_C" >&6
12273 else
12274   cat >"conftest.$ac_ext" <<_ACEOF
12275 #line 12275 "configure"
12276 #include "confdefs.h"
12277 #define $ac_func autoconf_temporary
12278 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
12279 #undef $ac_func
12280
12281 #ifdef __cplusplus
12282 extern "C"
12283 #endif
12284
12285 /* We use char because int might match the return type of a gcc2
12286    builtin and then its argument prototype would still apply.  */
12287 char $ac_func (void);
12288
12289 int
12290 main (void)
12291 {
12292
12293 /* The GNU C library defines stubs for functions which it implements
12294     to always fail with ENOSYS.  Some functions are actually named
12295     something starting with __ and the normal name is an alias.  */
12296 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
12297 #error found stub for $ac_func
12298 #endif
12299
12300         return $ac_func ();
12301   ;
12302   return 0;
12303 }
12304 _ACEOF
12305 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12306 if { (eval echo "$as_me:12306: \"$ac_link\"") >&5
12307   (eval $ac_link) 2>&5
12308   ac_status=$?
12309   echo "$as_me:12309: \$? = $ac_status" >&5
12310   (exit "$ac_status"); } &&
12311          { ac_try='test -s "conftest$ac_exeext"'
12312   { (eval echo "$as_me:12312: \"$ac_try\"") >&5
12313   (eval $ac_try) 2>&5
12314   ac_status=$?
12315   echo "$as_me:12315: \$? = $ac_status" >&5
12316   (exit "$ac_status"); }; }; then
12317   eval "$as_ac_var=yes"
12318 else
12319   echo "$as_me: failed program was:" >&5
12320 cat "conftest.$ac_ext" >&5
12321 eval "$as_ac_var=no"
12322 fi
12323 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12324 fi
12325 echo "$as_me:12325: result: `eval echo '${'"$as_ac_var"'}'`" >&5
12326 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
12327 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
12328   cat >>confdefs.h <<EOF
12329 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
12330 EOF
12331
12332 fi
12333 done
12334
12335         if test "x$ac_cv_func_putwc" != xyes ; then
12336
12337 for ac_header in wchar.h
12338 do
12339 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12340 echo "$as_me:12340: checking for $ac_header" >&5
12341 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12342 if eval "test \"\${$as_ac_Header+set}\" = set"; then
12343   echo $ECHO_N "(cached) $ECHO_C" >&6
12344 else
12345   cat >"conftest.$ac_ext" <<_ACEOF
12346 #line 12346 "configure"
12347 #include "confdefs.h"
12348 #include <$ac_header>
12349 _ACEOF
12350 if { (eval echo "$as_me:12350: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12351   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12352   ac_status=$?
12353   $EGREP -v '^ *\+' conftest.er1 >conftest.err
12354   rm -f conftest.er1
12355   cat conftest.err >&5
12356   echo "$as_me:12356: \$? = $ac_status" >&5
12357   (exit "$ac_status"); } >/dev/null; then
12358   if test -s conftest.err; then
12359     ac_cpp_err=$ac_c_preproc_warn_flag
12360   else
12361     ac_cpp_err=
12362   fi
12363 else
12364   ac_cpp_err=yes
12365 fi
12366 if test -z "$ac_cpp_err"; then
12367   eval "$as_ac_Header=yes"
12368 else
12369   echo "$as_me: failed program was:" >&5
12370   cat "conftest.$ac_ext" >&5
12371   eval "$as_ac_Header=no"
12372 fi
12373 rm -f conftest.err "conftest.$ac_ext"
12374 fi
12375 echo "$as_me:12375: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12376 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12377 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12378   cat >>confdefs.h <<EOF
12379 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12380 EOF
12381
12382 fi
12383 done
12384
12385 echo "$as_me:12385: checking for multibyte character support" >&5
12386 echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
12387 if test "${cf_cv_utf8_lib+set}" = set; then
12388   echo $ECHO_N "(cached) $ECHO_C" >&6
12389 else
12390
12391         cf_save_LIBS="$LIBS"
12392         cat >"conftest.$ac_ext" <<_ACEOF
12393 #line 12393 "configure"
12394 #include "confdefs.h"
12395
12396 #include <stdlib.h>
12397 #include <stdio.h>
12398 #ifdef HAVE_WCHAR_H
12399 #include <wchar.h>
12400 #endif
12401
12402 int
12403 main (void)
12404 {
12405 putwc(0,0);
12406   ;
12407   return 0;
12408 }
12409 _ACEOF
12410 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12411 if { (eval echo "$as_me:12411: \"$ac_link\"") >&5
12412   (eval $ac_link) 2>&5
12413   ac_status=$?
12414   echo "$as_me:12414: \$? = $ac_status" >&5
12415   (exit "$ac_status"); } &&
12416          { ac_try='test -s "conftest$ac_exeext"'
12417   { (eval echo "$as_me:12417: \"$ac_try\"") >&5
12418   (eval $ac_try) 2>&5
12419   ac_status=$?
12420   echo "$as_me:12420: \$? = $ac_status" >&5
12421   (exit "$ac_status"); }; }; then
12422   cf_cv_utf8_lib=yes
12423 else
12424   echo "$as_me: failed program was:" >&5
12425 cat "conftest.$ac_ext" >&5
12426
12427 # If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
12428 # will be set on completion of the AC_TRY_LINK below.
12429 cf_cv_header_path_utf8=
12430 cf_cv_library_path_utf8=
12431
12432 echo "${as_me:-configure}:12432: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
12433
12434 cf_save_LIBS="$LIBS"
12435
12436 cat >"conftest.$ac_ext" <<_ACEOF
12437 #line 12437 "configure"
12438 #include "confdefs.h"
12439
12440 #include <libutf8.h>
12441 int
12442 main (void)
12443 {
12444 putwc(0,0);
12445   ;
12446   return 0;
12447 }
12448 _ACEOF
12449 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12450 if { (eval echo "$as_me:12450: \"$ac_link\"") >&5
12451   (eval $ac_link) 2>&5
12452   ac_status=$?
12453   echo "$as_me:12453: \$? = $ac_status" >&5
12454   (exit "$ac_status"); } &&
12455          { ac_try='test -s "conftest$ac_exeext"'
12456   { (eval echo "$as_me:12456: \"$ac_try\"") >&5
12457   (eval $ac_try) 2>&5
12458   ac_status=$?
12459   echo "$as_me:12459: \$? = $ac_status" >&5
12460   (exit "$ac_status"); }; }; then
12461
12462         cf_cv_find_linkage_utf8=yes
12463         cf_cv_header_path_utf8=/usr/include
12464         cf_cv_library_path_utf8=/usr/lib
12465
12466 else
12467   echo "$as_me: failed program was:" >&5
12468 cat "conftest.$ac_ext" >&5
12469
12470 LIBS="-lutf8  $cf_save_LIBS"
12471
12472 cat >"conftest.$ac_ext" <<_ACEOF
12473 #line 12473 "configure"
12474 #include "confdefs.h"
12475
12476 #include <libutf8.h>
12477 int
12478 main (void)
12479 {
12480 putwc(0,0);
12481   ;
12482   return 0;
12483 }
12484 _ACEOF
12485 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12486 if { (eval echo "$as_me:12486: \"$ac_link\"") >&5
12487   (eval $ac_link) 2>&5
12488   ac_status=$?
12489   echo "$as_me:12489: \$? = $ac_status" >&5
12490   (exit "$ac_status"); } &&
12491          { ac_try='test -s "conftest$ac_exeext"'
12492   { (eval echo "$as_me:12492: \"$ac_try\"") >&5
12493   (eval $ac_try) 2>&5
12494   ac_status=$?
12495   echo "$as_me:12495: \$? = $ac_status" >&5
12496   (exit "$ac_status"); }; }; then
12497
12498         cf_cv_find_linkage_utf8=yes
12499         cf_cv_header_path_utf8=/usr/include
12500         cf_cv_library_path_utf8=/usr/lib
12501         cf_cv_library_file_utf8="-lutf8"
12502
12503 else
12504   echo "$as_me: failed program was:" >&5
12505 cat "conftest.$ac_ext" >&5
12506
12507         cf_cv_find_linkage_utf8=no
12508         LIBS="$cf_save_LIBS"
12509
12510         test -n "$verbose" && echo "    find linkage for utf8 library" 1>&6
12511
12512 echo "${as_me:-configure}:12512: testing find linkage for utf8 library ..." 1>&5
12513
12514 echo "${as_me:-configure}:12514: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
12515
12516         cf_save_CPPFLAGS="$CPPFLAGS"
12517         cf_test_CPPFLAGS="$CPPFLAGS"
12518
12519 cf_search=
12520
12521 # collect the current set of include-directories from compiler flags
12522 cf_header_path_list=""
12523 if test -n "${CFLAGS}${CPPFLAGS}" ; then
12524         for cf_header_path in $CPPFLAGS $CFLAGS
12525         do
12526                 case "$cf_header_path" in
12527                 (-I*)
12528                         cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12529
12530 test "x$cf_header_path" != "xNONE" && \
12531 test -d "$cf_header_path" && \
12532  {
12533         test -n "$verbose" && echo "    ... testing for include-directories under $cf_header_path"
12534         test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
12535         test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
12536         test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
12537         test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
12538         test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
12539 }
12540
12541                         cf_header_path_list="$cf_header_path_list $cf_search"
12542                         ;;
12543                 esac
12544         done
12545 fi
12546
12547 # add the variations for the package we are looking for
12548
12549 cf_search=
12550
12551 test "x$prefix" != "xNONE" && \
12552 test -d "$prefix" && \
12553  {
12554         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
12555         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
12556         test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
12557         test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
12558         test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
12559         test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
12560 }
12561
12562 for cf_subdir_prefix in \
12563         /usr \
12564         /usr/local \
12565         /usr/pkg \
12566         /opt \
12567         /opt/local \
12568         $HOME
12569 do
12570
12571 test "x$cf_subdir_prefix" != "x$prefix" && \
12572 test -d "$cf_subdir_prefix" && \
12573 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12574         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
12575         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
12576         test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
12577         test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
12578         test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
12579         test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
12580 }
12581
12582 done
12583
12584 test "$includedir" != NONE && \
12585 test "$includedir" != "/usr/include" && \
12586 test -d "$includedir" && {
12587         test -d "$includedir" &&    cf_search="$cf_search $includedir"
12588         test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
12589 }
12590
12591 test "$oldincludedir" != NONE && \
12592 test "$oldincludedir" != "/usr/include" && \
12593 test -d "$oldincludedir" && {
12594         test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
12595         test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
12596 }
12597
12598 cf_search="$cf_search $cf_header_path_list"
12599
12600         for cf_cv_header_path_utf8 in $cf_search
12601         do
12602                 if test -d "$cf_cv_header_path_utf8" ; then
12603                         test -n "$verbose" && echo "    ... testing $cf_cv_header_path_utf8" 1>&6
12604
12605 echo "${as_me:-configure}:12605: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
12606
12607                         CPPFLAGS="$cf_save_CPPFLAGS"
12608
12609         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12610         CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
12611
12612                         cat >"conftest.$ac_ext" <<_ACEOF
12613 #line 12613 "configure"
12614 #include "confdefs.h"
12615
12616 #include <libutf8.h>
12617 int
12618 main (void)
12619 {
12620 putwc(0,0);
12621   ;
12622   return 0;
12623 }
12624 _ACEOF
12625 rm -f "conftest.$ac_objext"
12626 if { (eval echo "$as_me:12626: \"$ac_compile\"") >&5
12627   (eval $ac_compile) 2>&5
12628   ac_status=$?
12629   echo "$as_me:12629: \$? = $ac_status" >&5
12630   (exit "$ac_status"); } &&
12631          { ac_try='test -s "conftest.$ac_objext"'
12632   { (eval echo "$as_me:12632: \"$ac_try\"") >&5
12633   (eval $ac_try) 2>&5
12634   ac_status=$?
12635   echo "$as_me:12635: \$? = $ac_status" >&5
12636   (exit "$ac_status"); }; }; then
12637
12638                                 test -n "$verbose" && echo "    ... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
12639
12640 echo "${as_me:-configure}:12640: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
12641
12642                                 cf_cv_find_linkage_utf8=maybe
12643                                 cf_test_CPPFLAGS="$CPPFLAGS"
12644                                 break
12645 else
12646   echo "$as_me: failed program was:" >&5
12647 cat "conftest.$ac_ext" >&5
12648
12649                                 CPPFLAGS="$cf_save_CPPFLAGS"
12650
12651 fi
12652 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12653                 fi
12654         done
12655
12656         if test "$cf_cv_find_linkage_utf8" = maybe ; then
12657
12658 echo "${as_me:-configure}:12658: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
12659
12660                 cf_save_LIBS="$LIBS"
12661                 cf_save_LDFLAGS="$LDFLAGS"
12662
12663                 if test "$cf_cv_find_linkage_utf8" != yes ; then
12664
12665 cf_search=
12666 cf_library_path_list=""
12667 if test -n "${LDFLAGS}${LIBS}" ; then
12668         for cf_library_path in $LDFLAGS $LIBS
12669         do
12670                 case "$cf_library_path" in
12671                 (-L*)
12672                         cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
12673
12674 test "x$cf_library_path" != "xNONE" && \
12675 test -d "$cf_library_path" && \
12676  {
12677         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_library_path"
12678         test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
12679         test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
12680         test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
12681         test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
12682         test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
12683 }
12684
12685                         cf_library_path_list="$cf_library_path_list $cf_search"
12686                         ;;
12687                 esac
12688         done
12689 fi
12690
12691 cf_search=
12692
12693 test "x$prefix" != "xNONE" && \
12694 test -d "$prefix" && \
12695  {
12696         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
12697         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
12698         test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
12699         test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
12700         test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
12701         test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
12702 }
12703
12704 for cf_subdir_prefix in \
12705         /usr \
12706         /usr/local \
12707         /usr/pkg \
12708         /opt \
12709         /opt/local \
12710         $HOME
12711 do
12712
12713 test "x$cf_subdir_prefix" != "x$prefix" && \
12714 test -d "$cf_subdir_prefix" && \
12715 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
12716         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
12717         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
12718         test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
12719         test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
12720         test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
12721         test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
12722 }
12723
12724 done
12725
12726 cf_search="$cf_library_path_list $cf_search"
12727
12728                         for cf_cv_library_path_utf8 in $cf_search
12729                         do
12730                                 if test -d "$cf_cv_library_path_utf8" ; then
12731                                         test -n "$verbose" && echo "    ... testing $cf_cv_library_path_utf8" 1>&6
12732
12733 echo "${as_me:-configure}:12733: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
12734
12735                                         CPPFLAGS="$cf_test_CPPFLAGS"
12736                                         LIBS="-lutf8  $cf_save_LIBS"
12737                                         LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
12738                                         cat >"conftest.$ac_ext" <<_ACEOF
12739 #line 12739 "configure"
12740 #include "confdefs.h"
12741
12742 #include <libutf8.h>
12743 int
12744 main (void)
12745 {
12746 putwc(0,0);
12747   ;
12748   return 0;
12749 }
12750 _ACEOF
12751 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12752 if { (eval echo "$as_me:12752: \"$ac_link\"") >&5
12753   (eval $ac_link) 2>&5
12754   ac_status=$?
12755   echo "$as_me:12755: \$? = $ac_status" >&5
12756   (exit "$ac_status"); } &&
12757          { ac_try='test -s "conftest$ac_exeext"'
12758   { (eval echo "$as_me:12758: \"$ac_try\"") >&5
12759   (eval $ac_try) 2>&5
12760   ac_status=$?
12761   echo "$as_me:12761: \$? = $ac_status" >&5
12762   (exit "$ac_status"); }; }; then
12763
12764                                         test -n "$verbose" && echo "    ... found utf8 library in $cf_cv_library_path_utf8" 1>&6
12765
12766 echo "${as_me:-configure}:12766: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
12767
12768                                         cf_cv_find_linkage_utf8=yes
12769                                         cf_cv_library_file_utf8="-lutf8"
12770                                         break
12771 else
12772   echo "$as_me: failed program was:" >&5
12773 cat "conftest.$ac_ext" >&5
12774
12775                                         CPPFLAGS="$cf_save_CPPFLAGS"
12776                                         LIBS="$cf_save_LIBS"
12777                                         LDFLAGS="$cf_save_LDFLAGS"
12778
12779 fi
12780 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12781                                 fi
12782                         done
12783                         CPPFLAGS="$cf_save_CPPFLAGS"
12784                         LDFLAGS="$cf_save_LDFLAGS"
12785                 fi
12786
12787         else
12788                 cf_cv_find_linkage_utf8=no
12789         fi
12790
12791 fi
12792 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12793
12794 fi
12795 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12796
12797 LIBS="$cf_save_LIBS"
12798
12799 if test "$cf_cv_find_linkage_utf8" = yes ; then
12800 cf_cv_utf8_lib=add-on
12801 else
12802 cf_cv_utf8_lib=no
12803 fi
12804
12805 fi
12806 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12807 fi
12808 echo "$as_me:12808: result: $cf_cv_utf8_lib" >&5
12809 echo "${ECHO_T}$cf_cv_utf8_lib" >&6
12810
12811 # HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
12812 # ncurses/ncursesw:
12813 if test "$cf_cv_utf8_lib" = "add-on" ; then
12814
12815 cat >>confdefs.h <<\EOF
12816 #define HAVE_LIBUTF8_H 1
12817 EOF
12818
12819 if test -n "$cf_cv_header_path_utf8" ; then
12820   for cf_add_incdir in $cf_cv_header_path_utf8
12821   do
12822         while test "$cf_add_incdir" != /usr/include
12823         do
12824           if test -d "$cf_add_incdir"
12825           then
12826                 cf_have_incdir=no
12827                 if test -n "$CFLAGS$CPPFLAGS" ; then
12828                   # a loop is needed to ensure we can add subdirs of existing dirs
12829                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12830                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12831                           cf_have_incdir=yes; break
12832                         fi
12833                   done
12834                 fi
12835
12836                 if test "$cf_have_incdir" = no ; then
12837                   if test "$cf_add_incdir" = /usr/local/include ; then
12838                         if test "$GCC" = yes
12839                         then
12840                           cf_save_CPPFLAGS=$CPPFLAGS
12841
12842         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12843         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12844
12845                           cat >"conftest.$ac_ext" <<_ACEOF
12846 #line 12846 "configure"
12847 #include "confdefs.h"
12848 #include <stdio.h>
12849 int
12850 main (void)
12851 {
12852 printf("Hello")
12853   ;
12854   return 0;
12855 }
12856 _ACEOF
12857 rm -f "conftest.$ac_objext"
12858 if { (eval echo "$as_me:12858: \"$ac_compile\"") >&5
12859   (eval $ac_compile) 2>&5
12860   ac_status=$?
12861   echo "$as_me:12861: \$? = $ac_status" >&5
12862   (exit "$ac_status"); } &&
12863          { ac_try='test -s "conftest.$ac_objext"'
12864   { (eval echo "$as_me:12864: \"$ac_try\"") >&5
12865   (eval $ac_try) 2>&5
12866   ac_status=$?
12867   echo "$as_me:12867: \$? = $ac_status" >&5
12868   (exit "$ac_status"); }; }; then
12869   :
12870 else
12871   echo "$as_me: failed program was:" >&5
12872 cat "conftest.$ac_ext" >&5
12873 cf_have_incdir=yes
12874 fi
12875 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12876                           CPPFLAGS=$cf_save_CPPFLAGS
12877                         fi
12878                   fi
12879                 fi
12880
12881                 if test "$cf_have_incdir" = no ; then
12882                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
12883
12884 echo "${as_me:-configure}:12884: testing adding $cf_add_incdir to include-path ..." 1>&5
12885
12886                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12887
12888                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
12889                   test "$cf_top_incdir" = "$cf_add_incdir" && break
12890                   cf_add_incdir="$cf_top_incdir"
12891                 else
12892                   break
12893                 fi
12894           else
12895                 break
12896           fi
12897         done
12898   done
12899 fi
12900
12901 if test -n "$cf_cv_library_path_utf8" ; then
12902         for cf_add_libdir in $cf_cv_library_path_utf8
12903         do
12904                 if test "$cf_add_libdir" = /usr/lib ; then
12905                         :
12906                 elif test -d "$cf_add_libdir"
12907                 then
12908                         cf_have_libdir=no
12909                         if test -n "$LDFLAGS$LIBS" ; then
12910                                 # a loop is needed to ensure we can add subdirs of existing dirs
12911                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
12912                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
12913                                                 cf_have_libdir=yes; break
12914                                         fi
12915                                 done
12916                         fi
12917                         if test "$cf_have_libdir" = no ; then
12918                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
12919
12920 echo "${as_me:-configure}:12920: testing adding $cf_add_libdir to library-path ..." 1>&5
12921
12922                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
12923                         fi
12924                 fi
12925         done
12926 fi
12927
12928 cf_add_libs="$LIBS"
12929 # reverse order
12930 cf_add_0lib=
12931 for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12932 # filter duplicates
12933 for cf_add_1lib in $cf_add_0lib; do
12934         for cf_add_2lib in $cf_add_libs; do
12935                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12936                         cf_add_1lib=
12937                         break
12938                 fi
12939         done
12940         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12941 done
12942 LIBS="$cf_add_libs"
12943
12944 fi
12945
12946                 if test "$cf_cv_utf8_lib" != no ; then
12947                         NCURSES_LIBUTF8=1
12948                 fi
12949         fi
12950
12951 # This is needed on Tru64 5.0 to declare mbstate_t
12952 echo "$as_me:12952: checking if we must include wchar.h to declare mbstate_t" >&5
12953 echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
12954 if test "${cf_cv_mbstate_t+set}" = set; then
12955   echo $ECHO_N "(cached) $ECHO_C" >&6
12956 else
12957
12958 cat >"conftest.$ac_ext" <<_ACEOF
12959 #line 12959 "configure"
12960 #include "confdefs.h"
12961
12962 #include <stdlib.h>
12963 #include <stdarg.h>
12964 #include <stdio.h>
12965 #ifdef HAVE_LIBUTF8_H
12966 #include <libutf8.h>
12967 #endif
12968 int
12969 main (void)
12970 {
12971 mbstate_t state
12972   ;
12973   return 0;
12974 }
12975 _ACEOF
12976 rm -f "conftest.$ac_objext"
12977 if { (eval echo "$as_me:12977: \"$ac_compile\"") >&5
12978   (eval $ac_compile) 2>&5
12979   ac_status=$?
12980   echo "$as_me:12980: \$? = $ac_status" >&5
12981   (exit "$ac_status"); } &&
12982          { ac_try='test -s "conftest.$ac_objext"'
12983   { (eval echo "$as_me:12983: \"$ac_try\"") >&5
12984   (eval $ac_try) 2>&5
12985   ac_status=$?
12986   echo "$as_me:12986: \$? = $ac_status" >&5
12987   (exit "$ac_status"); }; }; then
12988   cf_cv_mbstate_t=no
12989 else
12990   echo "$as_me: failed program was:" >&5
12991 cat "conftest.$ac_ext" >&5
12992 cat >"conftest.$ac_ext" <<_ACEOF
12993 #line 12993 "configure"
12994 #include "confdefs.h"
12995
12996 #include <stdlib.h>
12997 #include <stdarg.h>
12998 #include <stdio.h>
12999 #include <wchar.h>
13000 #ifdef HAVE_LIBUTF8_H
13001 #include <libutf8.h>
13002 #endif
13003 int
13004 main (void)
13005 {
13006 mbstate_t value
13007   ;
13008   return 0;
13009 }
13010 _ACEOF
13011 rm -f "conftest.$ac_objext"
13012 if { (eval echo "$as_me:13012: \"$ac_compile\"") >&5
13013   (eval $ac_compile) 2>&5
13014   ac_status=$?
13015   echo "$as_me:13015: \$? = $ac_status" >&5
13016   (exit "$ac_status"); } &&
13017          { ac_try='test -s "conftest.$ac_objext"'
13018   { (eval echo "$as_me:13018: \"$ac_try\"") >&5
13019   (eval $ac_try) 2>&5
13020   ac_status=$?
13021   echo "$as_me:13021: \$? = $ac_status" >&5
13022   (exit "$ac_status"); }; }; then
13023   cf_cv_mbstate_t=yes
13024 else
13025   echo "$as_me: failed program was:" >&5
13026 cat "conftest.$ac_ext" >&5
13027 cf_cv_mbstate_t=unknown
13028 fi
13029 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13030 fi
13031 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13032 fi
13033 echo "$as_me:13033: result: $cf_cv_mbstate_t" >&5
13034 echo "${ECHO_T}$cf_cv_mbstate_t" >&6
13035
13036 if test "$cf_cv_mbstate_t" = yes ; then
13037
13038 cat >>confdefs.h <<\EOF
13039 #define NEED_WCHAR_H 1
13040 EOF
13041
13042         NEED_WCHAR_H=1
13043 fi
13044
13045 # if we do not find mbstate_t in either place, use substitution to provide a fallback.
13046 if test "$cf_cv_mbstate_t" = unknown ; then
13047         NCURSES_MBSTATE_T=1
13048 fi
13049
13050 # This is needed on Tru64 5.0 to declare wchar_t
13051 echo "$as_me:13051: checking if we must include wchar.h to declare wchar_t" >&5
13052 echo $ECHO_N "checking if we must include wchar.h to declare wchar_t... $ECHO_C" >&6
13053 if test "${cf_cv_wchar_t+set}" = set; then
13054   echo $ECHO_N "(cached) $ECHO_C" >&6
13055 else
13056
13057 cat >"conftest.$ac_ext" <<_ACEOF
13058 #line 13058 "configure"
13059 #include "confdefs.h"
13060
13061 #include <stdlib.h>
13062 #include <stdarg.h>
13063 #include <stdio.h>
13064 #ifdef HAVE_LIBUTF8_H
13065 #include <libutf8.h>
13066 #endif
13067 int
13068 main (void)
13069 {
13070 wchar_t state
13071   ;
13072   return 0;
13073 }
13074 _ACEOF
13075 rm -f "conftest.$ac_objext"
13076 if { (eval echo "$as_me:13076: \"$ac_compile\"") >&5
13077   (eval $ac_compile) 2>&5
13078   ac_status=$?
13079   echo "$as_me:13079: \$? = $ac_status" >&5
13080   (exit "$ac_status"); } &&
13081          { ac_try='test -s "conftest.$ac_objext"'
13082   { (eval echo "$as_me:13082: \"$ac_try\"") >&5
13083   (eval $ac_try) 2>&5
13084   ac_status=$?
13085   echo "$as_me:13085: \$? = $ac_status" >&5
13086   (exit "$ac_status"); }; }; then
13087   cf_cv_wchar_t=no
13088 else
13089   echo "$as_me: failed program was:" >&5
13090 cat "conftest.$ac_ext" >&5
13091 cat >"conftest.$ac_ext" <<_ACEOF
13092 #line 13092 "configure"
13093 #include "confdefs.h"
13094
13095 #include <stdlib.h>
13096 #include <stdarg.h>
13097 #include <stdio.h>
13098 #include <wchar.h>
13099 #ifdef HAVE_LIBUTF8_H
13100 #include <libutf8.h>
13101 #endif
13102 int
13103 main (void)
13104 {
13105 wchar_t value
13106   ;
13107   return 0;
13108 }
13109 _ACEOF
13110 rm -f "conftest.$ac_objext"
13111 if { (eval echo "$as_me:13111: \"$ac_compile\"") >&5
13112   (eval $ac_compile) 2>&5
13113   ac_status=$?
13114   echo "$as_me:13114: \$? = $ac_status" >&5
13115   (exit "$ac_status"); } &&
13116          { ac_try='test -s "conftest.$ac_objext"'
13117   { (eval echo "$as_me:13117: \"$ac_try\"") >&5
13118   (eval $ac_try) 2>&5
13119   ac_status=$?
13120   echo "$as_me:13120: \$? = $ac_status" >&5
13121   (exit "$ac_status"); }; }; then
13122   cf_cv_wchar_t=yes
13123 else
13124   echo "$as_me: failed program was:" >&5
13125 cat "conftest.$ac_ext" >&5
13126 cf_cv_wchar_t=unknown
13127 fi
13128 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13129 fi
13130 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13131 fi
13132 echo "$as_me:13132: result: $cf_cv_wchar_t" >&5
13133 echo "${ECHO_T}$cf_cv_wchar_t" >&6
13134
13135 if test "$cf_cv_wchar_t" = yes ; then
13136
13137 cat >>confdefs.h <<\EOF
13138 #define NEED_WCHAR_H 1
13139 EOF
13140
13141         NEED_WCHAR_H=1
13142 fi
13143
13144 # if we do not find wchar_t in either place, use substitution to provide a fallback.
13145 if test "$cf_cv_wchar_t" = unknown ; then
13146         NCURSES_WCHAR_T=1
13147 fi
13148
13149 # if we find wchar_t in either place, use substitution to provide a fallback.
13150 if test "$cf_cv_wchar_t" != unknown ; then
13151         NCURSES_OK_WCHAR_T=1
13152 fi
13153
13154 # This is needed on Tru64 5.0 to declare wint_t
13155 echo "$as_me:13155: checking if we must include wchar.h to declare wint_t" >&5
13156 echo $ECHO_N "checking if we must include wchar.h to declare wint_t... $ECHO_C" >&6
13157 if test "${cf_cv_wint_t+set}" = set; then
13158   echo $ECHO_N "(cached) $ECHO_C" >&6
13159 else
13160
13161 cat >"conftest.$ac_ext" <<_ACEOF
13162 #line 13162 "configure"
13163 #include "confdefs.h"
13164
13165 #include <stdlib.h>
13166 #include <stdarg.h>
13167 #include <stdio.h>
13168 #ifdef HAVE_LIBUTF8_H
13169 #include <libutf8.h>
13170 #endif
13171 int
13172 main (void)
13173 {
13174 wint_t state
13175   ;
13176   return 0;
13177 }
13178 _ACEOF
13179 rm -f "conftest.$ac_objext"
13180 if { (eval echo "$as_me:13180: \"$ac_compile\"") >&5
13181   (eval $ac_compile) 2>&5
13182   ac_status=$?
13183   echo "$as_me:13183: \$? = $ac_status" >&5
13184   (exit "$ac_status"); } &&
13185          { ac_try='test -s "conftest.$ac_objext"'
13186   { (eval echo "$as_me:13186: \"$ac_try\"") >&5
13187   (eval $ac_try) 2>&5
13188   ac_status=$?
13189   echo "$as_me:13189: \$? = $ac_status" >&5
13190   (exit "$ac_status"); }; }; then
13191   cf_cv_wint_t=no
13192 else
13193   echo "$as_me: failed program was:" >&5
13194 cat "conftest.$ac_ext" >&5
13195 cat >"conftest.$ac_ext" <<_ACEOF
13196 #line 13196 "configure"
13197 #include "confdefs.h"
13198
13199 #include <stdlib.h>
13200 #include <stdarg.h>
13201 #include <stdio.h>
13202 #include <wchar.h>
13203 #ifdef HAVE_LIBUTF8_H
13204 #include <libutf8.h>
13205 #endif
13206 int
13207 main (void)
13208 {
13209 wint_t value
13210   ;
13211   return 0;
13212 }
13213 _ACEOF
13214 rm -f "conftest.$ac_objext"
13215 if { (eval echo "$as_me:13215: \"$ac_compile\"") >&5
13216   (eval $ac_compile) 2>&5
13217   ac_status=$?
13218   echo "$as_me:13218: \$? = $ac_status" >&5
13219   (exit "$ac_status"); } &&
13220          { ac_try='test -s "conftest.$ac_objext"'
13221   { (eval echo "$as_me:13221: \"$ac_try\"") >&5
13222   (eval $ac_try) 2>&5
13223   ac_status=$?
13224   echo "$as_me:13224: \$? = $ac_status" >&5
13225   (exit "$ac_status"); }; }; then
13226   cf_cv_wint_t=yes
13227 else
13228   echo "$as_me: failed program was:" >&5
13229 cat "conftest.$ac_ext" >&5
13230 cf_cv_wint_t=unknown
13231 fi
13232 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13233 fi
13234 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13235 fi
13236 echo "$as_me:13236: result: $cf_cv_wint_t" >&5
13237 echo "${ECHO_T}$cf_cv_wint_t" >&6
13238
13239 if test "$cf_cv_wint_t" = yes ; then
13240
13241 cat >>confdefs.h <<\EOF
13242 #define NEED_WCHAR_H 1
13243 EOF
13244
13245         NEED_WCHAR_H=1
13246 fi
13247
13248 # if we do not find wint_t in either place, use substitution to provide a fallback.
13249 if test "$cf_cv_wint_t" = unknown ; then
13250         NCURSES_WINT_T=1
13251 fi
13252
13253 # if we find wint_t in either place, use substitution to provide a fallback.
13254 if test "$cf_cv_wint_t" != unknown ; then
13255         NCURSES_OK_WINT_T=1
13256 fi
13257
13258         if test "$NCURSES_MBSTATE_T" != 0; then
13259
13260 cat >>confdefs.h <<\EOF
13261 #define NEED_MBSTATE_T_DEF 1
13262 EOF
13263
13264         fi
13265 fi
13266
13267 ###   use option --disable-lp64 to allow long chtype
13268 echo "$as_me:13268: checking whether to enable _LP64 definition in curses.h" >&5
13269 echo $ECHO_N "checking whether to enable _LP64 definition in curses.h... $ECHO_C" >&6
13270
13271 # Check whether --enable-lp64 or --disable-lp64 was given.
13272 if test "${enable_lp64+set}" = set; then
13273   enableval="$enable_lp64"
13274   with_lp64=$enableval
13275 else
13276   with_lp64=$cf_dft_with_lp64
13277 fi;
13278 echo "$as_me:13278: result: $with_lp64" >&5
13279 echo "${ECHO_T}$with_lp64" >&6
13280
13281 if test "x$with_lp64" = xyes ; then
13282         cf_cv_enable_lp64=1
13283 else
13284         cf_cv_enable_lp64=0
13285 fi
13286
13287 # Check whether --enable-largefile or --disable-largefile was given.
13288 if test "${enable_largefile+set}" = set; then
13289   enableval="$enable_largefile"
13290
13291 fi;
13292 if test "$enable_largefile" != no; then
13293
13294   echo "$as_me:13294: checking for special C compiler options needed for large files" >&5
13295 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
13296 if test "${ac_cv_sys_largefile_CC+set}" = set; then
13297   echo $ECHO_N "(cached) $ECHO_C" >&6
13298 else
13299   ac_cv_sys_largefile_CC=no
13300      if test "$GCC" != yes; then
13301        ac_save_CC=$CC
13302        while :; do
13303          # IRIX 6.2 and later do not support large files by default,
13304          # so use the C compiler's -n32 option if that helps.
13305          cat >"conftest.$ac_ext" <<_ACEOF
13306 #line 13306 "configure"
13307 #include "confdefs.h"
13308 #include <sys/types.h>
13309  /* Check that off_t can represent 2**63 - 1 correctly.
13310     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13311     since some C++ compilers masquerading as C compilers
13312     incorrectly reject 9223372036854775807.  */
13313 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13314   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13315                        && LARGE_OFF_T % 2147483647 == 1)
13316                       ? 1 : -1];
13317 int
13318 main (void)
13319 {
13320
13321   ;
13322   return 0;
13323 }
13324 _ACEOF
13325          rm -f "conftest.$ac_objext"
13326 if { (eval echo "$as_me:13326: \"$ac_compile\"") >&5
13327   (eval $ac_compile) 2>&5
13328   ac_status=$?
13329   echo "$as_me:13329: \$? = $ac_status" >&5
13330   (exit "$ac_status"); } &&
13331          { ac_try='test -s "conftest.$ac_objext"'
13332   { (eval echo "$as_me:13332: \"$ac_try\"") >&5
13333   (eval $ac_try) 2>&5
13334   ac_status=$?
13335   echo "$as_me:13335: \$? = $ac_status" >&5
13336   (exit "$ac_status"); }; }; then
13337   break
13338 else
13339   echo "$as_me: failed program was:" >&5
13340 cat "conftest.$ac_ext" >&5
13341 fi
13342 rm -f "conftest.$ac_objext"
13343          CC="$CC -n32"
13344          rm -f "conftest.$ac_objext"
13345 if { (eval echo "$as_me:13345: \"$ac_compile\"") >&5
13346   (eval $ac_compile) 2>&5
13347   ac_status=$?
13348   echo "$as_me:13348: \$? = $ac_status" >&5
13349   (exit "$ac_status"); } &&
13350          { ac_try='test -s "conftest.$ac_objext"'
13351   { (eval echo "$as_me:13351: \"$ac_try\"") >&5
13352   (eval $ac_try) 2>&5
13353   ac_status=$?
13354   echo "$as_me:13354: \$? = $ac_status" >&5
13355   (exit "$ac_status"); }; }; then
13356   ac_cv_sys_largefile_CC=' -n32'; break
13357 else
13358   echo "$as_me: failed program was:" >&5
13359 cat "conftest.$ac_ext" >&5
13360 fi
13361 rm -f "conftest.$ac_objext"
13362          break
13363        done
13364        CC=$ac_save_CC
13365        rm -f "conftest.$ac_ext"
13366     fi
13367 fi
13368 echo "$as_me:13368: result: $ac_cv_sys_largefile_CC" >&5
13369 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
13370   if test "$ac_cv_sys_largefile_CC" != no; then
13371     CC=$CC$ac_cv_sys_largefile_CC
13372   fi
13373
13374   echo "$as_me:13374: checking for _FILE_OFFSET_BITS value needed for large files" >&5
13375 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
13376 if test "${ac_cv_sys_file_offset_bits+set}" = set; then
13377   echo $ECHO_N "(cached) $ECHO_C" >&6
13378 else
13379   while :; do
13380   ac_cv_sys_file_offset_bits=no
13381   cat >"conftest.$ac_ext" <<_ACEOF
13382 #line 13382 "configure"
13383 #include "confdefs.h"
13384 #include <sys/types.h>
13385  /* Check that off_t can represent 2**63 - 1 correctly.
13386     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13387     since some C++ compilers masquerading as C compilers
13388     incorrectly reject 9223372036854775807.  */
13389 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13390   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13391                        && LARGE_OFF_T % 2147483647 == 1)
13392                       ? 1 : -1];
13393 int
13394 main (void)
13395 {
13396
13397   ;
13398   return 0;
13399 }
13400 _ACEOF
13401 rm -f "conftest.$ac_objext"
13402 if { (eval echo "$as_me:13402: \"$ac_compile\"") >&5
13403   (eval $ac_compile) 2>&5
13404   ac_status=$?
13405   echo "$as_me:13405: \$? = $ac_status" >&5
13406   (exit "$ac_status"); } &&
13407          { ac_try='test -s "conftest.$ac_objext"'
13408   { (eval echo "$as_me:13408: \"$ac_try\"") >&5
13409   (eval $ac_try) 2>&5
13410   ac_status=$?
13411   echo "$as_me:13411: \$? = $ac_status" >&5
13412   (exit "$ac_status"); }; }; then
13413   break
13414 else
13415   echo "$as_me: failed program was:" >&5
13416 cat "conftest.$ac_ext" >&5
13417 fi
13418 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13419   cat >"conftest.$ac_ext" <<_ACEOF
13420 #line 13420 "configure"
13421 #include "confdefs.h"
13422 #define _FILE_OFFSET_BITS 64
13423 #include <sys/types.h>
13424  /* Check that off_t can represent 2**63 - 1 correctly.
13425     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13426     since some C++ compilers masquerading as C compilers
13427     incorrectly reject 9223372036854775807.  */
13428 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13429   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13430                        && LARGE_OFF_T % 2147483647 == 1)
13431                       ? 1 : -1];
13432 int
13433 main (void)
13434 {
13435
13436   ;
13437   return 0;
13438 }
13439 _ACEOF
13440 rm -f "conftest.$ac_objext"
13441 if { (eval echo "$as_me:13441: \"$ac_compile\"") >&5
13442   (eval $ac_compile) 2>&5
13443   ac_status=$?
13444   echo "$as_me:13444: \$? = $ac_status" >&5
13445   (exit "$ac_status"); } &&
13446          { ac_try='test -s "conftest.$ac_objext"'
13447   { (eval echo "$as_me:13447: \"$ac_try\"") >&5
13448   (eval $ac_try) 2>&5
13449   ac_status=$?
13450   echo "$as_me:13450: \$? = $ac_status" >&5
13451   (exit "$ac_status"); }; }; then
13452   ac_cv_sys_file_offset_bits=64; break
13453 else
13454   echo "$as_me: failed program was:" >&5
13455 cat "conftest.$ac_ext" >&5
13456 fi
13457 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13458   break
13459 done
13460 fi
13461 echo "$as_me:13461: result: $ac_cv_sys_file_offset_bits" >&5
13462 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
13463 if test "$ac_cv_sys_file_offset_bits" != no; then
13464
13465 cat >>confdefs.h <<EOF
13466 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
13467 EOF
13468
13469 fi
13470 rm -rf conftest*
13471   echo "$as_me:13471: checking for _LARGE_FILES value needed for large files" >&5
13472 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
13473 if test "${ac_cv_sys_large_files+set}" = set; then
13474   echo $ECHO_N "(cached) $ECHO_C" >&6
13475 else
13476   while :; do
13477   ac_cv_sys_large_files=no
13478   cat >"conftest.$ac_ext" <<_ACEOF
13479 #line 13479 "configure"
13480 #include "confdefs.h"
13481 #include <sys/types.h>
13482  /* Check that off_t can represent 2**63 - 1 correctly.
13483     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13484     since some C++ compilers masquerading as C compilers
13485     incorrectly reject 9223372036854775807.  */
13486 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13487   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13488                        && LARGE_OFF_T % 2147483647 == 1)
13489                       ? 1 : -1];
13490 int
13491 main (void)
13492 {
13493
13494   ;
13495   return 0;
13496 }
13497 _ACEOF
13498 rm -f "conftest.$ac_objext"
13499 if { (eval echo "$as_me:13499: \"$ac_compile\"") >&5
13500   (eval $ac_compile) 2>&5
13501   ac_status=$?
13502   echo "$as_me:13502: \$? = $ac_status" >&5
13503   (exit "$ac_status"); } &&
13504          { ac_try='test -s "conftest.$ac_objext"'
13505   { (eval echo "$as_me:13505: \"$ac_try\"") >&5
13506   (eval $ac_try) 2>&5
13507   ac_status=$?
13508   echo "$as_me:13508: \$? = $ac_status" >&5
13509   (exit "$ac_status"); }; }; then
13510   break
13511 else
13512   echo "$as_me: failed program was:" >&5
13513 cat "conftest.$ac_ext" >&5
13514 fi
13515 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13516   cat >"conftest.$ac_ext" <<_ACEOF
13517 #line 13517 "configure"
13518 #include "confdefs.h"
13519 #define _LARGE_FILES 1
13520 #include <sys/types.h>
13521  /* Check that off_t can represent 2**63 - 1 correctly.
13522     We can't simply define LARGE_OFF_T to be 9223372036854775807,
13523     since some C++ compilers masquerading as C compilers
13524     incorrectly reject 9223372036854775807.  */
13525 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
13526   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
13527                        && LARGE_OFF_T % 2147483647 == 1)
13528                       ? 1 : -1];
13529 int
13530 main (void)
13531 {
13532
13533   ;
13534   return 0;
13535 }
13536 _ACEOF
13537 rm -f "conftest.$ac_objext"
13538 if { (eval echo "$as_me:13538: \"$ac_compile\"") >&5
13539   (eval $ac_compile) 2>&5
13540   ac_status=$?
13541   echo "$as_me:13541: \$? = $ac_status" >&5
13542   (exit "$ac_status"); } &&
13543          { ac_try='test -s "conftest.$ac_objext"'
13544   { (eval echo "$as_me:13544: \"$ac_try\"") >&5
13545   (eval $ac_try) 2>&5
13546   ac_status=$?
13547   echo "$as_me:13547: \$? = $ac_status" >&5
13548   (exit "$ac_status"); }; }; then
13549   ac_cv_sys_large_files=1; break
13550 else
13551   echo "$as_me: failed program was:" >&5
13552 cat "conftest.$ac_ext" >&5
13553 fi
13554 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13555   break
13556 done
13557 fi
13558 echo "$as_me:13558: result: $ac_cv_sys_large_files" >&5
13559 echo "${ECHO_T}$ac_cv_sys_large_files" >&6
13560 if test "$ac_cv_sys_large_files" != no; then
13561
13562 cat >>confdefs.h <<EOF
13563 #define _LARGE_FILES $ac_cv_sys_large_files
13564 EOF
13565
13566 fi
13567 rm -rf conftest*
13568 fi
13569
13570         if test "$enable_largefile" != no ; then
13571         echo "$as_me:13571: checking for _LARGEFILE_SOURCE value needed for large files" >&5
13572 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
13573 if test "${ac_cv_sys_largefile_source+set}" = set; then
13574   echo $ECHO_N "(cached) $ECHO_C" >&6
13575 else
13576   while :; do
13577   ac_cv_sys_largefile_source=no
13578   cat >"conftest.$ac_ext" <<_ACEOF
13579 #line 13579 "configure"
13580 #include "confdefs.h"
13581 #include <stdio.h>
13582 int
13583 main (void)
13584 {
13585 return !fseeko;
13586   ;
13587   return 0;
13588 }
13589 _ACEOF
13590 rm -f "conftest.$ac_objext"
13591 if { (eval echo "$as_me:13591: \"$ac_compile\"") >&5
13592   (eval $ac_compile) 2>&5
13593   ac_status=$?
13594   echo "$as_me:13594: \$? = $ac_status" >&5
13595   (exit "$ac_status"); } &&
13596          { ac_try='test -s "conftest.$ac_objext"'
13597   { (eval echo "$as_me:13597: \"$ac_try\"") >&5
13598   (eval $ac_try) 2>&5
13599   ac_status=$?
13600   echo "$as_me:13600: \$? = $ac_status" >&5
13601   (exit "$ac_status"); }; }; then
13602   break
13603 else
13604   echo "$as_me: failed program was:" >&5
13605 cat "conftest.$ac_ext" >&5
13606 fi
13607 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13608   cat >"conftest.$ac_ext" <<_ACEOF
13609 #line 13609 "configure"
13610 #include "confdefs.h"
13611 #define _LARGEFILE_SOURCE 1
13612 #include <stdio.h>
13613 int
13614 main (void)
13615 {
13616 return !fseeko;
13617   ;
13618   return 0;
13619 }
13620 _ACEOF
13621 rm -f "conftest.$ac_objext"
13622 if { (eval echo "$as_me:13622: \"$ac_compile\"") >&5
13623   (eval $ac_compile) 2>&5
13624   ac_status=$?
13625   echo "$as_me:13625: \$? = $ac_status" >&5
13626   (exit "$ac_status"); } &&
13627          { ac_try='test -s "conftest.$ac_objext"'
13628   { (eval echo "$as_me:13628: \"$ac_try\"") >&5
13629   (eval $ac_try) 2>&5
13630   ac_status=$?
13631   echo "$as_me:13631: \$? = $ac_status" >&5
13632   (exit "$ac_status"); }; }; then
13633   ac_cv_sys_largefile_source=1; break
13634 else
13635   echo "$as_me: failed program was:" >&5
13636 cat "conftest.$ac_ext" >&5
13637 fi
13638 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13639   break
13640 done
13641 fi
13642 echo "$as_me:13642: result: $ac_cv_sys_largefile_source" >&5
13643 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
13644 if test "$ac_cv_sys_largefile_source" != no; then
13645
13646 cat >>confdefs.h <<EOF
13647 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
13648 EOF
13649
13650 fi
13651 rm -rf conftest*
13652
13653 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
13654 # in glibc 2.1.3, but that breaks too many other things.
13655 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
13656 echo "$as_me:13656: checking for fseeko" >&5
13657 echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
13658 if test "${ac_cv_func_fseeko+set}" = set; then
13659   echo $ECHO_N "(cached) $ECHO_C" >&6
13660 else
13661   cat >"conftest.$ac_ext" <<_ACEOF
13662 #line 13662 "configure"
13663 #include "confdefs.h"
13664 #include <stdio.h>
13665 int
13666 main (void)
13667 {
13668 return fseeko && fseeko (stdin, 0, 0);
13669   ;
13670   return 0;
13671 }
13672 _ACEOF
13673 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13674 if { (eval echo "$as_me:13674: \"$ac_link\"") >&5
13675   (eval $ac_link) 2>&5
13676   ac_status=$?
13677   echo "$as_me:13677: \$? = $ac_status" >&5
13678   (exit "$ac_status"); } &&
13679          { ac_try='test -s "conftest$ac_exeext"'
13680   { (eval echo "$as_me:13680: \"$ac_try\"") >&5
13681   (eval $ac_try) 2>&5
13682   ac_status=$?
13683   echo "$as_me:13683: \$? = $ac_status" >&5
13684   (exit "$ac_status"); }; }; then
13685   ac_cv_func_fseeko=yes
13686 else
13687   echo "$as_me: failed program was:" >&5
13688 cat "conftest.$ac_ext" >&5
13689 ac_cv_func_fseeko=no
13690 fi
13691 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13692 fi
13693 echo "$as_me:13693: result: $ac_cv_func_fseeko" >&5
13694 echo "${ECHO_T}$ac_cv_func_fseeko" >&6
13695 if test $ac_cv_func_fseeko = yes; then
13696
13697 cat >>confdefs.h <<\EOF
13698 #define HAVE_FSEEKO 1
13699 EOF
13700
13701 fi
13702
13703         # Normally we would collect these definitions in the config.h,
13704         # but (like _XOPEN_SOURCE), some environments rely on having these
13705         # defined before any of the system headers are included.  Another
13706         # case comes up with C++, e.g., on AIX the compiler compiles the
13707         # header files by themselves before looking at the body files it is
13708         # told to compile.  For ncurses, those header files do not include
13709         # the config.h
13710         if test "$ac_cv_sys_large_files" != no
13711         then
13712
13713         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13714         CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
13715
13716         fi
13717         if test "$ac_cv_sys_largefile_source" != no
13718         then
13719
13720         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13721         CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
13722
13723         fi
13724         if test "$ac_cv_sys_file_offset_bits" != no
13725         then
13726
13727         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13728         CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
13729
13730         fi
13731
13732         echo "$as_me:13732: checking whether to use struct dirent64" >&5
13733 echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
13734 if test "${cf_cv_struct_dirent64+set}" = set; then
13735   echo $ECHO_N "(cached) $ECHO_C" >&6
13736 else
13737
13738                 cat >"conftest.$ac_ext" <<_ACEOF
13739 #line 13739 "configure"
13740 #include "confdefs.h"
13741
13742 #pragma GCC diagnostic error "-Wincompatible-pointer-types"
13743 #include <sys/types.h>
13744 #include <dirent.h>
13745
13746 int
13747 main (void)
13748 {
13749
13750                 /* if transitional largefile support is setup, this is true */
13751                 extern struct dirent64 * readdir(DIR *);
13752                 struct dirent64 *x = readdir((DIR *)0);
13753                 struct dirent *y = readdir((DIR *)0);
13754                 int z = x - y;
13755                 (void)z;
13756
13757   ;
13758   return 0;
13759 }
13760 _ACEOF
13761 rm -f "conftest.$ac_objext"
13762 if { (eval echo "$as_me:13762: \"$ac_compile\"") >&5
13763   (eval $ac_compile) 2>&5
13764   ac_status=$?
13765   echo "$as_me:13765: \$? = $ac_status" >&5
13766   (exit "$ac_status"); } &&
13767          { ac_try='test -s "conftest.$ac_objext"'
13768   { (eval echo "$as_me:13768: \"$ac_try\"") >&5
13769   (eval $ac_try) 2>&5
13770   ac_status=$?
13771   echo "$as_me:13771: \$? = $ac_status" >&5
13772   (exit "$ac_status"); }; }; then
13773   cf_cv_struct_dirent64=yes
13774 else
13775   echo "$as_me: failed program was:" >&5
13776 cat "conftest.$ac_ext" >&5
13777 cf_cv_struct_dirent64=no
13778 fi
13779 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13780
13781 fi
13782 echo "$as_me:13782: result: $cf_cv_struct_dirent64" >&5
13783 echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
13784         test "$cf_cv_struct_dirent64" = yes &&
13785 cat >>confdefs.h <<\EOF
13786 #define HAVE_STRUCT_DIRENT64 1
13787 EOF
13788
13789         fi
13790
13791 ###   use option --disable-tparm-varargs to make tparm() conform to X/Open
13792 echo "$as_me:13792: checking if you want tparm not to use X/Open fixed-parameter list" >&5
13793 echo $ECHO_N "checking if you want tparm not to use X/Open fixed-parameter list... $ECHO_C" >&6
13794
13795 # Check whether --enable-tparm-varargs or --disable-tparm-varargs was given.
13796 if test "${enable_tparm_varargs+set}" = set; then
13797   enableval="$enable_tparm_varargs"
13798   with_tparm_varargs=$enableval
13799 else
13800   with_tparm_varargs=yes
13801 fi;
13802 echo "$as_me:13802: result: $with_tparm_varargs" >&5
13803 echo "${ECHO_T}$with_tparm_varargs" >&6
13804 NCURSES_TPARM_VARARGS=0
13805 test "x$with_tparm_varargs" = xyes && NCURSES_TPARM_VARARGS=1
13806
13807 ###   use option --disable-tic-depends to make libtic not explicitly depend on ncurses/ncursesw
13808 if test "$with_ticlib" != no ; then
13809 echo "$as_me:13809: checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library" >&5
13810 echo $ECHO_N "checking if you want tic library to use explicit dependency on ncurses$LIB_SUFFIX library... $ECHO_C" >&6
13811
13812 # Check whether --enable-tic-depends or --disable-tic-depends was given.
13813 if test "${enable_tic_depends+set}" = set; then
13814   enableval="$enable_tic_depends"
13815   with_tic_depends=$enableval
13816 else
13817   with_tic_depends=yes
13818 fi;
13819 echo "$as_me:13819: result: $with_tic_depends" >&5
13820 echo "${ECHO_T}$with_tic_depends" >&6
13821 else
13822         with_tic_depends=no
13823 fi
13824
13825 ###   use option --enable-wattr-macros to enable wattr* macros in curses.h
13826 echo "$as_me:13826: checking if you want to enable wattr* macros" >&5
13827 echo $ECHO_N "checking if you want to enable wattr* macros... $ECHO_C" >&6
13828
13829 # Check whether --enable-wattr-macros or --disable-wattr-macros was given.
13830 if test "${enable_wattr_macros+set}" = set; then
13831   enableval="$enable_wattr_macros"
13832   with_wattr_macros=$enableval
13833 else
13834   with_wattr_macros=no
13835 fi;
13836 if [ "x$with_wattr_macros" != xyes ]; then
13837         NCURSES_WATTR_MACROS=0
13838         echo "$as_me:13838: result: no" >&5
13839 echo "${ECHO_T}no" >&6
13840 else
13841         NCURSES_WATTR_MACROS=1
13842         echo "$as_me:13842: result: yes" >&5
13843 echo "${ECHO_T}yes" >&6
13844 fi
13845
13846 echo "$as_me:13846: checking for X11 rgb file" >&5
13847 echo $ECHO_N "checking for X11 rgb file... $ECHO_C" >&6
13848
13849 # Check whether --with-x11-rgb or --without-x11-rgb was given.
13850 if test "${with_x11_rgb+set}" = set; then
13851   withval="$with_x11_rgb"
13852   RGB_PATH=$withval
13853 else
13854   RGB_PATH=auto
13855 fi;
13856
13857 if test "x$RGB_PATH" = xauto
13858 then
13859         RGB_PATH='${exec_prefix}/lib/X11/rgb.txt'
13860         for cf_path in \
13861                 /opt/local/share/X11/rgb.txt \
13862                 /opt/X11/share/X11/rgb.txt \
13863                 /usr/share/X11/rgb.txt \
13864                 /usr/X11/share/X11/rgb.txt \
13865                 /usr/X11/lib/X11/rgb.txt \
13866                 /usr/lib/X11/rgb.txt \
13867                 /etc/X11/rgb.txt \
13868                 /usr/pkg/lib/X11/rgb.txt \
13869                 /usr/X11R7/lib/X11/rgb.txt \
13870                 /usr/X11R6/lib/X11/rgb.txt \
13871                 /usr/X11R5/lib/X11/rgb.txt \
13872                 /usr/X11R4/lib/X11/rgb.txt \
13873                 /usr/local/lib/X11/rgb.txt \
13874                 /usr/local/share/X11/rgb.txt \
13875                 /usr/lib64/X11/rgb.txt
13876         do
13877                 if test -f "$cf_path" ; then
13878                         RGB_PATH="$cf_path"
13879                         break
13880                 fi
13881         done
13882 else
13883         cf_path=$RGB_PATH
13884
13885 if test "x$prefix" != xNONE; then
13886         cf_path_syntax="$prefix"
13887 else
13888         cf_path_syntax="$ac_default_prefix"
13889 fi
13890
13891 case ".$cf_path" in
13892 (.\$\(*\)*|.\'*\'*)
13893         ;;
13894 (..|./*|.\\*)
13895         ;;
13896 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
13897         ;;
13898 (.\$\{*prefix\}*|.\$\{*dir\}*)
13899         eval cf_path="$cf_path"
13900         case ".$cf_path" in
13901         (.NONE/*)
13902                 cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13903                 ;;
13904         esac
13905         ;;
13906 (.no|.NONE/*)
13907         cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
13908         ;;
13909 (*)
13910         { { echo "$as_me:13910: error: expected a pathname, not \"$cf_path\"" >&5
13911 echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
13912    { (exit 1); exit 1; }; }
13913         ;;
13914 esac
13915
13916 fi
13917
13918 echo "$as_me:13918: result: $RGB_PATH" >&5
13919 echo "${ECHO_T}$RGB_PATH" >&6
13920
13921 cat >>confdefs.h <<EOF
13922 #define RGB_PATH "$cf_path"
13923 EOF
13924
13925 no_x11_rgb=
13926 if test "$RGB_PATH" = no
13927 then
13928         no_x11_rgb="#"
13929 fi
13930
13931 ###   use option --with-bool to override bool's type
13932 echo "$as_me:13932: checking for type of bool" >&5
13933 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
13934
13935 # Check whether --with-bool or --without-bool was given.
13936 if test "${with_bool+set}" = set; then
13937   withval="$with_bool"
13938   NCURSES_BOOL="$withval"
13939 else
13940   NCURSES_BOOL=auto
13941 fi;
13942 echo "$as_me:13942: result: $NCURSES_BOOL" >&5
13943 echo "${ECHO_T}$NCURSES_BOOL" >&6
13944
13945 echo "$as_me:13945: checking for alternate terminal capabilities file" >&5
13946 echo $ECHO_N "checking for alternate terminal capabilities file... $ECHO_C" >&6
13947
13948 # Check whether --with-caps or --without-caps was given.
13949 if test "${with_caps+set}" = set; then
13950   withval="$with_caps"
13951   TERMINFO_CAPS=Caps.$withval
13952 else
13953   TERMINFO_CAPS=Caps
13954 fi;
13955 test -f "${srcdir}/include/${TERMINFO_CAPS}" || TERMINFO_CAPS=Caps
13956 echo "$as_me:13956: result: $TERMINFO_CAPS" >&5
13957 echo "${ECHO_T}$TERMINFO_CAPS" >&6
13958
13959 ###   use option --with-chtype to override chtype's type
13960 echo "$as_me:13960: checking for type of chtype" >&5
13961 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
13962
13963 # Check whether --with-chtype or --without-chtype was given.
13964 if test "${with_chtype+set}" = set; then
13965   withval="$with_chtype"
13966   NCURSES_CHTYPE="$withval"
13967 else
13968   NCURSES_CHTYPE=$cf_dft_chtype
13969 fi;
13970 echo "$as_me:13970: result: $NCURSES_CHTYPE" >&5
13971 echo "${ECHO_T}$NCURSES_CHTYPE" >&6
13972
13973 ###   use option --with-ospeed to override ospeed's type
13974 echo "$as_me:13974: checking for type of ospeed" >&5
13975 echo $ECHO_N "checking for type of ospeed... $ECHO_C" >&6
13976
13977 # Check whether --with-ospeed or --without-ospeed was given.
13978 if test "${with_ospeed+set}" = set; then
13979   withval="$with_ospeed"
13980   NCURSES_OSPEED="$withval"
13981 else
13982   NCURSES_OSPEED=short
13983 fi;
13984 echo "$as_me:13984: result: $NCURSES_OSPEED" >&5
13985 echo "${ECHO_T}$NCURSES_OSPEED" >&6
13986
13987 ###   use option --with-mmask-t to override mmask_t's type
13988 echo "$as_me:13988: checking for type of mmask_t" >&5
13989 echo $ECHO_N "checking for type of mmask_t... $ECHO_C" >&6
13990
13991 # Check whether --with-mmask-t or --without-mmask-t was given.
13992 if test "${with_mmask_t+set}" = set; then
13993   withval="$with_mmask_t"
13994   NCURSES_MMASK_T="$withval"
13995 else
13996   NCURSES_MMASK_T=$cf_dft_mmask_t
13997 fi;
13998 echo "$as_me:13998: result: $NCURSES_MMASK_T" >&5
13999 echo "${ECHO_T}$NCURSES_MMASK_T" >&6
14000
14001 ###   use option --with-ccharw-max to override CCHARW_MAX size
14002 echo "$as_me:14002: checking for size CCHARW_MAX" >&5
14003 echo $ECHO_N "checking for size CCHARW_MAX... $ECHO_C" >&6
14004
14005 # Check whether --with-ccharw-max or --without-ccharw-max was given.
14006 if test "${with_ccharw_max+set}" = set; then
14007   withval="$with_ccharw_max"
14008   NCURSES_CCHARW_MAX="$withval"
14009 else
14010   NCURSES_CCHARW_MAX=5
14011 fi;
14012 echo "$as_me:14012: result: $NCURSES_CCHARW_MAX" >&5
14013 echo "${ECHO_T}$NCURSES_CCHARW_MAX" >&6
14014
14015 echo "$as_me:14015: checking for ANSI C header files" >&5
14016 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
14017 if test "${ac_cv_header_stdc+set}" = set; then
14018   echo $ECHO_N "(cached) $ECHO_C" >&6
14019 else
14020   cat >"conftest.$ac_ext" <<_ACEOF
14021 #line 14021 "configure"
14022 #include "confdefs.h"
14023 #include <stdlib.h>
14024 #include <stdarg.h>
14025 #include <string.h>
14026 #include <float.h>
14027
14028 _ACEOF
14029 if { (eval echo "$as_me:14029: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14030   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14031   ac_status=$?
14032   $EGREP -v '^ *\+' conftest.er1 >conftest.err
14033   rm -f conftest.er1
14034   cat conftest.err >&5
14035   echo "$as_me:14035: \$? = $ac_status" >&5
14036   (exit "$ac_status"); } >/dev/null; then
14037   if test -s conftest.err; then
14038     ac_cpp_err=$ac_c_preproc_warn_flag
14039   else
14040     ac_cpp_err=
14041   fi
14042 else
14043   ac_cpp_err=yes
14044 fi
14045 if test -z "$ac_cpp_err"; then
14046   ac_cv_header_stdc=yes
14047 else
14048   echo "$as_me: failed program was:" >&5
14049   cat "conftest.$ac_ext" >&5
14050   ac_cv_header_stdc=no
14051 fi
14052 rm -f conftest.err "conftest.$ac_ext"
14053
14054 if test $ac_cv_header_stdc = yes; then
14055   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
14056   cat >"conftest.$ac_ext" <<_ACEOF
14057 #line 14057 "configure"
14058 #include "confdefs.h"
14059 #include <string.h>
14060
14061 _ACEOF
14062 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14063   $EGREP "memchr" >/dev/null 2>&1; then
14064   :
14065 else
14066   ac_cv_header_stdc=no
14067 fi
14068 rm -rf conftest*
14069
14070 fi
14071
14072 if test $ac_cv_header_stdc = yes; then
14073   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
14074   cat >"conftest.$ac_ext" <<_ACEOF
14075 #line 14075 "configure"
14076 #include "confdefs.h"
14077 #include <stdlib.h>
14078
14079 _ACEOF
14080 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14081   $EGREP "free" >/dev/null 2>&1; then
14082   :
14083 else
14084   ac_cv_header_stdc=no
14085 fi
14086 rm -rf conftest*
14087
14088 fi
14089
14090 if test $ac_cv_header_stdc = yes; then
14091   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
14092   if test "$cross_compiling" = yes; then
14093   :
14094 else
14095   cat >"conftest.$ac_ext" <<_ACEOF
14096 #line 14096 "configure"
14097 #include "confdefs.h"
14098 #include <ctype.h>
14099 #if ((' ' & 0x0FF) == 0x020)
14100 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
14101 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
14102 #else
14103 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
14104                      || ('j' <= (c) && (c) <= 'r') \
14105                      || ('s' <= (c) && (c) <= 'z'))
14106 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
14107 #endif
14108
14109 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
14110 int
14111 main (void)
14112 {
14113   int i;
14114   for (i = 0; i < 256; i++)
14115     if (XOR (islower (i), ISLOWER (i))
14116         || toupper (i) != TOUPPER (i))
14117       $ac_main_return(2);
14118   $ac_main_return (0);
14119 }
14120 _ACEOF
14121 rm -f "conftest$ac_exeext"
14122 if { (eval echo "$as_me:14122: \"$ac_link\"") >&5
14123   (eval $ac_link) 2>&5
14124   ac_status=$?
14125   echo "$as_me:14125: \$? = $ac_status" >&5
14126   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14127   { (eval echo "$as_me:14127: \"$ac_try\"") >&5
14128   (eval $ac_try) 2>&5
14129   ac_status=$?
14130   echo "$as_me:14130: \$? = $ac_status" >&5
14131   (exit "$ac_status"); }; }; then
14132   :
14133 else
14134   echo "$as_me: program exited with status $ac_status" >&5
14135 echo "$as_me: failed program was:" >&5
14136 cat "conftest.$ac_ext" >&5
14137 ac_cv_header_stdc=no
14138 fi
14139 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14140 fi
14141 fi
14142 fi
14143 echo "$as_me:14143: result: $ac_cv_header_stdc" >&5
14144 echo "${ECHO_T}$ac_cv_header_stdc" >&6
14145 if test $ac_cv_header_stdc = yes; then
14146
14147 cat >>confdefs.h <<\EOF
14148 #define STDC_HEADERS 1
14149 EOF
14150
14151 fi
14152
14153 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
14154
14155 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
14156                   inttypes.h stdint.h unistd.h
14157 do
14158 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14159 echo "$as_me:14159: checking for $ac_header" >&5
14160 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14161 if eval "test \"\${$as_ac_Header+set}\" = set"; then
14162   echo $ECHO_N "(cached) $ECHO_C" >&6
14163 else
14164   cat >"conftest.$ac_ext" <<_ACEOF
14165 #line 14165 "configure"
14166 #include "confdefs.h"
14167 $ac_includes_default
14168 #include <$ac_header>
14169 _ACEOF
14170 rm -f "conftest.$ac_objext"
14171 if { (eval echo "$as_me:14171: \"$ac_compile\"") >&5
14172   (eval $ac_compile) 2>&5
14173   ac_status=$?
14174   echo "$as_me:14174: \$? = $ac_status" >&5
14175   (exit "$ac_status"); } &&
14176          { ac_try='test -s "conftest.$ac_objext"'
14177   { (eval echo "$as_me:14177: \"$ac_try\"") >&5
14178   (eval $ac_try) 2>&5
14179   ac_status=$?
14180   echo "$as_me:14180: \$? = $ac_status" >&5
14181   (exit "$ac_status"); }; }; then
14182   eval "$as_ac_Header=yes"
14183 else
14184   echo "$as_me: failed program was:" >&5
14185 cat "conftest.$ac_ext" >&5
14186 eval "$as_ac_Header=no"
14187 fi
14188 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14189 fi
14190 echo "$as_me:14190: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14191 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14192 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14193   cat >>confdefs.h <<EOF
14194 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14195 EOF
14196
14197 fi
14198 done
14199
14200 echo "$as_me:14200: checking for signed char" >&5
14201 echo $ECHO_N "checking for signed char... $ECHO_C" >&6
14202 if test "${ac_cv_type_signed_char+set}" = set; then
14203   echo $ECHO_N "(cached) $ECHO_C" >&6
14204 else
14205   cat >"conftest.$ac_ext" <<_ACEOF
14206 #line 14206 "configure"
14207 #include "confdefs.h"
14208 $ac_includes_default
14209 int
14210 main (void)
14211 {
14212 if ((signed char *) 0)
14213   return 0;
14214 if (sizeof (signed char))
14215   return 0;
14216   ;
14217   return 0;
14218 }
14219 _ACEOF
14220 rm -f "conftest.$ac_objext"
14221 if { (eval echo "$as_me:14221: \"$ac_compile\"") >&5
14222   (eval $ac_compile) 2>&5
14223   ac_status=$?
14224   echo "$as_me:14224: \$? = $ac_status" >&5
14225   (exit "$ac_status"); } &&
14226          { ac_try='test -s "conftest.$ac_objext"'
14227   { (eval echo "$as_me:14227: \"$ac_try\"") >&5
14228   (eval $ac_try) 2>&5
14229   ac_status=$?
14230   echo "$as_me:14230: \$? = $ac_status" >&5
14231   (exit "$ac_status"); }; }; then
14232   ac_cv_type_signed_char=yes
14233 else
14234   echo "$as_me: failed program was:" >&5
14235 cat "conftest.$ac_ext" >&5
14236 ac_cv_type_signed_char=no
14237 fi
14238 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14239 fi
14240 echo "$as_me:14240: result: $ac_cv_type_signed_char" >&5
14241 echo "${ECHO_T}$ac_cv_type_signed_char" >&6
14242
14243 echo "$as_me:14243: checking size of signed char" >&5
14244 echo $ECHO_N "checking size of signed char... $ECHO_C" >&6
14245 if test "${ac_cv_sizeof_signed_char+set}" = set; then
14246   echo $ECHO_N "(cached) $ECHO_C" >&6
14247 else
14248   if test "$ac_cv_type_signed_char" = yes; then
14249   if test "$cross_compiling" = yes; then
14250   # Depending upon the size, compute the lo and hi bounds.
14251 cat >"conftest.$ac_ext" <<_ACEOF
14252 #line 14252 "configure"
14253 #include "confdefs.h"
14254 $ac_includes_default
14255 int
14256 main (void)
14257 {
14258 int _array_ [1 - 2 * !((sizeof (signed char)) >= 0)]
14259   ;
14260   return 0;
14261 }
14262 _ACEOF
14263 rm -f "conftest.$ac_objext"
14264 if { (eval echo "$as_me:14264: \"$ac_compile\"") >&5
14265   (eval $ac_compile) 2>&5
14266   ac_status=$?
14267   echo "$as_me:14267: \$? = $ac_status" >&5
14268   (exit "$ac_status"); } &&
14269          { ac_try='test -s "conftest.$ac_objext"'
14270   { (eval echo "$as_me:14270: \"$ac_try\"") >&5
14271   (eval $ac_try) 2>&5
14272   ac_status=$?
14273   echo "$as_me:14273: \$? = $ac_status" >&5
14274   (exit "$ac_status"); }; }; then
14275   ac_lo=0 ac_mid=0
14276   while :; do
14277     cat >"conftest.$ac_ext" <<_ACEOF
14278 #line 14278 "configure"
14279 #include "confdefs.h"
14280 $ac_includes_default
14281 int
14282 main (void)
14283 {
14284 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14285   ;
14286   return 0;
14287 }
14288 _ACEOF
14289 rm -f "conftest.$ac_objext"
14290 if { (eval echo "$as_me:14290: \"$ac_compile\"") >&5
14291   (eval $ac_compile) 2>&5
14292   ac_status=$?
14293   echo "$as_me:14293: \$? = $ac_status" >&5
14294   (exit "$ac_status"); } &&
14295          { ac_try='test -s "conftest.$ac_objext"'
14296   { (eval echo "$as_me:14296: \"$ac_try\"") >&5
14297   (eval $ac_try) 2>&5
14298   ac_status=$?
14299   echo "$as_me:14299: \$? = $ac_status" >&5
14300   (exit "$ac_status"); }; }; then
14301   ac_hi=$ac_mid; break
14302 else
14303   echo "$as_me: failed program was:" >&5
14304 cat "conftest.$ac_ext" >&5
14305 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
14306 fi
14307 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14308   done
14309 else
14310   echo "$as_me: failed program was:" >&5
14311 cat "conftest.$ac_ext" >&5
14312 ac_hi=-1 ac_mid=-1
14313   while :; do
14314     cat >"conftest.$ac_ext" <<_ACEOF
14315 #line 14315 "configure"
14316 #include "confdefs.h"
14317 $ac_includes_default
14318 int
14319 main (void)
14320 {
14321 int _array_ [1 - 2 * !((sizeof (signed char)) >= $ac_mid)]
14322   ;
14323   return 0;
14324 }
14325 _ACEOF
14326 rm -f "conftest.$ac_objext"
14327 if { (eval echo "$as_me:14327: \"$ac_compile\"") >&5
14328   (eval $ac_compile) 2>&5
14329   ac_status=$?
14330   echo "$as_me:14330: \$? = $ac_status" >&5
14331   (exit "$ac_status"); } &&
14332          { ac_try='test -s "conftest.$ac_objext"'
14333   { (eval echo "$as_me:14333: \"$ac_try\"") >&5
14334   (eval $ac_try) 2>&5
14335   ac_status=$?
14336   echo "$as_me:14336: \$? = $ac_status" >&5
14337   (exit "$ac_status"); }; }; then
14338   ac_lo=$ac_mid; break
14339 else
14340   echo "$as_me: failed program was:" >&5
14341 cat "conftest.$ac_ext" >&5
14342 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
14343 fi
14344 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14345   done
14346 fi
14347 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14348 # Binary search between lo and hi bounds.
14349 while test "x$ac_lo" != "x$ac_hi"; do
14350   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
14351   cat >"conftest.$ac_ext" <<_ACEOF
14352 #line 14352 "configure"
14353 #include "confdefs.h"
14354 $ac_includes_default
14355 int
14356 main (void)
14357 {
14358 int _array_ [1 - 2 * !((sizeof (signed char)) <= $ac_mid)]
14359   ;
14360   return 0;
14361 }
14362 _ACEOF
14363 rm -f "conftest.$ac_objext"
14364 if { (eval echo "$as_me:14364: \"$ac_compile\"") >&5
14365   (eval $ac_compile) 2>&5
14366   ac_status=$?
14367   echo "$as_me:14367: \$? = $ac_status" >&5
14368   (exit "$ac_status"); } &&
14369          { ac_try='test -s "conftest.$ac_objext"'
14370   { (eval echo "$as_me:14370: \"$ac_try\"") >&5
14371   (eval $ac_try) 2>&5
14372   ac_status=$?
14373   echo "$as_me:14373: \$? = $ac_status" >&5
14374   (exit "$ac_status"); }; }; then
14375   ac_hi=$ac_mid
14376 else
14377   echo "$as_me: failed program was:" >&5
14378 cat "conftest.$ac_ext" >&5
14379 ac_lo=`expr "$ac_mid" + 1`
14380 fi
14381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14382 done
14383 ac_cv_sizeof_signed_char=$ac_lo
14384 else
14385   if test "$cross_compiling" = yes; then
14386   { { echo "$as_me:14386: error: cannot run test program while cross compiling" >&5
14387 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14388    { (exit 1); exit 1; }; }
14389 else
14390   cat >"conftest.$ac_ext" <<_ACEOF
14391 #line 14391 "configure"
14392 #include "confdefs.h"
14393 $ac_includes_default
14394 int
14395 main (void)
14396 {
14397 FILE *f = fopen ("conftest.val", "w");
14398 if (!f)
14399   $ac_main_return (1);
14400 fprintf (f, "%ld", (long)(sizeof (signed char)));
14401 fclose (f);
14402   ;
14403   return 0;
14404 }
14405 _ACEOF
14406 rm -f "conftest$ac_exeext"
14407 if { (eval echo "$as_me:14407: \"$ac_link\"") >&5
14408   (eval $ac_link) 2>&5
14409   ac_status=$?
14410   echo "$as_me:14410: \$? = $ac_status" >&5
14411   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
14412   { (eval echo "$as_me:14412: \"$ac_try\"") >&5
14413   (eval $ac_try) 2>&5
14414   ac_status=$?
14415   echo "$as_me:14415: \$? = $ac_status" >&5
14416   (exit "$ac_status"); }; }; then
14417   ac_cv_sizeof_signed_char=`cat conftest.val`
14418 else
14419   echo "$as_me: program exited with status $ac_status" >&5
14420 echo "$as_me: failed program was:" >&5
14421 cat "conftest.$ac_ext" >&5
14422 fi
14423 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
14424 fi
14425 fi
14426 rm -f conftest.val
14427 else
14428   ac_cv_sizeof_signed_char=0
14429 fi
14430 fi
14431 echo "$as_me:14431: result: $ac_cv_sizeof_signed_char" >&5
14432 echo "${ECHO_T}$ac_cv_sizeof_signed_char" >&6
14433 cat >>confdefs.h <<EOF
14434 #define SIZEOF_SIGNED_CHAR $ac_cv_sizeof_signed_char
14435 EOF
14436
14437 if test "$ac_cv_sizeof_signed_char" = 1 ; then
14438         NCURSES_SBOOL="signed char"
14439 else
14440         NCURSES_SBOOL="char"
14441 fi
14442 echo "$as_me:14442: checking if you want to use signed Boolean array in term.h" >&5
14443 echo $ECHO_N "checking if you want to use signed Boolean array in term.h... $ECHO_C" >&6
14444
14445 # Check whether --enable-signed-char or --disable-signed-char was given.
14446 if test "${enable_signed_char+set}" = set; then
14447   enableval="$enable_signed_char"
14448   with_signed_char=$enableval
14449 else
14450   with_signed_char=no
14451 fi;
14452 echo "$as_me:14452: result: $with_signed_char" >&5
14453 echo "${ECHO_T}$with_signed_char" >&6
14454 test "x$with_signed_char" != xyes && NCURSES_SBOOL="char"
14455
14456 ###   use option --with-tparm-arg to override tparm's argument type
14457 echo "$as_me:14457: checking for type of tparm args" >&5
14458 echo $ECHO_N "checking for type of tparm args... $ECHO_C" >&6
14459
14460 # Check whether --with-tparm-arg or --without-tparm-arg was given.
14461 if test "${with_tparm_arg+set}" = set; then
14462   withval="$with_tparm_arg"
14463   NCURSES_TPARM_ARG="$withval"
14464 else
14465   NCURSES_TPARM_ARG=$cf_dft_tparm_arg
14466 fi;
14467 echo "$as_me:14467: result: $NCURSES_TPARM_ARG" >&5
14468 echo "${ECHO_T}$NCURSES_TPARM_ARG" >&6
14469
14470 ### Enable compiling-in rcs id's
14471 echo "$as_me:14471: checking if RCS identifiers should be compiled-in" >&5
14472 echo $ECHO_N "checking if RCS identifiers should be compiled-in... $ECHO_C" >&6
14473
14474 # Check whether --with-rcs-ids or --without-rcs-ids was given.
14475 if test "${with_rcs_ids+set}" = set; then
14476   withval="$with_rcs_ids"
14477   with_rcs_ids=$withval
14478 else
14479   with_rcs_ids=no
14480 fi;
14481 echo "$as_me:14481: result: $with_rcs_ids" >&5
14482 echo "${ECHO_T}$with_rcs_ids" >&6
14483 test "x$with_rcs_ids" = xyes &&
14484 cat >>confdefs.h <<\EOF
14485 #define USE_RCS_IDS 1
14486 EOF
14487
14488 ###############################################################################
14489
14490 echo "$as_me:14490: checking format of man-pages" >&5
14491 echo $ECHO_N "checking format of man-pages... $ECHO_C" >&6
14492
14493 # Check whether --with-manpage-format or --without-manpage-format was given.
14494 if test "${with_manpage_format+set}" = set; then
14495   withval="$with_manpage_format"
14496   MANPAGE_FORMAT=$withval
14497 else
14498   MANPAGE_FORMAT=unknown
14499 fi;
14500
14501 test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=unknown
14502 MANPAGE_FORMAT=`echo "$MANPAGE_FORMAT" | sed -e 's/,/ /g'`
14503
14504 cf_unknown=
14505
14506 case "$MANPAGE_FORMAT" in
14507 (unknown)
14508         if test -z "$MANPATH" ; then
14509                 MANPATH="/usr/man:/usr/share/man"
14510         fi
14511
14512         # look for the 'date' man-page (it is most likely to be installed!)
14513         MANPAGE_FORMAT=
14514         cf_preform="no"
14515         cf_catonly="yes"
14516         cf_example="date"
14517
14518         IFS="${IFS:-    }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
14519         for cf_dir in $MANPATH; do
14520                 test -z "$cf_dir" && cf_dir=/usr/man
14521                 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
14522                 do
14523                         cf_test=`echo "$cf_name" | sed -e 's/*//'`
14524                         if test "x$cf_test" = "x$cf_name" ; then
14525
14526                                 case "$cf_name" in
14527                                 (*.gz) MANPAGE_FORMAT="$MANPAGE_FORMAT gzip";;
14528                                 (*.Z)  MANPAGE_FORMAT="$MANPAGE_FORMAT compress";;
14529                                 (*.0)  MANPAGE_FORMAT="$MANPAGE_FORMAT BSDI";;
14530                                 (*)    MANPAGE_FORMAT="$MANPAGE_FORMAT normal";;
14531                                 esac
14532
14533                                 case "$cf_name" in
14534                                 ($cf_dir/man*)
14535                                         cf_catonly=no
14536                                         ;;
14537                                 ($cf_dir/cat*)
14538                                         cf_preform=yes
14539                                         ;;
14540                                 esac
14541                                 break
14542                         fi
14543
14544                         # if we found a match in either man* or cat*, stop looking
14545                         if test -n "$MANPAGE_FORMAT" ; then
14546                                 cf_found=no
14547                                 test "$cf_preform" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT formatted"
14548                                 test "$cf_catonly" = yes && MANPAGE_FORMAT="$MANPAGE_FORMAT catonly"
14549                                 case "$cf_name" in
14550                                 ($cf_dir/cat*)
14551                                         cf_found=yes
14552                                         ;;
14553                                 esac
14554                                 test "$cf_found" = yes && break
14555                         fi
14556                 done
14557                 # only check the first directory in $MANPATH where we find manpages
14558                 if test -n "$MANPAGE_FORMAT" ; then
14559                         break
14560                 fi
14561         done
14562         # if we did not find the example, just assume it is normal
14563         test -z "$MANPAGE_FORMAT" && MANPAGE_FORMAT=normal
14564         IFS="$ac_save_ifs"
14565         ;;
14566 (*)
14567         for cf_option in $MANPAGE_FORMAT; do
14568         case "$cf_option" in
14569         (gzip|compress|BSDI|normal|formatted|catonly)
14570                 ;;
14571         (*)
14572                 cf_unknown="$cf_unknown $cf_option"
14573                 ;;
14574         esac
14575         done
14576         ;;
14577 esac
14578
14579 echo "$as_me:14579: result: $MANPAGE_FORMAT" >&5
14580 echo "${ECHO_T}$MANPAGE_FORMAT" >&6
14581 if test -n "$cf_unknown" ; then
14582         { echo "$as_me:14582: WARNING: Unexpected manpage-format $cf_unknown" >&5
14583 echo "$as_me: WARNING: Unexpected manpage-format $cf_unknown" >&2;}
14584 fi
14585
14586 echo "$as_me:14586: checking for manpage renaming" >&5
14587 echo $ECHO_N "checking for manpage renaming... $ECHO_C" >&6
14588
14589 # Check whether --with-manpage-renames or --without-manpage-renames was given.
14590 if test "${with_manpage_renames+set}" = set; then
14591   withval="$with_manpage_renames"
14592   MANPAGE_RENAMES=$withval
14593 else
14594   MANPAGE_RENAMES=yes
14595 fi;
14596
14597 case ".$MANPAGE_RENAMES" in
14598 (.no)
14599         ;;
14600 (.|.yes)
14601         # Debian 'man' program?
14602         if test -f /etc/debian_version ; then
14603                 MANPAGE_RENAMES=`cd "$srcdir" && pwd`/man/man_db.renames
14604         else
14605                 MANPAGE_RENAMES=no
14606         fi
14607         ;;
14608 esac
14609
14610 if test "$MANPAGE_RENAMES" != no ; then
14611         if test -f "$srcdir/man/$MANPAGE_RENAMES" ; then
14612                 MANPAGE_RENAMES=`cd "$srcdir/man" && pwd`/$MANPAGE_RENAMES
14613         elif test ! -f "$MANPAGE_RENAMES" ; then
14614                 { { echo "$as_me:14614: error: not a filename: $MANPAGE_RENAMES" >&5
14615 echo "$as_me: error: not a filename: $MANPAGE_RENAMES" >&2;}
14616    { (exit 1); exit 1; }; }
14617         fi
14618
14619         test ! -d man && mkdir man
14620
14621         # Construct a sed-script to perform renaming within man-pages
14622         if test -n "$MANPAGE_RENAMES" ; then
14623                 test ! -d man && mkdir man
14624                 $SHELL "$srcdir/man/make_sed.sh" "$MANPAGE_RENAMES" >./edit_man.sed
14625         fi
14626 fi
14627
14628 echo "$as_me:14628: result: $MANPAGE_RENAMES" >&5
14629 echo "${ECHO_T}$MANPAGE_RENAMES" >&6
14630
14631 echo "$as_me:14631: checking if manpage aliases will be installed" >&5
14632 echo $ECHO_N "checking if manpage aliases will be installed... $ECHO_C" >&6
14633
14634 # Check whether --with-manpage-aliases or --without-manpage-aliases was given.
14635 if test "${with_manpage_aliases+set}" = set; then
14636   withval="$with_manpage_aliases"
14637   MANPAGE_ALIASES=$withval
14638 else
14639   MANPAGE_ALIASES=yes
14640 fi;
14641
14642 echo "$as_me:14642: result: $MANPAGE_ALIASES" >&5
14643 echo "${ECHO_T}$MANPAGE_ALIASES" >&6
14644
14645 case "x$LN_S" in
14646 (xln*)
14647         cf_use_symlinks=yes
14648         ;;
14649 (*)
14650         cf_use_symlinks=no
14651         ;;
14652 esac
14653
14654 MANPAGE_SYMLINKS=no
14655 if test "$MANPAGE_ALIASES" = yes ; then
14656 echo "$as_me:14656: checking if manpage symlinks should be used" >&5
14657 echo $ECHO_N "checking if manpage symlinks should be used... $ECHO_C" >&6
14658
14659 # Check whether --with-manpage-symlinks or --without-manpage-symlinks was given.
14660 if test "${with_manpage_symlinks+set}" = set; then
14661   withval="$with_manpage_symlinks"
14662   MANPAGE_SYMLINKS=$withval
14663 else
14664   MANPAGE_SYMLINKS=$cf_use_symlinks
14665 fi;
14666
14667 if test "$$cf_use_symlinks" = no; then
14668 if test "$MANPAGE_SYMLINKS" = yes ; then
14669         { echo "$as_me:14669: WARNING: cannot make symlinks" >&5
14670 echo "$as_me: WARNING: cannot make symlinks" >&2;}
14671         MANPAGE_SYMLINKS=no
14672 fi
14673 fi
14674
14675 echo "$as_me:14675: result: $MANPAGE_SYMLINKS" >&5
14676 echo "${ECHO_T}$MANPAGE_SYMLINKS" >&6
14677 fi
14678
14679 echo "$as_me:14679: checking for manpage tbl" >&5
14680 echo $ECHO_N "checking for manpage tbl... $ECHO_C" >&6
14681
14682 # Check whether --with-manpage-tbl or --without-manpage-tbl was given.
14683 if test "${with_manpage_tbl+set}" = set; then
14684   withval="$with_manpage_tbl"
14685   MANPAGE_TBL=$withval
14686 else
14687   MANPAGE_TBL=no
14688 fi;
14689
14690 echo "$as_me:14690: result: $MANPAGE_TBL" >&5
14691 echo "${ECHO_T}$MANPAGE_TBL" >&6
14692
14693 if test "$prefix" = "NONE" ; then
14694         cf_prefix="$ac_default_prefix"
14695 else
14696         cf_prefix="$prefix"
14697 fi
14698
14699 case "$MANPAGE_FORMAT" in
14700 (*catonly*)
14701         cf_format=yes
14702         cf_inboth=no
14703         ;;
14704 (*formatted*)
14705         cf_format=yes
14706         cf_inboth=yes
14707         ;;
14708 (*)
14709         cf_format=no
14710         cf_inboth=no
14711         ;;
14712 esac
14713
14714 test ! -d man && mkdir man
14715
14716 cf_so_strip=
14717 cf_compress=
14718 case "$MANPAGE_FORMAT" in
14719 (*compress*)
14720         cf_so_strip="Z"
14721         cf_compress=compress
14722         ;;
14723 (*gzip*)
14724         cf_so_strip="gz"
14725         cf_compress=gzip
14726         ;;
14727 esac
14728
14729 cf_edit_man=./edit_man.sh
14730 cf_man_alias=`pwd`/man_alias.sed
14731
14732 cat >$cf_edit_man <<CF_EOF
14733 #! $SHELL
14734 # this script is generated by the configure-script CF_MAN_PAGES macro.
14735
14736 prefix="$cf_prefix"
14737 datarootdir="$datarootdir"
14738 datadir="$datadir"
14739
14740 NCURSES_MAJOR="$NCURSES_MAJOR"
14741 NCURSES_MINOR="$NCURSES_MINOR"
14742 NCURSES_PATCH="$NCURSES_PATCH"
14743
14744 NCURSES_OSPEED="$NCURSES_OSPEED"
14745 TERMINFO="$TERMINFO"
14746
14747 INSTALL="$INSTALL"
14748 INSTALL_DATA="$INSTALL_DATA"
14749
14750 transform="$program_transform_name"
14751
14752 TMP=\${TMPDIR:=/tmp}/man\$\$
14753 trap "rm -f \$TMP" 0 1 2 3 15
14754
14755 form=\$1
14756 shift || exit 1
14757
14758 verb=\$1
14759 shift || exit 1
14760
14761 mandir=\$1
14762 shift || exit 1
14763
14764 srcdir=\$1
14765 top_srcdir=\$srcdir/..
14766 shift || exit 1
14767
14768 if test "\$form" = normal ; then
14769         if test "$cf_format" = yes ; then
14770         if test "$cf_inboth" = no ; then
14771                 $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
14772                 exit $?
14773         fi
14774         fi
14775         cf_subdir=\$mandir/man
14776         cf_tables=$MANPAGE_TBL
14777 else
14778         cf_subdir=\$mandir/cat
14779         cf_tables=yes
14780 fi
14781
14782 # process the list of source-files
14783 for i in "\$@" ; do
14784 case \$i in
14785 (*.orig|*.rej) ;;
14786 (*.[0-9]*)
14787         section=\`expr "\$i" : '.*\\.\\([0-9]\\)[xm]*'\`;
14788         if test "\$verb" = installing ; then
14789         if test ! -d "\$cf_subdir\${section}" ; then
14790                 mkdir -p "\$cf_subdir\$section"
14791         fi
14792         fi
14793
14794         # replace variables in man page
14795         if test ! -f "$cf_man_alias" ; then
14796 cat >>$cf_man_alias <<-CF_EOF2
14797                 s,@DATADIR@,\$datadir,g
14798                 s,@TERMINFO@,\${TERMINFO:="no default value"},g
14799                 s,@TERMINFO_DIRS@,\${TERMINFO_DIRS:="no default value"},g
14800                 s,@NCURSES_MAJOR@,\${NCURSES_MAJOR:="no default value"},g
14801                 s,@NCURSES_MINOR@,\${NCURSES_MINOR:="no default value"},g
14802                 s,@NCURSES_PATCH@,\${NCURSES_PATCH:="no default value"},g
14803                 s,@NCURSES_OSPEED@,\${NCURSES_OSPEED:="no default value"},g
14804 CF_EOF
14805
14806         for cf_name in  captoinfo clear infocmp infotocap reset tabs tic toe tput tset
14807         do
14808                 cf_NAME=`echo "$cf_name" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14809                 cf_name=`echo "$cf_name" | sed "$program_transform_name"`
14810 cat >>$cf_edit_man <<-CF_EOF
14811                 s,@$cf_NAME@,$cf_name,g
14812 CF_EOF
14813         done
14814
14815 cat >>$cf_edit_man <<CF_EOF
14816 CF_EOF2
14817                 echo "...made $cf_man_alias"
14818         fi
14819
14820         aliases=
14821         cf_source=\`basename "\$i"\`
14822         inalias=\$cf_source
14823         test ! -f "\$inalias" && inalias="\$srcdir/\$inalias"
14824         if test ! -f "\$inalias" ; then
14825                 echo ".. skipped \$cf_source"
14826                 continue
14827         fi
14828 CF_EOF
14829
14830 if test "$MANPAGE_ALIASES" != no ; then
14831 cat >>$cf_edit_man <<CF_EOF
14832         nCurses=ignore.3x
14833         test "$with_curses_h" = yes && nCurses=ncurses.3x
14834         aliases=\`sed -f "\$top_srcdir/man/manlinks.sed" "\$inalias" |sed -f "$cf_man_alias" | sort -u; test "\$inalias" = "\$nCurses" && echo curses\`
14835 CF_EOF
14836 fi
14837
14838 if test "$MANPAGE_RENAMES" = no ; then
14839 cat >>$cf_edit_man <<CF_EOF
14840         # perform program transformations for section 1 man pages
14841         if test \$section = 1 ; then
14842                 cf_target=\$cf_subdir\${section}/\`echo \$cf_source|sed "\${transform}"\`
14843         else
14844                 cf_target=\$cf_subdir\${section}/\$cf_source
14845         fi
14846 CF_EOF
14847 else
14848 cat >>$cf_edit_man <<CF_EOF
14849         cf_target=\`grep "^\$cf_source" $MANPAGE_RENAMES | $AWK '{print \$2}'\`
14850         if test -z "\$cf_target" ; then
14851                 echo "? missing rename for \$cf_source"
14852                 cf_target="\$cf_source"
14853         fi
14854         cf_target="\$cf_subdir\${section}/\${cf_target}"
14855
14856 CF_EOF
14857 fi
14858
14859 cat >>$cf_edit_man <<CF_EOF
14860         sed     -f "$cf_man_alias" \\
14861 CF_EOF
14862
14863 if test -f "$MANPAGE_RENAMES" ; then
14864 cat >>$cf_edit_man <<CF_EOF
14865                 < "\$i" | sed -f `pwd`/edit_man.sed >\$TMP
14866 CF_EOF
14867 else
14868 cat >>$cf_edit_man <<CF_EOF
14869                 < "\$i" >\$TMP
14870 CF_EOF
14871 fi
14872
14873 cat >>$cf_edit_man <<CF_EOF
14874 if test \$cf_tables = yes ; then
14875         tbl \$TMP >\$TMP.out
14876         mv \$TMP.out \$TMP
14877 fi
14878 CF_EOF
14879
14880 if test "$with_overwrite" != yes ; then
14881 cat >>$cf_edit_man <<CF_EOF
14882         sed -e "/\\#[    ]*include/s,<curses.h,<ncurses$LIB_SUFFIX/curses.h," < \$TMP >\$TMP.out
14883         mv \$TMP.out \$TMP
14884 CF_EOF
14885 fi
14886
14887 if test "$with_curses_h" != yes ; then
14888 cat >>$cf_edit_man <<CF_EOF
14889         sed -e "/\\#[    ]*include/s,curses.h,ncurses.h," < \$TMP >\$TMP.out
14890         mv \$TMP.out \$TMP
14891 CF_EOF
14892 fi
14893
14894 cat >>$cf_edit_man <<CF_EOF
14895         if test "\$form" = format ; then
14896                 nroff -man \$TMP >\$TMP.out
14897                 mv \$TMP.out \$TMP
14898         fi
14899 CF_EOF
14900
14901 if test -n "$cf_compress" ; then
14902 cat >>$cf_edit_man <<CF_EOF
14903         if test "\$verb" = installing ; then
14904         if ( "$cf_compress" -f \$TMP )
14905         then
14906                 mv \$TMP.$cf_so_strip \$TMP
14907         fi
14908         fi
14909         cf_target="\$cf_target.$cf_so_strip"
14910 CF_EOF
14911 fi
14912
14913 case "$MANPAGE_FORMAT" in
14914 (*BSDI*)
14915 cat >>$cf_edit_man <<CF_EOF
14916         if test "\$form" = format ; then
14917                 # BSDI installs only .0 suffixes in the cat directories
14918                 cf_target="\`echo \$cf_target|sed -e 's/\\.[1-9]\\+[a-z]*/.0/'\`"
14919         fi
14920 CF_EOF
14921   ;;
14922 esac
14923
14924 cat >>$cf_edit_man <<CF_EOF
14925         suffix=\`basename "\$cf_target" | sed -e 's%^[^.]*%%'\`
14926         if test "\$verb" = installing ; then
14927                 echo "\$verb \$cf_target"
14928                 \$INSTALL_DATA \$TMP "\$cf_target"
14929                 test -d "\$cf_subdir\${section}" &&
14930                 test -n "\$aliases" && (
14931                         cd "\$cf_subdir\${section}" && (
14932                                 cf_source=\`echo "\$cf_target" |sed -e 's%^.*/\\([^/][^/]*/[^/][^/]*$\\)%\\1%'\`
14933                                 test -n "$cf_so_strip" && cf_source=\`echo "\$cf_source" |sed -e 's%\\.$cf_so_strip\$%%'\`
14934                                 cf_target=\`basename "\$cf_target"\`
14935                                 for cf_alias in \$aliases
14936                                 do
14937                                         if test "\$section" = 1 ; then
14938                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14939                                         fi
14940
14941                                         if test "$MANPAGE_SYMLINKS" = yes ; then
14942                                                 if test -f "\$cf_alias\${suffix}" ; then
14943                                                         if ( cmp -s "\$cf_target" "\$cf_alias\${suffix}" )
14944                                                         then
14945                                                                 continue
14946                                                         fi
14947                                                 fi
14948                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14949 CF_EOF
14950 case "x$LN_S" in
14951 (*-f)
14952 cat >>$cf_edit_man <<CF_EOF
14953                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14954 CF_EOF
14955         ;;
14956 (*)
14957 cat >>$cf_edit_man <<CF_EOF
14958                                                 rm -f "\$cf_alias\${suffix}"
14959                                                 $LN_S "\$cf_target" "\$cf_alias\${suffix}"
14960 CF_EOF
14961         ;;
14962 esac
14963 cat >>$cf_edit_man <<CF_EOF
14964                                         elif test "\$cf_target" != "\$cf_alias\${suffix}" ; then
14965                                                 echo ".so \$cf_source" >\$TMP
14966 CF_EOF
14967 if test -n "$cf_compress" ; then
14968 cat >>$cf_edit_man <<CF_EOF
14969                                                 if test -n "$cf_so_strip" ; then
14970                                                         "$cf_compress" -f \$TMP
14971                                                         mv \$TMP.$cf_so_strip \$TMP
14972                                                 fi
14973 CF_EOF
14974 fi
14975 cat >>$cf_edit_man <<CF_EOF
14976                                                 echo ".. \$verb alias \$cf_alias\${suffix}"
14977                                                 rm -f "\$cf_alias\${suffix}"
14978                                                 \$INSTALL_DATA \$TMP "\$cf_alias\${suffix}"
14979                                         fi
14980                                 done
14981                         )
14982                 )
14983         elif test "\$verb" = removing ; then
14984                 test -f "\$cf_target" && (
14985                         echo "\$verb \$cf_target"
14986                         rm -f "\$cf_target"
14987                 )
14988                 test -d "\$cf_subdir\${section}" &&
14989                 test -n "\$aliases" && (
14990                         cd "\$cf_subdir\${section}" && (
14991                                 for cf_alias in \$aliases
14992                                 do
14993                                         if test "\$section" = 1 ; then
14994                                                 cf_alias=\`echo "\$cf_alias" |sed "\${transform}"\`
14995                                         fi
14996
14997                                         echo ".. \$verb alias \$cf_alias\${suffix}"
14998                                         rm -f "\$cf_alias\${suffix}"
14999                                 done
15000                         )
15001                 )
15002         else
15003 #               echo ".hy 0"
15004                 cat \$TMP
15005         fi
15006         ;;
15007 esac
15008 done
15009
15010 if test "$cf_inboth" = yes ; then
15011 if test "\$form" != format ; then
15012         $SHELL "\$0" format "\$verb" "\$mandir" "\$srcdir" "\$@"
15013 fi
15014 fi
15015
15016 exit 0
15017 CF_EOF
15018 chmod 755 "$cf_edit_man"
15019
15020 ###############################################################################
15021
15022 ### Note that some functions (such as const) are normally disabled anyway.
15023 echo "$as_me:15023: checking if you want to build with function extensions" >&5
15024 echo $ECHO_N "checking if you want to build with function extensions... $ECHO_C" >&6
15025
15026 # Check whether --enable-ext-funcs or --disable-ext-funcs was given.
15027 if test "${enable_ext_funcs+set}" = set; then
15028   enableval="$enable_ext_funcs"
15029   with_ext_funcs=$enableval
15030 else
15031   with_ext_funcs=yes
15032 fi;
15033 echo "$as_me:15033: result: $with_ext_funcs" >&5
15034 echo "${ECHO_T}$with_ext_funcs" >&6
15035 if test "x$with_ext_funcs" = xyes ; then
15036         NCURSES_EXT_FUNCS=1
15037
15038 cat >>confdefs.h <<\EOF
15039 #define NCURSES_EXT_FUNCS 1
15040 EOF
15041
15042 cat >>confdefs.h <<\EOF
15043 #define HAVE_ASSUME_DEFAULT_COLORS 1
15044 EOF
15045
15046 cat >>confdefs.h <<\EOF
15047 #define HAVE_CURSES_VERSION 1
15048 EOF
15049
15050 cat >>confdefs.h <<\EOF
15051 #define HAVE_HAS_KEY 1
15052 EOF
15053
15054 cat >>confdefs.h <<\EOF
15055 #define HAVE_RESIZETERM 1
15056 EOF
15057
15058 cat >>confdefs.h <<\EOF
15059 #define HAVE_RESIZE_TERM 1
15060 EOF
15061
15062 cat >>confdefs.h <<\EOF
15063 #define HAVE_TERM_ENTRY_H 1
15064 EOF
15065
15066 cat >>confdefs.h <<\EOF
15067 #define HAVE_USE_DEFAULT_COLORS 1
15068 EOF
15069
15070 cat >>confdefs.h <<\EOF
15071 #define HAVE_USE_EXTENDED_NAMES 1
15072 EOF
15073
15074 cat >>confdefs.h <<\EOF
15075 #define HAVE_USE_SCREEN 1
15076 EOF
15077
15078 cat >>confdefs.h <<\EOF
15079 #define HAVE_USE_WINDOW 1
15080 EOF
15081
15082 cat >>confdefs.h <<\EOF
15083 #define HAVE_WRESIZE 1
15084 EOF
15085
15086         GENERATED_EXT_FUNCS=generated
15087         test "x$with_ext_funcs" = xyes || cf_dft_ext_spfuncs=no
15088 else
15089         NCURSES_EXT_FUNCS=0
15090         GENERATED_EXT_FUNCS=
15091 fi
15092
15093 echo "$as_me:15093: checking if you want to build with SCREEN extensions" >&5
15094 echo $ECHO_N "checking if you want to build with SCREEN extensions... $ECHO_C" >&6
15095
15096 # Check whether --enable-sp-funcs or --disable-sp-funcs was given.
15097 if test "${enable_sp_funcs+set}" = set; then
15098   enableval="$enable_sp_funcs"
15099   with_sp_funcs=$enableval
15100 else
15101   with_sp_funcs=$cf_dft_ext_spfuncs
15102 fi;
15103 echo "$as_me:15103: result: $with_sp_funcs" >&5
15104 echo "${ECHO_T}$with_sp_funcs" >&6
15105 if test "x$with_sp_funcs" = xyes ; then
15106         NCURSES_SP_FUNCS=1
15107
15108 cat >>confdefs.h <<\EOF
15109 #define NCURSES_SP_FUNCS 1
15110 EOF
15111
15112 cat >>confdefs.h <<\EOF
15113 #define HAVE_TPUTS_SP 1
15114 EOF
15115
15116         GENERATED_SP_FUNCS=generated
15117 else
15118         NCURSES_SP_FUNCS=0
15119         GENERATED_SP_FUNCS=
15120 fi
15121
15122 echo "$as_me:15122: checking if you want to build with terminal-driver" >&5
15123 echo $ECHO_N "checking if you want to build with terminal-driver... $ECHO_C" >&6
15124
15125 # Check whether --enable-term-driver or --disable-term-driver was given.
15126 if test "${enable_term_driver+set}" = set; then
15127   enableval="$enable_term_driver"
15128   with_term_driver=$enableval
15129 else
15130   with_term_driver=no
15131 fi;
15132 echo "$as_me:15132: result: $with_term_driver" >&5
15133 echo "${ECHO_T}$with_term_driver" >&6
15134 if test "x$with_term_driver" = xyes ; then
15135
15136 cat >>confdefs.h <<\EOF
15137 #define USE_TERM_DRIVER 1
15138 EOF
15139
15140         if test "x$with_termlib" != xno ; then
15141                 { { echo "$as_me:15141: error: The term-driver option conflicts with the termlib option" >&5
15142 echo "$as_me: error: The term-driver option conflicts with the termlib option" >&2;}
15143    { (exit 1); exit 1; }; }
15144         fi
15145         if test "x$with_sp_funcs" != xyes ; then
15146                 { { echo "$as_me:15146: error: The term-driver option relies upon sp-funcs" >&5
15147 echo "$as_me: error: The term-driver option relies upon sp-funcs" >&2;}
15148    { (exit 1); exit 1; }; }
15149         fi
15150 fi
15151
15152 ###   use option --enable-const to turn on use of const beyond that in XSI.
15153 echo "$as_me:15153: checking for extended use of const keyword" >&5
15154 echo $ECHO_N "checking for extended use of const keyword... $ECHO_C" >&6
15155
15156 # Check whether --enable-const or --disable-const was given.
15157 if test "${enable_const+set}" = set; then
15158   enableval="$enable_const"
15159   with_ext_const=$enableval
15160 else
15161   with_ext_const=$cf_dft_ext_const
15162 fi;
15163 echo "$as_me:15163: result: $with_ext_const" >&5
15164 echo "${ECHO_T}$with_ext_const" >&6
15165 NCURSES_CONST='/*nothing*/'
15166 if test "x$with_ext_const" = xyes ; then
15167         NCURSES_CONST=const
15168 fi
15169
15170 ###   use option --enable-ext-colors to turn on use of colors beyond 16.
15171 echo "$as_me:15171: checking if you want to use extended colors" >&5
15172 echo $ECHO_N "checking if you want to use extended colors... $ECHO_C" >&6
15173
15174 # Check whether --enable-ext-colors or --disable-ext-colors was given.
15175 if test "${enable_ext_colors+set}" = set; then
15176   enableval="$enable_ext_colors"
15177   with_ext_colors=$enableval
15178 else
15179   with_ext_colors=$cf_dft_ext_colors
15180 fi;
15181 echo "$as_me:15181: result: $with_ext_colors" >&5
15182 echo "${ECHO_T}$with_ext_colors" >&6
15183 NCURSES_EXT_COLORS=0
15184 if test "x$with_ext_colors" = xyes ; then
15185         if test "x$with_widec" != xyes ; then
15186                 { echo "$as_me:15186: WARNING: This option applies only to wide-character library" >&5
15187 echo "$as_me: WARNING: This option applies only to wide-character library" >&2;}
15188         else
15189                 # cannot be ABI 5 since it changes sizeof(cchar_t)
15190
15191 if test "${with_abi_version+set}" != set; then
15192         case "$cf_cv_rel_version" in
15193         (5.*)
15194                 cf_cv_rel_version=6.0
15195                 cf_cv_abi_version=6
15196                 { echo "$as_me:15196: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15197 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15198                 ;;
15199         esac
15200 fi
15201
15202                 NCURSES_EXT_COLORS=1
15203
15204 cat >>confdefs.h <<\EOF
15205 #define NCURSES_EXT_COLORS 1
15206 EOF
15207
15208 cat >>confdefs.h <<\EOF
15209 #define HAVE_ALLOC_PAIR 1
15210 EOF
15211
15212 cat >>confdefs.h <<\EOF
15213 #define HAVE_INIT_EXTENDED_COLOR 1
15214 EOF
15215
15216 cat >>confdefs.h <<\EOF
15217 #define HAVE_RESET_COLOR_PAIRS 1
15218 EOF
15219
15220         fi
15221 fi
15222
15223 ###   use option --enable-ext-mouse to modify coding to support 5-button mice
15224 echo "$as_me:15224: checking if you want to use extended mouse encoding" >&5
15225 echo $ECHO_N "checking if you want to use extended mouse encoding... $ECHO_C" >&6
15226
15227 # Check whether --enable-ext-mouse or --disable-ext-mouse was given.
15228 if test "${enable_ext_mouse+set}" = set; then
15229   enableval="$enable_ext_mouse"
15230   with_ext_mouse=$enableval
15231 else
15232   with_ext_mouse=$cf_dft_ext_mouse
15233 fi;
15234 echo "$as_me:15234: result: $with_ext_mouse" >&5
15235 echo "${ECHO_T}$with_ext_mouse" >&6
15236 NCURSES_MOUSE_VERSION=1
15237 if test "x$with_ext_mouse" = xyes ; then
15238         NCURSES_MOUSE_VERSION=2
15239
15240 if test "${with_abi_version+set}" != set; then
15241         case "$cf_cv_rel_version" in
15242         (5.*)
15243                 cf_cv_rel_version=6.0
15244                 cf_cv_abi_version=6
15245                 { echo "$as_me:15245: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15246 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15247                 ;;
15248         esac
15249 fi
15250
15251 fi
15252
15253 ###   use option --enable-ext-putwin to turn on extended screendumps
15254 echo "$as_me:15254: checking if you want to use extended putwin/screendump" >&5
15255 echo $ECHO_N "checking if you want to use extended putwin/screendump... $ECHO_C" >&6
15256
15257 # Check whether --enable-ext-putwin or --disable-ext-putwin was given.
15258 if test "${enable_ext_putwin+set}" = set; then
15259   enableval="$enable_ext_putwin"
15260   with_ext_putwin=$enableval
15261 else
15262   with_ext_putwin=$cf_dft_ext_putwin
15263 fi;
15264 echo "$as_me:15264: result: $with_ext_putwin" >&5
15265 echo "${ECHO_T}$with_ext_putwin" >&6
15266 if test "x$with_ext_putwin" = xyes ; then
15267
15268 cat >>confdefs.h <<\EOF
15269 #define NCURSES_EXT_PUTWIN 1
15270 EOF
15271
15272 fi
15273
15274 echo "$as_me:15274: checking if you want \$NCURSES_NO_PADDING code" >&5
15275 echo $ECHO_N "checking if you want \$NCURSES_NO_PADDING code... $ECHO_C" >&6
15276
15277 # Check whether --enable-no-padding or --disable-no-padding was given.
15278 if test "${enable_no_padding+set}" = set; then
15279   enableval="$enable_no_padding"
15280   with_no_padding=$enableval
15281 else
15282   with_no_padding=$with_ext_funcs
15283 fi;
15284 echo "$as_me:15284: result: $with_no_padding" >&5
15285 echo "${ECHO_T}$with_no_padding" >&6
15286 test "x$with_no_padding" = xyes &&
15287 cat >>confdefs.h <<\EOF
15288 #define NCURSES_NO_PADDING 1
15289 EOF
15290
15291 ###   use option --enable-sigwinch to turn on use of SIGWINCH logic
15292 echo "$as_me:15292: checking if you want SIGWINCH handler" >&5
15293 echo $ECHO_N "checking if you want SIGWINCH handler... $ECHO_C" >&6
15294
15295 # Check whether --enable-sigwinch or --disable-sigwinch was given.
15296 if test "${enable_sigwinch+set}" = set; then
15297   enableval="$enable_sigwinch"
15298   with_sigwinch=$enableval
15299 else
15300   with_sigwinch=$with_ext_funcs
15301 fi;
15302 echo "$as_me:15302: result: $with_sigwinch" >&5
15303 echo "${ECHO_T}$with_sigwinch" >&6
15304 test "x$with_sigwinch" = xyes &&
15305 cat >>confdefs.h <<\EOF
15306 #define USE_SIGWINCH 1
15307 EOF
15308
15309 ###   use option --enable-tcap-names to allow user to define new capabilities
15310 echo "$as_me:15310: checking if you want user-definable terminal capabilities like termcap" >&5
15311 echo $ECHO_N "checking if you want user-definable terminal capabilities like termcap... $ECHO_C" >&6
15312
15313 # Check whether --enable-tcap-names or --disable-tcap-names was given.
15314 if test "${enable_tcap_names+set}" = set; then
15315   enableval="$enable_tcap_names"
15316   with_tcap_names=$enableval
15317 else
15318   with_tcap_names=$with_ext_funcs
15319 fi;
15320 echo "$as_me:15320: result: $with_tcap_names" >&5
15321 echo "${ECHO_T}$with_tcap_names" >&6
15322 NCURSES_XNAMES=0
15323 test "x$with_tcap_names" = xyes && NCURSES_XNAMES=1
15324
15325 ##############################################################################
15326
15327 echo "$as_me:15327: checking if you want to link with the pthread library" >&5
15328 echo $ECHO_N "checking if you want to link with the pthread library... $ECHO_C" >&6
15329
15330 # Check whether --with-pthread or --without-pthread was given.
15331 if test "${with_pthread+set}" = set; then
15332   withval="$with_pthread"
15333   with_pthread=$withval
15334 else
15335   with_pthread=no
15336 fi;
15337 echo "$as_me:15337: result: $with_pthread" >&5
15338 echo "${ECHO_T}$with_pthread" >&6
15339
15340 if test "$with_pthread" != no ; then
15341         echo "$as_me:15341: checking for pthread.h" >&5
15342 echo $ECHO_N "checking for pthread.h... $ECHO_C" >&6
15343 if test "${ac_cv_header_pthread_h+set}" = set; then
15344   echo $ECHO_N "(cached) $ECHO_C" >&6
15345 else
15346   cat >"conftest.$ac_ext" <<_ACEOF
15347 #line 15347 "configure"
15348 #include "confdefs.h"
15349 #include <pthread.h>
15350 _ACEOF
15351 if { (eval echo "$as_me:15351: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15352   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15353   ac_status=$?
15354   $EGREP -v '^ *\+' conftest.er1 >conftest.err
15355   rm -f conftest.er1
15356   cat conftest.err >&5
15357   echo "$as_me:15357: \$? = $ac_status" >&5
15358   (exit "$ac_status"); } >/dev/null; then
15359   if test -s conftest.err; then
15360     ac_cpp_err=$ac_c_preproc_warn_flag
15361   else
15362     ac_cpp_err=
15363   fi
15364 else
15365   ac_cpp_err=yes
15366 fi
15367 if test -z "$ac_cpp_err"; then
15368   ac_cv_header_pthread_h=yes
15369 else
15370   echo "$as_me: failed program was:" >&5
15371   cat "conftest.$ac_ext" >&5
15372   ac_cv_header_pthread_h=no
15373 fi
15374 rm -f conftest.err "conftest.$ac_ext"
15375 fi
15376 echo "$as_me:15376: result: $ac_cv_header_pthread_h" >&5
15377 echo "${ECHO_T}$ac_cv_header_pthread_h" >&6
15378 if test "$ac_cv_header_pthread_h" = yes; then
15379
15380 cat >>confdefs.h <<\EOF
15381 #define HAVE_PTHREADS_H 1
15382 EOF
15383
15384         for cf_lib_pthread in pthread c_r
15385         do
15386             echo "$as_me:15386: checking if we can link with the $cf_lib_pthread library" >&5
15387 echo $ECHO_N "checking if we can link with the $cf_lib_pthread library... $ECHO_C" >&6
15388             cf_save_LIBS="$LIBS"
15389
15390 cf_add_libs="$LIBS"
15391 # reverse order
15392 cf_add_0lib=
15393 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15394 # filter duplicates
15395 for cf_add_1lib in $cf_add_0lib; do
15396         for cf_add_2lib in $cf_add_libs; do
15397                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15398                         cf_add_1lib=
15399                         break
15400                 fi
15401         done
15402         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15403 done
15404 LIBS="$cf_add_libs"
15405
15406             cat >"conftest.$ac_ext" <<_ACEOF
15407 #line 15407 "configure"
15408 #include "confdefs.h"
15409
15410 #include <pthread.h>
15411
15412 int
15413 main (void)
15414 {
15415
15416                 int rc = pthread_create(0,0,0,0);
15417                 int r2 = pthread_mutexattr_settype(0, 0);
15418
15419   ;
15420   return 0;
15421 }
15422 _ACEOF
15423 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15424 if { (eval echo "$as_me:15424: \"$ac_link\"") >&5
15425   (eval $ac_link) 2>&5
15426   ac_status=$?
15427   echo "$as_me:15427: \$? = $ac_status" >&5
15428   (exit "$ac_status"); } &&
15429          { ac_try='test -s "conftest$ac_exeext"'
15430   { (eval echo "$as_me:15430: \"$ac_try\"") >&5
15431   (eval $ac_try) 2>&5
15432   ac_status=$?
15433   echo "$as_me:15433: \$? = $ac_status" >&5
15434   (exit "$ac_status"); }; }; then
15435   with_pthread=yes
15436 else
15437   echo "$as_me: failed program was:" >&5
15438 cat "conftest.$ac_ext" >&5
15439 with_pthread=no
15440 fi
15441 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15442             LIBS="$cf_save_LIBS"
15443             echo "$as_me:15443: result: $with_pthread" >&5
15444 echo "${ECHO_T}$with_pthread" >&6
15445             test "$with_pthread" = yes && break
15446         done
15447
15448         if test "$with_pthread" = yes ; then
15449
15450 cf_add_libs="$LIBS"
15451 # reverse order
15452 cf_add_0lib=
15453 for cf_add_1lib in -l$cf_lib_pthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15454 # filter duplicates
15455 for cf_add_1lib in $cf_add_0lib; do
15456         for cf_add_2lib in $cf_add_libs; do
15457                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15458                         cf_add_1lib=
15459                         break
15460                 fi
15461         done
15462         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15463 done
15464 LIBS="$cf_add_libs"
15465
15466 cat >>confdefs.h <<\EOF
15467 #define HAVE_LIBPTHREADS 1
15468 EOF
15469
15470         else
15471             { { echo "$as_me:15471: error: Cannot link with pthread library" >&5
15472 echo "$as_me: error: Cannot link with pthread library" >&2;}
15473    { (exit 1); exit 1; }; }
15474         fi
15475
15476 fi
15477
15478 fi
15479
15480 if test "x$with_pthread" != xno; then
15481         echo "$as_me:15481: checking for pthread_kill" >&5
15482 echo $ECHO_N "checking for pthread_kill... $ECHO_C" >&6
15483 if test "${ac_cv_func_pthread_kill+set}" = set; then
15484   echo $ECHO_N "(cached) $ECHO_C" >&6
15485 else
15486   cat >"conftest.$ac_ext" <<_ACEOF
15487 #line 15487 "configure"
15488 #include "confdefs.h"
15489 #define pthread_kill autoconf_temporary
15490 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
15491 #undef pthread_kill
15492
15493 #ifdef __cplusplus
15494 extern "C"
15495 #endif
15496
15497 /* We use char because int might match the return type of a gcc2
15498    builtin and then its argument prototype would still apply.  */
15499 char pthread_kill (void);
15500
15501 int
15502 main (void)
15503 {
15504
15505 /* The GNU C library defines stubs for functions which it implements
15506     to always fail with ENOSYS.  Some functions are actually named
15507     something starting with __ and the normal name is an alias.  */
15508 #if defined (__stub_pthread_kill) || defined (__stub___pthread_kill)
15509 #error found stub for pthread_kill
15510 #endif
15511
15512         return pthread_kill ();
15513   ;
15514   return 0;
15515 }
15516 _ACEOF
15517 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15518 if { (eval echo "$as_me:15518: \"$ac_link\"") >&5
15519   (eval $ac_link) 2>&5
15520   ac_status=$?
15521   echo "$as_me:15521: \$? = $ac_status" >&5
15522   (exit "$ac_status"); } &&
15523          { ac_try='test -s "conftest$ac_exeext"'
15524   { (eval echo "$as_me:15524: \"$ac_try\"") >&5
15525   (eval $ac_try) 2>&5
15526   ac_status=$?
15527   echo "$as_me:15527: \$? = $ac_status" >&5
15528   (exit "$ac_status"); }; }; then
15529   ac_cv_func_pthread_kill=yes
15530 else
15531   echo "$as_me: failed program was:" >&5
15532 cat "conftest.$ac_ext" >&5
15533 ac_cv_func_pthread_kill=no
15534 fi
15535 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15536 fi
15537 echo "$as_me:15537: result: $ac_cv_func_pthread_kill" >&5
15538 echo "${ECHO_T}$ac_cv_func_pthread_kill" >&6
15539 if test "$ac_cv_func_pthread_kill" = yes; then
15540
15541                 echo "$as_me:15541: checking if you want to allow EINTR in wgetch with pthreads" >&5
15542 echo $ECHO_N "checking if you want to allow EINTR in wgetch with pthreads... $ECHO_C" >&6
15543
15544 # Check whether --enable-pthreads-eintr or --disable-pthreads-eintr was given.
15545 if test "${enable_pthreads_eintr+set}" = set; then
15546   enableval="$enable_pthreads_eintr"
15547   use_pthreads_eintr=$enableval
15548 else
15549   use_pthreads_eintr=no
15550 fi;
15551                 echo "$as_me:15551: result: $use_pthreads_eintr" >&5
15552 echo "${ECHO_T}$use_pthreads_eintr" >&6
15553                 if test "x$use_pthreads_eintr" = xyes ; then
15554
15555 cat >>confdefs.h <<\EOF
15556 #define USE_PTHREADS_EINTR 1
15557 EOF
15558
15559                 fi
15560 fi
15561
15562         echo "$as_me:15562: checking if you want to use weak-symbols for pthreads" >&5
15563 echo $ECHO_N "checking if you want to use weak-symbols for pthreads... $ECHO_C" >&6
15564
15565 # Check whether --enable-weak-symbols or --disable-weak-symbols was given.
15566 if test "${enable_weak_symbols+set}" = set; then
15567   enableval="$enable_weak_symbols"
15568   use_weak_symbols=$enableval
15569 else
15570   use_weak_symbols=no
15571 fi;
15572         echo "$as_me:15572: result: $use_weak_symbols" >&5
15573 echo "${ECHO_T}$use_weak_symbols" >&6
15574         if test "x$use_weak_symbols" = xyes ; then
15575
15576 echo "$as_me:15576: checking if $CC supports weak symbols" >&5
15577 echo $ECHO_N "checking if $CC supports weak symbols... $ECHO_C" >&6
15578 if test "${cf_cv_weak_symbols+set}" = set; then
15579   echo $ECHO_N "(cached) $ECHO_C" >&6
15580 else
15581
15582 cat >"conftest.$ac_ext" <<_ACEOF
15583 #line 15583 "configure"
15584 #include "confdefs.h"
15585
15586 #include <stdio.h>
15587 int
15588 main (void)
15589 {
15590
15591 #if defined(__GNUC__)
15592 #  if defined __USE_ISOC99
15593 #    define _cat_pragma(exp)    _Pragma(#exp)
15594 #    define _weak_pragma(exp)   _cat_pragma(weak name)
15595 #  else
15596 #    define _weak_pragma(exp)
15597 #  endif
15598 #  define _declare(name)        __extension__ extern __typeof__(name) name
15599 #  define weak_symbol(name)     _weak_pragma(name) _declare(name) __attribute__((weak))
15600 #endif
15601
15602 weak_symbol(fopen);
15603
15604   ;
15605   return 0;
15606 }
15607 _ACEOF
15608 rm -f "conftest.$ac_objext"
15609 if { (eval echo "$as_me:15609: \"$ac_compile\"") >&5
15610   (eval $ac_compile) 2>&5
15611   ac_status=$?
15612   echo "$as_me:15612: \$? = $ac_status" >&5
15613   (exit "$ac_status"); } &&
15614          { ac_try='test -s "conftest.$ac_objext"'
15615   { (eval echo "$as_me:15615: \"$ac_try\"") >&5
15616   (eval $ac_try) 2>&5
15617   ac_status=$?
15618   echo "$as_me:15618: \$? = $ac_status" >&5
15619   (exit "$ac_status"); }; }; then
15620   cf_cv_weak_symbols=yes
15621 else
15622   echo "$as_me: failed program was:" >&5
15623 cat "conftest.$ac_ext" >&5
15624 cf_cv_weak_symbols=no
15625 fi
15626 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15627
15628 fi
15629 echo "$as_me:15629: result: $cf_cv_weak_symbols" >&5
15630 echo "${ECHO_T}$cf_cv_weak_symbols" >&6
15631
15632         else
15633                 cf_cv_weak_symbols=no
15634         fi
15635
15636         if test "x$cf_cv_weak_symbols" = xyes ; then
15637
15638 cat >>confdefs.h <<\EOF
15639 #define USE_WEAK_SYMBOLS 1
15640 EOF
15641
15642         fi
15643 fi
15644
15645 PTHREAD=
15646 if test "x$with_pthread" = "xyes" ; then
15647
15648 cat >>confdefs.h <<\EOF
15649 #define USE_PTHREADS 1
15650 EOF
15651
15652         enable_reentrant=yes
15653         if test "x$cf_cv_weak_symbols" = xyes ; then
15654                 PTHREAD=-lpthread
15655
15656 cf_add_libs="$PRIVATE_LIBS"
15657 # reverse order
15658 cf_add_0lib=
15659 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15660 # filter duplicates
15661 for cf_add_1lib in $cf_add_0lib; do
15662         for cf_add_2lib in $cf_add_libs; do
15663                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15664                         cf_add_1lib=
15665                         break
15666                 fi
15667         done
15668         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15669 done
15670 PRIVATE_LIBS="$cf_add_libs"
15671
15672         fi
15673 fi
15674
15675 # Reentrant code has to be opaque; there's little advantage to making ncurses
15676 # opaque outside of that, so there is no --enable-opaque option.  We can use
15677 # this option without --with-pthreads, but this will be always set for
15678 # pthreads.
15679 echo "$as_me:15679: checking if you want reentrant code" >&5
15680 echo $ECHO_N "checking if you want reentrant code... $ECHO_C" >&6
15681
15682 # Check whether --enable-reentrant or --disable-reentrant was given.
15683 if test "${enable_reentrant+set}" = set; then
15684   enableval="$enable_reentrant"
15685   with_reentrant=$enableval
15686 else
15687   with_reentrant=no
15688 fi;
15689 echo "$as_me:15689: result: $with_reentrant" >&5
15690 echo "${ECHO_T}$with_reentrant" >&6
15691 if test "x$with_reentrant" = xyes ; then
15692         cf_cv_enable_reentrant=1
15693         cf_cv_enable_opaque="NCURSES_INTERNALS"
15694         NCURSES_SIZE_T=int
15695         if test "x$cf_cv_weak_symbols" = xyes ; then
15696
15697 # remove pthread library from $LIBS
15698 LIBS=`echo "$LIBS" | sed -e 's/-lpthread[       ]//g' -e 's/-lpthread$//'`
15699
15700 cf_add_libs="$TEST_LIBS"
15701 # reverse order
15702 cf_add_0lib=
15703 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15704 # filter duplicates
15705 for cf_add_1lib in $cf_add_0lib; do
15706         for cf_add_2lib in $cf_add_libs; do
15707                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15708                         cf_add_1lib=
15709                         break
15710                 fi
15711         done
15712         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15713 done
15714 TEST_LIBS="$cf_add_libs"
15715
15716 cf_add_libs="$TEST_LIBS2"
15717 # reverse order
15718 cf_add_0lib=
15719 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15720 # filter duplicates
15721 for cf_add_1lib in $cf_add_0lib; do
15722         for cf_add_2lib in $cf_add_libs; do
15723                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15724                         cf_add_1lib=
15725                         break
15726                 fi
15727         done
15728         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15729 done
15730 TEST_LIBS2="$cf_add_libs"
15731
15732 cf_add_libs="$PRIVATE_LIBS"
15733 # reverse order
15734 cf_add_0lib=
15735 for cf_add_1lib in -lpthread; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15736 # filter duplicates
15737 for cf_add_1lib in $cf_add_0lib; do
15738         for cf_add_2lib in $cf_add_libs; do
15739                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15740                         cf_add_1lib=
15741                         break
15742                 fi
15743         done
15744         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15745 done
15746 PRIVATE_LIBS="$cf_add_libs"
15747
15748         else
15749                 # when not using weak symbols but with_reentrant,
15750                 # add 't' to the library suffix on all platforms
15751                 # except cygwin, where we only do that if ALSO
15752                 # compiling with full thread support.
15753                 case "$host" in
15754                 (*cygwin* | *msys*)
15755                         if test "$with_pthread" = "yes" ; then
15756                                 if test "x$disable_lib_suffixes" = "xno" ; then
15757                                         LIB_SUFFIX="t${LIB_SUFFIX}"
15758                                 fi
15759                         fi ;;
15760                 (*)
15761                         if test "x$disable_lib_suffixes" = "xno" ; then
15762                                 LIB_SUFFIX="t${LIB_SUFFIX}"
15763                         fi
15764                         ;;
15765                 esac
15766         fi
15767
15768 cat >>confdefs.h <<\EOF
15769 #define USE_REENTRANT 1
15770 EOF
15771
15772 if test "${with_abi_version+set}" != set; then
15773         case "$cf_cv_rel_version" in
15774         (5.*)
15775                 cf_cv_rel_version=6.0
15776                 cf_cv_abi_version=6
15777                 { echo "$as_me:15777: WARNING: overriding ABI version to $cf_cv_abi_version" >&5
15778 echo "$as_me: WARNING: overriding ABI version to $cf_cv_abi_version" >&2;}
15779                 ;;
15780         esac
15781 fi
15782
15783 else
15784         cf_cv_enable_reentrant=0
15785         cf_cv_enable_opaque="NCURSES_OPAQUE"
15786         NCURSES_SIZE_T=short
15787 fi
15788
15789 echo "$as_me:15789: checking if you want opaque curses-library structures" >&5
15790 echo $ECHO_N "checking if you want opaque curses-library structures... $ECHO_C" >&6
15791
15792 # Check whether --enable-opaque-curses or --disable-opaque-curses was given.
15793 if test "${enable_opaque_curses+set}" = set; then
15794   enableval="$enable_opaque_curses"
15795   test "$enableval" != yes && enableval=no
15796         if test "$enableval" != "no" ; then
15797     enable_opaque_curses=yes
15798         else
15799
15800          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15801          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15802
15803         fi
15804 else
15805   enableval=no
15806
15807          test "$cf_cv_enable_reentrant" = 1 && enable_opaque_curses=yes
15808          test "$cf_cv_enable_reentrant" = 1 || enable_opaque_curses=no
15809
15810 fi;
15811 echo "$as_me:15811: result: $enable_opaque_curses" >&5
15812 echo "${ECHO_T}$enable_opaque_curses" >&6
15813
15814 test "$cf_cv_enable_reentrant" = 1 && \
15815 test "$enable_opaque_curses" = no && \
15816 { { echo "$as_me:15816: error: reentrant configuration requires opaque library" >&5
15817 echo "$as_me: error: reentrant configuration requires opaque library" >&2;}
15818    { (exit 1); exit 1; }; }
15819
15820 echo "$as_me:15820: checking if you want opaque form-library structures" >&5
15821 echo $ECHO_N "checking if you want opaque form-library structures... $ECHO_C" >&6
15822
15823 # Check whether --enable-opaque-form or --disable-opaque-form was given.
15824 if test "${enable_opaque_form+set}" = set; then
15825   enableval="$enable_opaque_form"
15826   enable_opaque_form=yes
15827 else
15828   enable_opaque_form=no
15829 fi;
15830 echo "$as_me:15830: result: $enable_opaque_form" >&5
15831 echo "${ECHO_T}$enable_opaque_form" >&6
15832
15833 echo "$as_me:15833: checking if you want opaque menu-library structures" >&5
15834 echo $ECHO_N "checking if you want opaque menu-library structures... $ECHO_C" >&6
15835
15836 # Check whether --enable-opaque-menu or --disable-opaque-menu was given.
15837 if test "${enable_opaque_menu+set}" = set; then
15838   enableval="$enable_opaque_menu"
15839   enable_opaque_menu=yes
15840 else
15841   enable_opaque_menu=no
15842 fi;
15843 echo "$as_me:15843: result: $enable_opaque_menu" >&5
15844 echo "${ECHO_T}$enable_opaque_menu" >&6
15845
15846 echo "$as_me:15846: checking if you want opaque panel-library structures" >&5
15847 echo $ECHO_N "checking if you want opaque panel-library structures... $ECHO_C" >&6
15848
15849 # Check whether --enable-opaque-panel or --disable-opaque-panel was given.
15850 if test "${enable_opaque_panel+set}" = set; then
15851   enableval="$enable_opaque_panel"
15852   enable_opaque_panel=yes
15853 else
15854   enable_opaque_panel=no
15855 fi;
15856 echo "$as_me:15856: result: $enable_opaque_panel" >&5
15857 echo "${ECHO_T}$enable_opaque_panel" >&6
15858
15859 NCURSES_OPAQUE=0;               test "$enable_opaque_curses" = yes && NCURSES_OPAQUE=1
15860 NCURSES_OPAQUE_FORM=0;  test "$enable_opaque_form"   = yes && NCURSES_OPAQUE_FORM=1
15861 NCURSES_OPAQUE_MENU=0;  test "$enable_opaque_menu"   = yes && NCURSES_OPAQUE_MENU=1
15862 NCURSES_OPAQUE_PANEL=0; test "$enable_opaque_panel"  = yes && NCURSES_OPAQUE_PANEL=1
15863
15864 ### Allow using a different wrap-prefix
15865 if test "$cf_cv_enable_reentrant" != 0 || test "$BROKEN_LINKER" = 1 ; then
15866         echo "$as_me:15866: checking for prefix used to wrap public variables" >&5
15867 echo $ECHO_N "checking for prefix used to wrap public variables... $ECHO_C" >&6
15868
15869 # Check whether --with-wrap-prefix or --without-wrap-prefix was given.
15870 if test "${with_wrap_prefix+set}" = set; then
15871   withval="$with_wrap_prefix"
15872   NCURSES_WRAP_PREFIX=$withval
15873 else
15874   NCURSES_WRAP_PREFIX=_nc_
15875 fi;
15876         echo "$as_me:15876: result: $NCURSES_WRAP_PREFIX" >&5
15877 echo "${ECHO_T}$NCURSES_WRAP_PREFIX" >&6
15878 else
15879         NCURSES_WRAP_PREFIX=_nc_
15880 fi
15881
15882 cat >>confdefs.h <<EOF
15883 #define NCURSES_WRAP_PREFIX "$NCURSES_WRAP_PREFIX"
15884 EOF
15885
15886 ###############################################################################
15887 # These options are relatively safe to experiment with.
15888
15889 echo "$as_me:15889: checking if you want all development code" >&5
15890 echo $ECHO_N "checking if you want all development code... $ECHO_C" >&6
15891
15892 # Check whether --with-develop or --without-develop was given.
15893 if test "${with_develop+set}" = set; then
15894   withval="$with_develop"
15895   with_develop=$withval
15896 else
15897   with_develop=no
15898 fi;
15899 echo "$as_me:15899: result: $with_develop" >&5
15900 echo "${ECHO_T}$with_develop" >&6
15901
15902 ###   use option --enable-hard-tabs to turn on use of hard-tabs optimize
15903 echo "$as_me:15903: checking if you want hard-tabs code" >&5
15904 echo $ECHO_N "checking if you want hard-tabs code... $ECHO_C" >&6
15905
15906 # Check whether --enable-hard-tabs or --disable-hard-tabs was given.
15907 if test "${enable_hard_tabs+set}" = set; then
15908   enableval="$enable_hard_tabs"
15909
15910 else
15911   enable_hard_tabs=$with_develop
15912 fi;
15913 echo "$as_me:15913: result: $enable_hard_tabs" >&5
15914 echo "${ECHO_T}$enable_hard_tabs" >&6
15915 test "x$enable_hard_tabs" = xyes &&
15916 cat >>confdefs.h <<\EOF
15917 #define USE_HARD_TABS 1
15918 EOF
15919
15920 ###   use option --enable-xmc-glitch to turn on use of magic-cookie optimize
15921 echo "$as_me:15921: checking if you want limited support for xmc" >&5
15922 echo $ECHO_N "checking if you want limited support for xmc... $ECHO_C" >&6
15923
15924 # Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
15925 if test "${enable_xmc_glitch+set}" = set; then
15926   enableval="$enable_xmc_glitch"
15927
15928 else
15929   enable_xmc_glitch=$with_develop
15930 fi;
15931 echo "$as_me:15931: result: $enable_xmc_glitch" >&5
15932 echo "${ECHO_T}$enable_xmc_glitch" >&6
15933 test "x$enable_xmc_glitch" = xyes &&
15934 cat >>confdefs.h <<\EOF
15935 #define USE_XMC_SUPPORT 1
15936 EOF
15937
15938 ###############################################################################
15939 # These are just experimental, probably should not be in a package:
15940
15941 echo "$as_me:15941: checking if you do not want to assume colors are white-on-black" >&5
15942 echo $ECHO_N "checking if you do not want to assume colors are white-on-black... $ECHO_C" >&6
15943
15944 # Check whether --enable-assumed-color or --disable-assumed-color was given.
15945 if test "${enable_assumed_color+set}" = set; then
15946   enableval="$enable_assumed_color"
15947   with_assumed_color=$enableval
15948 else
15949   with_assumed_color=yes
15950 fi;
15951 echo "$as_me:15951: result: $with_assumed_color" >&5
15952 echo "${ECHO_T}$with_assumed_color" >&6
15953 test "x$with_assumed_color" = xyes &&
15954 cat >>confdefs.h <<\EOF
15955 #define USE_ASSUMED_COLOR 1
15956 EOF
15957
15958 ###   use option --enable-hashmap to turn on use of hashmap scrolling logic
15959 echo "$as_me:15959: checking if you want hashmap scrolling-optimization code" >&5
15960 echo $ECHO_N "checking if you want hashmap scrolling-optimization code... $ECHO_C" >&6
15961
15962 # Check whether --enable-hashmap or --disable-hashmap was given.
15963 if test "${enable_hashmap+set}" = set; then
15964   enableval="$enable_hashmap"
15965   with_hashmap=$enableval
15966 else
15967   with_hashmap=yes
15968 fi;
15969 echo "$as_me:15969: result: $with_hashmap" >&5
15970 echo "${ECHO_T}$with_hashmap" >&6
15971 test "x$with_hashmap" = xyes &&
15972 cat >>confdefs.h <<\EOF
15973 #define USE_HASHMAP 1
15974 EOF
15975
15976 ###   use option --enable-colorfgbg to turn on use of $COLORFGBG environment
15977 echo "$as_me:15977: checking if you want colorfgbg code" >&5
15978 echo $ECHO_N "checking if you want colorfgbg code... $ECHO_C" >&6
15979
15980 # Check whether --enable-colorfgbg or --disable-colorfgbg was given.
15981 if test "${enable_colorfgbg+set}" = set; then
15982   enableval="$enable_colorfgbg"
15983   with_colorfgbg=$enableval
15984 else
15985   with_colorfgbg=no
15986 fi;
15987 echo "$as_me:15987: result: $with_colorfgbg" >&5
15988 echo "${ECHO_T}$with_colorfgbg" >&6
15989 test "x$with_colorfgbg" = xyes &&
15990 cat >>confdefs.h <<\EOF
15991 #define USE_COLORFGBG 1
15992 EOF
15993
15994 ###   use option --enable-fvisibility to turn on use of gcc-specific feature
15995 echo "$as_me:15995: checking if you want to use gcc -fvisibility option" >&5
15996 echo $ECHO_N "checking if you want to use gcc -fvisibility option... $ECHO_C" >&6
15997
15998 # Check whether --enable-fvisibility or --disable-fvisibility was given.
15999 if test "${enable_fvisibility+set}" = set; then
16000   enableval="$enable_fvisibility"
16001   cf_with_fvisibility=$enableval
16002 else
16003   cf_with_fvisibility=no
16004 fi;
16005 echo "$as_me:16005: result: $cf_with_fvisibility" >&5
16006 echo "${ECHO_T}$cf_with_fvisibility" >&6
16007
16008 NCURSES_IMPEXP=
16009 NCURSES_CXX_IMPEXP=
16010 if test "x$cf_with_fvisibility" = xyes; then
16011
16012 echo "$as_me:16012: checking if $CC -fvisibility=hidden option works" >&5
16013 echo $ECHO_N "checking if $CC -fvisibility=hidden option works... $ECHO_C" >&6
16014 if test "${cf_cv_fvisibility_hidden+set}" = set; then
16015   echo $ECHO_N "(cached) $ECHO_C" >&6
16016 else
16017
16018     cf_save_cflags="$CFLAGS"
16019     CFLAGS="$CFLAGS -fvisibility=hidden"
16020     cat >"conftest.$ac_ext" <<_ACEOF
16021 #line 16021 "configure"
16022 #include "confdefs.h"
16023
16024 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16025
16026 int
16027 main (void)
16028 {
16029
16030         if (somefunc()) return 1;
16031
16032   ;
16033   return 0;
16034 }
16035 _ACEOF
16036 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16037 if { (eval echo "$as_me:16037: \"$ac_link\"") >&5
16038   (eval $ac_link) 2>&5
16039   ac_status=$?
16040   echo "$as_me:16040: \$? = $ac_status" >&5
16041   (exit "$ac_status"); } &&
16042          { ac_try='test -s "conftest$ac_exeext"'
16043   { (eval echo "$as_me:16043: \"$ac_try\"") >&5
16044   (eval $ac_try) 2>&5
16045   ac_status=$?
16046   echo "$as_me:16046: \$? = $ac_status" >&5
16047   (exit "$ac_status"); }; }; then
16048   cf_cv_fvisibility_hidden=yes
16049 else
16050   echo "$as_me: failed program was:" >&5
16051 cat "conftest.$ac_ext" >&5
16052 cf_cv_fvisibility_hidden=no
16053 fi
16054 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16055     CFLAGS=$cf_save_cflags
16056
16057 fi
16058 echo "$as_me:16058: result: $cf_cv_fvisibility_hidden" >&5
16059 echo "${ECHO_T}$cf_cv_fvisibility_hidden" >&6
16060
16061         if test "x$cf_cv_fvisibility_hidden" = xyes
16062         then
16063
16064 cf_fix_cppflags=no
16065 cf_new_cflags=
16066 cf_new_cppflags=
16067 cf_new_extra_cppflags=
16068
16069 for cf_add_cflags in -fvisibility=hidden
16070 do
16071 case "$cf_fix_cppflags" in
16072 (no)
16073         case "$cf_add_cflags" in
16074         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16075                 case "$cf_add_cflags" in
16076                 (-D*)
16077                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16078
16079                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16080                                 && test -z "${cf_tst_cflags}" \
16081                                 && cf_fix_cppflags=yes
16082
16083                         if test "$cf_fix_cppflags" = yes ; then
16084
16085         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16086         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16087
16088                                 continue
16089                         elif test "${cf_tst_cflags}" = "\"'" ; then
16090
16091         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16092         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16093
16094                                 continue
16095                         fi
16096                         ;;
16097                 esac
16098                 case "$CPPFLAGS" in
16099                 (*$cf_add_cflags)
16100                         ;;
16101                 (*)
16102                         case "$cf_add_cflags" in
16103                         (-D*)
16104                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16105
16106 CPPFLAGS=`echo "$CPPFLAGS" | \
16107         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16108                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16109
16110                                 ;;
16111                         esac
16112
16113         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16114         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16115
16116                         ;;
16117                 esac
16118                 ;;
16119         (*)
16120
16121         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16122         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16123
16124                 ;;
16125         esac
16126         ;;
16127 (yes)
16128
16129         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16130         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16131
16132         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16133
16134         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16135                 && test -z "${cf_tst_cflags}" \
16136                 && cf_fix_cppflags=no
16137         ;;
16138 esac
16139 done
16140
16141 if test -n "$cf_new_cflags" ; then
16142
16143         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16144         CFLAGS="${CFLAGS}$cf_new_cflags"
16145
16146 fi
16147
16148 if test -n "$cf_new_cppflags" ; then
16149
16150         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16151         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16152
16153 fi
16154
16155 if test -n "$cf_new_extra_cppflags" ; then
16156
16157         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16158         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16159
16160 fi
16161
16162                 NCURSES_IMPEXP="__attribute__ ((visibility(\"default\")))"
16163         fi
16164         if test -n "$CXX"
16165         then
16166                 ac_ext=cc
16167 ac_cpp='$CXXCPP $CPPFLAGS'
16168 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16169 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16170 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16171 ac_main_return="return"
16172
16173 echo "$as_me:16173: checking if $CXX -fvisibility=hidden option works" >&5
16174 echo $ECHO_N "checking if $CXX -fvisibility=hidden option works... $ECHO_C" >&6
16175 if test "${cf_cv_fvisibility_hidden2+set}" = set; then
16176   echo $ECHO_N "(cached) $ECHO_C" >&6
16177 else
16178
16179     cf_save_cflags="$CXXFLAGS"
16180     CXXFLAGS="$CXXFLAGS -fvisibility=hidden"
16181     cat >"conftest.$ac_ext" <<_ACEOF
16182 #line 16182 "configure"
16183 #include "confdefs.h"
16184
16185 __attribute__ ((visibility("default"))) int somefunc() {return 42;}
16186
16187 int
16188 main (void)
16189 {
16190
16191         if (somefunc()) return 1;
16192
16193   ;
16194   return 0;
16195 }
16196 _ACEOF
16197 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16198 if { (eval echo "$as_me:16198: \"$ac_link\"") >&5
16199   (eval $ac_link) 2>&5
16200   ac_status=$?
16201   echo "$as_me:16201: \$? = $ac_status" >&5
16202   (exit "$ac_status"); } &&
16203          { ac_try='test -s "conftest$ac_exeext"'
16204   { (eval echo "$as_me:16204: \"$ac_try\"") >&5
16205   (eval $ac_try) 2>&5
16206   ac_status=$?
16207   echo "$as_me:16207: \$? = $ac_status" >&5
16208   (exit "$ac_status"); }; }; then
16209   cf_cv_fvisibility_hidden2=yes
16210 else
16211   echo "$as_me: failed program was:" >&5
16212 cat "conftest.$ac_ext" >&5
16213 cf_cv_fvisibility_hidden2=no
16214 fi
16215 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16216     CXXFLAGS=$cf_save_cflags
16217
16218 fi
16219 echo "$as_me:16219: result: $cf_cv_fvisibility_hidden2" >&5
16220 echo "${ECHO_T}$cf_cv_fvisibility_hidden2" >&6
16221
16222                 if test "x$cf_cv_fvisibility_hidden2" = xyes
16223                 then
16224
16225 cf_save_CXXFLAGS="$CFLAGS"
16226 CFLAGS="$CXXFLAGS"
16227
16228 cf_fix_cppflags=no
16229 cf_new_cflags=
16230 cf_new_cppflags=
16231 cf_new_extra_cppflags=
16232
16233 for cf_add_cflags in -fvisibility=hidden
16234 do
16235 case "$cf_fix_cppflags" in
16236 (no)
16237         case "$cf_add_cflags" in
16238         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16239                 case "$cf_add_cflags" in
16240                 (-D*)
16241                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16242
16243                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16244                                 && test -z "${cf_tst_cflags}" \
16245                                 && cf_fix_cppflags=yes
16246
16247                         if test "$cf_fix_cppflags" = yes ; then
16248
16249         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16250         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16251
16252                                 continue
16253                         elif test "${cf_tst_cflags}" = "\"'" ; then
16254
16255         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16256         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16257
16258                                 continue
16259                         fi
16260                         ;;
16261                 esac
16262                 case "$CPPFLAGS" in
16263                 (*$cf_add_cflags)
16264                         ;;
16265                 (*)
16266                         case "$cf_add_cflags" in
16267                         (-D*)
16268                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16269
16270 CPPFLAGS=`echo "$CPPFLAGS" | \
16271         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
16272                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
16273
16274                                 ;;
16275                         esac
16276
16277         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16278         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16279
16280                         ;;
16281                 esac
16282                 ;;
16283         (*)
16284
16285         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16286         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16287
16288                 ;;
16289         esac
16290         ;;
16291 (yes)
16292
16293         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16294         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16295
16296         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16297
16298         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16299                 && test -z "${cf_tst_cflags}" \
16300                 && cf_fix_cppflags=no
16301         ;;
16302 esac
16303 done
16304
16305 if test -n "$cf_new_cflags" ; then
16306
16307         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16308         CFLAGS="${CFLAGS}$cf_new_cflags"
16309
16310 fi
16311
16312 if test -n "$cf_new_cppflags" ; then
16313
16314         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16315         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16316
16317 fi
16318
16319 if test -n "$cf_new_extra_cppflags" ; then
16320
16321         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16322         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16323
16324 fi
16325
16326 CXXFLAGS="$CFLAGS"
16327 CFLAGS="$cf_save_CXXFLAGS"
16328
16329                         NCURSES_CXX_IMPEXP="__attribute__ ((visibility(\"default\")))"
16330                 fi
16331                 ac_ext=c
16332 ac_cpp='$CPP $CPPFLAGS'
16333 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
16334 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
16335 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16336 ac_main_return="return"
16337
16338         fi
16339 fi
16340
16341 ###   use option --enable-interop to turn on use of bindings used for interop
16342 echo "$as_me:16342: checking if you want interop bindings" >&5
16343 echo $ECHO_N "checking if you want interop bindings... $ECHO_C" >&6
16344
16345 # Check whether --enable-interop or --disable-interop was given.
16346 if test "${enable_interop+set}" = set; then
16347   enableval="$enable_interop"
16348   with_exp_interop=$enableval
16349 else
16350   with_exp_interop=$cf_dft_interop
16351 fi;
16352 echo "$as_me:16352: result: $with_exp_interop" >&5
16353 echo "${ECHO_T}$with_exp_interop" >&6
16354
16355 NCURSES_INTEROP_FUNCS=0
16356 test "x$with_exp_interop" = xyes && NCURSES_INTEROP_FUNCS=1
16357
16358 echo "$as_me:16358: checking if you want experimental safe-sprintf code" >&5
16359 echo $ECHO_N "checking if you want experimental safe-sprintf code... $ECHO_C" >&6
16360
16361 # Check whether --enable-safe-sprintf or --disable-safe-sprintf was given.
16362 if test "${enable_safe_sprintf+set}" = set; then
16363   enableval="$enable_safe_sprintf"
16364   with_safe_sprintf=$enableval
16365 else
16366   with_safe_sprintf=no
16367 fi;
16368 echo "$as_me:16368: result: $with_safe_sprintf" >&5
16369 echo "${ECHO_T}$with_safe_sprintf" >&6
16370
16371 ###   use option --disable-scroll-hints to turn off use of scroll-hints scrolling logic
16372 # when hashmap is used scroll hints are useless
16373 if test "$with_hashmap" = no ; then
16374 echo "$as_me:16374: checking if you want to experiment without scrolling-hints code" >&5
16375 echo $ECHO_N "checking if you want to experiment without scrolling-hints code... $ECHO_C" >&6
16376
16377 # Check whether --enable-scroll-hints or --disable-scroll-hints was given.
16378 if test "${enable_scroll_hints+set}" = set; then
16379   enableval="$enable_scroll_hints"
16380   with_scroll_hints=$enableval
16381 else
16382   with_scroll_hints=yes
16383 fi;
16384 echo "$as_me:16384: result: $with_scroll_hints" >&5
16385 echo "${ECHO_T}$with_scroll_hints" >&6
16386 test "x$with_scroll_hints" = xyes &&
16387 cat >>confdefs.h <<\EOF
16388 #define USE_SCROLL_HINTS 1
16389 EOF
16390
16391 fi
16392
16393 echo "$as_me:16393: checking if you want wgetch-events code" >&5
16394 echo $ECHO_N "checking if you want wgetch-events code... $ECHO_C" >&6
16395
16396 # Check whether --enable-wgetch-events or --disable-wgetch-events was given.
16397 if test "${enable_wgetch_events+set}" = set; then
16398   enableval="$enable_wgetch_events"
16399   with_wgetch_events=$enableval
16400 else
16401   with_wgetch_events=no
16402 fi;
16403 echo "$as_me:16403: result: $with_wgetch_events" >&5
16404 echo "${ECHO_T}$with_wgetch_events" >&6
16405 if test "x$with_wgetch_events" = xyes ; then
16406
16407 cat >>confdefs.h <<\EOF
16408 #define NCURSES_WGETCH_EVENTS 1
16409 EOF
16410
16411         NCURSES_WGETCH_EVENTS=1
16412 else
16413         NCURSES_WGETCH_EVENTS=0
16414 fi
16415
16416 case "$cf_cv_system_name" in
16417 (*mingw32*|*mingw64*|*-msvc*)
16418         echo "$as_me:16418: checking if you want experimental-Windows driver" >&5
16419 echo $ECHO_N "checking if you want experimental-Windows driver... $ECHO_C" >&6
16420
16421 # Check whether --enable-exp-win32 or --disable-exp-win32 was given.
16422 if test "${enable_exp_win32+set}" = set; then
16423   enableval="$enable_exp_win32"
16424   with_exp_win32=$enableval
16425 else
16426   with_exp_win32=no
16427 fi;
16428         echo "$as_me:16428: result: $with_exp_win32" >&5
16429 echo "${ECHO_T}$with_exp_win32" >&6
16430         if test "x$with_exp_win32" = xyes
16431         then
16432
16433 cat >>confdefs.h <<\EOF
16434 #define EXP_WIN32_DRIVER 1
16435 EOF
16436
16437                 EXP_WIN32_DRIVER=1
16438                 INTERNALS_HDR='$(INCDIR)/nc_win32.h'
16439         else
16440                 INTERNALS_HDR='$(INCDIR)/nc_mingw.h'
16441                 EXP_WIN32_DRIVER=0
16442         fi
16443         ;;
16444 (*)
16445         EXP_WIN32_DRIVER=0
16446         INTERNALS_HDR=
16447         ;;
16448 esac
16449
16450 ###############################################################################
16451
16452 ###     use option --disable-echo to suppress full display compiling commands
16453
16454 echo "$as_me:16454: checking if you want to see long compiling messages" >&5
16455 echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
16456
16457 # Check whether --enable-echo or --disable-echo was given.
16458 if test "${enable_echo+set}" = set; then
16459   enableval="$enable_echo"
16460   test "$enableval" != no && enableval=yes
16461         if test "$enableval" != "yes" ; then
16462
16463         ECHO_LT='--silent'
16464         ECHO_LD='@echo linking $@;'
16465         RULE_CC='@echo compiling $<'
16466         SHOW_CC='@echo compiling $@'
16467         ECHO_CC='@'
16468
16469         else
16470
16471         ECHO_LT=''
16472         ECHO_LD=''
16473         RULE_CC=''
16474         SHOW_CC=''
16475         ECHO_CC=''
16476
16477         fi
16478 else
16479   enableval=yes
16480
16481         ECHO_LT=''
16482         ECHO_LD=''
16483         RULE_CC=''
16484         SHOW_CC=''
16485         ECHO_CC=''
16486
16487 fi;
16488 echo "$as_me:16488: result: $enableval" >&5
16489 echo "${ECHO_T}$enableval" >&6
16490
16491 if test "x$enable_echo" = xyes; then
16492         ECHO_LINK=
16493 else
16494         ECHO_LINK='@ echo linking $@ ... ;'
16495         test -n "$LIBTOOL" && LIBTOOL="$LIBTOOL --silent"
16496         test -n "$LIBTOOL_CXX" && LIBTOOL_CXX="$LIBTOOL_CXX --silent"
16497 fi
16498
16499 # --disable-stripping is used for debugging
16500
16501 echo "$as_me:16501: checking if you want to install stripped executables" >&5
16502 echo $ECHO_N "checking if you want to install stripped executables... $ECHO_C" >&6
16503
16504 # Check whether --enable-stripping or --disable-stripping was given.
16505 if test "${enable_stripping+set}" = set; then
16506   enableval="$enable_stripping"
16507   test "$enableval" != no && enableval=yes
16508         if test "$enableval" != "yes" ; then
16509     enable_stripping=no
16510         else
16511                 enable_stripping=yes
16512         fi
16513 else
16514   enableval=yes
16515         enable_stripping=yes
16516
16517 fi;
16518 echo "$as_me:16518: result: $enable_stripping" >&5
16519 echo "${ECHO_T}$enable_stripping" >&6
16520
16521 if test "$enable_stripping" = yes
16522 then
16523         INSTALL_OPT_S="-s"
16524 else
16525         INSTALL_OPT_S=
16526 fi
16527
16528 : "${INSTALL:=install}"
16529 echo "$as_me:16529: checking if install accepts -p option" >&5
16530 echo $ECHO_N "checking if install accepts -p option... $ECHO_C" >&6
16531 if test "${cf_cv_install_p+set}" = set; then
16532   echo $ECHO_N "(cached) $ECHO_C" >&6
16533 else
16534
16535         rm -rf ./conftest*
16536         date >conftest.in
16537         mkdir conftest.out
16538         sleep 3
16539         if $INSTALL -p conftest.in conftest.out 2>/dev/null
16540         then
16541                 if test -f conftest.out/conftest.in
16542                 then
16543                         test conftest.in -nt conftest.out/conftest.in 2>conftest.err && \
16544                         test conftest.out/conftest.in -nt conftest.in 2>conftest.err
16545                         if test -s conftest.err
16546                         then
16547                                 cf_cv_install_p=no
16548                         else
16549                                 cf_cv_install_p=yes
16550                         fi
16551                 else
16552                         cf_cv_install_p=no
16553                 fi
16554         else
16555                 cf_cv_install_p=no
16556         fi
16557         rm -rf ./conftest*
16558
16559 fi
16560 echo "$as_me:16560: result: $cf_cv_install_p" >&5
16561 echo "${ECHO_T}$cf_cv_install_p" >&6
16562
16563 echo "$as_me:16563: checking if install needs to be told about ownership" >&5
16564 echo $ECHO_N "checking if install needs to be told about ownership... $ECHO_C" >&6
16565 case `$ac_config_guess` in
16566 (*minix)
16567         with_install_o=yes
16568         ;;
16569 (*)
16570         with_install_o=no
16571         ;;
16572 esac
16573
16574 echo "$as_me:16574: result: $with_install_o" >&5
16575 echo "${ECHO_T}$with_install_o" >&6
16576 if test "x$with_install_o" = xyes
16577 then
16578         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'`"
16579 else
16580         INSTALL_OPT_O=
16581 fi
16582
16583 # If we're avoiding relinking of shared libraries during install, that is to
16584 # avoid modifying the build-tree.  For the same reason, avoid doing ranlib if
16585 # the install program has "-p" (for preserving timestamps).
16586 cf_cv_do_reranlib=yes
16587 if test "x$cf_cv_install_p" = xyes
16588 then
16589         if test "x$cf_cv_do_relink" != xyes
16590         then
16591                 cf_cv_do_reranlib=no
16592                 INSTALL_OPT_P="-p"
16593                 INSTALL_LIB="$INSTALL_LIB $INSTALL_OPT_P"
16594         fi
16595 fi
16596
16597 ###     use option --enable-warnings to turn on all gcc warnings
16598
16599 echo "$as_me:16599: checking if you want to use C11 _Noreturn feature" >&5
16600 echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
16601
16602 # Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
16603 if test "${enable_stdnoreturn+set}" = set; then
16604   enableval="$enable_stdnoreturn"
16605   test "$enableval" != yes && enableval=no
16606         if test "$enableval" != "no" ; then
16607     enable_stdnoreturn=yes
16608         else
16609                 enable_stdnoreturn=no
16610         fi
16611 else
16612   enableval=no
16613         enable_stdnoreturn=no
16614
16615 fi;
16616 echo "$as_me:16616: result: $enable_stdnoreturn" >&5
16617 echo "${ECHO_T}$enable_stdnoreturn" >&6
16618
16619 if test $enable_stdnoreturn = yes; then
16620 echo "$as_me:16620: checking for C11 _Noreturn feature" >&5
16621 echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
16622 if test "${cf_cv_c11_noreturn+set}" = set; then
16623   echo $ECHO_N "(cached) $ECHO_C" >&6
16624 else
16625   cat >"conftest.$ac_ext" <<_ACEOF
16626 #line 16626 "configure"
16627 #include "confdefs.h"
16628
16629 #include <stdio.h>
16630 #include <stdlib.h>
16631 #include <stdnoreturn.h>
16632 static _Noreturn void giveup(void) { exit(0); }
16633
16634 int
16635 main (void)
16636 {
16637 if (feof(stdin)) giveup()
16638   ;
16639   return 0;
16640 }
16641 _ACEOF
16642 rm -f "conftest.$ac_objext"
16643 if { (eval echo "$as_me:16643: \"$ac_compile\"") >&5
16644   (eval $ac_compile) 2>&5
16645   ac_status=$?
16646   echo "$as_me:16646: \$? = $ac_status" >&5
16647   (exit "$ac_status"); } &&
16648          { ac_try='test -s "conftest.$ac_objext"'
16649   { (eval echo "$as_me:16649: \"$ac_try\"") >&5
16650   (eval $ac_try) 2>&5
16651   ac_status=$?
16652   echo "$as_me:16652: \$? = $ac_status" >&5
16653   (exit "$ac_status"); }; }; then
16654   cf_cv_c11_noreturn=yes
16655 else
16656   echo "$as_me: failed program was:" >&5
16657 cat "conftest.$ac_ext" >&5
16658 cf_cv_c11_noreturn=no
16659 fi
16660 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16661
16662 fi
16663 echo "$as_me:16663: result: $cf_cv_c11_noreturn" >&5
16664 echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
16665 else
16666         cf_cv_c11_noreturn=no,
16667 fi
16668
16669 if test "$cf_cv_c11_noreturn" = yes; then
16670
16671 cat >>confdefs.h <<\EOF
16672 #define HAVE_STDNORETURN_H 1
16673 EOF
16674
16675 cat >>confdefs.h <<EOF
16676 #define STDC_NORETURN _Noreturn
16677 EOF
16678
16679         HAVE_STDNORETURN_H=1
16680 else
16681         HAVE_STDNORETURN_H=0
16682 fi
16683
16684 if test "$GCC" = yes || test "$GXX" = yes
16685 then
16686
16687 if test "$GCC" = yes || test "$GXX" = yes
16688 then
16689         case $CFLAGS in
16690         (*-Werror=*)
16691                 test -n "$verbose" && echo "    repairing CFLAGS: $CFLAGS" 1>&6
16692
16693 echo "${as_me:-configure}:16693: testing repairing CFLAGS: $CFLAGS ..." 1>&5
16694
16695                 cf_temp_flags=
16696                 for cf_temp_scan in $CFLAGS
16697                 do
16698                         case "x$cf_temp_scan" in
16699                         (x-Werror=*)
16700
16701         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16702         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16703
16704                                 ;;
16705                         (*)
16706
16707         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16708         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16709
16710                                 ;;
16711                         esac
16712                 done
16713                 CFLAGS="$cf_temp_flags"
16714                 test -n "$verbose" && echo "    ... fixed $CFLAGS" 1>&6
16715
16716 echo "${as_me:-configure}:16716: testing ... fixed $CFLAGS ..." 1>&5
16717
16718                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16719
16720 echo "${as_me:-configure}:16720: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16721
16722                 ;;
16723         esac
16724 fi
16725
16726 if test "$GCC" = yes || test "$GXX" = yes
16727 then
16728         case $CPPFLAGS in
16729         (*-Werror=*)
16730                 test -n "$verbose" && echo "    repairing CPPFLAGS: $CPPFLAGS" 1>&6
16731
16732 echo "${as_me:-configure}:16732: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
16733
16734                 cf_temp_flags=
16735                 for cf_temp_scan in $CPPFLAGS
16736                 do
16737                         case "x$cf_temp_scan" in
16738                         (x-Werror=*)
16739
16740         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16741         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16742
16743                                 ;;
16744                         (*)
16745
16746         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16747         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16748
16749                                 ;;
16750                         esac
16751                 done
16752                 CPPFLAGS="$cf_temp_flags"
16753                 test -n "$verbose" && echo "    ... fixed $CPPFLAGS" 1>&6
16754
16755 echo "${as_me:-configure}:16755: testing ... fixed $CPPFLAGS ..." 1>&5
16756
16757                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16758
16759 echo "${as_me:-configure}:16759: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16760
16761                 ;;
16762         esac
16763 fi
16764
16765 if test "$GCC" = yes || test "$GXX" = yes
16766 then
16767         case $LDFLAGS in
16768         (*-Werror=*)
16769                 test -n "$verbose" && echo "    repairing LDFLAGS: $LDFLAGS" 1>&6
16770
16771 echo "${as_me:-configure}:16771: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
16772
16773                 cf_temp_flags=
16774                 for cf_temp_scan in $LDFLAGS
16775                 do
16776                         case "x$cf_temp_scan" in
16777                         (x-Werror=*)
16778
16779         test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
16780         EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
16781
16782                                 ;;
16783                         (*)
16784
16785         test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
16786         cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
16787
16788                                 ;;
16789                         esac
16790                 done
16791                 LDFLAGS="$cf_temp_flags"
16792                 test -n "$verbose" && echo "    ... fixed $LDFLAGS" 1>&6
16793
16794 echo "${as_me:-configure}:16794: testing ... fixed $LDFLAGS ..." 1>&5
16795
16796                 test -n "$verbose" && echo "    ... extra $EXTRA_CFLAGS" 1>&6
16797
16798 echo "${as_me:-configure}:16798: testing ... extra $EXTRA_CFLAGS ..." 1>&5
16799
16800                 ;;
16801         esac
16802 fi
16803
16804 echo "$as_me:16804: checking if you want to turn on gcc warnings" >&5
16805 echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
16806
16807 # Check whether --enable-warnings or --disable-warnings was given.
16808 if test "${enable_warnings+set}" = set; then
16809   enableval="$enable_warnings"
16810   test "$enableval" != yes && enableval=no
16811         if test "$enableval" != "no" ; then
16812     enable_warnings=yes
16813         else
16814                 enable_warnings=no
16815         fi
16816 else
16817   enableval=no
16818         enable_warnings=no
16819
16820 fi;
16821 echo "$as_me:16821: result: $enable_warnings" >&5
16822 echo "${ECHO_T}$enable_warnings" >&6
16823 if test "$enable_warnings" = "yes"
16824 then
16825
16826 if test "x$have_x" = xyes; then
16827
16828 cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
16829 cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
16830 cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
16831 LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16832 for cf_X_CFLAGS in $X_CFLAGS
16833 do
16834         case "x$cf_X_CFLAGS" in
16835         x-[IUD]*)
16836                 CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16837                 ;;
16838         *)
16839                 CFLAGS="$CFLAGS $cf_X_CFLAGS"
16840                 ;;
16841         esac
16842 done
16843
16844 cat >"conftest.$ac_ext" <<_ACEOF
16845 #line 16845 "configure"
16846 #include "confdefs.h"
16847
16848 #include <stdlib.h>
16849 #include <X11/Intrinsic.h>
16850
16851 int
16852 main (void)
16853 {
16854 String foo = malloc(1); free((void*)foo)
16855   ;
16856   return 0;
16857 }
16858 _ACEOF
16859 rm -f "conftest.$ac_objext"
16860 if { (eval echo "$as_me:16860: \"$ac_compile\"") >&5
16861   (eval $ac_compile) 2>&5
16862   ac_status=$?
16863   echo "$as_me:16863: \$? = $ac_status" >&5
16864   (exit "$ac_status"); } &&
16865          { ac_try='test -s "conftest.$ac_objext"'
16866   { (eval echo "$as_me:16866: \"$ac_try\"") >&5
16867   (eval $ac_try) 2>&5
16868   ac_status=$?
16869   echo "$as_me:16869: \$? = $ac_status" >&5
16870   (exit "$ac_status"); }; }; then
16871
16872 echo "$as_me:16872: checking for X11/Xt const-feature" >&5
16873 echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
16874 if test "${cf_cv_const_x_string+set}" = set; then
16875   echo $ECHO_N "(cached) $ECHO_C" >&6
16876 else
16877
16878         cat >"conftest.$ac_ext" <<_ACEOF
16879 #line 16879 "configure"
16880 #include "confdefs.h"
16881
16882 #define _CONST_X_STRING /* X11R7.8 (perhaps) */
16883 #undef  XTSTRINGDEFINES /* X11R5 and later */
16884 #include <stdlib.h>
16885 #include <X11/Intrinsic.h>
16886
16887 int
16888 main (void)
16889 {
16890 String foo = malloc(1); *foo = 0
16891   ;
16892   return 0;
16893 }
16894 _ACEOF
16895 rm -f "conftest.$ac_objext"
16896 if { (eval echo "$as_me:16896: \"$ac_compile\"") >&5
16897   (eval $ac_compile) 2>&5
16898   ac_status=$?
16899   echo "$as_me:16899: \$? = $ac_status" >&5
16900   (exit "$ac_status"); } &&
16901          { ac_try='test -s "conftest.$ac_objext"'
16902   { (eval echo "$as_me:16902: \"$ac_try\"") >&5
16903   (eval $ac_try) 2>&5
16904   ac_status=$?
16905   echo "$as_me:16905: \$? = $ac_status" >&5
16906   (exit "$ac_status"); }; }; then
16907
16908                         cf_cv_const_x_string=no
16909
16910 else
16911   echo "$as_me: failed program was:" >&5
16912 cat "conftest.$ac_ext" >&5
16913
16914                         cf_cv_const_x_string=yes
16915
16916 fi
16917 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16918
16919 fi
16920 echo "$as_me:16920: result: $cf_cv_const_x_string" >&5
16921 echo "${ECHO_T}$cf_cv_const_x_string" >&6
16922
16923 LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
16924 CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
16925 CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
16926
16927 case "$cf_cv_const_x_string" in
16928 (no)
16929
16930         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16931         CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
16932
16933         ;;
16934 (*)
16935
16936         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16937         CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
16938
16939         ;;
16940 esac
16941
16942 else
16943   echo "$as_me: failed program was:" >&5
16944 cat "conftest.$ac_ext" >&5
16945 fi
16946 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16947  fi
16948 cat > "conftest.$ac_ext" <<EOF
16949 #line 16949 "${as_me:-configure}"
16950 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
16951 EOF
16952 if test "$INTEL_COMPILER" = yes
16953 then
16954 # The "-wdXXX" options suppress warnings:
16955 # remark #1419: external declaration in primary source file
16956 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
16957 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
16958 # remark #193: zero used for undefined preprocessing identifier
16959 # remark #593: variable "curs_sb_left_arrow" was set but never used
16960 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
16961 # remark #869: parameter "tw" was never referenced
16962 # remark #981: operands are evaluated in unspecified order
16963 # warning #279: controlling expression is constant
16964
16965         { echo "$as_me:16965: checking for $CC warning options..." >&5
16966 echo "$as_me: checking for $CC warning options..." >&6;}
16967         cf_save_CFLAGS="$CFLAGS"
16968         EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
16969         for cf_opt in \
16970                 wd1419 \
16971                 wd1683 \
16972                 wd1684 \
16973                 wd193 \
16974                 wd593 \
16975                 wd279 \
16976                 wd810 \
16977                 wd869 \
16978                 wd981
16979         do
16980                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
16981                 if { (eval echo "$as_me:16981: \"$ac_compile\"") >&5
16982   (eval $ac_compile) 2>&5
16983   ac_status=$?
16984   echo "$as_me:16984: \$? = $ac_status" >&5
16985   (exit "$ac_status"); }; then
16986                         test -n "$verbose" && echo "$as_me:16986: result: ... -$cf_opt" >&5
16987 echo "${ECHO_T}... -$cf_opt" >&6
16988                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
16989                 fi
16990         done
16991         CFLAGS="$cf_save_CFLAGS"
16992 elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
16993 then
16994         { echo "$as_me:16994: checking for $CC warning options..." >&5
16995 echo "$as_me: checking for $CC warning options..." >&6;}
16996         cf_save_CFLAGS="$CFLAGS"
16997         cf_warn_CONST=""
16998         test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
16999         cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
17000         test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
17001         for cf_opt in W Wall \
17002                 Wbad-function-cast \
17003                 Wcast-align \
17004                 Wcast-qual \
17005                 Wdeclaration-after-statement \
17006                 Wextra \
17007                 Winline \
17008                 Wmissing-declarations \
17009                 Wmissing-prototypes \
17010                 Wnested-externs \
17011                 Wpointer-arith \
17012                 Wshadow \
17013                 Wstrict-prototypes \
17014                 Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wno-unknown-pragmas Wswitch-enum
17015         do
17016                 CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
17017                 if { (eval echo "$as_me:17017: \"$ac_compile\"") >&5
17018   (eval $ac_compile) 2>&5
17019   ac_status=$?
17020   echo "$as_me:17020: \$? = $ac_status" >&5
17021   (exit "$ac_status"); }; then
17022                         test -n "$verbose" && echo "$as_me:17022: result: ... -$cf_opt" >&5
17023 echo "${ECHO_T}... -$cf_opt" >&6
17024                         case "$cf_opt" in
17025                         (Winline)
17026                                 case "$GCC_VERSION" in
17027                                 ([34].*)
17028                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17029
17030 echo "${as_me:-configure}:17030: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17031
17032                                         continue;;
17033                                 esac
17034                                 ;;
17035                         (Wpointer-arith)
17036                                 case "$GCC_VERSION" in
17037                                 ([12].*)
17038                                         test -n "$verbose" && echo "    feature is broken in gcc $GCC_VERSION" 1>&6
17039
17040 echo "${as_me:-configure}:17040: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
17041
17042                                         continue;;
17043                                 esac
17044                                 ;;
17045                         esac
17046                         EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
17047                 fi
17048         done
17049         CFLAGS="$cf_save_CFLAGS"
17050 fi
17051 rm -rf ./conftest*
17052
17053 fi
17054
17055 if test "$GCC" = yes || test "$GXX" = yes
17056 then
17057 cat > conftest.i <<EOF
17058 #ifndef GCC_PRINTF
17059 #define GCC_PRINTF 0
17060 #endif
17061 #ifndef GCC_SCANF
17062 #define GCC_SCANF 0
17063 #endif
17064 #ifndef GCC_NORETURN
17065 #define GCC_NORETURN /* nothing */
17066 #endif
17067 #ifndef GCC_UNUSED
17068 #define GCC_UNUSED /* nothing */
17069 #endif
17070 EOF
17071 if test "$GCC" = yes
17072 then
17073         { echo "$as_me:17073: checking for $CC __attribute__ directives..." >&5
17074 echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
17075 cat > "conftest.$ac_ext" <<EOF
17076 #line 17076 "${as_me:-configure}"
17077 #include "confdefs.h"
17078 #include "conftest.h"
17079 #include "conftest.i"
17080 #if     GCC_PRINTF
17081 #define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
17082 #else
17083 #define GCC_PRINTFLIKE(fmt,var) /*nothing*/
17084 #endif
17085 #if     GCC_SCANF
17086 #define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
17087 #else
17088 #define GCC_SCANFLIKE(fmt,var)  /*nothing*/
17089 #endif
17090 extern void wow(char *,...) GCC_SCANFLIKE(1,2);
17091 extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
17092 extern GCC_NORETURN void foo(void);
17093 int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
17094 EOF
17095         cf_printf_attribute=no
17096         cf_scanf_attribute=no
17097         for cf_attribute in scanf printf unused noreturn
17098         do
17099
17100 cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17101
17102                 cf_directive="__attribute__(($cf_attribute))"
17103                 echo "checking for $CC $cf_directive" 1>&5
17104
17105                 case "$cf_attribute" in
17106                 (printf)
17107                         cf_printf_attribute=yes
17108                         cat >conftest.h <<EOF
17109 #define GCC_$cf_ATTRIBUTE 1
17110 EOF
17111                         ;;
17112                 (scanf)
17113                         cf_scanf_attribute=yes
17114                         cat >conftest.h <<EOF
17115 #define GCC_$cf_ATTRIBUTE 1
17116 EOF
17117                         ;;
17118                 (*)
17119                         cat >conftest.h <<EOF
17120 #define GCC_$cf_ATTRIBUTE $cf_directive
17121 EOF
17122                         ;;
17123                 esac
17124
17125                 if { (eval echo "$as_me:17125: \"$ac_compile\"") >&5
17126   (eval $ac_compile) 2>&5
17127   ac_status=$?
17128   echo "$as_me:17128: \$? = $ac_status" >&5
17129   (exit "$ac_status"); }; then
17130                         test -n "$verbose" && echo "$as_me:17130: result: ... $cf_attribute" >&5
17131 echo "${ECHO_T}... $cf_attribute" >&6
17132                         cat conftest.h >>confdefs.h
17133                         case "$cf_attribute" in
17134                         (noreturn)
17135
17136 cat >>confdefs.h <<EOF
17137 #define GCC_NORETURN $cf_directive
17138 EOF
17139
17140                                 ;;
17141                         (printf)
17142                                 cf_value='/* nothing */'
17143                                 if test "$cf_printf_attribute" != no ; then
17144                                         cf_value='__attribute__((format(printf,fmt,var)))'
17145
17146 cat >>confdefs.h <<\EOF
17147 #define GCC_PRINTF 1
17148 EOF
17149
17150                                 fi
17151
17152 cat >>confdefs.h <<EOF
17153 #define GCC_PRINTFLIKE(fmt,var) $cf_value
17154 EOF
17155
17156                                 ;;
17157                         (scanf)
17158                                 cf_value='/* nothing */'
17159                                 if test "$cf_scanf_attribute" != no ; then
17160                                         cf_value='__attribute__((format(scanf,fmt,var)))'
17161
17162 cat >>confdefs.h <<\EOF
17163 #define GCC_SCANF 1
17164 EOF
17165
17166                                 fi
17167
17168 cat >>confdefs.h <<EOF
17169 #define GCC_SCANFLIKE(fmt,var) $cf_value
17170 EOF
17171
17172                                 ;;
17173                         (unused)
17174
17175 cat >>confdefs.h <<EOF
17176 #define GCC_UNUSED $cf_directive
17177 EOF
17178
17179                                 ;;
17180                         esac
17181                 fi
17182         done
17183 else
17184         ${FGREP-fgrep} define conftest.i >>confdefs.h
17185 fi
17186 rm -rf ./conftest*
17187 fi
17188
17189 fi
17190
17191 if test "x$enable_warnings" = "xyes"; then
17192
17193         ADAFLAGS="$ADAFLAGS -gnatg"
17194
17195         if test "x$cf_with_cxx" = xyes ; then
17196
17197 INTEL_CPLUSPLUS=no
17198
17199 if test "$GCC" = yes ; then
17200         case "$host_os" in
17201         (linux*|gnu*)
17202                 echo "$as_me:17202: checking if this is really Intel C++ compiler" >&5
17203 echo $ECHO_N "checking if this is really Intel C++ compiler... $ECHO_C" >&6
17204                 cf_save_CFLAGS="$CXXFLAGS"
17205                 CXXFLAGS="$CXXFLAGS -no-gcc"
17206                 cat >"conftest.$ac_ext" <<_ACEOF
17207 #line 17207 "configure"
17208 #include "confdefs.h"
17209
17210 int
17211 main (void)
17212 {
17213
17214 #ifdef __INTEL_COMPILER
17215 #else
17216 make an error
17217 #endif
17218
17219   ;
17220   return 0;
17221 }
17222 _ACEOF
17223 rm -f "conftest.$ac_objext"
17224 if { (eval echo "$as_me:17224: \"$ac_compile\"") >&5
17225   (eval $ac_compile) 2>&5
17226   ac_status=$?
17227   echo "$as_me:17227: \$? = $ac_status" >&5
17228   (exit "$ac_status"); } &&
17229          { ac_try='test -s "conftest.$ac_objext"'
17230   { (eval echo "$as_me:17230: \"$ac_try\"") >&5
17231   (eval $ac_try) 2>&5
17232   ac_status=$?
17233   echo "$as_me:17233: \$? = $ac_status" >&5
17234   (exit "$ac_status"); }; }; then
17235   INTEL_CPLUSPLUS=yes
17236 cf_save_CFLAGS="$cf_save_CFLAGS -we147"
17237
17238 else
17239   echo "$as_me: failed program was:" >&5
17240 cat "conftest.$ac_ext" >&5
17241 fi
17242 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17243                 CXXFLAGS="$cf_save_CFLAGS"
17244                 echo "$as_me:17244: result: $INTEL_CPLUSPLUS" >&5
17245 echo "${ECHO_T}$INTEL_CPLUSPLUS" >&6
17246                 ;;
17247         esac
17248 fi
17249
17250 CLANG_CPLUSPLUS=no
17251
17252 if test "$GCC" = yes ; then
17253         echo "$as_me:17253: checking if this is really Clang C++ compiler" >&5
17254 echo $ECHO_N "checking if this is really Clang C++ compiler... $ECHO_C" >&6
17255         cf_save_CFLAGS="$CXXFLAGS"
17256         cat >"conftest.$ac_ext" <<_ACEOF
17257 #line 17257 "configure"
17258 #include "confdefs.h"
17259
17260 int
17261 main (void)
17262 {
17263
17264 #ifdef __clang__
17265 #else
17266 make an error
17267 #endif
17268
17269   ;
17270   return 0;
17271 }
17272 _ACEOF
17273 rm -f "conftest.$ac_objext"
17274 if { (eval echo "$as_me:17274: \"$ac_compile\"") >&5
17275   (eval $ac_compile) 2>&5
17276   ac_status=$?
17277   echo "$as_me:17277: \$? = $ac_status" >&5
17278   (exit "$ac_status"); } &&
17279          { ac_try='test -s "conftest.$ac_objext"'
17280   { (eval echo "$as_me:17280: \"$ac_try\"") >&5
17281   (eval $ac_try) 2>&5
17282   ac_status=$?
17283   echo "$as_me:17283: \$? = $ac_status" >&5
17284   (exit "$ac_status"); }; }; then
17285   CLANG_CPLUSPLUS=yes
17286
17287 else
17288   echo "$as_me: failed program was:" >&5
17289 cat "conftest.$ac_ext" >&5
17290 fi
17291 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17292         CXXFLAGS="$cf_save_CFLAGS"
17293         echo "$as_me:17293: result: $CLANG_CPLUSPLUS" >&5
17294 echo "${ECHO_T}$CLANG_CPLUSPLUS" >&6
17295 fi
17296
17297 CLANG_VERSION=none
17298
17299 if test "x$CLANG_CPLUSPLUS" = "xyes" ; then
17300         case "$CC" in
17301         (c[1-9][0-9]|*/c[1-9][0-9])
17302                 { echo "$as_me:17302: WARNING: replacing broken compiler alias $CC" >&5
17303 echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
17304                 CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
17305                 CC=clang
17306                 ;;
17307         esac
17308
17309         echo "$as_me:17309: checking version of $CC" >&5
17310 echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
17311         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.].*//'`"
17312         test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
17313         echo "$as_me:17313: result: $CLANG_VERSION" >&5
17314 echo "${ECHO_T}$CLANG_VERSION" >&6
17315
17316         for cf_clang_opt in \
17317                 -Qunused-arguments \
17318                 -Wno-error=implicit-function-declaration
17319         do
17320                 echo "$as_me:17320: checking if option $cf_clang_opt works" >&5
17321 echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
17322                 cf_save_CFLAGS="$CFLAGS"
17323                 CFLAGS="$CFLAGS $cf_clang_opt"
17324                 cat >"conftest.$ac_ext" <<_ACEOF
17325 #line 17325 "configure"
17326 #include "confdefs.h"
17327
17328                         #include <stdio.h>
17329 int
17330 main (void)
17331 {
17332
17333                         printf("hello!\\n");
17334   ;
17335   return 0;
17336 }
17337 _ACEOF
17338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17339 if { (eval echo "$as_me:17339: \"$ac_link\"") >&5
17340   (eval $ac_link) 2>&5
17341   ac_status=$?
17342   echo "$as_me:17342: \$? = $ac_status" >&5
17343   (exit "$ac_status"); } &&
17344          { ac_try='test -s "conftest$ac_exeext"'
17345   { (eval echo "$as_me:17345: \"$ac_try\"") >&5
17346   (eval $ac_try) 2>&5
17347   ac_status=$?
17348   echo "$as_me:17348: \$? = $ac_status" >&5
17349   (exit "$ac_status"); }; }; then
17350
17351                         cf_clang_optok=yes
17352 else
17353   echo "$as_me: failed program was:" >&5
17354 cat "conftest.$ac_ext" >&5
17355
17356                         cf_clang_optok=no
17357 fi
17358 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17359                 echo "$as_me:17359: result: $cf_clang_optok" >&5
17360 echo "${ECHO_T}$cf_clang_optok" >&6
17361                 CFLAGS="$cf_save_CFLAGS"
17362                 if test "$cf_clang_optok" = yes; then
17363                         test -n "$verbose" && echo "    adding option $cf_clang_opt" 1>&6
17364
17365 echo "${as_me:-configure}:17365: testing adding option $cf_clang_opt ..." 1>&5
17366
17367         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17368         CFLAGS="${CFLAGS}$cf_clang_opt"
17369
17370                 fi
17371         done
17372 fi
17373
17374 ac_ext=cc
17375 ac_cpp='$CXXCPP $CPPFLAGS'
17376 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17377 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17378 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
17379 ac_main_return="return"
17380
17381 cat > conftest.$ac_ext <<EOF
17382 #line 17382 "configure"
17383 int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
17384 EOF
17385
17386 if test "$INTEL_CPLUSPLUS" = yes
17387 then
17388 # The "-wdXXX" options suppress warnings:
17389 # remark #1419: external declaration in primary source file
17390 # remark #1682: implicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17391 # remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
17392 # remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
17393 # remark #193: zero used for undefined preprocessing identifier
17394 # remark #593: variable "curs_sb_left_arrow" was set but never used
17395 # remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
17396 # remark #869: parameter "tw" was never referenced
17397 # remark #981: operands are evaluated in unspecified order
17398 # warning #269: invalid format string conversion
17399
17400         { echo "$as_me:17400: checking for $CC warning options..." >&5
17401 echo "$as_me: checking for $CC warning options..." >&6;}
17402         cf_save_CXXFLAGS="$CXXFLAGS"
17403         EXTRA_CXXFLAGS="-Wall"
17404         for cf_opt in \
17405                 wd1419 \
17406                 wd1682 \
17407                 wd1683 \
17408                 wd1684 \
17409                 wd193 \
17410                 wd279 \
17411                 wd593 \
17412                 wd810 \
17413                 wd869 \
17414                 wd981
17415         do
17416                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -$cf_opt"
17417                 if { (eval echo "$as_me:17417: \"$ac_compile\"") >&5
17418   (eval $ac_compile) 2>&5
17419   ac_status=$?
17420   echo "$as_me:17420: \$? = $ac_status" >&5
17421   (exit "$ac_status"); }; then
17422                         test -n "$verbose" && echo "$as_me:17422: result: ... -$cf_opt" >&5
17423 echo "${ECHO_T}... -$cf_opt" >&6
17424                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17425                 fi
17426         done
17427         CXXFLAGS="$cf_save_CXXFLAGS"
17428
17429 elif test "$GXX" = yes
17430 then
17431         { echo "$as_me:17431: checking for $CXX warning options..." >&5
17432 echo "$as_me: checking for $CXX warning options..." >&6;}
17433         cf_save_CXXFLAGS="$CXXFLAGS"
17434         EXTRA_CXXFLAGS="-W -Wall"
17435         cf_gxx_extra_warnings=""
17436         test "$with_ext_const" = yes && cf_gxx_extra_warnings="Wwrite-strings"
17437         case "$GXX_VERSION" in
17438         ([1-2].*)
17439                 ;;
17440         (*)
17441                 cf_gxx_extra_warnings="$cf_gxx_extra_warnings Weffc++"
17442                 ;;
17443         esac
17444         for cf_opt in \
17445                 Wabi \
17446                 fabi-version=0 \
17447                 Wextra \
17448                 Wignored-qualifiers \
17449                 Wlogical-op \
17450                 Woverloaded-virtual \
17451                 Wsign-promo \
17452                 Wsynth \
17453                 Wold-style-cast \
17454                 Wcast-align \
17455                 Wcast-qual \
17456                 Wpointer-arith \
17457                 Wshadow \
17458                 Wundef $cf_gxx_extra_warnings Wno-unused
17459         do
17460                 CXXFLAGS="$cf_save_CXXFLAGS $EXTRA_CXXFLAGS -Werror -$cf_opt"
17461                 if { (eval echo "$as_me:17461: \"$ac_compile\"") >&5
17462   (eval $ac_compile) 2>&5
17463   ac_status=$?
17464   echo "$as_me:17464: \$? = $ac_status" >&5
17465   (exit "$ac_status"); }; then
17466                         test -n "$verbose" && echo "$as_me:17466: result: ... -$cf_opt" >&5
17467 echo "${ECHO_T}... -$cf_opt" >&6
17468                         EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -$cf_opt"
17469                 else
17470                         test -n "$verbose" && echo "$as_me:17470: result: ... no -$cf_opt" >&5
17471 echo "${ECHO_T}... no -$cf_opt" >&6
17472                 fi
17473         done
17474         CXXFLAGS="$cf_save_CXXFLAGS"
17475 fi
17476
17477 rm -rf ./conftest*
17478 ac_ext=c
17479 ac_cpp='$CPP $CPPFLAGS'
17480 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
17481 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
17482 ac_compiler_gnu=$ac_cv_c_compiler_gnu
17483 ac_main_return="return"
17484
17485         fi
17486 fi
17487
17488 echo "$as_me:17488: checking if you want to work around bogus compiler/loader warnings" >&5
17489 echo $ECHO_N "checking if you want to work around bogus compiler/loader warnings... $ECHO_C" >&6
17490
17491 # Check whether --enable-string-hacks or --disable-string-hacks was given.
17492 if test "${enable_string_hacks+set}" = set; then
17493   enableval="$enable_string_hacks"
17494   enable_string_hacks=$enableval
17495 else
17496   enable_string_hacks=no
17497 fi;
17498 echo "$as_me:17498: result: $enable_string_hacks" >&5
17499 echo "${ECHO_T}$enable_string_hacks" >&6
17500
17501 if test "x$enable_string_hacks" = "xyes"; then
17502
17503 cat >>confdefs.h <<\EOF
17504 #define USE_STRING_HACKS 1
17505 EOF
17506
17507         { echo "$as_me:17507: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&5
17508 echo "$as_me: WARNING: enabling string-hacks to work around bogus compiler/loader warnings" >&2;}
17509         echo "$as_me:17509: checking for strlcat" >&5
17510 echo $ECHO_N "checking for strlcat... $ECHO_C" >&6
17511 if test "${ac_cv_func_strlcat+set}" = set; then
17512   echo $ECHO_N "(cached) $ECHO_C" >&6
17513 else
17514   cat >"conftest.$ac_ext" <<_ACEOF
17515 #line 17515 "configure"
17516 #include "confdefs.h"
17517 #define strlcat autoconf_temporary
17518 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17519 #undef strlcat
17520
17521 #ifdef __cplusplus
17522 extern "C"
17523 #endif
17524
17525 /* We use char because int might match the return type of a gcc2
17526    builtin and then its argument prototype would still apply.  */
17527 char strlcat (void);
17528
17529 int
17530 main (void)
17531 {
17532
17533 /* The GNU C library defines stubs for functions which it implements
17534     to always fail with ENOSYS.  Some functions are actually named
17535     something starting with __ and the normal name is an alias.  */
17536 #if defined (__stub_strlcat) || defined (__stub___strlcat)
17537 #error found stub for strlcat
17538 #endif
17539
17540         return strlcat ();
17541   ;
17542   return 0;
17543 }
17544 _ACEOF
17545 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17546 if { (eval echo "$as_me:17546: \"$ac_link\"") >&5
17547   (eval $ac_link) 2>&5
17548   ac_status=$?
17549   echo "$as_me:17549: \$? = $ac_status" >&5
17550   (exit "$ac_status"); } &&
17551          { ac_try='test -s "conftest$ac_exeext"'
17552   { (eval echo "$as_me:17552: \"$ac_try\"") >&5
17553   (eval $ac_try) 2>&5
17554   ac_status=$?
17555   echo "$as_me:17555: \$? = $ac_status" >&5
17556   (exit "$ac_status"); }; }; then
17557   ac_cv_func_strlcat=yes
17558 else
17559   echo "$as_me: failed program was:" >&5
17560 cat "conftest.$ac_ext" >&5
17561 ac_cv_func_strlcat=no
17562 fi
17563 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17564 fi
17565 echo "$as_me:17565: result: $ac_cv_func_strlcat" >&5
17566 echo "${ECHO_T}$ac_cv_func_strlcat" >&6
17567 if test "$ac_cv_func_strlcat" = yes; then
17568
17569 cat >>confdefs.h <<\EOF
17570 #define HAVE_STRLCAT 1
17571 EOF
17572
17573 else
17574
17575                 echo "$as_me:17575: checking for strlcat in -lbsd" >&5
17576 echo $ECHO_N "checking for strlcat in -lbsd... $ECHO_C" >&6
17577 if test "${ac_cv_lib_bsd_strlcat+set}" = set; then
17578   echo $ECHO_N "(cached) $ECHO_C" >&6
17579 else
17580   ac_check_lib_save_LIBS=$LIBS
17581 LIBS="-lbsd  $LIBS"
17582 cat >"conftest.$ac_ext" <<_ACEOF
17583 #line 17583 "configure"
17584 #include "confdefs.h"
17585
17586 /* Override any gcc2 internal prototype to avoid an error.  */
17587 #ifdef __cplusplus
17588 extern "C"
17589 #endif
17590 /* We use char because int might match the return type of a gcc2
17591    builtin and then its argument prototype would still apply.  */
17592 char strlcat ();
17593 int
17594 main (void)
17595 {
17596 strlcat ();
17597   ;
17598   return 0;
17599 }
17600 _ACEOF
17601 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17602 if { (eval echo "$as_me:17602: \"$ac_link\"") >&5
17603   (eval $ac_link) 2>&5
17604   ac_status=$?
17605   echo "$as_me:17605: \$? = $ac_status" >&5
17606   (exit "$ac_status"); } &&
17607          { ac_try='test -s "conftest$ac_exeext"'
17608   { (eval echo "$as_me:17608: \"$ac_try\"") >&5
17609   (eval $ac_try) 2>&5
17610   ac_status=$?
17611   echo "$as_me:17611: \$? = $ac_status" >&5
17612   (exit "$ac_status"); }; }; then
17613   ac_cv_lib_bsd_strlcat=yes
17614 else
17615   echo "$as_me: failed program was:" >&5
17616 cat "conftest.$ac_ext" >&5
17617 ac_cv_lib_bsd_strlcat=no
17618 fi
17619 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17620 LIBS=$ac_check_lib_save_LIBS
17621 fi
17622 echo "$as_me:17622: result: $ac_cv_lib_bsd_strlcat" >&5
17623 echo "${ECHO_T}$ac_cv_lib_bsd_strlcat" >&6
17624 if test "$ac_cv_lib_bsd_strlcat" = yes; then
17625
17626 cf_add_libs="$LIBS"
17627 # reverse order
17628 cf_add_0lib=
17629 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17630 # filter duplicates
17631 for cf_add_1lib in $cf_add_0lib; do
17632         for cf_add_2lib in $cf_add_libs; do
17633                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17634                         cf_add_1lib=
17635                         break
17636                 fi
17637         done
17638         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17639 done
17640 LIBS="$cf_add_libs"
17641
17642 for ac_header in bsd/string.h
17643 do
17644 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
17645 echo "$as_me:17645: checking for $ac_header" >&5
17646 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
17647 if eval "test \"\${$as_ac_Header+set}\" = set"; then
17648   echo $ECHO_N "(cached) $ECHO_C" >&6
17649 else
17650   cat >"conftest.$ac_ext" <<_ACEOF
17651 #line 17651 "configure"
17652 #include "confdefs.h"
17653 #include <$ac_header>
17654 _ACEOF
17655 if { (eval echo "$as_me:17655: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17656   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17657   ac_status=$?
17658   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17659   rm -f conftest.er1
17660   cat conftest.err >&5
17661   echo "$as_me:17661: \$? = $ac_status" >&5
17662   (exit "$ac_status"); } >/dev/null; then
17663   if test -s conftest.err; then
17664     ac_cpp_err=$ac_c_preproc_warn_flag
17665   else
17666     ac_cpp_err=
17667   fi
17668 else
17669   ac_cpp_err=yes
17670 fi
17671 if test -z "$ac_cpp_err"; then
17672   eval "$as_ac_Header=yes"
17673 else
17674   echo "$as_me: failed program was:" >&5
17675   cat "conftest.$ac_ext" >&5
17676   eval "$as_ac_Header=no"
17677 fi
17678 rm -f conftest.err "conftest.$ac_ext"
17679 fi
17680 echo "$as_me:17680: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
17681 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
17682 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
17683   cat >>confdefs.h <<EOF
17684 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
17685 EOF
17686
17687 fi
17688 done
17689
17690 cat >>confdefs.h <<\EOF
17691 #define HAVE_STRLCAT 1
17692 EOF
17693
17694 fi
17695
17696 fi
17697
17698 for ac_func in strlcpy snprintf
17699 do
17700 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17701 echo "$as_me:17701: checking for $ac_func" >&5
17702 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17703 if eval "test \"\${$as_ac_var+set}\" = set"; then
17704   echo $ECHO_N "(cached) $ECHO_C" >&6
17705 else
17706   cat >"conftest.$ac_ext" <<_ACEOF
17707 #line 17707 "configure"
17708 #include "confdefs.h"
17709 #define $ac_func autoconf_temporary
17710 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
17711 #undef $ac_func
17712
17713 #ifdef __cplusplus
17714 extern "C"
17715 #endif
17716
17717 /* We use char because int might match the return type of a gcc2
17718    builtin and then its argument prototype would still apply.  */
17719 char $ac_func (void);
17720
17721 int
17722 main (void)
17723 {
17724
17725 /* The GNU C library defines stubs for functions which it implements
17726     to always fail with ENOSYS.  Some functions are actually named
17727     something starting with __ and the normal name is an alias.  */
17728 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17729 #error found stub for $ac_func
17730 #endif
17731
17732         return $ac_func ();
17733   ;
17734   return 0;
17735 }
17736 _ACEOF
17737 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17738 if { (eval echo "$as_me:17738: \"$ac_link\"") >&5
17739   (eval $ac_link) 2>&5
17740   ac_status=$?
17741   echo "$as_me:17741: \$? = $ac_status" >&5
17742   (exit "$ac_status"); } &&
17743          { ac_try='test -s "conftest$ac_exeext"'
17744   { (eval echo "$as_me:17744: \"$ac_try\"") >&5
17745   (eval $ac_try) 2>&5
17746   ac_status=$?
17747   echo "$as_me:17747: \$? = $ac_status" >&5
17748   (exit "$ac_status"); }; }; then
17749   eval "$as_ac_var=yes"
17750 else
17751   echo "$as_me: failed program was:" >&5
17752 cat "conftest.$ac_ext" >&5
17753 eval "$as_ac_var=no"
17754 fi
17755 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17756 fi
17757 echo "$as_me:17757: result: `eval echo '${'"$as_ac_var"'}'`" >&5
17758 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
17759 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
17760   cat >>confdefs.h <<EOF
17761 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17762 EOF
17763
17764 fi
17765 done
17766
17767 fi
17768
17769 ###     use option --enable-assertions to turn on generation of assertion code
17770 echo "$as_me:17770: checking if you want to enable runtime assertions" >&5
17771 echo $ECHO_N "checking if you want to enable runtime assertions... $ECHO_C" >&6
17772
17773 # Check whether --enable-assertions or --disable-assertions was given.
17774 if test "${enable_assertions+set}" = set; then
17775   enableval="$enable_assertions"
17776   with_assertions=$enableval
17777 else
17778   with_assertions=no
17779 fi;
17780 echo "$as_me:17780: result: $with_assertions" >&5
17781 echo "${ECHO_T}$with_assertions" >&6
17782 if test -n "$GCC"
17783 then
17784         if test "$with_assertions" = no
17785         then
17786                 CPPFLAGS="$CPPFLAGS -DNDEBUG"
17787         else
17788
17789         ADAFLAGS="$ADAFLAGS -gnata"
17790
17791         fi
17792 fi
17793
17794 ###     use option --disable-leaks to suppress "permanent" leaks, for testing
17795
17796 echo "$as_me:17796: checking if you want to use dmalloc for testing" >&5
17797 echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
17798
17799 # Check whether --with-dmalloc or --without-dmalloc was given.
17800 if test "${with_dmalloc+set}" = set; then
17801   withval="$with_dmalloc"
17802   case "x$withval" in
17803         (x|xno) ;;
17804         (*)
17805                 : "${with_cflags:=-g}"
17806                 : "${enable_leaks:=no}"
17807                 with_dmalloc=yes
17808
17809 cat >>confdefs.h <<EOF
17810 #define USE_DMALLOC 1
17811 EOF
17812
17813                 ;;
17814         esac
17815 else
17816   with_dmalloc=
17817 fi;
17818 echo "$as_me:17818: result: ${with_dmalloc:-no}" >&5
17819 echo "${ECHO_T}${with_dmalloc:-no}" >&6
17820
17821 case ".$with_cflags" in
17822 (.*-g*)
17823         case .$CFLAGS in
17824         (.*-g*)
17825                 ;;
17826         (*)
17827
17828 cf_fix_cppflags=no
17829 cf_new_cflags=
17830 cf_new_cppflags=
17831 cf_new_extra_cppflags=
17832
17833 for cf_add_cflags in -g
17834 do
17835 case "$cf_fix_cppflags" in
17836 (no)
17837         case "$cf_add_cflags" in
17838         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17839                 case "$cf_add_cflags" in
17840                 (-D*)
17841                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17842
17843                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17844                                 && test -z "${cf_tst_cflags}" \
17845                                 && cf_fix_cppflags=yes
17846
17847                         if test "$cf_fix_cppflags" = yes ; then
17848
17849         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17850         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17851
17852                                 continue
17853                         elif test "${cf_tst_cflags}" = "\"'" ; then
17854
17855         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17856         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17857
17858                                 continue
17859                         fi
17860                         ;;
17861                 esac
17862                 case "$CPPFLAGS" in
17863                 (*$cf_add_cflags)
17864                         ;;
17865                 (*)
17866                         case "$cf_add_cflags" in
17867                         (-D*)
17868                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17869
17870 CPPFLAGS=`echo "$CPPFLAGS" | \
17871         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
17872                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
17873
17874                                 ;;
17875                         esac
17876
17877         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17878         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17879
17880                         ;;
17881                 esac
17882                 ;;
17883         (*)
17884
17885         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17886         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17887
17888                 ;;
17889         esac
17890         ;;
17891 (yes)
17892
17893         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17894         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17895
17896         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17897
17898         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17899                 && test -z "${cf_tst_cflags}" \
17900                 && cf_fix_cppflags=no
17901         ;;
17902 esac
17903 done
17904
17905 if test -n "$cf_new_cflags" ; then
17906
17907         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17908         CFLAGS="${CFLAGS}$cf_new_cflags"
17909
17910 fi
17911
17912 if test -n "$cf_new_cppflags" ; then
17913
17914         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17915         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17916
17917 fi
17918
17919 if test -n "$cf_new_extra_cppflags" ; then
17920
17921         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17922         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17923
17924 fi
17925
17926                 ;;
17927         esac
17928         ;;
17929 esac
17930
17931 if test "$with_dmalloc" = yes ; then
17932         echo "$as_me:17932: checking for dmalloc.h" >&5
17933 echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
17934 if test "${ac_cv_header_dmalloc_h+set}" = set; then
17935   echo $ECHO_N "(cached) $ECHO_C" >&6
17936 else
17937   cat >"conftest.$ac_ext" <<_ACEOF
17938 #line 17938 "configure"
17939 #include "confdefs.h"
17940 #include <dmalloc.h>
17941 _ACEOF
17942 if { (eval echo "$as_me:17942: \"$ac_cpp "conftest.$ac_ext"\"") >&5
17943   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
17944   ac_status=$?
17945   $EGREP -v '^ *\+' conftest.er1 >conftest.err
17946   rm -f conftest.er1
17947   cat conftest.err >&5
17948   echo "$as_me:17948: \$? = $ac_status" >&5
17949   (exit "$ac_status"); } >/dev/null; then
17950   if test -s conftest.err; then
17951     ac_cpp_err=$ac_c_preproc_warn_flag
17952   else
17953     ac_cpp_err=
17954   fi
17955 else
17956   ac_cpp_err=yes
17957 fi
17958 if test -z "$ac_cpp_err"; then
17959   ac_cv_header_dmalloc_h=yes
17960 else
17961   echo "$as_me: failed program was:" >&5
17962   cat "conftest.$ac_ext" >&5
17963   ac_cv_header_dmalloc_h=no
17964 fi
17965 rm -f conftest.err "conftest.$ac_ext"
17966 fi
17967 echo "$as_me:17967: result: $ac_cv_header_dmalloc_h" >&5
17968 echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
17969 if test "$ac_cv_header_dmalloc_h" = yes; then
17970
17971 echo "$as_me:17971: checking for dmalloc_debug in -ldmalloc" >&5
17972 echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
17973 if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
17974   echo $ECHO_N "(cached) $ECHO_C" >&6
17975 else
17976   ac_check_lib_save_LIBS=$LIBS
17977 LIBS="-ldmalloc  $LIBS"
17978 cat >"conftest.$ac_ext" <<_ACEOF
17979 #line 17979 "configure"
17980 #include "confdefs.h"
17981
17982 /* Override any gcc2 internal prototype to avoid an error.  */
17983 #ifdef __cplusplus
17984 extern "C"
17985 #endif
17986 /* We use char because int might match the return type of a gcc2
17987    builtin and then its argument prototype would still apply.  */
17988 char dmalloc_debug ();
17989 int
17990 main (void)
17991 {
17992 dmalloc_debug ();
17993   ;
17994   return 0;
17995 }
17996 _ACEOF
17997 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17998 if { (eval echo "$as_me:17998: \"$ac_link\"") >&5
17999   (eval $ac_link) 2>&5
18000   ac_status=$?
18001   echo "$as_me:18001: \$? = $ac_status" >&5
18002   (exit "$ac_status"); } &&
18003          { ac_try='test -s "conftest$ac_exeext"'
18004   { (eval echo "$as_me:18004: \"$ac_try\"") >&5
18005   (eval $ac_try) 2>&5
18006   ac_status=$?
18007   echo "$as_me:18007: \$? = $ac_status" >&5
18008   (exit "$ac_status"); }; }; then
18009   ac_cv_lib_dmalloc_dmalloc_debug=yes
18010 else
18011   echo "$as_me: failed program was:" >&5
18012 cat "conftest.$ac_ext" >&5
18013 ac_cv_lib_dmalloc_dmalloc_debug=no
18014 fi
18015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18016 LIBS=$ac_check_lib_save_LIBS
18017 fi
18018 echo "$as_me:18018: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18019 echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18020 if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
18021   cat >>confdefs.h <<EOF
18022 #define HAVE_LIBDMALLOC 1
18023 EOF
18024
18025   LIBS="-ldmalloc $LIBS"
18026
18027 fi
18028
18029 fi
18030
18031 fi
18032
18033 echo "$as_me:18033: checking if you want to use dbmalloc for testing" >&5
18034 echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
18035
18036 # Check whether --with-dbmalloc or --without-dbmalloc was given.
18037 if test "${with_dbmalloc+set}" = set; then
18038   withval="$with_dbmalloc"
18039   case "x$withval" in
18040         (x|xno) ;;
18041         (*)
18042                 : "${with_cflags:=-g}"
18043                 : "${enable_leaks:=no}"
18044                 with_dbmalloc=yes
18045
18046 cat >>confdefs.h <<EOF
18047 #define USE_DBMALLOC 1
18048 EOF
18049
18050                 ;;
18051         esac
18052 else
18053   with_dbmalloc=
18054 fi;
18055 echo "$as_me:18055: result: ${with_dbmalloc:-no}" >&5
18056 echo "${ECHO_T}${with_dbmalloc:-no}" >&6
18057
18058 case ".$with_cflags" in
18059 (.*-g*)
18060         case .$CFLAGS in
18061         (.*-g*)
18062                 ;;
18063         (*)
18064
18065 cf_fix_cppflags=no
18066 cf_new_cflags=
18067 cf_new_cppflags=
18068 cf_new_extra_cppflags=
18069
18070 for cf_add_cflags in -g
18071 do
18072 case "$cf_fix_cppflags" in
18073 (no)
18074         case "$cf_add_cflags" in
18075         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18076                 case "$cf_add_cflags" in
18077                 (-D*)
18078                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18079
18080                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18081                                 && test -z "${cf_tst_cflags}" \
18082                                 && cf_fix_cppflags=yes
18083
18084                         if test "$cf_fix_cppflags" = yes ; then
18085
18086         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18087         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18088
18089                                 continue
18090                         elif test "${cf_tst_cflags}" = "\"'" ; then
18091
18092         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18093         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18094
18095                                 continue
18096                         fi
18097                         ;;
18098                 esac
18099                 case "$CPPFLAGS" in
18100                 (*$cf_add_cflags)
18101                         ;;
18102                 (*)
18103                         case "$cf_add_cflags" in
18104                         (-D*)
18105                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18106
18107 CPPFLAGS=`echo "$CPPFLAGS" | \
18108         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18109                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18110
18111                                 ;;
18112                         esac
18113
18114         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18115         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18116
18117                         ;;
18118                 esac
18119                 ;;
18120         (*)
18121
18122         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18123         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18124
18125                 ;;
18126         esac
18127         ;;
18128 (yes)
18129
18130         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18131         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18132
18133         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18134
18135         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18136                 && test -z "${cf_tst_cflags}" \
18137                 && cf_fix_cppflags=no
18138         ;;
18139 esac
18140 done
18141
18142 if test -n "$cf_new_cflags" ; then
18143
18144         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18145         CFLAGS="${CFLAGS}$cf_new_cflags"
18146
18147 fi
18148
18149 if test -n "$cf_new_cppflags" ; then
18150
18151         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18152         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18153
18154 fi
18155
18156 if test -n "$cf_new_extra_cppflags" ; then
18157
18158         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18159         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18160
18161 fi
18162
18163                 ;;
18164         esac
18165         ;;
18166 esac
18167
18168 if test "$with_dbmalloc" = yes ; then
18169         echo "$as_me:18169: checking for dbmalloc.h" >&5
18170 echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18171 if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18172   echo $ECHO_N "(cached) $ECHO_C" >&6
18173 else
18174   cat >"conftest.$ac_ext" <<_ACEOF
18175 #line 18175 "configure"
18176 #include "confdefs.h"
18177 #include <dbmalloc.h>
18178 _ACEOF
18179 if { (eval echo "$as_me:18179: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18180   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18181   ac_status=$?
18182   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18183   rm -f conftest.er1
18184   cat conftest.err >&5
18185   echo "$as_me:18185: \$? = $ac_status" >&5
18186   (exit "$ac_status"); } >/dev/null; then
18187   if test -s conftest.err; then
18188     ac_cpp_err=$ac_c_preproc_warn_flag
18189   else
18190     ac_cpp_err=
18191   fi
18192 else
18193   ac_cpp_err=yes
18194 fi
18195 if test -z "$ac_cpp_err"; then
18196   ac_cv_header_dbmalloc_h=yes
18197 else
18198   echo "$as_me: failed program was:" >&5
18199   cat "conftest.$ac_ext" >&5
18200   ac_cv_header_dbmalloc_h=no
18201 fi
18202 rm -f conftest.err "conftest.$ac_ext"
18203 fi
18204 echo "$as_me:18204: result: $ac_cv_header_dbmalloc_h" >&5
18205 echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18206 if test "$ac_cv_header_dbmalloc_h" = yes; then
18207
18208 echo "$as_me:18208: checking for debug_malloc in -ldbmalloc" >&5
18209 echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18210 if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18211   echo $ECHO_N "(cached) $ECHO_C" >&6
18212 else
18213   ac_check_lib_save_LIBS=$LIBS
18214 LIBS="-ldbmalloc  $LIBS"
18215 cat >"conftest.$ac_ext" <<_ACEOF
18216 #line 18216 "configure"
18217 #include "confdefs.h"
18218
18219 /* Override any gcc2 internal prototype to avoid an error.  */
18220 #ifdef __cplusplus
18221 extern "C"
18222 #endif
18223 /* We use char because int might match the return type of a gcc2
18224    builtin and then its argument prototype would still apply.  */
18225 char debug_malloc ();
18226 int
18227 main (void)
18228 {
18229 debug_malloc ();
18230   ;
18231   return 0;
18232 }
18233 _ACEOF
18234 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18235 if { (eval echo "$as_me:18235: \"$ac_link\"") >&5
18236   (eval $ac_link) 2>&5
18237   ac_status=$?
18238   echo "$as_me:18238: \$? = $ac_status" >&5
18239   (exit "$ac_status"); } &&
18240          { ac_try='test -s "conftest$ac_exeext"'
18241   { (eval echo "$as_me:18241: \"$ac_try\"") >&5
18242   (eval $ac_try) 2>&5
18243   ac_status=$?
18244   echo "$as_me:18244: \$? = $ac_status" >&5
18245   (exit "$ac_status"); }; }; then
18246   ac_cv_lib_dbmalloc_debug_malloc=yes
18247 else
18248   echo "$as_me: failed program was:" >&5
18249 cat "conftest.$ac_ext" >&5
18250 ac_cv_lib_dbmalloc_debug_malloc=no
18251 fi
18252 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18253 LIBS=$ac_check_lib_save_LIBS
18254 fi
18255 echo "$as_me:18255: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18256 echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18257 if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
18258   cat >>confdefs.h <<EOF
18259 #define HAVE_LIBDBMALLOC 1
18260 EOF
18261
18262   LIBS="-ldbmalloc $LIBS"
18263
18264 fi
18265
18266 fi
18267
18268 fi
18269
18270 echo "$as_me:18270: checking if you want to use valgrind for testing" >&5
18271 echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
18272
18273 # Check whether --with-valgrind or --without-valgrind was given.
18274 if test "${with_valgrind+set}" = set; then
18275   withval="$with_valgrind"
18276   case "x$withval" in
18277         (x|xno) ;;
18278         (*)
18279                 : "${with_cflags:=-g}"
18280                 : "${enable_leaks:=no}"
18281                 with_valgrind=yes
18282
18283 cat >>confdefs.h <<EOF
18284 #define USE_VALGRIND 1
18285 EOF
18286
18287                 ;;
18288         esac
18289 else
18290   with_valgrind=
18291 fi;
18292 echo "$as_me:18292: result: ${with_valgrind:-no}" >&5
18293 echo "${ECHO_T}${with_valgrind:-no}" >&6
18294
18295 case ".$with_cflags" in
18296 (.*-g*)
18297         case .$CFLAGS in
18298         (.*-g*)
18299                 ;;
18300         (*)
18301
18302 cf_fix_cppflags=no
18303 cf_new_cflags=
18304 cf_new_cppflags=
18305 cf_new_extra_cppflags=
18306
18307 for cf_add_cflags in -g
18308 do
18309 case "$cf_fix_cppflags" in
18310 (no)
18311         case "$cf_add_cflags" in
18312         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18313                 case "$cf_add_cflags" in
18314                 (-D*)
18315                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18316
18317                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18318                                 && test -z "${cf_tst_cflags}" \
18319                                 && cf_fix_cppflags=yes
18320
18321                         if test "$cf_fix_cppflags" = yes ; then
18322
18323         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18324         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18325
18326                                 continue
18327                         elif test "${cf_tst_cflags}" = "\"'" ; then
18328
18329         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18330         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18331
18332                                 continue
18333                         fi
18334                         ;;
18335                 esac
18336                 case "$CPPFLAGS" in
18337                 (*$cf_add_cflags)
18338                         ;;
18339                 (*)
18340                         case "$cf_add_cflags" in
18341                         (-D*)
18342                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18343
18344 CPPFLAGS=`echo "$CPPFLAGS" | \
18345         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18346                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18347
18348                                 ;;
18349                         esac
18350
18351         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18352         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18353
18354                         ;;
18355                 esac
18356                 ;;
18357         (*)
18358
18359         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18360         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18361
18362                 ;;
18363         esac
18364         ;;
18365 (yes)
18366
18367         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18368         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18369
18370         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18371
18372         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18373                 && test -z "${cf_tst_cflags}" \
18374                 && cf_fix_cppflags=no
18375         ;;
18376 esac
18377 done
18378
18379 if test -n "$cf_new_cflags" ; then
18380
18381         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18382         CFLAGS="${CFLAGS}$cf_new_cflags"
18383
18384 fi
18385
18386 if test -n "$cf_new_cppflags" ; then
18387
18388         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18389         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18390
18391 fi
18392
18393 if test -n "$cf_new_extra_cppflags" ; then
18394
18395         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18396         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18397
18398 fi
18399
18400                 ;;
18401         esac
18402         ;;
18403 esac
18404
18405 echo "$as_me:18405: checking if you want to perform memory-leak testing" >&5
18406 echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
18407
18408 # Check whether --enable-leaks or --disable-leaks was given.
18409 if test "${enable_leaks+set}" = set; then
18410   enableval="$enable_leaks"
18411   enable_leaks=$enableval
18412 else
18413   enable_leaks=yes
18414 fi;
18415 if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
18416 echo "$as_me:18416: result: $with_no_leaks" >&5
18417 echo "${ECHO_T}$with_no_leaks" >&6
18418
18419 if test "$enable_leaks" = no ; then
18420
18421 cat >>confdefs.h <<\EOF
18422 #define NO_LEAKS 1
18423 EOF
18424
18425 cat >>confdefs.h <<\EOF
18426 #define YY_NO_LEAKS 1
18427 EOF
18428
18429 fi
18430
18431 cat >>confdefs.h <<\EOF
18432 #define HAVE_NC_ALLOC_H 1
18433 EOF
18434
18435 ###     use option --enable-expanded to generate certain macros as functions
18436
18437 # Check whether --enable-expanded or --disable-expanded was given.
18438 if test "${enable_expanded+set}" = set; then
18439   enableval="$enable_expanded"
18440   test "x$enableval" = xyes &&
18441 cat >>confdefs.h <<\EOF
18442 #define NCURSES_EXPANDED 1
18443 EOF
18444
18445 fi;
18446
18447 ###     use option --disable-macros to suppress macros in favor of functions
18448
18449 # Check whether --enable-macros or --disable-macros was given.
18450 if test "${enable_macros+set}" = set; then
18451   enableval="$enable_macros"
18452   test "$enableval" = no &&
18453 cat >>confdefs.h <<\EOF
18454 #define NCURSES_NOMACROS 1
18455 EOF
18456
18457 fi;
18458
18459 # Normally we only add trace() to the debug-library.  Allow this to be
18460 # extended to all models of the ncurses library:
18461 cf_all_traces=no
18462 case "$CFLAGS $CPPFLAGS" in
18463 (*-DTRACE*)
18464         cf_all_traces=yes
18465         ;;
18466 esac
18467
18468 echo "$as_me:18468: checking whether to add trace feature to all models" >&5
18469 echo $ECHO_N "checking whether to add trace feature to all models... $ECHO_C" >&6
18470
18471 # Check whether --with-trace or --without-trace was given.
18472 if test "${with_trace+set}" = set; then
18473   withval="$with_trace"
18474   cf_with_trace=$withval
18475 else
18476   cf_with_trace=$cf_all_traces
18477 fi;
18478 echo "$as_me:18478: result: $cf_with_trace" >&5
18479 echo "${ECHO_T}$cf_with_trace" >&6
18480
18481 if test "x$cf_with_trace" = xyes ; then
18482         LIB_TRACING=all
18483         ADA_TRACE=TRUE
18484
18485 cf_fix_cppflags=no
18486 cf_new_cflags=
18487 cf_new_cppflags=
18488 cf_new_extra_cppflags=
18489
18490 for cf_add_cflags in -DTRACE
18491 do
18492 case "$cf_fix_cppflags" in
18493 (no)
18494         case "$cf_add_cflags" in
18495         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18496                 case "$cf_add_cflags" in
18497                 (-D*)
18498                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18499
18500                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18501                                 && test -z "${cf_tst_cflags}" \
18502                                 && cf_fix_cppflags=yes
18503
18504                         if test "$cf_fix_cppflags" = yes ; then
18505
18506         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18507         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18508
18509                                 continue
18510                         elif test "${cf_tst_cflags}" = "\"'" ; then
18511
18512         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18513         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18514
18515                                 continue
18516                         fi
18517                         ;;
18518                 esac
18519                 case "$CPPFLAGS" in
18520                 (*$cf_add_cflags)
18521                         ;;
18522                 (*)
18523                         case "$cf_add_cflags" in
18524                         (-D*)
18525                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18526
18527 CPPFLAGS=`echo "$CPPFLAGS" | \
18528         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
18529                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
18530
18531                                 ;;
18532                         esac
18533
18534         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18535         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18536
18537                         ;;
18538                 esac
18539                 ;;
18540         (*)
18541
18542         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18543         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18544
18545                 ;;
18546         esac
18547         ;;
18548 (yes)
18549
18550         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18551         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18552
18553         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18554
18555         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18556                 && test -z "${cf_tst_cflags}" \
18557                 && cf_fix_cppflags=no
18558         ;;
18559 esac
18560 done
18561
18562 if test -n "$cf_new_cflags" ; then
18563
18564         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18565         CFLAGS="${CFLAGS}$cf_new_cflags"
18566
18567 fi
18568
18569 if test -n "$cf_new_cppflags" ; then
18570
18571         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18572         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18573
18574 fi
18575
18576 if test -n "$cf_new_extra_cppflags" ; then
18577
18578         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18579         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18580
18581 fi
18582
18583 cat >>confdefs.h <<\EOF
18584 #define HAVE__TRACEF 1
18585 EOF
18586
18587 else
18588         LIB_TRACING=DEBUG
18589         ADA_TRACE=FALSE
18590 fi
18591
18592 echo "$as_me:18592: checking if we want to use GNAT projects" >&5
18593 echo $ECHO_N "checking if we want to use GNAT projects... $ECHO_C" >&6
18594
18595 # Check whether --enable-gnat-projects or --disable-gnat-projects was given.
18596 if test "${enable_gnat_projects+set}" = set; then
18597   enableval="$enable_gnat_projects"
18598   test "$enableval" != no && enableval=yes
18599         if test "$enableval" != "yes" ; then
18600     enable_gnat_projects=no
18601         else
18602                 enable_gnat_projects=yes
18603         fi
18604 else
18605   enableval=yes
18606         enable_gnat_projects=yes
18607
18608 fi;
18609 echo "$as_me:18609: result: $enable_gnat_projects" >&5
18610 echo "${ECHO_T}$enable_gnat_projects" >&6
18611
18612 ###     Checks for libraries.
18613 case "$cf_cv_system_name" in
18614 (*mingw32*|*mingw64*)
18615         # Note: WINVER may be a problem with Windows 10
18616         if test "x$with_exp_win32" = xyes ; then
18617                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0600 -DWIN32_LEAN_AND_MEAN"
18618         else
18619                 CPPFLAGS="$CPPFLAGS -DWINVER=0x0501 -DWIN32_LEAN_AND_MEAN"
18620         fi
18621
18622 echo "$as_me:18622: checking if ssp library is needed" >&5
18623 echo $ECHO_N "checking if ssp library is needed... $ECHO_C" >&6
18624 if test "${cf_cv_need_libssp+set}" = set; then
18625   echo $ECHO_N "(cached) $ECHO_C" >&6
18626 else
18627
18628 cat >"conftest.$ac_ext" <<_ACEOF
18629 #line 18629 "configure"
18630 #include "confdefs.h"
18631
18632 #include <sys/types.h>
18633 #include <dirent.h>
18634
18635 int
18636 main (void)
18637 {
18638
18639        DIR *dp = opendir(".");
18640
18641   ;
18642   return 0;
18643 }
18644 _ACEOF
18645 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18646 if { (eval echo "$as_me:18646: \"$ac_link\"") >&5
18647   (eval $ac_link) 2>&5
18648   ac_status=$?
18649   echo "$as_me:18649: \$? = $ac_status" >&5
18650   (exit "$ac_status"); } &&
18651          { ac_try='test -s "conftest$ac_exeext"'
18652   { (eval echo "$as_me:18652: \"$ac_try\"") >&5
18653   (eval $ac_try) 2>&5
18654   ac_status=$?
18655   echo "$as_me:18655: \$? = $ac_status" >&5
18656   (exit "$ac_status"); }; }; then
18657   cf_cv_need_libssp=no
18658 else
18659   echo "$as_me: failed program was:" >&5
18660 cat "conftest.$ac_ext" >&5
18661
18662         cf_save_LIBS="$LIBS"
18663         LIBS="$LIBS -lssp"
18664         cat >"conftest.$ac_ext" <<_ACEOF
18665 #line 18665 "configure"
18666 #include "confdefs.h"
18667
18668 #include <sys/types.h>
18669 #include <dirent.h>
18670
18671 int
18672 main (void)
18673 {
18674
18675                    DIR *dp = opendir(".");
18676
18677   ;
18678   return 0;
18679 }
18680 _ACEOF
18681 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18682 if { (eval echo "$as_me:18682: \"$ac_link\"") >&5
18683   (eval $ac_link) 2>&5
18684   ac_status=$?
18685   echo "$as_me:18685: \$? = $ac_status" >&5
18686   (exit "$ac_status"); } &&
18687          { ac_try='test -s "conftest$ac_exeext"'
18688   { (eval echo "$as_me:18688: \"$ac_try\"") >&5
18689   (eval $ac_try) 2>&5
18690   ac_status=$?
18691   echo "$as_me:18691: \$? = $ac_status" >&5
18692   (exit "$ac_status"); }; }; then
18693   cf_cv_need_libssp=yes
18694 else
18695   echo "$as_me: failed program was:" >&5
18696 cat "conftest.$ac_ext" >&5
18697 cf_cv_need_libssp=maybe
18698 fi
18699 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18700         LIBS="$cf_save_LIBS"
18701
18702 fi
18703 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18704 fi
18705 echo "$as_me:18705: result: $cf_cv_need_libssp" >&5
18706 echo "${ECHO_T}$cf_cv_need_libssp" >&6
18707
18708 if test "x$cf_cv_need_libssp" = xyes
18709 then
18710
18711 cf_add_libs="$LIBS"
18712 # reverse order
18713 cf_add_0lib=
18714 for cf_add_1lib in -lssp; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18715 # filter duplicates
18716 for cf_add_1lib in $cf_add_0lib; do
18717         for cf_add_2lib in $cf_add_libs; do
18718                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18719                         cf_add_1lib=
18720                         break
18721                 fi
18722         done
18723         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18724 done
18725 LIBS="$cf_add_libs"
18726
18727 fi
18728
18729         ;;
18730 (*)
18731 echo "$as_me:18731: checking for gettimeofday" >&5
18732 echo $ECHO_N "checking for gettimeofday... $ECHO_C" >&6
18733 if test "${ac_cv_func_gettimeofday+set}" = set; then
18734   echo $ECHO_N "(cached) $ECHO_C" >&6
18735 else
18736   cat >"conftest.$ac_ext" <<_ACEOF
18737 #line 18737 "configure"
18738 #include "confdefs.h"
18739 #define gettimeofday autoconf_temporary
18740 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
18741 #undef gettimeofday
18742
18743 #ifdef __cplusplus
18744 extern "C"
18745 #endif
18746
18747 /* We use char because int might match the return type of a gcc2
18748    builtin and then its argument prototype would still apply.  */
18749 char gettimeofday (void);
18750
18751 int
18752 main (void)
18753 {
18754
18755 /* The GNU C library defines stubs for functions which it implements
18756     to always fail with ENOSYS.  Some functions are actually named
18757     something starting with __ and the normal name is an alias.  */
18758 #if defined (__stub_gettimeofday) || defined (__stub___gettimeofday)
18759 #error found stub for gettimeofday
18760 #endif
18761
18762         return gettimeofday ();
18763   ;
18764   return 0;
18765 }
18766 _ACEOF
18767 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18768 if { (eval echo "$as_me:18768: \"$ac_link\"") >&5
18769   (eval $ac_link) 2>&5
18770   ac_status=$?
18771   echo "$as_me:18771: \$? = $ac_status" >&5
18772   (exit "$ac_status"); } &&
18773          { ac_try='test -s "conftest$ac_exeext"'
18774   { (eval echo "$as_me:18774: \"$ac_try\"") >&5
18775   (eval $ac_try) 2>&5
18776   ac_status=$?
18777   echo "$as_me:18777: \$? = $ac_status" >&5
18778   (exit "$ac_status"); }; }; then
18779   ac_cv_func_gettimeofday=yes
18780 else
18781   echo "$as_me: failed program was:" >&5
18782 cat "conftest.$ac_ext" >&5
18783 ac_cv_func_gettimeofday=no
18784 fi
18785 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18786 fi
18787 echo "$as_me:18787: result: $ac_cv_func_gettimeofday" >&5
18788 echo "${ECHO_T}$ac_cv_func_gettimeofday" >&6
18789 if test "$ac_cv_func_gettimeofday" = yes; then
18790
18791 cat >>confdefs.h <<\EOF
18792 #define HAVE_GETTIMEOFDAY 1
18793 EOF
18794
18795 else
18796
18797 echo "$as_me:18797: checking for gettimeofday in -lbsd" >&5
18798 echo $ECHO_N "checking for gettimeofday in -lbsd... $ECHO_C" >&6
18799 if test "${ac_cv_lib_bsd_gettimeofday+set}" = set; then
18800   echo $ECHO_N "(cached) $ECHO_C" >&6
18801 else
18802   ac_check_lib_save_LIBS=$LIBS
18803 LIBS="-lbsd  $LIBS"
18804 cat >"conftest.$ac_ext" <<_ACEOF
18805 #line 18805 "configure"
18806 #include "confdefs.h"
18807
18808 /* Override any gcc2 internal prototype to avoid an error.  */
18809 #ifdef __cplusplus
18810 extern "C"
18811 #endif
18812 /* We use char because int might match the return type of a gcc2
18813    builtin and then its argument prototype would still apply.  */
18814 char gettimeofday ();
18815 int
18816 main (void)
18817 {
18818 gettimeofday ();
18819   ;
18820   return 0;
18821 }
18822 _ACEOF
18823 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18824 if { (eval echo "$as_me:18824: \"$ac_link\"") >&5
18825   (eval $ac_link) 2>&5
18826   ac_status=$?
18827   echo "$as_me:18827: \$? = $ac_status" >&5
18828   (exit "$ac_status"); } &&
18829          { ac_try='test -s "conftest$ac_exeext"'
18830   { (eval echo "$as_me:18830: \"$ac_try\"") >&5
18831   (eval $ac_try) 2>&5
18832   ac_status=$?
18833   echo "$as_me:18833: \$? = $ac_status" >&5
18834   (exit "$ac_status"); }; }; then
18835   ac_cv_lib_bsd_gettimeofday=yes
18836 else
18837   echo "$as_me: failed program was:" >&5
18838 cat "conftest.$ac_ext" >&5
18839 ac_cv_lib_bsd_gettimeofday=no
18840 fi
18841 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18842 LIBS=$ac_check_lib_save_LIBS
18843 fi
18844 echo "$as_me:18844: result: $ac_cv_lib_bsd_gettimeofday" >&5
18845 echo "${ECHO_T}$ac_cv_lib_bsd_gettimeofday" >&6
18846 if test "$ac_cv_lib_bsd_gettimeofday" = yes; then
18847
18848 cat >>confdefs.h <<\EOF
18849 #define HAVE_GETTIMEOFDAY 1
18850 EOF
18851
18852 cf_add_libs="$LIBS"
18853 # reverse order
18854 cf_add_0lib=
18855 for cf_add_1lib in -lbsd; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18856 # filter duplicates
18857 for cf_add_1lib in $cf_add_0lib; do
18858         for cf_add_2lib in $cf_add_libs; do
18859                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18860                         cf_add_1lib=
18861                         break
18862                 fi
18863         done
18864         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18865 done
18866 LIBS="$cf_add_libs"
18867
18868 fi
18869
18870 fi
18871         ;;
18872 esac
18873
18874 echo "$as_me:18874: checking if -lm needed for math functions" >&5
18875 echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18876 if test "${cf_cv_need_libm+set}" = set; then
18877   echo $ECHO_N "(cached) $ECHO_C" >&6
18878 else
18879
18880         cat >"conftest.$ac_ext" <<_ACEOF
18881 #line 18881 "configure"
18882 #include "confdefs.h"
18883
18884         #include <stdio.h>
18885         #include <stdlib.h>
18886         #include <math.h>
18887
18888 int
18889 main (void)
18890 {
18891 double x = rand(); printf("result = %g\\n", pow(sin(x),x))
18892   ;
18893   return 0;
18894 }
18895 _ACEOF
18896 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18897 if { (eval echo "$as_me:18897: \"$ac_link\"") >&5
18898   (eval $ac_link) 2>&5
18899   ac_status=$?
18900   echo "$as_me:18900: \$? = $ac_status" >&5
18901   (exit "$ac_status"); } &&
18902          { ac_try='test -s "conftest$ac_exeext"'
18903   { (eval echo "$as_me:18903: \"$ac_try\"") >&5
18904   (eval $ac_try) 2>&5
18905   ac_status=$?
18906   echo "$as_me:18906: \$? = $ac_status" >&5
18907   (exit "$ac_status"); }; }; then
18908   cf_cv_need_libm=no
18909 else
18910   echo "$as_me: failed program was:" >&5
18911 cat "conftest.$ac_ext" >&5
18912 cf_cv_need_libm=yes
18913 fi
18914 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18915 fi
18916 echo "$as_me:18916: result: $cf_cv_need_libm" >&5
18917 echo "${ECHO_T}$cf_cv_need_libm" >&6
18918 if test "$cf_cv_need_libm" = yes
18919 then
18920 MATH_LIB=-lm
18921 fi
18922
18923 ###     Checks for header files.
18924 echo "$as_me:18924: checking for ANSI C header files" >&5
18925 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
18926 if test "${ac_cv_header_stdc+set}" = set; then
18927   echo $ECHO_N "(cached) $ECHO_C" >&6
18928 else
18929   cat >"conftest.$ac_ext" <<_ACEOF
18930 #line 18930 "configure"
18931 #include "confdefs.h"
18932 #include <stdlib.h>
18933 #include <stdarg.h>
18934 #include <string.h>
18935 #include <float.h>
18936
18937 _ACEOF
18938 if { (eval echo "$as_me:18938: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18939   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18940   ac_status=$?
18941   $EGREP -v '^ *\+' conftest.er1 >conftest.err
18942   rm -f conftest.er1
18943   cat conftest.err >&5
18944   echo "$as_me:18944: \$? = $ac_status" >&5
18945   (exit "$ac_status"); } >/dev/null; then
18946   if test -s conftest.err; then
18947     ac_cpp_err=$ac_c_preproc_warn_flag
18948   else
18949     ac_cpp_err=
18950   fi
18951 else
18952   ac_cpp_err=yes
18953 fi
18954 if test -z "$ac_cpp_err"; then
18955   ac_cv_header_stdc=yes
18956 else
18957   echo "$as_me: failed program was:" >&5
18958   cat "conftest.$ac_ext" >&5
18959   ac_cv_header_stdc=no
18960 fi
18961 rm -f conftest.err "conftest.$ac_ext"
18962
18963 if test $ac_cv_header_stdc = yes; then
18964   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
18965   cat >"conftest.$ac_ext" <<_ACEOF
18966 #line 18966 "configure"
18967 #include "confdefs.h"
18968 #include <string.h>
18969
18970 _ACEOF
18971 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18972   $EGREP "memchr" >/dev/null 2>&1; then
18973   :
18974 else
18975   ac_cv_header_stdc=no
18976 fi
18977 rm -rf conftest*
18978
18979 fi
18980
18981 if test $ac_cv_header_stdc = yes; then
18982   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
18983   cat >"conftest.$ac_ext" <<_ACEOF
18984 #line 18984 "configure"
18985 #include "confdefs.h"
18986 #include <stdlib.h>
18987
18988 _ACEOF
18989 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18990   $EGREP "free" >/dev/null 2>&1; then
18991   :
18992 else
18993   ac_cv_header_stdc=no
18994 fi
18995 rm -rf conftest*
18996
18997 fi
18998
18999 if test $ac_cv_header_stdc = yes; then
19000   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19001   if test "$cross_compiling" = yes; then
19002   :
19003 else
19004   cat >"conftest.$ac_ext" <<_ACEOF
19005 #line 19005 "configure"
19006 #include "confdefs.h"
19007 #include <ctype.h>
19008 #if ((' ' & 0x0FF) == 0x020)
19009 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19010 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19011 #else
19012 # define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19013                      || ('j' <= (c) && (c) <= 'r') \
19014                      || ('s' <= (c) && (c) <= 'z'))
19015 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19016 #endif
19017
19018 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19019 int
19020 main (void)
19021 {
19022   int i;
19023   for (i = 0; i < 256; i++)
19024     if (XOR (islower (i), ISLOWER (i))
19025         || toupper (i) != TOUPPER (i))
19026       $ac_main_return(2);
19027   $ac_main_return (0);
19028 }
19029 _ACEOF
19030 rm -f "conftest$ac_exeext"
19031 if { (eval echo "$as_me:19031: \"$ac_link\"") >&5
19032   (eval $ac_link) 2>&5
19033   ac_status=$?
19034   echo "$as_me:19034: \$? = $ac_status" >&5
19035   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
19036   { (eval echo "$as_me:19036: \"$ac_try\"") >&5
19037   (eval $ac_try) 2>&5
19038   ac_status=$?
19039   echo "$as_me:19039: \$? = $ac_status" >&5
19040   (exit "$ac_status"); }; }; then
19041   :
19042 else
19043   echo "$as_me: program exited with status $ac_status" >&5
19044 echo "$as_me: failed program was:" >&5
19045 cat "conftest.$ac_ext" >&5
19046 ac_cv_header_stdc=no
19047 fi
19048 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
19049 fi
19050 fi
19051 fi
19052 echo "$as_me:19052: result: $ac_cv_header_stdc" >&5
19053 echo "${ECHO_T}$ac_cv_header_stdc" >&6
19054 if test $ac_cv_header_stdc = yes; then
19055
19056 cat >>confdefs.h <<\EOF
19057 #define STDC_HEADERS 1
19058 EOF
19059
19060 fi
19061
19062 ac_header_dirent=no
19063 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
19064   as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
19065 echo "$as_me:19065: checking for $ac_hdr that defines DIR" >&5
19066 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
19067 if eval "test \"\${$as_ac_Header+set}\" = set"; then
19068   echo $ECHO_N "(cached) $ECHO_C" >&6
19069 else
19070   cat >"conftest.$ac_ext" <<_ACEOF
19071 #line 19071 "configure"
19072 #include "confdefs.h"
19073 #include <sys/types.h>
19074 #include <$ac_hdr>
19075
19076 int
19077 main (void)
19078 {
19079 if ((DIR *) 0)
19080 return 0;
19081   ;
19082   return 0;
19083 }
19084 _ACEOF
19085 rm -f "conftest.$ac_objext"
19086 if { (eval echo "$as_me:19086: \"$ac_compile\"") >&5
19087   (eval $ac_compile) 2>&5
19088   ac_status=$?
19089   echo "$as_me:19089: \$? = $ac_status" >&5
19090   (exit "$ac_status"); } &&
19091          { ac_try='test -s "conftest.$ac_objext"'
19092   { (eval echo "$as_me:19092: \"$ac_try\"") >&5
19093   (eval $ac_try) 2>&5
19094   ac_status=$?
19095   echo "$as_me:19095: \$? = $ac_status" >&5
19096   (exit "$ac_status"); }; }; then
19097   eval "$as_ac_Header=yes"
19098 else
19099   echo "$as_me: failed program was:" >&5
19100 cat "conftest.$ac_ext" >&5
19101 eval "$as_ac_Header=no"
19102 fi
19103 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19104 fi
19105 echo "$as_me:19105: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
19106 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
19107 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
19108   cat >>confdefs.h <<EOF
19109 #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
19110 EOF
19111
19112 ac_header_dirent=$ac_hdr; break
19113 fi
19114
19115 done
19116 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
19117 if test $ac_header_dirent = dirent.h; then
19118   echo "$as_me:19118: checking for opendir in -ldir" >&5
19119 echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
19120 if test "${ac_cv_lib_dir_opendir+set}" = set; then
19121   echo $ECHO_N "(cached) $ECHO_C" >&6
19122 else
19123   ac_check_lib_save_LIBS=$LIBS
19124 LIBS="-ldir  $LIBS"
19125 cat >"conftest.$ac_ext" <<_ACEOF
19126 #line 19126 "configure"
19127 #include "confdefs.h"
19128
19129 /* Override any gcc2 internal prototype to avoid an error.  */
19130 #ifdef __cplusplus
19131 extern "C"
19132 #endif
19133 /* We use char because int might match the return type of a gcc2
19134    builtin and then its argument prototype would still apply.  */
19135 char opendir ();
19136 int
19137 main (void)
19138 {
19139 opendir ();
19140   ;
19141   return 0;
19142 }
19143 _ACEOF
19144 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19145 if { (eval echo "$as_me:19145: \"$ac_link\"") >&5
19146   (eval $ac_link) 2>&5
19147   ac_status=$?
19148   echo "$as_me:19148: \$? = $ac_status" >&5
19149   (exit "$ac_status"); } &&
19150          { ac_try='test -s "conftest$ac_exeext"'
19151   { (eval echo "$as_me:19151: \"$ac_try\"") >&5
19152   (eval $ac_try) 2>&5
19153   ac_status=$?
19154   echo "$as_me:19154: \$? = $ac_status" >&5
19155   (exit "$ac_status"); }; }; then
19156   ac_cv_lib_dir_opendir=yes
19157 else
19158   echo "$as_me: failed program was:" >&5
19159 cat "conftest.$ac_ext" >&5
19160 ac_cv_lib_dir_opendir=no
19161 fi
19162 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19163 LIBS=$ac_check_lib_save_LIBS
19164 fi
19165 echo "$as_me:19165: result: $ac_cv_lib_dir_opendir" >&5
19166 echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
19167 if test "$ac_cv_lib_dir_opendir" = yes; then
19168   LIBS="$LIBS -ldir"
19169 fi
19170
19171 else
19172   echo "$as_me:19172: checking for opendir in -lx" >&5
19173 echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
19174 if test "${ac_cv_lib_x_opendir+set}" = set; then
19175   echo $ECHO_N "(cached) $ECHO_C" >&6
19176 else
19177   ac_check_lib_save_LIBS=$LIBS
19178 LIBS="-lx  $LIBS"
19179 cat >"conftest.$ac_ext" <<_ACEOF
19180 #line 19180 "configure"
19181 #include "confdefs.h"
19182
19183 /* Override any gcc2 internal prototype to avoid an error.  */
19184 #ifdef __cplusplus
19185 extern "C"
19186 #endif
19187 /* We use char because int might match the return type of a gcc2
19188    builtin and then its argument prototype would still apply.  */
19189 char opendir ();
19190 int
19191 main (void)
19192 {
19193 opendir ();
19194   ;
19195   return 0;
19196 }
19197 _ACEOF
19198 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19199 if { (eval echo "$as_me:19199: \"$ac_link\"") >&5
19200   (eval $ac_link) 2>&5
19201   ac_status=$?
19202   echo "$as_me:19202: \$? = $ac_status" >&5
19203   (exit "$ac_status"); } &&
19204          { ac_try='test -s "conftest$ac_exeext"'
19205   { (eval echo "$as_me:19205: \"$ac_try\"") >&5
19206   (eval $ac_try) 2>&5
19207   ac_status=$?
19208   echo "$as_me:19208: \$? = $ac_status" >&5
19209   (exit "$ac_status"); }; }; then
19210   ac_cv_lib_x_opendir=yes
19211 else
19212   echo "$as_me: failed program was:" >&5
19213 cat "conftest.$ac_ext" >&5
19214 ac_cv_lib_x_opendir=no
19215 fi
19216 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19217 LIBS=$ac_check_lib_save_LIBS
19218 fi
19219 echo "$as_me:19219: result: $ac_cv_lib_x_opendir" >&5
19220 echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
19221 if test "$ac_cv_lib_x_opendir" = yes; then
19222   LIBS="$LIBS -lx"
19223 fi
19224
19225 fi
19226
19227 echo "$as_me:19227: checking whether time.h and sys/time.h may both be included" >&5
19228 echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
19229 if test "${ac_cv_header_time+set}" = set; then
19230   echo $ECHO_N "(cached) $ECHO_C" >&6
19231 else
19232   cat >"conftest.$ac_ext" <<_ACEOF
19233 #line 19233 "configure"
19234 #include "confdefs.h"
19235 #include <sys/types.h>
19236 #include <sys/time.h>
19237 #include <time.h>
19238
19239 int
19240 main (void)
19241 {
19242 if ((struct tm *) 0)
19243 return 0;
19244   ;
19245   return 0;
19246 }
19247 _ACEOF
19248 rm -f "conftest.$ac_objext"
19249 if { (eval echo "$as_me:19249: \"$ac_compile\"") >&5
19250   (eval $ac_compile) 2>&5
19251   ac_status=$?
19252   echo "$as_me:19252: \$? = $ac_status" >&5
19253   (exit "$ac_status"); } &&
19254          { ac_try='test -s "conftest.$ac_objext"'
19255   { (eval echo "$as_me:19255: \"$ac_try\"") >&5
19256   (eval $ac_try) 2>&5
19257   ac_status=$?
19258   echo "$as_me:19258: \$? = $ac_status" >&5
19259   (exit "$ac_status"); }; }; then
19260   ac_cv_header_time=yes
19261 else
19262   echo "$as_me: failed program was:" >&5
19263 cat "conftest.$ac_ext" >&5
19264 ac_cv_header_time=no
19265 fi
19266 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19267 fi
19268 echo "$as_me:19268: result: $ac_cv_header_time" >&5
19269 echo "${ECHO_T}$ac_cv_header_time" >&6
19270 if test $ac_cv_header_time = yes; then
19271
19272 cat >>confdefs.h <<\EOF
19273 #define TIME_WITH_SYS_TIME 1
19274 EOF
19275
19276 fi
19277
19278 cf_regex_func=no
19279 cf_regex_libs=
19280 case "$host_os" in
19281 (mingw*)
19282         # -lsystre -ltre -lintl -liconv
19283         echo "$as_me:19283: checking for regcomp in -lsystre" >&5
19284 echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
19285 if test "${ac_cv_lib_systre_regcomp+set}" = set; then
19286   echo $ECHO_N "(cached) $ECHO_C" >&6
19287 else
19288   ac_check_lib_save_LIBS=$LIBS
19289 LIBS="-lsystre  $LIBS"
19290 cat >"conftest.$ac_ext" <<_ACEOF
19291 #line 19291 "configure"
19292 #include "confdefs.h"
19293
19294 /* Override any gcc2 internal prototype to avoid an error.  */
19295 #ifdef __cplusplus
19296 extern "C"
19297 #endif
19298 /* We use char because int might match the return type of a gcc2
19299    builtin and then its argument prototype would still apply.  */
19300 char regcomp ();
19301 int
19302 main (void)
19303 {
19304 regcomp ();
19305   ;
19306   return 0;
19307 }
19308 _ACEOF
19309 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19310 if { (eval echo "$as_me:19310: \"$ac_link\"") >&5
19311   (eval $ac_link) 2>&5
19312   ac_status=$?
19313   echo "$as_me:19313: \$? = $ac_status" >&5
19314   (exit "$ac_status"); } &&
19315          { ac_try='test -s "conftest$ac_exeext"'
19316   { (eval echo "$as_me:19316: \"$ac_try\"") >&5
19317   (eval $ac_try) 2>&5
19318   ac_status=$?
19319   echo "$as_me:19319: \$? = $ac_status" >&5
19320   (exit "$ac_status"); }; }; then
19321   ac_cv_lib_systre_regcomp=yes
19322 else
19323   echo "$as_me: failed program was:" >&5
19324 cat "conftest.$ac_ext" >&5
19325 ac_cv_lib_systre_regcomp=no
19326 fi
19327 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19328 LIBS=$ac_check_lib_save_LIBS
19329 fi
19330 echo "$as_me:19330: result: $ac_cv_lib_systre_regcomp" >&5
19331 echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
19332 if test "$ac_cv_lib_systre_regcomp" = yes; then
19333
19334                 echo "$as_me:19334: checking for libiconv_open in -liconv" >&5
19335 echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
19336 if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
19337   echo $ECHO_N "(cached) $ECHO_C" >&6
19338 else
19339   ac_check_lib_save_LIBS=$LIBS
19340 LIBS="-liconv  $LIBS"
19341 cat >"conftest.$ac_ext" <<_ACEOF
19342 #line 19342 "configure"
19343 #include "confdefs.h"
19344
19345 /* Override any gcc2 internal prototype to avoid an error.  */
19346 #ifdef __cplusplus
19347 extern "C"
19348 #endif
19349 /* We use char because int might match the return type of a gcc2
19350    builtin and then its argument prototype would still apply.  */
19351 char libiconv_open ();
19352 int
19353 main (void)
19354 {
19355 libiconv_open ();
19356   ;
19357   return 0;
19358 }
19359 _ACEOF
19360 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19361 if { (eval echo "$as_me:19361: \"$ac_link\"") >&5
19362   (eval $ac_link) 2>&5
19363   ac_status=$?
19364   echo "$as_me:19364: \$? = $ac_status" >&5
19365   (exit "$ac_status"); } &&
19366          { ac_try='test -s "conftest$ac_exeext"'
19367   { (eval echo "$as_me:19367: \"$ac_try\"") >&5
19368   (eval $ac_try) 2>&5
19369   ac_status=$?
19370   echo "$as_me:19370: \$? = $ac_status" >&5
19371   (exit "$ac_status"); }; }; then
19372   ac_cv_lib_iconv_libiconv_open=yes
19373 else
19374   echo "$as_me: failed program was:" >&5
19375 cat "conftest.$ac_ext" >&5
19376 ac_cv_lib_iconv_libiconv_open=no
19377 fi
19378 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19379 LIBS=$ac_check_lib_save_LIBS
19380 fi
19381 echo "$as_me:19381: result: $ac_cv_lib_iconv_libiconv_open" >&5
19382 echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
19383 if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
19384
19385 cf_add_libs="$LIBS"
19386 # reverse order
19387 cf_add_0lib=
19388 for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19389 # filter duplicates
19390 for cf_add_1lib in $cf_add_0lib; do
19391         for cf_add_2lib in $cf_add_libs; do
19392                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19393                         cf_add_1lib=
19394                         break
19395                 fi
19396         done
19397         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19398 done
19399 LIBS="$cf_add_libs"
19400
19401 fi
19402
19403                 echo "$as_me:19403: checking for libintl_gettext in -lintl" >&5
19404 echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
19405 if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
19406   echo $ECHO_N "(cached) $ECHO_C" >&6
19407 else
19408   ac_check_lib_save_LIBS=$LIBS
19409 LIBS="-lintl  $LIBS"
19410 cat >"conftest.$ac_ext" <<_ACEOF
19411 #line 19411 "configure"
19412 #include "confdefs.h"
19413
19414 /* Override any gcc2 internal prototype to avoid an error.  */
19415 #ifdef __cplusplus
19416 extern "C"
19417 #endif
19418 /* We use char because int might match the return type of a gcc2
19419    builtin and then its argument prototype would still apply.  */
19420 char libintl_gettext ();
19421 int
19422 main (void)
19423 {
19424 libintl_gettext ();
19425   ;
19426   return 0;
19427 }
19428 _ACEOF
19429 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19430 if { (eval echo "$as_me:19430: \"$ac_link\"") >&5
19431   (eval $ac_link) 2>&5
19432   ac_status=$?
19433   echo "$as_me:19433: \$? = $ac_status" >&5
19434   (exit "$ac_status"); } &&
19435          { ac_try='test -s "conftest$ac_exeext"'
19436   { (eval echo "$as_me:19436: \"$ac_try\"") >&5
19437   (eval $ac_try) 2>&5
19438   ac_status=$?
19439   echo "$as_me:19439: \$? = $ac_status" >&5
19440   (exit "$ac_status"); }; }; then
19441   ac_cv_lib_intl_libintl_gettext=yes
19442 else
19443   echo "$as_me: failed program was:" >&5
19444 cat "conftest.$ac_ext" >&5
19445 ac_cv_lib_intl_libintl_gettext=no
19446 fi
19447 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19448 LIBS=$ac_check_lib_save_LIBS
19449 fi
19450 echo "$as_me:19450: result: $ac_cv_lib_intl_libintl_gettext" >&5
19451 echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
19452 if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
19453
19454 cf_add_libs="$LIBS"
19455 # reverse order
19456 cf_add_0lib=
19457 for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19458 # filter duplicates
19459 for cf_add_1lib in $cf_add_0lib; do
19460         for cf_add_2lib in $cf_add_libs; do
19461                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19462                         cf_add_1lib=
19463                         break
19464                 fi
19465         done
19466         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19467 done
19468 LIBS="$cf_add_libs"
19469
19470 fi
19471
19472                 echo "$as_me:19472: checking for tre_regcomp in -ltre" >&5
19473 echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
19474 if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
19475   echo $ECHO_N "(cached) $ECHO_C" >&6
19476 else
19477   ac_check_lib_save_LIBS=$LIBS
19478 LIBS="-ltre  $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 tre_regcomp ();
19490 int
19491 main (void)
19492 {
19493 tre_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_tre_tre_regcomp=yes
19511 else
19512   echo "$as_me: failed program was:" >&5
19513 cat "conftest.$ac_ext" >&5
19514 ac_cv_lib_tre_tre_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_tre_tre_regcomp" >&5
19520 echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
19521 if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
19522
19523 cf_add_libs="$LIBS"
19524 # reverse order
19525 cf_add_0lib=
19526 for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19527 # filter duplicates
19528 for cf_add_1lib in $cf_add_0lib; do
19529         for cf_add_2lib in $cf_add_libs; do
19530                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19531                         cf_add_1lib=
19532                         break
19533                 fi
19534         done
19535         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19536 done
19537 LIBS="$cf_add_libs"
19538
19539 fi
19540
19541 cf_add_libs="$LIBS"
19542 # reverse order
19543 cf_add_0lib=
19544 for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19545 # filter duplicates
19546 for cf_add_1lib in $cf_add_0lib; do
19547         for cf_add_2lib in $cf_add_libs; do
19548                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19549                         cf_add_1lib=
19550                         break
19551                 fi
19552         done
19553         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19554 done
19555 LIBS="$cf_add_libs"
19556
19557                 cf_regex_func=regcomp
19558
19559 else
19560
19561                 echo "$as_me:19561: checking for regcomp in -lgnurx" >&5
19562 echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
19563 if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
19564   echo $ECHO_N "(cached) $ECHO_C" >&6
19565 else
19566   ac_check_lib_save_LIBS=$LIBS
19567 LIBS="-lgnurx  $LIBS"
19568 cat >"conftest.$ac_ext" <<_ACEOF
19569 #line 19569 "configure"
19570 #include "confdefs.h"
19571
19572 /* Override any gcc2 internal prototype to avoid an error.  */
19573 #ifdef __cplusplus
19574 extern "C"
19575 #endif
19576 /* We use char because int might match the return type of a gcc2
19577    builtin and then its argument prototype would still apply.  */
19578 char regcomp ();
19579 int
19580 main (void)
19581 {
19582 regcomp ();
19583   ;
19584   return 0;
19585 }
19586 _ACEOF
19587 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19588 if { (eval echo "$as_me:19588: \"$ac_link\"") >&5
19589   (eval $ac_link) 2>&5
19590   ac_status=$?
19591   echo "$as_me:19591: \$? = $ac_status" >&5
19592   (exit "$ac_status"); } &&
19593          { ac_try='test -s "conftest$ac_exeext"'
19594   { (eval echo "$as_me:19594: \"$ac_try\"") >&5
19595   (eval $ac_try) 2>&5
19596   ac_status=$?
19597   echo "$as_me:19597: \$? = $ac_status" >&5
19598   (exit "$ac_status"); }; }; then
19599   ac_cv_lib_gnurx_regcomp=yes
19600 else
19601   echo "$as_me: failed program was:" >&5
19602 cat "conftest.$ac_ext" >&5
19603 ac_cv_lib_gnurx_regcomp=no
19604 fi
19605 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19606 LIBS=$ac_check_lib_save_LIBS
19607 fi
19608 echo "$as_me:19608: result: $ac_cv_lib_gnurx_regcomp" >&5
19609 echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
19610 if test "$ac_cv_lib_gnurx_regcomp" = yes; then
19611
19612 cf_add_libs="$LIBS"
19613 # reverse order
19614 cf_add_0lib=
19615 for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19616 # filter duplicates
19617 for cf_add_1lib in $cf_add_0lib; do
19618         for cf_add_2lib in $cf_add_libs; do
19619                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19620                         cf_add_1lib=
19621                         break
19622                 fi
19623         done
19624         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19625 done
19626 LIBS="$cf_add_libs"
19627
19628                         cf_regex_func=regcomp
19629 fi
19630
19631 fi
19632
19633         ;;
19634 (*)
19635         cf_regex_libs="regex re"
19636         echo "$as_me:19636: checking for regcomp" >&5
19637 echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19638 if test "${ac_cv_func_regcomp+set}" = set; then
19639   echo $ECHO_N "(cached) $ECHO_C" >&6
19640 else
19641   cat >"conftest.$ac_ext" <<_ACEOF
19642 #line 19642 "configure"
19643 #include "confdefs.h"
19644 #define regcomp autoconf_temporary
19645 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19646 #undef regcomp
19647
19648 #ifdef __cplusplus
19649 extern "C"
19650 #endif
19651
19652 /* We use char because int might match the return type of a gcc2
19653    builtin and then its argument prototype would still apply.  */
19654 char regcomp (void);
19655
19656 int
19657 main (void)
19658 {
19659
19660 /* The GNU C library defines stubs for functions which it implements
19661     to always fail with ENOSYS.  Some functions are actually named
19662     something starting with __ and the normal name is an alias.  */
19663 #if defined (__stub_regcomp) || defined (__stub___regcomp)
19664 #error found stub for regcomp
19665 #endif
19666
19667         return regcomp ();
19668   ;
19669   return 0;
19670 }
19671 _ACEOF
19672 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19673 if { (eval echo "$as_me:19673: \"$ac_link\"") >&5
19674   (eval $ac_link) 2>&5
19675   ac_status=$?
19676   echo "$as_me:19676: \$? = $ac_status" >&5
19677   (exit "$ac_status"); } &&
19678          { ac_try='test -s "conftest$ac_exeext"'
19679   { (eval echo "$as_me:19679: \"$ac_try\"") >&5
19680   (eval $ac_try) 2>&5
19681   ac_status=$?
19682   echo "$as_me:19682: \$? = $ac_status" >&5
19683   (exit "$ac_status"); }; }; then
19684   ac_cv_func_regcomp=yes
19685 else
19686   echo "$as_me: failed program was:" >&5
19687 cat "conftest.$ac_ext" >&5
19688 ac_cv_func_regcomp=no
19689 fi
19690 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19691 fi
19692 echo "$as_me:19692: result: $ac_cv_func_regcomp" >&5
19693 echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19694 if test "$ac_cv_func_regcomp" = yes; then
19695   cf_regex_func=regcomp
19696 else
19697
19698                 for cf_regex_lib in $cf_regex_libs
19699                 do
19700                         as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19701 echo "$as_me:19701: checking for regcomp in -l$cf_regex_lib" >&5
19702 echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19703 if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19704   echo $ECHO_N "(cached) $ECHO_C" >&6
19705 else
19706   ac_check_lib_save_LIBS=$LIBS
19707 LIBS="-l$cf_regex_lib  $LIBS"
19708 cat >"conftest.$ac_ext" <<_ACEOF
19709 #line 19709 "configure"
19710 #include "confdefs.h"
19711
19712 /* Override any gcc2 internal prototype to avoid an error.  */
19713 #ifdef __cplusplus
19714 extern "C"
19715 #endif
19716 /* We use char because int might match the return type of a gcc2
19717    builtin and then its argument prototype would still apply.  */
19718 char regcomp ();
19719 int
19720 main (void)
19721 {
19722 regcomp ();
19723   ;
19724   return 0;
19725 }
19726 _ACEOF
19727 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19728 if { (eval echo "$as_me:19728: \"$ac_link\"") >&5
19729   (eval $ac_link) 2>&5
19730   ac_status=$?
19731   echo "$as_me:19731: \$? = $ac_status" >&5
19732   (exit "$ac_status"); } &&
19733          { ac_try='test -s "conftest$ac_exeext"'
19734   { (eval echo "$as_me:19734: \"$ac_try\"") >&5
19735   (eval $ac_try) 2>&5
19736   ac_status=$?
19737   echo "$as_me:19737: \$? = $ac_status" >&5
19738   (exit "$ac_status"); }; }; then
19739   eval "$as_ac_Lib=yes"
19740 else
19741   echo "$as_me: failed program was:" >&5
19742 cat "conftest.$ac_ext" >&5
19743 eval "$as_ac_Lib=no"
19744 fi
19745 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19746 LIBS=$ac_check_lib_save_LIBS
19747 fi
19748 echo "$as_me:19748: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
19749 echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
19750 if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
19751
19752 cf_add_libs="$LIBS"
19753 # reverse order
19754 cf_add_0lib=
19755 for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19756 # filter duplicates
19757 for cf_add_1lib in $cf_add_0lib; do
19758         for cf_add_2lib in $cf_add_libs; do
19759                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19760                         cf_add_1lib=
19761                         break
19762                 fi
19763         done
19764         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19765 done
19766 LIBS="$cf_add_libs"
19767
19768                                         cf_regex_func=regcomp
19769                                         break
19770 fi
19771
19772                 done
19773
19774 fi
19775
19776         ;;
19777 esac
19778
19779 if test "$cf_regex_func" = no ; then
19780         echo "$as_me:19780: checking for compile" >&5
19781 echo $ECHO_N "checking for compile... $ECHO_C" >&6
19782 if test "${ac_cv_func_compile+set}" = set; then
19783   echo $ECHO_N "(cached) $ECHO_C" >&6
19784 else
19785   cat >"conftest.$ac_ext" <<_ACEOF
19786 #line 19786 "configure"
19787 #include "confdefs.h"
19788 #define compile autoconf_temporary
19789 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
19790 #undef compile
19791
19792 #ifdef __cplusplus
19793 extern "C"
19794 #endif
19795
19796 /* We use char because int might match the return type of a gcc2
19797    builtin and then its argument prototype would still apply.  */
19798 char compile (void);
19799
19800 int
19801 main (void)
19802 {
19803
19804 /* The GNU C library defines stubs for functions which it implements
19805     to always fail with ENOSYS.  Some functions are actually named
19806     something starting with __ and the normal name is an alias.  */
19807 #if defined (__stub_compile) || defined (__stub___compile)
19808 #error found stub for compile
19809 #endif
19810
19811         return compile ();
19812   ;
19813   return 0;
19814 }
19815 _ACEOF
19816 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19817 if { (eval echo "$as_me:19817: \"$ac_link\"") >&5
19818   (eval $ac_link) 2>&5
19819   ac_status=$?
19820   echo "$as_me:19820: \$? = $ac_status" >&5
19821   (exit "$ac_status"); } &&
19822          { ac_try='test -s "conftest$ac_exeext"'
19823   { (eval echo "$as_me:19823: \"$ac_try\"") >&5
19824   (eval $ac_try) 2>&5
19825   ac_status=$?
19826   echo "$as_me:19826: \$? = $ac_status" >&5
19827   (exit "$ac_status"); }; }; then
19828   ac_cv_func_compile=yes
19829 else
19830   echo "$as_me: failed program was:" >&5
19831 cat "conftest.$ac_ext" >&5
19832 ac_cv_func_compile=no
19833 fi
19834 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19835 fi
19836 echo "$as_me:19836: result: $ac_cv_func_compile" >&5
19837 echo "${ECHO_T}$ac_cv_func_compile" >&6
19838 if test "$ac_cv_func_compile" = yes; then
19839   cf_regex_func=compile
19840 else
19841
19842                 echo "$as_me:19842: checking for compile in -lgen" >&5
19843 echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19844 if test "${ac_cv_lib_gen_compile+set}" = set; then
19845   echo $ECHO_N "(cached) $ECHO_C" >&6
19846 else
19847   ac_check_lib_save_LIBS=$LIBS
19848 LIBS="-lgen  $LIBS"
19849 cat >"conftest.$ac_ext" <<_ACEOF
19850 #line 19850 "configure"
19851 #include "confdefs.h"
19852
19853 /* Override any gcc2 internal prototype to avoid an error.  */
19854 #ifdef __cplusplus
19855 extern "C"
19856 #endif
19857 /* We use char because int might match the return type of a gcc2
19858    builtin and then its argument prototype would still apply.  */
19859 char compile ();
19860 int
19861 main (void)
19862 {
19863 compile ();
19864   ;
19865   return 0;
19866 }
19867 _ACEOF
19868 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19869 if { (eval echo "$as_me:19869: \"$ac_link\"") >&5
19870   (eval $ac_link) 2>&5
19871   ac_status=$?
19872   echo "$as_me:19872: \$? = $ac_status" >&5
19873   (exit "$ac_status"); } &&
19874          { ac_try='test -s "conftest$ac_exeext"'
19875   { (eval echo "$as_me:19875: \"$ac_try\"") >&5
19876   (eval $ac_try) 2>&5
19877   ac_status=$?
19878   echo "$as_me:19878: \$? = $ac_status" >&5
19879   (exit "$ac_status"); }; }; then
19880   ac_cv_lib_gen_compile=yes
19881 else
19882   echo "$as_me: failed program was:" >&5
19883 cat "conftest.$ac_ext" >&5
19884 ac_cv_lib_gen_compile=no
19885 fi
19886 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19887 LIBS=$ac_check_lib_save_LIBS
19888 fi
19889 echo "$as_me:19889: result: $ac_cv_lib_gen_compile" >&5
19890 echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19891 if test "$ac_cv_lib_gen_compile" = yes; then
19892
19893 cf_add_libs="$LIBS"
19894 # reverse order
19895 cf_add_0lib=
19896 for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19897 # filter duplicates
19898 for cf_add_1lib in $cf_add_0lib; do
19899         for cf_add_2lib in $cf_add_libs; do
19900                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19901                         cf_add_1lib=
19902                         break
19903                 fi
19904         done
19905         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19906 done
19907 LIBS="$cf_add_libs"
19908
19909                                 cf_regex_func=compile
19910 fi
19911
19912 fi
19913
19914 fi
19915
19916 if test "$cf_regex_func" = no ; then
19917         { echo "$as_me:19917: WARNING: cannot find regular expression library" >&5
19918 echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19919 fi
19920
19921 echo "$as_me:19921: checking for regular-expression headers" >&5
19922 echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19923 if test "${cf_cv_regex_hdrs+set}" = set; then
19924   echo $ECHO_N "(cached) $ECHO_C" >&6
19925 else
19926
19927 cf_cv_regex_hdrs=no
19928 case "$cf_regex_func" in
19929 (compile)
19930         for cf_regex_hdr in regexp.h regexpr.h
19931         do
19932                 cat >"conftest.$ac_ext" <<_ACEOF
19933 #line 19933 "configure"
19934 #include "confdefs.h"
19935 #include <$cf_regex_hdr>
19936 int
19937 main (void)
19938 {
19939
19940                         char *p = compile("", "", "", 0);
19941                         int x = step("", "");
19942                         (void)p;
19943                         (void)x;
19944
19945   ;
19946   return 0;
19947 }
19948 _ACEOF
19949 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19950 if { (eval echo "$as_me:19950: \"$ac_link\"") >&5
19951   (eval $ac_link) 2>&5
19952   ac_status=$?
19953   echo "$as_me:19953: \$? = $ac_status" >&5
19954   (exit "$ac_status"); } &&
19955          { ac_try='test -s "conftest$ac_exeext"'
19956   { (eval echo "$as_me:19956: \"$ac_try\"") >&5
19957   (eval $ac_try) 2>&5
19958   ac_status=$?
19959   echo "$as_me:19959: \$? = $ac_status" >&5
19960   (exit "$ac_status"); }; }; then
19961
19962                         cf_cv_regex_hdrs=$cf_regex_hdr
19963                         break
19964
19965 else
19966   echo "$as_me: failed program was:" >&5
19967 cat "conftest.$ac_ext" >&5
19968 fi
19969 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19970         done
19971         ;;
19972 (*)
19973         for cf_regex_hdr in regex.h
19974         do
19975                 cat >"conftest.$ac_ext" <<_ACEOF
19976 #line 19976 "configure"
19977 #include "confdefs.h"
19978 #include <sys/types.h>
19979 #include <$cf_regex_hdr>
19980 int
19981 main (void)
19982 {
19983
19984                         regex_t *p = 0;
19985                         int x = regcomp(p, "", 0);
19986                         int y = regexec(p, "", 0, 0, 0);
19987                         (void)x;
19988                         (void)y;
19989                         regfree(p);
19990
19991   ;
19992   return 0;
19993 }
19994 _ACEOF
19995 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19996 if { (eval echo "$as_me:19996: \"$ac_link\"") >&5
19997   (eval $ac_link) 2>&5
19998   ac_status=$?
19999   echo "$as_me:19999: \$? = $ac_status" >&5
20000   (exit "$ac_status"); } &&
20001          { ac_try='test -s "conftest$ac_exeext"'
20002   { (eval echo "$as_me:20002: \"$ac_try\"") >&5
20003   (eval $ac_try) 2>&5
20004   ac_status=$?
20005   echo "$as_me:20005: \$? = $ac_status" >&5
20006   (exit "$ac_status"); }; }; then
20007
20008                         cf_cv_regex_hdrs=$cf_regex_hdr
20009                         break
20010
20011 else
20012   echo "$as_me: failed program was:" >&5
20013 cat "conftest.$ac_ext" >&5
20014 fi
20015 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20016         done
20017         ;;
20018 esac
20019
20020 fi
20021 echo "$as_me:20021: result: $cf_cv_regex_hdrs" >&5
20022 echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
20023
20024 case "$cf_cv_regex_hdrs" in
20025         (no)            { echo "$as_me:20025: WARNING: no regular expression header found" >&5
20026 echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
20027         (regex.h)
20028 cat >>confdefs.h <<\EOF
20029 #define HAVE_REGEX_H_FUNCS 1
20030 EOF
20031  ;;
20032         (regexp.h)
20033 cat >>confdefs.h <<\EOF
20034 #define HAVE_REGEXP_H_FUNCS 1
20035 EOF
20036  ;;
20037         (regexpr.h)
20038 cat >>confdefs.h <<\EOF
20039 #define HAVE_REGEXPR_H_FUNCS 1
20040 EOF
20041  ;;
20042 esac
20043
20044 for ac_header in \
20045 fcntl.h \
20046 getopt.h \
20047 limits.h \
20048 locale.h \
20049 math.h \
20050 poll.h \
20051 sys/ioctl.h \
20052 sys/param.h \
20053 sys/poll.h \
20054 sys/select.h \
20055 sys/time.h \
20056 sys/times.h \
20057 ttyent.h \
20058 unistd.h \
20059 wctype.h \
20060
20061 do
20062 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20063 echo "$as_me:20063: checking for $ac_header" >&5
20064 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20065 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20066   echo $ECHO_N "(cached) $ECHO_C" >&6
20067 else
20068   cat >"conftest.$ac_ext" <<_ACEOF
20069 #line 20069 "configure"
20070 #include "confdefs.h"
20071 #include <$ac_header>
20072 _ACEOF
20073 if { (eval echo "$as_me:20073: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20074   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20075   ac_status=$?
20076   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20077   rm -f conftest.er1
20078   cat conftest.err >&5
20079   echo "$as_me:20079: \$? = $ac_status" >&5
20080   (exit "$ac_status"); } >/dev/null; then
20081   if test -s conftest.err; then
20082     ac_cpp_err=$ac_c_preproc_warn_flag
20083   else
20084     ac_cpp_err=
20085   fi
20086 else
20087   ac_cpp_err=yes
20088 fi
20089 if test -z "$ac_cpp_err"; then
20090   eval "$as_ac_Header=yes"
20091 else
20092   echo "$as_me: failed program was:" >&5
20093   cat "conftest.$ac_ext" >&5
20094   eval "$as_ac_Header=no"
20095 fi
20096 rm -f conftest.err "conftest.$ac_ext"
20097 fi
20098 echo "$as_me:20098: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20099 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20100 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20101   cat >>confdefs.h <<EOF
20102 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20103 EOF
20104
20105 fi
20106 done
20107
20108 for ac_header in unistd.h getopt.h
20109 do
20110 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20111 echo "$as_me:20111: checking for $ac_header" >&5
20112 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20113 if eval "test \"\${$as_ac_Header+set}\" = set"; then
20114   echo $ECHO_N "(cached) $ECHO_C" >&6
20115 else
20116   cat >"conftest.$ac_ext" <<_ACEOF
20117 #line 20117 "configure"
20118 #include "confdefs.h"
20119 #include <$ac_header>
20120 _ACEOF
20121 if { (eval echo "$as_me:20121: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20122   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20123   ac_status=$?
20124   $EGREP -v '^ *\+' conftest.er1 >conftest.err
20125   rm -f conftest.er1
20126   cat conftest.err >&5
20127   echo "$as_me:20127: \$? = $ac_status" >&5
20128   (exit "$ac_status"); } >/dev/null; then
20129   if test -s conftest.err; then
20130     ac_cpp_err=$ac_c_preproc_warn_flag
20131   else
20132     ac_cpp_err=
20133   fi
20134 else
20135   ac_cpp_err=yes
20136 fi
20137 if test -z "$ac_cpp_err"; then
20138   eval "$as_ac_Header=yes"
20139 else
20140   echo "$as_me: failed program was:" >&5
20141   cat "conftest.$ac_ext" >&5
20142   eval "$as_ac_Header=no"
20143 fi
20144 rm -f conftest.err "conftest.$ac_ext"
20145 fi
20146 echo "$as_me:20146: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20147 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20148 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20149   cat >>confdefs.h <<EOF
20150 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20151 EOF
20152
20153 fi
20154 done
20155
20156 echo "$as_me:20156: checking for header declaring getopt variables" >&5
20157 echo $ECHO_N "checking for header declaring getopt variables... $ECHO_C" >&6
20158 if test "${cf_cv_getopt_header+set}" = set; then
20159   echo $ECHO_N "(cached) $ECHO_C" >&6
20160 else
20161
20162 cf_cv_getopt_header=none
20163 for cf_header in stdio.h stdlib.h unistd.h getopt.h
20164 do
20165 cat >"conftest.$ac_ext" <<_ACEOF
20166 #line 20166 "configure"
20167 #include "confdefs.h"
20168
20169 #include <$cf_header>
20170 int
20171 main (void)
20172 {
20173 int x = optind; char *y = optarg; (void)x; (void)y
20174   ;
20175   return 0;
20176 }
20177 _ACEOF
20178 rm -f "conftest.$ac_objext"
20179 if { (eval echo "$as_me:20179: \"$ac_compile\"") >&5
20180   (eval $ac_compile) 2>&5
20181   ac_status=$?
20182   echo "$as_me:20182: \$? = $ac_status" >&5
20183   (exit "$ac_status"); } &&
20184          { ac_try='test -s "conftest.$ac_objext"'
20185   { (eval echo "$as_me:20185: \"$ac_try\"") >&5
20186   (eval $ac_try) 2>&5
20187   ac_status=$?
20188   echo "$as_me:20188: \$? = $ac_status" >&5
20189   (exit "$ac_status"); }; }; then
20190   cf_cv_getopt_header=$cf_header
20191  break
20192 else
20193   echo "$as_me: failed program was:" >&5
20194 cat "conftest.$ac_ext" >&5
20195 fi
20196 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20197 done
20198
20199 fi
20200 echo "$as_me:20200: result: $cf_cv_getopt_header" >&5
20201 echo "${ECHO_T}$cf_cv_getopt_header" >&6
20202 if test "$cf_cv_getopt_header" != none ; then
20203
20204 cat >>confdefs.h <<\EOF
20205 #define HAVE_GETOPT_HEADER 1
20206 EOF
20207
20208 fi
20209 if test "$cf_cv_getopt_header" = getopt.h ; then
20210
20211 cat >>confdefs.h <<\EOF
20212 #define NEED_GETOPT_H 1
20213 EOF
20214
20215 fi
20216
20217 echo "$as_me:20217: checking if external environ is declared" >&5
20218 echo $ECHO_N "checking if external environ is declared... $ECHO_C" >&6
20219 if test "${cf_cv_dcl_environ+set}" = set; then
20220   echo $ECHO_N "(cached) $ECHO_C" >&6
20221 else
20222
20223     cat >"conftest.$ac_ext" <<_ACEOF
20224 #line 20224 "configure"
20225 #include "confdefs.h"
20226
20227 #ifdef HAVE_STDLIB_H
20228 #include <stdlib.h>
20229 #endif
20230 #include <unistd.h>
20231 int
20232 main (void)
20233 {
20234 int x = (int) environ
20235   ;
20236   return 0;
20237 }
20238 _ACEOF
20239 rm -f "conftest.$ac_objext"
20240 if { (eval echo "$as_me:20240: \"$ac_compile\"") >&5
20241   (eval $ac_compile) 2>&5
20242   ac_status=$?
20243   echo "$as_me:20243: \$? = $ac_status" >&5
20244   (exit "$ac_status"); } &&
20245          { ac_try='test -s "conftest.$ac_objext"'
20246   { (eval echo "$as_me:20246: \"$ac_try\"") >&5
20247   (eval $ac_try) 2>&5
20248   ac_status=$?
20249   echo "$as_me:20249: \$? = $ac_status" >&5
20250   (exit "$ac_status"); }; }; then
20251   cf_cv_dcl_environ=yes
20252 else
20253   echo "$as_me: failed program was:" >&5
20254 cat "conftest.$ac_ext" >&5
20255 cf_cv_dcl_environ=no
20256 fi
20257 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20258
20259 fi
20260 echo "$as_me:20260: result: $cf_cv_dcl_environ" >&5
20261 echo "${ECHO_T}$cf_cv_dcl_environ" >&6
20262
20263 if test "$cf_cv_dcl_environ" = no ; then
20264
20265 cf_result=`echo "decl_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20266
20267     cat >>confdefs.h <<EOF
20268 #define $cf_result 1
20269 EOF
20270
20271 fi
20272
20273 # It's possible (for near-UNIX clones) that the data doesn't exist
20274
20275 echo "$as_me:20275: checking if external environ exists" >&5
20276 echo $ECHO_N "checking if external environ exists... $ECHO_C" >&6
20277 if test "${cf_cv_have_environ+set}" = set; then
20278   echo $ECHO_N "(cached) $ECHO_C" >&6
20279 else
20280
20281         cat >"conftest.$ac_ext" <<_ACEOF
20282 #line 20282 "configure"
20283 #include "confdefs.h"
20284
20285 #undef environ
20286 extern int environ;
20287
20288 int
20289 main (void)
20290 {
20291 environ = 2
20292   ;
20293   return 0;
20294 }
20295 _ACEOF
20296 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20297 if { (eval echo "$as_me:20297: \"$ac_link\"") >&5
20298   (eval $ac_link) 2>&5
20299   ac_status=$?
20300   echo "$as_me:20300: \$? = $ac_status" >&5
20301   (exit "$ac_status"); } &&
20302          { ac_try='test -s "conftest$ac_exeext"'
20303   { (eval echo "$as_me:20303: \"$ac_try\"") >&5
20304   (eval $ac_try) 2>&5
20305   ac_status=$?
20306   echo "$as_me:20306: \$? = $ac_status" >&5
20307   (exit "$ac_status"); }; }; then
20308   cf_cv_have_environ=yes
20309 else
20310   echo "$as_me: failed program was:" >&5
20311 cat "conftest.$ac_ext" >&5
20312 cf_cv_have_environ=no
20313 fi
20314 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20315
20316 fi
20317 echo "$as_me:20317: result: $cf_cv_have_environ" >&5
20318 echo "${ECHO_T}$cf_cv_have_environ" >&6
20319
20320 if test "$cf_cv_have_environ" = yes ; then
20321
20322 cf_result=`echo "have_environ" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20323
20324         cat >>confdefs.h <<EOF
20325 #define $cf_result 1
20326 EOF
20327
20328 fi
20329
20330 echo "$as_me:20330: checking for getenv" >&5
20331 echo $ECHO_N "checking for getenv... $ECHO_C" >&6
20332 if test "${ac_cv_func_getenv+set}" = set; then
20333   echo $ECHO_N "(cached) $ECHO_C" >&6
20334 else
20335   cat >"conftest.$ac_ext" <<_ACEOF
20336 #line 20336 "configure"
20337 #include "confdefs.h"
20338 #define getenv autoconf_temporary
20339 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20340 #undef getenv
20341
20342 #ifdef __cplusplus
20343 extern "C"
20344 #endif
20345
20346 /* We use char because int might match the return type of a gcc2
20347    builtin and then its argument prototype would still apply.  */
20348 char getenv (void);
20349
20350 int
20351 main (void)
20352 {
20353
20354 /* The GNU C library defines stubs for functions which it implements
20355     to always fail with ENOSYS.  Some functions are actually named
20356     something starting with __ and the normal name is an alias.  */
20357 #if defined (__stub_getenv) || defined (__stub___getenv)
20358 #error found stub for getenv
20359 #endif
20360
20361         return getenv ();
20362   ;
20363   return 0;
20364 }
20365 _ACEOF
20366 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20367 if { (eval echo "$as_me:20367: \"$ac_link\"") >&5
20368   (eval $ac_link) 2>&5
20369   ac_status=$?
20370   echo "$as_me:20370: \$? = $ac_status" >&5
20371   (exit "$ac_status"); } &&
20372          { ac_try='test -s "conftest$ac_exeext"'
20373   { (eval echo "$as_me:20373: \"$ac_try\"") >&5
20374   (eval $ac_try) 2>&5
20375   ac_status=$?
20376   echo "$as_me:20376: \$? = $ac_status" >&5
20377   (exit "$ac_status"); }; }; then
20378   ac_cv_func_getenv=yes
20379 else
20380   echo "$as_me: failed program was:" >&5
20381 cat "conftest.$ac_ext" >&5
20382 ac_cv_func_getenv=no
20383 fi
20384 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20385 fi
20386 echo "$as_me:20386: result: $ac_cv_func_getenv" >&5
20387 echo "${ECHO_T}$ac_cv_func_getenv" >&6
20388
20389 for ac_func in putenv setenv strdup
20390 do
20391 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20392 echo "$as_me:20392: checking for $ac_func" >&5
20393 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20394 if eval "test \"\${$as_ac_var+set}\" = set"; then
20395   echo $ECHO_N "(cached) $ECHO_C" >&6
20396 else
20397   cat >"conftest.$ac_ext" <<_ACEOF
20398 #line 20398 "configure"
20399 #include "confdefs.h"
20400 #define $ac_func autoconf_temporary
20401 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
20402 #undef $ac_func
20403
20404 #ifdef __cplusplus
20405 extern "C"
20406 #endif
20407
20408 /* We use char because int might match the return type of a gcc2
20409    builtin and then its argument prototype would still apply.  */
20410 char $ac_func (void);
20411
20412 int
20413 main (void)
20414 {
20415
20416 /* The GNU C library defines stubs for functions which it implements
20417     to always fail with ENOSYS.  Some functions are actually named
20418     something starting with __ and the normal name is an alias.  */
20419 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20420 #error found stub for $ac_func
20421 #endif
20422
20423         return $ac_func ();
20424   ;
20425   return 0;
20426 }
20427 _ACEOF
20428 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20429 if { (eval echo "$as_me:20429: \"$ac_link\"") >&5
20430   (eval $ac_link) 2>&5
20431   ac_status=$?
20432   echo "$as_me:20432: \$? = $ac_status" >&5
20433   (exit "$ac_status"); } &&
20434          { ac_try='test -s "conftest$ac_exeext"'
20435   { (eval echo "$as_me:20435: \"$ac_try\"") >&5
20436   (eval $ac_try) 2>&5
20437   ac_status=$?
20438   echo "$as_me:20438: \$? = $ac_status" >&5
20439   (exit "$ac_status"); }; }; then
20440   eval "$as_ac_var=yes"
20441 else
20442   echo "$as_me: failed program was:" >&5
20443 cat "conftest.$ac_ext" >&5
20444 eval "$as_ac_var=no"
20445 fi
20446 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20447 fi
20448 echo "$as_me:20448: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20449 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20450 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20451   cat >>confdefs.h <<EOF
20452 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20453 EOF
20454
20455 fi
20456 done
20457
20458 echo "$as_me:20458: checking if getenv returns consistent values" >&5
20459 echo $ECHO_N "checking if getenv returns consistent values... $ECHO_C" >&6
20460 if test "${cf_cv_consistent_getenv+set}" = set; then
20461   echo $ECHO_N "(cached) $ECHO_C" >&6
20462 else
20463
20464 if test "$cross_compiling" = yes; then
20465   cf_cv_consistent_getenv=unknown
20466 else
20467   cat >"conftest.$ac_ext" <<_ACEOF
20468 #line 20468 "configure"
20469 #include "confdefs.h"
20470
20471 #include <stdlib.h>
20472 #include <unistd.h>
20473 #include <stdio.h>
20474 #include <string.h>
20475 #include <sys/types.h>
20476
20477 #if defined(HAVE_ENVIRON) && defined(DECL_ENVIRON) && !defined(environ)
20478 extern char **environ;  /* POSIX, but some systems are not... */
20479 #endif
20480
20481 #if defined(HAVE_STRDUP)
20482 #define str_alloc(s) strdup(s)
20483 #else
20484 #define str_alloc(s) strcpy(malloc(strlen(s) + 1, s))
20485 #endif
20486
20487 static void set_value(const char *name, const char *value)
20488 {
20489 #if defined(HAVE_SETENV)
20490         setenv(name, value, 1);
20491 #elif defined(HAVE_PUTENV)
20492         char buffer[1024];
20493         sprintf(buffer, "%s=%s", name, value);
20494         putenv(str_alloc(buffer));
20495 #else
20496 #error neither putenv/setenv found
20497 #endif
20498 }
20499 int main(void)
20500 {
20501         int pass;
20502         size_t numenv, limit, j;
20503         char **mynames;
20504         char **myvalues;
20505         char **mypointer;
20506         char *equals;
20507         for (numenv = 0; environ[numenv]; ++numenv) ;
20508         limit = numenv + 10;
20509         mynames = (char **) calloc(limit + 1, sizeof(char *));
20510         myvalues = (char **) calloc(limit + 1, sizeof(char *));
20511         mypointer = (char **) calloc(limit + 1, sizeof(char *));
20512 #if defined(HAVE_ENVIRON)
20513         for (j = 0; environ[j]; ++j) {
20514                 mynames[j] = str_alloc(environ[j]);
20515                 equals = strchr(mynames[j], '=');
20516                 if (equals != 0) {
20517                         *equals++ = '\\0';
20518                         myvalues[j] = str_alloc(equals);
20519                 } else {
20520                         myvalues[j] = str_alloc("");
20521                 }
20522         }
20523 #endif
20524         for (j = numenv; j < limit; ++j) {
20525                 char name[80];
20526                 char value[80];
20527                 size_t found;
20528                 size_t k = 0;
20529                 do {
20530                         size_t jk;
20531                         found = 0;
20532                         sprintf(name, "TERM%lu", (unsigned long) k);
20533                         for (jk = 0; jk < j; ++jk) {
20534                                 if (!strcmp(name, mynames[jk])) {
20535                                         found = 1;
20536                                         ++k;
20537                                         break;
20538                                 }
20539                         }
20540                 } while (found);
20541                 sprintf(value, "%lu:%p", (unsigned long) k, &mynames[j]);
20542                 set_value(name, value);
20543                 mynames[j] = str_alloc(name);
20544                 myvalues[j] = str_alloc(value);
20545         }
20546         for (pass = 0; pass < 3; ++pass) {
20547                 for (j = 0; j < limit; ++j) {
20548                         char *value = getenv(mynames[j]);
20549                         if (pass) {
20550                                 if (value == 0) {
20551                                         fprintf(stderr, "getenv returned null for %s\\n", mynames[j]);
20552                                         ${cf_cv_main_return:-return}(1);
20553                                 } else if (value != mypointer[j]) {
20554                                         fprintf(stderr, "getenv returned different pointer for %s\\n", mynames[j]);
20555                                         ${cf_cv_main_return:-return}(1);
20556                                 } else if (strcmp(value, myvalues[j])) {
20557                                         fprintf(stderr, "getenv returned different value for %s\\n", mynames[j]);
20558                                         ${cf_cv_main_return:-return}(1);
20559                                 }
20560                         } else {
20561                                 size_t k;
20562                                 mypointer[j] = value;
20563                                 for (k = 0; k < j; ++k) {
20564                                         if (mypointer[j] == mypointer[k]) {
20565                                                 fprintf(stderr, "getenv returned same pointer for %s and %s\\n", mynames[j], mynames[k]);
20566                                                 ${cf_cv_main_return:-return}(1);
20567                                         }
20568                                 }
20569                         }
20570                 }
20571         }
20572         ${cf_cv_main_return:-return}(0);
20573 }
20574
20575 _ACEOF
20576 rm -f "conftest$ac_exeext"
20577 if { (eval echo "$as_me:20577: \"$ac_link\"") >&5
20578   (eval $ac_link) 2>&5
20579   ac_status=$?
20580   echo "$as_me:20580: \$? = $ac_status" >&5
20581   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
20582   { (eval echo "$as_me:20582: \"$ac_try\"") >&5
20583   (eval $ac_try) 2>&5
20584   ac_status=$?
20585   echo "$as_me:20585: \$? = $ac_status" >&5
20586   (exit "$ac_status"); }; }; then
20587   cf_cv_consistent_getenv=yes
20588 else
20589   echo "$as_me: program exited with status $ac_status" >&5
20590 echo "$as_me: failed program was:" >&5
20591 cat "conftest.$ac_ext" >&5
20592 cf_cv_consistent_getenv=no
20593 fi
20594 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
20595 fi
20596
20597 fi
20598 echo "$as_me:20598: result: $cf_cv_consistent_getenv" >&5
20599 echo "${ECHO_T}$cf_cv_consistent_getenv" >&6
20600
20601 if test "x$cf_cv_consistent_getenv" = xno
20602 then
20603
20604 cat >>confdefs.h <<\EOF
20605 #define HAVE_CONSISTENT_GETENV 1
20606 EOF
20607
20608 fi
20609
20610 if test "x$cf_cv_consistent_getenv" = xno && \
20611         test "x$cf_with_trace" = xyes
20612 then
20613         { echo "$as_me:20613: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&5
20614 echo "$as_me: WARNING: The NCURSES_TRACE environment variable is not supported with this configuration" >&2;}
20615 fi
20616
20617 echo "$as_me:20617: checking if sys/time.h works with sys/select.h" >&5
20618 echo $ECHO_N "checking if sys/time.h works with sys/select.h... $ECHO_C" >&6
20619 if test "${cf_cv_sys_time_select+set}" = set; then
20620   echo $ECHO_N "(cached) $ECHO_C" >&6
20621 else
20622
20623 cat >"conftest.$ac_ext" <<_ACEOF
20624 #line 20624 "configure"
20625 #include "confdefs.h"
20626
20627 #include <sys/types.h>
20628 #ifdef HAVE_SYS_TIME_H
20629 #include <sys/time.h>
20630 #endif
20631 #ifdef HAVE_SYS_SELECT_H
20632 #include <sys/select.h>
20633 #endif
20634
20635 int
20636 main (void)
20637 {
20638
20639   ;
20640   return 0;
20641 }
20642 _ACEOF
20643 rm -f "conftest.$ac_objext"
20644 if { (eval echo "$as_me:20644: \"$ac_compile\"") >&5
20645   (eval $ac_compile) 2>&5
20646   ac_status=$?
20647   echo "$as_me:20647: \$? = $ac_status" >&5
20648   (exit "$ac_status"); } &&
20649          { ac_try='test -s "conftest.$ac_objext"'
20650   { (eval echo "$as_me:20650: \"$ac_try\"") >&5
20651   (eval $ac_try) 2>&5
20652   ac_status=$?
20653   echo "$as_me:20653: \$? = $ac_status" >&5
20654   (exit "$ac_status"); }; }; then
20655   cf_cv_sys_time_select=yes
20656 else
20657   echo "$as_me: failed program was:" >&5
20658 cat "conftest.$ac_ext" >&5
20659 cf_cv_sys_time_select=no
20660 fi
20661 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20662
20663 fi
20664
20665 echo "$as_me:20665: result: $cf_cv_sys_time_select" >&5
20666 echo "${ECHO_T}$cf_cv_sys_time_select" >&6
20667 test "$cf_cv_sys_time_select" = yes &&
20668 cat >>confdefs.h <<\EOF
20669 #define HAVE_SYS_TIME_SELECT 1
20670 EOF
20671
20672 ###     checks for compiler characteristics
20673 ac_ext=c
20674 ac_cpp='$CPP $CPPFLAGS'
20675 ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
20676 ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
20677 ac_compiler_gnu=$ac_cv_c_compiler_gnu
20678 ac_main_return="return"
20679
20680 echo "$as_me:20680: checking for an ANSI C-conforming const" >&5
20681 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20682 if test "${ac_cv_c_const+set}" = set; then
20683   echo $ECHO_N "(cached) $ECHO_C" >&6
20684 else
20685   cat >"conftest.$ac_ext" <<_ACEOF
20686 #line 20686 "configure"
20687 #include "confdefs.h"
20688
20689 int
20690 main (void)
20691 {
20692 /* FIXME: Include the comments suggested by Paul. */
20693 #ifndef __cplusplus
20694   /* Ultrix mips cc rejects this.  */
20695   typedef int charset[2];
20696   const charset x;
20697   /* SunOS 4.1.1 cc rejects this.  */
20698   char const *const *ccp;
20699   char **p;
20700   /* NEC SVR4.0.2 mips cc rejects this.  */
20701   struct point {int x, y;};
20702   static struct point const zero = {0,0};
20703   /* AIX XL C 1.02.0.0 rejects this.
20704      It does not let you subtract one const X* pointer from another in
20705      an arm of an if-expression whose if-part is not a constant
20706      expression */
20707   const char *g = "string";
20708   ccp = &g + (g ? g-g : 0);
20709   /* HPUX 7.0 cc rejects these. */
20710   ++ccp;
20711   p = (char**) ccp;
20712   ccp = (char const *const *) p;
20713   { /* SCO 3.2v4 cc rejects this.  */
20714     char *t;
20715     char const *s = 0 ? (char *) 0 : (char const *) 0;
20716
20717     *t++ = 0;
20718   }
20719   { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20720     int x[] = {25, 17};
20721     const int *foo = &x[0];
20722     ++foo;
20723   }
20724   { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20725     typedef const int *iptr;
20726     iptr p = 0;
20727     ++p;
20728   }
20729   { /* AIX XL C 1.02.0.0 rejects this saying
20730        "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20731     struct s { int j; const int *ap[3]; };
20732     struct s *b; b->j = 5;
20733   }
20734   { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20735     const int foo = 10;
20736   }
20737 #endif
20738
20739   ;
20740   return 0;
20741 }
20742 _ACEOF
20743 rm -f "conftest.$ac_objext"
20744 if { (eval echo "$as_me:20744: \"$ac_compile\"") >&5
20745   (eval $ac_compile) 2>&5
20746   ac_status=$?
20747   echo "$as_me:20747: \$? = $ac_status" >&5
20748   (exit "$ac_status"); } &&
20749          { ac_try='test -s "conftest.$ac_objext"'
20750   { (eval echo "$as_me:20750: \"$ac_try\"") >&5
20751   (eval $ac_try) 2>&5
20752   ac_status=$?
20753   echo "$as_me:20753: \$? = $ac_status" >&5
20754   (exit "$ac_status"); }; }; then
20755   ac_cv_c_const=yes
20756 else
20757   echo "$as_me: failed program was:" >&5
20758 cat "conftest.$ac_ext" >&5
20759 ac_cv_c_const=no
20760 fi
20761 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20762 fi
20763 echo "$as_me:20763: result: $ac_cv_c_const" >&5
20764 echo "${ECHO_T}$ac_cv_c_const" >&6
20765 if test $ac_cv_c_const = no; then
20766
20767 cat >>confdefs.h <<\EOF
20768 #define const
20769 EOF
20770
20771 fi
20772
20773 echo "$as_me:20773: checking for inline" >&5
20774 echo $ECHO_N "checking for inline... $ECHO_C" >&6
20775 if test "${ac_cv_c_inline+set}" = set; then
20776   echo $ECHO_N "(cached) $ECHO_C" >&6
20777 else
20778   ac_cv_c_inline=no
20779 for ac_kw in inline __inline__ __inline; do
20780   cat >"conftest.$ac_ext" <<_ACEOF
20781 #line 20781 "configure"
20782 #include "confdefs.h"
20783 #ifndef __cplusplus
20784 static $ac_kw int static_foo () {return 0; }
20785 $ac_kw int foo () {return 0; }
20786 #endif
20787
20788 _ACEOF
20789 rm -f "conftest.$ac_objext"
20790 if { (eval echo "$as_me:20790: \"$ac_compile\"") >&5
20791   (eval $ac_compile) 2>&5
20792   ac_status=$?
20793   echo "$as_me:20793: \$? = $ac_status" >&5
20794   (exit "$ac_status"); } &&
20795          { ac_try='test -s "conftest.$ac_objext"'
20796   { (eval echo "$as_me:20796: \"$ac_try\"") >&5
20797   (eval $ac_try) 2>&5
20798   ac_status=$?
20799   echo "$as_me:20799: \$? = $ac_status" >&5
20800   (exit "$ac_status"); }; }; then
20801   ac_cv_c_inline=$ac_kw; break
20802 else
20803   echo "$as_me: failed program was:" >&5
20804 cat "conftest.$ac_ext" >&5
20805 fi
20806 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20807 done
20808
20809 fi
20810 echo "$as_me:20810: result: $ac_cv_c_inline" >&5
20811 echo "${ECHO_T}$ac_cv_c_inline" >&6
20812 case $ac_cv_c_inline in
20813   inline | yes) ;;
20814   no)
20815 cat >>confdefs.h <<\EOF
20816 #define inline
20817 EOF
20818  ;;
20819   *)  cat >>confdefs.h <<EOF
20820 #define inline $ac_cv_c_inline
20821 EOF
20822  ;;
20823 esac
20824
20825 NCURSES_INLINE=
20826 if test "$ac_cv_c_inline" != no ; then
20827         NCURSES_INLINE=inline
20828         if test "$INTEL_COMPILER" = yes
20829         then
20830                 :
20831         elif test "$CLANG_COMPILER" = yes
20832         then
20833                 :
20834         elif test "$GCC" = yes
20835         then
20836                 echo "$as_me:20836: checking if $CC supports options to tune inlining" >&5
20837 echo $ECHO_N "checking if $CC supports options to tune inlining... $ECHO_C" >&6
20838 if test "${cf_cv_gcc_inline+set}" = set; then
20839   echo $ECHO_N "(cached) $ECHO_C" >&6
20840 else
20841
20842                 cf_save_CFLAGS=$CFLAGS
20843                 CFLAGS="$CFLAGS --param max-inline-insns-single=1200"
20844                 cat >"conftest.$ac_ext" <<_ACEOF
20845 #line 20845 "configure"
20846 #include "confdefs.h"
20847 inline int foo(void) { return 1; }
20848 int
20849 main (void)
20850 {
20851 ${cf_cv_main_return:-return} foo()
20852   ;
20853   return 0;
20854 }
20855 _ACEOF
20856 rm -f "conftest.$ac_objext"
20857 if { (eval echo "$as_me:20857: \"$ac_compile\"") >&5
20858   (eval $ac_compile) 2>&5
20859   ac_status=$?
20860   echo "$as_me:20860: \$? = $ac_status" >&5
20861   (exit "$ac_status"); } &&
20862          { ac_try='test -s "conftest.$ac_objext"'
20863   { (eval echo "$as_me:20863: \"$ac_try\"") >&5
20864   (eval $ac_try) 2>&5
20865   ac_status=$?
20866   echo "$as_me:20866: \$? = $ac_status" >&5
20867   (exit "$ac_status"); }; }; then
20868   cf_cv_gcc_inline=yes
20869 else
20870   echo "$as_me: failed program was:" >&5
20871 cat "conftest.$ac_ext" >&5
20872 cf_cv_gcc_inline=no
20873 fi
20874 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20875                 CFLAGS=$cf_save_CFLAGS
20876
20877 fi
20878 echo "$as_me:20878: result: $cf_cv_gcc_inline" >&5
20879 echo "${ECHO_T}$cf_cv_gcc_inline" >&6
20880                 if test "$cf_cv_gcc_inline" = yes ; then
20881
20882 cf_fix_cppflags=no
20883 cf_new_cflags=
20884 cf_new_cppflags=
20885 cf_new_extra_cppflags=
20886
20887 for cf_add_cflags in --param max-inline-insns-single=1200
20888 do
20889 case "$cf_fix_cppflags" in
20890 (no)
20891         case "$cf_add_cflags" in
20892         (-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20893                 case "$cf_add_cflags" in
20894                 (-D*)
20895                         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20896
20897                         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20898                                 && test -z "${cf_tst_cflags}" \
20899                                 && cf_fix_cppflags=yes
20900
20901                         if test "$cf_fix_cppflags" = yes ; then
20902
20903         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20904         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20905
20906                                 continue
20907                         elif test "${cf_tst_cflags}" = "\"'" ; then
20908
20909         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20910         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20911
20912                                 continue
20913                         fi
20914                         ;;
20915                 esac
20916                 case "$CPPFLAGS" in
20917                 (*$cf_add_cflags)
20918                         ;;
20919                 (*)
20920                         case "$cf_add_cflags" in
20921                         (-D*)
20922                                 cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20923
20924 CPPFLAGS=`echo "$CPPFLAGS" | \
20925         sed     -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?[         ]/ /g' \
20926                 -e 's/-[UD]'"$cf_tst_cppflags"'\(=[^    ]*\)\?$//g'`
20927
20928                                 ;;
20929                         esac
20930
20931         test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20932         cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20933
20934                         ;;
20935                 esac
20936                 ;;
20937         (*)
20938
20939         test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20940         cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20941
20942                 ;;
20943         esac
20944         ;;
20945 (yes)
20946
20947         test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20948         cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20949
20950         cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20951
20952         test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20953                 && test -z "${cf_tst_cflags}" \
20954                 && cf_fix_cppflags=no
20955         ;;
20956 esac
20957 done
20958
20959 if test -n "$cf_new_cflags" ; then
20960
20961         test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20962         CFLAGS="${CFLAGS}$cf_new_cflags"
20963
20964 fi
20965
20966 if test -n "$cf_new_cppflags" ; then
20967
20968         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20969         CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20970
20971 fi
20972
20973 if test -n "$cf_new_extra_cppflags" ; then
20974
20975         test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20976         EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20977
20978 fi
20979
20980                 fi
20981         fi
20982 fi
20983
20984 echo "$as_me:20984: checking for signal global datatype" >&5
20985 echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
20986 if test "${cf_cv_sig_atomic_t+set}" = set; then
20987   echo $ECHO_N "(cached) $ECHO_C" >&6
20988 else
20989
20990         for cf_type in \
20991                 "volatile sig_atomic_t" \
20992                 "sig_atomic_t" \
20993                 "int"
20994         do
20995         cat >"conftest.$ac_ext" <<_ACEOF
20996 #line 20996 "configure"
20997 #include "confdefs.h"
20998
20999 #include <sys/types.h>
21000 #include <signal.h>
21001 #include <stdio.h>
21002
21003 extern $cf_type x;
21004 $cf_type x;
21005 static void handler(int sig)
21006 {
21007         (void)sig;
21008         x = 5;
21009 }
21010 int
21011 main (void)
21012 {
21013 signal(SIGINT, handler);
21014                  x = 1
21015   ;
21016   return 0;
21017 }
21018 _ACEOF
21019 rm -f "conftest.$ac_objext"
21020 if { (eval echo "$as_me:21020: \"$ac_compile\"") >&5
21021   (eval $ac_compile) 2>&5
21022   ac_status=$?
21023   echo "$as_me:21023: \$? = $ac_status" >&5
21024   (exit "$ac_status"); } &&
21025          { ac_try='test -s "conftest.$ac_objext"'
21026   { (eval echo "$as_me:21026: \"$ac_try\"") >&5
21027   (eval $ac_try) 2>&5
21028   ac_status=$?
21029   echo "$as_me:21029: \$? = $ac_status" >&5
21030   (exit "$ac_status"); }; }; then
21031   cf_cv_sig_atomic_t=$cf_type
21032 else
21033   echo "$as_me: failed program was:" >&5
21034 cat "conftest.$ac_ext" >&5
21035 cf_cv_sig_atomic_t=no
21036 fi
21037 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21038                 test "$cf_cv_sig_atomic_t" != no && break
21039         done
21040
21041 fi
21042
21043 echo "$as_me:21043: result: $cf_cv_sig_atomic_t" >&5
21044 echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
21045 test "$cf_cv_sig_atomic_t" != no &&
21046 cat >>confdefs.h <<EOF
21047 #define SIG_ATOMIC_T $cf_cv_sig_atomic_t
21048 EOF
21049
21050 if test "$NCURSES_CHTYPE" = auto ; then
21051
21052 echo "$as_me:21052: checking for type of chtype" >&5
21053 echo $ECHO_N "checking for type of chtype... $ECHO_C" >&6
21054 if test "${cf_cv_typeof_chtype+set}" = set; then
21055   echo $ECHO_N "(cached) $ECHO_C" >&6
21056 else
21057
21058                 if test "$cross_compiling" = yes; then
21059   cf_cv_typeof_chtype=long
21060 else
21061   cat >"conftest.$ac_ext" <<_ACEOF
21062 #line 21062 "configure"
21063 #include "confdefs.h"
21064
21065 #define WANT_BITS 31
21066 #include <stdio.h>
21067 int main(void)
21068 {
21069         FILE *fp = fopen("cf_test.out", "w");
21070         if (fp != 0) {
21071                 char *result = "long";
21072                 if (sizeof(unsigned long) > sizeof(unsigned int)) {
21073                         int n;
21074                         unsigned int x, y;
21075                         for (n = 0; n < WANT_BITS; n++) {
21076                                 x = (1 << n);
21077                                 y = (x >> n);
21078                                 if (y != 1 || x == 0) {
21079                                         x = 0;
21080                                         break;
21081                                 }
21082                         }
21083                         /*
21084                          * If x is nonzero, an int is big enough for the bits
21085                          * that we want.
21086                          */
21087                         result = (x != 0) ? "int" : "long";
21088                 }
21089                 fputs(result, fp);
21090                 fclose(fp);
21091         }
21092         ${cf_cv_main_return:-return}(0);
21093 }
21094
21095 _ACEOF
21096 rm -f "conftest$ac_exeext"
21097 if { (eval echo "$as_me:21097: \"$ac_link\"") >&5
21098   (eval $ac_link) 2>&5
21099   ac_status=$?
21100   echo "$as_me:21100: \$? = $ac_status" >&5
21101   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21102   { (eval echo "$as_me:21102: \"$ac_try\"") >&5
21103   (eval $ac_try) 2>&5
21104   ac_status=$?
21105   echo "$as_me:21105: \$? = $ac_status" >&5
21106   (exit "$ac_status"); }; }; then
21107   cf_cv_typeof_chtype=`cat cf_test.out`
21108 else
21109   echo "$as_me: program exited with status $ac_status" >&5
21110 echo "$as_me: failed program was:" >&5
21111 cat "conftest.$ac_ext" >&5
21112 cf_cv_typeof_chtype=long
21113 fi
21114 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21115 fi
21116                 rm -f cf_test.out
21117
21118 fi
21119
21120 echo "$as_me:21120: result: $cf_cv_typeof_chtype" >&5
21121 echo "${ECHO_T}$cf_cv_typeof_chtype" >&6
21122
21123 cat >>confdefs.h <<EOF
21124 #define TYPEOF_CHTYPE $cf_cv_typeof_chtype
21125 EOF
21126
21127 else
21128         cf_cv_typeof_chtype=$NCURSES_CHTYPE
21129 fi
21130 test "$cf_cv_typeof_chtype" = unsigned && cf_cv_typeof_chtype=""
21131
21132 echo "$as_me:21132: checking if unsigned literals are legal" >&5
21133 echo $ECHO_N "checking if unsigned literals are legal... $ECHO_C" >&6
21134 if test "${cf_cv_unsigned_literals+set}" = set; then
21135   echo $ECHO_N "(cached) $ECHO_C" >&6
21136 else
21137
21138         cat >"conftest.$ac_ext" <<_ACEOF
21139 #line 21139 "configure"
21140 #include "confdefs.h"
21141
21142 int
21143 main (void)
21144 {
21145 long x = 1L + 1UL + 1U + 1
21146   ;
21147   return 0;
21148 }
21149 _ACEOF
21150 rm -f "conftest.$ac_objext"
21151 if { (eval echo "$as_me:21151: \"$ac_compile\"") >&5
21152   (eval $ac_compile) 2>&5
21153   ac_status=$?
21154   echo "$as_me:21154: \$? = $ac_status" >&5
21155   (exit "$ac_status"); } &&
21156          { ac_try='test -s "conftest.$ac_objext"'
21157   { (eval echo "$as_me:21157: \"$ac_try\"") >&5
21158   (eval $ac_try) 2>&5
21159   ac_status=$?
21160   echo "$as_me:21160: \$? = $ac_status" >&5
21161   (exit "$ac_status"); }; }; then
21162   cf_cv_unsigned_literals=yes
21163 else
21164   echo "$as_me: failed program was:" >&5
21165 cat "conftest.$ac_ext" >&5
21166 cf_cv_unsigned_literals=no
21167 fi
21168 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21169
21170 fi
21171
21172 echo "$as_me:21172: result: $cf_cv_unsigned_literals" >&5
21173 echo "${ECHO_T}$cf_cv_unsigned_literals" >&6
21174
21175 cf_cv_1UL="1"
21176 test ".$cf_cv_unsigned_literals" = .yes && cf_cv_1UL="${cf_cv_1UL}U"
21177 test ".$cf_cv_typeof_chtype"    = .long && cf_cv_1UL="${cf_cv_1UL}L"
21178
21179 if test "$NCURSES_MMASK_T" = auto ; then
21180         cf_cv_typeof_mmask_t=long
21181 else
21182         cf_cv_typeof_mmask_t=$NCURSES_MMASK_T
21183 fi
21184 test "$cf_cv_typeof_mmask_t" = unsigned && cf_cv_typeof_mmask_t=""
21185
21186 ###     Checks for external-data
21187
21188 echo "$as_me:21188: checking if external errno is declared" >&5
21189 echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
21190 if test "${cf_cv_dcl_errno+set}" = set; then
21191   echo $ECHO_N "(cached) $ECHO_C" >&6
21192 else
21193
21194         cat >"conftest.$ac_ext" <<_ACEOF
21195 #line 21195 "configure"
21196 #include "confdefs.h"
21197
21198 #ifdef HAVE_STDLIB_H
21199 #include <stdlib.h>
21200 #endif
21201 #include <stdio.h>
21202 #include <sys/types.h>
21203 #include <errno.h>
21204 int
21205 main (void)
21206 {
21207 int x = (int) errno; (void)x
21208   ;
21209   return 0;
21210 }
21211 _ACEOF
21212 rm -f "conftest.$ac_objext"
21213 if { (eval echo "$as_me:21213: \"$ac_compile\"") >&5
21214   (eval $ac_compile) 2>&5
21215   ac_status=$?
21216   echo "$as_me:21216: \$? = $ac_status" >&5
21217   (exit "$ac_status"); } &&
21218          { ac_try='test -s "conftest.$ac_objext"'
21219   { (eval echo "$as_me:21219: \"$ac_try\"") >&5
21220   (eval $ac_try) 2>&5
21221   ac_status=$?
21222   echo "$as_me:21222: \$? = $ac_status" >&5
21223   (exit "$ac_status"); }; }; then
21224   cf_cv_dcl_errno=yes
21225 else
21226   echo "$as_me: failed program was:" >&5
21227 cat "conftest.$ac_ext" >&5
21228 cf_cv_dcl_errno=no
21229 fi
21230 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21231
21232 fi
21233 echo "$as_me:21233: result: $cf_cv_dcl_errno" >&5
21234 echo "${ECHO_T}$cf_cv_dcl_errno" >&6
21235
21236 if test "$cf_cv_dcl_errno" = no ; then
21237
21238 cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21239
21240         cat >>confdefs.h <<EOF
21241 #define $cf_result 1
21242 EOF
21243
21244 fi
21245
21246 # It's possible (for near-UNIX clones) that the data doesn't exist
21247
21248 echo "$as_me:21248: checking if external errno exists" >&5
21249 echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
21250 if test "${cf_cv_have_errno+set}" = set; then
21251   echo $ECHO_N "(cached) $ECHO_C" >&6
21252 else
21253
21254         cat >"conftest.$ac_ext" <<_ACEOF
21255 #line 21255 "configure"
21256 #include "confdefs.h"
21257
21258 #undef errno
21259 extern int errno;
21260
21261 int
21262 main (void)
21263 {
21264 errno = 2
21265   ;
21266   return 0;
21267 }
21268 _ACEOF
21269 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21270 if { (eval echo "$as_me:21270: \"$ac_link\"") >&5
21271   (eval $ac_link) 2>&5
21272   ac_status=$?
21273   echo "$as_me:21273: \$? = $ac_status" >&5
21274   (exit "$ac_status"); } &&
21275          { ac_try='test -s "conftest$ac_exeext"'
21276   { (eval echo "$as_me:21276: \"$ac_try\"") >&5
21277   (eval $ac_try) 2>&5
21278   ac_status=$?
21279   echo "$as_me:21279: \$? = $ac_status" >&5
21280   (exit "$ac_status"); }; }; then
21281   cf_cv_have_errno=yes
21282 else
21283   echo "$as_me: failed program was:" >&5
21284 cat "conftest.$ac_ext" >&5
21285 cf_cv_have_errno=no
21286 fi
21287 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21288
21289 fi
21290 echo "$as_me:21290: result: $cf_cv_have_errno" >&5
21291 echo "${ECHO_T}$cf_cv_have_errno" >&6
21292
21293 if test "$cf_cv_have_errno" = yes ; then
21294
21295 cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21296
21297         cat >>confdefs.h <<EOF
21298 #define $cf_result 1
21299 EOF
21300
21301 fi
21302
21303 echo "$as_me:21303: checking if data-only library module links" >&5
21304 echo $ECHO_N "checking if data-only library module links... $ECHO_C" >&6
21305 if test "${cf_cv_link_dataonly+set}" = set; then
21306   echo $ECHO_N "(cached) $ECHO_C" >&6
21307 else
21308
21309         rm -f conftest.a
21310         cat >conftest.$ac_ext <<EOF
21311 #line 21311 "configure"
21312 int     testdata[3] = { 123, 456, 789 };
21313 EOF
21314         if { (eval echo "$as_me:21314: \"$ac_compile\"") >&5
21315   (eval $ac_compile) 2>&5
21316   ac_status=$?
21317   echo "$as_me:21317: \$? = $ac_status" >&5
21318   (exit "$ac_status"); } ; then
21319                 mv conftest.o data.o && \
21320                 ( $AR $ARFLAGS conftest.a data.o ) 2>&5 1>/dev/null
21321         fi
21322         rm -f conftest.$ac_ext data.o
21323         cat >conftest.$ac_ext <<EOF
21324 #line 21324 "configure"
21325 int     testfunc(void)
21326 {
21327 #if defined(NeXT)
21328         ${cf_cv_main_return:-return}(1);        /* I'm told this linker is broken */
21329 #else
21330         extern int testdata[3];
21331         return testdata[0] == 123
21332            &&  testdata[1] == 456
21333            &&  testdata[2] == 789;
21334 #endif
21335 }
21336 EOF
21337         if { (eval echo "$as_me:21337: \"$ac_compile\"") >&5
21338   (eval $ac_compile) 2>&5
21339   ac_status=$?
21340   echo "$as_me:21340: \$? = $ac_status" >&5
21341   (exit "$ac_status"); }; then
21342                 mv conftest.o func.o && \
21343                 ( $AR $ARFLAGS conftest.a func.o ) 2>&5 1>/dev/null
21344         fi
21345         rm -f conftest.$ac_ext func.o
21346         ( eval $RANLIB conftest.a ) 2>&5 >/dev/null
21347         cf_saveLIBS="$LIBS"
21348         LIBS="conftest.a $LIBS"
21349         if test "$cross_compiling" = yes; then
21350   cf_cv_link_dataonly=unknown
21351 else
21352   cat >"conftest.$ac_ext" <<_ACEOF
21353 #line 21353 "configure"
21354 #include "confdefs.h"
21355
21356         int main(void)
21357         {
21358                 extern int testfunc();
21359                 ${cf_cv_main_return:-return} (!testfunc());
21360         }
21361
21362 _ACEOF
21363 rm -f "conftest$ac_exeext"
21364 if { (eval echo "$as_me:21364: \"$ac_link\"") >&5
21365   (eval $ac_link) 2>&5
21366   ac_status=$?
21367   echo "$as_me:21367: \$? = $ac_status" >&5
21368   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21369   { (eval echo "$as_me:21369: \"$ac_try\"") >&5
21370   (eval $ac_try) 2>&5
21371   ac_status=$?
21372   echo "$as_me:21372: \$? = $ac_status" >&5
21373   (exit "$ac_status"); }; }; then
21374   cf_cv_link_dataonly=yes
21375 else
21376   echo "$as_me: program exited with status $ac_status" >&5
21377 echo "$as_me: failed program was:" >&5
21378 cat "conftest.$ac_ext" >&5
21379 cf_cv_link_dataonly=no
21380 fi
21381 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21382 fi
21383         LIBS="$cf_saveLIBS"
21384
21385 fi
21386
21387 echo "$as_me:21387: result: $cf_cv_link_dataonly" >&5
21388 echo "${ECHO_T}$cf_cv_link_dataonly" >&6
21389
21390 if test "$cf_cv_link_dataonly" = no ; then
21391
21392 cat >>confdefs.h <<\EOF
21393 #define BROKEN_LINKER 1
21394 EOF
21395
21396         BROKEN_LINKER=1
21397 fi
21398
21399 ###     Checks for library functions.
21400
21401 for ac_func in \
21402 getcwd \
21403 getegid \
21404 geteuid \
21405 getopt \
21406 getttynam \
21407 issetugid \
21408 localeconv \
21409 poll \
21410 putenv \
21411 remove \
21412 select \
21413 setbuf \
21414 setbuffer \
21415 setenv \
21416 setfsuid \
21417 setvbuf \
21418 sigaction \
21419 sigvec \
21420 snprintf \
21421 strdup \
21422 strstr \
21423 sysconf \
21424 tcgetpgrp \
21425 times \
21426 tsearch \
21427 vsnprintf \
21428
21429 do
21430 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21431 echo "$as_me:21431: checking for $ac_func" >&5
21432 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
21433 if eval "test \"\${$as_ac_var+set}\" = set"; then
21434   echo $ECHO_N "(cached) $ECHO_C" >&6
21435 else
21436   cat >"conftest.$ac_ext" <<_ACEOF
21437 #line 21437 "configure"
21438 #include "confdefs.h"
21439 #define $ac_func autoconf_temporary
21440 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
21441 #undef $ac_func
21442
21443 #ifdef __cplusplus
21444 extern "C"
21445 #endif
21446
21447 /* We use char because int might match the return type of a gcc2
21448    builtin and then its argument prototype would still apply.  */
21449 char $ac_func (void);
21450
21451 int
21452 main (void)
21453 {
21454
21455 /* The GNU C library defines stubs for functions which it implements
21456     to always fail with ENOSYS.  Some functions are actually named
21457     something starting with __ and the normal name is an alias.  */
21458 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21459 #error found stub for $ac_func
21460 #endif
21461
21462         return $ac_func ();
21463   ;
21464   return 0;
21465 }
21466 _ACEOF
21467 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21468 if { (eval echo "$as_me:21468: \"$ac_link\"") >&5
21469   (eval $ac_link) 2>&5
21470   ac_status=$?
21471   echo "$as_me:21471: \$? = $ac_status" >&5
21472   (exit "$ac_status"); } &&
21473          { ac_try='test -s "conftest$ac_exeext"'
21474   { (eval echo "$as_me:21474: \"$ac_try\"") >&5
21475   (eval $ac_try) 2>&5
21476   ac_status=$?
21477   echo "$as_me:21477: \$? = $ac_status" >&5
21478   (exit "$ac_status"); }; }; then
21479   eval "$as_ac_var=yes"
21480 else
21481   echo "$as_me: failed program was:" >&5
21482 cat "conftest.$ac_ext" >&5
21483 eval "$as_ac_var=no"
21484 fi
21485 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21486 fi
21487 echo "$as_me:21487: result: `eval echo '${'"$as_ac_var"'}'`" >&5
21488 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
21489 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
21490   cat >>confdefs.h <<EOF
21491 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21492 EOF
21493
21494 fi
21495 done
21496
21497 if test "x$ac_cv_func_getopt" = xno && \
21498    test "x$cf_with_progs$cf_with_tests" != xnono; then
21499         { { echo "$as_me:21499: error: getopt is required for building programs" >&5
21500 echo "$as_me: error: getopt is required for building programs" >&2;}
21501    { (exit 1); exit 1; }; }
21502 fi
21503
21504 if test "x$with_safe_sprintf" = xyes
21505 then
21506         if test "x$ac_cv_func_vsnprintf" = xyes
21507         then
21508                 { echo "$as_me:21508: WARNING: will use vsnprintf instead of safe-sprintf option" >&5
21509 echo "$as_me: WARNING: will use vsnprintf instead of safe-sprintf option" >&2;}
21510         else
21511
21512 cat >>confdefs.h <<\EOF
21513 #define USE_SAFE_SPRINTF 1
21514 EOF
21515
21516         fi
21517 fi
21518
21519 if test "x$with_getcap" = "xyes" ; then
21520
21521 echo "$as_me:21521: checking for terminal-capability database functions" >&5
21522 echo $ECHO_N "checking for terminal-capability database functions... $ECHO_C" >&6
21523 if test "${cf_cv_cgetent+set}" = set; then
21524   echo $ECHO_N "(cached) $ECHO_C" >&6
21525 else
21526
21527 cat >"conftest.$ac_ext" <<_ACEOF
21528 #line 21528 "configure"
21529 #include "confdefs.h"
21530
21531 #include <stdlib.h>
21532 int
21533 main (void)
21534 {
21535
21536         char temp[128];
21537         char *buf = temp;
21538         char *db_array = temp;
21539         cgetent(&buf, &db_array, "vt100");
21540         cgetcap(buf, "tc", '=');
21541         cgetmatch(buf, "tc");
21542
21543   ;
21544   return 0;
21545 }
21546 _ACEOF
21547 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21548 if { (eval echo "$as_me:21548: \"$ac_link\"") >&5
21549   (eval $ac_link) 2>&5
21550   ac_status=$?
21551   echo "$as_me:21551: \$? = $ac_status" >&5
21552   (exit "$ac_status"); } &&
21553          { ac_try='test -s "conftest$ac_exeext"'
21554   { (eval echo "$as_me:21554: \"$ac_try\"") >&5
21555   (eval $ac_try) 2>&5
21556   ac_status=$?
21557   echo "$as_me:21557: \$? = $ac_status" >&5
21558   (exit "$ac_status"); }; }; then
21559   cf_cv_cgetent=yes
21560 else
21561   echo "$as_me: failed program was:" >&5
21562 cat "conftest.$ac_ext" >&5
21563 cf_cv_cgetent=no
21564 fi
21565 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21566
21567 fi
21568 echo "$as_me:21568: result: $cf_cv_cgetent" >&5
21569 echo "${ECHO_T}$cf_cv_cgetent" >&6
21570
21571 if test "$cf_cv_cgetent" = yes
21572 then
21573
21574 cat >>confdefs.h <<\EOF
21575 #define HAVE_BSD_CGETENT 1
21576 EOF
21577
21578 echo "$as_me:21578: checking if cgetent uses const parameter" >&5
21579 echo $ECHO_N "checking if cgetent uses const parameter... $ECHO_C" >&6
21580 if test "${cf_cv_cgetent_const+set}" = set; then
21581   echo $ECHO_N "(cached) $ECHO_C" >&6
21582 else
21583
21584 cat >"conftest.$ac_ext" <<_ACEOF
21585 #line 21585 "configure"
21586 #include "confdefs.h"
21587
21588 #pragma GCC diagnostic error "-Wincompatible-pointer-types-discards-qualifiers"
21589 #include <stdlib.h>
21590 int
21591 main (void)
21592 {
21593
21594         char temp[128];
21595         char *buf = temp;
21596 #ifndef _NETBSD_SOURCE                  /* given, since April 2004 in stdlib.h */
21597         const char *db_array = temp;
21598         cgetent(&buf, &db_array, "vt100");
21599 #endif
21600         cgetcap(buf, "tc", '=');
21601         cgetmatch(buf, "tc");
21602
21603   ;
21604   return 0;
21605 }
21606 _ACEOF
21607 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21608 if { (eval echo "$as_me:21608: \"$ac_link\"") >&5
21609   (eval $ac_link) 2>&5
21610   ac_status=$?
21611   echo "$as_me:21611: \$? = $ac_status" >&5
21612   (exit "$ac_status"); } &&
21613          { ac_try='test -s "conftest$ac_exeext"'
21614   { (eval echo "$as_me:21614: \"$ac_try\"") >&5
21615   (eval $ac_try) 2>&5
21616   ac_status=$?
21617   echo "$as_me:21617: \$? = $ac_status" >&5
21618   (exit "$ac_status"); }; }; then
21619   cf_cv_cgetent_const=yes
21620 else
21621   echo "$as_me: failed program was:" >&5
21622 cat "conftest.$ac_ext" >&5
21623 cf_cv_cgetent_const=no
21624 fi
21625 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21626
21627 fi
21628 echo "$as_me:21628: result: $cf_cv_cgetent_const" >&5
21629 echo "${ECHO_T}$cf_cv_cgetent_const" >&6
21630         if test "$cf_cv_cgetent_const" = yes
21631         then
21632
21633 cat >>confdefs.h <<EOF
21634 #define CGETENT_CONST const
21635 EOF
21636
21637         fi
21638 fi
21639
21640 fi
21641
21642 echo "$as_me:21642: checking for isascii" >&5
21643 echo $ECHO_N "checking for isascii... $ECHO_C" >&6
21644 if test "${cf_cv_have_isascii+set}" = set; then
21645   echo $ECHO_N "(cached) $ECHO_C" >&6
21646 else
21647
21648         cat >"conftest.$ac_ext" <<_ACEOF
21649 #line 21649 "configure"
21650 #include "confdefs.h"
21651 #include <ctype.h>
21652 int
21653 main (void)
21654 {
21655 int x = isascii(' ')
21656   ;
21657   return 0;
21658 }
21659 _ACEOF
21660 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21661 if { (eval echo "$as_me:21661: \"$ac_link\"") >&5
21662   (eval $ac_link) 2>&5
21663   ac_status=$?
21664   echo "$as_me:21664: \$? = $ac_status" >&5
21665   (exit "$ac_status"); } &&
21666          { ac_try='test -s "conftest$ac_exeext"'
21667   { (eval echo "$as_me:21667: \"$ac_try\"") >&5
21668   (eval $ac_try) 2>&5
21669   ac_status=$?
21670   echo "$as_me:21670: \$? = $ac_status" >&5
21671   (exit "$ac_status"); }; }; then
21672   cf_cv_have_isascii=yes
21673 else
21674   echo "$as_me: failed program was:" >&5
21675 cat "conftest.$ac_ext" >&5
21676 cf_cv_have_isascii=no
21677 fi
21678 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21679
21680 fi
21681 echo "$as_me:21681: result: $cf_cv_have_isascii" >&5
21682 echo "${ECHO_T}$cf_cv_have_isascii" >&6
21683 test "$cf_cv_have_isascii" = yes &&
21684 cat >>confdefs.h <<\EOF
21685 #define HAVE_ISASCII 1
21686 EOF
21687
21688 if test "$ac_cv_func_sigaction" = yes; then
21689 echo "$as_me:21689: checking whether sigaction needs _POSIX_SOURCE" >&5
21690 echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
21691 cat >"conftest.$ac_ext" <<_ACEOF
21692 #line 21692 "configure"
21693 #include "confdefs.h"
21694
21695 #include <sys/types.h>
21696 #include <signal.h>
21697 int
21698 main (void)
21699 {
21700 struct sigaction act
21701   ;
21702   return 0;
21703 }
21704 _ACEOF
21705 rm -f "conftest.$ac_objext"
21706 if { (eval echo "$as_me:21706: \"$ac_compile\"") >&5
21707   (eval $ac_compile) 2>&5
21708   ac_status=$?
21709   echo "$as_me:21709: \$? = $ac_status" >&5
21710   (exit "$ac_status"); } &&
21711          { ac_try='test -s "conftest.$ac_objext"'
21712   { (eval echo "$as_me:21712: \"$ac_try\"") >&5
21713   (eval $ac_try) 2>&5
21714   ac_status=$?
21715   echo "$as_me:21715: \$? = $ac_status" >&5
21716   (exit "$ac_status"); }; }; then
21717   sigact_bad=no
21718 else
21719   echo "$as_me: failed program was:" >&5
21720 cat "conftest.$ac_ext" >&5
21721
21722 cat >"conftest.$ac_ext" <<_ACEOF
21723 #line 21723 "configure"
21724 #include "confdefs.h"
21725
21726 #define _POSIX_SOURCE
21727 #include <sys/types.h>
21728 #include <signal.h>
21729 int
21730 main (void)
21731 {
21732 struct sigaction act
21733   ;
21734   return 0;
21735 }
21736 _ACEOF
21737 rm -f "conftest.$ac_objext"
21738 if { (eval echo "$as_me:21738: \"$ac_compile\"") >&5
21739   (eval $ac_compile) 2>&5
21740   ac_status=$?
21741   echo "$as_me:21741: \$? = $ac_status" >&5
21742   (exit "$ac_status"); } &&
21743          { ac_try='test -s "conftest.$ac_objext"'
21744   { (eval echo "$as_me:21744: \"$ac_try\"") >&5
21745   (eval $ac_try) 2>&5
21746   ac_status=$?
21747   echo "$as_me:21747: \$? = $ac_status" >&5
21748   (exit "$ac_status"); }; }; then
21749   sigact_bad=yes
21750
21751 cat >>confdefs.h <<\EOF
21752 #define _POSIX_SOURCE 1
21753 EOF
21754
21755 else
21756   echo "$as_me: failed program was:" >&5
21757 cat "conftest.$ac_ext" >&5
21758 sigact_bad=unknown
21759 fi
21760 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21761 fi
21762 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21763 echo "$as_me:21763: result: $sigact_bad" >&5
21764 echo "${ECHO_T}$sigact_bad" >&6
21765 fi
21766
21767 echo "$as_me:21767: checking if nanosleep really works" >&5
21768 echo $ECHO_N "checking if nanosleep really works... $ECHO_C" >&6
21769 if test "${cf_cv_func_nanosleep+set}" = set; then
21770   echo $ECHO_N "(cached) $ECHO_C" >&6
21771 else
21772
21773 if test "$cross_compiling" = yes; then
21774   cf_cv_func_nanosleep=unknown
21775 else
21776   cat >"conftest.$ac_ext" <<_ACEOF
21777 #line 21777 "configure"
21778 #include "confdefs.h"
21779
21780 #include <stdio.h>
21781 #include <errno.h>
21782 #include <time.h>
21783
21784 #ifdef HAVE_SYS_TIME_H
21785 #include <sys/time.h>
21786 #endif
21787
21788 int main(void) {
21789         struct timespec ts1, ts2;
21790         int code;
21791         ts1.tv_sec  = 0;
21792         ts1.tv_nsec = 750000000;
21793         ts2.tv_sec  = 0;
21794         ts2.tv_nsec = 0;
21795         errno = 0;
21796         code = nanosleep(&ts1, &ts2); /* on failure errno is ENOSYS. */
21797         ${cf_cv_main_return:-return}(code != 0);
21798 }
21799
21800 _ACEOF
21801 rm -f "conftest$ac_exeext"
21802 if { (eval echo "$as_me:21802: \"$ac_link\"") >&5
21803   (eval $ac_link) 2>&5
21804   ac_status=$?
21805   echo "$as_me:21805: \$? = $ac_status" >&5
21806   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21807   { (eval echo "$as_me:21807: \"$ac_try\"") >&5
21808   (eval $ac_try) 2>&5
21809   ac_status=$?
21810   echo "$as_me:21810: \$? = $ac_status" >&5
21811   (exit "$ac_status"); }; }; then
21812   cf_cv_func_nanosleep=yes
21813 else
21814   echo "$as_me: program exited with status $ac_status" >&5
21815 echo "$as_me: failed program was:" >&5
21816 cat "conftest.$ac_ext" >&5
21817 cf_cv_func_nanosleep=no
21818 fi
21819 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21820 fi
21821 fi
21822 echo "$as_me:21822: result: $cf_cv_func_nanosleep" >&5
21823 echo "${ECHO_T}$cf_cv_func_nanosleep" >&6
21824
21825 test "$cf_cv_func_nanosleep" = "yes" &&
21826 cat >>confdefs.h <<\EOF
21827 #define HAVE_NANOSLEEP 1
21828 EOF
21829
21830 for ac_header in \
21831 termio.h \
21832 termios.h \
21833 unistd.h \
21834 sys/ioctl.h \
21835 sys/termio.h \
21836
21837 do
21838 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21839 echo "$as_me:21839: checking for $ac_header" >&5
21840 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21841 if eval "test \"\${$as_ac_Header+set}\" = set"; then
21842   echo $ECHO_N "(cached) $ECHO_C" >&6
21843 else
21844   cat >"conftest.$ac_ext" <<_ACEOF
21845 #line 21845 "configure"
21846 #include "confdefs.h"
21847 #include <$ac_header>
21848 _ACEOF
21849 if { (eval echo "$as_me:21849: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21850   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21851   ac_status=$?
21852   $EGREP -v '^ *\+' conftest.er1 >conftest.err
21853   rm -f conftest.er1
21854   cat conftest.err >&5
21855   echo "$as_me:21855: \$? = $ac_status" >&5
21856   (exit "$ac_status"); } >/dev/null; then
21857   if test -s conftest.err; then
21858     ac_cpp_err=$ac_c_preproc_warn_flag
21859   else
21860     ac_cpp_err=
21861   fi
21862 else
21863   ac_cpp_err=yes
21864 fi
21865 if test -z "$ac_cpp_err"; then
21866   eval "$as_ac_Header=yes"
21867 else
21868   echo "$as_me: failed program was:" >&5
21869   cat "conftest.$ac_ext" >&5
21870   eval "$as_ac_Header=no"
21871 fi
21872 rm -f conftest.err "conftest.$ac_ext"
21873 fi
21874 echo "$as_me:21874: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21875 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21876 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21877   cat >>confdefs.h <<EOF
21878 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21879 EOF
21880
21881 fi
21882 done
21883
21884 if test "$ac_cv_header_termios_h" = yes ; then
21885         case "$CFLAGS $CPPFLAGS" in
21886         (*-D_POSIX_SOURCE*)
21887                 termios_bad=dunno ;;
21888         (*)     termios_bad=maybe ;;
21889         esac
21890         if test "$termios_bad" = maybe ; then
21891         echo "$as_me:21891: checking whether termios.h needs _POSIX_SOURCE" >&5
21892 echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21893         cat >"conftest.$ac_ext" <<_ACEOF
21894 #line 21894 "configure"
21895 #include "confdefs.h"
21896 #include <termios.h>
21897 int
21898 main (void)
21899 {
21900 struct termios foo; int x = foo.c_iflag = 1; (void)x
21901   ;
21902   return 0;
21903 }
21904 _ACEOF
21905 rm -f "conftest.$ac_objext"
21906 if { (eval echo "$as_me:21906: \"$ac_compile\"") >&5
21907   (eval $ac_compile) 2>&5
21908   ac_status=$?
21909   echo "$as_me:21909: \$? = $ac_status" >&5
21910   (exit "$ac_status"); } &&
21911          { ac_try='test -s "conftest.$ac_objext"'
21912   { (eval echo "$as_me:21912: \"$ac_try\"") >&5
21913   (eval $ac_try) 2>&5
21914   ac_status=$?
21915   echo "$as_me:21915: \$? = $ac_status" >&5
21916   (exit "$ac_status"); }; }; then
21917   termios_bad=no
21918 else
21919   echo "$as_me: failed program was:" >&5
21920 cat "conftest.$ac_ext" >&5
21921
21922                 cat >"conftest.$ac_ext" <<_ACEOF
21923 #line 21923 "configure"
21924 #include "confdefs.h"
21925
21926 #define _POSIX_SOURCE
21927 #include <termios.h>
21928 int
21929 main (void)
21930 {
21931 struct termios foo; int x = foo.c_iflag = 2; (void)x
21932   ;
21933   return 0;
21934 }
21935 _ACEOF
21936 rm -f "conftest.$ac_objext"
21937 if { (eval echo "$as_me:21937: \"$ac_compile\"") >&5
21938   (eval $ac_compile) 2>&5
21939   ac_status=$?
21940   echo "$as_me:21940: \$? = $ac_status" >&5
21941   (exit "$ac_status"); } &&
21942          { ac_try='test -s "conftest.$ac_objext"'
21943   { (eval echo "$as_me:21943: \"$ac_try\"") >&5
21944   (eval $ac_try) 2>&5
21945   ac_status=$?
21946   echo "$as_me:21946: \$? = $ac_status" >&5
21947   (exit "$ac_status"); }; }; then
21948   termios_bad=unknown
21949 else
21950   echo "$as_me: failed program was:" >&5
21951 cat "conftest.$ac_ext" >&5
21952 termios_bad=yes
21953 cat >>confdefs.h <<\EOF
21954 #define _POSIX_SOURCE 1
21955 EOF
21956
21957 fi
21958 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21959
21960 fi
21961 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21962         echo "$as_me:21962: result: $termios_bad" >&5
21963 echo "${ECHO_T}$termios_bad" >&6
21964         fi
21965 fi
21966
21967 echo "$as_me:21967: checking for tcgetattr" >&5
21968 echo $ECHO_N "checking for tcgetattr... $ECHO_C" >&6
21969 if test "${cf_cv_have_tcgetattr+set}" = set; then
21970   echo $ECHO_N "(cached) $ECHO_C" >&6
21971 else
21972
21973 cat >"conftest.$ac_ext" <<_ACEOF
21974 #line 21974 "configure"
21975 #include "confdefs.h"
21976
21977 #include <sys/types.h>
21978 #ifdef HAVE_UNISTD_H
21979 #include <unistd.h>
21980 #endif
21981 #ifdef HAVE_TERMIOS_H
21982 #include <termios.h>
21983 #define TTY struct termios
21984 #else
21985 #ifdef HAVE_TERMIO_H
21986 #include <termio.h>
21987 #define TTY struct termio
21988 #endif
21989 #endif
21990
21991 int
21992 main (void)
21993 {
21994
21995 TTY foo;
21996 tcgetattr(1, &foo);
21997   ;
21998   return 0;
21999 }
22000 _ACEOF
22001 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22002 if { (eval echo "$as_me:22002: \"$ac_link\"") >&5
22003   (eval $ac_link) 2>&5
22004   ac_status=$?
22005   echo "$as_me:22005: \$? = $ac_status" >&5
22006   (exit "$ac_status"); } &&
22007          { ac_try='test -s "conftest$ac_exeext"'
22008   { (eval echo "$as_me:22008: \"$ac_try\"") >&5
22009   (eval $ac_try) 2>&5
22010   ac_status=$?
22011   echo "$as_me:22011: \$? = $ac_status" >&5
22012   (exit "$ac_status"); }; }; then
22013   cf_cv_have_tcgetattr=yes
22014 else
22015   echo "$as_me: failed program was:" >&5
22016 cat "conftest.$ac_ext" >&5
22017 cf_cv_have_tcgetattr=no
22018 fi
22019 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22020 fi
22021 echo "$as_me:22021: result: $cf_cv_have_tcgetattr" >&5
22022 echo "${ECHO_T}$cf_cv_have_tcgetattr" >&6
22023 test "$cf_cv_have_tcgetattr" = yes &&
22024 cat >>confdefs.h <<\EOF
22025 #define HAVE_TCGETATTR 1
22026 EOF
22027
22028 echo "$as_me:22028: checking for vsscanf function or workaround" >&5
22029 echo $ECHO_N "checking for vsscanf function or workaround... $ECHO_C" >&6
22030 if test "${cf_cv_func_vsscanf+set}" = set; then
22031   echo $ECHO_N "(cached) $ECHO_C" >&6
22032 else
22033
22034 cat >"conftest.$ac_ext" <<_ACEOF
22035 #line 22035 "configure"
22036 #include "confdefs.h"
22037
22038 #include <stdarg.h>
22039 #include <stdio.h>
22040 int
22041 main (void)
22042 {
22043
22044         va_list ap;
22045         vsscanf("from", "%d", ap)
22046   ;
22047   return 0;
22048 }
22049 _ACEOF
22050 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22051 if { (eval echo "$as_me:22051: \"$ac_link\"") >&5
22052   (eval $ac_link) 2>&5
22053   ac_status=$?
22054   echo "$as_me:22054: \$? = $ac_status" >&5
22055   (exit "$ac_status"); } &&
22056          { ac_try='test -s "conftest$ac_exeext"'
22057   { (eval echo "$as_me:22057: \"$ac_try\"") >&5
22058   (eval $ac_try) 2>&5
22059   ac_status=$?
22060   echo "$as_me:22060: \$? = $ac_status" >&5
22061   (exit "$ac_status"); }; }; then
22062   cf_cv_func_vsscanf=vsscanf
22063 else
22064   echo "$as_me: failed program was:" >&5
22065 cat "conftest.$ac_ext" >&5
22066
22067 cat >"conftest.$ac_ext" <<_ACEOF
22068 #line 22068 "configure"
22069 #include "confdefs.h"
22070
22071 #include <stdarg.h>
22072 #include <stdio.h>
22073 int
22074 main (void)
22075 {
22076
22077         FILE strbuf;
22078         char *str = "from";
22079
22080         strbuf._flag = _IOREAD;
22081         strbuf._ptr = strbuf._base = (unsigned char *) str;
22082         strbuf._cnt = strlen(str);
22083         strbuf._file = _NFILE;
22084         return (vfscanf(&strbuf, "%d", ap))
22085   ;
22086   return 0;
22087 }
22088 _ACEOF
22089 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22090 if { (eval echo "$as_me:22090: \"$ac_link\"") >&5
22091   (eval $ac_link) 2>&5
22092   ac_status=$?
22093   echo "$as_me:22093: \$? = $ac_status" >&5
22094   (exit "$ac_status"); } &&
22095          { ac_try='test -s "conftest$ac_exeext"'
22096   { (eval echo "$as_me:22096: \"$ac_try\"") >&5
22097   (eval $ac_try) 2>&5
22098   ac_status=$?
22099   echo "$as_me:22099: \$? = $ac_status" >&5
22100   (exit "$ac_status"); }; }; then
22101   cf_cv_func_vsscanf=vfscanf
22102 else
22103   echo "$as_me: failed program was:" >&5
22104 cat "conftest.$ac_ext" >&5
22105
22106 cat >"conftest.$ac_ext" <<_ACEOF
22107 #line 22107 "configure"
22108 #include "confdefs.h"
22109
22110 #include <stdarg.h>
22111 #include <stdio.h>
22112 int
22113 main (void)
22114 {
22115
22116         FILE strbuf;
22117         char *str = "from";
22118
22119         strbuf._flag = _IOREAD;
22120         strbuf._ptr = strbuf._base = (unsigned char *) str;
22121         strbuf._cnt = strlen(str);
22122         strbuf._file = _NFILE;
22123         return (_doscan(&strbuf, "%d", ap))
22124   ;
22125   return 0;
22126 }
22127 _ACEOF
22128 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22129 if { (eval echo "$as_me:22129: \"$ac_link\"") >&5
22130   (eval $ac_link) 2>&5
22131   ac_status=$?
22132   echo "$as_me:22132: \$? = $ac_status" >&5
22133   (exit "$ac_status"); } &&
22134          { ac_try='test -s "conftest$ac_exeext"'
22135   { (eval echo "$as_me:22135: \"$ac_try\"") >&5
22136   (eval $ac_try) 2>&5
22137   ac_status=$?
22138   echo "$as_me:22138: \$? = $ac_status" >&5
22139   (exit "$ac_status"); }; }; then
22140   cf_cv_func_vsscanf=_doscan
22141 else
22142   echo "$as_me: failed program was:" >&5
22143 cat "conftest.$ac_ext" >&5
22144
22145 cf_cv_func_vsscanf=no
22146 fi
22147 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22148 fi
22149 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22150 fi
22151 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22152 fi
22153 echo "$as_me:22153: result: $cf_cv_func_vsscanf" >&5
22154 echo "${ECHO_T}$cf_cv_func_vsscanf" >&6
22155
22156 case "$cf_cv_func_vsscanf" in
22157 (vsscanf)
22158 cat >>confdefs.h <<\EOF
22159 #define HAVE_VSSCANF 1
22160 EOF
22161 ;;
22162 (vfscanf)
22163 cat >>confdefs.h <<\EOF
22164 #define HAVE_VFSCANF 1
22165 EOF
22166 ;;
22167 (_doscan)
22168 cat >>confdefs.h <<\EOF
22169 #define HAVE__DOSCAN 1
22170 EOF
22171 ;;
22172 esac
22173
22174 for ac_header in \
22175 unistd.h \
22176
22177 do
22178 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22179 echo "$as_me:22179: checking for $ac_header" >&5
22180 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22181 if eval "test \"\${$as_ac_Header+set}\" = set"; then
22182   echo $ECHO_N "(cached) $ECHO_C" >&6
22183 else
22184   cat >"conftest.$ac_ext" <<_ACEOF
22185 #line 22185 "configure"
22186 #include "confdefs.h"
22187 #include <$ac_header>
22188 _ACEOF
22189 if { (eval echo "$as_me:22189: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22190   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22191   ac_status=$?
22192   $EGREP -v '^ *\+' conftest.er1 >conftest.err
22193   rm -f conftest.er1
22194   cat conftest.err >&5
22195   echo "$as_me:22195: \$? = $ac_status" >&5
22196   (exit "$ac_status"); } >/dev/null; then
22197   if test -s conftest.err; then
22198     ac_cpp_err=$ac_c_preproc_warn_flag
22199   else
22200     ac_cpp_err=
22201   fi
22202 else
22203   ac_cpp_err=yes
22204 fi
22205 if test -z "$ac_cpp_err"; then
22206   eval "$as_ac_Header=yes"
22207 else
22208   echo "$as_me: failed program was:" >&5
22209   cat "conftest.$ac_ext" >&5
22210   eval "$as_ac_Header=no"
22211 fi
22212 rm -f conftest.err "conftest.$ac_ext"
22213 fi
22214 echo "$as_me:22214: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22215 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22216 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22217   cat >>confdefs.h <<EOF
22218 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22219 EOF
22220
22221 fi
22222 done
22223
22224 echo "$as_me:22224: checking for working mkstemp" >&5
22225 echo $ECHO_N "checking for working mkstemp... $ECHO_C" >&6
22226 if test "${cf_cv_func_mkstemp+set}" = set; then
22227   echo $ECHO_N "(cached) $ECHO_C" >&6
22228 else
22229
22230 rm -rf ./conftest*
22231 if test "$cross_compiling" = yes; then
22232   cf_cv_func_mkstemp=maybe
22233 else
22234   cat >"conftest.$ac_ext" <<_ACEOF
22235 #line 22235 "configure"
22236 #include "confdefs.h"
22237
22238 #include <sys/types.h>
22239 #ifdef HAVE_UNISTD_H
22240 #include <unistd.h>
22241 #endif
22242 #include <stdlib.h>
22243 #include <stdio.h>
22244 #include <string.h>
22245 #include <sys/stat.h>
22246 int main(void)
22247 {
22248         char *tmpl = "conftestXXXXXX";
22249         char name[2][80];
22250         int n;
22251         int result = 0;
22252         int fd;
22253         struct stat sb;
22254
22255         umask(077);
22256         for (n = 0; n < 2; ++n) {
22257                 strcpy(name[n], tmpl);
22258                 if ((fd = mkstemp(name[n])) >= 0) {
22259                         if (!strcmp(name[n], tmpl)
22260                          || stat(name[n], &sb) != 0
22261                          || (sb.st_mode & S_IFMT) != S_IFREG
22262                          || (sb.st_mode & 077) != 0) {
22263                                 result = 1;
22264                         }
22265                         close(fd);
22266                 }
22267         }
22268         if (result == 0
22269          && !strcmp(name[0], name[1]))
22270                 result = 1;
22271         ${cf_cv_main_return:-return}(result);
22272 }
22273
22274 _ACEOF
22275 rm -f "conftest$ac_exeext"
22276 if { (eval echo "$as_me:22276: \"$ac_link\"") >&5
22277   (eval $ac_link) 2>&5
22278   ac_status=$?
22279   echo "$as_me:22279: \$? = $ac_status" >&5
22280   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22281   { (eval echo "$as_me:22281: \"$ac_try\"") >&5
22282   (eval $ac_try) 2>&5
22283   ac_status=$?
22284   echo "$as_me:22284: \$? = $ac_status" >&5
22285   (exit "$ac_status"); }; }; then
22286   cf_cv_func_mkstemp=yes
22287
22288 else
22289   echo "$as_me: program exited with status $ac_status" >&5
22290 echo "$as_me: failed program was:" >&5
22291 cat "conftest.$ac_ext" >&5
22292 cf_cv_func_mkstemp=no
22293
22294 fi
22295 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22296 fi
22297
22298 fi
22299 echo "$as_me:22299: result: $cf_cv_func_mkstemp" >&5
22300 echo "${ECHO_T}$cf_cv_func_mkstemp" >&6
22301 if test "x$cf_cv_func_mkstemp" = xmaybe ; then
22302         echo "$as_me:22302: checking for mkstemp" >&5
22303 echo $ECHO_N "checking for mkstemp... $ECHO_C" >&6
22304 if test "${ac_cv_func_mkstemp+set}" = set; then
22305   echo $ECHO_N "(cached) $ECHO_C" >&6
22306 else
22307   cat >"conftest.$ac_ext" <<_ACEOF
22308 #line 22308 "configure"
22309 #include "confdefs.h"
22310 #define mkstemp autoconf_temporary
22311 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22312 #undef mkstemp
22313
22314 #ifdef __cplusplus
22315 extern "C"
22316 #endif
22317
22318 /* We use char because int might match the return type of a gcc2
22319    builtin and then its argument prototype would still apply.  */
22320 char mkstemp (void);
22321
22322 int
22323 main (void)
22324 {
22325
22326 /* The GNU C library defines stubs for functions which it implements
22327     to always fail with ENOSYS.  Some functions are actually named
22328     something starting with __ and the normal name is an alias.  */
22329 #if defined (__stub_mkstemp) || defined (__stub___mkstemp)
22330 #error found stub for mkstemp
22331 #endif
22332
22333         return mkstemp ();
22334   ;
22335   return 0;
22336 }
22337 _ACEOF
22338 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22339 if { (eval echo "$as_me:22339: \"$ac_link\"") >&5
22340   (eval $ac_link) 2>&5
22341   ac_status=$?
22342   echo "$as_me:22342: \$? = $ac_status" >&5
22343   (exit "$ac_status"); } &&
22344          { ac_try='test -s "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   ac_cv_func_mkstemp=yes
22351 else
22352   echo "$as_me: failed program was:" >&5
22353 cat "conftest.$ac_ext" >&5
22354 ac_cv_func_mkstemp=no
22355 fi
22356 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22357 fi
22358 echo "$as_me:22358: result: $ac_cv_func_mkstemp" >&5
22359 echo "${ECHO_T}$ac_cv_func_mkstemp" >&6
22360
22361 fi
22362 if test "x$cf_cv_func_mkstemp" = xyes || test "x$ac_cv_func_mkstemp" = xyes ; then
22363
22364 cat >>confdefs.h <<\EOF
22365 #define HAVE_MKSTEMP 1
22366 EOF
22367
22368 fi
22369
22370 # setup for prototype of fallback for vsscanf()
22371
22372 if test "$cf_cv_func_vsscanf" = vsscanf ; then
22373         HAVE_VSSCANF=1
22374 else
22375         HAVE_VSSCANF=0
22376 fi
22377
22378 if test "x$cross_compiling" = xyes ; then
22379         { echo "$as_me:22379: WARNING: cross compiling: assume setvbuf params not reversed" >&5
22380 echo "$as_me: WARNING: cross compiling: assume setvbuf params not reversed" >&2;}
22381 else
22382         echo "$as_me:22382: checking whether setvbuf arguments are reversed" >&5
22383 echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
22384 if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
22385   echo $ECHO_N "(cached) $ECHO_C" >&6
22386 else
22387   if test "$cross_compiling" = yes; then
22388   { { echo "$as_me:22388: error: cannot run test program while cross compiling" >&5
22389 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
22390    { (exit 1); exit 1; }; }
22391 else
22392   cat >"conftest.$ac_ext" <<_ACEOF
22393 #line 22393 "configure"
22394 #include "confdefs.h"
22395 #include <stdio.h>
22396 /* If setvbuf has the reversed format, exit 0. */
22397 int
22398 main (void)
22399 {
22400   /* This call has the arguments reversed.
22401      A reversed system may check and see that the address of main
22402      is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
22403   if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
22404     $ac_main_return(1);
22405   putc('\r', stdout);
22406   $ac_main_return(0);                   /* Non-reversed systems segv here.  */
22407 }
22408 _ACEOF
22409 rm -f "conftest$ac_exeext"
22410 if { (eval echo "$as_me:22410: \"$ac_link\"") >&5
22411   (eval $ac_link) 2>&5
22412   ac_status=$?
22413   echo "$as_me:22413: \$? = $ac_status" >&5
22414   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22415   { (eval echo "$as_me:22415: \"$ac_try\"") >&5
22416   (eval $ac_try) 2>&5
22417   ac_status=$?
22418   echo "$as_me:22418: \$? = $ac_status" >&5
22419   (exit "$ac_status"); }; }; then
22420   ac_cv_func_setvbuf_reversed=yes
22421 else
22422   echo "$as_me: program exited with status $ac_status" >&5
22423 echo "$as_me: failed program was:" >&5
22424 cat "conftest.$ac_ext" >&5
22425 ac_cv_func_setvbuf_reversed=no
22426 fi
22427 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22428 fi
22429 rm -f core ./core.* ./*.core
22430 fi
22431 echo "$as_me:22431: result: $ac_cv_func_setvbuf_reversed" >&5
22432 echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
22433 if test $ac_cv_func_setvbuf_reversed = yes; then
22434
22435 cat >>confdefs.h <<\EOF
22436 #define SETVBUF_REVERSED 1
22437 EOF
22438
22439 fi
22440
22441 fi
22442 echo "$as_me:22442: checking for intptr_t" >&5
22443 echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
22444 if test "${ac_cv_type_intptr_t+set}" = set; then
22445   echo $ECHO_N "(cached) $ECHO_C" >&6
22446 else
22447   cat >"conftest.$ac_ext" <<_ACEOF
22448 #line 22448 "configure"
22449 #include "confdefs.h"
22450 $ac_includes_default
22451 int
22452 main (void)
22453 {
22454 if ((intptr_t *) 0)
22455   return 0;
22456 if (sizeof (intptr_t))
22457   return 0;
22458   ;
22459   return 0;
22460 }
22461 _ACEOF
22462 rm -f "conftest.$ac_objext"
22463 if { (eval echo "$as_me:22463: \"$ac_compile\"") >&5
22464   (eval $ac_compile) 2>&5
22465   ac_status=$?
22466   echo "$as_me:22466: \$? = $ac_status" >&5
22467   (exit "$ac_status"); } &&
22468          { ac_try='test -s "conftest.$ac_objext"'
22469   { (eval echo "$as_me:22469: \"$ac_try\"") >&5
22470   (eval $ac_try) 2>&5
22471   ac_status=$?
22472   echo "$as_me:22472: \$? = $ac_status" >&5
22473   (exit "$ac_status"); }; }; then
22474   ac_cv_type_intptr_t=yes
22475 else
22476   echo "$as_me: failed program was:" >&5
22477 cat "conftest.$ac_ext" >&5
22478 ac_cv_type_intptr_t=no
22479 fi
22480 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22481 fi
22482 echo "$as_me:22482: result: $ac_cv_type_intptr_t" >&5
22483 echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
22484 if test "$ac_cv_type_intptr_t" = yes; then
22485   :
22486 else
22487
22488 cat >>confdefs.h <<EOF
22489 #define intptr_t long
22490 EOF
22491
22492 fi
22493
22494 echo "$as_me:22494: checking for ssize_t" >&5
22495 echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22496 if test "${ac_cv_type_ssize_t+set}" = set; then
22497   echo $ECHO_N "(cached) $ECHO_C" >&6
22498 else
22499   cat >"conftest.$ac_ext" <<_ACEOF
22500 #line 22500 "configure"
22501 #include "confdefs.h"
22502 $ac_includes_default
22503 int
22504 main (void)
22505 {
22506 if ((ssize_t *) 0)
22507   return 0;
22508 if (sizeof (ssize_t))
22509   return 0;
22510   ;
22511   return 0;
22512 }
22513 _ACEOF
22514 rm -f "conftest.$ac_objext"
22515 if { (eval echo "$as_me:22515: \"$ac_compile\"") >&5
22516   (eval $ac_compile) 2>&5
22517   ac_status=$?
22518   echo "$as_me:22518: \$? = $ac_status" >&5
22519   (exit "$ac_status"); } &&
22520          { ac_try='test -s "conftest.$ac_objext"'
22521   { (eval echo "$as_me:22521: \"$ac_try\"") >&5
22522   (eval $ac_try) 2>&5
22523   ac_status=$?
22524   echo "$as_me:22524: \$? = $ac_status" >&5
22525   (exit "$ac_status"); }; }; then
22526   ac_cv_type_ssize_t=yes
22527 else
22528   echo "$as_me: failed program was:" >&5
22529 cat "conftest.$ac_ext" >&5
22530 ac_cv_type_ssize_t=no
22531 fi
22532 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22533 fi
22534 echo "$as_me:22534: result: $ac_cv_type_ssize_t" >&5
22535 echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22536 if test "$ac_cv_type_ssize_t" = yes; then
22537   :
22538 else
22539
22540 cat >>confdefs.h <<EOF
22541 #define ssize_t int
22542 EOF
22543
22544 fi
22545
22546 echo "$as_me:22546: checking for type sigaction_t" >&5
22547 echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
22548 if test "${cf_cv_type_sigaction+set}" = set; then
22549   echo $ECHO_N "(cached) $ECHO_C" >&6
22550 else
22551
22552         cat >"conftest.$ac_ext" <<_ACEOF
22553 #line 22553 "configure"
22554 #include "confdefs.h"
22555
22556 #include <signal.h>
22557 int
22558 main (void)
22559 {
22560 sigaction_t x
22561   ;
22562   return 0;
22563 }
22564 _ACEOF
22565 rm -f "conftest.$ac_objext"
22566 if { (eval echo "$as_me:22566: \"$ac_compile\"") >&5
22567   (eval $ac_compile) 2>&5
22568   ac_status=$?
22569   echo "$as_me:22569: \$? = $ac_status" >&5
22570   (exit "$ac_status"); } &&
22571          { ac_try='test -s "conftest.$ac_objext"'
22572   { (eval echo "$as_me:22572: \"$ac_try\"") >&5
22573   (eval $ac_try) 2>&5
22574   ac_status=$?
22575   echo "$as_me:22575: \$? = $ac_status" >&5
22576   (exit "$ac_status"); }; }; then
22577   cf_cv_type_sigaction=yes
22578 else
22579   echo "$as_me: failed program was:" >&5
22580 cat "conftest.$ac_ext" >&5
22581 cf_cv_type_sigaction=no
22582 fi
22583 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22584 fi
22585
22586 echo "$as_me:22586: result: $cf_cv_type_sigaction" >&5
22587 echo "${ECHO_T}$cf_cv_type_sigaction" >&6
22588 test "$cf_cv_type_sigaction" = yes &&
22589 cat >>confdefs.h <<\EOF
22590 #define HAVE_TYPE_SIGACTION 1
22591 EOF
22592
22593 echo "$as_me:22593: checking declaration of size-change" >&5
22594 echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
22595 if test "${cf_cv_sizechange+set}" = set; then
22596   echo $ECHO_N "(cached) $ECHO_C" >&6
22597 else
22598
22599         cf_cv_sizechange=unknown
22600         cf_save_CPPFLAGS="$CPPFLAGS"
22601
22602 for cf_opts in "" "NEED_PTEM_H"
22603 do
22604
22605         CPPFLAGS="$cf_save_CPPFLAGS"
22606         if test -n "$cf_opts"
22607         then
22608
22609         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22610         CPPFLAGS="${CPPFLAGS}-D$cf_opts"
22611
22612         fi
22613         cat >"conftest.$ac_ext" <<_ACEOF
22614 #line 22614 "configure"
22615 #include "confdefs.h"
22616 #include <sys/types.h>
22617 #ifdef HAVE_TERMIOS_H
22618 #include <termios.h>
22619 #else
22620 #ifdef HAVE_TERMIO_H
22621 #include <termio.h>
22622 #endif
22623 #endif
22624
22625 #ifdef NEED_PTEM_H
22626 /* This is a workaround for SCO:  they neglected to define struct winsize in
22627  * termios.h -- it is only in termio.h and ptem.h
22628  */
22629 #include <sys/stream.h>
22630 #include <sys/ptem.h>
22631 #endif
22632
22633 #ifdef HAVE_SYS_IOCTL_H
22634 #include <sys/ioctl.h>
22635 #endif
22636
22637 int
22638 main (void)
22639 {
22640
22641 #ifdef TIOCGSIZE
22642         struct ttysize win;     /* SunOS 3.0... */
22643         int y = win.ts_lines = 2;
22644         int x = win.ts_cols = 1;
22645         (void)y;
22646         (void)x;
22647 #else
22648 #ifdef TIOCGWINSZ
22649         struct winsize win;     /* everything else */
22650         int y = win.ws_row = 2;
22651         int x = win.ws_col = 1;
22652         (void)y;
22653         (void)x;
22654 #else
22655         no TIOCGSIZE or TIOCGWINSZ
22656 #endif /* TIOCGWINSZ */
22657 #endif /* TIOCGSIZE */
22658
22659   ;
22660   return 0;
22661 }
22662 _ACEOF
22663 rm -f "conftest.$ac_objext"
22664 if { (eval echo "$as_me:22664: \"$ac_compile\"") >&5
22665   (eval $ac_compile) 2>&5
22666   ac_status=$?
22667   echo "$as_me:22667: \$? = $ac_status" >&5
22668   (exit "$ac_status"); } &&
22669          { ac_try='test -s "conftest.$ac_objext"'
22670   { (eval echo "$as_me:22670: \"$ac_try\"") >&5
22671   (eval $ac_try) 2>&5
22672   ac_status=$?
22673   echo "$as_me:22673: \$? = $ac_status" >&5
22674   (exit "$ac_status"); }; }; then
22675   cf_cv_sizechange=yes
22676 else
22677   echo "$as_me: failed program was:" >&5
22678 cat "conftest.$ac_ext" >&5
22679 cf_cv_sizechange=no
22680 fi
22681 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22682
22683         CPPFLAGS="$cf_save_CPPFLAGS"
22684         if test "$cf_cv_sizechange" = yes ; then
22685                 echo "size-change succeeded ($cf_opts)" >&5
22686                 test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
22687                 break
22688         fi
22689 done
22690
22691 fi
22692 echo "$as_me:22692: result: $cf_cv_sizechange" >&5
22693 echo "${ECHO_T}$cf_cv_sizechange" >&6
22694 if test "$cf_cv_sizechange" != no ; then
22695
22696 cat >>confdefs.h <<\EOF
22697 #define HAVE_SIZECHANGE 1
22698 EOF
22699
22700         case "$cf_cv_sizechange" in
22701         (NEED*)
22702                 cat >>confdefs.h <<EOF
22703 #define $cf_cv_sizechange  1
22704 EOF
22705
22706                 ;;
22707         esac
22708 fi
22709
22710 echo "$as_me:22710: checking for memmove" >&5
22711 echo $ECHO_N "checking for memmove... $ECHO_C" >&6
22712 if test "${ac_cv_func_memmove+set}" = set; then
22713   echo $ECHO_N "(cached) $ECHO_C" >&6
22714 else
22715   cat >"conftest.$ac_ext" <<_ACEOF
22716 #line 22716 "configure"
22717 #include "confdefs.h"
22718 #define memmove autoconf_temporary
22719 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22720 #undef memmove
22721
22722 #ifdef __cplusplus
22723 extern "C"
22724 #endif
22725
22726 /* We use char because int might match the return type of a gcc2
22727    builtin and then its argument prototype would still apply.  */
22728 char memmove (void);
22729
22730 int
22731 main (void)
22732 {
22733
22734 /* The GNU C library defines stubs for functions which it implements
22735     to always fail with ENOSYS.  Some functions are actually named
22736     something starting with __ and the normal name is an alias.  */
22737 #if defined (__stub_memmove) || defined (__stub___memmove)
22738 #error found stub for memmove
22739 #endif
22740
22741         return memmove ();
22742   ;
22743   return 0;
22744 }
22745 _ACEOF
22746 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22747 if { (eval echo "$as_me:22747: \"$ac_link\"") >&5
22748   (eval $ac_link) 2>&5
22749   ac_status=$?
22750   echo "$as_me:22750: \$? = $ac_status" >&5
22751   (exit "$ac_status"); } &&
22752          { ac_try='test -s "conftest$ac_exeext"'
22753   { (eval echo "$as_me:22753: \"$ac_try\"") >&5
22754   (eval $ac_try) 2>&5
22755   ac_status=$?
22756   echo "$as_me:22756: \$? = $ac_status" >&5
22757   (exit "$ac_status"); }; }; then
22758   ac_cv_func_memmove=yes
22759 else
22760   echo "$as_me: failed program was:" >&5
22761 cat "conftest.$ac_ext" >&5
22762 ac_cv_func_memmove=no
22763 fi
22764 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22765 fi
22766 echo "$as_me:22766: result: $ac_cv_func_memmove" >&5
22767 echo "${ECHO_T}$ac_cv_func_memmove" >&6
22768 if test "$ac_cv_func_memmove" = yes; then
22769   :
22770 else
22771
22772 echo "$as_me:22772: checking for bcopy" >&5
22773 echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
22774 if test "${ac_cv_func_bcopy+set}" = set; then
22775   echo $ECHO_N "(cached) $ECHO_C" >&6
22776 else
22777   cat >"conftest.$ac_ext" <<_ACEOF
22778 #line 22778 "configure"
22779 #include "confdefs.h"
22780 #define bcopy autoconf_temporary
22781 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22782 #undef bcopy
22783
22784 #ifdef __cplusplus
22785 extern "C"
22786 #endif
22787
22788 /* We use char because int might match the return type of a gcc2
22789    builtin and then its argument prototype would still apply.  */
22790 char bcopy (void);
22791
22792 int
22793 main (void)
22794 {
22795
22796 /* The GNU C library defines stubs for functions which it implements
22797     to always fail with ENOSYS.  Some functions are actually named
22798     something starting with __ and the normal name is an alias.  */
22799 #if defined (__stub_bcopy) || defined (__stub___bcopy)
22800 #error found stub for bcopy
22801 #endif
22802
22803         return bcopy ();
22804   ;
22805   return 0;
22806 }
22807 _ACEOF
22808 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22809 if { (eval echo "$as_me:22809: \"$ac_link\"") >&5
22810   (eval $ac_link) 2>&5
22811   ac_status=$?
22812   echo "$as_me:22812: \$? = $ac_status" >&5
22813   (exit "$ac_status"); } &&
22814          { ac_try='test -s "conftest$ac_exeext"'
22815   { (eval echo "$as_me:22815: \"$ac_try\"") >&5
22816   (eval $ac_try) 2>&5
22817   ac_status=$?
22818   echo "$as_me:22818: \$? = $ac_status" >&5
22819   (exit "$ac_status"); }; }; then
22820   ac_cv_func_bcopy=yes
22821 else
22822   echo "$as_me: failed program was:" >&5
22823 cat "conftest.$ac_ext" >&5
22824 ac_cv_func_bcopy=no
22825 fi
22826 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22827 fi
22828 echo "$as_me:22828: result: $ac_cv_func_bcopy" >&5
22829 echo "${ECHO_T}$ac_cv_func_bcopy" >&6
22830 if test "$ac_cv_func_bcopy" = yes; then
22831
22832         echo "$as_me:22832: checking if bcopy does overlapping moves" >&5
22833 echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
22834 if test "${cf_cv_good_bcopy+set}" = set; then
22835   echo $ECHO_N "(cached) $ECHO_C" >&6
22836 else
22837
22838                 if test "$cross_compiling" = yes; then
22839   cf_cv_good_bcopy=unknown
22840 else
22841   cat >"conftest.$ac_ext" <<_ACEOF
22842 #line 22842 "configure"
22843 #include "confdefs.h"
22844
22845 int main(void) {
22846         static char data[] = "abcdefghijklmnopqrstuwwxyz";
22847         char temp[40];
22848         bcopy(data, temp, sizeof(data));
22849         bcopy(temp+10, temp, 15);
22850         bcopy(temp+5, temp+15, 10);
22851         ${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
22852 }
22853
22854 _ACEOF
22855 rm -f "conftest$ac_exeext"
22856 if { (eval echo "$as_me:22856: \"$ac_link\"") >&5
22857   (eval $ac_link) 2>&5
22858   ac_status=$?
22859   echo "$as_me:22859: \$? = $ac_status" >&5
22860   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
22861   { (eval echo "$as_me:22861: \"$ac_try\"") >&5
22862   (eval $ac_try) 2>&5
22863   ac_status=$?
22864   echo "$as_me:22864: \$? = $ac_status" >&5
22865   (exit "$ac_status"); }; }; then
22866   cf_cv_good_bcopy=yes
22867 else
22868   echo "$as_me: program exited with status $ac_status" >&5
22869 echo "$as_me: failed program was:" >&5
22870 cat "conftest.$ac_ext" >&5
22871 cf_cv_good_bcopy=no
22872 fi
22873 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
22874 fi
22875
22876 fi
22877 echo "$as_me:22877: result: $cf_cv_good_bcopy" >&5
22878 echo "${ECHO_T}$cf_cv_good_bcopy" >&6
22879
22880 else
22881   cf_cv_good_bcopy=no
22882 fi
22883
22884         if test "$cf_cv_good_bcopy" = yes ; then
22885
22886 cat >>confdefs.h <<\EOF
22887 #define USE_OK_BCOPY 1
22888 EOF
22889
22890         else
22891
22892 cat >>confdefs.h <<\EOF
22893 #define USE_MY_MEMMOVE 1
22894 EOF
22895
22896         fi
22897
22898 fi
22899
22900 tty >/dev/null 2>&1 || {
22901 for ac_func in posix_openpt
22902 do
22903 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
22904 echo "$as_me:22904: checking for $ac_func" >&5
22905 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
22906 if eval "test \"\${$as_ac_var+set}\" = set"; then
22907   echo $ECHO_N "(cached) $ECHO_C" >&6
22908 else
22909   cat >"conftest.$ac_ext" <<_ACEOF
22910 #line 22910 "configure"
22911 #include "confdefs.h"
22912 #define $ac_func autoconf_temporary
22913 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
22914 #undef $ac_func
22915
22916 #ifdef __cplusplus
22917 extern "C"
22918 #endif
22919
22920 /* We use char because int might match the return type of a gcc2
22921    builtin and then its argument prototype would still apply.  */
22922 char $ac_func (void);
22923
22924 int
22925 main (void)
22926 {
22927
22928 /* The GNU C library defines stubs for functions which it implements
22929     to always fail with ENOSYS.  Some functions are actually named
22930     something starting with __ and the normal name is an alias.  */
22931 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22932 #error found stub for $ac_func
22933 #endif
22934
22935         return $ac_func ();
22936   ;
22937   return 0;
22938 }
22939 _ACEOF
22940 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22941 if { (eval echo "$as_me:22941: \"$ac_link\"") >&5
22942   (eval $ac_link) 2>&5
22943   ac_status=$?
22944   echo "$as_me:22944: \$? = $ac_status" >&5
22945   (exit "$ac_status"); } &&
22946          { ac_try='test -s "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   eval "$as_ac_var=yes"
22953 else
22954   echo "$as_me: failed program was:" >&5
22955 cat "conftest.$ac_ext" >&5
22956 eval "$as_ac_var=no"
22957 fi
22958 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22959 fi
22960 echo "$as_me:22960: result: `eval echo '${'"$as_ac_var"'}'`" >&5
22961 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
22962 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
22963   cat >>confdefs.h <<EOF
22964 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
22965 EOF
22966
22967 fi
22968 done
22969  }
22970 echo "$as_me:22970: checking if poll really works" >&5
22971 echo $ECHO_N "checking if poll really works... $ECHO_C" >&6
22972 if test "${cf_cv_working_poll+set}" = set; then
22973   echo $ECHO_N "(cached) $ECHO_C" >&6
22974 else
22975
22976 if test "$cross_compiling" = yes; then
22977   cf_cv_working_poll=unknown
22978 else
22979   cat >"conftest.$ac_ext" <<_ACEOF
22980 #line 22980 "configure"
22981 #include "confdefs.h"
22982
22983 #include <stdlib.h>
22984 #include <stdio.h>
22985 #include <unistd.h>
22986 #include <fcntl.h>
22987 #ifdef HAVE_POLL_H
22988 #include <poll.h>
22989 #else
22990 #include <sys/poll.h>
22991 #endif
22992 int main(void) {
22993         struct pollfd myfds;
22994         int ret;
22995
22996         /* check for Darwin bug with respect to "devices" */
22997         myfds.fd = open("/dev/null", 1);        /* O_WRONLY */
22998         if (myfds.fd < 0)
22999                 myfds.fd = 0;
23000         myfds.events = POLLIN;
23001         myfds.revents = 0;
23002
23003         ret = poll(&myfds, 1, 100);
23004
23005         if (ret < 0 || (myfds.revents & POLLNVAL)) {
23006                 ret = -1;
23007         } else {
23008                 int fd = 0;
23009                 if (!isatty(fd)) {
23010                         fd = open("/dev/tty", 2);       /* O_RDWR */
23011                 }
23012 #ifdef HAVE_POSIX_OPENPT
23013                 if (fd < 0) {
23014                         fd = posix_openpt(O_RDWR);
23015                 }
23016 #endif
23017
23018                 if (fd >= 0) {
23019                         /* also check with standard input */
23020                         myfds.fd = fd;
23021                         myfds.events = POLLIN;
23022                         myfds.revents = 0;
23023                         ret = poll(&myfds, 1, 100);
23024                 } else {
23025                         ret = -1;
23026                 }
23027         }
23028         ${cf_cv_main_return:-return}(ret < 0);
23029 }
23030 _ACEOF
23031 rm -f "conftest$ac_exeext"
23032 if { (eval echo "$as_me:23032: \"$ac_link\"") >&5
23033   (eval $ac_link) 2>&5
23034   ac_status=$?
23035   echo "$as_me:23035: \$? = $ac_status" >&5
23036   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23037   { (eval echo "$as_me:23037: \"$ac_try\"") >&5
23038   (eval $ac_try) 2>&5
23039   ac_status=$?
23040   echo "$as_me:23040: \$? = $ac_status" >&5
23041   (exit "$ac_status"); }; }; then
23042   cf_cv_working_poll=yes
23043 else
23044   echo "$as_me: program exited with status $ac_status" >&5
23045 echo "$as_me: failed program was:" >&5
23046 cat "conftest.$ac_ext" >&5
23047 cf_cv_working_poll=no
23048 fi
23049 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23050 fi
23051 fi
23052 echo "$as_me:23052: result: $cf_cv_working_poll" >&5
23053 echo "${ECHO_T}$cf_cv_working_poll" >&6
23054 test "$cf_cv_working_poll" = "yes" &&
23055 cat >>confdefs.h <<\EOF
23056 #define HAVE_WORKING_POLL 1
23057 EOF
23058
23059 echo "$as_me:23059: checking for va_copy" >&5
23060 echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
23061 if test "${cf_cv_have_va_copy+set}" = set; then
23062   echo $ECHO_N "(cached) $ECHO_C" >&6
23063 else
23064
23065 cat >"conftest.$ac_ext" <<_ACEOF
23066 #line 23066 "configure"
23067 #include "confdefs.h"
23068
23069 #include <stdarg.h>
23070
23071 int
23072 main (void)
23073 {
23074
23075         static va_list dst;
23076         static va_list src;
23077         va_copy(dst, src)
23078   ;
23079   return 0;
23080 }
23081 _ACEOF
23082 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23083 if { (eval echo "$as_me:23083: \"$ac_link\"") >&5
23084   (eval $ac_link) 2>&5
23085   ac_status=$?
23086   echo "$as_me:23086: \$? = $ac_status" >&5
23087   (exit "$ac_status"); } &&
23088          { ac_try='test -s "conftest$ac_exeext"'
23089   { (eval echo "$as_me:23089: \"$ac_try\"") >&5
23090   (eval $ac_try) 2>&5
23091   ac_status=$?
23092   echo "$as_me:23092: \$? = $ac_status" >&5
23093   (exit "$ac_status"); }; }; then
23094   cf_cv_have_va_copy=yes
23095 else
23096   echo "$as_me: failed program was:" >&5
23097 cat "conftest.$ac_ext" >&5
23098 cf_cv_have_va_copy=no
23099 fi
23100 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23101 fi
23102 echo "$as_me:23102: result: $cf_cv_have_va_copy" >&5
23103 echo "${ECHO_T}$cf_cv_have_va_copy" >&6
23104
23105 if test "$cf_cv_have_va_copy" = yes;
23106 then
23107
23108 cat >>confdefs.h <<\EOF
23109 #define HAVE_VA_COPY 1
23110 EOF
23111
23112 else # !cf_cv_have_va_copy
23113
23114 echo "$as_me:23114: checking for __va_copy" >&5
23115 echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
23116 if test "${cf_cv_have___va_copy+set}" = set; then
23117   echo $ECHO_N "(cached) $ECHO_C" >&6
23118 else
23119
23120 cat >"conftest.$ac_ext" <<_ACEOF
23121 #line 23121 "configure"
23122 #include "confdefs.h"
23123
23124 #include <stdarg.h>
23125
23126 int
23127 main (void)
23128 {
23129
23130         static va_list dst;
23131         static va_list src;
23132         __va_copy(dst, src)
23133   ;
23134   return 0;
23135 }
23136 _ACEOF
23137 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23138 if { (eval echo "$as_me:23138: \"$ac_link\"") >&5
23139   (eval $ac_link) 2>&5
23140   ac_status=$?
23141   echo "$as_me:23141: \$? = $ac_status" >&5
23142   (exit "$ac_status"); } &&
23143          { ac_try='test -s "conftest$ac_exeext"'
23144   { (eval echo "$as_me:23144: \"$ac_try\"") >&5
23145   (eval $ac_try) 2>&5
23146   ac_status=$?
23147   echo "$as_me:23147: \$? = $ac_status" >&5
23148   (exit "$ac_status"); }; }; then
23149   cf_cv_have___va_copy=yes
23150 else
23151   echo "$as_me: failed program was:" >&5
23152 cat "conftest.$ac_ext" >&5
23153 cf_cv_have___va_copy=no
23154 fi
23155 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23156 fi
23157 echo "$as_me:23157: result: $cf_cv_have___va_copy" >&5
23158 echo "${ECHO_T}$cf_cv_have___va_copy" >&6
23159
23160 if test "$cf_cv_have___va_copy" = yes
23161 then
23162
23163 cat >>confdefs.h <<\EOF
23164 #define HAVE___VA_COPY 1
23165 EOF
23166
23167 else # !cf_cv_have___va_copy
23168
23169 echo "$as_me:23169: checking for __builtin_va_copy" >&5
23170 echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
23171 if test "${cf_cv_have___builtin_va_copy+set}" = set; then
23172   echo $ECHO_N "(cached) $ECHO_C" >&6
23173 else
23174
23175 cat >"conftest.$ac_ext" <<_ACEOF
23176 #line 23176 "configure"
23177 #include "confdefs.h"
23178
23179 #include <stdarg.h>
23180
23181 int
23182 main (void)
23183 {
23184
23185         static va_list dst;
23186         static va_list src;
23187         __builtin_va_copy(dst, src)
23188   ;
23189   return 0;
23190 }
23191 _ACEOF
23192 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23193 if { (eval echo "$as_me:23193: \"$ac_link\"") >&5
23194   (eval $ac_link) 2>&5
23195   ac_status=$?
23196   echo "$as_me:23196: \$? = $ac_status" >&5
23197   (exit "$ac_status"); } &&
23198          { ac_try='test -s "conftest$ac_exeext"'
23199   { (eval echo "$as_me:23199: \"$ac_try\"") >&5
23200   (eval $ac_try) 2>&5
23201   ac_status=$?
23202   echo "$as_me:23202: \$? = $ac_status" >&5
23203   (exit "$ac_status"); }; }; then
23204   cf_cv_have___builtin_va_copy=yes
23205 else
23206   echo "$as_me: failed program was:" >&5
23207 cat "conftest.$ac_ext" >&5
23208 cf_cv_have___builtin_va_copy=no
23209 fi
23210 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23211 fi
23212 echo "$as_me:23212: result: $cf_cv_have___builtin_va_copy" >&5
23213 echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
23214
23215 test "$cf_cv_have___builtin_va_copy" = yes &&
23216
23217 cat >>confdefs.h <<\EOF
23218 #define HAVE___BUILTIN_VA_COPY 1
23219 EOF
23220
23221 fi # cf_cv_have___va_copy
23222
23223 fi # cf_cv_have_va_copy
23224
23225 case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
23226 (*yes*)
23227         ;;
23228
23229 (*)
23230         echo "$as_me:23230: checking if we can simply copy va_list" >&5
23231 echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
23232 if test "${cf_cv_pointer_va_list+set}" = set; then
23233   echo $ECHO_N "(cached) $ECHO_C" >&6
23234 else
23235
23236 cat >"conftest.$ac_ext" <<_ACEOF
23237 #line 23237 "configure"
23238 #include "confdefs.h"
23239
23240 #include <stdarg.h>
23241
23242 int
23243 main (void)
23244 {
23245
23246         va_list dst;
23247         va_list src;
23248         dst = src
23249   ;
23250   return 0;
23251 }
23252 _ACEOF
23253 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23254 if { (eval echo "$as_me:23254: \"$ac_link\"") >&5
23255   (eval $ac_link) 2>&5
23256   ac_status=$?
23257   echo "$as_me:23257: \$? = $ac_status" >&5
23258   (exit "$ac_status"); } &&
23259          { ac_try='test -s "conftest$ac_exeext"'
23260   { (eval echo "$as_me:23260: \"$ac_try\"") >&5
23261   (eval $ac_try) 2>&5
23262   ac_status=$?
23263   echo "$as_me:23263: \$? = $ac_status" >&5
23264   (exit "$ac_status"); }; }; then
23265   cf_cv_pointer_va_list=yes
23266 else
23267   echo "$as_me: failed program was:" >&5
23268 cat "conftest.$ac_ext" >&5
23269 cf_cv_pointer_va_list=no
23270 fi
23271 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23272 fi
23273 echo "$as_me:23273: result: $cf_cv_pointer_va_list" >&5
23274 echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
23275
23276         if test "$cf_cv_pointer_va_list" = no
23277         then
23278                 echo "$as_me:23278: checking if we can copy va_list indirectly" >&5
23279 echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
23280 if test "${cf_cv_array_va_list+set}" = set; then
23281   echo $ECHO_N "(cached) $ECHO_C" >&6
23282 else
23283
23284 cat >"conftest.$ac_ext" <<_ACEOF
23285 #line 23285 "configure"
23286 #include "confdefs.h"
23287
23288 #include <stdarg.h>
23289
23290 int
23291 main (void)
23292 {
23293
23294         va_list dst;
23295         va_list src;
23296         *dst = *src
23297   ;
23298   return 0;
23299 }
23300 _ACEOF
23301 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23302 if { (eval echo "$as_me:23302: \"$ac_link\"") >&5
23303   (eval $ac_link) 2>&5
23304   ac_status=$?
23305   echo "$as_me:23305: \$? = $ac_status" >&5
23306   (exit "$ac_status"); } &&
23307          { ac_try='test -s "conftest$ac_exeext"'
23308   { (eval echo "$as_me:23308: \"$ac_try\"") >&5
23309   (eval $ac_try) 2>&5
23310   ac_status=$?
23311   echo "$as_me:23311: \$? = $ac_status" >&5
23312   (exit "$ac_status"); }; }; then
23313   cf_cv_array_va_list=yes
23314 else
23315   echo "$as_me: failed program was:" >&5
23316 cat "conftest.$ac_ext" >&5
23317 cf_cv_array_va_list=no
23318 fi
23319 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23320 fi
23321 echo "$as_me:23321: result: $cf_cv_array_va_list" >&5
23322 echo "${ECHO_T}$cf_cv_array_va_list" >&6
23323                 test "$cf_cv_array_va_list" = yes &&
23324 cat >>confdefs.h <<\EOF
23325 #define ARRAY_VA_LIST 1
23326 EOF
23327
23328         fi
23329         ;;
23330 esac
23331
23332 echo "$as_me:23332: checking for pid_t" >&5
23333 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
23334 if test "${ac_cv_type_pid_t+set}" = set; then
23335   echo $ECHO_N "(cached) $ECHO_C" >&6
23336 else
23337   cat >"conftest.$ac_ext" <<_ACEOF
23338 #line 23338 "configure"
23339 #include "confdefs.h"
23340 $ac_includes_default
23341 int
23342 main (void)
23343 {
23344 if ((pid_t *) 0)
23345   return 0;
23346 if (sizeof (pid_t))
23347   return 0;
23348   ;
23349   return 0;
23350 }
23351 _ACEOF
23352 rm -f "conftest.$ac_objext"
23353 if { (eval echo "$as_me:23353: \"$ac_compile\"") >&5
23354   (eval $ac_compile) 2>&5
23355   ac_status=$?
23356   echo "$as_me:23356: \$? = $ac_status" >&5
23357   (exit "$ac_status"); } &&
23358          { ac_try='test -s "conftest.$ac_objext"'
23359   { (eval echo "$as_me:23359: \"$ac_try\"") >&5
23360   (eval $ac_try) 2>&5
23361   ac_status=$?
23362   echo "$as_me:23362: \$? = $ac_status" >&5
23363   (exit "$ac_status"); }; }; then
23364   ac_cv_type_pid_t=yes
23365 else
23366   echo "$as_me: failed program was:" >&5
23367 cat "conftest.$ac_ext" >&5
23368 ac_cv_type_pid_t=no
23369 fi
23370 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23371 fi
23372 echo "$as_me:23372: result: $ac_cv_type_pid_t" >&5
23373 echo "${ECHO_T}$ac_cv_type_pid_t" >&6
23374 if test "$ac_cv_type_pid_t" = yes; then
23375   :
23376 else
23377
23378 cat >>confdefs.h <<EOF
23379 #define pid_t int
23380 EOF
23381
23382 fi
23383
23384 for ac_header in unistd.h vfork.h
23385 do
23386 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
23387 echo "$as_me:23387: checking for $ac_header" >&5
23388 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
23389 if eval "test \"\${$as_ac_Header+set}\" = set"; then
23390   echo $ECHO_N "(cached) $ECHO_C" >&6
23391 else
23392   cat >"conftest.$ac_ext" <<_ACEOF
23393 #line 23393 "configure"
23394 #include "confdefs.h"
23395 #include <$ac_header>
23396 _ACEOF
23397 if { (eval echo "$as_me:23397: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23398   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23399   ac_status=$?
23400   $EGREP -v '^ *\+' conftest.er1 >conftest.err
23401   rm -f conftest.er1
23402   cat conftest.err >&5
23403   echo "$as_me:23403: \$? = $ac_status" >&5
23404   (exit "$ac_status"); } >/dev/null; then
23405   if test -s conftest.err; then
23406     ac_cpp_err=$ac_c_preproc_warn_flag
23407   else
23408     ac_cpp_err=
23409   fi
23410 else
23411   ac_cpp_err=yes
23412 fi
23413 if test -z "$ac_cpp_err"; then
23414   eval "$as_ac_Header=yes"
23415 else
23416   echo "$as_me: failed program was:" >&5
23417   cat "conftest.$ac_ext" >&5
23418   eval "$as_ac_Header=no"
23419 fi
23420 rm -f conftest.err "conftest.$ac_ext"
23421 fi
23422 echo "$as_me:23422: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
23423 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
23424 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
23425   cat >>confdefs.h <<EOF
23426 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
23427 EOF
23428
23429 fi
23430 done
23431
23432 for ac_func in fork vfork
23433 do
23434 as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23435 echo "$as_me:23435: checking for $ac_func" >&5
23436 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23437 if eval "test \"\${$as_ac_var+set}\" = set"; then
23438   echo $ECHO_N "(cached) $ECHO_C" >&6
23439 else
23440   cat >"conftest.$ac_ext" <<_ACEOF
23441 #line 23441 "configure"
23442 #include "confdefs.h"
23443 #define $ac_func autoconf_temporary
23444 #include <limits.h>     /* least-intrusive standard header which defines gcc2 __stub macros */
23445 #undef $ac_func
23446
23447 #ifdef __cplusplus
23448 extern "C"
23449 #endif
23450
23451 /* We use char because int might match the return type of a gcc2
23452    builtin and then its argument prototype would still apply.  */
23453 char $ac_func (void);
23454
23455 int
23456 main (void)
23457 {
23458
23459 /* The GNU C library defines stubs for functions which it implements
23460     to always fail with ENOSYS.  Some functions are actually named
23461     something starting with __ and the normal name is an alias.  */
23462 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23463 #error found stub for $ac_func
23464 #endif
23465
23466         return $ac_func ();
23467   ;
23468   return 0;
23469 }
23470 _ACEOF
23471 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23472 if { (eval echo "$as_me:23472: \"$ac_link\"") >&5
23473   (eval $ac_link) 2>&5
23474   ac_status=$?
23475   echo "$as_me:23475: \$? = $ac_status" >&5
23476   (exit "$ac_status"); } &&
23477          { ac_try='test -s "conftest$ac_exeext"'
23478   { (eval echo "$as_me:23478: \"$ac_try\"") >&5
23479   (eval $ac_try) 2>&5
23480   ac_status=$?
23481   echo "$as_me:23481: \$? = $ac_status" >&5
23482   (exit "$ac_status"); }; }; then
23483   eval "$as_ac_var=yes"
23484 else
23485   echo "$as_me: failed program was:" >&5
23486 cat "conftest.$ac_ext" >&5
23487 eval "$as_ac_var=no"
23488 fi
23489 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23490 fi
23491 echo "$as_me:23491: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23492 echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23493 if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23494   cat >>confdefs.h <<EOF
23495 #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23496 EOF
23497
23498 fi
23499 done
23500
23501 ac_cv_func_fork_works=$ac_cv_func_fork
23502 if test "x$ac_cv_func_fork" = xyes; then
23503   echo "$as_me:23503: checking for working fork" >&5
23504 echo $ECHO_N "checking for working fork... $ECHO_C" >&6
23505 if test "${ac_cv_func_fork_works+set}" = set; then
23506   echo $ECHO_N "(cached) $ECHO_C" >&6
23507 else
23508   if test "$cross_compiling" = yes; then
23509   ac_cv_func_fork_works=cross
23510 else
23511   cat >"conftest.$ac_ext" <<_ACEOF
23512 /* By Rüdiger Kuhlmann. */
23513       #include <sys/types.h>
23514       #if HAVE_UNISTD_H
23515       # include <unistd.h>
23516       #endif
23517       /* Some systems only have a dummy stub for fork() */
23518       int main (void)
23519       {
23520         if (fork() < 0)
23521           $ac_main_return (1);
23522         $ac_main_return (0);
23523       }
23524 _ACEOF
23525 rm -f "conftest$ac_exeext"
23526 if { (eval echo "$as_me:23526: \"$ac_link\"") >&5
23527   (eval $ac_link) 2>&5
23528   ac_status=$?
23529   echo "$as_me:23529: \$? = $ac_status" >&5
23530   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23531   { (eval echo "$as_me:23531: \"$ac_try\"") >&5
23532   (eval $ac_try) 2>&5
23533   ac_status=$?
23534   echo "$as_me:23534: \$? = $ac_status" >&5
23535   (exit "$ac_status"); }; }; then
23536   ac_cv_func_fork_works=yes
23537 else
23538   echo "$as_me: program exited with status $ac_status" >&5
23539 echo "$as_me: failed program was:" >&5
23540 cat "conftest.$ac_ext" >&5
23541 ac_cv_func_fork_works=no
23542 fi
23543 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23544 fi
23545 fi
23546 echo "$as_me:23546: result: $ac_cv_func_fork_works" >&5
23547 echo "${ECHO_T}$ac_cv_func_fork_works" >&6
23548
23549 fi
23550 if test "x$ac_cv_func_fork_works" = xcross; then
23551   case $host in
23552     *-*-amigaos* | *-*-msdosdjgpp*)
23553       # Override, as these systems have only a dummy fork() stub
23554       ac_cv_func_fork_works=no
23555       ;;
23556     *)
23557       ac_cv_func_fork_works=yes
23558       ;;
23559   esac
23560   { echo "$as_me:23560: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
23561 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
23562 fi
23563 ac_cv_func_vfork_works=$ac_cv_func_vfork
23564 if test "x$ac_cv_func_vfork" = xyes; then
23565   echo "$as_me:23565: checking for working vfork" >&5
23566 echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
23567 if test "${ac_cv_func_vfork_works+set}" = set; then
23568   echo $ECHO_N "(cached) $ECHO_C" >&6
23569 else
23570   if test "$cross_compiling" = yes; then
23571   ac_cv_func_vfork_works=cross
23572 else
23573   cat >"conftest.$ac_ext" <<_ACEOF
23574 #line 23574 "configure"
23575 #include "confdefs.h"
23576 /* Thanks to Paul Eggert for this test.  */
23577 #include <stdio.h>
23578 #include <sys/types.h>
23579 #include <sys/stat.h>
23580 #if HAVE_UNISTD_H
23581 # include <unistd.h>
23582 #endif
23583 #if HAVE_VFORK_H
23584 # include <vfork.h>
23585 #endif
23586 /* On some sparc systems, changes by the child to local and incoming
23587    argument registers are propagated back to the parent.  The compiler
23588    is told about this with #include <vfork.h>, but some compilers
23589    (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
23590    static variable whose address is put into a register that is
23591    clobbered by the vfork.  */
23592 static
23593 #ifdef __cplusplus
23594 sparc_address_test (int arg)
23595 # else
23596 sparc_address_test (arg) int arg;
23597 #endif
23598 {
23599   static pid_t child;
23600   if (!child) {
23601     child = vfork ();
23602     if (child < 0) {
23603       perror ("vfork");
23604       _exit(2);
23605     }
23606     if (!child) {
23607       arg = getpid();
23608       write(-1, "", 0);
23609       _exit (arg);
23610     }
23611   }
23612 }
23613
23614 int
23615 main (void)
23616 {
23617   pid_t parent = getpid ();
23618   pid_t child;
23619
23620   sparc_address_test ();
23621
23622   child = vfork ();
23623
23624   if (child == 0) {
23625     /* Here is another test for sparc vfork register problems.  This
23626        test uses lots of local variables, at least as many local
23627        variables as main has allocated so far including compiler
23628        temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
23629        4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
23630        reuse the register of parent for one of the local variables,
23631        since it will think that parent can't possibly be used any more
23632        in this routine.  Assigning to the local variable will thus
23633        munge parent in the parent process.  */
23634     pid_t
23635       p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
23636       p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
23637     /* Convince the compiler that p..p7 are live; otherwise, it might
23638        use the same hardware register for all 8 local variables.  */
23639     if (p != p1 || p != p2 || p != p3 || p != p4
23640         || p != p5 || p != p6 || p != p7)
23641       _exit(1);
23642
23643     /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
23644        from child file descriptors.  If the child closes a descriptor
23645        before it execs or exits, this munges the parent's descriptor
23646        as well.  Test for this by closing stdout in the child.  */
23647     _exit(close(fileno(stdout)) != 0);
23648   } else {
23649     int status;
23650     struct stat st;
23651
23652     while (wait(&status) != child)
23653       ;
23654     $ac_main_return(
23655          /* Was there some problem with vforking?  */
23656          child < 0
23657
23658          /* Did the child fail?  (This shouldn't happen.)  */
23659          || status
23660
23661          /* Did the vfork/compiler bug occur?  */
23662          || parent != getpid()
23663
23664          /* Did the file descriptor bug occur?  */
23665          || fstat(fileno(stdout), &st) != 0
23666          );
23667   }
23668 }
23669 _ACEOF
23670 rm -f "conftest$ac_exeext"
23671 if { (eval echo "$as_me:23671: \"$ac_link\"") >&5
23672   (eval $ac_link) 2>&5
23673   ac_status=$?
23674   echo "$as_me:23674: \$? = $ac_status" >&5
23675   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23676   { (eval echo "$as_me:23676: \"$ac_try\"") >&5
23677   (eval $ac_try) 2>&5
23678   ac_status=$?
23679   echo "$as_me:23679: \$? = $ac_status" >&5
23680   (exit "$ac_status"); }; }; then
23681   ac_cv_func_vfork_works=yes
23682 else
23683   echo "$as_me: program exited with status $ac_status" >&5
23684 echo "$as_me: failed program was:" >&5
23685 cat "conftest.$ac_ext" >&5
23686 ac_cv_func_vfork_works=no
23687 fi
23688 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23689 fi
23690 fi
23691 echo "$as_me:23691: result: $ac_cv_func_vfork_works" >&5
23692 echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
23693
23694 fi;
23695 if test "x$ac_cv_func_fork_works" = xcross; then
23696   ac_cv_func_vfork_works=ac_cv_func_vfork
23697   { echo "$as_me:23697: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
23698 echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
23699 fi
23700
23701 if test "x$ac_cv_func_vfork_works" = xyes; then
23702
23703 cat >>confdefs.h <<\EOF
23704 #define HAVE_WORKING_VFORK 1
23705 EOF
23706
23707 else
23708
23709 cat >>confdefs.h <<\EOF
23710 #define vfork fork
23711 EOF
23712
23713 fi
23714 if test "x$ac_cv_func_fork_works" = xyes; then
23715
23716 cat >>confdefs.h <<\EOF
23717 #define HAVE_WORKING_FORK 1
23718 EOF
23719
23720 fi
23721
23722 echo "$as_me:23722: checking if fopen accepts explicit binary mode" >&5
23723 echo $ECHO_N "checking if fopen accepts explicit binary mode... $ECHO_C" >&6
23724 if test "${cf_cv_fopen_bin_r+set}" = set; then
23725   echo $ECHO_N "(cached) $ECHO_C" >&6
23726 else
23727
23728         if test "$cross_compiling" = yes; then
23729   cf_cv_fopen_bin_r=unknown
23730 else
23731   cat >"conftest.$ac_ext" <<_ACEOF
23732 #line 23732 "configure"
23733 #include "confdefs.h"
23734
23735 #include <stdio.h>
23736 int main(void) {
23737         FILE *fp = fopen("conftest.tmp", "wb");
23738         int rc = 0;
23739         if (fp != 0) {
23740                 int p, q;
23741                 for (p = 0; p < 256; ++p) {
23742                         fputc(p, fp);
23743                 }
23744                 fclose(fp);
23745                 fp = fopen("conftest.tmp", "rb");
23746                 if (fp != 0) {
23747                         for (p = 0; p < 256; ++p) {
23748                                 q = fgetc(fp);
23749                                 if (q != p) {
23750                                         rc = 1;
23751                                         break;
23752                                 }
23753                         }
23754                 } else {
23755                         rc = 1;
23756                 }
23757         } else {
23758                 rc = 1;
23759         }
23760         ${cf_cv_main_return:-return} (rc);
23761 }
23762
23763 _ACEOF
23764 rm -f "conftest$ac_exeext"
23765 if { (eval echo "$as_me:23765: \"$ac_link\"") >&5
23766   (eval $ac_link) 2>&5
23767   ac_status=$?
23768   echo "$as_me:23768: \$? = $ac_status" >&5
23769   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23770   { (eval echo "$as_me:23770: \"$ac_try\"") >&5
23771   (eval $ac_try) 2>&5
23772   ac_status=$?
23773   echo "$as_me:23773: \$? = $ac_status" >&5
23774   (exit "$ac_status"); }; }; then
23775   cf_cv_fopen_bin_r=yes
23776 else
23777   echo "$as_me: program exited with status $ac_status" >&5
23778 echo "$as_me: failed program was:" >&5
23779 cat "conftest.$ac_ext" >&5
23780 cf_cv_fopen_bin_r=no
23781 fi
23782 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23783 fi
23784
23785 fi
23786 echo "$as_me:23786: result: $cf_cv_fopen_bin_r" >&5
23787 echo "${ECHO_T}$cf_cv_fopen_bin_r" >&6
23788 test "x$cf_cv_fopen_bin_r" != xno &&
23789 cat >>confdefs.h <<\EOF
23790 #define USE_FOPEN_BIN_R 1
23791 EOF
23792
23793 # special check for test/ditto.c
23794
23795 echo "$as_me:23795: checking for openpty in -lutil" >&5
23796 echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
23797 if test "${ac_cv_lib_util_openpty+set}" = set; then
23798   echo $ECHO_N "(cached) $ECHO_C" >&6
23799 else
23800   ac_check_lib_save_LIBS=$LIBS
23801 LIBS="-lutil  $LIBS"
23802 cat >"conftest.$ac_ext" <<_ACEOF
23803 #line 23803 "configure"
23804 #include "confdefs.h"
23805
23806 /* Override any gcc2 internal prototype to avoid an error.  */
23807 #ifdef __cplusplus
23808 extern "C"
23809 #endif
23810 /* We use char because int might match the return type of a gcc2
23811    builtin and then its argument prototype would still apply.  */
23812 char openpty ();
23813 int
23814 main (void)
23815 {
23816 openpty ();
23817   ;
23818   return 0;
23819 }
23820 _ACEOF
23821 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23822 if { (eval echo "$as_me:23822: \"$ac_link\"") >&5
23823   (eval $ac_link) 2>&5
23824   ac_status=$?
23825   echo "$as_me:23825: \$? = $ac_status" >&5
23826   (exit "$ac_status"); } &&
23827          { ac_try='test -s "conftest$ac_exeext"'
23828   { (eval echo "$as_me:23828: \"$ac_try\"") >&5
23829   (eval $ac_try) 2>&5
23830   ac_status=$?
23831   echo "$as_me:23831: \$? = $ac_status" >&5
23832   (exit "$ac_status"); }; }; then
23833   ac_cv_lib_util_openpty=yes
23834 else
23835   echo "$as_me: failed program was:" >&5
23836 cat "conftest.$ac_ext" >&5
23837 ac_cv_lib_util_openpty=no
23838 fi
23839 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23840 LIBS=$ac_check_lib_save_LIBS
23841 fi
23842 echo "$as_me:23842: result: $ac_cv_lib_util_openpty" >&5
23843 echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
23844 if test "$ac_cv_lib_util_openpty" = yes; then
23845   cf_cv_lib_util=yes
23846 else
23847   cf_cv_lib_util=no
23848 fi
23849
23850 echo "$as_me:23850: checking for openpty header" >&5
23851 echo $ECHO_N "checking for openpty header... $ECHO_C" >&6
23852 if test "${cf_cv_func_openpty+set}" = set; then
23853   echo $ECHO_N "(cached) $ECHO_C" >&6
23854 else
23855
23856         cf_save_LIBS="$LIBS"
23857         test "$cf_cv_lib_util" = yes && {
23858 cf_add_libs="$LIBS"
23859 # reverse order
23860 cf_add_0lib=
23861 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23862 # filter duplicates
23863 for cf_add_1lib in $cf_add_0lib; do
23864         for cf_add_2lib in $cf_add_libs; do
23865                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23866                         cf_add_1lib=
23867                         break
23868                 fi
23869         done
23870         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23871 done
23872 LIBS="$cf_add_libs"
23873  }
23874         for cf_header in pty.h libutil.h util.h
23875         do
23876         cat >"conftest.$ac_ext" <<_ACEOF
23877 #line 23877 "configure"
23878 #include "confdefs.h"
23879
23880 #include <$cf_header>
23881
23882 int
23883 main (void)
23884 {
23885
23886         int x = openpty((int *)0, (int *)0, (char *)0,
23887                                    (struct termios *)0, (struct winsize *)0);
23888
23889   ;
23890   return 0;
23891 }
23892 _ACEOF
23893 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23894 if { (eval echo "$as_me:23894: \"$ac_link\"") >&5
23895   (eval $ac_link) 2>&5
23896   ac_status=$?
23897   echo "$as_me:23897: \$? = $ac_status" >&5
23898   (exit "$ac_status"); } &&
23899          { ac_try='test -s "conftest$ac_exeext"'
23900   { (eval echo "$as_me:23900: \"$ac_try\"") >&5
23901   (eval $ac_try) 2>&5
23902   ac_status=$?
23903   echo "$as_me:23903: \$? = $ac_status" >&5
23904   (exit "$ac_status"); }; }; then
23905
23906                 cf_cv_func_openpty=$cf_header
23907                 break
23908
23909 else
23910   echo "$as_me: failed program was:" >&5
23911 cat "conftest.$ac_ext" >&5
23912
23913                 cf_cv_func_openpty=no
23914
23915 fi
23916 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23917         done
23918         LIBS="$cf_save_LIBS"
23919
23920 fi
23921 echo "$as_me:23921: result: $cf_cv_func_openpty" >&5
23922 echo "${ECHO_T}$cf_cv_func_openpty" >&6
23923
23924 if test "$cf_cv_func_openpty" != no ; then
23925
23926 cat >>confdefs.h <<EOF
23927 #define USE_OPENPTY_HEADER <$cf_cv_func_openpty>
23928 EOF
23929
23930 cat >>confdefs.h <<\EOF
23931 #define USE_XTERM_PTY 1
23932 EOF
23933
23934         if test "x$cf_cv_lib_util" = xyes ; then
23935
23936 cf_add_libs="$TEST_LIBS"
23937 # reverse order
23938 cf_add_0lib=
23939 for cf_add_1lib in -lutil; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23940 # filter duplicates
23941 for cf_add_1lib in $cf_add_0lib; do
23942         for cf_add_2lib in $cf_add_libs; do
23943                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23944                         cf_add_1lib=
23945                         break
23946                 fi
23947         done
23948         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23949 done
23950 TEST_LIBS="$cf_add_libs"
23951
23952         fi
23953 fi
23954
23955 if test "$with_hashed_db" != no ; then
23956
23957 cat >>confdefs.h <<\EOF
23958 #define USE_HASHED_DB 1
23959 EOF
23960
23961 case $with_hashed_db in
23962 (yes|*able*)
23963         ;;
23964 (*)
23965         if test -d "$with_hashed_db" ; then
23966
23967 if test -n "$with_hashed_db/include" ; then
23968   for cf_add_incdir in $with_hashed_db/include
23969   do
23970         while test "$cf_add_incdir" != /usr/include
23971         do
23972           if test -d "$cf_add_incdir"
23973           then
23974                 cf_have_incdir=no
23975                 if test -n "$CFLAGS$CPPFLAGS" ; then
23976                   # a loop is needed to ensure we can add subdirs of existing dirs
23977                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23978                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23979                           cf_have_incdir=yes; break
23980                         fi
23981                   done
23982                 fi
23983
23984                 if test "$cf_have_incdir" = no ; then
23985                   if test "$cf_add_incdir" = /usr/local/include ; then
23986                         if test "$GCC" = yes
23987                         then
23988                           cf_save_CPPFLAGS=$CPPFLAGS
23989
23990         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23991         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23992
23993                           cat >"conftest.$ac_ext" <<_ACEOF
23994 #line 23994 "configure"
23995 #include "confdefs.h"
23996 #include <stdio.h>
23997 int
23998 main (void)
23999 {
24000 printf("Hello")
24001   ;
24002   return 0;
24003 }
24004 _ACEOF
24005 rm -f "conftest.$ac_objext"
24006 if { (eval echo "$as_me:24006: \"$ac_compile\"") >&5
24007   (eval $ac_compile) 2>&5
24008   ac_status=$?
24009   echo "$as_me:24009: \$? = $ac_status" >&5
24010   (exit "$ac_status"); } &&
24011          { ac_try='test -s "conftest.$ac_objext"'
24012   { (eval echo "$as_me:24012: \"$ac_try\"") >&5
24013   (eval $ac_try) 2>&5
24014   ac_status=$?
24015   echo "$as_me:24015: \$? = $ac_status" >&5
24016   (exit "$ac_status"); }; }; then
24017   :
24018 else
24019   echo "$as_me: failed program was:" >&5
24020 cat "conftest.$ac_ext" >&5
24021 cf_have_incdir=yes
24022 fi
24023 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24024                           CPPFLAGS=$cf_save_CPPFLAGS
24025                         fi
24026                   fi
24027                 fi
24028
24029                 if test "$cf_have_incdir" = no ; then
24030                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24031
24032 echo "${as_me:-configure}:24032: testing adding $cf_add_incdir to include-path ..." 1>&5
24033
24034                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24035
24036                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24037                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24038                   cf_add_incdir="$cf_top_incdir"
24039                 else
24040                   break
24041                 fi
24042           else
24043                 break
24044           fi
24045         done
24046   done
24047 fi
24048
24049 if test -n "$with_hashed_db/lib" ; then
24050         for cf_add_libdir in $with_hashed_db/lib
24051         do
24052                 if test "$cf_add_libdir" = /usr/lib ; then
24053                         :
24054                 elif test -d "$cf_add_libdir"
24055                 then
24056                         cf_have_libdir=no
24057                         if test -n "$LDFLAGS$LIBS" ; then
24058                                 # a loop is needed to ensure we can add subdirs of existing dirs
24059                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24060                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24061                                                 cf_have_libdir=yes; break
24062                                         fi
24063                                 done
24064                         fi
24065                         if test "$cf_have_libdir" = no ; then
24066                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24067
24068 echo "${as_me:-configure}:24068: testing adding $cf_add_libdir to library-path ..." 1>&5
24069
24070                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24071                         fi
24072                 fi
24073         done
24074 fi
24075
24076         else
24077                 case "$with_hashed_db" in
24078                 (./*|../*|/*)
24079                         { echo "$as_me:24079: WARNING: no such directory $with_hashed_db" >&5
24080 echo "$as_me: WARNING: no such directory $with_hashed_db" >&2;}
24081                         ;;
24082                 (*)
24083
24084 cf_search=
24085
24086 test "x$prefix" != "xNONE" && \
24087 test -d "$prefix" && \
24088  {
24089         test -n "$verbose" && echo "    ... testing for include-directories under $prefix"
24090         test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24091         test -d "$prefix/include/$with_hashed_db" &&       cf_search="$cf_search $prefix/include/$with_hashed_db"
24092         test -d "$prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $prefix/include/$with_hashed_db/include"
24093         test -d "$prefix/$with_hashed_db/include" &&       cf_search="$cf_search $prefix/$with_hashed_db/include"
24094         test -d "$prefix/$with_hashed_db/include/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/include/$with_hashed_db"
24095 }
24096
24097 for cf_subdir_prefix in \
24098         /usr \
24099         /usr/local \
24100         /usr/pkg \
24101         /opt \
24102         /opt/local \
24103         $HOME
24104 do
24105
24106 test "x$cf_subdir_prefix" != "x$prefix" && \
24107 test -d "$cf_subdir_prefix" && \
24108 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24109         test -n "$verbose" && echo "    ... testing for include-directories under $cf_subdir_prefix"
24110         test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24111         test -d "$cf_subdir_prefix/include/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db"
24112         test -d "$cf_subdir_prefix/include/$with_hashed_db/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$with_hashed_db/include"
24113         test -d "$cf_subdir_prefix/$with_hashed_db/include" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/include"
24114         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"
24115 }
24116
24117 done
24118
24119         for cf_item in $cf_search
24120         do
24121                 case "$cf_item" in
24122                 (*/$with_hashed_db)
24123
24124 if test -n "$cf_item" ; then
24125   for cf_add_incdir in $cf_item
24126   do
24127         while test "$cf_add_incdir" != /usr/include
24128         do
24129           if test -d "$cf_add_incdir"
24130           then
24131                 cf_have_incdir=no
24132                 if test -n "$CFLAGS$CPPFLAGS" ; then
24133                   # a loop is needed to ensure we can add subdirs of existing dirs
24134                   for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24135                         if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24136                           cf_have_incdir=yes; break
24137                         fi
24138                   done
24139                 fi
24140
24141                 if test "$cf_have_incdir" = no ; then
24142                   if test "$cf_add_incdir" = /usr/local/include ; then
24143                         if test "$GCC" = yes
24144                         then
24145                           cf_save_CPPFLAGS=$CPPFLAGS
24146
24147         test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24148         CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24149
24150                           cat >"conftest.$ac_ext" <<_ACEOF
24151 #line 24151 "configure"
24152 #include "confdefs.h"
24153 #include <stdio.h>
24154 int
24155 main (void)
24156 {
24157 printf("Hello")
24158   ;
24159   return 0;
24160 }
24161 _ACEOF
24162 rm -f "conftest.$ac_objext"
24163 if { (eval echo "$as_me:24163: \"$ac_compile\"") >&5
24164   (eval $ac_compile) 2>&5
24165   ac_status=$?
24166   echo "$as_me:24166: \$? = $ac_status" >&5
24167   (exit "$ac_status"); } &&
24168          { ac_try='test -s "conftest.$ac_objext"'
24169   { (eval echo "$as_me:24169: \"$ac_try\"") >&5
24170   (eval $ac_try) 2>&5
24171   ac_status=$?
24172   echo "$as_me:24172: \$? = $ac_status" >&5
24173   (exit "$ac_status"); }; }; then
24174   :
24175 else
24176   echo "$as_me: failed program was:" >&5
24177 cat "conftest.$ac_ext" >&5
24178 cf_have_incdir=yes
24179 fi
24180 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24181                           CPPFLAGS=$cf_save_CPPFLAGS
24182                         fi
24183                   fi
24184                 fi
24185
24186                 if test "$cf_have_incdir" = no ; then
24187                   test -n "$verbose" && echo "  adding $cf_add_incdir to include-path" 1>&6
24188
24189 echo "${as_me:-configure}:24189: testing adding $cf_add_incdir to include-path ..." 1>&5
24190
24191                   CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24192
24193                   cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24194                   test "$cf_top_incdir" = "$cf_add_incdir" && break
24195                   cf_add_incdir="$cf_top_incdir"
24196                 else
24197                   break
24198                 fi
24199           else
24200                 break
24201           fi
24202         done
24203   done
24204 fi
24205
24206                         ;;
24207                 esac
24208         done
24209
24210 cf_search=
24211
24212 test "x$prefix" != "xNONE" && \
24213 test -d "$prefix" && \
24214  {
24215         test -n "$verbose" && echo "    ... testing for lib-directories under $prefix"
24216         test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
24217         test -d "$prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $prefix/lib/$with_hashed_db"
24218         test -d "$prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $prefix/lib/$with_hashed_db/lib"
24219         test -d "$prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $prefix/$with_hashed_db/lib"
24220         test -d "$prefix/$with_hashed_db/lib/$with_hashed_db" &&    cf_search="$cf_search $prefix/$with_hashed_db/lib/$with_hashed_db"
24221 }
24222
24223 for cf_subdir_prefix in \
24224         /usr \
24225         /usr/local \
24226         /usr/pkg \
24227         /opt \
24228         /opt/local \
24229         $HOME
24230 do
24231
24232 test "x$cf_subdir_prefix" != "x$prefix" && \
24233 test -d "$cf_subdir_prefix" && \
24234 { test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24235         test -n "$verbose" && echo "    ... testing for lib-directories under $cf_subdir_prefix"
24236         test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
24237         test -d "$cf_subdir_prefix/lib/$with_hashed_db" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db"
24238         test -d "$cf_subdir_prefix/lib/$with_hashed_db/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$with_hashed_db/lib"
24239         test -d "$cf_subdir_prefix/$with_hashed_db/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$with_hashed_db/lib"
24240         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"
24241 }
24242
24243 done
24244
24245         for cf_item in $cf_search
24246         do
24247                 case "$cf_item" in
24248                 (*/$with_hashed_db)
24249
24250 if test -n "$cf_item" ; then
24251         for cf_add_libdir in $cf_item
24252         do
24253                 if test "$cf_add_libdir" = /usr/lib ; then
24254                         :
24255                 elif test -d "$cf_add_libdir"
24256                 then
24257                         cf_have_libdir=no
24258                         if test -n "$LDFLAGS$LIBS" ; then
24259                                 # a loop is needed to ensure we can add subdirs of existing dirs
24260                                 for cf_test_libdir in $LDFLAGS $LIBS ; do
24261                                         if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
24262                                                 cf_have_libdir=yes; break
24263                                         fi
24264                                 done
24265                         fi
24266                         if test "$cf_have_libdir" = no ; then
24267                                 test -n "$verbose" && echo "    adding $cf_add_libdir to library-path" 1>&6
24268
24269 echo "${as_me:-configure}:24269: testing adding $cf_add_libdir to library-path ..." 1>&5
24270
24271                                 LDFLAGS="-L$cf_add_libdir $LDFLAGS"
24272                         fi
24273                 fi
24274         done
24275 fi
24276
24277                         ;;
24278                 esac
24279         done
24280
24281                         ;;
24282                 esac
24283         fi
24284 esac
24285
24286 echo "$as_me:24286: checking for db.h" >&5
24287 echo $ECHO_N "checking for db.h... $ECHO_C" >&6
24288 if test "${ac_cv_header_db_h+set}" = set; then
24289   echo $ECHO_N "(cached) $ECHO_C" >&6
24290 else
24291   cat >"conftest.$ac_ext" <<_ACEOF
24292 #line 24292 "configure"
24293 #include "confdefs.h"
24294 #include <db.h>
24295 _ACEOF
24296 if { (eval echo "$as_me:24296: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24297   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24298   ac_status=$?
24299   $EGREP -v '^ *\+' conftest.er1 >conftest.err
24300   rm -f conftest.er1
24301   cat conftest.err >&5
24302   echo "$as_me:24302: \$? = $ac_status" >&5
24303   (exit "$ac_status"); } >/dev/null; then
24304   if test -s conftest.err; then
24305     ac_cpp_err=$ac_c_preproc_warn_flag
24306   else
24307     ac_cpp_err=
24308   fi
24309 else
24310   ac_cpp_err=yes
24311 fi
24312 if test -z "$ac_cpp_err"; then
24313   ac_cv_header_db_h=yes
24314 else
24315   echo "$as_me: failed program was:" >&5
24316   cat "conftest.$ac_ext" >&5
24317   ac_cv_header_db_h=no
24318 fi
24319 rm -f conftest.err "conftest.$ac_ext"
24320 fi
24321 echo "$as_me:24321: result: $ac_cv_header_db_h" >&5
24322 echo "${ECHO_T}$ac_cv_header_db_h" >&6
24323 if test "$ac_cv_header_db_h" = yes; then
24324
24325 echo "$as_me:24325: checking for version of db" >&5
24326 echo $ECHO_N "checking for version of db... $ECHO_C" >&6
24327 if test "${cf_cv_hashed_db_version+set}" = set; then
24328   echo $ECHO_N "(cached) $ECHO_C" >&6
24329 else
24330
24331 cf_cv_hashed_db_version=unknown
24332
24333 for cf_db_version in 1 2 3 4 5 6
24334 do
24335
24336 echo "${as_me:-configure}:24336: testing checking for db version $cf_db_version ..." 1>&5
24337
24338         cat >"conftest.$ac_ext" <<_ACEOF
24339 #line 24339 "configure"
24340 #include "confdefs.h"
24341
24342 $ac_includes_default
24343 #include <db.h>
24344
24345 #ifdef DB_VERSION_MAJOR
24346         /* db2 (DB_VERSION_MAJOR=2) has also DB_VERSION_MINOR, tested with 7 */
24347 #if $cf_db_version == DB_VERSION_MAJOR
24348         /* ok */
24349 #else
24350         make an error
24351 #endif
24352 #else
24353 #if $cf_db_version == 1
24354         /* ok: assuming this is DB 1.8.5 */
24355 #else
24356         make an error
24357 #endif
24358 #endif
24359
24360 int
24361 main (void)
24362 {
24363 DBT *foo = 0
24364   ;
24365   return 0;
24366 }
24367 _ACEOF
24368 rm -f "conftest.$ac_objext"
24369 if { (eval echo "$as_me:24369: \"$ac_compile\"") >&5
24370   (eval $ac_compile) 2>&5
24371   ac_status=$?
24372   echo "$as_me:24372: \$? = $ac_status" >&5
24373   (exit "$ac_status"); } &&
24374          { ac_try='test -s "conftest.$ac_objext"'
24375   { (eval echo "$as_me:24375: \"$ac_try\"") >&5
24376   (eval $ac_try) 2>&5
24377   ac_status=$?
24378   echo "$as_me:24378: \$? = $ac_status" >&5
24379   (exit "$ac_status"); }; }; then
24380
24381         cf_cv_hashed_db_version=$cf_db_version
24382         break
24383
24384 else
24385   echo "$as_me: failed program was:" >&5
24386 cat "conftest.$ac_ext" >&5
24387 fi
24388 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24389 done
24390
24391 fi
24392 echo "$as_me:24392: result: $cf_cv_hashed_db_version" >&5
24393 echo "${ECHO_T}$cf_cv_hashed_db_version" >&6
24394
24395 if test "$cf_cv_hashed_db_version" = unknown ; then
24396         { { echo "$as_me:24396: error: Cannot determine version of db" >&5
24397 echo "$as_me: error: Cannot determine version of db" >&2;}
24398    { (exit 1); exit 1; }; }
24399 else
24400
24401 echo "$as_me:24401: checking for db libraries" >&5
24402 echo $ECHO_N "checking for db libraries... $ECHO_C" >&6
24403 if test "${cf_cv_hashed_db_libs+set}" = set; then
24404   echo $ECHO_N "(cached) $ECHO_C" >&6
24405 else
24406
24407 cf_cv_hashed_db_libs=unknown
24408 for cf_db_libs in "" db$cf_cv_hashed_db_version db-$cf_cv_hashed_db_version db ''
24409 do
24410         cf_save_libs="$LIBS"
24411         if test -n "$cf_db_libs"; then
24412
24413 cf_add_libs="$LIBS"
24414 # reverse order
24415 cf_add_0lib=
24416 for cf_add_1lib in -l$cf_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24417 # filter duplicates
24418 for cf_add_1lib in $cf_add_0lib; do
24419         for cf_add_2lib in $cf_add_libs; do
24420                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24421                         cf_add_1lib=
24422                         break
24423                 fi
24424         done
24425         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24426 done
24427 LIBS="$cf_add_libs"
24428
24429         fi
24430
24431 echo "${as_me:-configure}:24431: testing checking for library $cf_db_libs ..." 1>&5
24432
24433         cat >"conftest.$ac_ext" <<_ACEOF
24434 #line 24434 "configure"
24435 #include "confdefs.h"
24436
24437 $ac_includes_default
24438 #include <db.h>
24439
24440 int
24441 main (void)
24442 {
24443
24444         char *path = "/tmp/foo";
24445 #ifdef DB_VERSION_MAJOR
24446 #if DB_VERSION_MAJOR >= 4
24447         DB *result = 0;
24448         db_create(&result, NULL, 0);
24449         result->open(result,
24450                 NULL,
24451                 path,
24452                 path,
24453                 DB_HASH,
24454                 DB_CREATE,
24455                 0644);
24456 #elif DB_VERSION_MAJOR >= 3
24457         DB *result = 0;
24458         db_create(&result, NULL, 0);
24459         result->open(result,
24460                 path,
24461                 path,
24462                 DB_HASH,
24463                 DB_CREATE,
24464                 0644);
24465 #elif DB_VERSION_MAJOR >= 2
24466         DB *result = 0;
24467         db_open(path,
24468                 DB_HASH,
24469                 DB_CREATE,
24470                 0644,
24471                 (DB_ENV *) 0,
24472                 (DB_INFO *) 0,
24473                 &result);
24474 #endif /* DB_VERSION_MAJOR */
24475 #else
24476         DB *result = dbopen(path,
24477                      2,
24478                      0644,
24479                      DB_HASH,
24480                      0);
24481 #endif
24482         ${cf_cv_main_return:-return}(result != 0)
24483
24484   ;
24485   return 0;
24486 }
24487 _ACEOF
24488 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24489 if { (eval echo "$as_me:24489: \"$ac_link\"") >&5
24490   (eval $ac_link) 2>&5
24491   ac_status=$?
24492   echo "$as_me:24492: \$? = $ac_status" >&5
24493   (exit "$ac_status"); } &&
24494          { ac_try='test -s "conftest$ac_exeext"'
24495   { (eval echo "$as_me:24495: \"$ac_try\"") >&5
24496   (eval $ac_try) 2>&5
24497   ac_status=$?
24498   echo "$as_me:24498: \$? = $ac_status" >&5
24499   (exit "$ac_status"); }; }; then
24500
24501         if test -n "$cf_db_libs" ; then
24502                 cf_cv_hashed_db_libs=$cf_db_libs
24503         else
24504                 cf_cv_hashed_db_libs=default
24505         fi
24506         LIBS="$cf_save_libs"
24507         break
24508
24509 else
24510   echo "$as_me: failed program was:" >&5
24511 cat "conftest.$ac_ext" >&5
24512 fi
24513 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24514         LIBS="$cf_save_libs"
24515 done
24516
24517 fi
24518 echo "$as_me:24518: result: $cf_cv_hashed_db_libs" >&5
24519 echo "${ECHO_T}$cf_cv_hashed_db_libs" >&6
24520
24521         if test "$cf_cv_hashed_db_libs" = unknown ; then
24522                 { { echo "$as_me:24522: error: Cannot determine library for db" >&5
24523 echo "$as_me: error: Cannot determine library for db" >&2;}
24524    { (exit 1); exit 1; }; }
24525         elif test "$cf_cv_hashed_db_libs" != default ; then
24526
24527 cf_add_libs="$LIBS"
24528 # reverse order
24529 cf_add_0lib=
24530 for cf_add_1lib in -l$cf_cv_hashed_db_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24531 # filter duplicates
24532 for cf_add_1lib in $cf_add_0lib; do
24533         for cf_add_2lib in $cf_add_libs; do
24534                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24535                         cf_add_1lib=
24536                         break
24537                 fi
24538         done
24539         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24540 done
24541 LIBS="$cf_add_libs"
24542
24543         fi
24544 fi
24545
24546 else
24547
24548         { { echo "$as_me:24548: error: Cannot find db.h" >&5
24549 echo "$as_me: error: Cannot find db.h" >&2;}
24550    { (exit 1); exit 1; }; }
24551
24552 fi
24553
24554 fi
24555
24556 if test -z "$cf_user_CFLAGS" && test "$enable_leaks" = yes ; then
24557         CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[        ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24558         CXXFLAGS=`echo "${CXXFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[    ]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
24559 fi
24560
24561 # Just in case, check if the C compiler has a bool type.
24562
24563 echo "$as_me:24563: checking if we should include stdbool.h" >&5
24564 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
24565
24566 if test "${cf_cv_header_stdbool_h+set}" = set; then
24567   echo $ECHO_N "(cached) $ECHO_C" >&6
24568 else
24569
24570         cat >"conftest.$ac_ext" <<_ACEOF
24571 #line 24571 "configure"
24572 #include "confdefs.h"
24573
24574 int
24575 main (void)
24576 {
24577 bool foo = false
24578   ;
24579   return 0;
24580 }
24581 _ACEOF
24582 rm -f "conftest.$ac_objext"
24583 if { (eval echo "$as_me:24583: \"$ac_compile\"") >&5
24584   (eval $ac_compile) 2>&5
24585   ac_status=$?
24586   echo "$as_me:24586: \$? = $ac_status" >&5
24587   (exit "$ac_status"); } &&
24588          { ac_try='test -s "conftest.$ac_objext"'
24589   { (eval echo "$as_me:24589: \"$ac_try\"") >&5
24590   (eval $ac_try) 2>&5
24591   ac_status=$?
24592   echo "$as_me:24592: \$? = $ac_status" >&5
24593   (exit "$ac_status"); }; }; then
24594   cf_cv_header_stdbool_h=0
24595 else
24596   echo "$as_me: failed program was:" >&5
24597 cat "conftest.$ac_ext" >&5
24598 cat >"conftest.$ac_ext" <<_ACEOF
24599 #line 24599 "configure"
24600 #include "confdefs.h"
24601
24602 #ifndef __BEOS__
24603 #include <stdbool.h>
24604 #endif
24605
24606 int
24607 main (void)
24608 {
24609 bool foo = false
24610   ;
24611   return 0;
24612 }
24613 _ACEOF
24614 rm -f "conftest.$ac_objext"
24615 if { (eval echo "$as_me:24615: \"$ac_compile\"") >&5
24616   (eval $ac_compile) 2>&5
24617   ac_status=$?
24618   echo "$as_me:24618: \$? = $ac_status" >&5
24619   (exit "$ac_status"); } &&
24620          { ac_try='test -s "conftest.$ac_objext"'
24621   { (eval echo "$as_me:24621: \"$ac_try\"") >&5
24622   (eval $ac_try) 2>&5
24623   ac_status=$?
24624   echo "$as_me:24624: \$? = $ac_status" >&5
24625   (exit "$ac_status"); }; }; then
24626   cf_cv_header_stdbool_h=1
24627 else
24628   echo "$as_me: failed program was:" >&5
24629 cat "conftest.$ac_ext" >&5
24630 cf_cv_header_stdbool_h=0
24631 fi
24632 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24633 fi
24634 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24635 fi
24636
24637 if test "$cf_cv_header_stdbool_h" = 1
24638 then    echo "$as_me:24638: result: yes" >&5
24639 echo "${ECHO_T}yes" >&6
24640 else    echo "$as_me:24640: result: no" >&5
24641 echo "${ECHO_T}no" >&6
24642 fi
24643
24644 echo "$as_me:24644: checking for builtin bool type" >&5
24645 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
24646
24647 if test "${cf_cv_cc_bool_type+set}" = set; then
24648   echo $ECHO_N "(cached) $ECHO_C" >&6
24649 else
24650
24651         cat >"conftest.$ac_ext" <<_ACEOF
24652 #line 24652 "configure"
24653 #include "confdefs.h"
24654
24655 #include <stdio.h>
24656 #include <sys/types.h>
24657
24658 int
24659 main (void)
24660 {
24661 bool x = false
24662   ;
24663   return 0;
24664 }
24665 _ACEOF
24666 rm -f "conftest.$ac_objext"
24667 if { (eval echo "$as_me:24667: \"$ac_compile\"") >&5
24668   (eval $ac_compile) 2>&5
24669   ac_status=$?
24670   echo "$as_me:24670: \$? = $ac_status" >&5
24671   (exit "$ac_status"); } &&
24672          { ac_try='test -s "conftest.$ac_objext"'
24673   { (eval echo "$as_me:24673: \"$ac_try\"") >&5
24674   (eval $ac_try) 2>&5
24675   ac_status=$?
24676   echo "$as_me:24676: \$? = $ac_status" >&5
24677   (exit "$ac_status"); }; }; then
24678   cf_cv_cc_bool_type=1
24679 else
24680   echo "$as_me: failed program was:" >&5
24681 cat "conftest.$ac_ext" >&5
24682 cf_cv_cc_bool_type=0
24683 fi
24684 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24685
24686 fi
24687
24688 if test "$cf_cv_cc_bool_type" = 1
24689 then    echo "$as_me:24689: result: yes" >&5
24690 echo "${ECHO_T}yes" >&6
24691 else    echo "$as_me:24691: result: no" >&5
24692 echo "${ECHO_T}no" >&6
24693 fi
24694
24695 # Check for C++ compiler characteristics (and ensure that it's there!)
24696 if test -n "$CXX" ; then
24697         ac_ext=cc
24698 ac_cpp='$CXXCPP $CPPFLAGS'
24699 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
24700 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
24701 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
24702 ac_main_return="return"
24703
24704 if test -n "$GXX" ; then
24705
24706         cf_save="$LIBS"
24707         LIBS="$LIBS $CXXLIBS"
24708         echo "$as_me:24708: checking if we already have C++ library" >&5
24709 echo $ECHO_N "checking if we already have C++ library... $ECHO_C" >&6
24710         cat >"conftest.$ac_ext" <<_ACEOF
24711 #line 24711 "configure"
24712 #include "confdefs.h"
24713
24714                         #include <iostream>
24715 int
24716 main (void)
24717 {
24718
24719                         std::cout << "Hello World!" << std::endl;
24720   ;
24721   return 0;
24722 }
24723 _ACEOF
24724 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24725 if { (eval echo "$as_me:24725: \"$ac_link\"") >&5
24726   (eval $ac_link) 2>&5
24727   ac_status=$?
24728   echo "$as_me:24728: \$? = $ac_status" >&5
24729   (exit "$ac_status"); } &&
24730          { ac_try='test -s "conftest$ac_exeext"'
24731   { (eval echo "$as_me:24731: \"$ac_try\"") >&5
24732   (eval $ac_try) 2>&5
24733   ac_status=$?
24734   echo "$as_me:24734: \$? = $ac_status" >&5
24735   (exit "$ac_status"); }; }; then
24736   cf_have_libstdcpp=yes
24737 else
24738   echo "$as_me: failed program was:" >&5
24739 cat "conftest.$ac_ext" >&5
24740 cf_have_libstdcpp=no
24741 fi
24742 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24743         echo "$as_me:24743: result: $cf_have_libstdcpp" >&5
24744 echo "${ECHO_T}$cf_have_libstdcpp" >&6
24745         LIBS="$cf_save"
24746
24747         if test "$cf_have_libstdcpp" != yes
24748         then
24749                 case "$cf_cv_system_name" in
24750                 (os2*)
24751                         if test -z "`g++ -dM -E - < /dev/null | grep __KLIBC__`"; then
24752                                 cf_stdcpp_libname=stdcpp
24753                         else
24754                                 cf_stdcpp_libname=stdc++
24755                         fi
24756                         ;;
24757                 (*)
24758                         cf_stdcpp_libname=stdc++
24759                         ;;
24760                 esac
24761
24762                 echo "$as_me:24762: checking for library $cf_stdcpp_libname" >&5
24763 echo $ECHO_N "checking for library $cf_stdcpp_libname... $ECHO_C" >&6
24764 if test "${cf_cv_libstdcpp+set}" = set; then
24765   echo $ECHO_N "(cached) $ECHO_C" >&6
24766 else
24767
24768                         cf_save="$LIBS"
24769                         LIBS="$LIBS $CXXLIBS"
24770
24771 cf_add_libs="$LIBS"
24772 # reverse order
24773 cf_add_0lib=
24774 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24775 # filter duplicates
24776 for cf_add_1lib in $cf_add_0lib; do
24777         for cf_add_2lib in $cf_add_libs; do
24778                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24779                         cf_add_1lib=
24780                         break
24781                 fi
24782         done
24783         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24784 done
24785 LIBS="$cf_add_libs"
24786
24787                 cat >"conftest.$ac_ext" <<_ACEOF
24788 #line 24788 "configure"
24789 #include "confdefs.h"
24790
24791                                 #include <iostream>
24792 int
24793 main (void)
24794 {
24795
24796                                 std::cout << "Hello World!" << std::endl;
24797   ;
24798   return 0;
24799 }
24800 _ACEOF
24801 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24802 if { (eval echo "$as_me:24802: \"$ac_link\"") >&5
24803   (eval $ac_link) 2>&5
24804   ac_status=$?
24805   echo "$as_me:24805: \$? = $ac_status" >&5
24806   (exit "$ac_status"); } &&
24807          { ac_try='test -s "conftest$ac_exeext"'
24808   { (eval echo "$as_me:24808: \"$ac_try\"") >&5
24809   (eval $ac_try) 2>&5
24810   ac_status=$?
24811   echo "$as_me:24811: \$? = $ac_status" >&5
24812   (exit "$ac_status"); }; }; then
24813   cf_cv_libstdcpp=yes
24814 else
24815   echo "$as_me: failed program was:" >&5
24816 cat "conftest.$ac_ext" >&5
24817 cf_cv_libstdcpp=no
24818 fi
24819 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24820                         LIBS="$cf_save"
24821
24822 fi
24823 echo "$as_me:24823: result: $cf_cv_libstdcpp" >&5
24824 echo "${ECHO_T}$cf_cv_libstdcpp" >&6
24825                 test "$cf_cv_libstdcpp" = yes && {
24826 cf_add_libs="$CXXLIBS"
24827 # reverse order
24828 cf_add_0lib=
24829 for cf_add_1lib in -l$cf_stdcpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24830 # filter duplicates
24831 for cf_add_1lib in $cf_add_0lib; do
24832         for cf_add_2lib in $cf_add_libs; do
24833                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24834                         cf_add_1lib=
24835                         break
24836                 fi
24837         done
24838         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24839 done
24840 CXXLIBS="$cf_add_libs"
24841  }
24842         fi
24843 fi
24844
24845         echo "$as_me:24845: checking whether $CXX understands -c and -o together" >&5
24846 echo $ECHO_N "checking whether $CXX understands -c and -o together... $ECHO_C" >&6
24847 if test "${cf_cv_prog_CXX_c_o+set}" = set; then
24848   echo $ECHO_N "(cached) $ECHO_C" >&6
24849 else
24850
24851 cat > conftest.$ac_ext <<CF_EOF
24852 int main(void)
24853 {
24854         ${cf_cv_main_return:-return}(0);
24855 }
24856 CF_EOF
24857 # We do the test twice because some compilers refuse to overwrite an
24858 # existing .o file with -o, though they will create one.
24859 ac_try='$CXX $CXXFLAGS $CPPFLAGS -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
24860 if { (eval echo "$as_me:24860: \"$ac_try\"") >&5
24861   (eval $ac_try) 2>&5
24862   ac_status=$?
24863   echo "$as_me:24863: \$? = $ac_status" >&5
24864   (exit "$ac_status"); } &&
24865   test -f conftest2.$ac_objext && { (eval echo "$as_me:24865: \"$ac_try\"") >&5
24866   (eval $ac_try) 2>&5
24867   ac_status=$?
24868   echo "$as_me:24868: \$? = $ac_status" >&5
24869   (exit "$ac_status"); };
24870 then
24871   eval cf_cv_prog_CXX_c_o=yes
24872 else
24873   eval cf_cv_prog_CXX_c_o=no
24874 fi
24875 rm -rf ./conftest*
24876
24877 fi
24878 if test "$cf_cv_prog_CXX_c_o" = yes; then
24879   echo "$as_me:24879: result: yes" >&5
24880 echo "${ECHO_T}yes" >&6
24881 else
24882   echo "$as_me:24882: result: no" >&5
24883 echo "${ECHO_T}no" >&6
24884 fi
24885
24886         case "$GXX_VERSION" in
24887         (1.*|2.[0-6]*|[1-9][0-9].*)
24888                 cf_cxx_library=yes
24889                 ;;
24890         (*-2.7*|2.7*)
24891
24892 cf_cxx_library=unknown
24893 case "$cf_cv_system_name" in
24894 (os2*)
24895         cf_gpp_libname=gpp
24896         ;;
24897 (*)
24898         cf_gpp_libname=g++
24899         ;;
24900 esac
24901 if test "$GXX" = yes; then
24902         echo "$as_me:24902: checking for lib$cf_gpp_libname" >&5
24903 echo $ECHO_N "checking for lib$cf_gpp_libname... $ECHO_C" >&6
24904         cf_save="$LIBS"
24905
24906 cf_add_libs="$LIBS"
24907 # reverse order
24908 cf_add_0lib=
24909 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24910 # filter duplicates
24911 for cf_add_1lib in $cf_add_0lib; do
24912         for cf_add_2lib in $cf_add_libs; do
24913                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24914                         cf_add_1lib=
24915                         break
24916                 fi
24917         done
24918         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24919 done
24920 LIBS="$cf_add_libs"
24921
24922         cat >"conftest.$ac_ext" <<_ACEOF
24923 #line 24923 "configure"
24924 #include "confdefs.h"
24925
24926 #include <$cf_gpp_libname/builtin.h>
24927
24928 int
24929 main (void)
24930 {
24931 two_arg_error_handler_t foo2 = lib_error_handler
24932   ;
24933   return 0;
24934 }
24935 _ACEOF
24936 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24937 if { (eval echo "$as_me:24937: \"$ac_link\"") >&5
24938   (eval $ac_link) 2>&5
24939   ac_status=$?
24940   echo "$as_me:24940: \$? = $ac_status" >&5
24941   (exit "$ac_status"); } &&
24942          { ac_try='test -s "conftest$ac_exeext"'
24943   { (eval echo "$as_me:24943: \"$ac_try\"") >&5
24944   (eval $ac_try) 2>&5
24945   ac_status=$?
24946   echo "$as_me:24946: \$? = $ac_status" >&5
24947   (exit "$ac_status"); }; }; then
24948   cf_cxx_library=yes
24949
24950 cf_add_libs="$CXXLIBS"
24951 # reverse order
24952 cf_add_0lib=
24953 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24954 # filter duplicates
24955 for cf_add_1lib in $cf_add_0lib; do
24956         for cf_add_2lib in $cf_add_libs; do
24957                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24958                         cf_add_1lib=
24959                         break
24960                 fi
24961         done
24962         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24963 done
24964 CXXLIBS="$cf_add_libs"
24965
24966          if test "$cf_gpp_libname" = cpp ; then
24967
24968 cat >>confdefs.h <<\EOF
24969 #define HAVE_GPP_BUILTIN_H 1
24970 EOF
24971
24972          else
24973
24974 cat >>confdefs.h <<\EOF
24975 #define HAVE_GXX_BUILTIN_H 1
24976 EOF
24977
24978          fi
24979 else
24980   echo "$as_me: failed program was:" >&5
24981 cat "conftest.$ac_ext" >&5
24982 cat >"conftest.$ac_ext" <<_ACEOF
24983 #line 24983 "configure"
24984 #include "confdefs.h"
24985
24986 #include <builtin.h>
24987
24988 int
24989 main (void)
24990 {
24991 two_arg_error_handler_t foo2 = lib_error_handler
24992   ;
24993   return 0;
24994 }
24995 _ACEOF
24996 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24997 if { (eval echo "$as_me:24997: \"$ac_link\"") >&5
24998   (eval $ac_link) 2>&5
24999   ac_status=$?
25000   echo "$as_me:25000: \$? = $ac_status" >&5
25001   (exit "$ac_status"); } &&
25002          { ac_try='test -s "conftest$ac_exeext"'
25003   { (eval echo "$as_me:25003: \"$ac_try\"") >&5
25004   (eval $ac_try) 2>&5
25005   ac_status=$?
25006   echo "$as_me:25006: \$? = $ac_status" >&5
25007   (exit "$ac_status"); }; }; then
25008   cf_cxx_library=yes
25009
25010 cf_add_libs="$CXXLIBS"
25011 # reverse order
25012 cf_add_0lib=
25013 for cf_add_1lib in -l$cf_gpp_libname; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25014 # filter duplicates
25015 for cf_add_1lib in $cf_add_0lib; do
25016         for cf_add_2lib in $cf_add_libs; do
25017                 if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25018                         cf_add_1lib=
25019                         break
25020                 fi
25021         done
25022         test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25023 done
25024 CXXLIBS="$cf_add_libs"
25025
25026 cat >>confdefs.h <<\EOF
25027 #define HAVE_BUILTIN_H 1
25028 EOF
25029
25030 else
25031   echo "$as_me: failed program was:" >&5
25032 cat "conftest.$ac_ext" >&5
25033 cf_cxx_library=no
25034 fi
25035 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25036 fi
25037 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25038         LIBS="$cf_save"
25039         echo "$as_me:25039: result: $cf_cxx_library" >&5
25040 echo "${ECHO_T}$cf_cxx_library" >&6
25041 fi
25042
25043                 ;;
25044         (*)
25045                 cf_cxx_library=no
25046                 ;;
25047         esac
25048
25049         ac_ext=cc
25050 ac_cpp='$CXXCPP $CPPFLAGS'
25051 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25052 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25053 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25054 ac_main_return="return"
25055 echo "$as_me:25055: checking how to run the C++ preprocessor" >&5
25056 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
25057 if test -z "$CXXCPP"; then
25058   if test "${ac_cv_prog_CXXCPP+set}" = set; then
25059   echo $ECHO_N "(cached) $ECHO_C" >&6
25060 else
25061       # Double quotes because CXXCPP needs to be expanded
25062     for CXXCPP in "$CXX -E" "/lib/cpp"
25063     do
25064       ac_preproc_ok=false
25065 for ac_cxx_preproc_warn_flag in '' yes
25066 do
25067   # Use a header file that comes with gcc, so configuring glibc
25068   # with a fresh cross-compiler works.
25069   # On the NeXT, cc -E runs the code through the compiler's parser,
25070   # not just through cpp. "Syntax error" is here to catch this case.
25071   cat >"conftest.$ac_ext" <<_ACEOF
25072 #line 25072 "configure"
25073 #include "confdefs.h"
25074 #include <assert.h>
25075                      Syntax error
25076 _ACEOF
25077 if { (eval echo "$as_me:25077: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25078   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25079   ac_status=$?
25080   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25081   rm -f conftest.er1
25082   cat conftest.err >&5
25083   echo "$as_me:25083: \$? = $ac_status" >&5
25084   (exit "$ac_status"); } >/dev/null; then
25085   if test -s conftest.err; then
25086     ac_cpp_err=$ac_cxx_preproc_warn_flag
25087   else
25088     ac_cpp_err=
25089   fi
25090 else
25091   ac_cpp_err=yes
25092 fi
25093 if test -z "$ac_cpp_err"; then
25094   :
25095 else
25096   echo "$as_me: failed program was:" >&5
25097   cat "conftest.$ac_ext" >&5
25098   # Broken: fails on valid input.
25099 continue
25100 fi
25101 rm -f conftest.err "conftest.$ac_ext"
25102
25103   # OK, works on sane cases.  Now check whether non-existent headers
25104   # can be detected and how.
25105   cat >"conftest.$ac_ext" <<_ACEOF
25106 #line 25106 "configure"
25107 #include "confdefs.h"
25108 #include <ac_nonexistent.h>
25109 _ACEOF
25110 if { (eval echo "$as_me:25110: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25111   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25112   ac_status=$?
25113   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25114   rm -f conftest.er1
25115   cat conftest.err >&5
25116   echo "$as_me:25116: \$? = $ac_status" >&5
25117   (exit "$ac_status"); } >/dev/null; then
25118   if test -s conftest.err; then
25119     ac_cpp_err=$ac_cxx_preproc_warn_flag
25120   else
25121     ac_cpp_err=
25122   fi
25123 else
25124   ac_cpp_err=yes
25125 fi
25126 if test -z "$ac_cpp_err"; then
25127   # Broken: success on invalid input.
25128 continue
25129 else
25130   echo "$as_me: failed program was:" >&5
25131   cat "conftest.$ac_ext" >&5
25132   # Passes both tests.
25133 ac_preproc_ok=:
25134 break
25135 fi
25136 rm -f conftest.err "conftest.$ac_ext"
25137
25138 done
25139 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25140 rm -f conftest.err "conftest.$ac_ext"
25141 if $ac_preproc_ok; then
25142   break
25143 fi
25144
25145     done
25146     ac_cv_prog_CXXCPP=$CXXCPP
25147
25148 fi
25149   CXXCPP=$ac_cv_prog_CXXCPP
25150 else
25151   ac_cv_prog_CXXCPP=$CXXCPP
25152 fi
25153 echo "$as_me:25153: result: $CXXCPP" >&5
25154 echo "${ECHO_T}$CXXCPP" >&6
25155 ac_preproc_ok=false
25156 for ac_cxx_preproc_warn_flag in '' yes
25157 do
25158   # Use a header file that comes with gcc, so configuring glibc
25159   # with a fresh cross-compiler works.
25160   # On the NeXT, cc -E runs the code through the compiler's parser,
25161   # not just through cpp. "Syntax error" is here to catch this case.
25162   cat >"conftest.$ac_ext" <<_ACEOF
25163 #line 25163 "configure"
25164 #include "confdefs.h"
25165 #include <assert.h>
25166                      Syntax error
25167 _ACEOF
25168 if { (eval echo "$as_me:25168: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25169   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25170   ac_status=$?
25171   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25172   rm -f conftest.er1
25173   cat conftest.err >&5
25174   echo "$as_me:25174: \$? = $ac_status" >&5
25175   (exit "$ac_status"); } >/dev/null; then
25176   if test -s conftest.err; then
25177     ac_cpp_err=$ac_cxx_preproc_warn_flag
25178   else
25179     ac_cpp_err=
25180   fi
25181 else
25182   ac_cpp_err=yes
25183 fi
25184 if test -z "$ac_cpp_err"; then
25185   :
25186 else
25187   echo "$as_me: failed program was:" >&5
25188   cat "conftest.$ac_ext" >&5
25189   # Broken: fails on valid input.
25190 continue
25191 fi
25192 rm -f conftest.err "conftest.$ac_ext"
25193
25194   # OK, works on sane cases.  Now check whether non-existent headers
25195   # can be detected and how.
25196   cat >"conftest.$ac_ext" <<_ACEOF
25197 #line 25197 "configure"
25198 #include "confdefs.h"
25199 #include <ac_nonexistent.h>
25200 _ACEOF
25201 if { (eval echo "$as_me:25201: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25202   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25203   ac_status=$?
25204   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25205   rm -f conftest.er1
25206   cat conftest.err >&5
25207   echo "$as_me:25207: \$? = $ac_status" >&5
25208   (exit "$ac_status"); } >/dev/null; then
25209   if test -s conftest.err; then
25210     ac_cpp_err=$ac_cxx_preproc_warn_flag
25211   else
25212     ac_cpp_err=
25213   fi
25214 else
25215   ac_cpp_err=yes
25216 fi
25217 if test -z "$ac_cpp_err"; then
25218   # Broken: success on invalid input.
25219 continue
25220 else
25221   echo "$as_me: failed program was:" >&5
25222   cat "conftest.$ac_ext" >&5
25223   # Passes both tests.
25224 ac_preproc_ok=:
25225 break
25226 fi
25227 rm -f conftest.err "conftest.$ac_ext"
25228
25229 done
25230 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
25231 rm -f conftest.err "conftest.$ac_ext"
25232 if $ac_preproc_ok; then
25233   :
25234 else
25235   { { echo "$as_me:25235: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&5
25236 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check" >&2;}
25237    { (exit 1); exit 1; }; }
25238 fi
25239
25240 ac_ext=cc
25241 ac_cpp='$CXXCPP $CPPFLAGS'
25242 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
25243 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
25244 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
25245 ac_main_return="return"
25246
25247 for ac_header in typeinfo
25248 do
25249 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25250 echo "$as_me:25250: checking for $ac_header" >&5
25251 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25252 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25253   echo $ECHO_N "(cached) $ECHO_C" >&6
25254 else
25255   cat >"conftest.$ac_ext" <<_ACEOF
25256 #line 25256 "configure"
25257 #include "confdefs.h"
25258 #include <$ac_header>
25259 _ACEOF
25260 if { (eval echo "$as_me:25260: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25261   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25262   ac_status=$?
25263   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25264   rm -f conftest.er1
25265   cat conftest.err >&5
25266   echo "$as_me:25266: \$? = $ac_status" >&5
25267   (exit "$ac_status"); } >/dev/null; then
25268   if test -s conftest.err; then
25269     ac_cpp_err=$ac_cxx_preproc_warn_flag
25270   else
25271     ac_cpp_err=
25272   fi
25273 else
25274   ac_cpp_err=yes
25275 fi
25276 if test -z "$ac_cpp_err"; then
25277   eval "$as_ac_Header=yes"
25278 else
25279   echo "$as_me: failed program was:" >&5
25280   cat "conftest.$ac_ext" >&5
25281   eval "$as_ac_Header=no"
25282 fi
25283 rm -f conftest.err "conftest.$ac_ext"
25284 fi
25285 echo "$as_me:25285: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25286 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25287 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25288   cat >>confdefs.h <<EOF
25289 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25290 EOF
25291
25292 fi
25293 done
25294
25295 for ac_header in iostream
25296 do
25297 as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
25298 echo "$as_me:25298: checking for $ac_header" >&5
25299 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
25300 if eval "test \"\${$as_ac_Header+set}\" = set"; then
25301   echo $ECHO_N "(cached) $ECHO_C" >&6
25302 else
25303   cat >"conftest.$ac_ext" <<_ACEOF
25304 #line 25304 "configure"
25305 #include "confdefs.h"
25306 #include <$ac_header>
25307 _ACEOF
25308 if { (eval echo "$as_me:25308: \"$ac_cpp "conftest.$ac_ext"\"") >&5
25309   (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
25310   ac_status=$?
25311   $EGREP -v '^ *\+' conftest.er1 >conftest.err
25312   rm -f conftest.er1
25313   cat conftest.err >&5
25314   echo "$as_me:25314: \$? = $ac_status" >&5
25315   (exit "$ac_status"); } >/dev/null; then
25316   if test -s conftest.err; then
25317     ac_cpp_err=$ac_cxx_preproc_warn_flag
25318   else
25319     ac_cpp_err=
25320   fi
25321 else
25322   ac_cpp_err=yes
25323 fi
25324 if test -z "$ac_cpp_err"; then
25325   eval "$as_ac_Header=yes"
25326 else
25327   echo "$as_me: failed program was:" >&5
25328   cat "conftest.$ac_ext" >&5
25329   eval "$as_ac_Header=no"
25330 fi
25331 rm -f conftest.err "conftest.$ac_ext"
25332 fi
25333 echo "$as_me:25333: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
25334 echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
25335 if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
25336   cat >>confdefs.h <<EOF
25337 #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
25338 EOF
25339
25340 fi
25341 done
25342
25343 if test x"$ac_cv_header_iostream" = xyes ; then
25344         echo "$as_me:25344: checking if iostream uses std-namespace" >&5
25345 echo $ECHO_N "checking if iostream uses std-namespace... $ECHO_C" >&6
25346         cat >"conftest.$ac_ext" <<_ACEOF
25347 #line 25347 "configure"
25348 #include "confdefs.h"
25349
25350 #include <iostream>
25351 using std::endl;
25352 using std::cerr;
25353 int
25354 main (void)
25355 {
25356
25357 cerr << "testing" << endl;
25358
25359   ;
25360   return 0;
25361 }
25362 _ACEOF
25363 rm -f "conftest.$ac_objext"
25364 if { (eval echo "$as_me:25364: \"$ac_compile\"") >&5
25365   (eval $ac_compile) 2>&5
25366   ac_status=$?
25367   echo "$as_me:25367: \$? = $ac_status" >&5
25368   (exit "$ac_status"); } &&
25369          { ac_try='test -s "conftest.$ac_objext"'
25370   { (eval echo "$as_me:25370: \"$ac_try\"") >&5
25371   (eval $ac_try) 2>&5
25372   ac_status=$?
25373   echo "$as_me:25373: \$? = $ac_status" >&5
25374   (exit "$ac_status"); }; }; then
25375   cf_iostream_namespace=yes
25376 else
25377   echo "$as_me: failed program was:" >&5
25378 cat "conftest.$ac_ext" >&5
25379 cf_iostream_namespace=no
25380 fi
25381 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25382         echo "$as_me:25382: result: $cf_iostream_namespace" >&5
25383 echo "${ECHO_T}$cf_iostream_namespace" >&6
25384         if test "$cf_iostream_namespace" = yes ; then
25385
25386 cat >>confdefs.h <<\EOF
25387 #define IOSTREAM_NAMESPACE 1
25388 EOF
25389
25390         fi
25391 fi
25392
25393 echo "$as_me:25393: checking if we should include stdbool.h" >&5
25394 echo $ECHO_N "checking if we should include stdbool.h... $ECHO_C" >&6
25395
25396 if test "${cf_cv_header_stdbool_h+set}" = set; then
25397   echo $ECHO_N "(cached) $ECHO_C" >&6
25398 else
25399
25400         cat >"conftest.$ac_ext" <<_ACEOF
25401 #line 25401 "configure"
25402 #include "confdefs.h"
25403
25404 int
25405 main (void)
25406 {
25407 bool foo = false
25408   ;
25409   return 0;
25410 }
25411 _ACEOF
25412 rm -f "conftest.$ac_objext"
25413 if { (eval echo "$as_me:25413: \"$ac_compile\"") >&5
25414   (eval $ac_compile) 2>&5
25415   ac_status=$?
25416   echo "$as_me:25416: \$? = $ac_status" >&5
25417   (exit "$ac_status"); } &&
25418          { ac_try='test -s "conftest.$ac_objext"'
25419   { (eval echo "$as_me:25419: \"$ac_try\"") >&5
25420   (eval $ac_try) 2>&5
25421   ac_status=$?
25422   echo "$as_me:25422: \$? = $ac_status" >&5
25423   (exit "$ac_status"); }; }; then
25424   cf_cv_header_stdbool_h=0
25425 else
25426   echo "$as_me: failed program was:" >&5
25427 cat "conftest.$ac_ext" >&5
25428 cat >"conftest.$ac_ext" <<_ACEOF
25429 #line 25429 "configure"
25430 #include "confdefs.h"
25431
25432 #ifndef __BEOS__
25433 #include <stdbool.h>
25434 #endif
25435
25436 int
25437 main (void)
25438 {
25439 bool foo = false
25440   ;
25441   return 0;
25442 }
25443 _ACEOF
25444 rm -f "conftest.$ac_objext"
25445 if { (eval echo "$as_me:25445: \"$ac_compile\"") >&5
25446   (eval $ac_compile) 2>&5
25447   ac_status=$?
25448   echo "$as_me:25448: \$? = $ac_status" >&5
25449   (exit "$ac_status"); } &&
25450          { ac_try='test -s "conftest.$ac_objext"'
25451   { (eval echo "$as_me:25451: \"$ac_try\"") >&5
25452   (eval $ac_try) 2>&5
25453   ac_status=$?
25454   echo "$as_me:25454: \$? = $ac_status" >&5
25455   (exit "$ac_status"); }; }; then
25456   cf_cv_header_stdbool_h=1
25457 else
25458   echo "$as_me: failed program was:" >&5
25459 cat "conftest.$ac_ext" >&5
25460 cf_cv_header_stdbool_h=0
25461 fi
25462 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25463 fi
25464 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25465 fi
25466
25467 if test "$cf_cv_header_stdbool_h" = 1
25468 then    echo "$as_me:25468: result: yes" >&5
25469 echo "${ECHO_T}yes" >&6
25470 else    echo "$as_me:25470: result: no" >&5
25471 echo "${ECHO_T}no" >&6
25472 fi
25473
25474 echo "$as_me:25474: checking for builtin bool type" >&5
25475 echo $ECHO_N "checking for builtin bool type... $ECHO_C" >&6
25476
25477 if test "${cf_cv_builtin_bool+set}" = set; then
25478   echo $ECHO_N "(cached) $ECHO_C" >&6
25479 else
25480
25481         cat >"conftest.$ac_ext" <<_ACEOF
25482 #line 25482 "configure"
25483 #include "confdefs.h"
25484
25485 #include <stdio.h>
25486 #include <sys/types.h>
25487
25488 int
25489 main (void)
25490 {
25491 bool x = false
25492   ;
25493   return 0;
25494 }
25495 _ACEOF
25496 rm -f "conftest.$ac_objext"
25497 if { (eval echo "$as_me:25497: \"$ac_compile\"") >&5
25498   (eval $ac_compile) 2>&5
25499   ac_status=$?
25500   echo "$as_me:25500: \$? = $ac_status" >&5
25501   (exit "$ac_status"); } &&
25502          { ac_try='test -s "conftest.$ac_objext"'
25503   { (eval echo "$as_me:25503: \"$ac_try\"") >&5
25504   (eval $ac_try) 2>&5
25505   ac_status=$?
25506   echo "$as_me:25506: \$? = $ac_status" >&5
25507   (exit "$ac_status"); }; }; then
25508   cf_cv_builtin_bool=1
25509 else
25510   echo "$as_me: failed program was:" >&5
25511 cat "conftest.$ac_ext" >&5
25512 cf_cv_builtin_bool=0
25513 fi
25514 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25515
25516 fi
25517
25518 if test "$cf_cv_builtin_bool" = 1
25519 then    echo "$as_me:25519: result: yes" >&5
25520 echo "${ECHO_T}yes" >&6
25521 else    echo "$as_me:25521: result: no" >&5
25522 echo "${ECHO_T}no" >&6
25523 fi
25524
25525 echo "$as_me:25525: checking for bool" >&5
25526 echo $ECHO_N "checking for bool... $ECHO_C" >&6
25527 if test "${ac_cv_type_bool+set}" = set; then
25528   echo $ECHO_N "(cached) $ECHO_C" >&6
25529 else
25530   cat >"conftest.$ac_ext" <<_ACEOF
25531 #line 25531 "configure"
25532 #include "confdefs.h"
25533
25534 #include <stdlib.h>
25535 #include <stdio.h>
25536
25537 #if defined(__cplusplus)
25538
25539 #ifdef HAVE_GXX_BUILTIN_H
25540 #include <g++/builtin.h>
25541 #elif HAVE_GPP_BUILTIN_H
25542 #include <gpp/builtin.h>
25543 #elif HAVE_BUILTIN_H
25544 #include <builtin.h>
25545 #endif
25546
25547 #else
25548
25549 #if $cf_cv_header_stdbool_h
25550 #include <stdbool.h>
25551 #endif
25552
25553 #endif
25554
25555 int
25556 main (void)
25557 {
25558 if ((bool *) 0)
25559   return 0;
25560 if (sizeof (bool))
25561   return 0;
25562   ;
25563   return 0;
25564 }
25565 _ACEOF
25566 rm -f "conftest.$ac_objext"
25567 if { (eval echo "$as_me:25567: \"$ac_compile\"") >&5
25568   (eval $ac_compile) 2>&5
25569   ac_status=$?
25570   echo "$as_me:25570: \$? = $ac_status" >&5
25571   (exit "$ac_status"); } &&
25572          { ac_try='test -s "conftest.$ac_objext"'
25573   { (eval echo "$as_me:25573: \"$ac_try\"") >&5
25574   (eval $ac_try) 2>&5
25575   ac_status=$?
25576   echo "$as_me:25576: \$? = $ac_status" >&5
25577   (exit "$ac_status"); }; }; then
25578   ac_cv_type_bool=yes
25579 else
25580   echo "$as_me: failed program was:" >&5
25581 cat "conftest.$ac_ext" >&5
25582 ac_cv_type_bool=no
25583 fi
25584 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25585 fi
25586 echo "$as_me:25586: result: $ac_cv_type_bool" >&5
25587 echo "${ECHO_T}$ac_cv_type_bool" >&6
25588
25589 echo "$as_me:25589: checking size of bool" >&5
25590 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
25591 if test "${ac_cv_sizeof_bool+set}" = set; then
25592   echo $ECHO_N "(cached) $ECHO_C" >&6
25593 else
25594   if test "$ac_cv_type_bool" = yes; then
25595   if test "$cross_compiling" = yes; then
25596   # Depending upon the size, compute the lo and hi bounds.
25597 cat >"conftest.$ac_ext" <<_ACEOF
25598 #line 25598 "configure"
25599 #include "confdefs.h"
25600
25601 #include <stdlib.h>
25602 #include <stdio.h>
25603
25604 #if defined(__cplusplus)
25605
25606 #ifdef HAVE_GXX_BUILTIN_H
25607 #include <g++/builtin.h>
25608 #elif HAVE_GPP_BUILTIN_H
25609 #include <gpp/builtin.h>
25610 #elif HAVE_BUILTIN_H
25611 #include <builtin.h>
25612 #endif
25613
25614 #else
25615
25616 #if $cf_cv_header_stdbool_h
25617 #include <stdbool.h>
25618 #endif
25619
25620 #endif
25621
25622 int
25623 main (void)
25624 {
25625 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
25626   ;
25627   return 0;
25628 }
25629 _ACEOF
25630 rm -f "conftest.$ac_objext"
25631 if { (eval echo "$as_me:25631: \"$ac_compile\"") >&5
25632   (eval $ac_compile) 2>&5
25633   ac_status=$?
25634   echo "$as_me:25634: \$? = $ac_status" >&5
25635   (exit "$ac_status"); } &&
25636          { ac_try='test -s "conftest.$ac_objext"'
25637   { (eval echo "$as_me:25637: \"$ac_try\"") >&5
25638   (eval $ac_try) 2>&5
25639   ac_status=$?
25640   echo "$as_me:25640: \$? = $ac_status" >&5
25641   (exit "$ac_status"); }; }; then
25642   ac_lo=0 ac_mid=0
25643   while :; do
25644     cat >"conftest.$ac_ext" <<_ACEOF
25645 #line 25645 "configure"
25646 #include "confdefs.h"
25647
25648 #include <stdlib.h>
25649 #include <stdio.h>
25650
25651 #if defined(__cplusplus)
25652
25653 #ifdef HAVE_GXX_BUILTIN_H
25654 #include <g++/builtin.h>
25655 #elif HAVE_GPP_BUILTIN_H
25656 #include <gpp/builtin.h>
25657 #elif HAVE_BUILTIN_H
25658 #include <builtin.h>
25659 #endif
25660
25661 #else
25662
25663 #if $cf_cv_header_stdbool_h
25664 #include <stdbool.h>
25665 #endif
25666
25667 #endif
25668
25669 int
25670 main (void)
25671 {
25672 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25673   ;
25674   return 0;
25675 }
25676 _ACEOF
25677 rm -f "conftest.$ac_objext"
25678 if { (eval echo "$as_me:25678: \"$ac_compile\"") >&5
25679   (eval $ac_compile) 2>&5
25680   ac_status=$?
25681   echo "$as_me:25681: \$? = $ac_status" >&5
25682   (exit "$ac_status"); } &&
25683          { ac_try='test -s "conftest.$ac_objext"'
25684   { (eval echo "$as_me:25684: \"$ac_try\"") >&5
25685   (eval $ac_try) 2>&5
25686   ac_status=$?
25687   echo "$as_me:25687: \$? = $ac_status" >&5
25688   (exit "$ac_status"); }; }; then
25689   ac_hi=$ac_mid; break
25690 else
25691   echo "$as_me: failed program was:" >&5
25692 cat "conftest.$ac_ext" >&5
25693 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
25694 fi
25695 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25696   done
25697 else
25698   echo "$as_me: failed program was:" >&5
25699 cat "conftest.$ac_ext" >&5
25700 ac_hi=-1 ac_mid=-1
25701   while :; do
25702     cat >"conftest.$ac_ext" <<_ACEOF
25703 #line 25703 "configure"
25704 #include "confdefs.h"
25705
25706 #include <stdlib.h>
25707 #include <stdio.h>
25708
25709 #if defined(__cplusplus)
25710
25711 #ifdef HAVE_GXX_BUILTIN_H
25712 #include <g++/builtin.h>
25713 #elif HAVE_GPP_BUILTIN_H
25714 #include <gpp/builtin.h>
25715 #elif HAVE_BUILTIN_H
25716 #include <builtin.h>
25717 #endif
25718
25719 #else
25720
25721 #if $cf_cv_header_stdbool_h
25722 #include <stdbool.h>
25723 #endif
25724
25725 #endif
25726
25727 int
25728 main (void)
25729 {
25730 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
25731   ;
25732   return 0;
25733 }
25734 _ACEOF
25735 rm -f "conftest.$ac_objext"
25736 if { (eval echo "$as_me:25736: \"$ac_compile\"") >&5
25737   (eval $ac_compile) 2>&5
25738   ac_status=$?
25739   echo "$as_me:25739: \$? = $ac_status" >&5
25740   (exit "$ac_status"); } &&
25741          { ac_try='test -s "conftest.$ac_objext"'
25742   { (eval echo "$as_me:25742: \"$ac_try\"") >&5
25743   (eval $ac_try) 2>&5
25744   ac_status=$?
25745   echo "$as_me:25745: \$? = $ac_status" >&5
25746   (exit "$ac_status"); }; }; then
25747   ac_lo=$ac_mid; break
25748 else
25749   echo "$as_me: failed program was:" >&5
25750 cat "conftest.$ac_ext" >&5
25751 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
25752 fi
25753 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25754   done
25755 fi
25756 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25757 # Binary search between lo and hi bounds.
25758 while test "x$ac_lo" != "x$ac_hi"; do
25759   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
25760   cat >"conftest.$ac_ext" <<_ACEOF
25761 #line 25761 "configure"
25762 #include "confdefs.h"
25763
25764 #include <stdlib.h>
25765 #include <stdio.h>
25766
25767 #if defined(__cplusplus)
25768
25769 #ifdef HAVE_GXX_BUILTIN_H
25770 #include <g++/builtin.h>
25771 #elif HAVE_GPP_BUILTIN_H
25772 #include <gpp/builtin.h>
25773 #elif HAVE_BUILTIN_H
25774 #include <builtin.h>
25775 #endif
25776
25777 #else
25778
25779 #if $cf_cv_header_stdbool_h
25780 #include <stdbool.h>
25781 #endif
25782
25783 #endif
25784
25785 int
25786 main (void)
25787 {
25788 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
25789   ;
25790   return 0;
25791 }
25792 _ACEOF
25793 rm -f "conftest.$ac_objext"
25794 if { (eval echo "$as_me:25794: \"$ac_compile\"") >&5
25795   (eval $ac_compile) 2>&5
25796   ac_status=$?
25797   echo "$as_me:25797: \$? = $ac_status" >&5
25798   (exit "$ac_status"); } &&
25799          { ac_try='test -s "conftest.$ac_objext"'
25800   { (eval echo "$as_me:25800: \"$ac_try\"") >&5
25801   (eval $ac_try) 2>&5
25802   ac_status=$?
25803   echo "$as_me:25803: \$? = $ac_status" >&5
25804   (exit "$ac_status"); }; }; then
25805   ac_hi=$ac_mid
25806 else
25807   echo "$as_me: failed program was:" >&5
25808 cat "conftest.$ac_ext" >&5
25809 ac_lo=`expr "$ac_mid" + 1`
25810 fi
25811 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25812 done
25813 ac_cv_sizeof_bool=$ac_lo
25814 else
25815   if test "$cross_compiling" = yes; then
25816   { { echo "$as_me:25816: error: cannot run test program while cross compiling" >&5
25817 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
25818    { (exit 1); exit 1; }; }
25819 else
25820   cat >"conftest.$ac_ext" <<_ACEOF
25821 #line 25821 "configure"
25822 #include "confdefs.h"
25823
25824 #include <stdlib.h>
25825 #include <stdio.h>
25826
25827 #if defined(__cplusplus)
25828
25829 #ifdef HAVE_GXX_BUILTIN_H
25830 #include <g++/builtin.h>
25831 #elif HAVE_GPP_BUILTIN_H
25832 #include <gpp/builtin.h>
25833 #elif HAVE_BUILTIN_H
25834 #include <builtin.h>
25835 #endif
25836
25837 #else
25838
25839 #if $cf_cv_header_stdbool_h
25840 #include <stdbool.h>
25841 #endif
25842
25843 #endif
25844
25845 int
25846 main (void)
25847 {
25848 FILE *f = fopen ("conftest.val", "w");
25849 if (!f)
25850   $ac_main_return (1);
25851 fprintf (f, "%ld", (long)(sizeof (bool)));
25852 fclose (f);
25853   ;
25854   return 0;
25855 }
25856 _ACEOF
25857 rm -f "conftest$ac_exeext"
25858 if { (eval echo "$as_me:25858: \"$ac_link\"") >&5
25859   (eval $ac_link) 2>&5
25860   ac_status=$?
25861   echo "$as_me:25861: \$? = $ac_status" >&5
25862   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25863   { (eval echo "$as_me:25863: \"$ac_try\"") >&5
25864   (eval $ac_try) 2>&5
25865   ac_status=$?
25866   echo "$as_me:25866: \$? = $ac_status" >&5
25867   (exit "$ac_status"); }; }; then
25868   ac_cv_sizeof_bool=`cat conftest.val`
25869 else
25870   echo "$as_me: program exited with status $ac_status" >&5
25871 echo "$as_me: failed program was:" >&5
25872 cat "conftest.$ac_ext" >&5
25873 fi
25874 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25875 fi
25876 fi
25877 rm -f conftest.val
25878 else
25879   ac_cv_sizeof_bool=0
25880 fi
25881 fi
25882 echo "$as_me:25882: result: $ac_cv_sizeof_bool" >&5
25883 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
25884 cat >>confdefs.h <<EOF
25885 #define SIZEOF_BOOL $ac_cv_sizeof_bool
25886 EOF
25887
25888 echo "$as_me:25888: checking for type of bool" >&5
25889 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
25890 if test "${cf_cv_type_of_bool+set}" = set; then
25891   echo $ECHO_N "(cached) $ECHO_C" >&6
25892 else
25893
25894         rm -f cf_test.out
25895         if test "$cross_compiling" = yes; then
25896
25897                 case x$ac_cv_sizeof_bool in
25898                 (x1) cf_cv_type_of_bool="unsigned char";;
25899                 (x2) cf_cv_type_of_bool="unsigned short";;
25900                 (x4) cf_cv_type_of_bool="unsigned int";;
25901                 (x8) cf_cv_type_of_bool="unsigned long";;
25902                 (*)  cf_cv_type_of_bool=unknown;;
25903                 esac
25904
25905 else
25906   cat >"conftest.$ac_ext" <<_ACEOF
25907 #line 25907 "configure"
25908 #include "confdefs.h"
25909
25910 #include <stdlib.h>
25911 #include <stdio.h>
25912
25913 #if defined(__cplusplus)
25914
25915 #ifdef HAVE_GXX_BUILTIN_H
25916 #include <g++/builtin.h>
25917 #elif HAVE_GPP_BUILTIN_H
25918 #include <gpp/builtin.h>
25919 #elif HAVE_BUILTIN_H
25920 #include <builtin.h>
25921 #endif
25922
25923 #else
25924
25925 #if $cf_cv_header_stdbool_h
25926 #include <stdbool.h>
25927 #endif
25928
25929 #endif
25930
25931 int main(void)
25932 {
25933         FILE *fp = fopen("cf_test.out", "w");
25934         if (fp != 0) {
25935                 bool x = true;
25936                 if ((bool)(-x) >= 0)
25937                         fputs("unsigned ", fp);
25938                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
25939                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
25940                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
25941                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
25942                 fclose(fp);
25943         }
25944         ${cf_cv_main_return:-return}(0);
25945 }
25946
25947 _ACEOF
25948 rm -f "conftest$ac_exeext"
25949 if { (eval echo "$as_me:25949: \"$ac_link\"") >&5
25950   (eval $ac_link) 2>&5
25951   ac_status=$?
25952   echo "$as_me:25952: \$? = $ac_status" >&5
25953   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25954   { (eval echo "$as_me:25954: \"$ac_try\"") >&5
25955   (eval $ac_try) 2>&5
25956   ac_status=$?
25957   echo "$as_me:25957: \$? = $ac_status" >&5
25958   (exit "$ac_status"); }; }; then
25959   cf_cv_type_of_bool=`cat cf_test.out`
25960                  if test -z "$cf_cv_type_of_bool"; then
25961                    cf_cv_type_of_bool=unknown
25962                  fi
25963 else
25964   echo "$as_me: program exited with status $ac_status" >&5
25965 echo "$as_me: failed program was:" >&5
25966 cat "conftest.$ac_ext" >&5
25967 cf_cv_type_of_bool=unknown
25968 fi
25969 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25970 fi
25971         rm -f cf_test.out
25972
25973 fi
25974 echo "$as_me:25974: result: $cf_cv_type_of_bool" >&5
25975 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
25976
25977 if test "$cf_cv_type_of_bool" = unknown ; then
25978         case .$NCURSES_BOOL in
25979         (.auto|.) NCURSES_BOOL=unsigned;;
25980         esac
25981         { echo "$as_me:25981: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
25982 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
25983         cf_cv_type_of_bool=$NCURSES_BOOL
25984 fi
25985
25986 echo "$as_me:25986: checking for special defines needed for etip.h" >&5
25987 echo $ECHO_N "checking for special defines needed for etip.h... $ECHO_C" >&6
25988 cf_save_CXXFLAGS="$CXXFLAGS"
25989 cf_result="none"
25990
25991 # etip.h includes ncurses.h which includes ncurses_dll.h
25992 # But ncurses_dll.h is generated - fix here.
25993 test -d include || mkdir include
25994 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
25995
25996 for cf_math in "" MATH_H
25997 do
25998 for cf_excp in "" MATH_EXCEPTION
25999 do
26000         CXXFLAGS="$cf_save_CXXFLAGS -I${srcdir}/c++ -I${srcdir}/menu -Iinclude -I${srcdir}/include"
26001         test -n "$cf_math" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_math}"
26002         test -n "$cf_excp" && CXXFLAGS="$CXXFLAGS -DETIP_NEEDS_${cf_excp}"
26003 cat >"conftest.$ac_ext" <<_ACEOF
26004 #line 26004 "configure"
26005 #include "confdefs.h"
26006
26007 #include <etip.h.in>
26008
26009 int
26010 main (void)
26011 {
26012
26013   ;
26014   return 0;
26015 }
26016 _ACEOF
26017 rm -f "conftest.$ac_objext"
26018 if { (eval echo "$as_me:26018: \"$ac_compile\"") >&5
26019   (eval $ac_compile) 2>&5
26020   ac_status=$?
26021   echo "$as_me:26021: \$? = $ac_status" >&5
26022   (exit "$ac_status"); } &&
26023          { ac_try='test -s "conftest.$ac_objext"'
26024   { (eval echo "$as_me:26024: \"$ac_try\"") >&5
26025   (eval $ac_try) 2>&5
26026   ac_status=$?
26027   echo "$as_me:26027: \$? = $ac_status" >&5
26028   (exit "$ac_status"); }; }; then
26029
26030         test -n "$cf_math" && cat >>confdefs.h <<EOF
26031 #define ETIP_NEEDS_${cf_math} 1
26032 EOF
26033
26034         test -n "$cf_excp" && cat >>confdefs.h <<EOF
26035 #define ETIP_NEEDS_${cf_excp} 1
26036 EOF
26037
26038         cf_result="$cf_math $cf_excp"
26039         break 2
26040
26041 else
26042   echo "$as_me: failed program was:" >&5
26043 cat "conftest.$ac_ext" >&5
26044 fi
26045 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26046 done
26047 done
26048 echo "$as_me:26048: result: $cf_result" >&5
26049 echo "${ECHO_T}$cf_result" >&6
26050 CXXFLAGS="$cf_save_CXXFLAGS"
26051
26052 if test -n "$CXX"; then
26053 echo "$as_me:26053: checking if $CXX accepts parameter initialization" >&5
26054 echo $ECHO_N "checking if $CXX accepts parameter initialization... $ECHO_C" >&6
26055 if test "${cf_cv_cpp_param_init+set}" = set; then
26056   echo $ECHO_N "(cached) $ECHO_C" >&6
26057 else
26058
26059         ac_ext=cc
26060 ac_cpp='$CXXCPP $CPPFLAGS'
26061 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26062 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26063 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26064 ac_main_return="return"
26065
26066         if test "$cross_compiling" = yes; then
26067   cf_cv_cpp_param_init=unknown
26068 else
26069   cat >"conftest.$ac_ext" <<_ACEOF
26070 #line 26070 "configure"
26071 #include "confdefs.h"
26072
26073 class TEST {
26074 private:
26075         int value;
26076 public:
26077         TEST(int x = 1);
26078         ~TEST();
26079 };
26080
26081 TEST::TEST(int x = 1)   // some compilers do not like second initializer
26082 {
26083         value = x;
26084 }
26085 int main(void) { }
26086
26087 _ACEOF
26088 rm -f "conftest$ac_exeext"
26089 if { (eval echo "$as_me:26089: \"$ac_link\"") >&5
26090   (eval $ac_link) 2>&5
26091   ac_status=$?
26092   echo "$as_me:26092: \$? = $ac_status" >&5
26093   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26094   { (eval echo "$as_me:26094: \"$ac_try\"") >&5
26095   (eval $ac_try) 2>&5
26096   ac_status=$?
26097   echo "$as_me:26097: \$? = $ac_status" >&5
26098   (exit "$ac_status"); }; }; then
26099   cf_cv_cpp_param_init=yes
26100 else
26101   echo "$as_me: program exited with status $ac_status" >&5
26102 echo "$as_me: failed program was:" >&5
26103 cat "conftest.$ac_ext" >&5
26104 cf_cv_cpp_param_init=no
26105 fi
26106 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26107 fi
26108         ac_ext=cc
26109 ac_cpp='$CXXCPP $CPPFLAGS'
26110 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26111 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26112 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26113 ac_main_return="return"
26114
26115 fi
26116 echo "$as_me:26116: result: $cf_cv_cpp_param_init" >&5
26117 echo "${ECHO_T}$cf_cv_cpp_param_init" >&6
26118 fi
26119 test "$cf_cv_cpp_param_init" = yes &&
26120 cat >>confdefs.h <<\EOF
26121 #define CPP_HAS_PARAM_INIT 1
26122 EOF
26123
26124 if test -n "$CXX"; then
26125
26126 echo "$as_me:26126: checking if $CXX accepts static_cast" >&5
26127 echo $ECHO_N "checking if $CXX accepts static_cast... $ECHO_C" >&6
26128 if test "${cf_cv_cpp_static_cast+set}" = set; then
26129   echo $ECHO_N "(cached) $ECHO_C" >&6
26130 else
26131
26132         ac_ext=cc
26133 ac_cpp='$CXXCPP $CPPFLAGS'
26134 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26135 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26136 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26137 ac_main_return="return"
26138
26139         cat >"conftest.$ac_ext" <<_ACEOF
26140 #line 26140 "configure"
26141 #include "confdefs.h"
26142
26143 class NCursesPanel
26144 {
26145 public:
26146   NCursesPanel(int nlines,
26147                int ncols,
26148                int begin_y = 0,
26149                int begin_x = 0)
26150   {
26151   }
26152   NCursesPanel();
26153   ~NCursesPanel();
26154 };
26155
26156 template<class T> class NCursesUserPanel : public NCursesPanel
26157 {
26158 public:
26159   NCursesUserPanel (int nlines,
26160                     int ncols,
26161                     int begin_y = 0,
26162                     int begin_x = 0,
26163                     const T* p_UserData = static_cast<T*>(0))
26164     : NCursesPanel (nlines, ncols, begin_y, begin_x)
26165   {
26166   };
26167   NCursesUserPanel(const T* p_UserData = static_cast<T*>(0)) : NCursesPanel()
26168   {
26169   };
26170
26171   virtual ~NCursesUserPanel() {};
26172 };
26173
26174 int
26175 main (void)
26176 {
26177
26178         const char* p_UserData = static_cast<char*>(0)
26179   ;
26180   return 0;
26181 }
26182 _ACEOF
26183 rm -f "conftest.$ac_objext"
26184 if { (eval echo "$as_me:26184: \"$ac_compile\"") >&5
26185   (eval $ac_compile) 2>&5
26186   ac_status=$?
26187   echo "$as_me:26187: \$? = $ac_status" >&5
26188   (exit "$ac_status"); } &&
26189          { ac_try='test -s "conftest.$ac_objext"'
26190   { (eval echo "$as_me:26190: \"$ac_try\"") >&5
26191   (eval $ac_try) 2>&5
26192   ac_status=$?
26193   echo "$as_me:26193: \$? = $ac_status" >&5
26194   (exit "$ac_status"); }; }; then
26195   cf_cv_cpp_static_cast=yes
26196 else
26197   echo "$as_me: failed program was:" >&5
26198 cat "conftest.$ac_ext" >&5
26199 cf_cv_cpp_static_cast=no
26200 fi
26201 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26202
26203         ac_ext=cc
26204 ac_cpp='$CXXCPP $CPPFLAGS'
26205 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
26206 ac_link='$CXX -o "conftest$ac_exeext" $CXXFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
26207 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26208 ac_main_return="return"
26209
26210 fi
26211 echo "$as_me:26211: result: $cf_cv_cpp_static_cast" >&5
26212 echo "${ECHO_T}$cf_cv_cpp_static_cast" >&6
26213
26214 fi
26215
26216 test "$cf_cv_cpp_static_cast" = yes &&
26217 cat >>confdefs.h <<\EOF
26218 #define CPP_HAS_STATIC_CAST 1
26219 EOF
26220
26221         CXX_AR='$(AR)'
26222         CXX_ARFLAGS='$(ARFLAGS)'
26223         case "$cf_cv_system_name" in
26224         (irix*)
26225             if test "$GXX" != yes ; then
26226                 CXX_AR='$(CXX)'
26227                 CXX_ARFLAGS='-ar -o'
26228             fi
26229             ;;
26230         (sco3.2v5*)
26231             CXXLDFLAGS="-u main"
26232             ;;
26233         (solaris2*)
26234             if test "$GXX" != yes ; then
26235                 CXX_AR='$(CXX)'
26236                 CXX_ARFLAGS='-xar -o'
26237             fi
26238             ;;
26239         esac
26240
26241 else
26242         cf_cxx_library=no
26243         cf_cv_builtin_bool=1
26244
26245         # Just because we are not configuring against C++ right now does not
26246         # mean that a user will not want to use C++.  Some distributors disable
26247         # the C++ portion of this configuration as a shortcut (or just to avoid
26248         # compiling the demo in the c++ directory).  So we need a reasonable
26249         # default for the 'bool' type.
26250         #
26251         # Caveat: since the storage of the bool type is not standardized, it
26252         # may change.
26253
26254         if test "$NCURSES_BOOL" != auto ; then
26255                 cf_cv_type_of_bool=$NCURSES_BOOL
26256                 cf_cv_header_stdbool_h=0
26257         else
26258                 if test "$cf_cv_header_stdbool_h" = 1 ; then
26259
26260 echo "$as_me:26260: checking for bool" >&5
26261 echo $ECHO_N "checking for bool... $ECHO_C" >&6
26262 if test "${ac_cv_type_bool+set}" = set; then
26263   echo $ECHO_N "(cached) $ECHO_C" >&6
26264 else
26265   cat >"conftest.$ac_ext" <<_ACEOF
26266 #line 26266 "configure"
26267 #include "confdefs.h"
26268
26269 #include <stdlib.h>
26270 #include <stdio.h>
26271
26272 #if defined(__cplusplus)
26273
26274 #ifdef HAVE_GXX_BUILTIN_H
26275 #include <g++/builtin.h>
26276 #elif HAVE_GPP_BUILTIN_H
26277 #include <gpp/builtin.h>
26278 #elif HAVE_BUILTIN_H
26279 #include <builtin.h>
26280 #endif
26281
26282 #else
26283
26284 #if $cf_cv_header_stdbool_h
26285 #include <stdbool.h>
26286 #endif
26287
26288 #endif
26289
26290 int
26291 main (void)
26292 {
26293 if ((bool *) 0)
26294   return 0;
26295 if (sizeof (bool))
26296   return 0;
26297   ;
26298   return 0;
26299 }
26300 _ACEOF
26301 rm -f "conftest.$ac_objext"
26302 if { (eval echo "$as_me:26302: \"$ac_compile\"") >&5
26303   (eval $ac_compile) 2>&5
26304   ac_status=$?
26305   echo "$as_me:26305: \$? = $ac_status" >&5
26306   (exit "$ac_status"); } &&
26307          { ac_try='test -s "conftest.$ac_objext"'
26308   { (eval echo "$as_me:26308: \"$ac_try\"") >&5
26309   (eval $ac_try) 2>&5
26310   ac_status=$?
26311   echo "$as_me:26311: \$? = $ac_status" >&5
26312   (exit "$ac_status"); }; }; then
26313   ac_cv_type_bool=yes
26314 else
26315   echo "$as_me: failed program was:" >&5
26316 cat "conftest.$ac_ext" >&5
26317 ac_cv_type_bool=no
26318 fi
26319 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26320 fi
26321 echo "$as_me:26321: result: $ac_cv_type_bool" >&5
26322 echo "${ECHO_T}$ac_cv_type_bool" >&6
26323
26324 echo "$as_me:26324: checking size of bool" >&5
26325 echo $ECHO_N "checking size of bool... $ECHO_C" >&6
26326 if test "${ac_cv_sizeof_bool+set}" = set; then
26327   echo $ECHO_N "(cached) $ECHO_C" >&6
26328 else
26329   if test "$ac_cv_type_bool" = yes; then
26330   if test "$cross_compiling" = yes; then
26331   # Depending upon the size, compute the lo and hi bounds.
26332 cat >"conftest.$ac_ext" <<_ACEOF
26333 #line 26333 "configure"
26334 #include "confdefs.h"
26335
26336 #include <stdlib.h>
26337 #include <stdio.h>
26338
26339 #if defined(__cplusplus)
26340
26341 #ifdef HAVE_GXX_BUILTIN_H
26342 #include <g++/builtin.h>
26343 #elif HAVE_GPP_BUILTIN_H
26344 #include <gpp/builtin.h>
26345 #elif HAVE_BUILTIN_H
26346 #include <builtin.h>
26347 #endif
26348
26349 #else
26350
26351 #if $cf_cv_header_stdbool_h
26352 #include <stdbool.h>
26353 #endif
26354
26355 #endif
26356
26357 int
26358 main (void)
26359 {
26360 int _array_ [1 - 2 * !((sizeof (bool)) >= 0)]
26361   ;
26362   return 0;
26363 }
26364 _ACEOF
26365 rm -f "conftest.$ac_objext"
26366 if { (eval echo "$as_me:26366: \"$ac_compile\"") >&5
26367   (eval $ac_compile) 2>&5
26368   ac_status=$?
26369   echo "$as_me:26369: \$? = $ac_status" >&5
26370   (exit "$ac_status"); } &&
26371          { ac_try='test -s "conftest.$ac_objext"'
26372   { (eval echo "$as_me:26372: \"$ac_try\"") >&5
26373   (eval $ac_try) 2>&5
26374   ac_status=$?
26375   echo "$as_me:26375: \$? = $ac_status" >&5
26376   (exit "$ac_status"); }; }; then
26377   ac_lo=0 ac_mid=0
26378   while :; do
26379     cat >"conftest.$ac_ext" <<_ACEOF
26380 #line 26380 "configure"
26381 #include "confdefs.h"
26382
26383 #include <stdlib.h>
26384 #include <stdio.h>
26385
26386 #if defined(__cplusplus)
26387
26388 #ifdef HAVE_GXX_BUILTIN_H
26389 #include <g++/builtin.h>
26390 #elif HAVE_GPP_BUILTIN_H
26391 #include <gpp/builtin.h>
26392 #elif HAVE_BUILTIN_H
26393 #include <builtin.h>
26394 #endif
26395
26396 #else
26397
26398 #if $cf_cv_header_stdbool_h
26399 #include <stdbool.h>
26400 #endif
26401
26402 #endif
26403
26404 int
26405 main (void)
26406 {
26407 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26408   ;
26409   return 0;
26410 }
26411 _ACEOF
26412 rm -f "conftest.$ac_objext"
26413 if { (eval echo "$as_me:26413: \"$ac_compile\"") >&5
26414   (eval $ac_compile) 2>&5
26415   ac_status=$?
26416   echo "$as_me:26416: \$? = $ac_status" >&5
26417   (exit "$ac_status"); } &&
26418          { ac_try='test -s "conftest.$ac_objext"'
26419   { (eval echo "$as_me:26419: \"$ac_try\"") >&5
26420   (eval $ac_try) 2>&5
26421   ac_status=$?
26422   echo "$as_me:26422: \$? = $ac_status" >&5
26423   (exit "$ac_status"); }; }; then
26424   ac_hi=$ac_mid; break
26425 else
26426   echo "$as_me: failed program was:" >&5
26427 cat "conftest.$ac_ext" >&5
26428 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
26429 fi
26430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26431   done
26432 else
26433   echo "$as_me: failed program was:" >&5
26434 cat "conftest.$ac_ext" >&5
26435 ac_hi=-1 ac_mid=-1
26436   while :; do
26437     cat >"conftest.$ac_ext" <<_ACEOF
26438 #line 26438 "configure"
26439 #include "confdefs.h"
26440
26441 #include <stdlib.h>
26442 #include <stdio.h>
26443
26444 #if defined(__cplusplus)
26445
26446 #ifdef HAVE_GXX_BUILTIN_H
26447 #include <g++/builtin.h>
26448 #elif HAVE_GPP_BUILTIN_H
26449 #include <gpp/builtin.h>
26450 #elif HAVE_BUILTIN_H
26451 #include <builtin.h>
26452 #endif
26453
26454 #else
26455
26456 #if $cf_cv_header_stdbool_h
26457 #include <stdbool.h>
26458 #endif
26459
26460 #endif
26461
26462 int
26463 main (void)
26464 {
26465 int _array_ [1 - 2 * !((sizeof (bool)) >= $ac_mid)]
26466   ;
26467   return 0;
26468 }
26469 _ACEOF
26470 rm -f "conftest.$ac_objext"
26471 if { (eval echo "$as_me:26471: \"$ac_compile\"") >&5
26472   (eval $ac_compile) 2>&5
26473   ac_status=$?
26474   echo "$as_me:26474: \$? = $ac_status" >&5
26475   (exit "$ac_status"); } &&
26476          { ac_try='test -s "conftest.$ac_objext"'
26477   { (eval echo "$as_me:26477: \"$ac_try\"") >&5
26478   (eval $ac_try) 2>&5
26479   ac_status=$?
26480   echo "$as_me:26480: \$? = $ac_status" >&5
26481   (exit "$ac_status"); }; }; then
26482   ac_lo=$ac_mid; break
26483 else
26484   echo "$as_me: failed program was:" >&5
26485 cat "conftest.$ac_ext" >&5
26486 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
26487 fi
26488 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26489   done
26490 fi
26491 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26492 # Binary search between lo and hi bounds.
26493 while test "x$ac_lo" != "x$ac_hi"; do
26494   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
26495   cat >"conftest.$ac_ext" <<_ACEOF
26496 #line 26496 "configure"
26497 #include "confdefs.h"
26498
26499 #include <stdlib.h>
26500 #include <stdio.h>
26501
26502 #if defined(__cplusplus)
26503
26504 #ifdef HAVE_GXX_BUILTIN_H
26505 #include <g++/builtin.h>
26506 #elif HAVE_GPP_BUILTIN_H
26507 #include <gpp/builtin.h>
26508 #elif HAVE_BUILTIN_H
26509 #include <builtin.h>
26510 #endif
26511
26512 #else
26513
26514 #if $cf_cv_header_stdbool_h
26515 #include <stdbool.h>
26516 #endif
26517
26518 #endif
26519
26520 int
26521 main (void)
26522 {
26523 int _array_ [1 - 2 * !((sizeof (bool)) <= $ac_mid)]
26524   ;
26525   return 0;
26526 }
26527 _ACEOF
26528 rm -f "conftest.$ac_objext"
26529 if { (eval echo "$as_me:26529: \"$ac_compile\"") >&5
26530   (eval $ac_compile) 2>&5
26531   ac_status=$?
26532   echo "$as_me:26532: \$? = $ac_status" >&5
26533   (exit "$ac_status"); } &&
26534          { ac_try='test -s "conftest.$ac_objext"'
26535   { (eval echo "$as_me:26535: \"$ac_try\"") >&5
26536   (eval $ac_try) 2>&5
26537   ac_status=$?
26538   echo "$as_me:26538: \$? = $ac_status" >&5
26539   (exit "$ac_status"); }; }; then
26540   ac_hi=$ac_mid
26541 else
26542   echo "$as_me: failed program was:" >&5
26543 cat "conftest.$ac_ext" >&5
26544 ac_lo=`expr "$ac_mid" + 1`
26545 fi
26546 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26547 done
26548 ac_cv_sizeof_bool=$ac_lo
26549 else
26550   if test "$cross_compiling" = yes; then
26551   { { echo "$as_me:26551: error: cannot run test program while cross compiling" >&5
26552 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26553    { (exit 1); exit 1; }; }
26554 else
26555   cat >"conftest.$ac_ext" <<_ACEOF
26556 #line 26556 "configure"
26557 #include "confdefs.h"
26558
26559 #include <stdlib.h>
26560 #include <stdio.h>
26561
26562 #if defined(__cplusplus)
26563
26564 #ifdef HAVE_GXX_BUILTIN_H
26565 #include <g++/builtin.h>
26566 #elif HAVE_GPP_BUILTIN_H
26567 #include <gpp/builtin.h>
26568 #elif HAVE_BUILTIN_H
26569 #include <builtin.h>
26570 #endif
26571
26572 #else
26573
26574 #if $cf_cv_header_stdbool_h
26575 #include <stdbool.h>
26576 #endif
26577
26578 #endif
26579
26580 int
26581 main (void)
26582 {
26583 FILE *f = fopen ("conftest.val", "w");
26584 if (!f)
26585   $ac_main_return (1);
26586 fprintf (f, "%ld", (long)(sizeof (bool)));
26587 fclose (f);
26588   ;
26589   return 0;
26590 }
26591 _ACEOF
26592 rm -f "conftest$ac_exeext"
26593 if { (eval echo "$as_me:26593: \"$ac_link\"") >&5
26594   (eval $ac_link) 2>&5
26595   ac_status=$?
26596   echo "$as_me:26596: \$? = $ac_status" >&5
26597   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26598   { (eval echo "$as_me:26598: \"$ac_try\"") >&5
26599   (eval $ac_try) 2>&5
26600   ac_status=$?
26601   echo "$as_me:26601: \$? = $ac_status" >&5
26602   (exit "$ac_status"); }; }; then
26603   ac_cv_sizeof_bool=`cat conftest.val`
26604 else
26605   echo "$as_me: program exited with status $ac_status" >&5
26606 echo "$as_me: failed program was:" >&5
26607 cat "conftest.$ac_ext" >&5
26608 fi
26609 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26610 fi
26611 fi
26612 rm -f conftest.val
26613 else
26614   ac_cv_sizeof_bool=0
26615 fi
26616 fi
26617 echo "$as_me:26617: result: $ac_cv_sizeof_bool" >&5
26618 echo "${ECHO_T}$ac_cv_sizeof_bool" >&6
26619 cat >>confdefs.h <<EOF
26620 #define SIZEOF_BOOL $ac_cv_sizeof_bool
26621 EOF
26622
26623 echo "$as_me:26623: checking for type of bool" >&5
26624 echo $ECHO_N "checking for type of bool... $ECHO_C" >&6
26625 if test "${cf_cv_type_of_bool+set}" = set; then
26626   echo $ECHO_N "(cached) $ECHO_C" >&6
26627 else
26628
26629         rm -f cf_test.out
26630         if test "$cross_compiling" = yes; then
26631
26632                 case x$ac_cv_sizeof_bool in
26633                 (x1) cf_cv_type_of_bool="unsigned char";;
26634                 (x2) cf_cv_type_of_bool="unsigned short";;
26635                 (x4) cf_cv_type_of_bool="unsigned int";;
26636                 (x8) cf_cv_type_of_bool="unsigned long";;
26637                 (*)  cf_cv_type_of_bool=unknown;;
26638                 esac
26639
26640 else
26641   cat >"conftest.$ac_ext" <<_ACEOF
26642 #line 26642 "configure"
26643 #include "confdefs.h"
26644
26645 #include <stdlib.h>
26646 #include <stdio.h>
26647
26648 #if defined(__cplusplus)
26649
26650 #ifdef HAVE_GXX_BUILTIN_H
26651 #include <g++/builtin.h>
26652 #elif HAVE_GPP_BUILTIN_H
26653 #include <gpp/builtin.h>
26654 #elif HAVE_BUILTIN_H
26655 #include <builtin.h>
26656 #endif
26657
26658 #else
26659
26660 #if $cf_cv_header_stdbool_h
26661 #include <stdbool.h>
26662 #endif
26663
26664 #endif
26665
26666 int main(void)
26667 {
26668         FILE *fp = fopen("cf_test.out", "w");
26669         if (fp != 0) {
26670                 bool x = true;
26671                 if ((bool)(-x) >= 0)
26672                         fputs("unsigned ", fp);
26673                 if (sizeof(x) == sizeof(int))       fputs("int",  fp);
26674                 else if (sizeof(x) == sizeof(char)) fputs("char", fp);
26675                 else if (sizeof(x) == sizeof(short))fputs("short",fp);
26676                 else if (sizeof(x) == sizeof(long)) fputs("long", fp);
26677                 fclose(fp);
26678         }
26679         ${cf_cv_main_return:-return}(0);
26680 }
26681
26682 _ACEOF
26683 rm -f "conftest$ac_exeext"
26684 if { (eval echo "$as_me:26684: \"$ac_link\"") >&5
26685   (eval $ac_link) 2>&5
26686   ac_status=$?
26687   echo "$as_me:26687: \$? = $ac_status" >&5
26688   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26689   { (eval echo "$as_me:26689: \"$ac_try\"") >&5
26690   (eval $ac_try) 2>&5
26691   ac_status=$?
26692   echo "$as_me:26692: \$? = $ac_status" >&5
26693   (exit "$ac_status"); }; }; then
26694   cf_cv_type_of_bool=`cat cf_test.out`
26695                  if test -z "$cf_cv_type_of_bool"; then
26696                    cf_cv_type_of_bool=unknown
26697                  fi
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_type_of_bool=unknown
26703 fi
26704 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26705 fi
26706         rm -f cf_test.out
26707
26708 fi
26709 echo "$as_me:26709: result: $cf_cv_type_of_bool" >&5
26710 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26711
26712 if test "$cf_cv_type_of_bool" = unknown ; then
26713         case .$NCURSES_BOOL in
26714         (.auto|.) NCURSES_BOOL=unsigned;;
26715         esac
26716         { echo "$as_me:26716: WARNING: Assuming $NCURSES_BOOL for type of bool" >&5
26717 echo "$as_me: WARNING: Assuming $NCURSES_BOOL for type of bool" >&2;}
26718         cf_cv_type_of_bool=$NCURSES_BOOL
26719 fi
26720
26721                 else
26722                         echo "$as_me:26722: checking for fallback type of bool" >&5
26723 echo $ECHO_N "checking for fallback type of bool... $ECHO_C" >&6
26724                         case "$host_cpu" in
26725                         (i?86)  cf_cv_type_of_bool=char ;;
26726                         (*)     cf_cv_type_of_bool=int  ;;
26727                         esac
26728                         echo "$as_me:26728: result: $cf_cv_type_of_bool" >&5
26729 echo "${ECHO_T}$cf_cv_type_of_bool" >&6
26730                 fi
26731         fi
26732 fi
26733
26734 # If the C compiler did not declare bool, and we did not determine that the C++
26735 # compiler does not declare bool, turn on an ifdef in curses.h that makes the
26736 # ncurses library use the same type as C++ bool.  Note that this allows one to
26737 # specify the type of bool in a configure-script option and postpone
26738 # integration with the C++ compiler provided that the types are compatible.
26739 USE_CXX_BOOL=1
26740 if test "$cf_cv_cc_bool_type" = 1
26741 then
26742         # oops: C has a bool.  Unlikely, but C++ could differ.
26743         USE_CXX_BOOL=0
26744 elif test "$cf_cv_builtin_bool" = 0
26745 then
26746         # C++ has no bool
26747         USE_CXX_BOOL=0
26748 else
26749         # this is the normal case
26750         USE_CXX_BOOL='defined(__cplusplus)'
26751 fi
26752
26753 if test -f "${srcdir}/Ada95/Makefile.in" ; then
26754
26755         if test "$cf_with_ada" != "no" ; then
26756                 if test "$with_libtool" != "no"; then
26757                         { echo "$as_me:26757: WARNING: libtool does not support Ada - disabling feature" >&5
26758 echo "$as_me: WARNING: libtool does not support Ada - disabling feature" >&2;}
26759                         cf_with_ada=no
26760                 fi
26761         fi
26762
26763         if test "$cf_with_ada" != "no" ; then
26764
26765 for cf_prog_gnat in gnat gnatmake gprconfig gprbuild
26766 do
26767
26768 cf_upper_prog_gnat=`echo "${cf_prog_gnat}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26769
26770         unset ac_cv_path_cf_TEMP_gnat
26771         unset cf_TEMP_gnat
26772         # Extract the first word of "$cf_prog_gnat", so it can be a program name with args.
26773 set dummy $cf_prog_gnat; ac_word=$2
26774 echo "$as_me:26774: checking for $ac_word" >&5
26775 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26776 if test "${ac_cv_path_cf_TEMP_gnat+set}" = set; then
26777   echo $ECHO_N "(cached) $ECHO_C" >&6
26778 else
26779   case $cf_TEMP_gnat in
26780   [\\/]* | ?:[\\/]*)
26781   ac_cv_path_cf_TEMP_gnat="$cf_TEMP_gnat" # Let the user override the test with a path.
26782   ;;
26783   *)
26784   ac_save_IFS=$IFS; IFS=$ac_path_separator
26785 ac_dummy="$PATH"
26786 for ac_dir in $ac_dummy; do
26787   IFS=$ac_save_IFS
26788   test -z "$ac_dir" && ac_dir=.
26789   if $as_executable_p "$ac_dir/$ac_word"; then
26790    ac_cv_path_cf_TEMP_gnat="$ac_dir/$ac_word"
26791    echo "$as_me:26791: found $ac_dir/$ac_word" >&5
26792    break
26793 fi
26794 done
26795
26796   test -z "$ac_cv_path_cf_TEMP_gnat" && ac_cv_path_cf_TEMP_gnat="no"
26797   ;;
26798 esac
26799 fi
26800 cf_TEMP_gnat=$ac_cv_path_cf_TEMP_gnat
26801
26802 if test -n "$cf_TEMP_gnat"; then
26803   echo "$as_me:26803: result: $cf_TEMP_gnat" >&5
26804 echo "${ECHO_T}$cf_TEMP_gnat" >&6
26805 else
26806   echo "$as_me:26806: result: no" >&5
26807 echo "${ECHO_T}no" >&6
26808 fi
26809
26810         eval "cf_cv_PATH_$cf_upper_prog_gnat=$ac_cv_path_cf_TEMP_gnat"
26811
26812         if test "x$cf_TEMP_gnat" != xno; then
26813                 unset cf_cv_gnat_version
26814                 unset cf_TEMP_gnat
26815
26816 echo "$as_me:26816: checking for $cf_prog_gnat version" >&5
26817 echo $ECHO_N "checking for $cf_prog_gnat version... $ECHO_C" >&6
26818 if test "${cf_cv_gnat_version+set}" = set; then
26819   echo $ECHO_N "(cached) $ECHO_C" >&6
26820 else
26821
26822 cf_cv_gnat_version=`$cf_prog_gnat --version 2>&1 | \
26823         grep '[0-9].[0-9][0-9]*' |\
26824         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26825
26826 fi
26827 echo "$as_me:26827: result: $cf_cv_gnat_version" >&5
26828 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26829 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26830 eval cf_TEMP_gnat=$cf_cv_gnat_version; unset cf_cv_gnat_version
26831
26832         fi
26833         eval "cf_cv_VERSION_$cf_upper_prog_gnat=$cf_TEMP_gnat"
26834
26835         unset cf_TEMP_gnat
26836         unset cf_cv_gnat_version
26837         unset ac_cv_path_cf_TEMP_gnat
26838 done
26839
26840 if test "x$cf_cv_VERSION_GNATMAKE" = "xno"; then
26841         cf_ada_make=
26842         cf_cv_prog_gnat_correct=no
26843 else
26844         cf_ada_make=gnatmake
26845         if test "x$cf_cv_VERSION_GPRCONFIG" = "xno"; then
26846                 # gprconfig is newer than gnatmake; we can continue...
26847                 cf_ada_config="##"
26848         else
26849                 rm -rf ./conftest* ./*~conftest*
26850                 if mkdir conftest.src
26851                 then
26852                         cf_ada_config=""
26853                         cd conftest.src
26854                         for cf_gprconfig in Ada C
26855                         do
26856                                 echo "$as_me:26856: checking for gprconfig name for $cf_gprconfig" >&5
26857 echo $ECHO_N "checking for gprconfig name for $cf_gprconfig... $ECHO_C" >&6
26858                                 if test "$cf_gprconfig" = C
26859                                 then
26860                                         for cf_gprconfig_param in \
26861                                                 "$cf_gprconfig,,,,GNATGCC" \
26862                                                 "$cf_gprconfig,,,,GCC" \
26863                                                 "$cf_gprconfig"
26864                                         do
26865                                                 cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26866                                                 test -n "$cf_gprconfig_value" && break
26867                                         done
26868                                 else
26869                                         cf_gprconfig_param=$cf_gprconfig
26870                                         cf_gprconfig_value=`echo s| gprconfig --config=$cf_gprconfig_param 2>&5 | ${AWK:-awk} '/^\*/{print $3;}' | head -n 1`
26871                                 fi
26872                                 if test -n "$cf_gprconfig_value"
26873                                 then
26874                                         eval "cf_ada_config_$cf_gprconfig=$cf_gprconfig_value"
26875                                         echo "$as_me:26875: result: $cf_gprconfig_value" >&5
26876 echo "${ECHO_T}$cf_gprconfig_value" >&6
26877                                 else
26878                                         echo "$as_me:26878: result: missing" >&5
26879 echo "${ECHO_T}missing" >&6
26880                                         cf_ada_config="#"
26881                                         break
26882                                 fi
26883                         done
26884                         cd ..
26885                         rm -rf ./conftest* ./*~conftest*
26886                 fi
26887         fi
26888         if test "x$cf_ada_config" != "x#"
26889         then
26890
26891 echo "$as_me:26891: checking for gnat version" >&5
26892 echo $ECHO_N "checking for gnat version... $ECHO_C" >&6
26893 if test "${cf_cv_gnat_version+set}" = set; then
26894   echo $ECHO_N "(cached) $ECHO_C" >&6
26895 else
26896
26897 cf_cv_gnat_version=`${cf_ada_make:-gnatmake} --version 2>&1 | \
26898         grep '[0-9].[0-9][0-9]*' |\
26899         sed -e '2,$d' -e 's/[^0-9 \.]//g' -e 's/^[ ]*//' -e 's/ .*//'`
26900
26901 fi
26902 echo "$as_me:26902: result: $cf_cv_gnat_version" >&5
26903 echo "${ECHO_T}$cf_cv_gnat_version" >&6
26904 test -z "$cf_cv_gnat_version" && cf_cv_gnat_version=no
26905
26906 case "$cf_cv_gnat_version" in
26907 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
26908         cf_cv_prog_gnat_correct=yes
26909         ;;
26910 (*)
26911         { echo "$as_me:26911: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&5
26912 echo "$as_me: WARNING: Unsupported GNAT version $cf_cv_gnat_version. We require 3.11 or better. Disabling Ada95 binding." >&2;}
26913         cf_cv_prog_gnat_correct=no
26914         ;;
26915 esac
26916
26917                 # Extract the first word of "m4", so it can be a program name with args.
26918 set dummy m4; ac_word=$2
26919 echo "$as_me:26919: checking for $ac_word" >&5
26920 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
26921 if test "${ac_cv_prog_M4_exists+set}" = set; then
26922   echo $ECHO_N "(cached) $ECHO_C" >&6
26923 else
26924   if test -n "$M4_exists"; then
26925   ac_cv_prog_M4_exists="$M4_exists" # Let the user override the test.
26926 else
26927   ac_save_IFS=$IFS; IFS=$ac_path_separator
26928 ac_dummy="$PATH"
26929 for ac_dir in $ac_dummy; do
26930   IFS=$ac_save_IFS
26931   test -z "$ac_dir" && ac_dir=.
26932   $as_executable_p "$ac_dir/$ac_word" || continue
26933 ac_cv_prog_M4_exists="yes"
26934 echo "$as_me:26934: found $ac_dir/$ac_word" >&5
26935 break
26936 done
26937
26938   test -z "$ac_cv_prog_M4_exists" && ac_cv_prog_M4_exists="no"
26939 fi
26940 fi
26941 M4_exists=$ac_cv_prog_M4_exists
26942 if test -n "$M4_exists"; then
26943   echo "$as_me:26943: result: $M4_exists" >&5
26944 echo "${ECHO_T}$M4_exists" >&6
26945 else
26946   echo "$as_me:26946: result: no" >&5
26947 echo "${ECHO_T}no" >&6
26948 fi
26949
26950                 if test "$ac_cv_prog_M4_exists" = no; then
26951                         cf_cv_prog_gnat_correct=no
26952                         { echo "$as_me:26952: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&5
26953 echo "$as_me: WARNING: Ada95 binding required program m4 not found. Ada95 binding disabled" >&2;}
26954                 fi
26955                 if test "$cf_cv_prog_gnat_correct" = yes; then
26956                         echo "$as_me:26956: checking if GNAT works" >&5
26957 echo $ECHO_N "checking if GNAT works... $ECHO_C" >&6
26958
26959 rm -rf ./conftest* ./*~conftest*
26960 cat >>conftest.ads <<CF_EOF
26961 procedure conftest;
26962 CF_EOF
26963 cat >>conftest.adb <<CF_EOF
26964 with Text_IO;
26965 with GNAT.OS_Lib;
26966 procedure conftest is
26967 begin
26968    Text_IO.Put ("Hello World");
26969    Text_IO.New_Line;
26970    GNAT.OS_Lib.OS_Exit (0);
26971 end conftest;
26972 CF_EOF
26973 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
26974    if ( ./conftest 1>&5 2>&1 ) ; then
26975       cf_cv_prog_gnat_correct=yes
26976    else
26977       cf_cv_prog_gnat_correct=no
26978    fi
26979 else
26980    cf_cv_prog_gnat_correct=no
26981 fi
26982 rm -rf ./conftest* ./*~conftest*
26983
26984                         echo "$as_me:26984: result: $cf_cv_prog_gnat_correct" >&5
26985 echo "${ECHO_T}$cf_cv_prog_gnat_correct" >&6
26986                 fi
26987         else
26988                 cf_cv_prog_gnat_correct=no
26989         fi
26990 fi
26991
26992                 if test "x$cf_cv_prog_gnat_correct" = xyes; then
26993
26994         ADAFLAGS="$ADAFLAGS -gnatpn"
26995
26996         echo "$as_me:26996: checking optimization options for ADAFLAGS" >&5
26997 echo $ECHO_N "checking optimization options for ADAFLAGS... $ECHO_C" >&6
26998         case "$CFLAGS" in
26999         (*-g*)
27000
27001         ADAFLAGS="$ADAFLAGS -g"
27002
27003                 ;;
27004         esac
27005         case "$CFLAGS" in
27006         (*-O*)
27007                 cf_O_flag=`echo "$CFLAGS" |sed -e 's/^.*-O/-O/' -e 's/[         ].*//'`
27008
27009         ADAFLAGS="$ADAFLAGS $cf_O_flag"
27010
27011                 ;;
27012         esac
27013         echo "$as_me:27013: result: $ADAFLAGS" >&5
27014 echo "${ECHO_T}$ADAFLAGS" >&6
27015
27016 echo "$as_me:27016: checking if GNATPREP supports -T option" >&5
27017 echo $ECHO_N "checking if GNATPREP supports -T option... $ECHO_C" >&6
27018 if test "${cf_cv_gnatprep_opt_t+set}" = set; then
27019   echo $ECHO_N "(cached) $ECHO_C" >&6
27020 else
27021
27022 cf_cv_gnatprep_opt_t=no
27023 gnatprep -T 2>/dev/null >/dev/null && cf_cv_gnatprep_opt_t=yes
27024
27025 fi
27026 echo "$as_me:27026: result: $cf_cv_gnatprep_opt_t" >&5
27027 echo "${ECHO_T}$cf_cv_gnatprep_opt_t" >&6
27028 test "$cf_cv_gnatprep_opt_t" = yes && GNATPREP_OPTS="-T $GNATPREP_OPTS"
27029
27030 echo "$as_me:27030: checking if GNAT supports generics" >&5
27031 echo $ECHO_N "checking if GNAT supports generics... $ECHO_C" >&6
27032 case "$cf_cv_gnat_version" in
27033 (3.1[1-9]*|3.[2-9]*|[4-9].*|[1-9][0-9].[0-9]*|20[0-9][0-9])
27034         cf_gnat_generics=yes
27035         ;;
27036 (*)
27037         cf_gnat_generics=no
27038         ;;
27039 esac
27040 echo "$as_me:27040: result: $cf_gnat_generics" >&5
27041 echo "${ECHO_T}$cf_gnat_generics" >&6
27042
27043 if test "$cf_gnat_generics" = yes
27044 then
27045         cf_compile_generics=generics
27046         cf_generic_objects="\${GENOBJS}"
27047 else
27048         cf_compile_generics=
27049         cf_generic_objects=
27050 fi
27051
27052 echo "$as_me:27052: checking if GNAT supports SIGINT" >&5
27053 echo $ECHO_N "checking if GNAT supports SIGINT... $ECHO_C" >&6
27054 if test "${cf_cv_gnat_sigint+set}" = set; then
27055   echo $ECHO_N "(cached) $ECHO_C" >&6
27056 else
27057
27058 rm -rf ./conftest* ./*~conftest*
27059 cat >>conftest.ads <<CF_EOF
27060 with Ada.Interrupts.Names;
27061
27062 package ConfTest is
27063
27064    pragma Warnings (Off);  --  the next pragma exists since 3.11p
27065    pragma Unreserve_All_Interrupts;
27066    pragma Warnings (On);
27067
27068    protected Process is
27069       procedure Stop;
27070       function Continue return Boolean;
27071       pragma Attach_Handler (Stop, Ada.Interrupts.Names.SIGINT);
27072    private
27073       Done : Boolean := False;
27074    end Process;
27075
27076 end ConfTest;
27077 CF_EOF
27078 cat >>conftest.adb <<CF_EOF
27079 package body ConfTest is
27080    protected body Process is
27081       procedure Stop is
27082       begin
27083          Done := True;
27084       end Stop;
27085       function Continue return Boolean is
27086       begin
27087          return not Done;
27088       end Continue;
27089    end Process;
27090 end ConfTest;
27091 CF_EOF
27092 if ( "$cf_ada_make" $ADAFLAGS conftest 1>&5 2>&1 ) ; then
27093       cf_cv_gnat_sigint=yes
27094 else
27095    cf_cv_gnat_sigint=no
27096 fi
27097 rm -rf ./conftest* ./*~conftest*
27098
27099 fi
27100 echo "$as_me:27100: result: $cf_cv_gnat_sigint" >&5
27101 echo "${ECHO_T}$cf_cv_gnat_sigint" >&6
27102
27103 if test "$cf_cv_gnat_sigint" = yes ; then
27104         USE_GNAT_SIGINT=""
27105 else
27106         USE_GNAT_SIGINT="#"
27107 fi
27108
27109 cf_gnat_libraries=no
27110 cf_gnat_projects=no
27111
27112 if test "$enable_gnat_projects" != no ; then
27113 echo "$as_me:27113: checking if GNAT supports project files" >&5
27114 echo $ECHO_N "checking if GNAT supports project files... $ECHO_C" >&6
27115 case "$cf_cv_gnat_version" in
27116 (3.[0-9]*)
27117         ;;
27118 (*)
27119         case "$cf_cv_system_name" in
27120         (cygwin*|msys*)
27121                 ;;
27122         (*)
27123                 rm -rf ./conftest* ./*~conftest*
27124                 if mkdir conftest.src conftest.bin conftest.lib
27125                 then
27126                         cd conftest.src
27127                         rm -rf ./conftest* ./*~conftest*
27128                         cat >>library.gpr <<CF_EOF
27129 project Library is
27130   Kind := External ("LIB_KIND");
27131   for Library_Name use "ConfTest";
27132   for Object_Dir use ".";
27133   for Library_ALI_Dir use External("LIBRARY_DIR");
27134   for Library_Version use External ("SONAME");
27135   for Library_Kind use Kind;
27136   for Library_Dir use External("BUILD_DIR");
27137   Source_Dir := External ("SOURCE_DIR");
27138   for Source_Dirs use (Source_Dir);
27139 end Library;
27140 CF_EOF
27141                         cat >>confpackage.ads <<CF_EOF
27142 package ConfPackage is
27143    procedure conftest;
27144 end ConfPackage;
27145 CF_EOF
27146                         cat >>confpackage.adb <<CF_EOF
27147 with Text_IO;
27148 package body ConfPackage is
27149    procedure conftest is
27150    begin
27151       Text_IO.Put ("Hello World");
27152       Text_IO.New_Line;
27153    end conftest;
27154 end ConfPackage;
27155 CF_EOF
27156                         if ( "$cf_ada_make" $ADAFLAGS \
27157                                         -Plibrary.gpr \
27158                                         -XBUILD_DIR="`cd ../conftest.bin;pwd`" \
27159                                         -XLIBRARY_DIR="`cd ../conftest.lib;pwd`" \
27160                                         -XSOURCE_DIR="`pwd`" \
27161                                         -XSONAME=libConfTest.so.1 \
27162                                         -XLIB_KIND=static 1>&5 2>&1 ) ; then
27163                                 cf_gnat_projects=yes
27164                         fi
27165                         cd ..
27166                 fi
27167                 if test -f conftest.lib/confpackage.ali
27168                 then
27169                         cf_gnat_libraries=yes
27170                 fi
27171                 rm -rf ./conftest* ./*~conftest*
27172                 ;;
27173         esac
27174         ;;
27175 esac
27176 echo "$as_me:27176: result: $cf_gnat_projects" >&5
27177 echo "${ECHO_T}$cf_gnat_projects" >&6
27178 fi # enable_gnat_projects
27179
27180 if test "$cf_gnat_projects" = yes
27181 then
27182         echo "$as_me:27182: checking if GNAT supports libraries" >&5
27183 echo $ECHO_N "checking if GNAT supports libraries... $ECHO_C" >&6
27184         echo "$as_me:27184: result: $cf_gnat_libraries" >&5
27185 echo "${ECHO_T}$cf_gnat_libraries" >&6
27186 fi
27187
27188 USE_OLD_MAKERULES=""
27189 USE_GNAT_PROJECTS="#"
27190 USE_GNAT_MAKE_GPR="#"
27191 USE_GNAT_GPRBUILD="#"
27192
27193 if test "$cf_gnat_projects" = yes
27194 then
27195         USE_OLD_MAKERULES="#"
27196         USE_GNAT_PROJECTS=""
27197         if test "$cf_cv_VERSION_GPRBUILD" != no
27198         then
27199                 USE_GNAT_GPRBUILD=""
27200         elif test "$cf_cv_VERSION_GNATMAKE" != no
27201         then
27202                 USE_GNAT_MAKE_GPR=""
27203         else
27204                 { echo "$as_me:27204: WARNING: use old makefile rules since tools are missing" >&5
27205 echo "$as_me: WARNING: use old makefile rules since tools are missing" >&2;}
27206         fi
27207 fi
27208
27209 if test "$cf_gnat_libraries" = yes
27210 then
27211         USE_GNAT_LIBRARIES=""
27212 else
27213         USE_GNAT_LIBRARIES="#"
27214 fi
27215
27216 echo "$as_me:27216: checking for ada-compiler" >&5
27217 echo $ECHO_N "checking for ada-compiler... $ECHO_C" >&6
27218
27219 # Check whether --with-ada-compiler or --without-ada-compiler was given.
27220 if test "${with_ada_compiler+set}" = set; then
27221   withval="$with_ada_compiler"
27222   cf_ada_compiler=$withval
27223 else
27224   cf_ada_compiler=gnatmake
27225 fi;
27226
27227 echo "$as_me:27227: result: $cf_ada_compiler" >&5
27228 echo "${ECHO_T}$cf_ada_compiler" >&6
27229
27230                         cf_ada_package=terminal_interface
27231
27232 echo "$as_me:27232: checking for ada-include" >&5
27233 echo $ECHO_N "checking for ada-include... $ECHO_C" >&6
27234
27235 # Check whether --with-ada-include or --without-ada-include was given.
27236 if test "${with_ada_include+set}" = set; then
27237   withval="$with_ada_include"
27238
27239 else
27240   withval="${ADA_INCLUDE:-$prefix/share/ada/adainclude}"
27241 fi; if test -n "$prefix/share/ada/adainclude" ; then
27242
27243 if test "x$prefix" != xNONE; then
27244         cf_path_syntax="$prefix"
27245 else
27246         cf_path_syntax="$ac_default_prefix"
27247 fi
27248
27249 case ".$withval" in
27250 (.\$\(*\)*|.\'*\'*)
27251         ;;
27252 (..|./*|.\\*)
27253         ;;
27254 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27255         ;;
27256 (.\$\{*prefix\}*|.\$\{*dir\}*)
27257         eval withval="$withval"
27258         case ".$withval" in
27259         (.NONE/*)
27260                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27261                 ;;
27262         esac
27263         ;;
27264 (.no|.NONE/*)
27265         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27266         ;;
27267 (*)
27268         { { echo "$as_me:27268: error: expected a pathname, not \"$withval\"" >&5
27269 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27270    { (exit 1); exit 1; }; }
27271         ;;
27272 esac
27273
27274 fi
27275 eval ADA_INCLUDE="$withval"
27276
27277 echo "$as_me:27277: result: $ADA_INCLUDE" >&5
27278 echo "${ECHO_T}$ADA_INCLUDE" >&6
27279
27280 echo "$as_me:27280: checking for ada-objects" >&5
27281 echo $ECHO_N "checking for ada-objects... $ECHO_C" >&6
27282
27283 # Check whether --with-ada-objects or --without-ada-objects was given.
27284 if test "${with_ada_objects+set}" = set; then
27285   withval="$with_ada_objects"
27286
27287 else
27288   withval="${ADA_OBJECTS:-$prefix/lib/ada/adalib}"
27289 fi; if test -n "$prefix/lib/ada/adalib" ; then
27290
27291 if test "x$prefix" != xNONE; then
27292         cf_path_syntax="$prefix"
27293 else
27294         cf_path_syntax="$ac_default_prefix"
27295 fi
27296
27297 case ".$withval" in
27298 (.\$\(*\)*|.\'*\'*)
27299         ;;
27300 (..|./*|.\\*)
27301         ;;
27302 (.[a-zA-Z]:[\\/]*) # OS/2 EMX
27303         ;;
27304 (.\$\{*prefix\}*|.\$\{*dir\}*)
27305         eval withval="$withval"
27306         case ".$withval" in
27307         (.NONE/*)
27308                 withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27309                 ;;
27310         esac
27311         ;;
27312 (.no|.NONE/*)
27313         withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
27314         ;;
27315 (*)
27316         { { echo "$as_me:27316: error: expected a pathname, not \"$withval\"" >&5
27317 echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
27318    { (exit 1); exit 1; }; }
27319         ;;
27320 esac
27321
27322 fi
27323 eval ADA_OBJECTS="$withval"
27324
27325 echo "$as_me:27325: result: $ADA_OBJECTS" >&5
27326 echo "${ECHO_T}$ADA_OBJECTS" >&6
27327
27328 echo "$as_me:27328: checking if an Ada95 shared-library should be built" >&5
27329 echo $ECHO_N "checking if an Ada95 shared-library should be built... $ECHO_C" >&6
27330
27331 # Check whether --with-ada-sharedlib or --without-ada-sharedlib was given.
27332 if test "${with_ada_sharedlib+set}" = set; then
27333   withval="$with_ada_sharedlib"
27334   with_ada_sharedlib=$withval
27335 else
27336   with_ada_sharedlib=no
27337 fi;
27338 echo "$as_me:27338: result: $with_ada_sharedlib" >&5
27339 echo "${ECHO_T}$with_ada_sharedlib" >&6
27340
27341 if test "x$with_ada_sharedlib" != xno
27342 then
27343         if test "x$cf_gnat_projects" != xyes
27344         then
27345                 { echo "$as_me:27345: WARNING: disabling shared-library since GNAT projects are not supported" >&5
27346 echo "$as_me: WARNING: disabling shared-library since GNAT projects are not supported" >&2;}
27347                 with_ada_sharedlib=no
27348         fi
27349 fi
27350
27351 ADA_SHAREDLIB='lib$(LIB_NAME).so.1'
27352 MAKE_ADA_SHAREDLIB="#"
27353
27354 if test "x$with_ada_sharedlib" != xno
27355 then
27356         MAKE_ADA_SHAREDLIB=
27357         if test "x$with_ada_sharedlib" != xyes
27358         then
27359                 ADA_SHAREDLIB="$with_ada_sharedlib"
27360         fi
27361 fi
27362
27363                         # allow the Ada binding to be renamed
27364
27365 echo "$as_me:27365: checking for ada-libname" >&5
27366 echo $ECHO_N "checking for ada-libname... $ECHO_C" >&6
27367
27368 # Check whether --with-ada-libname or --without-ada-libname was given.
27369 if test "${with_ada_libname+set}" = set; then
27370   withval="$with_ada_libname"
27371   ADA_LIBNAME=$withval
27372 else
27373   ADA_LIBNAME=AdaCurses
27374 fi;
27375 case "x$ADA_LIBNAME" in
27376 (x|xyes|xno)
27377         ADA_LIBNAME=AdaCurses
27378         ;;
27379 esac
27380
27381 echo "$as_me:27381: result: $ADA_LIBNAME" >&5
27382 echo "${ECHO_T}$ADA_LIBNAME" >&6
27383
27384                 fi
27385         fi
27386 else
27387         cf_with_ada=no
27388 fi
27389
27390 # do this "late" to avoid conflict with header-checks
27391 if test "x$with_widec" = xyes ; then
27392         echo "$as_me:27392: checking for wchar_t" >&5
27393 echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6
27394 if test "${ac_cv_type_wchar_t+set}" = set; then
27395   echo $ECHO_N "(cached) $ECHO_C" >&6
27396 else
27397   cat >"conftest.$ac_ext" <<_ACEOF
27398 #line 27398 "configure"
27399 #include "confdefs.h"
27400 $ac_includes_default
27401 int
27402 main (void)
27403 {
27404 if ((wchar_t *) 0)
27405   return 0;
27406 if (sizeof (wchar_t))
27407   return 0;
27408   ;
27409   return 0;
27410 }
27411 _ACEOF
27412 rm -f "conftest.$ac_objext"
27413 if { (eval echo "$as_me:27413: \"$ac_compile\"") >&5
27414   (eval $ac_compile) 2>&5
27415   ac_status=$?
27416   echo "$as_me:27416: \$? = $ac_status" >&5
27417   (exit "$ac_status"); } &&
27418          { ac_try='test -s "conftest.$ac_objext"'
27419   { (eval echo "$as_me:27419: \"$ac_try\"") >&5
27420   (eval $ac_try) 2>&5
27421   ac_status=$?
27422   echo "$as_me:27422: \$? = $ac_status" >&5
27423   (exit "$ac_status"); }; }; then
27424   ac_cv_type_wchar_t=yes
27425 else
27426   echo "$as_me: failed program was:" >&5
27427 cat "conftest.$ac_ext" >&5
27428 ac_cv_type_wchar_t=no
27429 fi
27430 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27431 fi
27432 echo "$as_me:27432: result: $ac_cv_type_wchar_t" >&5
27433 echo "${ECHO_T}$ac_cv_type_wchar_t" >&6
27434
27435 echo "$as_me:27435: checking size of wchar_t" >&5
27436 echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6
27437 if test "${ac_cv_sizeof_wchar_t+set}" = set; then
27438   echo $ECHO_N "(cached) $ECHO_C" >&6
27439 else
27440   if test "$ac_cv_type_wchar_t" = yes; then
27441   if test "$cross_compiling" = yes; then
27442   # Depending upon the size, compute the lo and hi bounds.
27443 cat >"conftest.$ac_ext" <<_ACEOF
27444 #line 27444 "configure"
27445 #include "confdefs.h"
27446 $ac_includes_default
27447 int
27448 main (void)
27449 {
27450 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= 0)]
27451   ;
27452   return 0;
27453 }
27454 _ACEOF
27455 rm -f "conftest.$ac_objext"
27456 if { (eval echo "$as_me:27456: \"$ac_compile\"") >&5
27457   (eval $ac_compile) 2>&5
27458   ac_status=$?
27459   echo "$as_me:27459: \$? = $ac_status" >&5
27460   (exit "$ac_status"); } &&
27461          { ac_try='test -s "conftest.$ac_objext"'
27462   { (eval echo "$as_me:27462: \"$ac_try\"") >&5
27463   (eval $ac_try) 2>&5
27464   ac_status=$?
27465   echo "$as_me:27465: \$? = $ac_status" >&5
27466   (exit "$ac_status"); }; }; then
27467   ac_lo=0 ac_mid=0
27468   while :; do
27469     cat >"conftest.$ac_ext" <<_ACEOF
27470 #line 27470 "configure"
27471 #include "confdefs.h"
27472 $ac_includes_default
27473 int
27474 main (void)
27475 {
27476 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27477   ;
27478   return 0;
27479 }
27480 _ACEOF
27481 rm -f "conftest.$ac_objext"
27482 if { (eval echo "$as_me:27482: \"$ac_compile\"") >&5
27483   (eval $ac_compile) 2>&5
27484   ac_status=$?
27485   echo "$as_me:27485: \$? = $ac_status" >&5
27486   (exit "$ac_status"); } &&
27487          { ac_try='test -s "conftest.$ac_objext"'
27488   { (eval echo "$as_me:27488: \"$ac_try\"") >&5
27489   (eval $ac_try) 2>&5
27490   ac_status=$?
27491   echo "$as_me:27491: \$? = $ac_status" >&5
27492   (exit "$ac_status"); }; }; then
27493   ac_hi=$ac_mid; break
27494 else
27495   echo "$as_me: failed program was:" >&5
27496 cat "conftest.$ac_ext" >&5
27497 ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
27498 fi
27499 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27500   done
27501 else
27502   echo "$as_me: failed program was:" >&5
27503 cat "conftest.$ac_ext" >&5
27504 ac_hi=-1 ac_mid=-1
27505   while :; do
27506     cat >"conftest.$ac_ext" <<_ACEOF
27507 #line 27507 "configure"
27508 #include "confdefs.h"
27509 $ac_includes_default
27510 int
27511 main (void)
27512 {
27513 int _array_ [1 - 2 * !((sizeof (wchar_t)) >= $ac_mid)]
27514   ;
27515   return 0;
27516 }
27517 _ACEOF
27518 rm -f "conftest.$ac_objext"
27519 if { (eval echo "$as_me:27519: \"$ac_compile\"") >&5
27520   (eval $ac_compile) 2>&5
27521   ac_status=$?
27522   echo "$as_me:27522: \$? = $ac_status" >&5
27523   (exit "$ac_status"); } &&
27524          { ac_try='test -s "conftest.$ac_objext"'
27525   { (eval echo "$as_me:27525: \"$ac_try\"") >&5
27526   (eval $ac_try) 2>&5
27527   ac_status=$?
27528   echo "$as_me:27528: \$? = $ac_status" >&5
27529   (exit "$ac_status"); }; }; then
27530   ac_lo=$ac_mid; break
27531 else
27532   echo "$as_me: failed program was:" >&5
27533 cat "conftest.$ac_ext" >&5
27534 ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
27535 fi
27536 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27537   done
27538 fi
27539 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27540 # Binary search between lo and hi bounds.
27541 while test "x$ac_lo" != "x$ac_hi"; do
27542   ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
27543   cat >"conftest.$ac_ext" <<_ACEOF
27544 #line 27544 "configure"
27545 #include "confdefs.h"
27546 $ac_includes_default
27547 int
27548 main (void)
27549 {
27550 int _array_ [1 - 2 * !((sizeof (wchar_t)) <= $ac_mid)]
27551   ;
27552   return 0;
27553 }
27554 _ACEOF
27555 rm -f "conftest.$ac_objext"
27556 if { (eval echo "$as_me:27556: \"$ac_compile\"") >&5
27557   (eval $ac_compile) 2>&5
27558   ac_status=$?
27559   echo "$as_me:27559: \$? = $ac_status" >&5
27560   (exit "$ac_status"); } &&
27561          { ac_try='test -s "conftest.$ac_objext"'
27562   { (eval echo "$as_me:27562: \"$ac_try\"") >&5
27563   (eval $ac_try) 2>&5
27564   ac_status=$?
27565   echo "$as_me:27565: \$? = $ac_status" >&5
27566   (exit "$ac_status"); }; }; then
27567   ac_hi=$ac_mid
27568 else
27569   echo "$as_me: failed program was:" >&5
27570 cat "conftest.$ac_ext" >&5
27571 ac_lo=`expr "$ac_mid" + 1`
27572 fi
27573 rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27574 done
27575 ac_cv_sizeof_wchar_t=$ac_lo
27576 else
27577   if test "$cross_compiling" = yes; then
27578   { { echo "$as_me:27578: error: cannot run test program while cross compiling" >&5
27579 echo "$as_me: error: cannot run test program while cross compiling" >&2;}
27580    { (exit 1); exit 1; }; }
27581 else
27582   cat >"conftest.$ac_ext" <<_ACEOF
27583 #line 27583 "configure"
27584 #include "confdefs.h"
27585 $ac_includes_default
27586 int
27587 main (void)
27588 {
27589 FILE *f = fopen ("conftest.val", "w");
27590 if (!f)
27591   $ac_main_return (1);
27592 fprintf (f, "%ld", (long)(sizeof (wchar_t)));
27593 fclose (f);
27594   ;
27595   return 0;
27596 }
27597 _ACEOF
27598 rm -f "conftest$ac_exeext"
27599 if { (eval echo "$as_me:27599: \"$ac_link\"") >&5
27600   (eval $ac_link) 2>&5
27601   ac_status=$?
27602   echo "$as_me:27602: \$? = $ac_status" >&5
27603   (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
27604   { (eval echo "$as_me:27604: \"$ac_try\"") >&5
27605   (eval $ac_try) 2>&5
27606   ac_status=$?
27607   echo "$as_me:27607: \$? = $ac_status" >&5
27608   (exit "$ac_status"); }; }; then
27609   ac_cv_sizeof_wchar_t=`cat conftest.val`
27610 else
27611   echo "$as_me: program exited with status $ac_status" >&5
27612 echo "$as_me: failed program was:" >&5
27613 cat "conftest.$ac_ext" >&5
27614 fi
27615 rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
27616 fi
27617 fi
27618 rm -f conftest.val
27619 else
27620   ac_cv_sizeof_wchar_t=0
27621 fi
27622 fi
27623 echo "$as_me:27623: result: $ac_cv_sizeof_wchar_t" >&5
27624 echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6
27625 cat >>confdefs.h <<EOF
27626 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
27627 EOF
27628
27629         # cross-compiling to mingw can run into the problem that attempting to
27630         # link with the regex library fails, causing the test to not set this to
27631         # a number.  "recent" autoconf does not address this problem either -TD
27632         if test -z "$ac_cv_sizeof_wchar_t"
27633         then
27634                 test -n "$verbose" && echo "    test failed (assume 2)" 1>&6
27635
27636 echo "${as_me:-configure}:27636: testing test failed (assume 2) ..." 1>&5
27637
27638                 sed /SIZEOF_WCHAR_T/d confdefs.h >confdefs.tmp
27639                 mv confdefs.tmp confdefs.h
27640                 echo "#define SIZEOF_WCHAR_T 2" >>confdefs.h
27641         fi
27642 fi
27643
27644 ### Construct the ncurses library-subsets, if any, from this set of keywords:
27645 ###     none, base, ext_funcs, ext_tinfo, ticlib, termlib, widechar
27646 ###
27647 ### ticlib modules may be a separate library, otherwise contained in termlib.
27648 ### termlib modules may be a separate library, otherwise contained in ncurses.
27649 ###
27650 ### The of "+" or " " between the tokens controls the way the script
27651 ### chooses to split module lists into libraries.
27652 ###
27653 ### (see CF_LIB_RULES).
27654 echo "$as_me:27654: checking for library subsets" >&5
27655 echo $ECHO_N "checking for library subsets... $ECHO_C" >&6
27656 LIB_SUBSETS=
27657
27658 if test "x$cf_with_progs" = xyes || test "$with_ticlib" != no || test "$with_termcap" != no; then
27659         LIB_SUBSETS="${LIB_SUBSETS}ticlib"
27660         if test "$with_ticlib" != no ; then
27661                 LIB_SUBSETS="${LIB_SUBSETS} "
27662         else
27663                 LIB_SUBSETS="${LIB_SUBSETS}+"
27664         fi
27665 fi
27666
27667 LIB_SUBSETS="${LIB_SUBSETS}termlib"
27668 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_tinfo"
27669
27670 if test "$with_termlib" != no ; then
27671         LIB_SUBSETS="${LIB_SUBSETS} "
27672 else
27673         LIB_SUBSETS="${LIB_SUBSETS}+"
27674 fi
27675
27676 LIB_SUBSETS="${LIB_SUBSETS}base"
27677
27678 # Most term-driver calls are to tinfo, but some like init_pair are to the
27679 # base library (so it resides in base).
27680 if test "$with_term_driver" != no ; then
27681         LIB_SUBSETS="${LIB_SUBSETS}+port_drivers"
27682         case "$cf_cv_system_name" in
27683         (*mingw32*|*mingw64*)
27684                 if test "x$with_exp_win32" = xyes ; then
27685                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32"
27686                 else
27687                         LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo+port_win32con"
27688                 fi
27689                 CPPFLAGS="$CPPFLAGS -DUSE_WIN32CON_DRIVER"
27690                 ;;
27691         (*)
27692                 LIB_SUBSETS="${LIB_SUBSETS}+port_tinfo"
27693                 ;;
27694         esac
27695 elif test "x$with_exp_win32" = xyes ; then
27696         case "$cf_cv_system_name" in
27697         (*mingw32*|*mingw64*)
27698                 LIB_SUBSETS="${LIB_SUBSETS}+port_win32"
27699                 ;;
27700         (*)
27701                 ;;
27702         esac
27703 fi
27704
27705 test "x$with_widec"     = xyes && LIB_SUBSETS="${LIB_SUBSETS}+widechar"
27706 test "x$with_ext_funcs" = xyes && LIB_SUBSETS="${LIB_SUBSETS}+ext_funcs"
27707
27708 echo "$as_me:27708: result: $LIB_SUBSETS" >&5
27709 echo "${ECHO_T}$LIB_SUBSETS" >&6
27710
27711 ### Construct the list of include-directories to be generated
27712
27713 if test "$srcdir" != "."; then
27714         CPPFLAGS="-I\${srcdir}/../include $CPPFLAGS"
27715 fi
27716 CPPFLAGS="-I../include $CPPFLAGS"
27717 if test "$srcdir" != "."; then
27718         CPPFLAGS="-I\${srcdir} $CPPFLAGS"
27719 fi
27720 CPPFLAGS="-I. $CPPFLAGS"
27721
27722 ACPPFLAGS="-I. -I../include -I../../include $ACPPFLAGS"
27723 if test "$srcdir" != "."; then
27724         ACPPFLAGS="-I\${srcdir}/../../include $ACPPFLAGS"
27725 fi
27726 if test "$GCC" != yes; then
27727         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27728 elif test "$includedir" != "/usr/include"; then
27729         if test "$includedir" = '${prefix}/include' ; then
27730                 if test x$prefix != x/usr ; then
27731                         ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27732                 fi
27733         else
27734                 ACPPFLAGS="$ACPPFLAGS -I\${includedir}"
27735         fi
27736 fi
27737
27738 ### Build up pieces for makefile rules
27739 echo "$as_me:27739: checking default library suffix" >&5
27740 echo $ECHO_N "checking default library suffix... $ECHO_C" >&6
27741
27742         case $DFT_LWR_MODEL in
27743         (libtool) DFT_ARG_SUFFIX=''   ;;
27744         (normal)  DFT_ARG_SUFFIX=''   ;;
27745         (debug)   DFT_ARG_SUFFIX='_g' ;;
27746         (profile) DFT_ARG_SUFFIX='_p' ;;
27747         (shared)  DFT_ARG_SUFFIX=''   ;;
27748         esac
27749         test -n "$LIB_SUFFIX" && DFT_ARG_SUFFIX="${LIB_SUFFIX}${DFT_ARG_SUFFIX}"
27750 echo "$as_me:27750: result: $DFT_ARG_SUFFIX" >&5
27751 echo "${ECHO_T}$DFT_ARG_SUFFIX" >&6
27752
27753 echo "$as_me:27753: checking default library-dependency suffix" >&5
27754 echo $ECHO_N "checking default library-dependency suffix... $ECHO_C" >&6
27755
27756         case X$DFT_LWR_MODEL in
27757         (Xlibtool)
27758                 DFT_LIB_SUFFIX='.la'
27759                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27760                 ;;
27761         (Xdebug)
27762                 case "$cf_cv_system_name" in
27763                 (*-msvc*)
27764                         DFT_LIB_SUFFIX='_g.lib'
27765                         ;;
27766                 (*)
27767                         DFT_LIB_SUFFIX='_g.a'
27768                         ;;
27769                 esac
27770                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27771                 ;;
27772         (Xprofile)
27773                 case "$cf_cv_system_name" in
27774                 (*-msvc*)
27775                         DFT_LIB_SUFFIX='_p.lib'
27776                         ;;
27777                 (*)
27778                         DFT_LIB_SUFFIX='_p.a'
27779                         ;;
27780                 esac
27781                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27782                 ;;
27783         (Xshared)
27784                 case "$cf_cv_system_name" in
27785                 (aix[5-7]*)
27786                         DFT_LIB_SUFFIX='.so'
27787                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27788                         ;;
27789                 (*-msvc*)
27790                         DFT_LIB_SUFFIX='.dll'
27791                         DFT_DEP_SUFFIX='.dll.lib'
27792                         ;;
27793                 (cygwin*|msys*|mingw*)
27794                         DFT_LIB_SUFFIX='.dll'
27795                         DFT_DEP_SUFFIX='.dll.a'
27796                         ;;
27797                 (darwin*)
27798                         DFT_LIB_SUFFIX='.dylib'
27799                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27800                         ;;
27801                 (hpux*)
27802                         case "$target" in
27803                         (ia64*)
27804                                 DFT_LIB_SUFFIX='.so'
27805                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27806                                 ;;
27807                         (*)
27808                                 DFT_LIB_SUFFIX='.sl'
27809                                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27810                                 ;;
27811                         esac
27812                         ;;
27813                 (*)
27814                         DFT_LIB_SUFFIX='.so'
27815                         DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27816                         ;;
27817                 esac
27818                 ;;
27819         (*)
27820                 case "$target" in
27821                 (*-msvc*)
27822                         DFT_LIB_SUFFIX='.lib'
27823                         ;;
27824                 (*)
27825                         DFT_LIB_SUFFIX='.a'
27826                         ;;
27827                 esac
27828                 DFT_DEP_SUFFIX=$DFT_LIB_SUFFIX
27829                 ;;
27830         esac
27831         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27832         then
27833                 DFT_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_LIB_SUFFIX}"
27834                 DFT_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${DFT_DEP_SUFFIX}"
27835         fi
27836 echo "$as_me:27836: result: $DFT_DEP_SUFFIX" >&5
27837 echo "${ECHO_T}$DFT_DEP_SUFFIX" >&6
27838
27839 echo "$as_me:27839: checking default object directory" >&5
27840 echo $ECHO_N "checking default object directory... $ECHO_C" >&6
27841
27842         case $DFT_LWR_MODEL in
27843         (libtool) DFT_OBJ_SUBDIR='obj_lo'  ;;
27844         (normal)  DFT_OBJ_SUBDIR='objects' ;;
27845         (debug)   DFT_OBJ_SUBDIR='obj_g' ;;
27846         (profile) DFT_OBJ_SUBDIR='obj_p' ;;
27847         (shared)
27848                 case "$cf_cv_system_name" in
27849                 (cygwin|msys)
27850                         DFT_OBJ_SUBDIR='objects' ;;
27851                 (*)
27852                         DFT_OBJ_SUBDIR='obj_s' ;;
27853                 esac
27854         esac
27855 echo "$as_me:27855: result: $DFT_OBJ_SUBDIR" >&5
27856 echo "${ECHO_T}$DFT_OBJ_SUBDIR" >&6
27857
27858 if test "x$cf_with_cxx" = xyes ; then
27859 echo "$as_me:27859: checking c++ library-dependency suffix" >&5
27860 echo $ECHO_N "checking c++ library-dependency suffix... $ECHO_C" >&6
27861 if test "$with_libtool" != "no"; then
27862         # libtool thinks it can make c++ shared libraries (perhaps only g++)
27863         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27864 elif test "$with_shared_cxx" != "no"; then
27865         # also for g++ users...
27866         CXX_LIB_SUFFIX=$DFT_DEP_SUFFIX
27867 else
27868         # we normally make a static library because C/C++ library rules differ
27869
27870         case Xnormal in
27871         (Xlibtool)
27872                 CXX_LIB_SUFFIX='.la'
27873                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27874                 ;;
27875         (Xdebug)
27876                 case "$cf_cv_system_name" in
27877                 (*-msvc*)
27878                         CXX_LIB_SUFFIX='_g.lib'
27879                         ;;
27880                 (*)
27881                         CXX_LIB_SUFFIX='_g.a'
27882                         ;;
27883                 esac
27884                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27885                 ;;
27886         (Xprofile)
27887                 case "$cf_cv_system_name" in
27888                 (*-msvc*)
27889                         CXX_LIB_SUFFIX='_p.lib'
27890                         ;;
27891                 (*)
27892                         CXX_LIB_SUFFIX='_p.a'
27893                         ;;
27894                 esac
27895                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27896                 ;;
27897         (Xshared)
27898                 case "$cf_cv_system_name" in
27899                 (aix[5-7]*)
27900                         CXX_LIB_SUFFIX='.so'
27901                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27902                         ;;
27903                 (*-msvc*)
27904                         CXX_LIB_SUFFIX='.dll'
27905                         CXX_DEP_SUFFIX='.dll.lib'
27906                         ;;
27907                 (cygwin*|msys*|mingw*)
27908                         CXX_LIB_SUFFIX='.dll'
27909                         CXX_DEP_SUFFIX='.dll.a'
27910                         ;;
27911                 (darwin*)
27912                         CXX_LIB_SUFFIX='.dylib'
27913                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27914                         ;;
27915                 (hpux*)
27916                         case "$target" in
27917                         (ia64*)
27918                                 CXX_LIB_SUFFIX='.so'
27919                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27920                                 ;;
27921                         (*)
27922                                 CXX_LIB_SUFFIX='.sl'
27923                                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27924                                 ;;
27925                         esac
27926                         ;;
27927                 (*)
27928                         CXX_LIB_SUFFIX='.so'
27929                         CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27930                         ;;
27931                 esac
27932                 ;;
27933         (*)
27934                 case "$target" in
27935                 (*-msvc*)
27936                         CXX_LIB_SUFFIX='.lib'
27937                         ;;
27938                 (*)
27939                         CXX_LIB_SUFFIX='.a'
27940                         ;;
27941                 esac
27942                 CXX_DEP_SUFFIX=$CXX_LIB_SUFFIX
27943                 ;;
27944         esac
27945         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
27946         then
27947                 CXX_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_LIB_SUFFIX}"
27948                 CXX_DEP_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}${CXX_DEP_SUFFIX}"
27949         fi
27950
27951 fi
27952 echo "$as_me:27952: result: $CXX_LIB_SUFFIX" >&5
27953 echo "${ECHO_T}$CXX_LIB_SUFFIX" >&6
27954
27955 fi
27956
27957 # do not want -ldl in build except as needed for -lncurses dependency
27958 if test "x$with_dlsym" = xyes ; then
27959 if test "$DFT_LWR_MODEL" = shared || \
27960    test "$DFT_LWR_MODEL" = libtool ; then
27961
27962 # remove dl library from $LIBS
27963 LIBS=`echo "$LIBS" | sed -e 's/-ldl[    ]//g' -e 's/-ldl$//'`
27964
27965 fi
27966 fi
27967 ### Set up low-level terminfo dependencies for makefiles.
27968
27969 # TICS_LIST and TINFO_LIST are needed to build libtic.so and libterm.so, but
27970 # do not need libdl
27971 TICS_LIST=
27972 if test "x$with_dlsym" = xyes ; then
27973
27974 # remove dl library from $SHLIB_LIST
27975 TINFO_LIST=`echo "$SHLIB_LIST" | sed -e 's/-ldl[        ]//g' -e 's/-ldl$//'`
27976
27977 fi
27978
27979 USE_ARG_SUFFIX="${DFT_ARG_SUFFIX}${EXTRA_SUFFIX}"
27980 USE_LIB_SUFFIX="${LIB_SUFFIX}${EXTRA_SUFFIX}"
27981 USE_CFG_SUFFIX=${DFT_ARG_SUFFIX}${cf_cv_abi_version}
27982 if test -n "$EXTRA_SUFFIX" && test "x$EXTRA_SUFFIX" != "x${cf_cv_abi_version}"
27983 then
27984         USE_CFG_SUFFIX="${USE_CFG_SUFFIX}${EXTRA_SUFFIX}"
27985 fi
27986
27987 if test "$with_ticlib" != no ; then
27988
27989         if test "x$with_ticlib" != xyes ; then
27990                 TICS_NAME=$with_ticlib
27991                 TICS_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
27992                 TICS_ARG_SUFFIX="${with_ticlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27993                 TICS_DEP_SUFFIX="${with_ticlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
27994                 TICS_LIB_SUFFIX="${with_ticlib}"
27995         else
27996                 TICS_SUFFIX=${DFT_LIB_SUFFIX}
27997                 TICS_ARG_SUFFIX="${TICS_NAME}${USE_ARG_SUFFIX}"
27998                 TICS_DEP_SUFFIX="${TICS_NAME}${DFT_DEP_SUFFIX}"
27999                 TICS_LIB_SUFFIX="${TICS_NAME}${USE_LIB_SUFFIX}"
28000         fi
28001         TICS_LDFLAGS="-L${LIB_DIR}"
28002         TICS_LIBS="-l${TICS_ARG_SUFFIX}"
28003 else
28004         TICS_SUFFIX=${DFT_LIB_SUFFIX}
28005         TICS_LDFLAGS="-L${LIB_DIR}"
28006         TICS_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28007 fi
28008
28009 if test "$with_termlib" != no ; then
28010
28011         if test "x$with_termlib" != xyes ; then
28012                 TINFO_NAME=$with_termlib
28013                 TINFO_SUFFIX="`echo "${DFT_LIB_SUFFIX}" |sed -e "s/^${USE_LIB_SUFFIX}//"`"
28014                 TINFO_ARG_SUFFIX="${with_termlib}`echo "${USE_ARG_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28015                 TINFO_DEP_SUFFIX="${with_termlib}`echo "${DFT_DEP_SUFFIX}" |sed -e "s/^${LIB_SUFFIX}//"`"
28016                 TINFO_LIB_SUFFIX="${with_termlib}"
28017         else
28018                 TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28019                 TINFO_ARG_SUFFIX="${TINFO_NAME}${USE_ARG_SUFFIX}"
28020                 TINFO_DEP_SUFFIX="${TINFO_NAME}${DFT_DEP_SUFFIX}"
28021                 TINFO_LIB_SUFFIX="${TINFO_NAME}${USE_LIB_SUFFIX}"
28022         fi
28023
28024         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28025         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TINFO_DEP_SUFFIX}"
28026         if test "$DFT_LWR_MODEL" = "libtool"; then
28027                 TEST_ARGS="${TEST_DEPS}"
28028                 TEST_ARG2="${TEST_DEP2}"
28029                 TINFO_LDFLAGS="-L${LIB_DIR}"
28030                 TINFO_LIBS="$TEST_ARGS"
28031                 TICS_LIST="$SHLIB_LIST $TEST_ARGS"
28032                 SHLIB_LIST="${SHLIB_LIST} $TEST_ARGS"
28033         else
28034                 TEST_ARGS="-l${TINFO_ARG_SUFFIX}"
28035                 TEST_ARG2="-l${TINFO_ARG_SUFFIX}"
28036                 if test "x$with_term_driver" != xno ; then
28037                         TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28038                         TICS_LIBS="$TICS_LIBS -l${LIB_NAME}${USE_ARG_SUFFIX}"
28039                         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28040                 else
28041                         TICS_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28042                         TINFO_LIBS="$TEST_ARGS"
28043                 fi
28044                 TINFO_LDFLAGS="-L${LIB_DIR}"
28045                 SHLIB_LIST="$SHLIB_LIST -l${TINFO_LIB_SUFFIX}"
28046         fi
28047 else
28048         # the next lines are needed for linking libtic over libncurses
28049         TINFO_NAME=${LIB_NAME}
28050         TINFO_SUFFIX=${DFT_LIB_SUFFIX}
28051         TINFO_ARG_SUFFIX=${LIB_NAME}${USE_ARG_SUFFIX}
28052         if test "x$with_tic_depends" = xyes ; then
28053                 TICS_LIST="$SHLIB_LIST -l${LIB_NAME}${USE_ARG_SUFFIX}"
28054         else
28055                 TICS_LIST="$SHLIB_LIST"
28056         fi
28057
28058         TINFO_LDFLAGS="-L${LIB_DIR}"
28059         TINFO_LIBS="-l${LIB_NAME}${USE_ARG_SUFFIX}"
28060 fi
28061
28062 if test "$DFT_LWR_MODEL" = shared ; then
28063         case "$cf_cv_system_name" in
28064         (cygwin*|msys*)
28065                 # "lib" files have ".dll.a" suffix, "cyg"or "msys-" files have ".dll"
28066                 TINFO_SUFFIX=.dll
28067                 ;;
28068         esac
28069 fi
28070
28071 if test "x$with_dlsym" = xyes ; then
28072
28073 # remove dl library from $TICS_LIST
28074 TICS_LIST=`echo "$TICS_LIST" | sed -e 's/-ldl[  ]//g' -e 's/-ldl$//'`
28075
28076 fi
28077
28078 if test "$DFT_LWR_MODEL" = "libtool"; then
28079         OBJEXT=lo
28080 fi
28081
28082 # needed for Ada95
28083 TINFO_LDFLAGS2=`echo "$TINFO_LDFLAGS" | sed -e 's,-L\.\./,-L../../,'`
28084
28085 case "$DFT_LWR_MODEL" in
28086 (normal|debug|profile)
28087
28088 if test "$GCC" = yes ; then
28089         case "$cf_cv_system_name" in
28090         (OS/2*|os2*|aix[4]*|solaris2.1[0-9]|darwin*)
28091                 LDFLAGS_STATIC=
28092                 LDFLAGS_SHARED=
28093                 ;;
28094         (*)     # normally, except when broken
28095                 LDFLAGS_STATIC=-static
28096                 LDFLAGS_SHARED=-dynamic
28097                 ;;
28098         esac
28099 else
28100         case "$cf_cv_system_name" in
28101         (aix[4-7]*)     # from ld manpage
28102                 LDFLAGS_STATIC=-bstatic
28103                 LDFLAGS_SHARED=-bdynamic
28104                 ;;
28105         (hpux*)         # from ld manpage for hpux10.20, hpux11.11
28106                 # We could also use just "archive" and "shared".
28107                 LDFLAGS_STATIC=-Wl,-a,archive_shared
28108                 LDFLAGS_SHARED=-Wl,-a,shared_archive
28109                 ;;
28110         (irix*)         # from ld manpage IRIX64
28111                 LDFLAGS_STATIC=-Bstatic
28112                 LDFLAGS_SHARED=-Bdynamic
28113                 ;;
28114         (osf[45]*)      # from ld manpage osf4.0d, osf5.1
28115                 # alternative "-oldstyle_liblookup" (not in cc manpage)
28116                 LDFLAGS_STATIC=-noso
28117                 LDFLAGS_SHARED=-so_archive
28118                 ;;
28119         (solaris2*)
28120                 LDFLAGS_STATIC=-Bstatic
28121                 LDFLAGS_SHARED=-Bdynamic
28122                 ;;
28123         esac
28124 fi
28125
28126 if test -n "$LDFLAGS_STATIC" && test -n "$LDFLAGS_SHARED"
28127 then
28128         echo "$as_me:28128: checking if linker supports switching between static/dynamic" >&5
28129 echo $ECHO_N "checking if linker supports switching between static/dynamic... $ECHO_C" >&6
28130
28131         rm -f libconftest.a
28132         cat >conftest.$ac_ext <<EOF
28133 #line 28133 "configure"
28134 #include <stdio.h>
28135 int cf_ldflags_static(FILE *fp) { return fflush(fp); }
28136 EOF
28137         if { (eval echo "$as_me:28137: \"$ac_compile\"") >&5
28138   (eval $ac_compile) 2>&5
28139   ac_status=$?
28140   echo "$as_me:28140: \$? = $ac_status" >&5
28141   (exit "$ac_status"); } ; then
28142                 ( $AR $ARFLAGS libconftest.a conftest.o ) 2>&5 1>/dev/null
28143                 ( eval $RANLIB libconftest.a ) 2>&5 >/dev/null
28144         fi
28145         rm -f conftest.*
28146
28147         cf_save_LIBS="$LIBS"
28148
28149         LIBS="$LDFLAGS_STATIC -L`pwd` -lconftest $LDFLAGS_DYNAMIC $LIBS"
28150         cat >"conftest.$ac_ext" <<_ACEOF
28151 #line 28151 "configure"
28152 #include "confdefs.h"
28153
28154 #line 28154 "configure"
28155 #include <stdio.h>
28156 int cf_ldflags_static(FILE *fp);
28157
28158 int
28159 main (void)
28160 {
28161
28162         return cf_ldflags_static(stdin);
28163
28164   ;
28165   return 0;
28166 }
28167 _ACEOF
28168 rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28169 if { (eval echo "$as_me:28169: \"$ac_link\"") >&5
28170   (eval $ac_link) 2>&5
28171   ac_status=$?
28172   echo "$as_me:28172: \$? = $ac_status" >&5
28173   (exit "$ac_status"); } &&
28174          { ac_try='test -s "conftest$ac_exeext"'
28175   { (eval echo "$as_me:28175: \"$ac_try\"") >&5
28176   (eval $ac_try) 2>&5
28177   ac_status=$?
28178   echo "$as_me:28178: \$? = $ac_status" >&5
28179   (exit "$ac_status"); }; }; then
28180
28181         # some linkers simply ignore the -dynamic
28182         case x`file "conftest$ac_exeext" 2>/dev/null` in
28183         (*static*)
28184                 cf_ldflags_static=no
28185                 ;;
28186         (*)
28187                 cf_ldflags_static=yes
28188                 ;;
28189         esac
28190
28191 else
28192   echo "$as_me: failed program was:" >&5
28193 cat "conftest.$ac_ext" >&5
28194 cf_ldflags_static=no
28195 fi
28196 rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28197
28198         rm -f libconftest.*
28199         LIBS="$cf_save_LIBS"
28200
28201         echo "$as_me:28201: result: $cf_ldflags_static" >&5
28202 echo "${ECHO_T}$cf_ldflags_static" >&6
28203
28204         if test "$cf_ldflags_static" != yes
28205         then
28206                 LDFLAGS_STATIC=
28207                 LDFLAGS_SHARED=
28208         fi
28209 else
28210         LDFLAGS_STATIC=
28211         LDFLAGS_SHARED=
28212 fi
28213
28214         ;;
28215 esac
28216
28217 echo "$as_me:28217: checking where we will install curses.h" >&5
28218 echo $ECHO_N "checking where we will install curses.h... $ECHO_C" >&6
28219
28220 includesubdir=
28221 if test "$with_overwrite" = no && \
28222  { test "x$includedir" = 'x${prefix}/include' || \
28223    test "x$includedir" = "x${prefix}/include"; }
28224 then
28225         includesubdir="/ncurses${USE_LIB_SUFFIX}"
28226 fi
28227 echo "$as_me:28227: result: ${includedir}${includesubdir}" >&5
28228 echo "${ECHO_T}${includedir}${includesubdir}" >&6
28229
28230 ### Resolve a conflict between normal and wide-curses by forcing applications
28231 ### that will need libutf8 to add it to their configure script.
28232 if test "$with_overwrite" != no ; then
28233 if test "$NCURSES_LIBUTF8" = 1 ; then
28234         NCURSES_LIBUTF8='defined(HAVE_LIBUTF8_H)'
28235         { echo "$as_me:28235: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&5
28236 echo "$as_me: WARNING: Wide-character applications must define HAVE_LIBUTF8_H to include curses.h" >&2;}
28237 fi
28238 fi
28239 WITH_OVERWRITE=$with_overwrite
28240
28241 ### At least on MinGW a shared library build without libtool
28242 ### requires adding the additional libs to the link list.
28243 case "$cf_cv_system_name" in
28244 (*mingw32*|*mingw64*)
28245         if test "$DFT_LWR_MODEL" != "libtool"; then
28246            SHLIB_LIST="$SHLIB_LIST ${LIBS}"
28247         fi
28248         ;;
28249 *)      ;;
28250 esac
28251
28252 # used to separate tack out of the tree
28253 NCURSES_TREE=
28254
28255 ### predefined stuff for the test programs
28256
28257 cat >>confdefs.h <<\EOF
28258 #define HAVE_SLK_COLOR 1
28259 EOF
28260
28261 # pkgsrc uses these
28262
28263 echo "$as_me:28263: checking for desired basename for form library" >&5
28264 echo $ECHO_N "checking for desired basename for form library... $ECHO_C" >&6
28265
28266 # Check whether --with-form-libname or --without-form-libname was given.
28267 if test "${with_form_libname+set}" = set; then
28268   withval="$with_form_libname"
28269   with_lib_basename=$withval
28270 else
28271   with_lib_basename=form
28272 fi;
28273 FORM_NAME="$with_lib_basename"
28274
28275 case "x$FORM_NAME" in
28276 (x|xno|xnone|xyes)
28277         FORM_NAME=form
28278         ;;
28279 (*)
28280         ;;
28281 esac
28282
28283 echo "$as_me:28283: result: $FORM_NAME" >&5
28284 echo "${ECHO_T}$FORM_NAME" >&6
28285
28286 echo "$as_me:28286: checking for desired basename for menu library" >&5
28287 echo $ECHO_N "checking for desired basename for menu library... $ECHO_C" >&6
28288
28289 # Check whether --with-menu-libname or --without-menu-libname was given.
28290 if test "${with_menu_libname+set}" = set; then
28291   withval="$with_menu_libname"
28292   with_lib_basename=$withval
28293 else
28294   with_lib_basename=menu
28295 fi;
28296 MENU_NAME="$with_lib_basename"
28297
28298 case "x$MENU_NAME" in
28299 (x|xno|xnone|xyes)
28300         MENU_NAME=menu
28301         ;;
28302 (*)
28303         ;;
28304 esac
28305
28306 echo "$as_me:28306: result: $MENU_NAME" >&5
28307 echo "${ECHO_T}$MENU_NAME" >&6
28308
28309 echo "$as_me:28309: checking for desired basename for panel library" >&5
28310 echo $ECHO_N "checking for desired basename for panel library... $ECHO_C" >&6
28311
28312 # Check whether --with-panel-libname or --without-panel-libname was given.
28313 if test "${with_panel_libname+set}" = set; then
28314   withval="$with_panel_libname"
28315   with_lib_basename=$withval
28316 else
28317   with_lib_basename=panel
28318 fi;
28319 PANEL_NAME="$with_lib_basename"
28320
28321 case "x$PANEL_NAME" in
28322 (x|xno|xnone|xyes)
28323         PANEL_NAME=panel
28324         ;;
28325 (*)
28326         ;;
28327 esac
28328
28329 echo "$as_me:28329: result: $PANEL_NAME" >&5
28330 echo "${ECHO_T}$PANEL_NAME" >&6
28331
28332 echo "$as_me:28332: checking for desired basename for cxx library" >&5
28333 echo $ECHO_N "checking for desired basename for cxx library... $ECHO_C" >&6
28334
28335 # Check whether --with-cxx-libname or --without-cxx-libname was given.
28336 if test "${with_cxx_libname+set}" = set; then
28337   withval="$with_cxx_libname"
28338   with_lib_basename=$withval
28339 else
28340   with_lib_basename=ncurses++
28341 fi;
28342 CXX_NAME="$with_lib_basename"
28343
28344 case "x$CXX_NAME" in
28345 (x|xno|xnone|xyes)
28346         CXX_NAME=ncurses++
28347         ;;
28348 (*)
28349         ;;
28350 esac
28351
28352 echo "$as_me:28352: result: $CXX_NAME" >&5
28353 echo "${ECHO_T}$CXX_NAME" >&6
28354
28355 ### Construct the list of subdirectories for which we'll customize makefiles
28356 ### with the appropriate compile-rules.
28357
28358 echo "$as_me:28358: checking for src modules" >&5
28359 echo $ECHO_N "checking for src modules... $ECHO_C" >&6
28360
28361 # dependencies and linker-arguments for test-programs
28362 TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEPS"
28363 TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${LIB_NAME}${DFT_DEP_SUFFIX} $TEST_DEP2"
28364 if test "$DFT_LWR_MODEL" = "libtool"; then
28365         TEST_ARGS="${TEST_DEPS}"
28366         TEST_ARG2="${TEST_DEP2}"
28367 else
28368         TEST_ARGS="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARGS"
28369         TEST_ARG2="-l${LIB_NAME}${USE_ARG_SUFFIX} $TEST_ARG2"
28370 fi
28371
28372 PC_MODULES_TO_MAKE="ncurses${USE_ARG_SUFFIX}"
28373 cf_cv_src_modules=
28374 for cf_dir in $modules_to_build
28375 do
28376         if test -f "$srcdir/$cf_dir/modules" ; then
28377
28378                 # We may/may not have tack in the distribution, though the
28379                 # makefile is.
28380                 if test "$cf_dir" = tack ; then
28381                         if test "x$cf_with_tack" != "xyes"; then
28382                                 continue
28383                         fi
28384                 fi
28385
28386                 if test -z "$cf_cv_src_modules"; then
28387                         cf_cv_src_modules=$cf_dir
28388                 else
28389                         cf_cv_src_modules="$cf_cv_src_modules $cf_dir"
28390                 fi
28391
28392                 # Make the ncurses_cfg.h file record the library interface files as
28393                 # well.  These are header files that are the same name as their
28394                 # directory.  Ncurses is the only library that does not follow
28395                 # that pattern.
28396                 if test "$cf_dir" = tack ; then
28397                         continue
28398                 elif test -f "$srcdir/${cf_dir}/${cf_dir}.h" ; then
28399
28400 cf_have_include=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28401
28402                         cat >>confdefs.h <<EOF
28403 #define HAVE_${cf_have_include}_H 1
28404 EOF
28405
28406                         cat >>confdefs.h <<EOF
28407 #define HAVE_LIB${cf_have_include} 1
28408 EOF
28409
28410 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28411
28412 eval TEST_ROOT="\$${cf_map_lib_basename}_NAME"
28413
28414                         TEST_DEPS="${LIB_DIR}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEPS"
28415                         TEST_DEP2="${LIB_2ND}/${LIB_PREFIX}${TEST_ROOT}${DFT_DEP_SUFFIX} $TEST_DEP2"
28416                         if test "$DFT_LWR_MODEL" = "libtool"; then
28417                                 TEST_ARGS="${TEST_DEPS}"
28418                                 TEST_ARG2="${TEST_DEP2}"
28419                         else
28420                                 TEST_ARGS="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARGS"
28421                                 TEST_ARG2="-l${TEST_ROOT}${USE_ARG_SUFFIX} $TEST_ARG2"
28422                         fi
28423                         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ${cf_dir}${USE_ARG_SUFFIX}"
28424                 fi
28425         fi
28426 done
28427 echo "$as_me:28427: result: $cf_cv_src_modules" >&5
28428 echo "${ECHO_T}$cf_cv_src_modules" >&6
28429
28430 TEST_ARGS="-L${LIB_DIR} $TEST_ARGS"
28431 TEST_ARG2="-L${LIB_2ND} $TEST_ARG2"
28432
28433 SRC_SUBDIRS=
28434 if test "x$cf_with_manpages" != xno ; then
28435         SRC_SUBDIRS="$SRC_SUBDIRS man"
28436 fi
28437 SRC_SUBDIRS="$SRC_SUBDIRS include"
28438 for cf_dir in $cf_cv_src_modules
28439 do
28440         SRC_SUBDIRS="$SRC_SUBDIRS $cf_dir"
28441 done
28442 if test "x$cf_with_tests" != "xno" ; then
28443         SRC_SUBDIRS="$SRC_SUBDIRS test"
28444 fi
28445 # always make this, to install the ncurses-config script
28446 SRC_SUBDIRS="$SRC_SUBDIRS misc"
28447 if test "$cf_with_cxx_binding" != no; then
28448         PC_MODULES_TO_MAKE="${PC_MODULES_TO_MAKE} ncurses++${USE_ARG_SUFFIX}"
28449         SRC_SUBDIRS="$SRC_SUBDIRS c++"
28450 fi
28451
28452 test "x$with_termlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TINFO_ARG_SUFFIX"
28453 test "x$with_ticlib" != xno && PC_MODULES_TO_MAKE="$PC_MODULES_TO_MAKE $TICS_ARG_SUFFIX"
28454
28455 ADA_SUBDIRS=
28456 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = xyes && test -f "$srcdir/Ada95/Makefile.in" ; then
28457         SRC_SUBDIRS="$SRC_SUBDIRS Ada95"
28458         ADA_SUBDIRS="gen src"
28459         if test "x$cf_with_tests" != "xno" ; then
28460                 ADA_SUBDIRS="$ADA_SUBDIRS samples"
28461         fi
28462 fi
28463
28464 SUB_MAKEFILES=
28465 for cf_dir in $SRC_SUBDIRS
28466 do
28467         SUB_MAKEFILES="$SUB_MAKEFILES $cf_dir/Makefile"
28468 done
28469
28470 if test -n "$ADA_SUBDIRS"; then
28471         for cf_dir in $ADA_SUBDIRS
28472         do
28473                 SUB_MAKEFILES="$SUB_MAKEFILES Ada95/$cf_dir/Makefile"
28474         done
28475
28476 fi
28477
28478 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
28479    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/src/library.gpr:Ada95/src/library.gpr.in"
28480    SUB_MAKEFILES="$SUB_MAKEFILES Ada95/gen/adacurses${USE_CFG_SUFFIX}-config:Ada95/gen/adacurses-config.in"
28481    SUB_MAKEFILES="$SUB_MAKEFILES man/adacurses${USE_CFG_SUFFIX}-config.1:man/MKada_config.in"
28482 fi
28483
28484 DIRS_TO_MAKE="lib"
28485 for cf_item in $cf_list_models
28486 do
28487
28488         case $cf_item in
28489         (libtool) cf_subdir='obj_lo'  ;;
28490         (normal)  cf_subdir='objects' ;;
28491         (debug)   cf_subdir='obj_g' ;;
28492         (profile) cf_subdir='obj_p' ;;
28493         (shared)
28494                 case "$cf_cv_system_name" in
28495                 (cygwin|msys)
28496                         cf_subdir='objects' ;;
28497                 (*)
28498                         cf_subdir='obj_s' ;;
28499                 esac
28500         esac
28501
28502         for cf_item2 in $DIRS_TO_MAKE
28503         do
28504                 test "$cf_item2" = "$cf_subdir" && break
28505         done
28506         test ".$cf_item2" != ".$cf_subdir" && DIRS_TO_MAKE="$DIRS_TO_MAKE $cf_subdir"
28507 done
28508 for cf_dir in $DIRS_TO_MAKE
28509 do
28510         test ! -d "$cf_dir" && mkdir "$cf_dir"
28511 done
28512
28513 # symbols that differ when compiling Ada95 by itself.
28514 NCURSES_SHLIB2=$SHELL' $(top_srcdir)/misc/shlib'
28515
28516 # values to use as strings
28517
28518 cat >>confdefs.h <<EOF
28519 #define NCURSES_PATHSEP '$PATH_SEPARATOR'
28520 EOF
28521
28522 cat >>confdefs.h <<EOF
28523 #define NCURSES_VERSION_STRING "${NCURSES_MAJOR}.${NCURSES_MINOR}.${NCURSES_PATCH}"
28524 EOF
28525
28526 ### Define substitutions for header files to avoid name-pollution
28527
28528 if test "x$cf_cv_have_tcgetattr" = xyes ; then
28529         HAVE_TCGETATTR=1
28530 else
28531         HAVE_TCGETATTR=0
28532 fi
28533
28534 if test "x$ac_cv_header_stdint_h" = xyes ; then
28535         HAVE_STDINT_H=1
28536 else
28537         HAVE_STDINT_H=0
28538 fi
28539
28540 if test "x$ac_cv_header_termio_h" = xyes ; then
28541         HAVE_TERMIO_H=1
28542 else
28543         HAVE_TERMIO_H=0
28544 fi
28545
28546 if test "x$ac_cv_header_termios_h" = xyes ; then
28547         HAVE_TERMIOS_H=1
28548 else
28549         HAVE_TERMIOS_H=0
28550 fi
28551
28552 ################################################################################
28553 test "x$use_database" = xyes && \
28554 SUB_MAKEFILES="$SUB_MAKEFILES misc/run_tic.sh:misc/run_tic.in"
28555
28556 SUB_MAKEFILES="$SUB_MAKEFILES misc/ncurses-config:misc/ncurses-config.in"
28557 SUB_MAKEFILES="$SUB_MAKEFILES man/ncurses${USE_CFG_SUFFIX}-config.1:man/MKncu_config.in"
28558
28559 if test "x$enable_pc_files" = xyes && test -z "$MAKE_PC_FILES" ; then
28560 SUB_MAKEFILES="$SUB_MAKEFILES misc/gen-pkgconfig:misc/gen-pkgconfig.in"
28561 fi
28562
28563 if test "x$cf_with_tests" != xno ; then
28564         MAKE_TESTS=
28565 else
28566         MAKE_TESTS="#"
28567 fi
28568
28569 ADAHTML_DIR=../../doc/html/ada
28570
28571 # workaround for OS/2 (20151017)
28572 case "$cf_cv_system_name" in
28573 (os2*)
28574         LIBTOOL_OPTS_CXX="-os2dllname ncurs++"
28575         ;;
28576 (*)
28577         LIBTOOL_OPTS_CXX=
28578         ;;
28579 esac
28580
28581 # workaround for g++ versus Solaris (20131116)
28582 case "$cf_cv_system_name" in
28583 (solaris2*)
28584         case "x$CPPFLAGS" in
28585         (*-D_XOPEN_SOURCE_EXTENDED*)
28586                 test -n "$verbose" && echo "    moving _XOPEN_SOURCE_EXTENDED to work around g++ problem" 1>&6
28587
28588 echo "${as_me:-configure}:28588: testing moving _XOPEN_SOURCE_EXTENDED to work around g++ problem ..." 1>&5
28589
28590                 CFLAGS="$CFLAGS -D_XOPEN_SOURCE_EXTENDED"
28591                 CPPFLAGS=`echo "x$CPPFLAGS" | sed -e  's/^.//' -e 's/-D_XOPEN_SOURCE_EXTENDED//'`
28592                 ;;
28593         esac
28594         ;;
28595 esac
28596
28597 # Help to automatically enable the extended curses features when using either
28598 # the *-config or the ".pc" files by adding defines.
28599 echo "$as_me:28599: checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script" >&5
28600 echo $ECHO_N "checking for defines to add to ncurses${USE_CFG_SUFFIX}-config script... $ECHO_C" >&6
28601 PKG_CFLAGS=
28602 for cf_loop1 in $CPPFLAGS_after_XOPEN
28603 do
28604         cf_found=no
28605         for cf_loop2 in $CPPFLAGS_before_XOPEN
28606         do
28607                 if test "x$cf_loop1" = "x$cf_loop2"
28608                 then
28609                         cf_found=yes
28610                         break
28611                 fi
28612         done
28613         test "$cf_found" = no && PKG_CFLAGS="$PKG_CFLAGS $cf_loop1"
28614 done
28615 echo "$as_me:28615: result: $PKG_CFLAGS" >&5
28616 echo "${ECHO_T}$PKG_CFLAGS" >&6
28617
28618 # AC_CHECK_SIZEOF demands a literal parameter, no variables.  So we do this.
28619 case "x$NCURSES_OSPEED" in
28620 (*short*)
28621         cf_compatible=1
28622         ;;
28623 (*)
28624         cf_compatible=0
28625         ;;
28626 esac
28627
28628 cat >>confdefs.h <<EOF
28629 #define NCURSES_OSPEED_COMPAT $cf_compatible
28630 EOF
28631
28632 case "x$cf_cv_typeof_chtype" in
28633 (xshort|xint|xlong)
28634         cf_cv_typeof_chtype="unsigned $cf_cv_typeof_chtype"
28635         ;;
28636 esac
28637
28638 case "x$cf_cv_typeof_mmask_t" in
28639 (xshort|xint|xlong)
28640         cf_cv_typeof_mmask_t="unsigned $cf_cv_typeof_mmask_t"
28641         ;;
28642 esac
28643
28644 # substitute into misc/Makefile to suppress
28645 # (un)install.data from the
28646 # (un)install rules.
28647 if test "x$cf_with_db_install" = "xno"; then
28648         MISC_INSTALL_DATA=
28649         MISC_UNINSTALL_DATA=
28650 else
28651         MISC_INSTALL_DATA=install.data
28652         MISC_UNINSTALL_DATA=uninstall.data
28653 fi
28654
28655 if test "x$cf_with_db_install" = "xno" || test "x$TERMINFO_SRC" = "xno"; then
28656         MAKE_DATABASE="#"
28657 else
28658         MAKE_DATABASE="$MAKE_TERMINFO"
28659 fi
28660
28661 if test -n "$PACKAGE"
28662 then
28663         PACKAGE="${PACKAGE}${DFT_ARG_SUFFIX}"
28664         export PACKAGE
28665         echo "package: $PACKAGE"
28666 fi
28667
28668 UNALTERED_SYMS=
28669 cf_filter_syms=no
28670
28671 if test -n "$RESULTING_SYMS"
28672 then
28673         cf_filter_syms=$cf_dft_filter_syms
28674         test -n "$verbose" && echo "    will map symbols to ABI=$cf_cv_abi_version" 1>&6
28675
28676 echo "${as_me:-configure}:28676: testing will map symbols to ABI=$cf_cv_abi_version ..." 1>&5
28677
28678 fi
28679
28680 if test "x$WILDCARD_SYMS" = xno
28681 then
28682         cf_filter_syms=yes
28683 fi
28684
28685 test "x$cf_with_trace" = xyes && NCURSES_INLINE=
28686
28687 UNALTERED_SYMS=`echo "$RESULTING_SYMS" | sed -e 's/\\$/\\\\$/g'`
28688 if test "$cf_filter_syms" = yes
28689 then
28690         RESULTING_SYMS=resulting.map
28691 fi
28692
28693 if test "x$cross_compiling" = xyes ; then
28694         ADAGEN_LDFLAGS='$(CROSS_LDFLAGS)'
28695         CHECK_BUILD="#"
28696 else
28697         ADAGEN_LDFLAGS='$(NATIVE_LDFLAGS)'
28698         CHECK_BUILD=
28699 fi
28700
28701 # This is used for the *-config script and *.pc data files.
28702
28703 echo "$as_me:28703: checking for linker search path" >&5
28704 echo $ECHO_N "checking for linker search path... $ECHO_C" >&6
28705 if test "${cf_cv_ld_searchpath+set}" = set; then
28706   echo $ECHO_N "(cached) $ECHO_C" >&6
28707 else
28708
28709 if test "$cross_compiling" != yes ; then
28710
28711 # GNU binutils' ld does not involve permissions which may stop ldconfig.
28712 cf_pathlist=`ld --verbose 2>/dev/null | grep SEARCH_DIR | sed -e 's,SEARCH_DIR[("=][("=]*,,g' -e 's/"[)];//gp' | sort -u`
28713
28714 # The -NX options tell newer versions of Linux ldconfig to not attempt to
28715 # update the cache, which makes it run faster.
28716 test -z "$cf_pathlist" && \
28717         cf_pathlist=`(ldconfig -NX -v) 2>/dev/null | sed -e '/^[        ]/d' -e 's/:$//' | sort -u`
28718
28719 test -z "$cf_pathlist" &&
28720         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e '/^[         ]/d' -e 's/:$//p' | sort -u`
28721
28722 # This works with OpenBSD 6.5, which lists only filenames
28723 test -z "$cf_pathlist" &&
28724         cf_pathlist=`(ldconfig -v) 2>/dev/null | sed -n -e 's,^Adding \(.*\)/.*$,\1,p' | sort -u`
28725
28726 if test -z "$cf_pathlist"
28727 then
28728         # dyld default path with MacOS
28729         if test -f /usr/bin/otool && test "x`uname -s`" = xDarwin
28730         then
28731                 # do this to bypass check
28732                 cf_cv_ld_searchpath='$HOME/lib'
28733                 cf_pathlist="/usr/local/lib /lib /usr/lib"
28734         fi
28735 fi
28736
28737 if test -z "$cf_pathlist"
28738 then
28739         # Solaris is "SunOS"
28740         if test -f /usr/bin/isainfo && test "x`uname -s`" = xSunOS
28741         then
28742                 case x`(isainfo -b)` in
28743                 (x64)
28744                         cf_pathlist="$cf_pathlist /lib/64 /usr/lib/64"
28745                         ;;
28746                 (x32)
28747                         test -d /usr/ccs/lib && cf_pathlist="$cf_pathlist /usr/ccs/lib"
28748                         cf_pathlist="$cf_pathlist /lib /usr/lib"
28749                         ;;
28750                 (*)
28751                         { echo "$as_me:28751: WARNING: problem with Solaris architecture" >&5
28752 echo "$as_me: WARNING: problem with Solaris architecture" >&2;}
28753                         ;;
28754                 esac
28755         fi
28756 fi
28757
28758 if test -z "$cf_pathlist"
28759 then
28760         # HP-UX
28761         if test x"`uname -s`" = xHP-UX
28762         then
28763                 case x`getconf LONG_BIT` in
28764                 (x64)
28765                         cf_pathlist="/usr/lib/hpux64"
28766                         ;;
28767                 (x*)
28768                         cf_pathlist="/usr/lib/hpux32"
28769                         ;;
28770                 esac
28771         fi
28772 fi
28773
28774 fi
28775
28776 # If nothing else, assume it is conventional
28777 test -z "$cf_pathlist" && cf_pathlist="/usr/lib /lib"
28778
28779 # Finally, check that this is only directories
28780 for cf_path in $0 $cf_pathlist
28781 do
28782         if test -d "$cf_path"; then
28783                 test -n "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath="${cf_cv_ld_searchpath} "
28784                 cf_cv_ld_searchpath="${cf_cv_ld_searchpath}${cf_path}"
28785         fi
28786 done
28787
28788 # Ensure that it is nonempty
28789 test -z "$cf_cv_ld_searchpath" && cf_cv_ld_searchpath=/usr/lib
28790
28791 fi
28792 echo "$as_me:28792: result: $cf_cv_ld_searchpath" >&5
28793 echo "${ECHO_T}$cf_cv_ld_searchpath" >&6
28794
28795 LD_SEARCHPATH=`echo "$cf_cv_ld_searchpath"|sed -e 's/ /|/g'`
28796
28797 cat >>confdefs.h <<\EOF
28798 #define HAVE_CURSES_DATA_BOOLNAMES 1
28799 EOF
28800
28801 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 $SUB_MAKEFILES Makefile"
28802 ac_config_commands="$ac_config_commands default"
28803 cat >confcache <<\_ACEOF
28804 # This file is a shell script that caches the results of configure
28805 # tests run on this system so they can be shared between configure
28806 # scripts and configure runs, see configure's option --config-cache.
28807 # It is not useful on other systems.  If it contains results you don't
28808 # want to keep, you may remove or edit it.
28809 #
28810 # config.status only pays attention to the cache file if you give it
28811 # the --recheck option to rerun configure.
28812 #
28813 # `ac_cv_env_foo' variables (set or unset) will be overriden when
28814 # loading this file, other *unset* `ac_cv_foo' will be assigned the
28815 # following values.
28816
28817 _ACEOF
28818
28819 # The following way of writing the cache mishandles newlines in values,
28820 # but we know of no workaround that is simple, portable, and efficient.
28821 # So, don't put newlines in cache variables' values.
28822 # Ultrix sh set writes to stderr and can't be redirected directly,
28823 # and sets the high bit in the cache file unless we assign to the vars.
28824 {
28825   (set) 2>&1 |
28826     case `(ac_space=' '; set | grep ac_space) 2>&1` in
28827     *ac_space=\ *)
28828       # `set' does not quote correctly, so add quotes (double-quote
28829       # substitution turns \\\\ into \\, and sed turns \\ into \).
28830       sed -n \
28831         "s/'/'\\\\''/g;
28832           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
28833       ;;
28834     *)
28835       # `set' quotes correctly as required by POSIX, so do not add quotes.
28836       sed -n \
28837         "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
28838       ;;
28839     esac;
28840 } |
28841   sed '
28842      t clear
28843      : clear
28844      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
28845      t end
28846      /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
28847      : end' >>confcache
28848 if cmp -s $cache_file confcache; then :; else
28849   if test -w $cache_file; then
28850     test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
28851     cat confcache >$cache_file
28852   else
28853     echo "not updating unwritable cache $cache_file"
28854   fi
28855 fi
28856 rm -f confcache
28857
28858 test "x$prefix" = xNONE && prefix=$ac_default_prefix
28859 # Let make expand exec_prefix.
28860 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
28861
28862 # VPATH may cause trouble with some makes, so we remove $(srcdir),
28863 # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28864 # trailing colons and then remove the whole line if VPATH becomes empty
28865 # (actually we leave an empty line to preserve line numbers).
28866 if test "x$srcdir" = x.; then
28867   ac_vpsub='/^[         ]*VPATH[        ]*=/{
28868 s/:*\$(srcdir):*/:/;
28869 s/:*\${srcdir}:*/:/;
28870 s/:*@srcdir@:*/:/;
28871 s/^\([^=]*=[    ]*\):*/\1/;
28872 s/:*$//;
28873 s/^[^=]*=[      ]*$//;
28874 }'
28875 fi
28876
28877 DEFS=-DHAVE_CONFIG_H
28878
28879 : "${CONFIG_STATUS=./config.status}"
28880 ac_clean_files_save=$ac_clean_files
28881 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
28882 { echo "$as_me:28882: creating $CONFIG_STATUS" >&5
28883 echo "$as_me: creating $CONFIG_STATUS" >&6;}
28884 cat >"$CONFIG_STATUS" <<_ACEOF
28885 #! $SHELL
28886 # Generated automatically by configure.
28887 # Run this file to recreate the current configuration.
28888 # Compiler output produced by configure, useful for debugging
28889 # configure, is in config.log if it exists.
28890
28891 debug=false
28892 SHELL=\${CONFIG_SHELL-$SHELL}
28893 ac_cs_invocation="\$0 \$@"
28894
28895 CLICOLOR_FORCE= GREP_OPTIONS=
28896 unset CLICOLOR_FORCE GREP_OPTIONS
28897 _ACEOF
28898
28899 cat >>"$CONFIG_STATUS" <<\_ACEOF
28900 # Be Bourne compatible
28901 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
28902   emulate sh
28903   NULLCMD=:
28904 elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28905   set -o posix
28906 fi
28907
28908 # Name of the executable.
28909 as_me=`echo "$0" |sed 's,.*[\\/],,'`
28910
28911 if expr a : '\(a\)' >/dev/null 2>&1; then
28912   as_expr=expr
28913 else
28914   as_expr=false
28915 fi
28916
28917 rm -f conf$$ conf$$.exe conf$$.file
28918 echo >conf$$.file
28919 if ln -s conf$$.file conf$$ 2>/dev/null; then
28920   # We could just check for DJGPP; but this test a) works b) is more generic
28921   # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
28922   if test -f conf$$.exe; then
28923     # Don't use ln at all; we don't have any links
28924     as_ln_s='cp -p'
28925   else
28926     as_ln_s='ln -s'
28927   fi
28928 elif ln conf$$.file conf$$ 2>/dev/null; then
28929   as_ln_s=ln
28930 else
28931   as_ln_s='cp -p'
28932 fi
28933 rm -f conf$$ conf$$.exe conf$$.file
28934
28935 as_executable_p="test -f"
28936
28937 # Support unset when possible.
28938 if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
28939   as_unset="unset"
28940 else
28941   as_unset="false"
28942 fi
28943
28944 # NLS nuisances.
28945 $as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
28946 $as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
28947 $as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
28948 $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
28949 $as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
28950 $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
28951 $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
28952 $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
28953
28954 # IFS
28955 # We need space, tab and new line, in precisely that order.
28956 as_nl='
28957 '
28958 IFS="   $as_nl"
28959
28960 # CDPATH.
28961 $as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
28962
28963 exec 6>&1
28964
28965 _ACEOF
28966
28967 # Files that config.status was made for.
28968 if test -n "$ac_config_files"; then
28969   echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
28970 fi
28971
28972 if test -n "$ac_config_headers"; then
28973   echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
28974 fi
28975
28976 if test -n "$ac_config_links"; then
28977   echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
28978 fi
28979
28980 if test -n "$ac_config_commands"; then
28981   echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
28982 fi
28983
28984 cat >>"$CONFIG_STATUS" <<\EOF
28985
28986 ac_cs_usage="\
28987 \`$as_me' instantiates files from templates according to the
28988 current configuration.
28989
28990 Usage: $0 [OPTIONS] [FILE]...
28991
28992   -h, --help       print this help, then exit
28993   -V, --version    print version number, then exit
28994   -d, --debug      don't remove temporary files
28995       --recheck    update $as_me by reconfiguring in the same conditions
28996   --file=FILE[:TEMPLATE]
28997                    instantiate the configuration file FILE
28998   --header=FILE[:TEMPLATE]
28999                    instantiate the configuration header FILE
29000
29001 Configuration files:
29002 $config_files
29003
29004 Configuration headers:
29005 $config_headers
29006
29007 Configuration commands:
29008 $config_commands
29009
29010 Report bugs to <dickey@invisible-island.net>."
29011 EOF
29012
29013 cat >>"$CONFIG_STATUS" <<EOF
29014 ac_cs_version="\\
29015 config.status
29016 configured by $0, generated by GNU Autoconf 2.52.20210509,
29017   with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
29018
29019 Copyright 2003-2020,2021        Thomas E. Dickey
29020 Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
29021 Free Software Foundation, Inc.
29022 This config.status script is free software; the Free Software Foundation
29023 gives unlimited permission to copy, distribute and modify it."
29024 srcdir="$srcdir"
29025 INSTALL="$INSTALL"
29026 EOF
29027
29028 cat >>"$CONFIG_STATUS" <<\EOF
29029 # If no file are specified by the user, then we need to provide default
29030 # value.  By we need to know if files were specified by the user.
29031 ac_need_defaults=:
29032 while test $# != 0
29033 do
29034   case $1 in
29035   --*=*)
29036     ac_option=`expr "x$1" : 'x\([^=]*\)='`
29037     ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
29038     shift
29039     set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
29040     shift
29041     ;;
29042   -*);;
29043   *) # This is not an option, so the user has probably given explicit
29044      # arguments.
29045      ac_need_defaults=false;;
29046   esac
29047
29048   case $1 in
29049   # Handling of the options.
29050 EOF
29051 cat >>"$CONFIG_STATUS" <<EOF
29052   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
29053     echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
29054     exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
29055 EOF
29056 cat >>"$CONFIG_STATUS" <<\EOF
29057   --version | --vers* | -V )
29058     echo "$ac_cs_version"; exit 0 ;;
29059   --he | --h)
29060     # Conflict between --help and --header
29061     { { echo "$as_me:29061: error: ambiguous option: $1
29062 Try \`$0 --help' for more information." >&5
29063 echo "$as_me: error: ambiguous option: $1
29064 Try \`$0 --help' for more information." >&2;}
29065    { (exit 1); exit 1; }; };;
29066   --help | --hel | -h )
29067     echo "$ac_cs_usage"; exit 0 ;;
29068   --debug | --d* | -d )
29069     debug=: ;;
29070   --file | --fil | --fi | --f )
29071     shift
29072     CONFIG_FILES="$CONFIG_FILES $1"
29073     ac_need_defaults=false;;
29074   --header | --heade | --head | --hea )
29075     shift
29076     CONFIG_HEADERS="$CONFIG_HEADERS $1"
29077     ac_need_defaults=false;;
29078
29079   # This is an error.
29080   -*) { { echo "$as_me:29080: error: unrecognized option: $1
29081 Try \`$0 --help' for more information." >&5
29082 echo "$as_me: error: unrecognized option: $1
29083 Try \`$0 --help' for more information." >&2;}
29084    { (exit 1); exit 1; }; } ;;
29085
29086   *) ac_config_targets="$ac_config_targets $1" ;;
29087
29088   esac
29089   shift
29090 done
29091
29092 exec 5>>config.log
29093 cat >&5 << _ACEOF
29094
29095 ## ----------------------- ##
29096 ## Running config.status.  ##
29097 ## ----------------------- ##
29098
29099 This file was extended by $as_me 2.52.20210509, executed with
29100   CONFIG_FILES    = $CONFIG_FILES
29101   CONFIG_HEADERS  = $CONFIG_HEADERS
29102   CONFIG_LINKS    = $CONFIG_LINKS
29103   CONFIG_COMMANDS = $CONFIG_COMMANDS
29104   > "$ac_cs_invocation"
29105 on `(hostname || uname -n) 2>/dev/null | sed 1q`
29106
29107 _ACEOF
29108 EOF
29109
29110 cat >>"$CONFIG_STATUS" <<EOF
29111 #
29112 # INIT-COMMANDS section.
29113 #
29114
29115 ### Special initialization commands, used to pass information from the
29116 ### configuration-run into config.status
29117
29118 ALTERNATE_SYMS="$ALTERNATE_SYMS"
29119 AWK="$AWK"
29120 CXX_NAME="$CXX_NAME"
29121 DFT_ARG_SUFFIX="$DFT_ARG_SUFFIX"
29122 DFT_LWR_MODEL="$DFT_LWR_MODEL"
29123 ECHO_LD="$ECHO_LD"
29124 EXTRA_SUFFIX="$EXTRA_SUFFIX"
29125 FORM_NAME="$FORM_NAME"
29126 LDCONFIG="$LDCONFIG"
29127 LIBTOOL_VERSION="$LIBTOOL_VERSION"
29128 LIB_NAME="$LIB_NAME"
29129 LIB_PREFIX="$LIB_PREFIX"
29130 LIB_SUBSETS="$LIB_SUBSETS"
29131 LIB_SUFFIX="$LIB_SUFFIX"
29132 LIB_TRACING="$LIB_TRACING"
29133 LN_S="$LN_S"
29134 MAKE_TERMINFO="$MAKE_TERMINFO"
29135 MENU_NAME="$MENU_NAME"
29136 NCURSES_MAJOR="$NCURSES_MAJOR"
29137 NCURSES_MINOR="$NCURSES_MINOR"
29138 NCURSES_OSPEED="$NCURSES_OSPEED"
29139 NCURSES_PATCH="$NCURSES_PATCH"
29140 PANEL_NAME="$PANEL_NAME"
29141 SRC_SUBDIRS="$SRC_SUBDIRS"
29142 TERMINFO="$TERMINFO"
29143 TICS_ARG_SUFFIX="$TICS_ARG_SUFFIX"
29144 TICS_LIB_SUFFIX="$TICS_LIB_SUFFIX"
29145 TICS_NAME="$TICS_NAME"
29146 TICS_SUFFIX="$TICS_SUFFIX"
29147 TIC_PATH="$TIC_PATH"
29148 TINFO_ARG_SUFFIX="$TINFO_ARG_SUFFIX"
29149 TINFO_LIB_SUFFIX="$TINFO_LIB_SUFFIX"
29150 TINFO_NAME="$TINFO_NAME"
29151 TINFO_SUFFIX="$TINFO_SUFFIX"
29152 UNALTERED_SYMS="$UNALTERED_SYMS"
29153 USE_ARG_SUFFIX="$USE_ARG_SUFFIX"
29154 USE_CFG_SUFFIX="$USE_CFG_SUFFIX"
29155 USE_LIB_SUFFIX="$USE_LIB_SUFFIX"
29156 USE_OLD_MAKERULES="$USE_OLD_MAKERULES"
29157 WILDCARD_SYMS="$WILDCARD_SYMS"
29158 WITH_CURSES_H="$with_curses_h"
29159 WITH_ECHO="${enable_echo:=yes}"
29160 WITH_OVERWRITE="$with_overwrite"
29161 cf_LIST_MODELS="$cf_list_models"
29162 cf_cv_VERSION_GNATMAKE=$cf_cv_VERSION_GNATMAKE
29163 cf_cv_VERSION_GPRBUILD=$cf_cv_VERSION_GPRBUILD
29164 cf_cv_abi_version="$cf_cv_abi_version"
29165 cf_cv_do_relink="$cf_cv_do_relink"
29166 cf_cv_do_reranlib="$cf_cv_do_reranlib"
29167 cf_cv_do_symlinks="$cf_cv_do_symlinks"
29168 cf_cv_enable_lp64="$cf_cv_enable_lp64"
29169 cf_cv_enable_opaque="$cf_cv_enable_opaque"
29170 cf_cv_make_PHONY="$cf_cv_make_PHONY"
29171 cf_cv_prog_CC_c_o=$cf_cv_prog_CC_c_o
29172 cf_cv_prog_CXX_c_o=$cf_cv_prog_CXX_c_o
29173 cf_cv_prog_gnat_correct=$cf_cv_prog_gnat_correct
29174 cf_cv_rel_version="$cf_cv_rel_version"
29175 cf_cv_rm_so_locs="$cf_cv_rm_so_locs"
29176 cf_cv_shared_soname='$cf_cv_shared_soname'
29177 cf_cv_shlib_version="$cf_cv_shlib_version"
29178 cf_cv_shlib_version_infix="$cf_cv_shlib_version_infix"
29179 cf_cv_system_name="$cf_cv_system_name"
29180 cf_cv_term_driver="$with_term_driver"
29181 cf_with_ada="$cf_with_ada"
29182 cf_with_cxx_binding="$cf_with_cxx_binding"
29183 cf_with_db_install="$cf_with_db_install"
29184 cf_with_manpages="$cf_with_manpages"
29185 cf_with_tests="$cf_with_tests"
29186 host="$host"
29187 target="$target"
29188 with_shared_cxx="$with_shared_cxx"
29189
29190 EOF
29191
29192 cat >>"$CONFIG_STATUS" <<\EOF
29193 for ac_config_target in $ac_config_targets
29194 do
29195   case "$ac_config_target" in
29196   # Handling of arguments.
29197   "include/MKterm.h.awk" ) CONFIG_FILES="$CONFIG_FILES include/MKterm.h.awk" ;;
29198   "include/curses.head" ) CONFIG_FILES="$CONFIG_FILES include/curses.head:include/curses.h.in" ;;
29199   "include/ncurses_dll.h" ) CONFIG_FILES="$CONFIG_FILES include/ncurses_dll.h" ;;
29200   "include/termcap.h" ) CONFIG_FILES="$CONFIG_FILES include/termcap.h" ;;
29201   "include/unctrl.h" ) CONFIG_FILES="$CONFIG_FILES include/unctrl.h" ;;
29202   "$SUB_MAKEFILES" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILES" ;;
29203   "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
29204   "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
29205   "include/ncurses_cfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/ncurses_cfg.h:include/ncurses_cfg.hin" ;;
29206   *) { { echo "$as_me:29206: error: invalid argument: $ac_config_target" >&5
29207 echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
29208    { (exit 1); exit 1; }; };;
29209   esac
29210 done
29211
29212 # If the user did not use the arguments to specify the items to instantiate,
29213 # then the envvar interface is used.  Set only those that are not.
29214 # We use the long form for the default assignment because of an extremely
29215 # bizarre bug on SunOS 4.1.3.
29216 if "$ac_need_defaults"; then
29217   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
29218   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
29219   test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
29220 fi
29221
29222 # Create a temporary directory, and hook for its removal unless debugging.
29223 $debug ||
29224 {
29225   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
29226   trap '{ (exit 1); exit 1; }' 1 2 13 15
29227 }
29228
29229 # Create a (secure) tmp directory for tmp files.
29230 : ${TMPDIR=/tmp}
29231 {
29232   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
29233   test -n "$tmp" && test -d "$tmp"
29234 }  ||
29235 {
29236   tmp=$TMPDIR/cs$$-$RANDOM
29237   (umask 077 && mkdir $tmp)
29238 } ||
29239 {
29240    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
29241    { (exit 1); exit 1; }
29242 }
29243
29244 EOF
29245
29246 cat >>"$CONFIG_STATUS" <<EOF
29247
29248 #
29249 # CONFIG_FILES section.
29250 #
29251
29252 # No need to generate the scripts if there are no CONFIG_FILES.
29253 # This happens for instance when ./config.status config.h
29254 if test -n "\$CONFIG_FILES"; then
29255   # Protect against being on the right side of a sed subst in config.status.
29256   sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
29257    s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
29258 s,@SHELL@,$SHELL,;t t
29259 s,@exec_prefix@,$exec_prefix,;t t
29260 s,@prefix@,$prefix,;t t
29261 s,@program_transform_name@,$program_transform_name,;t t
29262 s,@bindir@,$bindir,;t t
29263 s,@sbindir@,$sbindir,;t t
29264 s,@libexecdir@,$libexecdir,;t t
29265 s,@datarootdir@,$datarootdir,;t t
29266 s,@datadir@,$datadir,;t t
29267 s,@sysconfdir@,$sysconfdir,;t t
29268 s,@sharedstatedir@,$sharedstatedir,;t t
29269 s,@localstatedir@,$localstatedir,;t t
29270 s,@runstatedir@,$runstatedir,;t t
29271 s,@libdir@,$libdir,;t t
29272 s,@includedir@,$includedir,;t t
29273 s,@oldincludedir@,$oldincludedir,;t t
29274 s,@infodir@,$infodir,;t t
29275 s,@mandir@,$mandir,;t t
29276 s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
29277 s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
29278 s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
29279 s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
29280 s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
29281 s,@build_alias@,$build_alias,;t t
29282 s,@host_alias@,$host_alias,;t t
29283 s,@target_alias@,$target_alias,;t t
29284 s,@ECHO_C@,$ECHO_C,;t t
29285 s,@ECHO_N@,$ECHO_N,;t t
29286 s,@ECHO_T@,$ECHO_T,;t t
29287 s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
29288 s,@DEFS@,$DEFS,;t t
29289 s,@LIBS@,$LIBS,;t t
29290 s,@top_builddir@,$top_builddir,;t t
29291 s,@GREP@,$GREP,;t t
29292 s,@EGREP@,$EGREP,;t t
29293 s,@NCURSES_MAJOR@,$NCURSES_MAJOR,;t t
29294 s,@NCURSES_MINOR@,$NCURSES_MINOR,;t t
29295 s,@NCURSES_PATCH@,$NCURSES_PATCH,;t t
29296 s,@cf_cv_rel_version@,$cf_cv_rel_version,;t t
29297 s,@cf_cv_abi_version@,$cf_cv_abi_version,;t t
29298 s,@cf_cv_builtin_bool@,$cf_cv_builtin_bool,;t t
29299 s,@cf_cv_header_stdbool_h@,$cf_cv_header_stdbool_h,;t t
29300 s,@cf_cv_type_of_bool@,$cf_cv_type_of_bool,;t t
29301 s,@VERSION@,$VERSION,;t t
29302 s,@VERSION_MAJOR@,$VERSION_MAJOR,;t t
29303 s,@VERSION_MINOR@,$VERSION_MINOR,;t t
29304 s,@VERSION_PATCH@,$VERSION_PATCH,;t t
29305 s,@PACKAGE@,$PACKAGE,;t t
29306 s,@build@,$build,;t t
29307 s,@build_cpu@,$build_cpu,;t t
29308 s,@build_vendor@,$build_vendor,;t t
29309 s,@build_os@,$build_os,;t t
29310 s,@host@,$host,;t t
29311 s,@host_cpu@,$host_cpu,;t t
29312 s,@host_vendor@,$host_vendor,;t t
29313 s,@host_os@,$host_os,;t t
29314 s,@target@,$target,;t t
29315 s,@target_cpu@,$target_cpu,;t t
29316 s,@target_vendor@,$target_vendor,;t t
29317 s,@target_os@,$target_os,;t t
29318 s,@FGREP@,$FGREP,;t t
29319 s,@CC@,$CC,;t t
29320 s,@CFLAGS@,$CFLAGS,;t t
29321 s,@LDFLAGS@,$LDFLAGS,;t t
29322 s,@CPPFLAGS@,$CPPFLAGS,;t t
29323 s,@ac_ct_CC@,$ac_ct_CC,;t t
29324 s,@EXEEXT@,$EXEEXT,;t t
29325 s,@OBJEXT@,$OBJEXT,;t t
29326 s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
29327 s,@CPP@,$CPP,;t t
29328 s,@LDCONFIG@,$LDCONFIG,;t t
29329 s,@CXX@,$CXX,;t t
29330 s,@CXXFLAGS@,$CXXFLAGS,;t t
29331 s,@ac_ct_CXX@,$ac_ct_CXX,;t t
29332 s,@AWK@,$AWK,;t t
29333 s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
29334 s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
29335 s,@INSTALL_DATA@,$INSTALL_DATA,;t t
29336 s,@LINT@,$LINT,;t t
29337 s,@LINT_OPTS@,$LINT_OPTS,;t t
29338 s,@LN_S@,$LN_S,;t t
29339 s,@cf_config_suffix@,$cf_config_suffix,;t t
29340 s,@PKG_CONFIG@,$PKG_CONFIG,;t t
29341 s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
29342 s,@PKG_CONFIG_LIBDIR@,$PKG_CONFIG_LIBDIR,;t t
29343 s,@MAKE_PC_FILES@,$MAKE_PC_FILES,;t t
29344 s,@PC_MODULE_SUFFIX@,$PC_MODULE_SUFFIX,;t t
29345 s,@SET_MAKE@,$SET_MAKE,;t t
29346 s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
29347 s,@MAKE_PHONY@,$MAKE_PHONY,;t t
29348 s,@CTAGS@,$CTAGS,;t t
29349 s,@ETAGS@,$ETAGS,;t t
29350 s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
29351 s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
29352 s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
29353 s,@RANLIB@,$RANLIB,;t t
29354 s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
29355 s,@LD@,$LD,;t t
29356 s,@ac_ct_LD@,$ac_ct_LD,;t t
29357 s,@AR@,$AR,;t t
29358 s,@ac_ct_AR@,$ac_ct_AR,;t t
29359 s,@NM@,$NM,;t t
29360 s,@ac_ct_NM@,$ac_ct_NM,;t t
29361 s,@ARFLAGS@,$ARFLAGS,;t t
29362 s,@DESTDIR@,$DESTDIR,;t t
29363 s,@BUILD_CC@,$BUILD_CC,;t t
29364 s,@BUILD_CPP@,$BUILD_CPP,;t t
29365 s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
29366 s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
29367 s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
29368 s,@BUILD_LIBS@,$BUILD_LIBS,;t t
29369 s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
29370 s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
29371 s,@cf_list_models@,$cf_list_models,;t t
29372 s,@ABI_VERSION@,$ABI_VERSION,;t t
29373 s,@LIBTOOL_VERSION@,$LIBTOOL_VERSION,;t t
29374 s,@LIBTOOL@,$LIBTOOL,;t t
29375 s,@ac_ct_LIBTOOL@,$ac_ct_LIBTOOL,;t t
29376 s,@LT_UNDEF@,$LT_UNDEF,;t t
29377 s,@LIBTOOL_CXX@,$LIBTOOL_CXX,;t t
29378 s,@LIBTOOL_OPTS@,$LIBTOOL_OPTS,;t t
29379 s,@LIB_CREATE@,$LIB_CREATE,;t t
29380 s,@LIB_OBJECT@,$LIB_OBJECT,;t t
29381 s,@LIB_SUFFIX@,$LIB_SUFFIX,;t t
29382 s,@LIB_PREP@,$LIB_PREP,;t t
29383 s,@LIB_CLEAN@,$LIB_CLEAN,;t t
29384 s,@LIB_COMPILE@,$LIB_COMPILE,;t t
29385 s,@LIB_LINK@,$LIB_LINK,;t t
29386 s,@LIB_INSTALL@,$LIB_INSTALL,;t t
29387 s,@LIB_UNINSTALL@,$LIB_UNINSTALL,;t t
29388 s,@DFT_LWR_MODEL@,$DFT_LWR_MODEL,;t t
29389 s,@DFT_UPR_MODEL@,$DFT_UPR_MODEL,;t t
29390 s,@TICS_NAME@,$TICS_NAME,;t t
29391 s,@TINFO_NAME@,$TINFO_NAME,;t t
29392 s,@LIB_NAME@,$LIB_NAME,;t t
29393 s,@LIB_PREFIX@,$LIB_PREFIX,;t t
29394 s,@CC_G_OPT@,$CC_G_OPT,;t t
29395 s,@CXX_G_OPT@,$CXX_G_OPT,;t t
29396 s,@LD_MODEL@,$LD_MODEL,;t t
29397 s,@shlibdir@,$shlibdir,;t t
29398 s,@MAKE_DLLS@,$MAKE_DLLS,;t t
29399 s,@CC_SHARED_OPTS@,$CC_SHARED_OPTS,;t t
29400 s,@LD_RPATH_OPT@,$LD_RPATH_OPT,;t t
29401 s,@LD_SHARED_OPTS@,$LD_SHARED_OPTS,;t t
29402 s,@MK_SHARED_LIB@,$MK_SHARED_LIB,;t t
29403 s,@RM_SHARED_OPTS@,$RM_SHARED_OPTS,;t t
29404 s,@LINK_PROGS@,$LINK_PROGS,;t t
29405 s,@LINK_TESTS@,$LINK_TESTS,;t t
29406 s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
29407 s,@LOCAL_LDFLAGS@,$LOCAL_LDFLAGS,;t t
29408 s,@LOCAL_LDFLAGS2@,$LOCAL_LDFLAGS2,;t t
29409 s,@INSTALL_LIB@,$INSTALL_LIB,;t t
29410 s,@RPATH_LIST@,$RPATH_LIST,;t t
29411 s,@EXPORT_SYMS@,$EXPORT_SYMS,;t t
29412 s,@RESULTING_SYMS@,$RESULTING_SYMS,;t t
29413 s,@VERSIONED_SYMS@,$VERSIONED_SYMS,;t t
29414 s,@WILDCARD_SYMS@,$WILDCARD_SYMS,;t t
29415 s,@cf_ldd_prog@,$cf_ldd_prog,;t t
29416 s,@EXTRA_PKG_LDFLAGS@,$EXTRA_PKG_LDFLAGS,;t t
29417 s,@EXTRA_SUFFIX@,$EXTRA_SUFFIX,;t t
29418 s,@TERMINFO_SRC@,$TERMINFO_SRC,;t t
29419 s,@NCURSES_USE_DATABASE@,$NCURSES_USE_DATABASE,;t t
29420 s,@TIC@,$TIC,;t t
29421 s,@ac_ct_TIC@,$ac_ct_TIC,;t t
29422 s,@INFOCMP@,$INFOCMP,;t t
29423 s,@ac_ct_INFOCMP@,$ac_ct_INFOCMP,;t t
29424 s,@FALLBACK_LIST@,$FALLBACK_LIST,;t t
29425 s,@USE_FALLBACKS@,$USE_FALLBACKS,;t t
29426 s,@WHICH_XTERM@,$WHICH_XTERM,;t t
29427 s,@XTERM_KBS@,$XTERM_KBS,;t t
29428 s,@TERMINFO_DIRS@,$TERMINFO_DIRS,;t t
29429 s,@TERMINFO@,$TERMINFO,;t t
29430 s,@MAKE_TERMINFO@,$MAKE_TERMINFO,;t t
29431 s,@USE_BIG_STRINGS@,$USE_BIG_STRINGS,;t t
29432 s,@TERMPATH@,$TERMPATH,;t t
29433 s,@NCURSES_USE_TERMCAP@,$NCURSES_USE_TERMCAP,;t t
29434 s,@BROKEN_LINKER@,$BROKEN_LINKER,;t t
29435 s,@NCURSES_WCWIDTH_GRAPHICS@,$NCURSES_WCWIDTH_GRAPHICS,;t t
29436 s,@NCURSES_CH_T@,$NCURSES_CH_T,;t t
29437 s,@NCURSES_LIBUTF8@,$NCURSES_LIBUTF8,;t t
29438 s,@NEED_WCHAR_H@,$NEED_WCHAR_H,;t t
29439 s,@NCURSES_MBSTATE_T@,$NCURSES_MBSTATE_T,;t t
29440 s,@NCURSES_WCHAR_T@,$NCURSES_WCHAR_T,;t t
29441 s,@NCURSES_WINT_T@,$NCURSES_WINT_T,;t t
29442 s,@NCURSES_OK_WCHAR_T@,$NCURSES_OK_WCHAR_T,;t t
29443 s,@NCURSES_OK_WINT_T@,$NCURSES_OK_WINT_T,;t t
29444 s,@cf_cv_enable_lp64@,$cf_cv_enable_lp64,;t t
29445 s,@NCURSES_TPARM_VARARGS@,$NCURSES_TPARM_VARARGS,;t t
29446 s,@NCURSES_WATTR_MACROS@,$NCURSES_WATTR_MACROS,;t t
29447 s,@RGB_PATH@,$RGB_PATH,;t t
29448 s,@no_x11_rgb@,$no_x11_rgb,;t t
29449 s,@NCURSES_BOOL@,$NCURSES_BOOL,;t t
29450 s,@TERMINFO_CAPS@,$TERMINFO_CAPS,;t t
29451 s,@NCURSES_OSPEED@,$NCURSES_OSPEED,;t t
29452 s,@NCURSES_CCHARW_MAX@,$NCURSES_CCHARW_MAX,;t t
29453 s,@NCURSES_SBOOL@,$NCURSES_SBOOL,;t t
29454 s,@NCURSES_TPARM_ARG@,$NCURSES_TPARM_ARG,;t t
29455 s,@MANPAGE_RENAMES@,$MANPAGE_RENAMES,;t t
29456 s,@NCURSES_EXT_FUNCS@,$NCURSES_EXT_FUNCS,;t t
29457 s,@GENERATED_EXT_FUNCS@,$GENERATED_EXT_FUNCS,;t t
29458 s,@NCURSES_SP_FUNCS@,$NCURSES_SP_FUNCS,;t t
29459 s,@GENERATED_SP_FUNCS@,$GENERATED_SP_FUNCS,;t t
29460 s,@NCURSES_CONST@,$NCURSES_CONST,;t t
29461 s,@NCURSES_EXT_COLORS@,$NCURSES_EXT_COLORS,;t t
29462 s,@NCURSES_MOUSE_VERSION@,$NCURSES_MOUSE_VERSION,;t t
29463 s,@NCURSES_XNAMES@,$NCURSES_XNAMES,;t t
29464 s,@PTHREAD@,$PTHREAD,;t t
29465 s,@cf_cv_enable_reentrant@,$cf_cv_enable_reentrant,;t t
29466 s,@cf_cv_enable_opaque@,$cf_cv_enable_opaque,;t t
29467 s,@NCURSES_SIZE_T@,$NCURSES_SIZE_T,;t t
29468 s,@NCURSES_OPAQUE@,$NCURSES_OPAQUE,;t t
29469 s,@NCURSES_OPAQUE_FORM@,$NCURSES_OPAQUE_FORM,;t t
29470 s,@NCURSES_OPAQUE_MENU@,$NCURSES_OPAQUE_MENU,;t t
29471 s,@NCURSES_OPAQUE_PANEL@,$NCURSES_OPAQUE_PANEL,;t t
29472 s,@NCURSES_WRAP_PREFIX@,$NCURSES_WRAP_PREFIX,;t t
29473 s,@NCURSES_IMPEXP@,$NCURSES_IMPEXP,;t t
29474 s,@NCURSES_CXX_IMPEXP@,$NCURSES_CXX_IMPEXP,;t t
29475 s,@NCURSES_INTEROP_FUNCS@,$NCURSES_INTEROP_FUNCS,;t t
29476 s,@NCURSES_WGETCH_EVENTS@,$NCURSES_WGETCH_EVENTS,;t t
29477 s,@EXP_WIN32_DRIVER@,$EXP_WIN32_DRIVER,;t t
29478 s,@INTERNALS_HDR@,$INTERNALS_HDR,;t t
29479 s,@ECHO_LT@,$ECHO_LT,;t t
29480 s,@ECHO_LD@,$ECHO_LD,;t t
29481 s,@RULE_CC@,$RULE_CC,;t t
29482 s,@SHOW_CC@,$SHOW_CC,;t t
29483 s,@ECHO_CC@,$ECHO_CC,;t t
29484 s,@ECHO_LINK@,$ECHO_LINK,;t t
29485 s,@INSTALL_OPT_S@,$INSTALL_OPT_S,;t t
29486 s,@INSTALL_OPT_O@,$INSTALL_OPT_O,;t t
29487 s,@INSTALL_OPT_P@,$INSTALL_OPT_P,;t t
29488 s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
29489 s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
29490 s,@STDC_NORETURN@,$STDC_NORETURN,;t t
29491 s,@ADAFLAGS@,$ADAFLAGS,;t t
29492 s,@EXTRA_CXXFLAGS@,$EXTRA_CXXFLAGS,;t t
29493 s,@ADA_TRACE@,$ADA_TRACE,;t t
29494 s,@MATH_LIB@,$MATH_LIB,;t t
29495 s,@NCURSES_INLINE@,$NCURSES_INLINE,;t t
29496 s,@cf_cv_typeof_chtype@,$cf_cv_typeof_chtype,;t t
29497 s,@cf_cv_1UL@,$cf_cv_1UL,;t t
29498 s,@cf_cv_typeof_mmask_t@,$cf_cv_typeof_mmask_t,;t t
29499 s,@HAVE_VSSCANF@,$HAVE_VSSCANF,;t t
29500 s,@TEST_LIBS@,$TEST_LIBS,;t t
29501 s,@TEST_LIBS2@,$TEST_LIBS2,;t t
29502 s,@CXXCPP@,$CXXCPP,;t t
29503 s,@CXXLDFLAGS@,$CXXLDFLAGS,;t t
29504 s,@CXX_AR@,$CXX_AR,;t t
29505 s,@CXX_ARFLAGS@,$CXX_ARFLAGS,;t t
29506 s,@CXXLIBS@,$CXXLIBS,;t t
29507 s,@USE_CXX_BOOL@,$USE_CXX_BOOL,;t t
29508 s,@cf_TEMP_gnat@,$cf_TEMP_gnat,;t t
29509 s,@M4_exists@,$M4_exists,;t t
29510 s,@cf_ada_make@,$cf_ada_make,;t t
29511 s,@cf_ada_config@,$cf_ada_config,;t t
29512 s,@cf_ada_config_Ada@,$cf_ada_config_Ada,;t t
29513 s,@cf_ada_config_C@,$cf_ada_config_C,;t t
29514 s,@GNATPREP_OPTS@,$GNATPREP_OPTS,;t t
29515 s,@cf_compile_generics@,$cf_compile_generics,;t t
29516 s,@cf_generic_objects@,$cf_generic_objects,;t t
29517 s,@USE_GNAT_SIGINT@,$USE_GNAT_SIGINT,;t t
29518 s,@USE_OLD_MAKERULES@,$USE_OLD_MAKERULES,;t t
29519 s,@USE_GNAT_PROJECTS@,$USE_GNAT_PROJECTS,;t t
29520 s,@USE_GNAT_LIBRARIES@,$USE_GNAT_LIBRARIES,;t t
29521 s,@USE_GNAT_MAKE_GPR@,$USE_GNAT_MAKE_GPR,;t t
29522 s,@USE_GNAT_GPRBUILD@,$USE_GNAT_GPRBUILD,;t t
29523 s,@cf_ada_compiler@,$cf_ada_compiler,;t t
29524 s,@cf_ada_package@,$cf_ada_package,;t t
29525 s,@ADA_INCLUDE@,$ADA_INCLUDE,;t t
29526 s,@ADA_OBJECTS@,$ADA_OBJECTS,;t t
29527 s,@ADA_SHAREDLIB@,$ADA_SHAREDLIB,;t t
29528 s,@MAKE_ADA_SHAREDLIB@,$MAKE_ADA_SHAREDLIB,;t t
29529 s,@ADA_LIBNAME@,$ADA_LIBNAME,;t t
29530 s,@ACPPFLAGS@,$ACPPFLAGS,;t t
29531 s,@DFT_ARG_SUFFIX@,$DFT_ARG_SUFFIX,;t t
29532 s,@DFT_DEP_SUFFIX@,$DFT_DEP_SUFFIX,;t t
29533 s,@DFT_OBJ_SUBDIR@,$DFT_OBJ_SUBDIR,;t t
29534 s,@CXX_LIB_SUFFIX@,$CXX_LIB_SUFFIX,;t t
29535 s,@USE_ARG_SUFFIX@,$USE_ARG_SUFFIX,;t t
29536 s,@USE_CFG_SUFFIX@,$USE_CFG_SUFFIX,;t t
29537 s,@USE_LIB_SUFFIX@,$USE_LIB_SUFFIX,;t t
29538 s,@TICS_ARG_SUFFIX@,$TICS_ARG_SUFFIX,;t t
29539 s,@TICS_DEP_SUFFIX@,$TICS_DEP_SUFFIX,;t t
29540 s,@TICS_LIB_SUFFIX@,$TICS_LIB_SUFFIX,;t t
29541 s,@TICS_LDFLAGS@,$TICS_LDFLAGS,;t t
29542 s,@TICS_LIBS@,$TICS_LIBS,;t t
29543 s,@TINFO_ARG_SUFFIX@,$TINFO_ARG_SUFFIX,;t t
29544 s,@TINFO_DEP_SUFFIX@,$TINFO_DEP_SUFFIX,;t t
29545 s,@TINFO_LIB_SUFFIX@,$TINFO_LIB_SUFFIX,;t t
29546 s,@TINFO_LDFLAGS@,$TINFO_LDFLAGS,;t t
29547 s,@TINFO_LIBS@,$TINFO_LIBS,;t t
29548 s,@TINFO_LDFLAGS2@,$TINFO_LDFLAGS2,;t t
29549 s,@LDFLAGS_STATIC@,$LDFLAGS_STATIC,;t t
29550 s,@LDFLAGS_SHARED@,$LDFLAGS_SHARED,;t t
29551 s,@includesubdir@,$includesubdir,;t t
29552 s,@WITH_OVERWRITE@,$WITH_OVERWRITE,;t t
29553 s,@TICS_LIST@,$TICS_LIST,;t t
29554 s,@TINFO_LIST@,$TINFO_LIST,;t t
29555 s,@SHLIB_LIST@,$SHLIB_LIST,;t t
29556 s,@NCURSES_TREE@,$NCURSES_TREE,;t t
29557 s,@FORM_NAME@,$FORM_NAME,;t t
29558 s,@MENU_NAME@,$MENU_NAME,;t t
29559 s,@PANEL_NAME@,$PANEL_NAME,;t t
29560 s,@CXX_NAME@,$CXX_NAME,;t t
29561 s,@TEST_ARGS@,$TEST_ARGS,;t t
29562 s,@TEST_DEPS@,$TEST_DEPS,;t t
29563 s,@TEST_ARG2@,$TEST_ARG2,;t t
29564 s,@TEST_DEP2@,$TEST_DEP2,;t t
29565 s,@PC_MODULES_TO_MAKE@,$PC_MODULES_TO_MAKE,;t t
29566 s,@ADA_SUBDIRS@,$ADA_SUBDIRS,;t t
29567 s,@DIRS_TO_MAKE@,$DIRS_TO_MAKE,;t t
29568 s,@NCURSES_SHLIB2@,$NCURSES_SHLIB2,;t t
29569 s,@HAVE_TCGETATTR@,$HAVE_TCGETATTR,;t t
29570 s,@HAVE_STDINT_H@,$HAVE_STDINT_H,;t t
29571 s,@HAVE_TERMIO_H@,$HAVE_TERMIO_H,;t t
29572 s,@HAVE_TERMIOS_H@,$HAVE_TERMIOS_H,;t t
29573 s,@cross_compiling@,$cross_compiling,;t t
29574 s,@MAKE_TESTS@,$MAKE_TESTS,;t t
29575 s,@ADAHTML_DIR@,$ADAHTML_DIR,;t t
29576 s,@LIBTOOL_OPTS_CXX@,$LIBTOOL_OPTS_CXX,;t t
29577 s,@PKG_CFLAGS@,$PKG_CFLAGS,;t t
29578 s,@MISC_INSTALL_DATA@,$MISC_INSTALL_DATA,;t t
29579 s,@MISC_UNINSTALL_DATA@,$MISC_UNINSTALL_DATA,;t t
29580 s,@MAKE_DATABASE@,$MAKE_DATABASE,;t t
29581 s,@UNALTERED_SYMS@,$UNALTERED_SYMS,;t t
29582 s,@ADAGEN_LDFLAGS@,$ADAGEN_LDFLAGS,;t t
29583 s,@CHECK_BUILD@,$CHECK_BUILD,;t t
29584 s,@PRIVATE_LIBS@,$PRIVATE_LIBS,;t t
29585 s,@LD_SEARCHPATH@,$LD_SEARCHPATH,;t t
29586 CEOF
29587
29588 EOF
29589
29590   cat >>"$CONFIG_STATUS" <<\EOF
29591   # Split the substitutions into bite-sized pieces for seds with
29592   # small command number limits, like on Digital OSF/1 and HP-UX.
29593   ac_max_sed_lines=48
29594   ac_sed_frag=1 # Number of current file.
29595   ac_beg=1 # First line for current file.
29596   ac_end=$ac_max_sed_lines # Line after last line for current file.
29597   ac_more_lines=:
29598   ac_sed_cmds=
29599   while "$ac_more_lines"; do
29600     if test "$ac_beg" -gt 1; then
29601       sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29602     else
29603       sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
29604     fi
29605     if test ! -s $tmp/subs.frag; then
29606       ac_more_lines=false
29607     else
29608       # The purpose of the label and of the branching condition is to
29609       # speed up the sed processing (if there are no `@' at all, there
29610       # is no need to browse any of the substitutions).
29611       # These are the two extra sed commands mentioned above.
29612       (echo ':t
29613   /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
29614       # It is possible to make a multiline substitution using escaped newlines.
29615       # Ensure that we do not split the substitution between script fragments.
29616       ac_BEG=$ac_end
29617       ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
29618       sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
29619       if test -s $tmp/subs.next; then
29620         grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
29621         if test ! -s $tmp/subs.edit; then
29622           grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
29623           if test ! -s $tmp/subs.edit; then
29624             if test "$ac_beg" -gt 1; then
29625               ac_end=`expr "$ac_end" - 1`
29626               continue
29627             fi
29628           fi
29629         fi
29630       fi
29631
29632       if test -z "$ac_sed_cmds"; then
29633         ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
29634       else
29635         ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
29636       fi
29637       ac_sed_frag=`expr "$ac_sed_frag" + 1`
29638       ac_beg=$ac_end
29639       ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
29640     fi
29641   done
29642   if test -z "$ac_sed_cmds"; then
29643     ac_sed_cmds=cat
29644   fi
29645 fi # test -n "$CONFIG_FILES"
29646
29647 EOF
29648 cat >>"$CONFIG_STATUS" <<\EOF
29649 for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
29650   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29651   case "$ac_file" in
29652   - | *:- | *:-:* ) # input from stdin
29653         cat >$tmp/stdin
29654         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29655         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29656   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29657         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29658   * )   ac_file_in=$ac_file.in ;;
29659   esac
29660
29661   # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
29662   ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29663          X"$ac_file" : 'X\(//\)[^/]' \| \
29664          X"$ac_file" : 'X\(//\)$' \| \
29665          X"$ac_file" : 'X\(/\)' \| \
29666          .     : '\(.\)' 2>/dev/null ||
29667 echo X"$ac_file" |
29668     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29669           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29670           /^X\(\/\/\)$/{ s//\1/; q; }
29671           /^X\(\/\).*/{ s//\1/; q; }
29672           s/.*/./; q'`
29673   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29674     { case "$ac_dir" in
29675   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29676   *)                      as_incr_dir=.;;
29677 esac
29678 as_dummy="$ac_dir"
29679 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29680   case $as_mkdir_dir in
29681     # Skip DOS drivespec
29682     ?:) as_incr_dir=$as_mkdir_dir ;;
29683     *)
29684       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29685       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29686     ;;
29687   esac
29688 done; }
29689
29690     ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
29691     # A "../" for each directory in $ac_dir_suffix.
29692     ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
29693   else
29694     ac_dir_suffix= ac_dots=
29695   fi
29696
29697   case "$srcdir" in
29698   .)  ac_srcdir=.
29699       if test -z "$ac_dots"; then
29700          ac_top_srcdir=.
29701       else
29702          ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
29703       fi ;;
29704   [\\/]* | ?:[\\/]* )
29705       ac_srcdir="$srcdir$ac_dir_suffix";
29706       ac_top_srcdir="$srcdir" ;;
29707   *) # Relative path.
29708     ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
29709     ac_top_srcdir="$ac_dots$srcdir" ;;
29710   esac
29711
29712   case $INSTALL in
29713   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
29714   *) ac_INSTALL=$ac_dots$INSTALL ;;
29715   esac
29716
29717   if test x"$ac_file" != x-; then
29718     { echo "$as_me:29718: creating $ac_file" >&5
29719 echo "$as_me: creating $ac_file" >&6;}
29720     rm -f "$ac_file"
29721   fi
29722   # Let's still pretend it is `configure' which instantiates (i.e., don't
29723   # use $as_me), people would be surprised to read:
29724   #    /* config.h.  Generated automatically by config.status.  */
29725   configure_input="Generated automatically from `echo $ac_file_in |
29726                                                  sed 's,.*/,,'` by configure."
29727
29728   # First look for the input files in the build tree, otherwise in the
29729   # src tree.
29730   ac_file_inputs=`IFS=:
29731     for f in $ac_file_in; do
29732       case $f in
29733       -) echo $tmp/stdin ;;
29734       [\\/$]*)
29735          # Absolute (can't be DOS-style, as IFS=:)
29736          test -f "$f" || { { echo "$as_me:29736: error: cannot find input file: $f" >&5
29737 echo "$as_me: error: cannot find input file: $f" >&2;}
29738    { (exit 1); exit 1; }; }
29739          echo $f;;
29740       *) # Relative
29741          if test -f "$f"; then
29742            # Build tree
29743            echo $f
29744          elif test -f "$srcdir/$f"; then
29745            # Source tree
29746            echo "$srcdir/$f"
29747          else
29748            # /dev/null tree
29749            { { echo "$as_me:29749: error: cannot find input file: $f" >&5
29750 echo "$as_me: error: cannot find input file: $f" >&2;}
29751    { (exit 1); exit 1; }; }
29752          fi;;
29753       esac
29754     done` || { (exit 1); exit 1; }
29755 EOF
29756 cat >>"$CONFIG_STATUS" <<\EOF
29757   ac_warn_datarootdir=no
29758   if test x"$ac_file" != x-; then
29759     for ac_item in $ac_file_inputs
29760     do
29761       ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
29762       if test -n "$ac_seen"; then
29763         ac_used=`grep '@datarootdir@' "$ac_item"`
29764         if test -z "$ac_used"; then
29765           { echo "$as_me:29765: WARNING: datarootdir was used implicitly but not set:
29766 $ac_seen" >&5
29767 echo "$as_me: WARNING: datarootdir was used implicitly but not set:
29768 $ac_seen" >&2;}
29769           ac_warn_datarootdir=yes
29770         fi
29771       fi
29772       ac_seen=`grep '${datarootdir}' "$ac_item"`
29773       if test -n "$ac_seen"; then
29774         { echo "$as_me:29774: WARNING: datarootdir was used explicitly but not set:
29775 $ac_seen" >&5
29776 echo "$as_me: WARNING: datarootdir was used explicitly but not set:
29777 $ac_seen" >&2;}
29778         ac_warn_datarootdir=yes
29779       fi
29780     done
29781   fi
29782
29783 if test "x$ac_warn_datarootdir" = xyes; then
29784   ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
29785 fi
29786
29787 EOF
29788 cat >>"$CONFIG_STATUS" <<EOF
29789   sed "$ac_vpsub
29790 $extrasub
29791 EOF
29792 cat >>"$CONFIG_STATUS" <<\EOF
29793 :t
29794 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
29795 s,@configure_input@,$configure_input,;t t
29796 s,@srcdir@,$ac_srcdir,;t t
29797 s,@top_srcdir@,$ac_top_srcdir,;t t
29798 s,@INSTALL@,$ac_INSTALL,;t t
29799 " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
29800   rm -f $tmp/stdin
29801   if test x"$ac_file" != x-; then
29802     cp "$tmp/out" "$ac_file"
29803
29804     for ac_name in prefix exec_prefix datarootdir
29805     do
29806         ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
29807         if test -n "$ac_seen"; then
29808             ac_init=`${EGREP-egrep} '[  ]*'$ac_name'[   ]*=' "$ac_file"`
29809             if test -z "$ac_init"; then
29810               ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
29811               { echo "$as_me:29811: WARNING: Variable $ac_name is used but was not set:
29812 $ac_seen" >&5
29813 echo "$as_me: WARNING: Variable $ac_name is used but was not set:
29814 $ac_seen" >&2;}
29815             fi
29816         fi
29817     done
29818     ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
29819     ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
29820     if test -s $tmp/out; then
29821       ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
29822       { echo "$as_me:29822: WARNING: Some variables may not be substituted:
29823 $ac_seen" >&5
29824 echo "$as_me: WARNING: Some variables may not be substituted:
29825 $ac_seen" >&2;}
29826     fi
29827   else
29828     cat $tmp/out
29829   fi
29830   rm -f $tmp/out
29831
29832 done
29833 EOF
29834 cat >>"$CONFIG_STATUS" <<\EOF
29835
29836 #
29837 # CONFIG_HEADER section.
29838 #
29839
29840 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
29841 # NAME is the cpp macro being defined and VALUE is the value it is being given.
29842 #
29843 # ac_d sets the value in "#define NAME VALUE" lines.
29844 ac_dA='s,^\([   ]*\)#\([        ]*define[       ][      ]*\)'
29845 ac_dB='[        ].*$,\1#\2'
29846 ac_dC=' '
29847 ac_dD=',;t'
29848 # ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
29849 ac_iA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29850 ac_iB='\([      ]\),\1#\2define\3'
29851 ac_iC=' '
29852 ac_iD='\4,;t'
29853 # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
29854 ac_uA='s,^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
29855 ac_uB='$,\1#\2define\3'
29856 ac_uC=' '
29857 ac_uD=',;t'
29858
29859 for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
29860   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
29861   case "$ac_file" in
29862   - | *:- | *:-:* ) # input from stdin
29863         cat >$tmp/stdin
29864         ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29865         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29866   *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
29867         ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
29868   * )   ac_file_in=$ac_file.in ;;
29869   esac
29870
29871   test x"$ac_file" != x- && { echo "$as_me:29871: creating $ac_file" >&5
29872 echo "$as_me: creating $ac_file" >&6;}
29873
29874   # First look for the input files in the build tree, otherwise in the
29875   # src tree.
29876   ac_file_inputs=`IFS=:
29877     for f in $ac_file_in; do
29878       case $f in
29879       -) echo $tmp/stdin ;;
29880       [\\/$]*)
29881          # Absolute (can't be DOS-style, as IFS=:)
29882          test -f "$f" || { { echo "$as_me:29882: error: cannot find input file: $f" >&5
29883 echo "$as_me: error: cannot find input file: $f" >&2;}
29884    { (exit 1); exit 1; }; }
29885          echo $f;;
29886       *) # Relative
29887          if test -f "$f"; then
29888            # Build tree
29889            echo $f
29890          elif test -f "$srcdir/$f"; then
29891            # Source tree
29892            echo "$srcdir/$f"
29893          else
29894            # /dev/null tree
29895            { { echo "$as_me:29895: error: cannot find input file: $f" >&5
29896 echo "$as_me: error: cannot find input file: $f" >&2;}
29897    { (exit 1); exit 1; }; }
29898          fi;;
29899       esac
29900     done` || { (exit 1); exit 1; }
29901   # Remove the trailing spaces.
29902   sed 's/[      ]*$//' $ac_file_inputs >$tmp/in
29903
29904 EOF
29905
29906 # Transform confdefs.h into a list of #define's.  We won't use it as a sed
29907 # script, but as data to insert where we see @DEFS@.  We expect AC_SAVE_DEFS to
29908 # be either 'cat' or 'sort'.
29909 cat confdefs.h | uniq >conftest.vals
29910
29911 # Break up conftest.vals because some shells have a limit on
29912 # the size of here documents, and old seds have small limits too.
29913
29914 rm -f conftest.tail
29915 echo '  rm -f conftest.frag' >> "$CONFIG_STATUS"
29916 while grep . conftest.vals >/dev/null
29917 do
29918   # Write chunks of a limited-size here document to conftest.frag.
29919   echo '  cat >> conftest.frag <<CEOF' >> "$CONFIG_STATUS"
29920   sed "${ac_max_here_lines}q" conftest.vals | sed -e 's/#ifdef.*/#if 0/' >> "$CONFIG_STATUS"
29921   echo 'CEOF' >> "$CONFIG_STATUS"
29922   sed "1,${ac_max_here_lines}d" conftest.vals > conftest.tail
29923   rm -f conftest.vals
29924   mv conftest.tail conftest.vals
29925 done
29926 rm -f conftest.vals
29927
29928 # Run sed to substitute the contents of conftest.frag into $tmp/in at the
29929 # marker @DEFS@.
29930 echo '  cat >> conftest.edit <<CEOF
29931 /@DEFS@/r conftest.frag
29932 /@DEFS@/d
29933 CEOF
29934 sed -f conftest.edit $tmp/in > $tmp/out
29935 rm -f $tmp/in
29936 mv $tmp/out $tmp/in
29937 rm -f conftest.edit conftest.frag
29938 ' >> "$CONFIG_STATUS"
29939
29940 cat >>"$CONFIG_STATUS" <<\EOF
29941   # Let's still pretend it is `configure' which instantiates (i.e., don't
29942   # use $as_me), people would be surprised to read:
29943   #    /* config.h.  Generated automatically by config.status.  */
29944   if test x"$ac_file" = x-; then
29945     echo "/* Generated automatically by configure.  */" >$tmp/config.h
29946   else
29947     echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
29948   fi
29949   cat $tmp/in >>$tmp/config.h
29950   rm -f $tmp/in
29951   if test x"$ac_file" != x-; then
29952     if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
29953       { echo "$as_me:29953: $ac_file is unchanged" >&5
29954 echo "$as_me: $ac_file is unchanged" >&6;}
29955     else
29956       ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
29957          X"$ac_file" : 'X\(//\)[^/]' \| \
29958          X"$ac_file" : 'X\(//\)$' \| \
29959          X"$ac_file" : 'X\(/\)' \| \
29960          .     : '\(.\)' 2>/dev/null ||
29961 echo X"$ac_file" |
29962     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
29963           /^X\(\/\/\)[^/].*/{ s//\1/; q; }
29964           /^X\(\/\/\)$/{ s//\1/; q; }
29965           /^X\(\/\).*/{ s//\1/; q; }
29966           s/.*/./; q'`
29967       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
29968         { case "$ac_dir" in
29969   [\\/]* | ?:[\\/]* ) as_incr_dir=;;
29970   *)                      as_incr_dir=.;;
29971 esac
29972 as_dummy="$ac_dir"
29973 for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
29974   case $as_mkdir_dir in
29975     # Skip DOS drivespec
29976     ?:) as_incr_dir=$as_mkdir_dir ;;
29977     *)
29978       as_incr_dir=$as_incr_dir/$as_mkdir_dir
29979       test -d "$as_incr_dir" || mkdir "$as_incr_dir"
29980     ;;
29981   esac
29982 done; }
29983
29984       fi
29985       rm -f "$ac_file"
29986       mv "$tmp/config.h" "$ac_file"
29987     fi
29988   else
29989     cat $tmp/config.h
29990     rm -f $tmp/config.h
29991   fi
29992 done
29993 EOF
29994 cat >>"$CONFIG_STATUS" <<\EOF
29995 #
29996 # CONFIG_COMMANDS section.
29997 #
29998 for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
29999   ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
30000   ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
30001
30002   case "$ac_dest" in
30003     default )
30004 if test "x$cf_with_tests" != xno ; then
30005
30006 for cf_dir in test
30007 do
30008         if test ! -d "$srcdir/$cf_dir" ; then
30009                 continue
30010         elif test -f "$srcdir/$cf_dir/programs" ; then
30011                 $AWK -f "$srcdir/test/mk-test.awk" INSTALL=no ECHO_LINK="$ECHO_LD" "$srcdir/$cf_dir/programs" >>$cf_dir/Makefile
30012         fi
30013 done
30014
30015 fi
30016
30017 cf_prefix=$LIB_PREFIX
30018
30019 case "$cf_cv_shlib_version" in
30020 (cygdll|msysdll|mingw|msvcdll)
30021         TINFO_NAME=$TINFO_ARG_SUFFIX
30022         TINFO_SUFFIX=.dll
30023         ;;
30024 esac
30025
30026 if test -n "$TINFO_SUFFIX" ; then
30027         case "$TINFO_SUFFIX" in
30028         (tw*)
30029                 TINFO_NAME="${TINFO_NAME}tw${EXTRA_SUFFIX}"
30030                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30031                 ;;
30032         (t*)
30033                 TINFO_NAME="${TINFO_NAME}t${EXTRA_SUFFIX}"
30034                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^t'$EXTRA_SUFFIX'//'`
30035                 ;;
30036         (w*)
30037                 TINFO_NAME="${TINFO_NAME}w${EXTRA_SUFFIX}"
30038                 TINFO_SUFFIX=`echo "$TINFO_SUFFIX" | sed 's/^w'$EXTRA_SUFFIX'//'`
30039                 ;;
30040         esac
30041 fi
30042
30043 for cf_dir in $SRC_SUBDIRS
30044 do
30045         if test ! -d "$srcdir/$cf_dir" ; then
30046                 continue
30047         elif test -f "$srcdir/$cf_dir/modules" ; then
30048
30049                 SHARED_LIB=
30050                 Libs_To_Make=
30051                 cf_awk_program=
30052                 if test -n "${cf_cv_abi_version}" && test "x${cf_cv_abi_version}" != "x5"
30053                 then
30054                         cf_awk_program="$cf_awk_program\
30055 /deprecated in ABI${cf_cv_abi_version}/ { next; }\
30056 { sub(\"NCURSES([WT]+)?\", \"&${cf_cv_abi_version}\"); }\
30057 "
30058                 fi
30059
30060                 if test "x$WILDCARD_SYMS" = xno
30061                 then
30062                         cf_awk_program="$cf_awk_program\
30063 /[      ]_\\*;/ { skip=1; next; }\
30064 "
30065                 fi
30066
30067                 if test "x$cf_awk_program" != "x"
30068                 then
30069                         cat >>$cf_dir/Makefile <<CF_EOF
30070
30071 # Generated by CF_LIB_RULES
30072 resulting.map: $UNALTERED_SYMS
30073         $AWK 'BEGIN { skip = 1; last=""; } \
30074 $cf_awk_program \
30075 { if ( last != "" && ( skip == 0 || \$\$0 !~ /}/ ) ) { print last; }\
30076  skip = 0; last = \$\$0; } \
30077 END { print last; }' < "$UNALTERED_SYMS" >\$@
30078
30079 distclean::
30080         rm -f resulting.map
30081 CF_EOF
30082                 fi
30083
30084                 for cf_item in $cf_LIST_MODELS
30085                 do
30086
30087         case X$cf_item in
30088         (Xlibtool)
30089                 cf_suffix='.la'
30090                 cf_depsuf=$cf_suffix
30091                 ;;
30092         (Xdebug)
30093                 case "$cf_cv_system_name" in
30094                 (*-msvc*)
30095                         cf_suffix='_g.lib'
30096                         ;;
30097                 (*)
30098                         cf_suffix='_g.a'
30099                         ;;
30100                 esac
30101                 cf_depsuf=$cf_suffix
30102                 ;;
30103         (Xprofile)
30104                 case "$cf_cv_system_name" in
30105                 (*-msvc*)
30106                         cf_suffix='_p.lib'
30107                         ;;
30108                 (*)
30109                         cf_suffix='_p.a'
30110                         ;;
30111                 esac
30112                 cf_depsuf=$cf_suffix
30113                 ;;
30114         (Xshared)
30115                 case "$cf_cv_system_name" in
30116                 (aix[5-7]*)
30117                         cf_suffix='.so'
30118                         cf_depsuf=$cf_suffix
30119                         ;;
30120                 (*-msvc*)
30121                         cf_suffix='.dll'
30122                         cf_depsuf='.dll.lib'
30123                         ;;
30124                 (cygwin*|msys*|mingw*)
30125                         cf_suffix='.dll'
30126                         cf_depsuf='.dll.a'
30127                         ;;
30128                 (darwin*)
30129                         cf_suffix='.dylib'
30130                         cf_depsuf=$cf_suffix
30131                         ;;
30132                 (hpux*)
30133                         case "$target" in
30134                         (ia64*)
30135                                 cf_suffix='.so'
30136                                 cf_depsuf=$cf_suffix
30137                                 ;;
30138                         (*)
30139                                 cf_suffix='.sl'
30140                                 cf_depsuf=$cf_suffix
30141                                 ;;
30142                         esac
30143                         ;;
30144                 (*)
30145                         cf_suffix='.so'
30146                         cf_depsuf=$cf_suffix
30147                         ;;
30148                 esac
30149                 ;;
30150         (*)
30151                 case "$target" in
30152                 (*-msvc*)
30153                         cf_suffix='.lib'
30154                         ;;
30155                 (*)
30156                         cf_suffix='.a'
30157                         ;;
30158                 esac
30159                 cf_depsuf=$cf_suffix
30160                 ;;
30161         esac
30162         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30163         then
30164                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30165                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30166         fi
30167
30168                         if test "$cf_dir" = "c++"
30169                         then
30170
30171 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30172
30173 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30174
30175                         else
30176
30177 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30178
30179 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30180
30181                         fi
30182                         test -z "$cf_libname" && cf_libname="$cf_dir"
30183                         if test "$cf_item" = shared ; then
30184                                 if test -n "${LIB_SUFFIX}"
30185                                 then
30186                                         cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30187                                 else
30188                                         cf_shared_suffix="$cf_suffix"
30189                                 fi
30190                                 if test "$cf_cv_do_symlinks" = yes ; then
30191                                         cf_version_name=
30192
30193                                         case "$cf_cv_shlib_version" in
30194                                         (rel)
30195                                                 cf_version_name=REL_VERSION
30196                                                 ;;
30197                                         (abi)
30198                                                 cf_version_name=ABI_VERSION
30199                                                 ;;
30200                                         esac
30201
30202                                         if test -n "$cf_version_name"
30203                                         then
30204                                                 case "$cf_cv_system_name" in
30205                                                 (darwin*)
30206                                                         # "w", etc?
30207                                                         cf_suffix="${USE_LIB_SUFFIX}"'.${'$cf_version_name'}'"$cf_shared_suffix"
30208                                                         ;;
30209                                                 (*)
30210                                                         cf_suffix="$cf_suffix"'.${'$cf_version_name'}'
30211                                                         ;;
30212                                                 esac
30213                                         fi
30214                                         if test -n "${USE_LIB_SUFFIX}"
30215                                         then
30216                                                 cf_shared_suffix=`echo "$cf_suffix" | sed 's/^'"${USE_LIB_SUFFIX}"'//'`
30217                                         else
30218                                                 cf_shared_suffix="$cf_suffix"
30219                                         fi
30220                                 fi
30221                                 # cygwin needs import library, and has unique naming convention
30222                                 # use autodetected ${cf_prefix} for import lib and static lib, but
30223                                 # use 'cyg' prefix for shared lib.
30224                                 case "$cf_cv_shlib_version" in
30225                                 (cygdll)
30226                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30227                                         cf_add_lib="../lib/cyg${cf_libname}${cf_cygsuf}"
30228                                         ;;
30229                                 (msysdll)
30230                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30231                                         cf_add_lib="../lib/msys-${cf_libname}${cf_cygsuf}"
30232                                         ;;
30233                                 (mingw)
30234                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30235                                         cf_add_lib="../lib/lib${cf_libname}${cf_cygsuf}"
30236                                         ;;
30237                                 (msvcdll)
30238                                         cf_cygsuf=`echo "$cf_suffix" | sed -e 's/\.dll/\${ABI_VERSION}.dll/'`
30239                                         cf_add_lib="../lib/${cf_libname}${cf_cygsuf}"
30240                                         ;;
30241                                 (*)
30242                                         cf_add_lib=
30243                                         ;;
30244                                 esac
30245                                 if test -n "$cf_add_lib"
30246                                 then
30247                                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30248                                         continue
30249                                 fi
30250                         fi
30251                         cf_add_lib="../lib/${cf_prefix}${cf_libname}${cf_suffix}"
30252                         Libs_To_Make="$Libs_To_Make $cf_add_lib"
30253                 done
30254
30255                 if test "$cf_dir" = ncurses ; then
30256                         cf_subsets="$LIB_SUBSETS"
30257                         cf_r_parts="$cf_subsets"
30258                         cf_liblist="$Libs_To_Make"
30259
30260                         while test -n "$cf_r_parts"
30261                         do
30262                                 cf_l_parts=`echo "$cf_r_parts" |sed -e 's/ .*$//'`
30263                                 cf_r_parts=`echo "$cf_r_parts" |sed -e 's/^[^ ]* //'`
30264                                 if test "$cf_l_parts" != "$cf_r_parts" ; then
30265                                         cf_add_lib=
30266                                         case "$cf_l_parts" in
30267                                         (*termlib*)
30268                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TINFO_LIB_SUFFIX}%g`
30269                                                 ;;
30270                                         (*ticlib*)
30271                                                 cf_add_lib=`echo "$cf_liblist" |sed -e s%${LIB_NAME}${USE_LIB_SUFFIX}%${TICS_LIB_SUFFIX}%g`
30272                                                 ;;
30273                                         (*)
30274                                                 break
30275                                                 ;;
30276                                         esac
30277                                         if test -n "$cf_add_lib"; then
30278                                                 Libs_To_Make="$cf_add_lib $Libs_To_Make"
30279                                         fi
30280                                 else
30281                                         break
30282                                 fi
30283                         done
30284                 else
30285                         cf_subsets=`echo "$LIB_SUBSETS" | sed -e 's/^termlib.* //'`
30286                 fi
30287
30288                 if test "$cf_dir" = c++; then
30289                         if test "x$with_shared_cxx" != xyes && test -n "$cf_shared_suffix"; then
30290                                 cf_list=
30291                                 for cf_item in $Libs_To_Make
30292                                 do
30293                                         case "$cf_item" in
30294                                         (*.a)
30295                                                 ;;
30296                                         (*)
30297                                                 cf_item=`echo "$cf_item" | sed -e "s,"$cf_shared_suffix",.a,"`
30298                                                 ;;
30299                                         esac
30300                                         for cf_test in $cf_list
30301                                         do
30302                                                 if test "$cf_test" = "$cf_item"
30303                                                 then
30304                                                         cf_LIST_MODELS=`echo "$cf_LIST_MODELS" | sed -e 's/normal//'`
30305                                                         cf_item=
30306                                                         break
30307                                                 fi
30308                                         done
30309                                         test -n "$cf_item" && cf_list="$cf_list $cf_item"
30310                                 done
30311                                 Libs_To_Make="$cf_list"
30312                         fi
30313                 fi
30314
30315                 sed -e "s%@Libs_To_Make@%$Libs_To_Make%" \
30316                     -e "s%@SHARED_LIB@%$SHARED_LIB%" \
30317                         "$cf_dir/Makefile" >$cf_dir/Makefile.out
30318                 mv "$cf_dir/Makefile.out" "$cf_dir/Makefile"
30319
30320                 $AWK -f "$srcdir/mk-0th.awk" \
30321                         libname="${cf_dir}${LIB_SUFFIX}" subsets="$LIB_SUBSETS" ticlib="$TICS_LIB_SUFFIX" termlib="$TINFO_LIB_SUFFIX" \
30322                         "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30323
30324                 for cf_subset in $cf_subsets
30325                 do
30326                         cf_subdirs=
30327                         for cf_item in $cf_LIST_MODELS
30328                         do
30329
30330                         echo "Appending rules for ${cf_item} model (${cf_dir}: ${cf_subset})"
30331
30332 cf_ITEM=`echo "$cf_item" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30333
30334                         CXX_MODEL=$cf_ITEM
30335                         if test "$CXX_MODEL" = SHARED; then
30336                                 case "$cf_cv_shlib_version" in
30337                                 (cygdll|msysdll|mingw|msvcdll)
30338                                         test "x$with_shared_cxx" = xno && test -n "$verbose" && echo "  overriding CXX_MODEL to SHARED" 1>&6
30339
30340 echo "${as_me:-configure}:30340: testing overriding CXX_MODEL to SHARED ..." 1>&5
30341
30342                                         with_shared_cxx=yes
30343                                         ;;
30344                                 (*)
30345                                         test "x$with_shared_cxx" = xno && CXX_MODEL=NORMAL
30346                                         ;;
30347                                 esac
30348                         fi
30349
30350         case X$cf_item in
30351         (Xlibtool)
30352                 cf_suffix='.la'
30353                 cf_depsuf=$cf_suffix
30354                 ;;
30355         (Xdebug)
30356                 case "$cf_cv_system_name" in
30357                 (*-msvc*)
30358                         cf_suffix='_g.lib'
30359                         ;;
30360                 (*)
30361                         cf_suffix='_g.a'
30362                         ;;
30363                 esac
30364                 cf_depsuf=$cf_suffix
30365                 ;;
30366         (Xprofile)
30367                 case "$cf_cv_system_name" in
30368                 (*-msvc*)
30369                         cf_suffix='_p.lib'
30370                         ;;
30371                 (*)
30372                         cf_suffix='_p.a'
30373                         ;;
30374                 esac
30375                 cf_depsuf=$cf_suffix
30376                 ;;
30377         (Xshared)
30378                 case "$cf_cv_system_name" in
30379                 (aix[5-7]*)
30380                         cf_suffix='.so'
30381                         cf_depsuf=$cf_suffix
30382                         ;;
30383                 (*-msvc*)
30384                         cf_suffix='.dll'
30385                         cf_depsuf='.dll.lib'
30386                         ;;
30387                 (cygwin*|msys*|mingw*)
30388                         cf_suffix='.dll'
30389                         cf_depsuf='.dll.a'
30390                         ;;
30391                 (darwin*)
30392                         cf_suffix='.dylib'
30393                         cf_depsuf=$cf_suffix
30394                         ;;
30395                 (hpux*)
30396                         case "$target" in
30397                         (ia64*)
30398                                 cf_suffix='.so'
30399                                 cf_depsuf=$cf_suffix
30400                                 ;;
30401                         (*)
30402                                 cf_suffix='.sl'
30403                                 cf_depsuf=$cf_suffix
30404                                 ;;
30405                         esac
30406                         ;;
30407                 (*)
30408                         cf_suffix='.so'
30409                         cf_depsuf=$cf_suffix
30410                         ;;
30411                 esac
30412                 ;;
30413         (*)
30414                 case "$target" in
30415                 (*-msvc*)
30416                         cf_suffix='.lib'
30417                         ;;
30418                 (*)
30419                         cf_suffix='.a'
30420                         ;;
30421                 esac
30422                 cf_depsuf=$cf_suffix
30423                 ;;
30424         esac
30425         if test -n "${LIB_SUFFIX}${EXTRA_SUFFIX}"
30426         then
30427                 cf_suffix="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_suffix}"
30428                 cf_depsuf="${LIB_SUFFIX}${EXTRA_SUFFIX}${cf_depsuf}"
30429         fi
30430
30431         case $cf_item in
30432         (libtool) cf_subdir='obj_lo'  ;;
30433         (normal)  cf_subdir='objects' ;;
30434         (debug)   cf_subdir='obj_g' ;;
30435         (profile) cf_subdir='obj_p' ;;
30436         (shared)
30437                 case "$cf_cv_system_name" in
30438                 (cygwin|msys)
30439                         cf_subdir='objects' ;;
30440                 (*)
30441                         cf_subdir='obj_s' ;;
30442                 esac
30443         esac
30444
30445                         # Test for case where we build libtinfo with a different name.
30446                         cf_libname=$cf_dir
30447                         if test "$cf_dir" = ncurses ; then
30448                                 case "$cf_subset" in
30449                                 (*base*)
30450                                         cf_libname=${cf_libname}$USE_LIB_SUFFIX
30451                                         ;;
30452                                 (*termlib*)
30453                                         cf_libname=$TINFO_LIB_SUFFIX
30454                                         ;;
30455                                 (ticlib*)
30456                                         cf_libname=$TICS_LIB_SUFFIX
30457                                         ;;
30458                                 esac
30459                         elif test "$cf_dir" = c++ ; then
30460
30461 cf_map_lib_basename=`echo "cxx" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30462
30463 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30464
30465                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30466                         else
30467
30468 cf_map_lib_basename=`echo "$cf_dir" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
30469
30470 eval cf_libname="\$${cf_map_lib_basename}_NAME"
30471
30472                                 cf_libname=${cf_libname}$USE_LIB_SUFFIX
30473                         fi
30474                         if test -n "${USE_ARG_SUFFIX}" ; then
30475                                 # undo $USE_LIB_SUFFIX add-on in CF_LIB_SUFFIX
30476                                 cf_suffix=`echo "$cf_suffix" |sed -e "s%^${USE_LIB_SUFFIX}%%"`
30477                         fi
30478
30479                         # These dependencies really are for development, not
30480                         # builds, but they are useful in porting, too.
30481                         cf_depend="../include/ncurses_cfg.h"
30482                         if test "$srcdir" = "."; then
30483                                 cf_reldir="."
30484                         else
30485                                 cf_reldir="\${srcdir}"
30486                         fi
30487
30488                         if test -f "$srcdir/$cf_dir/$cf_dir.priv.h" ; then
30489                                 cf_depend="$cf_depend $cf_reldir/$cf_dir.priv.h"
30490                         elif test -f "$srcdir/$cf_dir/curses.priv.h" ; then
30491                                 cf_depend="$cf_depend $cf_reldir/curses.priv.h"
30492                         fi
30493
30494                         cf_dir_suffix=
30495                         old_cf_suffix="$cf_suffix"
30496                         if test "$cf_cv_shlib_version_infix" = yes ; then
30497                         if test -n "$USE_LIB_SUFFIX" ; then
30498                                 case "$USE_LIB_SUFFIX" in
30499                                 (tw*)
30500                                         cf_libname=`echo "$cf_libname" | sed 's/tw'$EXTRA_SUFFIX'$//'`
30501                                         cf_suffix=`echo "$cf_suffix" | sed 's/^tw'$EXTRA_SUFFIX'//'`
30502                                         cf_dir_suffix=tw$EXTRA_SUFFIX
30503                                         ;;
30504                                 (t*)
30505                                         cf_libname=`echo "$cf_libname" | sed 's/t'$EXTRA_SUFFIX'$//'`
30506                                         cf_suffix=`echo "$cf_suffix" | sed 's/^t'$EXTRA_SUFFIX'//'`
30507                                         cf_dir_suffix=t$EXTRA_SUFFIX
30508                                         ;;
30509                                 (w*)
30510                                         cf_libname=`echo "$cf_libname" | sed 's/w'$EXTRA_SUFFIX'$//'`
30511                                         cf_suffix=`echo "$cf_suffix" | sed 's/^w'$EXTRA_SUFFIX'//'`
30512                                         cf_dir_suffix=w$EXTRA_SUFFIX
30513                                         ;;
30514                                 (*)
30515                                         cf_libname=`echo "$cf_libname" | sed 's/'$EXTRA_SUFFIX'$//'`
30516                                         cf_suffix=`echo "$cf_suffix" | sed 's/^'$EXTRA_SUFFIX'//'`
30517                                         cf_dir_suffix=$EXTRA_SUFFIX
30518                                         ;;
30519                                 esac
30520                         fi
30521                         fi
30522
30523                         $AWK -f "$srcdir/mk-1st.awk" \
30524                                 name=${cf_libname}${cf_dir_suffix} \
30525                                 traces=$LIB_TRACING \
30526                                 MODEL=$cf_ITEM \
30527                                 CXX_MODEL=$CXX_MODEL \
30528                                 LIB_SUFFIX=$LIB_SUFFIX \
30529                                 USE_LIB_SUFFIX=$USE_LIB_SUFFIX \
30530                                 make_phony="${cf_cv_make_PHONY:-no}" \
30531                                 model=$cf_subdir \
30532                                 prefix=$cf_prefix \
30533                                 suffix=$cf_suffix \
30534                                 subset=$cf_subset \
30535                                 driver=$cf_cv_term_driver \
30536                                 SymLink="$LN_S" \
30537                                 TermlibRoot=$TINFO_NAME \
30538                                 TermlibSuffix=$TINFO_SUFFIX \
30539                                 ShlibVer=$cf_cv_shlib_version \
30540                                 ShlibVerInfix=$cf_cv_shlib_version_infix \
30541                                 ReLink=${cf_cv_do_relink:-no} \
30542                                 ReRanlib=${cf_cv_do_reranlib:-yes} \
30543                                 DoLinks=$cf_cv_do_symlinks \
30544                                 rmSoLocs=$cf_cv_rm_so_locs \
30545                                 ldconfig="$LDCONFIG" \
30546                                 overwrite=$WITH_OVERWRITE \
30547                                 depend="$cf_depend" \
30548                                 host="$host" \
30549                                 libtool_version="$LIBTOOL_VERSION" \
30550                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30551
30552                         cf_suffix="$old_cf_suffix"
30553
30554                         for cf_subdir2 in $cf_subdirs lib
30555                         do
30556                                 test "$cf_subdir" = "$cf_subdir2" && break
30557                         done
30558                         test "${cf_subset}.${cf_subdir2}" != "${cf_subset}.${cf_subdir}" && \
30559                         $AWK -f "$srcdir/mk-2nd.awk" \
30560                                 name=$cf_dir \
30561                                 traces=$LIB_TRACING \
30562                                 MODEL=$cf_ITEM \
30563                                 model=$cf_subdir \
30564                                 subset=$cf_subset \
30565                                 srcdir=$srcdir \
30566                                 echo=$WITH_ECHO \
30567                                 crenames=$cf_cv_prog_CC_c_o \
30568                                 cxxrenames=$cf_cv_prog_CXX_c_o \
30569                                 "$srcdir/$cf_dir/modules" >>$cf_dir/Makefile
30570                         cf_subdirs="$cf_subdirs $cf_subdir"
30571                         done
30572                 done
30573         fi
30574
30575         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >>Makefile
30576 done
30577
30578 echo >> Makefile
30579 echo '# generated by CF_LIB_RULES' >> Makefile
30580
30581 if test "x$cf_cv_make_PHONY" = xyes ; then
30582         cat >> Makefile <<-CF_EOF
30583
30584         .PHONY :        libs
30585         .PHONY :        lintlib
30586         .PHONY :        install.includes
30587         .PHONY :        uninstall.includes
30588         .PHONY :        install.libs
30589         .PHONY :        uninstall.libs
30590 CF_EOF
30591 fi
30592
30593 for cf_dir in $SRC_SUBDIRS
30594 do
30595         if test ! -d "$srcdir/$cf_dir" ; then
30596                 continue
30597         fi
30598
30599         if test -f "$cf_dir/Makefile" ; then
30600                 case "$cf_dir" in
30601                 (Ada95)
30602                         echo 'libs \' >> Makefile
30603                         echo 'install.libs \' >> Makefile
30604                         echo 'uninstall.libs ::' >> Makefile
30605                         echo '  ( cd '$cf_dir' && ${MAKE} ${TOP_MFLAGS} $@ )' >> Makefile
30606                         ;;
30607                 esac
30608         fi
30609
30610         if test -f "$srcdir/$cf_dir/modules" ; then
30611
30612                 if test "x$cf_cv_make_PHONY" = xyes ; then
30613                         cat >> Makefile <<-CF_EOF
30614
30615                         .PHONY :        install.$cf_dir
30616                         .PHONY :        uninstall.$cf_dir
30617 CF_EOF
30618                 fi
30619
30620                 echo >> Makefile
30621                 if test -f "$srcdir/$cf_dir/headers" ; then
30622 cat >> Makefile <<CF_EOF
30623 install.includes \\
30624 uninstall.includes \\
30625 CF_EOF
30626                 fi
30627
30628 cat >> Makefile <<CF_EOF
30629 lint \\
30630 libs \\
30631 lintlib \\
30632 install.libs \\
30633 uninstall.libs \\
30634 install.$cf_dir \\
30635 uninstall.$cf_dir ::
30636         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30637 CF_EOF
30638         elif test -f "$srcdir/$cf_dir/headers" ; then
30639 cat >> Makefile <<CF_EOF
30640
30641 libs \\
30642 install.libs \\
30643 uninstall.libs \\
30644 install.includes \\
30645 uninstall.includes ::
30646         ( cd "$cf_dir" && \${MAKE} \${TOP_MFLAGS} \$@ )
30647 CF_EOF
30648 fi
30649 done
30650
30651 if test "x$cf_cv_make_PHONY" = xyes ; then
30652         cat >> Makefile <<-CF_EOF
30653
30654         .PHONY :        install.data
30655         .PHONY :        uninstall.data
30656 CF_EOF
30657 fi
30658
30659 if test "x$cf_with_db_install" = xyes; then
30660 cat >> Makefile <<CF_EOF
30661
30662 install.libs uninstall.libs \\
30663 install.data uninstall.data ::
30664 $MAKE_TERMINFO  ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30665 CF_EOF
30666 else
30667 cat >> Makefile <<CF_EOF
30668
30669 install.libs uninstall.libs ::
30670         ( cd misc && \${MAKE} \${TOP_MFLAGS} \$@ )
30671 CF_EOF
30672 fi
30673
30674 if test "x$cf_with_manpages" = xyes; then
30675
30676 if test "x$cf_cv_make_PHONY" = xyes ; then
30677         cat >> Makefile <<-CF_EOF
30678
30679         .PHONY :        install.man
30680         .PHONY :        uninstall.man
30681 CF_EOF
30682 fi
30683
30684 cat >> Makefile <<CF_EOF
30685
30686 install.man \\
30687 uninstall.man ::
30688         ( cd man && \${MAKE} \${TOP_MFLAGS} \$@ )
30689 CF_EOF
30690 fi
30691
30692 cat >> Makefile <<CF_EOF
30693
30694 distclean ::
30695         rm -f config.cache config.log config.status Makefile include/ncurses_cfg.h
30696         rm -f headers.sh headers.sed mk_shared_lib.sh
30697         rm -f edit_man.* man_alias.*
30698         rm -rf \${DIRS_TO_MAKE}
30699 CF_EOF
30700
30701 # Special case: tack's manpage lives in its own directory.
30702 if test "x$cf_with_manpages" = xyes; then
30703 if test "x$cf_with_tack" = "xyes"; then
30704 cat >> Makefile <<CF_EOF
30705
30706 install.man \\
30707 uninstall.man ::
30708         ( cd tack && \${MAKE} \${TOP_MFLAGS} \$@ )
30709 CF_EOF
30710 fi
30711 fi
30712
30713 rm -f headers.sed headers.sh
30714
30715 echo creating headers.sh
30716 cat >headers.sh <<CF_EOF
30717 #! $SHELL
30718 # This shell script is generated by the 'configure' script.  It is invoked in a
30719 # subdirectory of the build tree.  It generates a sed-script in the parent
30720 # directory that is used to adjust includes for header files that reside in a
30721 # subdirectory of /usr/include, etc.
30722 PRG=""
30723 while test \$# != 3
30724 do
30725 PRG="\$PRG \$1"; shift
30726 done
30727 DST=\$1
30728 REF=\$2
30729 SRC=\$3
30730 TMPSRC=\${TMPDIR:-/tmp}/\`basename \$SRC\`\$\$
30731 TMPSED=\${TMPDIR:-/tmp}/headers.sed\$\$
30732 echo installing \$SRC in \$DST
30733 CF_EOF
30734
30735 if test "$WITH_CURSES_H" = yes; then
30736         cat >>headers.sh <<CF_EOF
30737 case \$DST in
30738 (/*/include/*)
30739         END=\`basename \$DST\`
30740         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30741         do
30742                 NAME=\`basename \$i\`
30743                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30744         done
30745         ;;
30746 (*)
30747         echo "" >> \$TMPSED
30748         ;;
30749 esac
30750 CF_EOF
30751
30752 else
30753         cat >>headers.sh <<CF_EOF
30754 case \$DST in
30755 (/*/include/*)
30756         END=\`basename \$DST\`
30757         for i in \`cat \$REF/../*/headers |${FGREP-fgrep} -v "#"\`
30758         do
30759                 NAME=\`basename \$i\`
30760                 if test "\$NAME" = "curses.h"
30761                 then
30762                         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30763                         NAME=ncurses.h
30764                 fi
30765                 echo "s/<\$NAME>/<\$END\/\$NAME>/" >> \$TMPSED
30766         done
30767         ;;
30768 (*)
30769         echo "s/<curses.h>/<ncurses.h>/" >> \$TMPSED
30770         ;;
30771 esac
30772 CF_EOF
30773 fi
30774 cat >>headers.sh <<CF_EOF
30775 rm -f \$TMPSRC
30776 sed -f \$TMPSED \$SRC > \$TMPSRC
30777 NAME=\`basename \$SRC\`
30778 CF_EOF
30779 if test "$WITH_CURSES_H" != yes; then
30780         cat >>headers.sh <<CF_EOF
30781 test "\$NAME" = "curses.h" && NAME=ncurses.h
30782 CF_EOF
30783 fi
30784 cat >>headers.sh <<CF_EOF
30785 # Just in case someone gzip'd manpages, remove the conflicting copy.
30786 test -f \$DST/\$NAME.gz && rm -f \$DST/\$NAME.gz
30787
30788 eval \$PRG \$TMPSRC \$DST/\$NAME
30789 rm -f \$TMPSRC \$TMPSED
30790 CF_EOF
30791
30792 chmod 0755 headers.sh
30793
30794 for cf_dir in $SRC_SUBDIRS
30795 do
30796         if test ! -d "$srcdir/$cf_dir" ; then
30797                 continue
30798         fi
30799
30800         if test -f "$srcdir/$cf_dir/headers" ; then
30801                 $AWK -f "$srcdir/mk-hdr.awk" \
30802                         subset="$LIB_SUBSETS" \
30803                         compat="$WITH_CURSES_H" \
30804                         "$srcdir/$cf_dir/headers" >>$cf_dir/Makefile
30805         fi
30806
30807         if test -f "$srcdir/$cf_dir/modules" ; then
30808                 if test "$cf_dir" != "c++" ; then
30809                         if test "x$cf_cv_make_PHONY" = xyes ; then
30810                                 cat >> $cf_dir/Makefile <<-CF_EOF
30811
30812                                 .PHONY :        depend
30813 CF_EOF
30814                         fi
30815
30816                         cat >>$cf_dir/Makefile <<"CF_EOF"
30817 depend : ${AUTO_SRC}
30818         makedepend -- ${CPPFLAGS} -- ${C_SRC}
30819
30820 # DO NOT DELETE THIS LINE -- make depend depends on it.
30821 CF_EOF
30822                 fi
30823         fi
30824 done
30825
30826 if test "x$cf_with_ada" = "xyes" && test "x$cf_cv_prog_gnat_correct" = "xyes"; then
30827 if test -z "$USE_OLD_MAKERULES" ; then
30828         $AWK -f "$srcdir/Ada95/mk-1st.awk" <"$srcdir/Ada95/src/modules" >>Ada95/src/Makefile
30829 fi
30830 fi
30831  ;;
30832   esac
30833 done
30834 EOF
30835
30836 cat >>"$CONFIG_STATUS" <<\EOF
30837
30838 { (exit 0); exit 0; }
30839 EOF
30840 chmod +x "$CONFIG_STATUS"
30841 ac_clean_files=$ac_clean_files_save
30842
30843 # configure is writing to config.log, and then calls config.status.
30844 # config.status does its own redirection, appending to config.log.
30845 # Unfortunately, on DOS this fails, as config.log is still kept open
30846 # by configure, so config.status won't be able to write to it; its
30847 # output is simply discarded.  So we exec the FD to /dev/null,
30848 # effectively closing config.log, so it can be properly (re)opened and
30849 # appended to by config.status.  When coming back to configure, we
30850 # need to make the FD available again.
30851 if test "$no_create" != yes; then
30852   ac_cs_success=:
30853   exec 5>/dev/null
30854   $SHELL "$CONFIG_STATUS" || ac_cs_success=false
30855   exec 5>>config.log
30856   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
30857   # would make configure fail if this is the last instruction.
30858   "$ac_cs_success" || { (exit 1); exit 1; }
30859 fi
30860 ${MAKE:-make} preinstall